xf86-video-intel: Branch 'intel-batchbuffer' - src/i830_dri.c src/intel_bufmgr_ttm.c
Kristian Høgsberg
krh at kemper.freedesktop.org
Mon Mar 31 13:59:03 PDT 2008
src/i830_dri.c | 9 +++------
src/intel_bufmgr_ttm.c | 2 +-
2 files changed, 4 insertions(+), 7 deletions(-)
New commits:
commit 17049213a384a4fa6909d7f7fd66bbed3d449a3d
Author: Kristian Høgsberg <krh at redhat.com>
Date: Thu Mar 27 10:25:28 2008 -0400
Stop using kernel side drm contexts.
Make space in the DRI2 lock block for a running lock ID integer and use
it for allocating the server context instead of the drm functions.
diff --git a/src/i830_dri.c b/src/i830_dri.c
index f739b44..186a5c0 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1940,6 +1940,7 @@ I830DRI2Prepare(ScreenPtr pScreen)
struct __DRILock {
unsigned int block_header;
drm_hw_lock_t lock;
+ unsigned int next_id;
};
#define DRI2_SAREA_BLOCK_HEADER(type, size) (((type) << 16) | (size))
@@ -1980,11 +1981,8 @@ I830DRI2ScreenInit(ScreenPtr pScreen)
pI830->lockRefCount = 0;
pI830->lockingContext = 0;
- if (drmCreateContext(pI830->drmSubFD, &pI830->context)) {
- pI830->directRendering = DRI_TYPE_NONE;
- return;
- }
-
+ pI830->context = 1;
+ driLock->next_id = 2;
I830DRI2Lock(pScreen);
/* Get sarea BO handle... maybe we need a dedicated function for
@@ -2023,7 +2021,6 @@ I830DRI2CloseScreen(ScreenPtr pScreen)
drmCtlUninstHandler(pI830->drmSubFD);
I830CleanupDma(pScrn);
- drmDestroyContext(pI830->drmSubFD, pI830->context);
I830DRI2Unlock(pScreen);
DRI2CloseScreen(pScreen);
drmClose(pI830->drmSubFD);
diff --git a/src/intel_bufmgr_ttm.c b/src/intel_bufmgr_ttm.c
index 1926bca..c1ad8c7 100644
--- a/src/intel_bufmgr_ttm.c
+++ b/src/intel_bufmgr_ttm.c
@@ -350,7 +350,7 @@ dri_ttm_alloc(dri_bufmgr *bufmgr, const char *name,
* just pass all of the allocation class flags.
*/
flags = location_mask | DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE |
- DRM_BO_FLAG_EXE;
+ DRM_BO_FLAG_EXE | DRM_BO_FLAG_SHAREABLE;
/* No hints we want to use. */
hint = 0;
More information about the xorg-commit
mailing list