mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: David Airlie <airlied@linux.ie>
Cc: Stefan Dirsch <sndirsch@suse.de>,
	Bernhard Wiedemann <bwiedemann@suse.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] drm/cirrus: Use 16bpp as default
Date: Fri, 25 Jan 2013 17:21:55 +0100	[thread overview]
Message-ID: <1359130915-30082-2-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1359130915-30082-1-git-send-email-tiwai@suse.de>

We've got a bug report that GNOME on QEMU shows wrong colors.
It turned out that it's because Cairo doesn't support 24bpp well.
This hasn't been an issue until now because we (at least SUSE and
Fedora) have a patch to use 16bpp for QEMU in Xorg cirrus UMS driver.

Since cirrus KMS driver is mainly targeted for the use on QEMU/KVM, we
should choose 16bpp as default, too.

Also, it's not convenient to set the default bpp in multiple places.
cirrus_fbdev_init() should check the original preferred depth set in
cirrus_modeset_init().

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=799216

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 +-
 drivers/gpu/drm/cirrus/cirrus_mode.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
index 6c6b4c8..bc081ea 100644
--- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c
+++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
@@ -273,7 +273,7 @@ int cirrus_fbdev_init(struct cirrus_device *cdev)
 {
 	struct cirrus_fbdev *gfbdev;
 	int ret;
-	int bpp_sel = 24;
+	int bpp_sel = cdev->dev->mode_config.preferred_depth;
 
 	/*bpp_sel = 8;*/
 	gfbdev = kzalloc(sizeof(struct cirrus_fbdev), GFP_KERNEL);
diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
index 379a47e..e259f07 100644
--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
@@ -588,7 +588,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 = 16;
 	/* don't prefer a shadow on virt GPU */
 	cdev->dev->mode_config.prefer_shadow = 0;
 
-- 
1.8.1.1


  reply	other threads:[~2013-01-25 16:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 16:21 [PATCH 1/2] drm/cirrus: Correct register values for 16bpp Takashi Iwai
2013-01-25 16:21 ` Takashi Iwai [this message]
2013-01-29  8:29   ` [PATCH] drm/cirrus: Add bpp option Takashi Iwai
2013-01-29  9:53     ` Daniel Vetter
2013-01-29  9:57       ` Takashi Iwai
2013-01-29 10:03         ` Daniel Vetter
2013-01-29  8:26 ` [PATCH 1/2] drm/cirrus: Correct register values for 16bpp Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359130915-30082-2-git-send-email-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=airlied@linux.ie \
    --cc=bwiedemann@suse.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sndirsch@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®