Reviewed-by: Leo Liu <leo....@amd.com>

On 2018-04-25 11:32 AM, Drew Davenport wrote:
s/attibute/attribute/
s/suface/surface/
---
  src/gallium/state_trackers/va/surface.c | 48 ++++++++++++-------------
  1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/src/gallium/state_trackers/va/surface.c 
b/src/gallium/state_trackers/va/surface.c
index 8604136944..1dc4466560 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -525,9 +525,9 @@ vlVaQuerySurfaceAttributes(VADriverContextP ctx, VAConfigID 
config_id,
  }
static VAStatus
-suface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface,
-                            VASurfaceAttribExternalBuffers *memory_attibute,
-                            unsigned index, struct pipe_video_buffer *templat)
+surface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface,
+                             VASurfaceAttribExternalBuffers *memory_attribute,
+                             unsigned index, struct pipe_video_buffer *templat)
  {
     vlVaDriver *drv;
     struct pipe_screen *pscreen;
@@ -539,21 +539,21 @@ suface_from_external_memory(VADriverContextP ctx, 
vlVaSurface *surface,
     pscreen = VL_VA_PSCREEN(ctx);
     drv = VL_VA_DRIVER(ctx);
- if (!memory_attibute || !memory_attibute->buffers ||
-       index > memory_attibute->num_buffers)
+   if (!memory_attribute || !memory_attribute->buffers ||
+       index > memory_attribute->num_buffers)
        return VA_STATUS_ERROR_INVALID_PARAMETER;
- if (surface->templat.width != memory_attibute->width ||
-       surface->templat.height != memory_attibute->height ||
-       memory_attibute->num_planes < 1)
+   if (surface->templat.width != memory_attribute->width ||
+       surface->templat.height != memory_attribute->height ||
+       memory_attribute->num_planes < 1)
        return VA_STATUS_ERROR_INVALID_PARAMETER;
- switch (memory_attibute->pixel_format) {
+   switch (memory_attribute->pixel_format) {
     case VA_FOURCC_RGBA:
     case VA_FOURCC_RGBX:
     case VA_FOURCC_BGRA:
     case VA_FOURCC_BGRX:
-      if (memory_attibute->num_planes != 1)
+      if (memory_attribute->num_planes != 1)
           return VA_STATUS_ERROR_INVALID_PARAMETER;
        break;
     default:
@@ -565,16 +565,16 @@ suface_from_external_memory(VADriverContextP ctx, 
vlVaSurface *surface,
     res_templ.last_level = 0;
     res_templ.depth0 = 1;
     res_templ.array_size = 1;
-   res_templ.width0 = memory_attibute->width;
-   res_templ.height0 = memory_attibute->height;
+   res_templ.width0 = memory_attribute->width;
+   res_templ.height0 = memory_attribute->height;
     res_templ.format = surface->templat.buffer_format;
     res_templ.bind = PIPE_BIND_SAMPLER_VIEW;
     res_templ.usage = PIPE_USAGE_DEFAULT;
memset(&whandle, 0, sizeof(struct winsys_handle));
     whandle.type = DRM_API_HANDLE_TYPE_FD;
-   whandle.handle = memory_attibute->buffers[index];
-   whandle.stride = memory_attibute->pitches[index];
+   whandle.handle = memory_attribute->buffers[index];
+   whandle.stride = memory_attribute->pitches[index];
resource = pscreen->resource_from_handle(pscreen, &res_templ, &whandle,
                                              PIPE_HANDLE_USAGE_READ_WRITE);
@@ -629,7 +629,7 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int 
format,
                      VASurfaceAttrib *attrib_list, unsigned int num_attribs)
  {
     vlVaDriver *drv;
-   VASurfaceAttribExternalBuffers *memory_attibute;
+   VASurfaceAttribExternalBuffers *memory_attribute;
     struct pipe_video_buffer templat;
     struct pipe_screen *pscreen;
     int i;
@@ -655,7 +655,7 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int 
format,
        return VA_STATUS_ERROR_INVALID_CONTEXT;
/* Default. */
-   memory_attibute = NULL;
+   memory_attribute = NULL;
     memory_type = VA_SURFACE_ATTRIB_MEM_TYPE_VA;
     expected_fourcc = 0;
@@ -687,7 +687,7 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format,
            (attrib_list[i].flags == VA_SURFACE_ATTRIB_SETTABLE)) {
           if (attrib_list[i].value.type != VAGenericValueTypePointer)
              return VA_STATUS_ERROR_INVALID_PARAMETER;
-         memory_attibute = (VASurfaceAttribExternalBuffers 
*)attrib_list[i].value.value.p;
+         memory_attribute = (VASurfaceAttribExternalBuffers 
*)attrib_list[i].value.value.p;
        }
     }
@@ -703,10 +703,10 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format,
     case VA_SURFACE_ATTRIB_MEM_TYPE_VA:
        break;
     case VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME:
-      if (!memory_attibute)
+      if (!memory_attribute)
           return VA_STATUS_ERROR_INVALID_PARAMETER;
- expected_fourcc = memory_attibute->pixel_format;
+      expected_fourcc = memory_attribute->pixel_format;
        break;
     default:
        assert(0);
@@ -730,7 +730,7 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int 
format,
     if (expected_fourcc) {
        enum pipe_format expected_format = 
VaFourccToPipeFormat(expected_fourcc);
- if (expected_format != templat.buffer_format || memory_attibute)
+      if (expected_format != templat.buffer_format || memory_attribute)
          templat.interlaced = 0;
templat.buffer_format = expected_format;
@@ -757,10 +757,10 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int 
format,
        case VA_SURFACE_ATTRIB_MEM_TYPE_VA:
           /* The application will clear the TILING flag when the surface is
            * intended to be exported as dmabuf. Adding shared flag because not
-          * null memory_attibute means VASurfaceAttribExternalBuffers is used.
+          * null memory_attribute means VASurfaceAttribExternalBuffers is used.
            */
-         if (memory_attibute &&
-             !(memory_attibute->flags & VA_SURFACE_EXTBUF_DESC_ENABLE_TILING))
+         if (memory_attribute &&
+             !(memory_attribute->flags & VA_SURFACE_EXTBUF_DESC_ENABLE_TILING))
              templat.bind = PIPE_BIND_LINEAR | PIPE_BIND_SHARED;
vaStatus = vlVaHandleSurfaceAllocate(drv, surf, &templat);
@@ -769,7 +769,7 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int 
format,
           break;
case VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME:
-         vaStatus = suface_from_external_memory(ctx, surf, memory_attibute, i, 
&templat);
+         vaStatus = surface_from_external_memory(ctx, surf, memory_attribute, i, 
&templat);
           if (vaStatus != VA_STATUS_SUCCESS)
              goto free_surf;
           break;

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to