Skip to content

Commit 3c1ea6a

Browse files
vsyrjalatursulin
authored andcommitted
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: [email protected] Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Arun R Murthy <[email protected]> (cherry picked from commit f1c87a9) Signed-off-by: Tvrtko Ursulin <[email protected]>
1 parent 2f38305 commit 3c1ea6a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3723,12 +3723,16 @@ static bool ilk_get_pipe_config(struct intel_crtc *crtc,
37233723

37243724
static u8 bigjoiner_pipes(struct drm_i915_private *i915)
37253725
{
3726+
u8 pipes;
3727+
37263728
if (DISPLAY_VER(i915) >= 12)
3727-
return BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C) | BIT(PIPE_D);
3729+
pipes = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C) | BIT(PIPE_D);
37283730
else if (DISPLAY_VER(i915) >= 11)
3729-
return BIT(PIPE_B) | BIT(PIPE_C);
3731+
pipes = BIT(PIPE_B) | BIT(PIPE_C);
37303732
else
3731-
return 0;
3733+
pipes = 0;
3734+
3735+
return pipes & RUNTIME_INFO(i915)->pipe_mask;
37323736
}
37333737

37343738
static bool transcoder_ddi_func_is_enabled(struct drm_i915_private *dev_priv,

0 commit comments

Comments
 (0)