linux/drivers/gpu/drm/xe/display
Ville Syrjälä f49499e635 drm/i915: Walk crtcs in pipe order
Currently our crtcs are registered in pipe order, and thus
all the for_intel_crtc*() iterators walk the crtcs in pipe
order. There are a bunch of places that more or less depend
on that. Eg. during plane updates and such we want joined
pipes to be processed back-to-back to give a better chance
of an atomic update across the whole set.

When we start to register crtcs in a different order we don't
want to change the order in which the pipes get handled.
Decouple the for_each_intel_crtc*() iterators from the crtc
registration order by using a separate list which will be
sorted by the pipe rather than the crtc index.

We could probably use a simple array or something, but that
would require some kind of extra iterator variable for the
macros, and thus would require a lot more changes. Using
a linked list keeps the fallout minimal. We can look at
using a more optimal data structure later.

I also added this extra junk to the atomic state iterators:
"(__i) = drm_crtc_index(&(crtc)->base), (void)(__i)"
even though the macro itself no longer needs the "__i" iterator.
This in case the "__i" is used by the caller, and to
avoid compiler warnings if it's completely unused now.

v2: Flip the pipe comparison (Jani)

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260408155744.13326-3-ville.syrjala@linux.intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
History 2026-04-13 10:16:13 +03:00
..
intel_fbdev_fb.c drm/xe: Rename XE_BO_FLAG_SCANOUT to XE_BO_FLAG_FORCE_WC 2026-03-24 09:29:10 -04:00
xe_display.c drm/i915: Walk crtcs in pipe order 2026-04-13 10:16:13 +03:00
xe_display.h drm/xe: Drop GT parameter to xe_display_irq_postinstall() 2025-10-14 07:44:57 -07:00
xe_display_bo.c drm/xe: Rename XE_BO_FLAG_SCANOUT to XE_BO_FLAG_FORCE_WC 2026-03-24 09:29:10 -04:00
xe_display_bo.h drm/{i915, xe}/bo: move display bo calls to parent interface 2026-03-16 11:00:21 +02:00
xe_display_pcode.c drm/{i915, xe}/pcode: move display pcode calls to parent interface 2026-01-27 16:45:53 +02:00
xe_display_pcode.h drm/{i915, xe}/pcode: move display pcode calls to parent interface 2026-01-27 16:45:53 +02:00
xe_display_rpm.c drm/{i915,xe}/display: drop intel_wakeref.h usage 2025-12-01 15:18:13 +02:00
xe_display_rpm.h drm/xe/display: Runtime pm wrappers for display parent interface 2025-11-03 11:55:21 +02:00
xe_display_vma.h drm/xe/compat: remove i915_vma.h from compat 2026-03-03 16:05:58 +02:00
xe_display_wa.c drm/xe: Check that GT is not NULL before testing Wa_16023588340 2025-10-14 07:45:17 -07:00
xe_dsb_buffer.c drm/xe: Rename XE_BO_FLAG_SCANOUT to XE_BO_FLAG_FORCE_WC 2026-03-24 09:29:10 -04:00
xe_dsb_buffer.h drm/{i915, xe}/dsb: move DSB buffer to parent interface 2026-01-26 11:56:41 +02:00
xe_fb_pin.c drm/xe/display: Add support for AuxCCS 2026-03-24 09:29:11 -04:00
xe_frontbuffer.c drm/{i915, xe}/frontbuffer: move frontbuffer handling to parent interface 2026-03-11 11:32:10 +02:00
xe_frontbuffer.h drm/{i915, xe}/frontbuffer: move frontbuffer handling to parent interface 2026-03-11 11:32:10 +02:00
xe_hdcp_gsc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
xe_hdcp_gsc.h drm/{i915,xe}/hdcp: use parent interface for HDCP GSC calls 2025-11-28 10:44:51 +02:00
xe_initial_plane.c drm/xe: Rename XE_BO_FLAG_SCANOUT to XE_BO_FLAG_FORCE_WC 2026-03-24 09:29:10 -04:00
xe_initial_plane.h drm/{i915, xe}: move initial plane calls to parent interface 2025-12-22 15:09:22 +02:00
xe_panic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
xe_panic.h drm/{i915, xe}/panic: move panic handling to parent interface 2025-12-12 15:17:58 +02:00
xe_stolen.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
xe_stolen.h drm/{i915, xe}/stolen: move stolen memory handling to display parent interface 2025-12-10 11:36:11 +02:00
xe_tdf.c drm/xe: stop including intel_display_{core, device}.h from xe_device_types.h 2025-05-27 11:25:53 +03:00