Skip to content

Commit 73f54d5

Browse files
committed
drm/mgag200: Remove special case for G200SE with <2 MiB
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> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Tested-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-2-tzimmermann@suse.de
1 parent fae7d18 commit 73f54d5

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

drivers/gpu/drm/mgag200/mgag200_mode.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,14 +1072,6 @@ static const struct drm_mode_config_funcs mgag200_mode_config_funcs = {
10721072
.atomic_commit = drm_atomic_helper_commit,
10731073
};
10741074

1075-
static unsigned int mgag200_preferred_depth(struct mga_device *mdev)
1076-
{
1077-
if (IS_G200_SE(mdev) && mdev->vram_fb_available < (2048*1024))
1078-
return 16;
1079-
else
1080-
return 32;
1081-
}
1082-
10831075
int mgag200_modeset_init(struct mga_device *mdev)
10841076
{
10851077
struct drm_device *dev = &mdev->base;
@@ -1100,11 +1092,8 @@ int mgag200_modeset_init(struct mga_device *mdev)
11001092

11011093
dev->mode_config.max_width = MGAG200_MAX_FB_WIDTH;
11021094
dev->mode_config.max_height = MGAG200_MAX_FB_HEIGHT;
1103-
1104-
dev->mode_config.preferred_depth = mgag200_preferred_depth(mdev);
1105-
1095+
dev->mode_config.preferred_depth = 24;
11061096
dev->mode_config.fb_base = mdev->mc.vram_base;
1107-
11081097
dev->mode_config.funcs = &mgag200_mode_config_funcs;
11091098

11101099
ret = mgag200_i2c_init(mdev, i2c);

0 commit comments

Comments
 (0)