[Intel-gfx] [RFC 4/6] drm/i915: Get right max plane stride
Anshuman Gupta
anshuman.gupta at intel.com
Thu Jan 23 13:26:57 UTC 2020
intel_plane_fb_max_stride should return the max stride of
primary plane for first available pipe in intel device info
pipe_mask.
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index b250b31f6000..b9209b7e71d7 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -2703,12 +2703,15 @@ u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
{
struct intel_crtc *crtc;
struct intel_plane *plane;
+ enum pipe pipe;
/*
* We assume the primary plane for pipe A has
- * the highest stride limits of them all.
+ * the highest stride limits of them all,
+ * if in case pipe A is disabled, use the first pipe from pipe_mask.
*/
- crtc = intel_get_crtc_for_pipe(dev_priv, PIPE_A);
+ pipe = ffs(INTEL_INFO(dev_priv)->pipe_mask) - 1;
+ crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
if (!crtc)
return 0;
--
2.24.0
More information about the Intel-gfx
mailing list