summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2012-03-31 12:26:20 -0500
committerRob Clark <robdclark@gmail.com>2012-04-01 20:19:16 -0500
commit3c130bf17f802da8d5a6bda8351a401f7e9c2cd9 (patch)
treeca82b84a6f687e99a5358816f9346a2b4e683622
parent085d5e28c8febf48bfa0c4a6471b69e929780ed9 (diff)
Fix handling for framebuffer bo
-rw-r--r--src/msm-pixmap.c16
-rw-r--r--src/msm.h1
2 files changed, 16 insertions, 1 deletions
diff --git a/src/msm-pixmap.c b/src/msm-pixmap.c
index 1eb176f..c5018ad 100644
--- a/src/msm-pixmap.c
+++ b/src/msm-pixmap.c
@@ -131,5 +131,21 @@ msm_get_pixmap_bo(PixmapPtr pix)
return priv->bo;
}
+ /* TODO: perhaps the special handling for scanout pixmap should be done
+ * elsewhere so it isn't in a hot path.. ie. when the scanout buffer is
+ * allocated..
+ */
+ if (priv) {
+ ScreenPtr pScreen = pix->drawable.pScreen;
+ MSMPtr pMsm = MSMPTR_FROM_PIXMAP(pix);
+ // TODO .. how to handle offset for rotated pixmap.. worry about that later
+ if (pScreen->GetScreenPixmap(pScreen) == pix) {
+ priv->bo = pMsm->fbBo;
+ msm_drm_bo_alloc(priv->bo);
+ return priv->bo;
+ }
+
+ }
+
return NULL;
}
diff --git a/src/msm.h b/src/msm.h
index 2454887..caa1bc1 100644
--- a/src/msm.h
+++ b/src/msm.h
@@ -110,7 +110,6 @@ typedef struct _MSMRec
struct msm_pixmap_priv {
struct msm_drm_bo *bo;
int SavedPitch;
- unsigned int c2dsurface;
};
/* Macro to get the private record from the ScreenInfo structure */