[PATCH weston v6 51/73] compositor-drm: simplify drm_output_find_by_crtc()

Pekka Paalanen ppaalanen at gmail.com
Fri Feb 16 14:57:36 UTC 2018


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

As CRTC is allocated on output enable and deallocated on output disable,
there cannot be any matches in find-by-crtc from the
pending_output_list.

Remove the loop over pending_output_list as never finding anything by
definition.

Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 libweston/compositor-drm.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index dc4f5db5..f38766c5 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -797,12 +797,6 @@ drm_output_find_by_crtc(struct drm_backend *b, uint32_t crtc_id)
 			return output;
 	}
 
-	wl_list_for_each(output, &b->compositor->pending_output_list,
-			 base.link) {
-		if (output->crtc_id == crtc_id)
-			return output;
-	}
-
 	return NULL;
 }
 
-- 
2.13.6



More information about the wayland-devel mailing list