Commit 9d3de138 authored by Daniel Vetter's avatar Daniel Vetter

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: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 55310008
...@@ -3576,8 +3576,8 @@ void drm_set_preferred_mode(struct drm_connector *connector, ...@@ -3576,8 +3576,8 @@ void drm_set_preferred_mode(struct drm_connector *connector,
struct drm_display_mode *mode; struct drm_display_mode *mode;
list_for_each_entry(mode, &connector->probed_modes, head) { list_for_each_entry(mode, &connector->probed_modes, head) {
if (drm_mode_width(mode) == hpref && if (mode->hdisplay == hpref &&
drm_mode_height(mode) == vpref) mode->vdisplay == vpref)
mode->type |= DRM_MODE_TYPE_PREFERRED; mode->type |= DRM_MODE_TYPE_PREFERRED;
} }
} }
......
...@@ -1141,8 +1141,8 @@ struct drm_display_mode *drm_has_preferred_mode(struct drm_fb_helper_connector * ...@@ -1141,8 +1141,8 @@ struct drm_display_mode *drm_has_preferred_mode(struct drm_fb_helper_connector *
struct drm_display_mode *mode; struct drm_display_mode *mode;
list_for_each_entry(mode, &fb_connector->connector->modes, head) { list_for_each_entry(mode, &fb_connector->connector->modes, head) {
if (drm_mode_width(mode) > width || if (mode->hdisplay > width ||
drm_mode_height(mode) > height) mode->vdisplay > height)
continue; continue;
if (mode->type & DRM_MODE_TYPE_PREFERRED) if (mode->type & DRM_MODE_TYPE_PREFERRED)
return mode; return mode;
......
...@@ -647,41 +647,6 @@ void drm_mode_set_name(struct drm_display_mode *mode) ...@@ -647,41 +647,6 @@ void drm_mode_set_name(struct drm_display_mode *mode)
} }
EXPORT_SYMBOL(drm_mode_set_name); EXPORT_SYMBOL(drm_mode_set_name);
/**
* drm_mode_width - get the width of a mode
* @mode: mode
*
* Return @mode's width (hdisplay) value.
*
* FIXME: is this needed?
*
* RETURNS:
* @mode->hdisplay
*/
int drm_mode_width(const struct drm_display_mode *mode)
{
return mode->hdisplay;
}
EXPORT_SYMBOL(drm_mode_width);
/**
* drm_mode_height - get the height of a mode
* @mode: mode
*
* Return @mode's height (vdisplay) value.
*
* FIXME: is this needed?
*
* RETURNS:
* @mode->vdisplay
*/
int drm_mode_height(const struct drm_display_mode *mode)
{
return mode->vdisplay;
}
EXPORT_SYMBOL(drm_mode_height);
/** drm_mode_hsync - get the hsync of a mode /** drm_mode_hsync - get the hsync of a mode
* @mode: mode * @mode: mode
* *
......
...@@ -195,8 +195,6 @@ int of_get_drm_display_mode(struct device_node *np, ...@@ -195,8 +195,6 @@ int of_get_drm_display_mode(struct device_node *np,
int index); int index);
void drm_mode_set_name(struct drm_display_mode *mode); void drm_mode_set_name(struct drm_display_mode *mode);
int drm_mode_width(const struct drm_display_mode *mode);
int drm_mode_height(const struct drm_display_mode *mode);
int drm_mode_hsync(const struct drm_display_mode *mode); int drm_mode_hsync(const struct drm_display_mode *mode);
int drm_mode_vrefresh(const struct drm_display_mode *mode); int drm_mode_vrefresh(const struct drm_display_mode *mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment