decoder: h264: only allocate tiled surfaces for Sandybridge an newer.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 4 Jun 2014 09:17:52 +0000 (11:17 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 5 Jun 2014 08:27:26 +0000 (10:27 +0200)
Don't allocate tiled surfaces on Ironlake platforms and earlier, stick
to linear surfaces.

This is a regression from 6d76944.

Reported-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
src/i965_decoder_utils.c

index 9a5092e..ae5fd76 100644 (file)
@@ -222,9 +222,11 @@ avc_ensure_surface_bo(
 
     /* (Re-)allocate the underlying surface buffer store, if necessary */
     if (!obj_surface->bo || obj_surface->fourcc != hw_fourcc) {
+        struct i965_driver_data * const i965 = i965_driver_data(ctx);
+
         i965_destroy_surface_storage(obj_surface);
-        va_status = i965_check_alloc_surface_bo(ctx, obj_surface, 1,
-            hw_fourcc, subsample);
+        va_status = i965_check_alloc_surface_bo(ctx, obj_surface,
+            i965->codec_info->has_tiled_surface, hw_fourcc, subsample);
         if (va_status != VA_STATUS_SUCCESS)
             return va_status;
     }