Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+7 -20
+7 -20
drivers/gpu/drm/qxl/qxl_display.c
··· 262 262 static struct mode_size { 263 263 int w; 264 264 int h; 265 - } common_modes[] = { 266 - { 640, 480}, 265 + } extra_modes[] = { 267 266 { 720, 480}, 268 - { 800, 600}, 269 - { 848, 480}, 270 - {1024, 768}, 271 267 {1152, 768}, 272 - {1280, 720}, 273 - {1280, 800}, 274 268 {1280, 854}, 275 - {1280, 960}, 276 - {1280, 1024}, 277 - {1440, 900}, 278 - {1400, 1050}, 279 - {1680, 1050}, 280 - {1600, 1200}, 281 - {1920, 1080}, 282 - {1920, 1200} 283 269 }; 284 270 285 - static int qxl_add_common_modes(struct drm_connector *connector) 271 + static int qxl_add_extra_modes(struct drm_connector *connector) 286 272 { 287 273 int i, ret = 0; 288 274 289 - for (i = 0; i < ARRAY_SIZE(common_modes); i++) 275 + for (i = 0; i < ARRAY_SIZE(extra_modes); i++) 290 276 ret += qxl_add_mode(connector, 291 - common_modes[i].w, 292 - common_modes[i].h, 277 + extra_modes[i].w, 278 + extra_modes[i].h, 293 279 false); 294 280 return ret; 295 281 } ··· 996 1010 pheight = head->height; 997 1011 } 998 1012 999 - ret += qxl_add_common_modes(connector); 1013 + ret += drm_add_modes_noedid(connector, 8192, 8192); 1014 + ret += qxl_add_extra_modes(connector); 1000 1015 ret += qxl_add_monitors_config_modes(connector); 1001 1016 drm_set_preferred_mode(connector, pwidth, pheight); 1002 1017 return ret;