drm/i915: Remove non-existent pipes from bigjoiner pipe mask
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 18 Nov 2022 18:52:01 +0000 (20:52 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 22 Nov 2022 12:44:39 +0000 (14:44 +0200)
commitf1c87a94a1087a26f41007ee83264033007421b5
treeb820cf8debef47db416a7ba20009a86b0201d5f2
parent8853750dbad8f5dbf912a9f13b3fea41965634e1
drm/i915: Remove non-existent pipes from bigjoiner pipe mask

bigjoiner_pipes() doesn't consider that:
- RKL only has three pipes
- some pipes may be fused off

This means that intel_atomic_check_bigjoiner() won't reject
all configurations that would need a non-existent pipe.
Instead we just keep on rolling witout actually having
reserved the slave pipe we need.

It's possible that we don't outright explode anywhere due to
this since eg. for_each_intel_crtc_in_pipe_mask() will only
walk the crtcs we've registered even though the passed in
pipe_mask asks for more of them. But clearly the thing won't
do what is expected of it when the required pipes are not
present.

Fix the problem by consulting the device info pipe_mask already
in bigjoiner_pipes().

Cc: stable@vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221118185201.10469-1-ville.syrjala@linux.intel.com
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
drivers/gpu/drm/i915/display/intel_display.c