drm/i915: Rework global state serializaiton
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 19 Dec 2023 13:07:55 +0000 (15:07 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 2 Feb 2024 21:02:58 +0000 (23:02 +0200)
commite0aee99015a79cf57b653668b06bccc9964b0387
treeca00f700df918380d7053d70eac52eb767799fc0
parent1e41fa9452039beea297105fb6f7f68cb2774e1a
drm/i915: Rework global state serializaiton

Instead of injecting extra crtc commits to serialize the global
state let's hand roll a bit of commit machinery to take care of
the hardware synchronization.

Rather than basing everything on the crtc commits we track these
as their own thing. I think this makes more sense as the hardware
blocks we are working with are not in any way tied to the pipes,
so the completion should not be tied in with the vblank machinery
either.

The difference to the old behaviour is that:
- we no longer pull extra crtcs into the commit which should
  make drm_atomic_check_only() happier
- since those crtcs don't get pulled in we also don't end up
  reprogamming them and thus don't need to wait their vblanks
  to pass/etc. So this should be tad faster as well.

TODO: perhaps have each global object complete its own commit
once the post-plane update phase is done?

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6728
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231219130756.25986-3-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_global_state.c
drivers/gpu/drm/i915/display/intel_global_state.h