mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
qxl: move qxl_send_monitors_config()
Needed to avoid a forward declaration in a followup patch. Pure code move, no functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20180420071904.24276-3-kraxel@redhat.com
This commit is contained in:
parent
735581a0a1
commit
998010bfae
1 changed files with 23 additions and 24 deletions
|
@ -258,6 +258,29 @@ static int qxl_add_common_modes(struct drm_connector *connector,
|
||||||
return i - 1;
|
return i - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void qxl_send_monitors_config(struct qxl_device *qdev)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
BUG_ON(!qdev->ram_header->monitors_config);
|
||||||
|
|
||||||
|
if (qdev->monitors_config->count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0 ; i < qdev->monitors_config->count ; ++i) {
|
||||||
|
struct qxl_head *head = &qdev->monitors_config->heads[i];
|
||||||
|
|
||||||
|
if (head->y > 8192 || head->x > 8192 ||
|
||||||
|
head->width > 8192 || head->height > 8192) {
|
||||||
|
DRM_ERROR("head %d wrong: %dx%d+%d+%d\n",
|
||||||
|
i, head->width, head->height,
|
||||||
|
head->x, head->y);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
qxl_io_monitors_config(qdev);
|
||||||
|
}
|
||||||
|
|
||||||
static void qxl_crtc_atomic_flush(struct drm_crtc *crtc,
|
static void qxl_crtc_atomic_flush(struct drm_crtc *crtc,
|
||||||
struct drm_crtc_state *old_crtc_state)
|
struct drm_crtc_state *old_crtc_state)
|
||||||
{
|
{
|
||||||
|
@ -378,30 +401,6 @@ static bool qxl_crtc_mode_fixup(struct drm_crtc *crtc,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
qxl_send_monitors_config(struct qxl_device *qdev)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
BUG_ON(!qdev->ram_header->monitors_config);
|
|
||||||
|
|
||||||
if (qdev->monitors_config->count == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (i = 0 ; i < qdev->monitors_config->count ; ++i) {
|
|
||||||
struct qxl_head *head = &qdev->monitors_config->heads[i];
|
|
||||||
|
|
||||||
if (head->y > 8192 || head->x > 8192 ||
|
|
||||||
head->width > 8192 || head->height > 8192) {
|
|
||||||
DRM_ERROR("head %d wrong: %dx%d+%d+%d\n",
|
|
||||||
i, head->width, head->height,
|
|
||||||
head->x, head->y);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
qxl_io_monitors_config(qdev);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void qxl_monitors_config_set(struct qxl_device *qdev,
|
static void qxl_monitors_config_set(struct qxl_device *qdev,
|
||||||
int index,
|
int index,
|
||||||
unsigned x, unsigned y,
|
unsigned x, unsigned y,
|
||||||
|
|
Loading…
Add table
Reference in a new issue