From: Gerd Hoffmann <kraxel@redhat.com> To: dri-devel@lists.freedesktop.org Cc: Gerd Hoffmann <kraxel@redhat.com>, David Airlie <airlied@linux.ie>, linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/6] drm/cirrus: use drm_set_preferred_mode Date: Fri, 11 Oct 2013 10:01:09 +0200 [thread overview] Message-ID: <1381478473-18159-3-git-send-email-kraxel@redhat.com> (raw) In-Reply-To: <1381478473-18159-1-git-send-email-kraxel@redhat.com> 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> --- drivers/gpu/drm/cirrus/cirrus_mode.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index 60685b2..adabc3d 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, -- 1.8.3.1
WARNING: multiple messages have this Message-ID (diff)
From: Gerd Hoffmann <kraxel@redhat.com> To: dri-devel@lists.freedesktop.org Cc: Gerd Hoffmann <kraxel@redhat.com>, David Airlie <airlied@linux.ie>, open list <linux-kernel@vger.kernel.org> Subject: [PATCH 2/6] drm/cirrus: use drm_set_preferred_mode Date: Fri, 11 Oct 2013 10:01:09 +0200 [thread overview] Message-ID: <1381478473-18159-3-git-send-email-kraxel@redhat.com> (raw) In-Reply-To: <1381478473-18159-1-git-send-email-kraxel@redhat.com> 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> --- drivers/gpu/drm/cirrus/cirrus_mode.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index 60685b2..adabc3d 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, -- 1.8.3.1
next prev parent reply other threads:[~2013-10-11 8:01 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-10-11 8:01 [PATCH 0/6] drm: qemu hardware patches Gerd Hoffmann 2013-10-11 8:01 ` [PATCH 1/6] drm: add drm_set_preferred_mode Gerd Hoffmann 2013-10-11 8:01 ` Gerd Hoffmann 2013-10-11 8:01 ` Gerd Hoffmann [this message] 2013-10-11 8:01 ` [PATCH 2/6] drm/cirrus: use drm_set_preferred_mode Gerd Hoffmann 2013-10-11 8:01 ` [PATCH 3/6] drm/qxl: support 64bit surface bar Gerd Hoffmann 2013-10-11 8:01 ` Gerd Hoffmann 2013-10-11 8:01 ` [PATCH 4/6] drm/qxl: add some surface memory logging Gerd Hoffmann 2013-10-11 8:01 ` Gerd Hoffmann 2013-10-11 8:01 ` [PATCH 5/6] [wip] drm/qxl: request regions Gerd Hoffmann 2013-10-11 8:01 ` Gerd Hoffmann 2013-10-11 8:01 ` [PATCH 6/6] [wip] drm/bochs: new driver Gerd Hoffmann 2013-10-11 8:01 ` Gerd Hoffmann 2013-11-06 3:39 ` [PATCH 0/6] drm: qemu hardware patches Dave Airlie 2013-11-06 10:10 ` Daniel Vetter 2013-11-06 11:52 ` Gerd Hoffmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1381478473-18159-3-git-send-email-kraxel@redhat.com \ --to=kraxel@redhat.com \ --cc=airlied@linux.ie \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.