aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-11-28 10:29:18 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-11-28 10:49:33 -0500
commitc19de8eb67f745a7b16a7587ed002e6916ab2a5d (patch)
treefb9f3557cd6dbe8a948cf4273aa9f6c844e275c9 /drivers/gpu
parentddf9c536295b9d7fcfd0bfc377593b41f2a4dc02 (diff)
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: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_crt.c5
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c2
-rw-r--r--drivers/gpu/drm/i915/intel_dsi.c5
-rw-r--r--drivers/gpu/drm/i915/intel_dvo.c5
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c5
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c5
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c5
7 files changed, 19 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index b5b1b9b23adf..e2e39e65f109 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -222,8 +222,9 @@ static void intel_crt_dpms(struct drm_connector *connector, int mode)
222 intel_modeset_check_state(connector->dev); 222 intel_modeset_check_state(connector->dev);
223} 223}
224 224
225static int intel_crt_mode_valid(struct drm_connector *connector, 225static enum drm_mode_status
226 struct drm_display_mode *mode) 226intel_crt_mode_valid(struct drm_connector *connector,
227 struct drm_display_mode *mode)
227{ 228{
228 struct drm_device *dev = connector->dev; 229 struct drm_device *dev = connector->dev;
229 230
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 3b22e726585e..82de200efa05 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -142,7 +142,7 @@ intel_dp_max_data_rate(int max_link_clock, int max_lanes)
142 return (max_link_clock * max_lanes * 8) / 10; 142 return (max_link_clock * max_lanes * 8) / 10;
143} 143}
144 144
145static int 145static enum drm_mode_status
146intel_dp_mode_valid(struct drm_connector *connector, 146intel_dp_mode_valid(struct drm_connector *connector,
147 struct drm_display_mode *mode) 147 struct drm_display_mode *mode)
148{ 148{
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index d257b093ca68..7b9b350d29ae 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -251,8 +251,9 @@ static void intel_dsi_get_config(struct intel_encoder *encoder,
251 /* XXX: read flags, set to adjusted_mode */ 251 /* XXX: read flags, set to adjusted_mode */
252} 252}
253 253
254static int intel_dsi_mode_valid(struct drm_connector *connector, 254static enum drm_mode_status
255 struct drm_display_mode *mode) 255intel_dsi_mode_valid(struct drm_connector *connector,
256 struct drm_display_mode *mode)
256{ 257{
257 struct intel_connector *intel_connector = to_intel_connector(connector); 258 struct intel_connector *intel_connector = to_intel_connector(connector);
258 struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode; 259 struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index 3c7736546856..eeff998e52ef 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -234,8 +234,9 @@ static void intel_dvo_dpms(struct drm_connector *connector, int mode)
234 intel_modeset_check_state(connector->dev); 234 intel_modeset_check_state(connector->dev);
235} 235}
236 236
237static int intel_dvo_mode_valid(struct drm_connector *connector, 237static enum drm_mode_status
238 struct drm_display_mode *mode) 238intel_dvo_mode_valid(struct drm_connector *connector,
239 struct drm_display_mode *mode)
239{ 240{
240 struct intel_dvo *intel_dvo = intel_attached_dvo(connector); 241 struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
241 242
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index d0c81b170149..6a6ad0c78dc7 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -853,8 +853,9 @@ static int hdmi_portclock_limit(struct intel_hdmi *hdmi)
853 return 225000; 853 return 225000;
854} 854}
855 855
856static int intel_hdmi_mode_valid(struct drm_connector *connector, 856static enum drm_mode_status
857 struct drm_display_mode *mode) 857intel_hdmi_mode_valid(struct drm_connector *connector,
858 struct drm_display_mode *mode)
858{ 859{
859 if (mode->clock > hdmi_portclock_limit(intel_attached_hdmi(connector))) 860 if (mode->clock > hdmi_portclock_limit(intel_attached_hdmi(connector)))
860 return MODE_CLOCK_HIGH; 861 return MODE_CLOCK_HIGH;
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index c3b4da7895ed..3deb58e2f394 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -256,8 +256,9 @@ static void intel_disable_lvds(struct intel_encoder *encoder)
256 POSTING_READ(lvds_encoder->reg); 256 POSTING_READ(lvds_encoder->reg);
257} 257}
258 258
259static int intel_lvds_mode_valid(struct drm_connector *connector, 259static enum drm_mode_status
260 struct drm_display_mode *mode) 260intel_lvds_mode_valid(struct drm_connector *connector,
261 struct drm_display_mode *mode)
261{ 262{
262 struct intel_connector *intel_connector = to_intel_connector(connector); 263 struct intel_connector *intel_connector = to_intel_connector(connector);
263 struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode; 264 struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index e4f9918ab859..2abeab09e883 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1536,8 +1536,9 @@ static void intel_sdvo_dpms(struct drm_connector *connector, int mode)
1536 intel_modeset_check_state(connector->dev); 1536 intel_modeset_check_state(connector->dev);
1537} 1537}
1538 1538
1539static int intel_sdvo_mode_valid(struct drm_connector *connector, 1539static enum drm_mode_status
1540 struct drm_display_mode *mode) 1540intel_sdvo_mode_valid(struct drm_connector *connector,
1541 struct drm_display_mode *mode)
1541{ 1542{
1542 struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector); 1543 struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
1543 1544