diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-01-25 07:26:56 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-01-26 10:46:28 +0100 |
commit | 196cd5d3758cbf587fc0254cae7132d95993461e (patch) | |
tree | 4bdd79c3e83b3132146154e8b8563e805ae3cab5 /drivers/gpu/drm/drm_modes.c | |
parent | 0683c0ab1640229cea9e47e75c33cfb192c6aca8 (diff) | |
download | linux-stable-196cd5d3758cbf587fc0254cae7132d95993461e.tar.gz linux-stable-196cd5d3758cbf587fc0254cae7132d95993461e.tar.bz2 linux-stable-196cd5d3758cbf587fc0254cae7132d95993461e.zip |
drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/
The function operates on modes, not CRTCs. Also move it into
drm_modes.[hc]. Spotted while reviewing CRTC docs.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-15-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/drm_modes.c')
-rw-r--r-- | drivers/gpu/drm/drm_modes.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index ac6a35212501..1d9d4ca086a8 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -797,6 +797,27 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode) EXPORT_SYMBOL(drm_mode_vrefresh); /** + * drm_mode_get_hv_timing - Fetches hdisplay/vdisplay for given mode + * @mode: mode to query + * @hdisplay: hdisplay value to fill in + * @vdisplay: vdisplay value to fill in + * + * The vdisplay value will be doubled if the specified mode is a stereo mode of + * the appropriate layout. + */ +void drm_mode_get_hv_timing(const struct drm_display_mode *mode, + int *hdisplay, int *vdisplay) +{ + struct drm_display_mode adjusted; + + drm_mode_copy(&adjusted, mode); + drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY); + *hdisplay = adjusted.crtc_hdisplay; + *vdisplay = adjusted.crtc_vdisplay; +} +EXPORT_SYMBOL(drm_mode_get_hv_timing); + +/** * drm_mode_set_crtcinfo - set CRTC modesetting timing parameters * @p: mode * @adjust_flags: a combination of adjustment flags |