Displaying 15 results from an estimated 15 matches for "qxl_crtc_update_monitors_config".
2019 Jul 25
1
[PATCH] gpu: drm: qxl: Fix possible null-pointer dereferences in qxl_crtc_atomic_flush()
In qxl_crtc_atomic_flush(), there is an if statement on line 376 to
check whether crtc->state is NULL:
if (crtc->state && crtc->state->event)
When crtc->state is NULL and qxl_crtc_update_monitors_config() is call,
qxl_crtc_update_monitors_config() uses crtc->state on line 326:
if (crtc->state->active)
and on line 358:
DRM_DEBUG_KMS(..., crtc->state->active, ...);
Thus, possible null-pointer dereferences may occur.
To fix these bugs, crtc->state is checked before callin...
2018 Feb 16
0
[PATCH 3/4] qxl: hook monitors_config updates into crtc, not encoder.
The encoder callbacks are only called in case the video mode changes.
So any layout changes without mode changes will go unnoticed.
Add qxl_crtc_update_monitors_config(), based on the old
qxl_write_monitors_config_for_encoder() function. Hook it into the
enable, disable and flush atomic crtc callbacks. Remove monitors_config
updates from all other places.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1544322
Signed-off-by: Gerd Hoffmann <kraxel at redh...
2018 Apr 20
0
[PATCH v2 3/4] qxl: hook monitors_config updates into crtc, not encoder.
The encoder callbacks are only called in case the video mode changes.
So any layout changes without mode changes will go unnoticed.
Add qxl_crtc_update_monitors_config(), based on the old
qxl_write_monitors_config_for_encoder() function. Hook it into the
enable, disable and flush atomic crtc callbacks. Remove monitors_config
updates from all other places.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1544322
Signed-off-by: Gerd Hoffmann <kraxel at redh...
2018 Nov 28
0
[PATCH 6/6] drm/qxl: use qxl_num_crtc directly
...ic int qxl_add_monitors_config_modes(struct drm_connector *connector,
if (!qdev->monitors_config)
return 0;
- if (h >= qdev->monitors_config->max_allowed)
+ if (h >= qxl_num_crtc)
return 0;
if (!qdev->client_monitors_config)
return 0;
@@ -307,8 +306,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
return;
}
- if (!qdev->monitors_config ||
- qdev->monitors_config->max_allowed <= i)
+ if (!qdev->monitors_config || qxl_num_crtc <= i)
return;
head.id = i;
@@ -350,9 +348,10 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *c...
2018 Dec 06
0
[PATCH] drm/qxl: use qxl_num_crtc directly
...ic int qxl_add_monitors_config_modes(struct drm_connector *connector,
if (!qdev->monitors_config)
return 0;
- if (h >= qdev->monitors_config->max_allowed)
+ if (h >= qxl_num_crtc)
return 0;
if (!qdev->client_monitors_config)
return 0;
@@ -307,8 +306,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
return;
}
- if (!qdev->monitors_config ||
- qdev->monitors_config->max_allowed <= i)
+ if (!qdev->monitors_config || qxl_num_crtc <= i)
return;
head.id = i;
@@ -348,9 +346,10 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *c...
2018 Dec 06
0
[PATCH v2] drm/qxl: use qxl_num_crtc directly
...ic int qxl_add_monitors_config_modes(struct drm_connector *connector,
if (!qdev->monitors_config)
return 0;
- if (h >= qdev->monitors_config->max_allowed)
+ if (h >= qxl_num_crtc)
return 0;
if (!qdev->client_monitors_config)
return 0;
@@ -307,8 +306,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
return;
}
- if (!qdev->monitors_config ||
- qdev->monitors_config->max_allowed <= i)
+ if (!qdev->monitors_config || qxl_num_crtc <= i)
return;
head.id = i;
@@ -348,9 +346,10 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *c...
2018 Dec 12
0
[PATCH v2 15/18] drm/qxl: use qxl_num_crtc directly
...ic int qxl_add_monitors_config_modes(struct drm_connector *connector,
if (!qdev->monitors_config)
return 0;
- if (h >= qdev->monitors_config->max_allowed)
+ if (h >= qxl_num_crtc)
return 0;
if (!qdev->client_monitors_config)
return 0;
@@ -307,8 +306,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
return;
}
- if (!qdev->monitors_config ||
- qdev->monitors_config->max_allowed <= i)
+ if (!qdev->monitors_config || qxl_num_crtc <= i)
return;
head.id = i;
@@ -350,9 +348,10 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *c...
2018 Nov 28
0
[PATCH 3/6] drm/qxl: track primary bo
...;
}
void qxl_io_memslot_add(struct qxl_device *qdev, uint8_t id)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index d875cae02f..69b180735d 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -302,7 +302,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
struct qxl_head head;
int oldcount, i = qcrtc->index;
- if (!qdev->primary_created) {
+ if (!qdev->primary_bo) {
DRM_DEBUG_KMS("no primary surface, skip (%s)\n", reason);
return;
}
--
2.9.3
2018 Dec 06
0
[Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly
...itors
> with number of monitors, not number of CRTs with number of
> monitors.
Yes, spice/qxl and drm/kms use slightly different terminology.
drm crtc == qxl monitor.
drm framebuffer == qxl surface.
You need to know that anyway when looking at the qxl ksm code. We
have function names like qxl_crtc_update_monitors_config(). I fail
to see why that is a problem ...
cheers,
Gerd
2018 Dec 06
0
[Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly
...ors.
> >
> > Yes, spice/qxl and drm/kms use slightly different terminology.
> >
> > drm crtc == qxl monitor.
> > drm framebuffer == qxl surface.
> >
> > You need to know that anyway when looking at the qxl ksm code. We
> > have function names like qxl_crtc_update_monitors_config(). I fail
> > to see why that is a problem ...
> >
> > cheers,
> > Gerd
>
> I don't see any problem too but you are explaining to me
> why your rationale "and also is less confusing" does not
> stand.
Well, it's less confusing because it t...
2018 Dec 12
0
[PATCH v2 12/18] drm/qxl: track primary bo
...;
}
void qxl_io_memslot_add(struct qxl_device *qdev, uint8_t id)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 79dc8a1fa3..828e4f773c 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -302,7 +302,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
struct qxl_head head;
int oldcount, i = qcrtc->index;
- if (!qdev->primary_created) {
+ if (!qdev->primary_bo) {
DRM_DEBUG_KMS("no primary surface, skip (%s)\n", reason);
return;
}
--
2.9.3
2018 Nov 28
0
[PATCH 5/6] drm/qxl: cover all crtcs in shadow bo.
...);
void qxl_draw_fill(struct qxl_draw_fill *qxl_draw_fill_rec);
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 472df00c02..a6110ec5ba 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -323,6 +323,8 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
head.y = crtc->y;
if (qdev->monitors_config->count < i + 1)
qdev->monitors_config->count = i + 1;
+ if (qdev->primary_bo == qdev->dumb_shadow_bo)
+ head.x += qdev->dumb_heads[i].x;
} else if (i > 0) {
head.width = 0;
head.hei...
2018 Dec 12
0
[PATCH v2 14/18] drm/qxl: cover all crtcs in shadow bo.
...);
void qxl_draw_fill(struct qxl_draw_fill *qxl_draw_fill_rec);
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 204ae46c62..fc88826b69 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -323,6 +323,8 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
head.y = crtc->y;
if (qdev->monitors_config->count < i + 1)
qdev->monitors_config->count = i + 1;
+ if (qdev->primary_bo == qdev->dumb_shadow_bo)
+ head.x += qdev->dumb_heads[i].x;
} else if (i > 0) {
head.width = 0;
head.hei...
2020 Apr 15
1
[PATCH 27/59] drm/qxl: Don't use drm_device->dev_private
...ctor)
{
struct drm_device *dev = connector->dev;
- struct qxl_device *qdev = dev->dev_private;
+ struct qxl_device *qdev = to_qxl(dev);
struct qxl_output *output = drm_connector_to_qxl_output(connector);
int h = output->index;
struct qxl_head *head;
@@ -310,7 +310,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
const char *reason)
{
struct drm_device *dev = crtc->dev;
- struct qxl_device *qdev = dev->dev_private;
+ struct qxl_device *qdev = to_qxl(dev);
struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
struct qxl_head head;
int oldcount, i = qcrtc->index;
@@ -4...
2020 Apr 03
1
[PATCH 31/44] drm/qxl: Don't use drm_device->dev_private
...ctor)
{
struct drm_device *dev = connector->dev;
- struct qxl_device *qdev = dev->dev_private;
+ struct qxl_device *qdev = to_qxl(dev);
struct qxl_output *output = drm_connector_to_qxl_output(connector);
int h = output->index;
struct qxl_head *head;
@@ -310,7 +310,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
const char *reason)
{
struct drm_device *dev = crtc->dev;
- struct qxl_device *qdev = dev->dev_private;
+ struct qxl_device *qdev = to_qxl(dev);
struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
struct qxl_head head;
int oldcount, i = qcrtc->index;
@@ -4...