Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+27 -27
+1 -1
drivers/gpu/drm/drm_atomic_helper.c
··· 2367 2367 if (ret != 0) 2368 2368 return ret; 2369 2369 2370 - drm_crtc_get_hv_timing(set->mode, &hdisplay, &vdisplay); 2370 + drm_mode_get_hv_timing(set->mode, &hdisplay, &vdisplay); 2371 2371 2372 2372 drm_atomic_set_fb_for_plane(primary_state, set->fb); 2373 2373 primary_state->crtc_x = 0;
+1 -22
drivers/gpu/drm/drm_crtc.c
··· 482 482 EXPORT_SYMBOL(drm_mode_set_config_internal); 483 483 484 484 /** 485 - * drm_crtc_get_hv_timing - Fetches hdisplay/vdisplay for given mode 486 - * @mode: mode to query 487 - * @hdisplay: hdisplay value to fill in 488 - * @vdisplay: vdisplay value to fill in 489 - * 490 - * The vdisplay value will be doubled if the specified mode is a stereo mode of 491 - * the appropriate layout. 492 - */ 493 - void drm_crtc_get_hv_timing(const struct drm_display_mode *mode, 494 - int *hdisplay, int *vdisplay) 495 - { 496 - struct drm_display_mode adjusted; 497 - 498 - drm_mode_copy(&adjusted, mode); 499 - drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY); 500 - *hdisplay = adjusted.crtc_hdisplay; 501 - *vdisplay = adjusted.crtc_vdisplay; 502 - } 503 - EXPORT_SYMBOL(drm_crtc_get_hv_timing); 504 - 505 - /** 506 485 * drm_crtc_check_viewport - Checks that a framebuffer is big enough for the 507 486 * CRTC viewport 508 487 * @crtc: CRTC that framebuffer will be displayed on ··· 498 519 { 499 520 int hdisplay, vdisplay; 500 521 501 - drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay); 522 + drm_mode_get_hv_timing(mode, &hdisplay, &vdisplay); 502 523 503 524 if (crtc->state && 504 525 drm_rotation_90_or_270(crtc->primary->state->rotation))
+21
drivers/gpu/drm/drm_modes.c
··· 797 797 EXPORT_SYMBOL(drm_mode_vrefresh); 798 798 799 799 /** 800 + * drm_mode_get_hv_timing - Fetches hdisplay/vdisplay for given mode 801 + * @mode: mode to query 802 + * @hdisplay: hdisplay value to fill in 803 + * @vdisplay: vdisplay value to fill in 804 + * 805 + * The vdisplay value will be doubled if the specified mode is a stereo mode of 806 + * the appropriate layout. 807 + */ 808 + void drm_mode_get_hv_timing(const struct drm_display_mode *mode, 809 + int *hdisplay, int *vdisplay) 810 + { 811 + struct drm_display_mode adjusted; 812 + 813 + drm_mode_copy(&adjusted, mode); 814 + drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY); 815 + *hdisplay = adjusted.crtc_hdisplay; 816 + *vdisplay = adjusted.crtc_vdisplay; 817 + } 818 + EXPORT_SYMBOL(drm_mode_get_hv_timing); 819 + 820 + /** 800 821 * drm_mode_set_crtcinfo - set CRTC modesetting timing parameters 801 822 * @p: mode 802 823 * @adjust_flags: a combination of adjustment flags
+2 -2
drivers/gpu/drm/i915/intel_display.c
··· 11105 11105 return PTR_ERR(plane_state); 11106 11106 11107 11107 if (mode) 11108 - drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay); 11108 + drm_mode_get_hv_timing(mode, &hdisplay, &vdisplay); 11109 11109 else 11110 11110 hdisplay = vdisplay = 0; 11111 11111 ··· 12990 12990 * computation to clearly distinguish it from the adjusted mode, which 12991 12991 * can be changed by the connectors in the below retry loop. 12992 12992 */ 12993 - drm_crtc_get_hv_timing(&pipe_config->base.mode, 12993 + drm_mode_get_hv_timing(&pipe_config->base.mode, 12994 12994 &pipe_config->pipe_src_w, 12995 12995 &pipe_config->pipe_src_h); 12996 12996
-2
include/drm/drm_crtc.h
··· 824 824 return 1 << drm_crtc_index(crtc); 825 825 } 826 826 827 - void drm_crtc_get_hv_timing(const struct drm_display_mode *mode, 828 - int *hdisplay, int *vdisplay); 829 827 int drm_crtc_force_disable(struct drm_crtc *crtc); 830 828 int drm_crtc_force_disable_all(struct drm_device *dev); 831 829
+2
include/drm/drm_modes.h
··· 459 459 void drm_mode_set_name(struct drm_display_mode *mode); 460 460 int drm_mode_hsync(const struct drm_display_mode *mode); 461 461 int drm_mode_vrefresh(const struct drm_display_mode *mode); 462 + void drm_mode_get_hv_timing(const struct drm_display_mode *mode, 463 + int *hdisplay, int *vdisplay); 462 464 463 465 void drm_mode_set_crtcinfo(struct drm_display_mode *p, 464 466 int adjust_flags);