diff options
author | Chen-Yu Tsai <wens@csie.org> | 2016-10-24 16:21:15 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-12-06 18:47:07 +0300 |
commit | 230c5b44233ff0543c0b5ccf4ff9400057010fbe (patch) | |
tree | 27f1e4a58204c7a4cd0c366cd8f863f30d8758cc /drivers/gpu/drm/panel | |
parent | 2cb35c802ad9541691b893a05cc113f15fd53617 (diff) | |
download | linux-230c5b44233ff0543c0b5ccf4ff9400057010fbe.tar.xz |
drm/panel: simple: Check against num_timings when setting preferred for timing
In the loop on .timings, we should check .num_timings to see if it's the
only mode specified, not .num_modes, which should be used with .modes.
Fixes: cda553725c92 ("drm/panel: simple: Set appropriate mode type")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r-- | drivers/gpu/drm/panel/panel-simple.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 261b0083ba40..d545834e5d2c 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -120,7 +120,7 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) mode->type |= DRM_MODE_TYPE_DRIVER; - if (panel->desc->num_modes == 1) + if (panel->desc->num_timings == 1) mode->type |= DRM_MODE_TYPE_PREFERRED; drm_mode_probed_add(connector, mode); |