Remove legacy DRI support
authorXiang, Haihao <haihao.xiang@intel.com>
Tue, 10 Jan 2012 06:59:21 +0000 (14:59 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Tue, 10 Jan 2012 06:59:47 +0000 (14:59 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
src/intel_driver.c
src/intel_driver.h

index 5fd22c9..4e6df81 100644 (file)
@@ -61,12 +61,7 @@ intel_driver_init(VADriverContextP ctx)
     intel->dri2Enabled = (dri_state->driConnectedFlag == VA_DRI2);
 
     if (!intel->dri2Enabled) {
-        drm_sarea_t *pSAREA;
-
-        pSAREA = (drm_sarea_t *)dri_state->pSAREA;
-        intel->hHWContext = dri_state->hwContext;
-        intel->driHwLock = (drmLock *)(&pSAREA->lock);
-        intel->pPrivSarea = (void *)pSAREA + sizeof(drm_sarea_t);
+        return False;
     }
 
     intel->locked = 0;
@@ -94,42 +89,3 @@ intel_driver_terminate(VADriverContextP ctx)
 
     return True;
 }
-
-void 
-intel_lock_hardware(VADriverContextP ctx)
-{
-    struct intel_driver_data *intel = intel_driver_data(ctx);
-    char __ret = 0;
-
-    PPTHREAD_MUTEX_LOCK();
-
-    assert(!intel->locked);
-
-    if (!intel->dri2Enabled) {
-        DRM_CAS(intel->driHwLock, 
-                intel->hHWContext,
-                (DRM_LOCK_HELD|intel->hHWContext),
-                __ret);
-
-        if (__ret) {
-            drmGetLock(intel->fd, intel->hHWContext, 0);
-        }      
-    }
-
-    intel->locked = 1;
-}
-
-void 
-intel_unlock_hardware(VADriverContextP ctx)
-{
-    struct intel_driver_data *intel = intel_driver_data(ctx);
-
-    if (!intel->dri2Enabled) {
-        DRM_UNLOCK(intel->fd, 
-                   intel->driHwLock,
-                   intel->hHWContext);
-    }
-
-    intel->locked = 0;
-    PPTHREAD_MUTEX_UNLOCK();
-}
index 5ba80bd..380a18d 100644 (file)
@@ -4,7 +4,6 @@
 #include <pthread.h>
 #include <signal.h>
 
-#include <xf86drm.h>
 #include <drm.h>
 #include <i915_drm.h>
 #include <intel_bufmgr.h>
@@ -94,9 +93,6 @@ struct intel_driver_data
     int device_id;
 
     int dri2Enabled;
-    drm_context_t hHWContext;
-    drm_i915_sarea_t *pPrivSarea;
-    drmLock *driHwLock;
 
     sigset_t sa_mask;
     pthread_mutex_t ctxmutex;
@@ -111,8 +107,6 @@ struct intel_driver_data
 
 Bool intel_driver_init(VADriverContextP ctx);
 Bool intel_driver_terminate(VADriverContextP ctx);
-void intel_lock_hardware(VADriverContextP ctx);
-void intel_unlock_hardware(VADriverContextP ctx);
 
 static INLINE struct intel_driver_data *
 intel_driver_data(VADriverContextP ctx)