[PATCH] drm_modes: calculate nominal vrefresh in drm_display_mode_from_videomode
Philipp Zabel
p.zabel at pengutronix.de
Thu Dec 3 00:55:44 PST 2015
Use drm_mode_vrefresh to update the vrefresh field after changing the
modes' timings and flags.
Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
---
drivers/gpu/drm/drm_modes.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index cd74a09..b624be8 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -611,6 +611,8 @@ void drm_display_mode_from_videomode(const struct videomode *vm,
dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
if (vm->flags & DISPLAY_FLAGS_DOUBLECLK)
dmode->flags |= DRM_MODE_FLAG_DBLCLK;
+ dmode->vrefresh = 0;
+ dmode->vrefresh = drm_mode_vrefresh(dmode);
drm_mode_set_name(dmode);
}
EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode);
--
2.6.2
More information about the dri-devel
mailing list