diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-10-11 04:01:09 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-11-05 22:36:19 -0500 |
commit | 121a6a17439b000b9699c3fa876636db20fa4107 (patch) | |
tree | 21f82542ba40531df4a8d882cd7a885d67e89dfd /drivers/gpu | |
parent | 3cf70dafd7bbbc91df0a9ecb081d46f9f3d867f6 (diff) |
drm/cirrus: use drm_set_preferred_mode
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>
Diffstat (limited to 'drivers/gpu')
-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 60685b21cc36..adabc3daaa5b 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) | |||
494 | 494 | ||
495 | int cirrus_vga_get_modes(struct drm_connector *connector) | 495 | int cirrus_vga_get_modes(struct drm_connector *connector) |
496 | { | 496 | { |
497 | /* Just add a static list of modes */ | 497 | int count; |
498 | drm_add_modes_noedid(connector, 640, 480); | ||
499 | drm_add_modes_noedid(connector, 800, 600); | ||
500 | drm_add_modes_noedid(connector, 1024, 768); | ||
501 | drm_add_modes_noedid(connector, 1280, 1024); | ||
502 | 498 | ||
503 | return 4; | 499 | /* Just add a static list of modes */ |
500 | count = drm_add_modes_noedid(connector, 1280, 1024); | ||
501 | drm_set_preferred_mode(connector, 1024, 768); | ||
502 | return count; | ||
504 | } | 503 | } |
505 | 504 | ||
506 | static int cirrus_vga_mode_valid(struct drm_connector *connector, | 505 | static int cirrus_vga_mode_valid(struct drm_connector *connector, |