summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/qxl
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-01-18 13:20:19 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-01-28 14:24:54 +0100
commitb5f030b7b4a5c8e91ebc3ee00f35751ee0c1cd06 (patch)
tree8a7d99ea0d2cf6a350688ff684ead91d9acd51eb /drivers/gpu/drm/qxl
parent1b043677d4be206c96b51811855502e50057f343 (diff)
downloadlinux-stable-b5f030b7b4a5c8e91ebc3ee00f35751ee0c1cd06.tar.gz
linux-stable-b5f030b7b4a5c8e91ebc3ee00f35751ee0c1cd06.tar.bz2
linux-stable-b5f030b7b4a5c8e91ebc3ee00f35751ee0c1cd06.zip
drm/qxl: use kernel mode db
Add all standard modes from the kernel's video mode data base. Keep a few non-standard modes in the qxl mode list. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Noralf Trønnes <noralf@tronnes.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190118122020.27596-23-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu/drm/qxl')
-rw-r--r--drivers/gpu/drm/qxl/qxl_display.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index a0562d5a4fda..08c725544a2f 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -262,34 +262,20 @@ static int qxl_add_monitors_config_modes(struct drm_connector *connector)
static struct mode_size {
int w;
int h;
-} common_modes[] = {
- { 640, 480},
+} extra_modes[] = {
{ 720, 480},
- { 800, 600},
- { 848, 480},
- {1024, 768},
{1152, 768},
- {1280, 720},
- {1280, 800},
{1280, 854},
- {1280, 960},
- {1280, 1024},
- {1440, 900},
- {1400, 1050},
- {1680, 1050},
- {1600, 1200},
- {1920, 1080},
- {1920, 1200}
};
-static int qxl_add_common_modes(struct drm_connector *connector)
+static int qxl_add_extra_modes(struct drm_connector *connector)
{
int i, ret = 0;
- for (i = 0; i < ARRAY_SIZE(common_modes); i++)
+ for (i = 0; i < ARRAY_SIZE(extra_modes); i++)
ret += qxl_add_mode(connector,
- common_modes[i].w,
- common_modes[i].h,
+ extra_modes[i].w,
+ extra_modes[i].h,
false);
return ret;
}
@@ -1010,7 +996,8 @@ static int qxl_conn_get_modes(struct drm_connector *connector)
pheight = head->height;
}
- ret += qxl_add_common_modes(connector);
+ ret += drm_add_modes_noedid(connector, 8192, 8192);
+ ret += qxl_add_extra_modes(connector);
ret += qxl_add_monitors_config_modes(connector);
drm_set_preferred_mode(connector, pwidth, pheight);
return ret;