[Libva] [PATCH 02/16] API: backend: rename dri_state to drm_state.

Zhao Halley halley.zhao at intel.com
Tue Jun 5 02:06:50 PDT 2012


From: Gwenole Beauchesne <gwenole.beauchesne at intel.com>

---
 va/android/va_android.cpp |   10 +++++-----
 va/va_backend.h           |    2 +-
 va/x11/dri1_util.c        |    4 ++--
 va/x11/dri2_util.c        |    4 ++--
 va/x11/va_dricommon.c     |   10 +++++-----
 va/x11/va_x11.c           |    6 +++---
 6 files changed, 18 insertions(+), 18 deletions(-)
 mode change 100644 => 100755 va/va_backend.h
 mode change 100644 => 100755 va/x11/va_dricommon.c
 mode change 100644 => 100755 va/x11/va_x11.c

diff --git a/va/android/va_android.cpp b/va/android/va_android.cpp
index 38c91e4..24329fe 100755
--- a/va/android/va_android.cpp
+++ b/va/android/va_android.cpp
@@ -95,10 +95,10 @@ static void va_DisplayContextDestroy (
         return;
 
     /* close the open-ed DRM fd */
-    dri_state = (struct dri_state *)pDisplayContext->pDriverContext->dri_state;
+    dri_state = (struct dri_state *)pDisplayContext->pDriverContext->drm_state;
     close(dri_state->base.fd);
 
-    free(pDisplayContext->pDriverContext->dri_state);
+    free(pDisplayContext->pDriverContext->drm_state);
     free(pDisplayContext->pDriverContext);
     free(pDisplayContext);
 }
@@ -110,7 +110,7 @@ static VAStatus va_DisplayContextGetDriverName (
 )
 {
     VADriverContextP ctx = pDisplayContext->pDriverContext;
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
     char *driver_name_env;
     int vendor_id, device_id;
     
@@ -149,7 +149,7 @@ static VAStatus va_DisplayContextGetDriverName (
 )
 {
     VADriverContextP ctx = pDisplayContext->pDriverContext;
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
     char *driver_name_env;
     int vendor_id, device_id;
     int i = 0;
@@ -227,7 +227,7 @@ VADisplay vaGetDisplay (
             pDisplayContext->vaIsValid       = va_DisplayContextIsValid;
             pDisplayContext->vaDestroy       = va_DisplayContextDestroy;
             pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName;
-            pDriverContext->dri_state 	     = dri_state;
+            pDriverContext->drm_state 	     = dri_state;
             dpy                              = (VADisplay)pDisplayContext;
         }
         else
diff --git a/va/va_backend.h b/va/va_backend.h
old mode 100644
new mode 100755
index c92be53..522f606
--- a/va/va_backend.h
+++ b/va/va_backend.h
@@ -451,7 +451,7 @@ struct VADriverContext
 
     void *handle;			/* dlopen handle */
     
-    void *dri_state;
+    void *drm_state;                    /* base DRM state */
     void *glx;				/* opaque for GLX code */
 
     /**
diff --git a/va/x11/dri1_util.c b/va/x11/dri1_util.c
index 6344754..7870fbd 100644
--- a/va/x11/dri1_util.c
+++ b/va/x11/dri1_util.c
@@ -59,7 +59,7 @@ dri1GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
 static void
 dri1Close(VADriverContextP ctx)
 {
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
 
     free_drawable_hashtable(ctx);
     VA_DRIDestroyContext(ctx->native_dpy, ctx->x11_screen, dri_state->hwContextID);
@@ -73,7 +73,7 @@ dri1Close(VADriverContextP ctx)
 Bool 
 isDRI1Connected(VADriverContextP ctx, char **driver_name)
 {
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
     int direct_capable;
     int driver_major;
     int driver_minor;
diff --git a/va/x11/dri2_util.c b/va/x11/dri2_util.c
index 753517f..14b058e 100755
--- a/va/x11/dri2_util.c
+++ b/va/x11/dri2_util.c
@@ -164,7 +164,7 @@ dri2GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
 void
 dri2Close(VADriverContextP ctx)
 {
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
 
     free_drawable_hashtable(ctx);
 
@@ -175,7 +175,7 @@ dri2Close(VADriverContextP ctx)
 Bool 
 isDRI2Connected(VADriverContextP ctx, char **driver_name)
 {
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
     int major, minor;
     int error_base;
     int event_base;
diff --git a/va/x11/va_dricommon.c b/va/x11/va_dricommon.c
old mode 100644
new mode 100755
index 6816b0f..c0cbbcc
--- a/va/x11/va_dricommon.c
+++ b/va/x11/va_dricommon.c
@@ -61,7 +61,7 @@ is_window(Display *dpy, Drawable drawable)
 static struct dri_drawable *
 do_drawable_hash(VADriverContextP ctx, XID drawable)
 {
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
     int index = drawable % DRAWABLE_HASH_SZ;
     struct dri_drawable *dri_drawable = dri_state->drawable_hash[index];
 
@@ -83,7 +83,7 @@ do_drawable_hash(VADriverContextP ctx, XID drawable)
 void
 free_drawable(VADriverContextP ctx, struct dri_drawable* dri_drawable)
 {
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
     int i = 0;
 
     while (i++ < DRAWABLE_HASH_SZ) {
@@ -97,7 +97,7 @@ free_drawable(VADriverContextP ctx, struct dri_drawable* dri_drawable)
 void
 free_drawable_hashtable(VADriverContextP ctx)
 {
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
     int i;
     struct dri_drawable *dri_drawable, *prev;
 
@@ -123,7 +123,7 @@ dri_get_drawable(VADriverContextP ctx, XID drawable)
 void 
 dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
 {
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
 
     dri_state->swapBuffer(ctx, dri_drawable);
 }
@@ -131,7 +131,7 @@ dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
 union dri_buffer *
 dri_get_rendering_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
 {
-    struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+    struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
     
     return dri_state->getRenderingBuffer(ctx, dri_drawable);
 }
diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c
old mode 100644
new mode 100755
index 86b040a..f81e30a
--- a/va/x11/va_x11.c
+++ b/va/x11/va_x11.c
@@ -63,12 +63,12 @@ static void va_DisplayContextDestroy (
         return;
 
     ctx = pDisplayContext->pDriverContext;
-    dri_state = ctx->dri_state;
+    dri_state = ctx->drm_state;
 
     if (dri_state && dri_state->close)
         dri_state->close(ctx);
 
-    free(pDisplayContext->pDriverContext->dri_state);
+    free(pDisplayContext->pDriverContext->drm_state);
     free(pDisplayContext->pDriverContext);
     free(pDisplayContext);
 }
@@ -190,7 +190,7 @@ VADisplay vaGetDisplay (
 	  pDisplayContext->vaDestroy       = va_DisplayContextDestroy;
 	  pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName;
           pDisplayContext->opaque          = NULL;
-	  pDriverContext->dri_state 	   = dri_state;
+	  pDriverContext->drm_state 	   = dri_state;
 	  dpy                              = (VADisplay)pDisplayContext;
       }
       else
-- 
1.7.5.4



More information about the Libva mailing list