[Mesa-dev] [PATCH] winsys/radeon: (trivial) rename variable for consistency

Christian König christian.koenig at amd.com
Wed Oct 5 07:30:19 UTC 2016


Am 05.10.2016 um 05:51 schrieb Alexandre Demers:
> Signed-off-by: Alexandre Demers <alexandre.f.demers at gmail.com>

I don't mind getting this straight, but are we really using "offset" 
instead of "off" all over the place?

Anyway this one is Reviewed-by: Christian König <christian.koenig at amd.com>.

Regards,
Christian.

> ---
>   src/gallium/drivers/radeon/radeon_uvd.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
> index fb1491a..81fba95 100644
> --- a/src/gallium/drivers/radeon/radeon_uvd.c
> +++ b/src/gallium/drivers/radeon/radeon_uvd.c
> @@ -108,7 +108,7 @@ static void set_reg(struct ruvd_decoder *dec, unsigned reg, uint32_t val)
>   
>   /* send a command to the VCPU through the GPCOM registers */
>   static void send_cmd(struct ruvd_decoder *dec, unsigned cmd,
> -		     struct pb_buffer* buf, uint32_t off,
> +		     struct pb_buffer* buf, uint32_t offset,
>   		     enum radeon_bo_usage usage, enum radeon_bo_domain domain)
>   {
>   	int reloc_idx;
> @@ -119,12 +119,12 @@ static void send_cmd(struct ruvd_decoder *dec, unsigned cmd,
>   	if (!dec->use_legacy) {
>   		uint64_t addr;
>   		addr = dec->ws->buffer_get_virtual_address(buf);
> -		addr = addr + off;
> +		addr = addr + offset;
>   		set_reg(dec, RUVD_GPCOM_VCPU_DATA0, addr);
>   		set_reg(dec, RUVD_GPCOM_VCPU_DATA1, addr >> 32);
>   	} else {
> -		off += dec->ws->buffer_get_reloc_offset(buf);
> -		set_reg(dec, RUVD_GPCOM_VCPU_DATA0, off);
> +		offset += dec->ws->buffer_get_reloc_offset(buf);
> +		set_reg(dec, RUVD_GPCOM_VCPU_DATA0, offset);
>   		set_reg(dec, RUVD_GPCOM_VCPU_DATA1, reloc_idx * 4);
>   	}
>   	set_reg(dec, RUVD_GPCOM_VCPU_CMD, cmd << 1);




More information about the mesa-dev mailing list