diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2014-08-08 11:30:25 +0200 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2014-10-28 11:27:55 +0100 |
commit | 2f09139036968392c102ba3cf653c165f11d8106 (patch) | |
tree | 43020631dc2d5ed5be62be8b5b5bb71a4beabd57 /src/gen75_vpp_vebox.c | |
parent | f11176415ec26eb5960ba6841d2d9c22f2cabc60 (diff) | |
download | libva-intel-driver-2f09139036968392c102ba3cf653c165f11d8106.tar.gz |
vebox: silence compilation warning.
Silence the following compilation warning:
CC i965_drv_video_la-gen75_vpp_vebox.lo
gen75_vpp_vebox.c: In function 'bdw_veb_dndi_iecp_command':
gen75_vpp_vebox.c:1537:5: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
Also simplify the calculation of the VEB_DI_IECP::endingX variable
with existing helper macros.
v2: renamed endingX to width64, which represents the width aligned
on to 64 columns, dropped obsolete startingX [Yakui]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'src/gen75_vpp_vebox.c')
-rw-r--r-- | src/gen75_vpp_vebox.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gen75_vpp_vebox.c b/src/gen75_vpp_vebox.c index 1113c90a..4188794f 100644 --- a/src/gen75_vpp_vebox.c +++ b/src/gen75_vpp_vebox.c @@ -805,8 +805,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 + 63 ) / 64 * 64; + const unsigned int width64 = ALIGN(proc_ctx->width_input, 64); /* s1:update the previous and current input */ /* tempFrame = proc_ctx->frame_store[FRAME_IN_PREVIOUS]; @@ -829,9 +828,7 @@ void hsw_veb_dndi_iecp_command(VADriverContextP ctx, struct intel_vebox_context /*s3:set reloc buffer address */ BEGIN_VEB_BATCH(batch, 10); OUT_VEB_BATCH(batch, VEB_DNDI_IECP_STATE | (10 - 2)); - OUT_VEB_BATCH(batch, - startingX << 16 | - (endingX-1)); + OUT_VEB_BATCH(batch, (width64 - 1)); OUT_RELOC(batch, proc_ctx->frame_store[FRAME_IN_CURRENT].obj_surface->bo, I915_GEM_DOMAIN_RENDER, 0, frame_ctrl_bits); @@ -1532,14 +1529,11 @@ void bdw_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 + 63 ) / 64 * 64; + const unsigned int width64 = ALIGN(proc_ctx->width_input, 64); BEGIN_VEB_BATCH(batch, 0x14); OUT_VEB_BATCH(batch, VEB_DNDI_IECP_STATE | (0x14 - 2));//DWord 0 - OUT_VEB_BATCH(batch, - startingX << 16 | - endingX -1);//DWord 1 + OUT_VEB_BATCH(batch, (width64 - 1)); OUT_RELOC(batch, proc_ctx->frame_store[FRAME_IN_CURRENT].obj_surface->bo, |