[Intel-gfx] [PATCH 07/15] drm/i915/tv: Nuke silly 0 initialzation of xpos/ypos

Imre Deak imre.deak at intel.com
Tue Jan 22 13:09:44 UTC 2019


On Mon, Nov 12, 2018 at 06:59:51PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Just assign the margin values directly to xpos/ypos instead
> of first initializing to zero and then adding the values.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Imre Deak <imre.deak at intel.com>

> ---
>  drivers/gpu/drm/i915/intel_tv.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
> index 72de154b8627..97a82878359f 100644
> --- a/drivers/gpu/drm/i915/intel_tv.c
> +++ b/drivers/gpu/drm/i915/intel_tv.c
> @@ -994,7 +994,7 @@ static void intel_tv_pre_enable(struct intel_encoder *encoder,
>  	const struct video_levels *video_levels;
>  	const struct color_conversion *color_conversion;
>  	bool burst_ena;
> -	int xpos = 0x0, ypos = 0x0;
> +	int xpos, ypos;
>  	unsigned int xsize, ysize;
>  
>  	if (!tv_mode)
> @@ -1103,8 +1103,8 @@ static void intel_tv_pre_enable(struct intel_encoder *encoder,
>  	else
>  		ysize = 2 * (tv_mode->nbr_end + 1);
>  
> -	xpos += conn_state->tv.margins.left;
> -	ypos += conn_state->tv.margins.top;
> +	xpos = conn_state->tv.margins.left;
> +	ypos = conn_state->tv.margins.top;
>  	xsize -= (conn_state->tv.margins.left +
>  		  conn_state->tv.margins.right);
>  	ysize -= (conn_state->tv.margins.top +
> -- 
> 2.18.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the dri-devel mailing list