]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Don't oops in dumb_create ioctl if we have no crtcs
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 6 Nov 2019 17:23:49 +0000 (19:23 +0200)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Mon, 11 Nov 2019 08:30:12 +0000 (10:30 +0200)
commitd81f273e60db34b5de6d201bb38f9c7a9a228c31
tree94c503856187a7c4703c2447800a0fe6263808a5
parent7a9ad5435de1667d1bd354a216ba28dd53476366
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: stable@vger.kernel.org
Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Fixes: 3d86a6cd8a84 ("drm/i915: Align dumb buffer stride to 4k to allow for gtt remapping")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191106172349.11987-1-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit baea9ffe64200033499a4955f431e315bb807899)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/display/intel_display.c