As a disabled pipe in pipe_mask is not having a valid intel crtc, driver wrongly populates the possible_crtcs mask while initializing the plane for a CRTC. Fixing up the plane possible_crtc mask.
changes since RFC: - Simplify the possible_crtcs initialization. [Ville] Cc: Ville Syrjälä <ville.syrj...@linux.intel.com> Signed-off-by: Anshuman Gupta <anshuman.gu...@intel.com> --- drivers/gpu/drm/i915/display/intel_display.c | 12 ++++++++++++ drivers/gpu/drm/i915/display/intel_sprite.c | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index cf36c3d0f8fc..7c51eb3faeb3 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -16407,6 +16407,17 @@ static void intel_crtc_free(struct intel_crtc *crtc) kfree(crtc); } +static void intel_plane_possible_crtc_init(struct drm_i915_private *dev_priv) +{ + struct intel_crtc *crtc; + struct intel_plane *plane; + + for_each_intel_plane(&dev_priv->drm, plane) { + crtc = intel_get_crtc_for_pipe(dev_priv, plane->pipe); + plane->base.possible_crtcs = drm_crtc_mask(&crtc->base); + } +} + static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe) { struct intel_plane *primary, *cursor; @@ -17546,6 +17557,7 @@ int intel_modeset_init(struct drm_i915_private *i915) } } + intel_plane_possible_crtc_init(i915); intel_shared_dpll_init(dev); intel_update_fdi_pll_freq(i915); diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c index fca77ec1e0dd..4a5b192678bf 100644 --- a/drivers/gpu/drm/i915/display/intel_sprite.c +++ b/drivers/gpu/drm/i915/display/intel_sprite.c @@ -3023,8 +3023,6 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv, else plane_type = DRM_PLANE_TYPE_OVERLAY; - possible_crtcs = BIT(pipe); - ret = drm_universal_plane_init(&dev_priv->drm, &plane->base, possible_crtcs, plane_funcs, formats, num_formats, modifiers, -- 2.24.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx