aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/qxl/qxl_drv.h
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2015-08-20 14:04:32 -0500
committerDave Airlie <airlied@redhat.com>2015-09-11 10:51:33 +1000
commitbd3e1c7c6de9f5f70d97cdb6c817151c0477c5e3 (patch)
treee9e2cf4828ba1e7bbcfac6c198d8dcc09105c2fc /drivers/gpu/drm/qxl/qxl_drv.h
parentMerge branch 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux into drm-next (diff)
downloadlinux-dev-bd3e1c7c6de9f5f70d97cdb6c817151c0477c5e3.tar.xz
linux-dev-bd3e1c7c6de9f5f70d97cdb6c817151c0477c5e3.zip
drm/qxl: validate monitors config modes
Due to some recent changes in drm_helper_probe_single_connector_modes_merge_bits(), old custom modes were not being pruned properly. In current kernels, drm_mode_validate_basic() is called to sanity-check each mode in the list. If the sanity-check passes, the mode's status gets set to to MODE_OK. In older kernels this check was not done, so old custom modes would still have a status of MODE_UNVERIFIED at this point, and would therefore be pruned later in the function. As a result of this new behavior, the list of modes for a device always includes every custom mode ever configured for the device, with the largest one listed first. Since desktop environments usually choose the first preferred mode when a hotplug event is emitted, this had the result of making it very difficult for the user to reduce the size of the display. The qxl driver did implement the mode_valid connector function, but it was empty. In order to restore the old behavior where old custom modes are pruned, we implement a proper mode_valid function for the qxl driver. This function now checks each mode against the last configured custom mode and the list of standard modes. If the mode doesn't match any of these, its status is set to MODE_BAD so that it will be pruned as expected. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/qxl/qxl_drv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index d8549690801d..01a86948eb8c 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -325,6 +325,8 @@ struct qxl_device {
struct work_struct fb_work;
struct drm_property *hotplug_mode_update_property;
+ int monitors_config_width;
+ int monitors_config_height;
};
/* forward declaration for QXL_INFO_IO */