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

drm/modes: remove drm_mode_height/width

There's a neat FIXME asking whether this is really need. I'd
say really no.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

+4 -41
+2 -2
drivers/gpu/drm/drm_edid.c
··· 3576 3576 struct drm_display_mode *mode; 3577 3577 3578 3578 list_for_each_entry(mode, &connector->probed_modes, head) { 3579 - if (drm_mode_width(mode) == hpref && 3580 - drm_mode_height(mode) == vpref) 3579 + if (mode->hdisplay == hpref && 3580 + mode->vdisplay == vpref) 3581 3581 mode->type |= DRM_MODE_TYPE_PREFERRED; 3582 3582 } 3583 3583 }
+2 -2
drivers/gpu/drm/drm_fb_helper.c
··· 1141 1141 struct drm_display_mode *mode; 1142 1142 1143 1143 list_for_each_entry(mode, &fb_connector->connector->modes, head) { 1144 - if (drm_mode_width(mode) > width || 1145 - drm_mode_height(mode) > height) 1144 + if (mode->hdisplay > width || 1145 + mode->vdisplay > height) 1146 1146 continue; 1147 1147 if (mode->type & DRM_MODE_TYPE_PREFERRED) 1148 1148 return mode;
-35
drivers/gpu/drm/drm_modes.c
··· 647 647 } 648 648 EXPORT_SYMBOL(drm_mode_set_name); 649 649 650 - /** 651 - * drm_mode_width - get the width of a mode 652 - * @mode: mode 653 - * 654 - * Return @mode's width (hdisplay) value. 655 - * 656 - * FIXME: is this needed? 657 - * 658 - * RETURNS: 659 - * @mode->hdisplay 660 - */ 661 - int drm_mode_width(const struct drm_display_mode *mode) 662 - { 663 - return mode->hdisplay; 664 - 665 - } 666 - EXPORT_SYMBOL(drm_mode_width); 667 - 668 - /** 669 - * drm_mode_height - get the height of a mode 670 - * @mode: mode 671 - * 672 - * Return @mode's height (vdisplay) value. 673 - * 674 - * FIXME: is this needed? 675 - * 676 - * RETURNS: 677 - * @mode->vdisplay 678 - */ 679 - int drm_mode_height(const struct drm_display_mode *mode) 680 - { 681 - return mode->vdisplay; 682 - } 683 - EXPORT_SYMBOL(drm_mode_height); 684 - 685 650 /** drm_mode_hsync - get the hsync of a mode 686 651 * @mode: mode 687 652 *
-2
include/drm/drm_modes.h
··· 195 195 int index); 196 196 197 197 void drm_mode_set_name(struct drm_display_mode *mode); 198 - int drm_mode_width(const struct drm_display_mode *mode); 199 - int drm_mode_height(const struct drm_display_mode *mode); 200 198 int drm_mode_hsync(const struct drm_display_mode *mode); 201 199 int drm_mode_vrefresh(const struct drm_display_mode *mode); 202 200