[PATCH 5/7] drm/i915: Remove fb pitch limit for no display

Chris Wilson chris at chris-wilson.co.uk
Thu Sep 13 11:11:43 UTC 2018


If there is not a display (and so no CRTCs) then there is no upper limit
to the framebuffer pitch imposed by the CRTC.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3be5fa0acee8..7db14086fb02 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14403,9 +14403,9 @@ static const struct drm_framebuffer_funcs intel_fb_funcs = {
 	.dirty = intel_user_framebuffer_dirty,
 };
 
-static
-u32 intel_fb_pitch_limit(struct drm_i915_private *dev_priv,
-			 uint64_t fb_modifier, uint32_t pixel_format)
+static u32
+intel_fb_pitch_limit(struct drm_i915_private *dev_priv,
+		     uint64_t fb_modifier, uint32_t pixel_format)
 {
 	struct intel_crtc *crtc;
 	struct intel_plane *plane;
@@ -14415,6 +14415,9 @@ u32 intel_fb_pitch_limit(struct drm_i915_private *dev_priv,
 	 * the highest stride limits of them all.
 	 */
 	crtc = intel_get_crtc_for_pipe(dev_priv, PIPE_A);
+	if (!crtc)
+		return U32_MAX;
+
 	plane = to_intel_plane(crtc->base.primary);
 
 	return plane->max_stride(plane, pixel_format, fb_modifier,
-- 
2.19.0



More information about the Intel-gfx-trybot mailing list