Post Damage on the Screen Pixmap after a pageflip
This issue was raised by Dave Airlie as he is trying to integrate multiple GPUs into the xserver, and a particular setup has a slave rendering device that copies the contents from the GPU over a DisplayLink USB adaptor. As such the slave device is listening for Damage on the Screen Pixmap and needs the update following pageflips. Since we already are posting damage for all the SwapBuffers paths other than pageflip, for consistency we should post damage along the pageflip path as well. Reported-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
4acf727941
commit
99845dcb3b
|
|
@ -860,6 +860,21 @@ intel_exchange_pixmap_buffers(struct intel_screen_private *intel, PixmapPtr fron
|
|||
new_back->busy = -1;
|
||||
|
||||
intel_glamor_exchange_buffers(intel, front, back);
|
||||
|
||||
/* Post damage on the new front buffer so that listeners, such
|
||||
* as DisplayLink know take a copy and shove it over the USB.
|
||||
*/
|
||||
{
|
||||
RegionRec region;
|
||||
|
||||
region.extents.x1 = region.extents.y1 = 0;
|
||||
region.extents.x2 = front->drawable.width;
|
||||
region.extents.y2 = front->drawable.height;
|
||||
region.data = NULL;
|
||||
DamageRegionAppend(&front->drawable, ®ion);
|
||||
DamageRegionProcessPending(&front->drawable);
|
||||
}
|
||||
|
||||
return new_front;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -384,6 +384,7 @@ static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo)
|
|||
{
|
||||
struct sna *sna = to_sna_from_pixmap(pixmap);
|
||||
struct sna_pixmap *priv = sna_pixmap(pixmap);
|
||||
RegionRec region;
|
||||
|
||||
sna_damage_all(&priv->gpu_damage,
|
||||
pixmap->drawable.width,
|
||||
|
|
@ -393,6 +394,16 @@ static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo)
|
|||
|
||||
kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
|
||||
priv->gpu_bo = ref(bo);
|
||||
|
||||
/* Post damage on the new front buffer so that listeners, such
|
||||
* as DisplayLink know take a copy and shove it over the USB.
|
||||
*/
|
||||
region.extents.x1 = region.extents.y1 = 0;
|
||||
region.extents.x2 = pixmap->drawable.width;
|
||||
region.extents.y2 = pixmap->drawable.height;
|
||||
region.data = NULL;
|
||||
DamageRegionAppend(&pixmap->drawable, ®ion);
|
||||
DamageRegionProcessPending(&pixmap->drawable);
|
||||
}
|
||||
|
||||
static struct kgem_bo *
|
||||
|
|
|
|||
Loading…
Reference in New Issue