xf86-video-intel: src/sna/sna_accel.c src/sna/sna_display.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Sep 4 03:32:34 PDT 2012
src/sna/sna_accel.c | 16 +++++++++++-----
src/sna/sna_display.c | 3 +++
2 files changed, 14 insertions(+), 5 deletions(-)
New commits:
commit be83b98d299c74101357e7bf170b1451aec2e1f2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Sep 4 11:23:58 2012 +0100
sna: Add some DBG to the prime paths
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 21d0ef8..b08e701 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -929,6 +929,8 @@ sna_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave, void **fd_handle)
struct sna_pixmap *priv;
int fd;
+ DBG(("%s: pixmap=%ld\n", __FUNCTION__, pixmap->drawable.serialNumber));
+
priv = sna_pixmap_move_to_gpu(pixmap,
MOVE_READ | MOVE_WRITE | __MOVE_DRI | __MOVE_FORCE);
if (priv == NULL)
@@ -936,7 +938,7 @@ sna_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave, void **fd_handle)
assert(priv->gpu_bo);
- /* XXX */
+ /* XXX negotiate format and stride restrictions */
if (priv->gpu_bo->tiling &&
!sna_pixmap_change_tiling(pixmap, I915_TILING_NONE))
return FALSE;
@@ -967,6 +969,8 @@ sna_set_shared_pixmap_backing(PixmapPtr pixmap, void *fd_handle)
struct sna_pixmap *priv;
struct kgem_bo *bo;
+ DBG(("%s: pixmap=%ld\n", __FUNCTION__, pixmap->drawable.serialNumber));
+
priv = sna_pixmap(pixmap);
if (priv == NULL)
return FALSE;
@@ -977,9 +981,9 @@ sna_set_shared_pixmap_backing(PixmapPtr pixmap, void *fd_handle)
assert(priv->cpu_damage == NULL);
assert(priv->gpu_damage == NULL);
- bo = kgem_bo_create_for_prime(&sna->kgem,
- (intptr_t)fd_handle,
- pixmap->devKind * pixmap->drawable.height);
+ bo = kgem_create_for_prime(&sna->kgem,
+ (intptr_t)fd_handle,
+ pixmap->devKind * pixmap->drawable.height);
if (bo == NULL)
return FALSE;
@@ -1003,6 +1007,8 @@ sna_create_pixmap_shared(struct sna *sna, ScreenPtr screen, int depth)
PixmapPtr pixmap;
struct sna_pixmap *priv;
+ DBG(("%s: depth=%d\n", __FUNCTION__, depth));
+
/* Create a stub to be attached later */
pixmap = create_pixmap(sna, screen, 0, 0, depth, 0);
if (pixmap == NullPixmap)
@@ -3356,7 +3362,7 @@ static bool upload_inplace(struct sna *sna,
}
}
- if (priv->create & (KGEM_CAN_CREATE_GPU | KGEM_CAN_CREATE_CPU) == KGEM_CAN_CREATE_GPU &&
+ if ((priv->create & (KGEM_CAN_CREATE_GPU | KGEM_CAN_CREATE_CPU)) == KGEM_CAN_CREATE_GPU &&
region_subsumes_drawable(region, &pixmap->drawable)) {
DBG(("%s? yes, will fill fresh GPU bo\n", __FUNCTION__));
return true;
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 7e87204..4c260cd 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1320,6 +1320,9 @@ sna_crtc_destroy(xf86CrtcPtr crtc)
static Bool
sna_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr pixmap)
{
+ DBG(("%s: CRTC:%d, pipe=%d setting scanout pixmap=%ld\n",
+ __FUNCTION__,to_sna_crtc(crtc)->id, to_sna_crtc(crtc)->pipe,
+ pixmap ? pixmap->drawable.serialNumber : 0));
to_sna_crtc(crtc)->scanout_pixmap = pixmap;
return TRUE;
}
More information about the xorg-commit
mailing list