VEBOX: Fix endingX setting for dndi/iecp command
authorLi Xiaowei <xiaowei.a.li@intel.com>
Wed, 19 Jun 2013 17:33:01 +0000 (01:33 +0800)
committerLi Xiaowei <xiaowei.a.li@intel.com>
Thu, 20 Jun 2013 09:11:01 +0000 (17:11 +0800)
The endingX need be aligned to 64 and subtract 1
before setting to VEBOX command.

Signed-off-by: Li Xiaowei <xiaowei.a.li@intel.com>
src/gen75_vpp_vebox.c

index c41fc8b..cb04fde 100644 (file)
@@ -641,7 +641,7 @@ void hsw_veb_dndi_iecp_command(VADriverContextP ctx, struct intel_vebox_context
     struct intel_batchbuffer *batch = proc_ctx->batch;
     unsigned char frame_ctrl_bits = 0;
     unsigned int startingX = 0;
-    unsigned int endingX = proc_ctx->width_input;
+    unsigned int endingX = (proc_ctx->width_input + 63 ) / 64 * 64;
 
     /* s1:update the previous and current input */
 /*    tempFrame = proc_ctx->frame_store[FRAME_IN_PREVIOUS];
@@ -666,7 +666,7 @@ void hsw_veb_dndi_iecp_command(VADriverContextP ctx, struct intel_vebox_context
     OUT_VEB_BATCH(batch, VEB_DNDI_IECP_STATE | (10 - 2));
     OUT_VEB_BATCH(batch,
                   startingX << 16 |
-                  endingX);
+                  endingX-1);
     OUT_RELOC(batch,
               proc_ctx->frame_store[FRAME_IN_CURRENT].obj_surface->bo,
               I915_GEM_DOMAIN_RENDER, 0, frame_ctrl_bits);