All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, jfalempe@redhat.com, airlied@linux.ie,
	daniel@ffwll.ch
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH 01/10] drm/mgag200: Remove special case for G200SE with <2 MiB
Date: Wed,  1 Jun 2022 13:25:13 +0200	[thread overview]
Message-ID: <20220601112522.5774-2-tzimmermann@suse.de> (raw)
In-Reply-To: <20220601112522.5774-1-tzimmermann@suse.de>

Remove old test for 32-bit vs 16-bit colors. Prefer 24-bit color depth
on all devices. 32-bit color depth doesn't exist, it should have always
been 24-bit.

G200SE with less than 2 MiB of video memory have defaulted to 16-bit
color depth, as the original revision of the G200SE had only 1.75 MiB
of video memory. Using 16-bit colors enabled XGA resolution. But we
now already limit these devices to VGA resolutions as the memory-bandwith
test assumes 32-bit pixel size. So drop the special case from color-depth
selection.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/mgag200/mgag200_mode.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 028c6ba7124c..8cb72e11a2ea 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -1072,14 +1072,6 @@ static const struct drm_mode_config_funcs mgag200_mode_config_funcs = {
 	.atomic_commit = drm_atomic_helper_commit,
 };
 
-static unsigned int mgag200_preferred_depth(struct mga_device *mdev)
-{
-	if (IS_G200_SE(mdev) && mdev->vram_fb_available < (2048*1024))
-		return 16;
-	else
-		return 32;
-}
-
 int mgag200_modeset_init(struct mga_device *mdev)
 {
 	struct drm_device *dev = &mdev->base;
@@ -1100,11 +1092,8 @@ int mgag200_modeset_init(struct mga_device *mdev)
 
 	dev->mode_config.max_width = MGAG200_MAX_FB_WIDTH;
 	dev->mode_config.max_height = MGAG200_MAX_FB_HEIGHT;
-
-	dev->mode_config.preferred_depth = mgag200_preferred_depth(mdev);
-
+	dev->mode_config.preferred_depth = 24;
 	dev->mode_config.fb_base = mdev->mc.vram_base;
-
 	dev->mode_config.funcs = &mgag200_mode_config_funcs;
 
 	ret = mgag200_i2c_init(mdev, i2c);
-- 
2.36.1


  reply	other threads:[~2022-06-01 11:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01 11:25 [PATCH 00/10] drm/mgag200: Convert device init to use device-info structure Thomas Zimmermann
2022-06-01 11:25 ` Thomas Zimmermann [this message]
2022-06-01 11:25 ` [PATCH 02/10] drm/mgag200: Initialize each model in separate function Thomas Zimmermann
2022-06-01 11:25 ` [PATCH 03/10] drm/mgag200: Move PCI-option setup into model-specific code Thomas Zimmermann
2022-06-01 11:25 ` [PATCH 04/10] drm/mgag200: Call mgag200_device_probe_vram() from per-model init Thomas Zimmermann
2022-06-01 11:25 ` [PATCH 05/10] drm/mgag200: Implement new init logic Thomas Zimmermann
2022-06-01 11:25 ` [PATCH 06/10] drm/mgag200: Add struct mgag200_device_info Thomas Zimmermann
2022-06-01 11:25 ` [PATCH 07/10] drm/mgag200: Store HW_BUG_NO_STARTADD flag in device info Thomas Zimmermann
2022-06-01 11:25 ` [PATCH 08/10] drm/mgag200: Store maximum resolution and memory bandwith " Thomas Zimmermann
2022-06-01 11:25 ` [PATCH 09/10] drm/mgag200: Store vidrst flag " Thomas Zimmermann
2022-06-01 11:25 ` [PATCH 10/10] drm/mgag200: Store positions of I2C data and clock bits " Thomas Zimmermann
2022-06-02  9:52 ` [PATCH 00/10] drm/mgag200: Convert device init to use device-info structure Jocelyn Falempe
2022-06-02 11:07   ` Thomas Zimmermann

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=20220601112522.5774-2-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jfalempe@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.