OSDN Git Service

genX_mfd: add comment on dmv buffer scaling
authorcarpalis <jerome.borsboom@carpalis.nl>
Wed, 6 Dec 2017 11:02:32 +0000 (12:02 +0100)
committerXiang, Haihao <haihao.xiang@intel.com>
Fri, 5 Jan 2018 06:57:31 +0000 (14:57 +0800)
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
src/gen6_mfd.c
src/gen75_mfd.c
src/gen7_mfd.c
src/gen8_mfd.c

index 06657ec..34473aa 100644 (file)
@@ -1189,10 +1189,16 @@ gen6_mfd_init_vc1_surface(VADriverContextP ctx,
     gen6_vc1_surface->luma_scale = 0;
     gen6_vc1_surface->luma_shift = 0;
 
+    /*
+     * The Direct MV buffer is scalable with frame height, but
+     * does not scale with frame width as the hardware assumes
+     * that frame width is fixed at 128 MBs.
+     */
+
     if (gen6_vc1_surface->dmv == NULL) {
         gen6_vc1_surface->dmv = dri_bo_alloc(i965->intel.bufmgr,
                                              "direct mv w/r buffer",
-                                             128 * height_in_mbs * 64,  /* scalable with frame height */
+                                             128 * height_in_mbs * 64,
                                              0x1000);
     }
 }
index c735c0e..d23b34a 100644 (file)
@@ -1549,6 +1549,12 @@ gen75_mfd_init_vc1_surface(VADriverContextP ctx,
     else
         gen7_vc1_surface->picture_type_top = picture_type;
 
+    /*
+     * The Direct MV buffer is scalable with frame height, but
+     * does not scale with frame width as the hardware assumes
+     * that frame width is fixed at 128 MBs.
+     */
+
     if (gen7_vc1_surface->dmv_top == NULL) {
         height_in_mbs = ALIGN(obj_surface->orig_height, 16) / 16;
         gen7_vc1_surface->dmv_top = dri_bo_alloc(i965->intel.bufmgr,
index 77c1a5a..bc12677 100644 (file)
@@ -1284,6 +1284,12 @@ gen7_mfd_init_vc1_surface(VADriverContextP ctx,
     else
         gen7_vc1_surface->picture_type_top = picture_type;
 
+    /*
+     * The Direct MV buffer is scalable with frame height, but
+     * does not scale with frame width as the hardware assumes
+     * that frame width is fixed at 128 MBs.
+     */
+
     if (gen7_vc1_surface->dmv_top == NULL) {
         height_in_mbs = ALIGN(obj_surface->orig_height, 16) / 16;
         gen7_vc1_surface->dmv_top = dri_bo_alloc(i965->intel.bufmgr,
index f616182..f8dba29 100644 (file)
@@ -1328,6 +1328,12 @@ gen8_mfd_init_vc1_surface(VADriverContextP ctx,
     else
         gen7_vc1_surface->picture_type_top = picture_type;
 
+    /*
+     * The Direct MV buffer is scalable with frame height, but
+     * does not scale with frame width as the hardware assumes
+     * that frame width is fixed at 128 MBs.
+     */
+
     if (gen7_vc1_surface->dmv_top == NULL) {
         height_in_mbs = ALIGN(obj_surface->orig_height, 16) / 16;
         gen7_vc1_surface->dmv_top = dri_bo_alloc(i965->intel.bufmgr,