diff options
| author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-23 10:39:31 -0500 |
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-13 07:48:43 -0400 |
| commit | 3e70292cd4a002cd799a1cd4115286cba3933d6d (patch) | |
| tree | ed56de8574ed10f41a33effc168257b0ecb750dc | |
| parent | ba0c2422d7cda623acbbcde24542b52c4999bc84 (diff) | |
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>
| -rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_modes.c | 6 | ||||
| -rw-r--r-- | include/drm/drm_modes.h | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 85d476abea6c..08b3359c655f 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
| @@ -176,8 +176,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, | |||
| 176 | drm_mode_connector_list_update(connector); | 176 | drm_mode_connector_list_update(connector); |
| 177 | 177 | ||
| 178 | if (maxX && maxY) | 178 | if (maxX && maxY) |
| 179 | drm_mode_validate_size(dev, &connector->modes, maxX, | 179 | drm_mode_validate_size(dev, &connector->modes, maxX, maxY); |
| 180 | maxY, 0); | ||
| 181 | 180 | ||
| 182 | if (connector->interlace_allowed) | 181 | if (connector->interlace_allowed) |
| 183 | mode_flags |= DRM_MODE_FLAG_INTERLACE; | 182 | mode_flags |= DRM_MODE_FLAG_INTERLACE; |
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index df358f657a13..cc352eed0191 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c | |||
| @@ -889,7 +889,6 @@ EXPORT_SYMBOL(drm_mode_equal_no_clocks_no_stereo); | |||
| 889 | * @mode_list: list of modes to check | 889 | * @mode_list: list of modes to check |
| 890 | * @maxX: maximum width | 890 | * @maxX: maximum width |
| 891 | * @maxY: maximum height | 891 | * @maxY: maximum height |
| 892 | * @maxPitch: max pitch | ||
| 893 | * | 892 | * |
| 894 | * The DRM device (@dev) has size and pitch limits. Here we validate the | 893 | * The DRM device (@dev) has size and pitch limits. Here we validate the |
| 895 | * modes we probed for @dev against those limits and set their status as | 894 | * modes we probed for @dev against those limits and set their status as |
| @@ -897,14 +896,11 @@ EXPORT_SYMBOL(drm_mode_equal_no_clocks_no_stereo); | |||
| 897 | */ | 896 | */ |
| 898 | void drm_mode_validate_size(struct drm_device *dev, | 897 | void drm_mode_validate_size(struct drm_device *dev, |
| 899 | struct list_head *mode_list, | 898 | struct list_head *mode_list, |
| 900 | int maxX, int maxY, int maxPitch) | 899 | int maxX, int maxY) |
| 901 | { | 900 | { |
| 902 | struct drm_display_mode *mode; | 901 | struct drm_display_mode *mode; |
| 903 | 902 | ||
| 904 | list_for_each_entry(mode, mode_list, head) { | 903 | list_for_each_entry(mode, mode_list, head) { |
| 905 | if (maxPitch > 0 && mode->hdisplay > maxPitch) | ||
| 906 | mode->status = MODE_BAD_WIDTH; | ||
| 907 | |||
| 908 | if (maxX > 0 && mode->hdisplay > maxX) | 904 | if (maxX > 0 && mode->hdisplay > maxX) |
| 909 | mode->status = MODE_VIRTUAL_X; | 905 | mode->status = MODE_VIRTUAL_X; |
| 910 | 906 | ||
diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h index b23628b22cff..b3507f15d010 100644 --- a/include/drm/drm_modes.h +++ b/include/drm/drm_modes.h | |||
| @@ -212,7 +212,7 @@ bool drm_mode_equal_no_clocks_no_stereo(const struct drm_display_mode *mode1, | |||
| 212 | /* for use by the crtc helper probe functions */ | 212 | /* for use by the crtc helper probe functions */ |
| 213 | void drm_mode_validate_size(struct drm_device *dev, | 213 | void drm_mode_validate_size(struct drm_device *dev, |
| 214 | struct list_head *mode_list, | 214 | struct list_head *mode_list, |
| 215 | int maxX, int maxY, int maxPitch); | 215 | int maxX, int maxY); |
| 216 | void drm_mode_prune_invalid(struct drm_device *dev, | 216 | void drm_mode_prune_invalid(struct drm_device *dev, |
| 217 | struct list_head *mode_list, bool verbose); | 217 | struct list_head *mode_list, bool verbose); |
| 218 | void drm_mode_sort(struct list_head *mode_list); | 218 | void drm_mode_sort(struct list_head *mode_list); |
