drm/amdgpu: Remove pointless on stack mode copies
These on stack copies of the modes appear to be pointless. Just look at the originals directly. Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: amd-gfx@lists.freedesktop.org Cc: Nikola Cornij <nikola.cornij@amd.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
508a47d434
commit
1cbd78879b
|
@ -10181,27 +10181,27 @@ static bool
|
|||
is_timing_unchanged_for_freesync(struct drm_crtc_state *old_crtc_state,
|
||||
struct drm_crtc_state *new_crtc_state)
|
||||
{
|
||||
struct drm_display_mode old_mode, new_mode;
|
||||
const struct drm_display_mode *old_mode, *new_mode;
|
||||
|
||||
if (!old_crtc_state || !new_crtc_state)
|
||||
return false;
|
||||
|
||||
old_mode = old_crtc_state->mode;
|
||||
new_mode = new_crtc_state->mode;
|
||||
old_mode = &old_crtc_state->mode;
|
||||
new_mode = &new_crtc_state->mode;
|
||||
|
||||
if (old_mode.clock == new_mode.clock &&
|
||||
old_mode.hdisplay == new_mode.hdisplay &&
|
||||
old_mode.vdisplay == new_mode.vdisplay &&
|
||||
old_mode.htotal == new_mode.htotal &&
|
||||
old_mode.vtotal != new_mode.vtotal &&
|
||||
old_mode.hsync_start == new_mode.hsync_start &&
|
||||
old_mode.vsync_start != new_mode.vsync_start &&
|
||||
old_mode.hsync_end == new_mode.hsync_end &&
|
||||
old_mode.vsync_end != new_mode.vsync_end &&
|
||||
old_mode.hskew == new_mode.hskew &&
|
||||
old_mode.vscan == new_mode.vscan &&
|
||||
(old_mode.vsync_end - old_mode.vsync_start) ==
|
||||
(new_mode.vsync_end - new_mode.vsync_start))
|
||||
if (old_mode->clock == new_mode->clock &&
|
||||
old_mode->hdisplay == new_mode->hdisplay &&
|
||||
old_mode->vdisplay == new_mode->vdisplay &&
|
||||
old_mode->htotal == new_mode->htotal &&
|
||||
old_mode->vtotal != new_mode->vtotal &&
|
||||
old_mode->hsync_start == new_mode->hsync_start &&
|
||||
old_mode->vsync_start != new_mode->vsync_start &&
|
||||
old_mode->hsync_end == new_mode->hsync_end &&
|
||||
old_mode->vsync_end != new_mode->vsync_end &&
|
||||
old_mode->hskew == new_mode->hskew &&
|
||||
old_mode->vscan == new_mode->vscan &&
|
||||
(old_mode->vsync_end - old_mode->vsync_start) ==
|
||||
(new_mode->vsync_end - new_mode->vsync_start))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue