From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Dave Airlie <airlied@redhat.com>, David Airlie <airlied@linux.ie>,
virtualization@lists.linux-foundation.org (open list:DRM DRIVER
FOR QXL VIRTUAL GPU), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 3/4] qxl: read monitors config at boot
Date: Wed, 1 Mar 2017 11:12:33 +0100 [thread overview]
Message-ID: <1488363154-6889-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1488363154-6889-1-git-send-email-kraxel@redhat.com>
Try to read the client monitors config at driver load time, even without
explicit notification. So in case that info was filled before the driver
loaded and we've missed the notifications because of that the settings
will still be used.
With that place we now have to take care to properly handle a empty client
monitors config, so we don't trip over an uninitialized client monitors
config.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
drivers/gpu/drm/qxl/qxl_display.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 2b99496..cf99ace 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -81,6 +81,10 @@ static int qxl_display_copy_rom_client_monitors_config(struct qxl_device *qdev)
qdev->rom->client_monitors_config_crc);
return MONITORS_CONFIG_BAD_CRC;
}
+ if (!num_monitors) {
+ DRM_DEBUG_KMS("no client monitors configured\n");
+ return status;
+ }
if (num_monitors > qdev->monitors_config->max_allowed) {
DRM_DEBUG_KMS("client monitors list will be truncated: %d < %d\n",
qdev->monitors_config->max_allowed, num_monitors);
@@ -1192,6 +1196,7 @@ int qxl_modeset_init(struct qxl_device *qdev)
qdev_output_init(&qdev->ddev, i);
}
+ qxl_display_read_client_monitors_config(qdev);
qdev->mode_info.mode_config_initialized = true;
drm_mode_config_reset(&qdev->ddev);
--
1.8.3.1
next prev parent reply other threads:[~2017-03-01 12:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1488363154-6889-1-git-send-email-kraxel@redhat.com>
2017-03-01 10:12 ` [PATCH 1/4] qxl: drop mode_info.modes & related code Gerd Hoffmann
2017-03-01 10:12 ` [PATCH 2/4] qxl: limit monitor config read retries Gerd Hoffmann
2017-03-01 10:12 ` Gerd Hoffmann [this message]
2017-03-01 10:12 ` [PATCH 4/4] qxl: fix qxl_conn_get_modes Gerd Hoffmann
2017-03-08 9:19 [PATCH v4 0/7] mmc: bcm2835: Add new driver for the sdhost controller Gerd Hoffmann
2017-03-08 9:19 ` [PATCH 3/4] qxl: read monitors config at boot 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=1488363154-6889-4-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®