diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-11-12 18:59:51 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2019-01-25 18:50:53 +0200 |
commit | bda5f53206e56c69ac8b7c8d60e08ee97fd4618f (patch) | |
tree | 9a97047031b860a311094ff8c4e1ccd11f20a0db | |
parent | 56f6230811818a9dc659ffbfb9f954b2bed25819 (diff) | |
download | lwn-bda5f53206e56c69ac8b7c8d60e08ee97fd4618f.tar.gz lwn-bda5f53206e56c69ac8b7c8d60e08ee97fd4618f.zip |
drm/i915/tv: Nuke silly 0 initialzation of xpos/ypos
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@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181112170000.27531-8-ville.syrjala@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 0536077cc955..0910eadc605a 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c @@ -993,7 +993,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) @@ -1102,8 +1102,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 + |