Commit c19de8eb authored by Damien Lespiau's avatar Damien Lespiau Committed by Daniel Vetter

drm/i915: Return a drm_mode_status enum in the mode_valid vfuncs

We had some mode_valid() vfuncs returning an int, others the enum. Let's
use the latter everywhere.
Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent ddf9c536
...@@ -222,7 +222,8 @@ static void intel_crt_dpms(struct drm_connector *connector, int mode) ...@@ -222,7 +222,8 @@ static void intel_crt_dpms(struct drm_connector *connector, int mode)
intel_modeset_check_state(connector->dev); intel_modeset_check_state(connector->dev);
} }
static int intel_crt_mode_valid(struct drm_connector *connector, static enum drm_mode_status
intel_crt_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
......
...@@ -142,7 +142,7 @@ intel_dp_max_data_rate(int max_link_clock, int max_lanes) ...@@ -142,7 +142,7 @@ intel_dp_max_data_rate(int max_link_clock, int max_lanes)
return (max_link_clock * max_lanes * 8) / 10; return (max_link_clock * max_lanes * 8) / 10;
} }
static int static enum drm_mode_status
intel_dp_mode_valid(struct drm_connector *connector, intel_dp_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
......
...@@ -251,7 +251,8 @@ static void intel_dsi_get_config(struct intel_encoder *encoder, ...@@ -251,7 +251,8 @@ static void intel_dsi_get_config(struct intel_encoder *encoder,
/* XXX: read flags, set to adjusted_mode */ /* XXX: read flags, set to adjusted_mode */
} }
static int intel_dsi_mode_valid(struct drm_connector *connector, static enum drm_mode_status
intel_dsi_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
struct intel_connector *intel_connector = to_intel_connector(connector); struct intel_connector *intel_connector = to_intel_connector(connector);
......
...@@ -234,7 +234,8 @@ static void intel_dvo_dpms(struct drm_connector *connector, int mode) ...@@ -234,7 +234,8 @@ static void intel_dvo_dpms(struct drm_connector *connector, int mode)
intel_modeset_check_state(connector->dev); intel_modeset_check_state(connector->dev);
} }
static int intel_dvo_mode_valid(struct drm_connector *connector, static enum drm_mode_status
intel_dvo_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
struct intel_dvo *intel_dvo = intel_attached_dvo(connector); struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
......
...@@ -853,7 +853,8 @@ static int hdmi_portclock_limit(struct intel_hdmi *hdmi) ...@@ -853,7 +853,8 @@ static int hdmi_portclock_limit(struct intel_hdmi *hdmi)
return 225000; return 225000;
} }
static int intel_hdmi_mode_valid(struct drm_connector *connector, static enum drm_mode_status
intel_hdmi_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
if (mode->clock > hdmi_portclock_limit(intel_attached_hdmi(connector))) if (mode->clock > hdmi_portclock_limit(intel_attached_hdmi(connector)))
......
...@@ -256,7 +256,8 @@ static void intel_disable_lvds(struct intel_encoder *encoder) ...@@ -256,7 +256,8 @@ static void intel_disable_lvds(struct intel_encoder *encoder)
POSTING_READ(lvds_encoder->reg); POSTING_READ(lvds_encoder->reg);
} }
static int intel_lvds_mode_valid(struct drm_connector *connector, static enum drm_mode_status
intel_lvds_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
struct intel_connector *intel_connector = to_intel_connector(connector); struct intel_connector *intel_connector = to_intel_connector(connector);
......
...@@ -1536,7 +1536,8 @@ static void intel_sdvo_dpms(struct drm_connector *connector, int mode) ...@@ -1536,7 +1536,8 @@ static void intel_sdvo_dpms(struct drm_connector *connector, int mode)
intel_modeset_check_state(connector->dev); intel_modeset_check_state(connector->dev);
} }
static int intel_sdvo_mode_valid(struct drm_connector *connector, static enum drm_mode_status
intel_sdvo_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector); struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
......
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