diff options
author | Chen-Yu Tsai <wens@csie.org> | 2016-10-24 13:21:15 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-19 19:18:06 (GMT) |
commit | 699fbc4cb7d4ba30865f978750f0364cebabb31c (patch) | |
tree | 0a0a25f4f73fa514cfa4541168a09c60a0a0fd2f /drivers/gpu | |
parent | 214417a0419b9e37bebf24a1e3c6d3dea8ed0b52 (diff) | |
download | linux-699fbc4cb7d4ba30865f978750f0364cebabb31c.tar.xz |
drm/panel: simple: Check against num_timings when setting preferred for timing
commit 230c5b44233ff0543c0b5ccf4ff9400057010fbe upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu')
-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 113db3c..27cb424 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); |