diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-10-11 10:01:09 +0200 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-04-18 11:05:24 +0200 |
commit | 7837b5ae7cd2a1be36cef09f923289fe7c076a34 (patch) | |
tree | f8972668edef7d1adf7d29e9bc247cfcaa5c089b /drivers | |
parent | 1d2fa7e7e9182bbd085e314d6c804ab34d068e47 (diff) |
drm/cirrus: use drm_set_preferred_mode
commit 121a6a17439b000b9699c3fa876636db20fa4107 upstream.
Explicitly set 1024x768 as default mode, so the display doesn't come up
with the largest supported mode.
While being at it drop first three drm_add_modes_noedid calls. As
drm_add_modes_noedid fills the mode list with modes from the database
*up to* the specified size it is pretty pointless to call it multiple
times with different sizes.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/cirrus/cirrus_mode.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index 379a47ea99f6..3592616d484b 100644 --- a/drivers/gpu/drm/cirrus/cirrus_mode.c +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c @@ -494,13 +494,12 @@ static struct drm_encoder *cirrus_encoder_init(struct drm_device *dev) int cirrus_vga_get_modes(struct drm_connector *connector) { - /* Just add a static list of modes */ - drm_add_modes_noedid(connector, 640, 480); - drm_add_modes_noedid(connector, 800, 600); - drm_add_modes_noedid(connector, 1024, 768); - drm_add_modes_noedid(connector, 1280, 1024); + int count; - return 4; + /* Just add a static list of modes */ + count = drm_add_modes_noedid(connector, 1280, 1024); + drm_set_preferred_mode(connector, 1024, 768); + return count; } static int cirrus_vga_mode_valid(struct drm_connector *connector, |