]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/i915: check for supported depth at fb init time
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 24 Jun 2011 19:19:27 +0000 (12:19 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 7 Jul 2011 20:20:54 +0000 (13:20 -0700)
This will catch bad fb configs earlier.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/intel_display.c

index c166a88e426bc439871993a005fb9133c7fb385f..af3e5813366c22d7dc0c9588cdadba0fb512d890 100644 (file)
@@ -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;