summaryrefslogtreecommitdiff
path: root/hw/xfree86/drivers/modesetting
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/drivers/modesetting')
-rw-r--r--hw/xfree86/drivers/modesetting/driver.c40
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c1
-rw-r--r--hw/xfree86/drivers/modesetting/modesetting.man23
3 files changed, 39 insertions, 25 deletions
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index 9362370c3..8d29b130f 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -640,19 +640,21 @@ ms_dirty_update(ScreenPtr screen, int *timeout)
xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) {
region = DamageRegion(ent->damage);
if (RegionNotEmpty(region)) {
- msPixmapPrivPtr ppriv =
- msGetPixmapPriv(&ms->drmmode, ent->slave_dst);
+ if (!screen->isGPU) {
+ msPixmapPrivPtr ppriv =
+ msGetPixmapPriv(&ms->drmmode, ent->slave_dst->master_pixmap);
- if (ppriv->notify_on_damage) {
- ppriv->notify_on_damage = FALSE;
+ if (ppriv->notify_on_damage) {
+ ppriv->notify_on_damage = FALSE;
- ent->slave_dst->drawable.pScreen->
- SharedPixmapNotifyDamage(ent->slave_dst);
- }
+ ent->slave_dst->drawable.pScreen->
+ SharedPixmapNotifyDamage(ent->slave_dst);
+ }
- /* Requested manual updating */
- if (ppriv->defer_dirty_update)
- continue;
+ /* Requested manual updating */
+ if (ppriv->defer_dirty_update)
+ continue;
+ }
redisplay_dirty(screen, ent, timeout);
DamageEmpty(ent->damage);
@@ -898,8 +900,6 @@ PreInit(ScrnInfoPtr pScrn, int flags)
if (pScrn->numEntities != 1)
return FALSE;
- pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
-
if (flags & PROBE_DETECT) {
return FALSE;
}
@@ -908,6 +908,8 @@ PreInit(ScrnInfoPtr pScrn, int flags)
if (!GetRec(pScrn))
return FALSE;
+ pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
+
ms = modesettingPTR(pScrn);
ms->SaveGeneration = -1;
ms->pEnt = pEnt;
@@ -1251,8 +1253,8 @@ msStartFlippingPixmapTracking(RRCrtcPtr crtc, DrawablePtr src,
ScreenPtr pScreen = src->pScreen;
modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen));
- msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1),
- ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2);
+ msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1->master_pixmap),
+ ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2->master_pixmap);
if (!PixmapStartDirtyTracking(src, slave_dst1, x, y,
dst_x, dst_y, rotation)) {
@@ -1280,10 +1282,10 @@ msStartFlippingPixmapTracking(RRCrtcPtr crtc, DrawablePtr src,
static Bool
msPresentSharedPixmap(PixmapPtr slave_dst)
{
- ScreenPtr pScreen = slave_dst->drawable.pScreen;
+ ScreenPtr pScreen = slave_dst->master_pixmap->drawable.pScreen;
modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen));
- msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, slave_dst);
+ msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, slave_dst->master_pixmap);
RegionPtr region = DamageRegion(ppriv->dirty->damage);
@@ -1304,8 +1306,8 @@ msStopFlippingPixmapTracking(DrawablePtr src,
ScreenPtr pScreen = src->pScreen;
modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen));
- msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1),
- ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2);
+ msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1->master_pixmap),
+ ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2->master_pixmap);
Bool ret = TRUE;
@@ -1471,7 +1473,7 @@ msRequestSharedPixmapNotifyDamage(PixmapPtr ppix)
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
modesettingPtr ms = modesettingPTR(scrn);
- msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix);
+ msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix->master_pixmap);
ppriv->notify_on_damage = TRUE;
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index f6f2e9fd1..9717d9d39 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -398,7 +398,6 @@ drmmode_prop_info_copy(drmmode_prop_info_ptr dst,
err:
while (i--)
free(dst[i].enum_values);
- free(dst);
return FALSE;
}
diff --git a/hw/xfree86/drivers/modesetting/modesetting.man b/hw/xfree86/drivers/modesetting/modesetting.man
index d90352380..d530d7c4c 100644
--- a/hw/xfree86/drivers/modesetting/modesetting.man
+++ b/hw/xfree86/drivers/modesetting/modesetting.man
@@ -14,10 +14,13 @@ modesetting \- video driver for framebuffer device
.fi
.SH DESCRIPTION
.B modesetting
-is an @xservername@ driver for KMS devices. This is a non-accelerated
-driver, the following framebuffer depths are supported: 8, 15, 16, 24.
-All visual types are supported for depth 8, and TrueColor visual is
-supported for the other depths. RandR 1.2 is supported.
+is an @xservername@ driver for KMS devices. This driver supports
+TrueColor visuals at framebuffer depths of 15, 16, 24, and 30. RandR
+1.2 is supported for multi-head configurations. Acceleration is available
+through glamor for devices supporting at least OpenGL ES 2.0 or OpenGL 2.1.
+If glamor is not enabled, a shadow framebuffer is configured based on the
+KMS drivers' preference (unless the framebuffer is 24 bits per pixel, in
+which case the shadow framebuffer is always used).
.SH SUPPORTED HARDWARE
The
.B modesetting
@@ -51,8 +54,18 @@ The framebuffer device to use. Default: /dev/dri/card0.
.BI "Option \*qShadowFB\*q \*q" boolean \*q
Enable or disable use of the shadow framebuffer layer. Default: on.
.TP
+.BI "Option \*qDoubleShadow\*q \*q" boolean \*q
+Double-buffer shadow updates. When enabled, the driver will keep two copies of
+the shadow framebuffer. When the shadow framebuffer is flushed, the old and new
+versions of the shadow are compared, and only tiles that have actually changed
+are uploaded to the device. This is an optimization for server-class GPUs with
+a remote display function (typically VNC), where remote updates are triggered
+by any framebuffer write, so minimizing the amount of data uploaded is crucial.
+This defaults to enabled for ASPEED and Matrox G200 devices, and disabled
+otherwise.
+.TP
.BI "Option \*qAccelMethod\*q \*q" string \*q
-One of \*qglamor\*q or \*qnone\*q. Default: glamor
+One of \*qglamor\*q or \*qnone\*q. Default: glamor.
.TP
.BI "Option \*qPageFlip\*q \*q" boolean \*q
Enable DRI3 page flipping. The default is