mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-22 02:20:40 +00:00
drm/i915: Polish intel_tv_mode_valid()
Drop the tv_mode NULL check since intel_tv_mode_find() never actually returns NULL, and flip the condition around so that the MODE_OK case is at the end, which is customary to all the other .mode_valid() implementations. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191001154629.11063-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
This commit is contained in:
parent
74f1d78965
commit
15de0889b0
1 changed files with 3 additions and 4 deletions
|
@ -961,11 +961,10 @@ intel_tv_mode_valid(struct drm_connector *connector,
|
|||
return MODE_CLOCK_HIGH;
|
||||
|
||||
/* Ensure TV refresh is close to desired refresh */
|
||||
if (tv_mode && abs(tv_mode->refresh - drm_mode_vrefresh(mode) * 1000)
|
||||
< 1000)
|
||||
return MODE_OK;
|
||||
if (abs(tv_mode->refresh - drm_mode_vrefresh(mode) * 1000) >= 1000)
|
||||
return MODE_CLOCK_RANGE;
|
||||
|
||||
return MODE_CLOCK_RANGE;
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in a new issue