Skip to content

Commit 8ac495f

Browse files
vsyrjalarodrigovivi
authored andcommitted
drm/i915: Don't oops in dumb_create ioctl if we have no crtcs
Make sure we have a crtc before probing its primary plane's max stride. Initially I thought we can't get this far without crtcs, but looks like we can via the dumb_create ioctl. Not sure if we shouldn't disable dumb buffer support entirely when we have no crtcs, but that would require some amount of work as the only thing currently being checked is dev->driver->dumb_create which we'd have to convert to some device specific dynamic thing. Cc: [email protected] Reported-by: Mika Kuoppala <[email protected]> Fixes: aa5ca8b ("drm/i915: Align dumb buffer stride to 4k to allow for gtt remapping") Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Chris Wilson <[email protected]> (cherry picked from commit baea9ff) Signed-off-by: Joonas Lahtinen <[email protected]> (cherry picked from commit aeec766) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent af42d34 commit 8ac495f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2504,6 +2504,9 @@ u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
25042504
* the highest stride limits of them all.
25052505
*/
25062506
crtc = intel_get_crtc_for_pipe(dev_priv, PIPE_A);
2507+
if (!crtc)
2508+
return 0;
2509+
25072510
plane = to_intel_plane(crtc->base.primary);
25082511

25092512
return plane->max_stride(plane, pixel_format, modifier,

0 commit comments

Comments
 (0)