OSDN Git Service

drm/i915: Clean up the bigjoiner state copy logic
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 4 Feb 2022 07:20:49 +0000 (09:20 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 11 Feb 2022 20:42:23 +0000 (22:42 +0200)
commitaeb47df35742376f2fa13ee39039f1873daee626
tree777703bdfd28871ec685f28f35218d81da87ba28
parent2b1466ea19182551ceffcd6deed2b22377cb2a53
drm/i915: Clean up the bigjoiner state copy logic

Currently the bigjoiner state copy logic is kind of
a byzantine mess.

Clean it up to operate in the following manner during a full
modeset:
1) master uapi -> hw state copy
2) master hw -> slave hw state copy

And during a non-modeset update we do:
1) master uapi -> hw state light copy
2) master hw -> slave hw state light copy

I think that is now easier to reason about since we never do
any kind of master uapi -> slave hw state copy short circuit
that could happen previously.

Obviously this does now depend on the master uapi->hw copy
always happening before the master hw -> slave hw copy, but
that is guaranteed by the fact that we always add both crtcs
to the state early, the crtcs are registered in pipe
order (so the compute_config loop happens in pipe order),
and the hardware requires the master pipe has to be lower
than the slave pipe as well. And for good measure we shall
add a check+WARN for this before doing the bigjoiner crtc
assignment.

v2: Fix uapi.ctm vs. hw.ctm copy-paste fail

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220204072049.1610-1-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
drivers/gpu/drm/i915/display/intel_atomic.c
drivers/gpu/drm/i915/display/intel_atomic.h
drivers/gpu/drm/i915/display/intel_display.c