]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/cirrus: flip default from 24bpp to 16bpp
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 8 Aug 2018 11:13:11 +0000 (13:13 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 10 Aug 2018 05:57:47 +0000 (07:57 +0200)
The problem with 24bpp is that it is a rather unusual depth these days,
cirrus is pretty much the only relevant device still using that, and it
is a endless source of issues.  Wayland doesn't support it at all.  Bugs
in Xorg keep showing up.

Typically either 32bpp or 16bpp are used.  Using 32bpp would limit the
resolution to 800x600 due to hardware constrains.  So lets go with 16bpp.

Also use the default depth for the framebuffer console and
mode_info->preferred_depth.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180808111311.30311-1-kraxel@redhat.com
drivers/gpu/drm/cirrus/cirrus_drv.c
drivers/gpu/drm/cirrus/cirrus_fbdev.c
drivers/gpu/drm/cirrus/cirrus_mode.c

index 69c4e352dd784bbc33921746af2276c0f4e6899f..b4f7be056ca3a632ac32c896ff4706b71d14260b 100644 (file)
 #include "cirrus_drv.h"
 
 int cirrus_modeset = -1;
-int cirrus_bpp = 24;
+int cirrus_bpp = 16;
 
 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
 module_param_named(modeset, cirrus_modeset, int, 0400);
-MODULE_PARM_DESC(bpp, "Max bits-per-pixel (default:24)");
+MODULE_PARM_DESC(bpp, "Max bits-per-pixel (default:16)");
 module_param_named(bpp, cirrus_bpp, int, 0400);
 
 /*
index 82cc82e0bd80db980f76f37cbc49ce176a268025..68ab1821e15bcc1787a9dd9800963971a4321117 100644 (file)
@@ -277,7 +277,6 @@ int cirrus_fbdev_init(struct cirrus_device *cdev)
 {
        struct cirrus_fbdev *gfbdev;
        int ret;
-       int bpp_sel = 24;
 
        /*bpp_sel = 8;*/
        gfbdev = kzalloc(sizeof(struct cirrus_fbdev), GFP_KERNEL);
@@ -302,7 +301,7 @@ int cirrus_fbdev_init(struct cirrus_device *cdev)
        /* disable all the possible outputs/crtcs before entering KMS mode */
        drm_helper_disable_unused_functions(cdev->dev);
 
-       return drm_fb_helper_initial_config(&gfbdev->helper, bpp_sel);
+       return drm_fb_helper_initial_config(&gfbdev->helper, cirrus_bpp);
 }
 
 void cirrus_fbdev_fini(struct cirrus_device *cdev)
index 90a4e641d3fb94791846ffba1c8d5b43879ac1a0..ed7dcf212a34171f13f73f48c499fde9bb4e66c5 100644 (file)
@@ -512,7 +512,7 @@ int cirrus_modeset_init(struct cirrus_device *cdev)
        cdev->dev->mode_config.max_height = CIRRUS_MAX_FB_HEIGHT;
 
        cdev->dev->mode_config.fb_base = cdev->mc.vram_base;
-       cdev->dev->mode_config.preferred_depth = 24;
+       cdev->dev->mode_config.preferred_depth = cirrus_bpp;
        /* don't prefer a shadow on virt GPU */
        cdev->dev->mode_config.prefer_shadow = 0;