Skip to content

Commit 3e70292

Browse files
committed
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>
1 parent ba0c242 commit 3e70292

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

‎drivers/gpu/drm/drm_crtc_helper.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
176176
drm_mode_connector_list_update(connector);
177177

178178
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);
181180

182181
if (connector->interlace_allowed)
183182
mode_flags |= DRM_MODE_FLAG_INTERLACE;

‎drivers/gpu/drm/drm_modes.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -889,22 +889,18 @@ EXPORT_SYMBOL(drm_mode_equal_no_clocks_no_stereo);
889889
* @mode_list: list of modes to check
890890
* @maxX: maximum width
891891
* @maxY: maximum height
892-
* @maxPitch: max pitch
893892
*
894893
* The DRM device (@dev) has size and pitch limits. Here we validate the
895894
* modes we probed for @dev against those limits and set their status as
896895
* necessary.
897896
*/
898897
void drm_mode_validate_size(struct drm_device *dev,
899898
struct list_head *mode_list,
900-
int maxX, int maxY, int maxPitch)
899+
int maxX, int maxY)
901900
{
902901
struct drm_display_mode *mode;
903902

904903
list_for_each_entry(mode, mode_list, head) {
905-
if (maxPitch > 0 && mode->hdisplay > maxPitch)
906-
mode->status = MODE_BAD_WIDTH;
907-
908904
if (maxX > 0 && mode->hdisplay > maxX)
909905
mode->status = MODE_VIRTUAL_X;
910906

‎include/drm/drm_modes.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ bool drm_mode_equal_no_clocks_no_stereo(const struct drm_display_mode *mode1,
212212
/* for use by the crtc helper probe functions */
213213
void drm_mode_validate_size(struct drm_device *dev,
214214
struct list_head *mode_list,
215-
int maxX, int maxY, int maxPitch);
215+
int maxX, int maxY);
216216
void drm_mode_prune_invalid(struct drm_device *dev,
217217
struct list_head *mode_list, bool verbose);
218218
void drm_mode_sort(struct list_head *mode_list);

0 commit comments

Comments
 (0)