[Libva] [PATCH V2 6/6] Change the render mode to external because the rendering are in X11.

Ung, Teng En teng.en.ung at intel.com
Thu Sep 19 01:07:04 PDT 2013


Signed-off-by: Ung, Teng En <teng.en.ung at intel.com>
---
 src/i965_drv_video.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index d2b8456..2f1d87b 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -106,22 +106,13 @@ static const VADisplayAttribute i965_display_attributes[] = {
     },
 
 #ifdef HAVE_X11_XV
-    /* The render device attribute.  This attributes is used to determine
-     * whether the device is a local or external before setting the
-     * gpu/overlay rendering attribute.
-     */
-    {
-        VADisplayAttribRenderDevice,
-        1, 1, VA_RENDER_DEVICE_LOCAL,
-        VA_DISPLAY_ATTRIB_GETTABLE
-    },
     /* Render mode attribute.  Use this attribute to control the output in 
      * X11 going through DRI (GPU) or XV (overlay/sprite) rendering mode.
      * The defeult is DRI rendering mode.
      */
     {
         VADisplayAttribRenderMode,
-        1, 2, VA_RENDER_MODE_LOCAL_GPU,
+        4, 8, VA_RENDER_MODE_EXTERNAL_GPU,
         VA_DISPLAY_ATTRIB_GETTABLE|VA_DISPLAY_ATTRIB_SETTABLE
     },
 #endif
@@ -2534,7 +2525,7 @@ i965_SetDisplayAttributes(
 
 #ifdef HAVE_X11_XV
         if (dst_attrib->type == VADisplayAttribRenderMode) {
-            if ((src_attrib->value == VA_RENDER_MODE_LOCAL_OVERLAY)) {
+            if ((src_attrib->value == VA_RENDER_MODE_EXTERNAL_OVERLAY)) {
                 if (!i965_output_xv_enable(ctx))
                     return VA_STATUS_ERROR_OPERATION_FAILED; 
             } else {
@@ -3961,7 +3952,7 @@ i965_PutSurface(VADriverContextP ctx,
 
 #ifdef HAVE_X11_XV
         /* Check whether using GPU or Overlay rendering mode. */
-        if (i965->rendermode_attrib->value == VA_RENDER_MODE_LOCAL_OVERLAY)
+        if (i965->rendermode_attrib->value == VA_RENDER_MODE_EXTERNAL_OVERLAY)
             return i965_put_surface_xv(ctx, surface, draw, &src_rect, &dst_rect,
                                        cliprects, number_cliprects, flags);
         else
-- 
1.8.4



More information about the Libva mailing list