drm/i915: Fix intel_modeset_pipe_config_late() for bigjoiner
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 4 Apr 2024 21:34:30 +0000 (00:34 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 8 Apr 2024 12:28:17 +0000 (15:28 +0300)
commit3a5e09d82f97ccfa97670e0ccf79180d7f7e2a32
treea6ec5790b22b63c7cbb251219d83619b510d5e7b
parentf9d5e51db65652dbd8a2102fd7619440e3599fd2
drm/i915: Fix intel_modeset_pipe_config_late() for bigjoiner

Currently intel_modeset_pipe_config_late() is called after the
bigjoiner state copy, and it will actually not do anything for
bigjoiner slaves. This can lead to a mismatched state between
the master and slave.

The two things that we do in the encoder .compute_config_late()
hook are mst master transcoder and port sync master transcoder
elections. So if either of either MST or port sync is combined
with bigjoiner then we can see the mismatch.

Currently this problem is more or less theoretical; MST+bigjoiner
has not been implemented yet, and port sync+bigjoiner would
require a tiled display with >5k tiles (or a very high
dotclock per tile). Although we do have kms_tiled_display in
igt which can fake a tiled display, and we can now force bigjoiner
via debugfs, so it is possible to trigger this if you try hard
enough.

Reorder the code such that intel_modeset_pipe_config_late()
will be called before the bigjoiner state copy happens so
that both pipes will end up with the same state.

Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404213441.17637-7-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_display.c