Files
linux/drivers/gpu/drm/xe
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>
2026-04-13 10:16:13 +03:00
..
2026-03-12 07:23:23 -07:00
2025-10-15 22:48:54 -07:00
2026-04-07 12:36:31 +02:00
2025-07-01 13:58:50 -07:00
2025-12-22 10:22:00 -08:00
2024-05-22 12:03:55 +02:00
2026-03-16 07:36:41 -07:00
2026-02-20 15:49:58 +01:00
2026-03-23 15:23:24 +05:30
2026-03-23 15:23:24 +05:30
2025-01-27 08:54:06 -08:00
2025-02-03 11:51:26 -08:00
2026-04-07 12:36:31 +02:00
2026-04-07 12:36:31 +02:00
2025-06-27 14:52:31 -07:00
2025-12-24 07:59:35 -08:00