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

drm/modes: drop maxPitch from drm_mode_validate_size

Totally unused and actually redundant with maxX for display mode
validation. The fb helper otoh needs to check pitch limits,
but that is delegated into drivers instead.

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

+3 -8
+1 -2
drivers/gpu/drm/drm_crtc_helper.c
··· 176 176 drm_mode_connector_list_update(connector); 177 177 178 178 if (maxX && maxY) 179 - drm_mode_validate_size(dev, &connector->modes, maxX, 180 - maxY, 0); 179 + drm_mode_validate_size(dev, &connector->modes, maxX, maxY); 181 180 182 181 if (connector->interlace_allowed) 183 182 mode_flags |= DRM_MODE_FLAG_INTERLACE;
+1 -5
drivers/gpu/drm/drm_modes.c
··· 889 889 * @mode_list: list of modes to check 890 890 * @maxX: maximum width 891 891 * @maxY: maximum height 892 - * @maxPitch: max pitch 893 892 * 894 893 * The DRM device (@dev) has size and pitch limits. Here we validate the 895 894 * modes we probed for @dev against those limits and set their status as ··· 896 897 */ 897 898 void drm_mode_validate_size(struct drm_device *dev, 898 899 struct list_head *mode_list, 899 - int maxX, int maxY, int maxPitch) 900 + int maxX, int maxY) 900 901 { 901 902 struct drm_display_mode *mode; 902 903 903 904 list_for_each_entry(mode, mode_list, head) { 904 - if (maxPitch > 0 && mode->hdisplay > maxPitch) 905 - mode->status = MODE_BAD_WIDTH; 906 - 907 905 if (maxX > 0 && mode->hdisplay > maxX) 908 906 mode->status = MODE_VIRTUAL_X; 909 907
+1 -1
include/drm/drm_modes.h
··· 212 212 /* for use by the crtc helper probe functions */ 213 213 void drm_mode_validate_size(struct drm_device *dev, 214 214 struct list_head *mode_list, 215 - int maxX, int maxY, int maxPitch); 215 + int maxX, int maxY); 216 216 void drm_mode_prune_invalid(struct drm_device *dev, 217 217 struct list_head *mode_list, bool verbose); 218 218 void drm_mode_sort(struct list_head *mode_list);