From: Jesse Barnes Date: Fri, 24 Jun 2011 19:19:27 +0000 (-0700) Subject: drm/i915: check for supported depth at fb init time X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b5626747eca6d02124544d1d69049220f1c01fb1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/i915: check for supported depth at fb init time This will catch bad fb configs earlier. Signed-off-by: Jesse Barnes Reviewed-by: Chris Wilson Signed-off-by: Keith Packard --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c166a88e426b..af3e5813366c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -7061,6 +7061,11 @@ int intel_framebuffer_init(struct drm_device *dev, switch (mode_cmd->bpp) { case 8: case 16: + /* Only pre-ILK can handle 5:5:5 */ + if (mode_cmd->depth == 15 && !HAS_PCH_SPLIT(dev)) + return -EINVAL; + break; + case 24: case 32: break;