diff options
| -rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 28 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 9 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_crt.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_dvo.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_dp_mst.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/dsi.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/hdmi.c | 5 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/rgb.c | 5 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/sor.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 | ||||
| -rw-r--r-- | include/drm/drm_atomic_helper.h | 4 | ||||
| -rw-r--r-- | include/drm/drm_crtc.h | 2 | ||||
| -rw-r--r-- | include/drm/drm_crtc_helper.h | 2 |
19 files changed, 65 insertions, 44 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 5ec13c7cc832..57847ae8ce8c 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c | |||
| @@ -1974,9 +1974,12 @@ EXPORT_SYMBOL(drm_atomic_helper_page_flip); | |||
| 1974 | * implementing the legacy DPMS connector interface. It computes the new desired | 1974 | * implementing the legacy DPMS connector interface. It computes the new desired |
| 1975 | * ->active state for the corresponding CRTC (if the connector is enabled) and | 1975 | * ->active state for the corresponding CRTC (if the connector is enabled) and |
| 1976 | * updates it. | 1976 | * updates it. |
| 1977 | * | ||
| 1978 | * Returns: | ||
| 1979 | * Returns 0 on success, negative errno numbers on failure. | ||
| 1977 | */ | 1980 | */ |
| 1978 | void drm_atomic_helper_connector_dpms(struct drm_connector *connector, | 1981 | int drm_atomic_helper_connector_dpms(struct drm_connector *connector, |
| 1979 | int mode) | 1982 | int mode) |
| 1980 | { | 1983 | { |
| 1981 | struct drm_mode_config *config = &connector->dev->mode_config; | 1984 | struct drm_mode_config *config = &connector->dev->mode_config; |
| 1982 | struct drm_atomic_state *state; | 1985 | struct drm_atomic_state *state; |
| @@ -1985,6 +1988,7 @@ void drm_atomic_helper_connector_dpms(struct drm_connector *connector, | |||
| 1985 | struct drm_connector *tmp_connector; | 1988 | struct drm_connector *tmp_connector; |
| 1986 | int ret; | 1989 | int ret; |
| 1987 | bool active = false; | 1990 | bool active = false; |
| 1991 | int old_mode = connector->dpms; | ||
| 1988 | 1992 | ||
| 1989 | if (mode != DRM_MODE_DPMS_ON) | 1993 | if (mode != DRM_MODE_DPMS_ON) |
| 1990 | mode = DRM_MODE_DPMS_OFF; | 1994 | mode = DRM_MODE_DPMS_OFF; |
| @@ -1993,18 +1997,19 @@ void drm_atomic_helper_connector_dpms(struct drm_connector *connector, | |||
| 1993 | crtc = connector->state->crtc; | 1997 | crtc = connector->state->crtc; |
| 1994 | 1998 | ||
| 1995 | if (!crtc) | 1999 | if (!crtc) |
| 1996 | return; | 2000 | return 0; |
| 1997 | 2001 | ||
| 1998 | /* FIXME: ->dpms has no return value so can't forward the -ENOMEM. */ | ||
| 1999 | state = drm_atomic_state_alloc(connector->dev); | 2002 | state = drm_atomic_state_alloc(connector->dev); |
| 2000 | if (!state) | 2003 | if (!state) |
| 2001 | return; | 2004 | return -ENOMEM; |
| 2002 | 2005 | ||
| 2003 | state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); | 2006 | state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); |
| 2004 | retry: | 2007 | retry: |
| 2005 | crtc_state = drm_atomic_get_crtc_state(state, crtc); | 2008 | crtc_state = drm_atomic_get_crtc_state(state, crtc); |
| 2006 | if (IS_ERR(crtc_state)) | 2009 | if (IS_ERR(crtc_state)) { |
| 2007 | return; | 2010 | ret = PTR_ERR(crtc_state); |
| 2011 | goto fail; | ||
| 2012 | } | ||
| 2008 | 2013 | ||
| 2009 | WARN_ON(!drm_modeset_is_locked(&config->connection_mutex)); | 2014 | WARN_ON(!drm_modeset_is_locked(&config->connection_mutex)); |
| 2010 | 2015 | ||
| @@ -2023,17 +2028,16 @@ retry: | |||
| 2023 | if (ret != 0) | 2028 | if (ret != 0) |
| 2024 | goto fail; | 2029 | goto fail; |
| 2025 | 2030 | ||
| 2026 | /* Driver takes ownership of state on successful async commit. */ | 2031 | /* Driver takes ownership of state on successful commit. */ |
| 2027 | return; | 2032 | return 0; |
| 2028 | fail: | 2033 | fail: |
| 2029 | if (ret == -EDEADLK) | 2034 | if (ret == -EDEADLK) |
| 2030 | goto backoff; | 2035 | goto backoff; |
| 2031 | 2036 | ||
| 2037 | connector->dpms = old_mode; | ||
| 2032 | drm_atomic_state_free(state); | 2038 | drm_atomic_state_free(state); |
| 2033 | 2039 | ||
| 2034 | WARN(1, "Driver bug: Changing ->active failed with ret=%i\n", ret); | 2040 | return ret; |
| 2035 | |||
| 2036 | return; | ||
| 2037 | backoff: | 2041 | backoff: |
| 2038 | drm_atomic_state_clear(state); | 2042 | drm_atomic_state_clear(state); |
| 2039 | drm_atomic_legacy_backoff(state); | 2043 | drm_atomic_legacy_backoff(state); |
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 1f0da41ae2a1..dfac394d0602 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
| @@ -4753,9 +4753,9 @@ static int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj, | |||
| 4753 | 4753 | ||
| 4754 | /* Do DPMS ourselves */ | 4754 | /* Do DPMS ourselves */ |
| 4755 | if (property == connector->dev->mode_config.dpms_property) { | 4755 | if (property == connector->dev->mode_config.dpms_property) { |
| 4756 | if (connector->funcs->dpms) | ||
| 4757 | (*connector->funcs->dpms)(connector, (int)value); | ||
| 4758 | ret = 0; | 4756 | ret = 0; |
| 4757 | if (connector->funcs->dpms) | ||
| 4758 | ret = (*connector->funcs->dpms)(connector, (int)value); | ||
| 4759 | } else if (connector->funcs->set_property) | 4759 | } else if (connector->funcs->set_property) |
| 4760 | ret = connector->funcs->set_property(connector, property, value); | 4760 | ret = connector->funcs->set_property(connector, property, value); |
| 4761 | 4761 | ||
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index d3d038f05bf7..ef534758a02c 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
| @@ -762,15 +762,18 @@ static int drm_helper_choose_crtc_dpms(struct drm_crtc *crtc) | |||
| 762 | * implementing the DPMS connector attribute. It computes the new desired DPMS | 762 | * implementing the DPMS connector attribute. It computes the new desired DPMS |
| 763 | * state for all encoders and crtcs in the output mesh and calls the ->dpms() | 763 | * state for all encoders and crtcs in the output mesh and calls the ->dpms() |
| 764 | * callback provided by the driver appropriately. | 764 | * callback provided by the driver appropriately. |
| 765 | * | ||
| 766 | * Returns: | ||
| 767 | * Always returns 0. | ||
| 765 | */ | 768 | */ |
| 766 | void drm_helper_connector_dpms(struct drm_connector *connector, int mode) | 769 | int drm_helper_connector_dpms(struct drm_connector *connector, int mode) |
| 767 | { | 770 | { |
| 768 | struct drm_encoder *encoder = connector->encoder; | 771 | struct drm_encoder *encoder = connector->encoder; |
| 769 | struct drm_crtc *crtc = encoder ? encoder->crtc : NULL; | 772 | struct drm_crtc *crtc = encoder ? encoder->crtc : NULL; |
| 770 | int old_dpms, encoder_dpms = DRM_MODE_DPMS_OFF; | 773 | int old_dpms, encoder_dpms = DRM_MODE_DPMS_OFF; |
| 771 | 774 | ||
| 772 | if (mode == connector->dpms) | 775 | if (mode == connector->dpms) |
| 773 | return; | 776 | return 0; |
| 774 | 777 | ||
| 775 | old_dpms = connector->dpms; | 778 | old_dpms = connector->dpms; |
| 776 | connector->dpms = mode; | 779 | connector->dpms = mode; |
| @@ -802,7 +805,7 @@ void drm_helper_connector_dpms(struct drm_connector *connector, int mode) | |||
| 802 | } | 805 | } |
| 803 | } | 806 | } |
| 804 | 807 | ||
| 805 | return; | 808 | return 0; |
| 806 | } | 809 | } |
| 807 | EXPORT_SYMBOL(drm_helper_connector_dpms); | 810 | EXPORT_SYMBOL(drm_helper_connector_dpms); |
| 808 | 811 | ||
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index 521af2c069cb..5d78c1feec81 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
| @@ -237,7 +237,7 @@ static void intel_enable_crt(struct intel_encoder *encoder) | |||
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | /* Special dpms function to support cloning between dvo/sdvo/crt. */ | 239 | /* Special dpms function to support cloning between dvo/sdvo/crt. */ |
| 240 | static void intel_crt_dpms(struct drm_connector *connector, int mode) | 240 | static int intel_crt_dpms(struct drm_connector *connector, int mode) |
| 241 | { | 241 | { |
| 242 | struct drm_device *dev = connector->dev; | 242 | struct drm_device *dev = connector->dev; |
| 243 | struct intel_encoder *encoder = intel_attached_encoder(connector); | 243 | struct intel_encoder *encoder = intel_attached_encoder(connector); |
| @@ -249,7 +249,7 @@ static void intel_crt_dpms(struct drm_connector *connector, int mode) | |||
| 249 | mode = DRM_MODE_DPMS_OFF; | 249 | mode = DRM_MODE_DPMS_OFF; |
| 250 | 250 | ||
| 251 | if (mode == connector->dpms) | 251 | if (mode == connector->dpms) |
| 252 | return; | 252 | return 0; |
| 253 | 253 | ||
| 254 | old_dpms = connector->dpms; | 254 | old_dpms = connector->dpms; |
| 255 | connector->dpms = mode; | 255 | connector->dpms = mode; |
| @@ -258,7 +258,7 @@ static void intel_crt_dpms(struct drm_connector *connector, int mode) | |||
| 258 | crtc = encoder->base.crtc; | 258 | crtc = encoder->base.crtc; |
| 259 | if (!crtc) { | 259 | if (!crtc) { |
| 260 | encoder->connectors_active = false; | 260 | encoder->connectors_active = false; |
| 261 | return; | 261 | return 0; |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | /* We need the pipe to run for anything but OFF. */ | 264 | /* We need the pipe to run for anything but OFF. */ |
| @@ -281,6 +281,8 @@ static void intel_crt_dpms(struct drm_connector *connector, int mode) | |||
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | intel_modeset_check_state(connector->dev); | 283 | intel_modeset_check_state(connector->dev); |
| 284 | |||
| 285 | return 0; | ||
| 284 | } | 286 | } |
| 285 | 287 | ||
| 286 | static enum drm_mode_status | 288 | static enum drm_mode_status |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 40c73da2abcf..13a6608be689 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -6429,14 +6429,14 @@ struct intel_connector *intel_connector_alloc(void) | |||
| 6429 | 6429 | ||
| 6430 | /* Even simpler default implementation, if there's really no special case to | 6430 | /* Even simpler default implementation, if there's really no special case to |
| 6431 | * consider. */ | 6431 | * consider. */ |
| 6432 | void intel_connector_dpms(struct drm_connector *connector, int mode) | 6432 | int intel_connector_dpms(struct drm_connector *connector, int mode) |
| 6433 | { | 6433 | { |
| 6434 | /* All the simple cases only support two dpms states. */ | 6434 | /* All the simple cases only support two dpms states. */ |
| 6435 | if (mode != DRM_MODE_DPMS_ON) | 6435 | if (mode != DRM_MODE_DPMS_ON) |
| 6436 | mode = DRM_MODE_DPMS_OFF; | 6436 | mode = DRM_MODE_DPMS_OFF; |
| 6437 | 6437 | ||
| 6438 | if (mode == connector->dpms) | 6438 | if (mode == connector->dpms) |
| 6439 | return; | 6439 | return 0; |
| 6440 | 6440 | ||
| 6441 | connector->dpms = mode; | 6441 | connector->dpms = mode; |
| 6442 | 6442 | ||
| @@ -6445,6 +6445,8 @@ void intel_connector_dpms(struct drm_connector *connector, int mode) | |||
| 6445 | intel_encoder_dpms(to_intel_encoder(connector->encoder), mode); | 6445 | intel_encoder_dpms(to_intel_encoder(connector->encoder), mode); |
| 6446 | 6446 | ||
| 6447 | intel_modeset_check_state(connector->dev); | 6447 | intel_modeset_check_state(connector->dev); |
| 6448 | |||
| 6449 | return 0; | ||
| 6448 | } | 6450 | } |
| 6449 | 6451 | ||
| 6450 | /* Simple connector->get_hw_state implementation for encoders that support only | 6452 | /* Simple connector->get_hw_state implementation for encoders that support only |
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 47cef0e6c79c..320c9e6bd848 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
| @@ -997,7 +997,7 @@ void intel_crtc_update_dpms(struct drm_crtc *crtc); | |||
| 997 | void intel_encoder_destroy(struct drm_encoder *encoder); | 997 | void intel_encoder_destroy(struct drm_encoder *encoder); |
| 998 | int intel_connector_init(struct intel_connector *); | 998 | int intel_connector_init(struct intel_connector *); |
| 999 | struct intel_connector *intel_connector_alloc(void); | 999 | struct intel_connector *intel_connector_alloc(void); |
| 1000 | void intel_connector_dpms(struct drm_connector *, int mode); | 1000 | int intel_connector_dpms(struct drm_connector *, int mode); |
| 1001 | bool intel_connector_get_hw_state(struct intel_connector *connector); | 1001 | bool intel_connector_get_hw_state(struct intel_connector *connector); |
| 1002 | void intel_modeset_check_state(struct drm_device *dev); | 1002 | void intel_modeset_check_state(struct drm_device *dev); |
| 1003 | bool ibx_digital_port_connected(struct drm_i915_private *dev_priv, | 1003 | bool ibx_digital_port_connected(struct drm_i915_private *dev_priv, |
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index ece5bd754f85..fd5e522abebb 100644 --- a/drivers/gpu/drm/i915/intel_dvo.c +++ b/drivers/gpu/drm/i915/intel_dvo.c | |||
| @@ -197,7 +197,7 @@ static void intel_enable_dvo(struct intel_encoder *encoder) | |||
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | /* Special dpms function to support cloning between dvo/sdvo/crt. */ | 199 | /* Special dpms function to support cloning between dvo/sdvo/crt. */ |
| 200 | static void intel_dvo_dpms(struct drm_connector *connector, int mode) | 200 | static int intel_dvo_dpms(struct drm_connector *connector, int mode) |
| 201 | { | 201 | { |
| 202 | struct intel_dvo *intel_dvo = intel_attached_dvo(connector); | 202 | struct intel_dvo *intel_dvo = intel_attached_dvo(connector); |
| 203 | struct drm_crtc *crtc; | 203 | struct drm_crtc *crtc; |
| @@ -208,7 +208,7 @@ static void intel_dvo_dpms(struct drm_connector *connector, int mode) | |||
| 208 | mode = DRM_MODE_DPMS_OFF; | 208 | mode = DRM_MODE_DPMS_OFF; |
| 209 | 209 | ||
| 210 | if (mode == connector->dpms) | 210 | if (mode == connector->dpms) |
| 211 | return; | 211 | return 0; |
| 212 | 212 | ||
| 213 | connector->dpms = mode; | 213 | connector->dpms = mode; |
| 214 | 214 | ||
| @@ -216,7 +216,7 @@ static void intel_dvo_dpms(struct drm_connector *connector, int mode) | |||
| 216 | crtc = intel_dvo->base.base.crtc; | 216 | crtc = intel_dvo->base.base.crtc; |
| 217 | if (!crtc) { | 217 | if (!crtc) { |
| 218 | intel_dvo->base.connectors_active = false; | 218 | intel_dvo->base.connectors_active = false; |
| 219 | return; | 219 | return 0; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | /* We call connector dpms manually below in case pipe dpms doesn't | 222 | /* We call connector dpms manually below in case pipe dpms doesn't |
| @@ -238,6 +238,8 @@ static void intel_dvo_dpms(struct drm_connector *connector, int mode) | |||
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | intel_modeset_check_state(connector->dev); | 240 | intel_modeset_check_state(connector->dev); |
| 241 | |||
| 242 | return 0; | ||
| 241 | } | 243 | } |
| 242 | 244 | ||
| 243 | static enum drm_mode_status | 245 | static enum drm_mode_status |
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index aa2fd751609c..2c435a79d4da 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
| @@ -1509,7 +1509,7 @@ static void intel_enable_sdvo(struct intel_encoder *encoder) | |||
| 1509 | } | 1509 | } |
| 1510 | 1510 | ||
| 1511 | /* Special dpms function to support cloning between dvo/sdvo/crt. */ | 1511 | /* Special dpms function to support cloning between dvo/sdvo/crt. */ |
| 1512 | static void intel_sdvo_dpms(struct drm_connector *connector, int mode) | 1512 | static int intel_sdvo_dpms(struct drm_connector *connector, int mode) |
| 1513 | { | 1513 | { |
| 1514 | struct drm_crtc *crtc; | 1514 | struct drm_crtc *crtc; |
| 1515 | struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector); | 1515 | struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector); |
| @@ -1519,7 +1519,7 @@ static void intel_sdvo_dpms(struct drm_connector *connector, int mode) | |||
| 1519 | mode = DRM_MODE_DPMS_OFF; | 1519 | mode = DRM_MODE_DPMS_OFF; |
| 1520 | 1520 | ||
| 1521 | if (mode == connector->dpms) | 1521 | if (mode == connector->dpms) |
| 1522 | return; | 1522 | return 0; |
| 1523 | 1523 | ||
| 1524 | connector->dpms = mode; | 1524 | connector->dpms = mode; |
| 1525 | 1525 | ||
| @@ -1527,7 +1527,7 @@ static void intel_sdvo_dpms(struct drm_connector *connector, int mode) | |||
| 1527 | crtc = intel_sdvo->base.base.crtc; | 1527 | crtc = intel_sdvo->base.base.crtc; |
| 1528 | if (!crtc) { | 1528 | if (!crtc) { |
| 1529 | intel_sdvo->base.connectors_active = false; | 1529 | intel_sdvo->base.connectors_active = false; |
| 1530 | return; | 1530 | return 0; |
| 1531 | } | 1531 | } |
| 1532 | 1532 | ||
| 1533 | /* We set active outputs manually below in case pipe dpms doesn't change | 1533 | /* We set active outputs manually below in case pipe dpms doesn't change |
| @@ -1551,6 +1551,8 @@ static void intel_sdvo_dpms(struct drm_connector *connector, int mode) | |||
| 1551 | } | 1551 | } |
| 1552 | 1552 | ||
| 1553 | intel_modeset_check_state(connector->dev); | 1553 | intel_modeset_check_state(connector->dev); |
| 1554 | |||
| 1555 | return 0; | ||
| 1554 | } | 1556 | } |
| 1555 | 1557 | ||
| 1556 | static enum drm_mode_status | 1558 | static enum drm_mode_status |
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 3162040bc314..1f26eba245d1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
| @@ -919,7 +919,7 @@ nouveau_connector_funcs_lvds = { | |||
| 919 | .force = nouveau_connector_force | 919 | .force = nouveau_connector_force |
| 920 | }; | 920 | }; |
| 921 | 921 | ||
| 922 | static void | 922 | static int |
| 923 | nouveau_connector_dp_dpms(struct drm_connector *connector, int mode) | 923 | nouveau_connector_dp_dpms(struct drm_connector *connector, int mode) |
| 924 | { | 924 | { |
| 925 | struct nouveau_encoder *nv_encoder = NULL; | 925 | struct nouveau_encoder *nv_encoder = NULL; |
| @@ -938,7 +938,7 @@ nouveau_connector_dp_dpms(struct drm_connector *connector, int mode) | |||
| 938 | } | 938 | } |
| 939 | } | 939 | } |
| 940 | 940 | ||
| 941 | drm_helper_connector_dpms(connector, mode); | 941 | return drm_helper_connector_dpms(connector, mode); |
| 942 | } | 942 | } |
| 943 | 943 | ||
| 944 | static const struct drm_connector_funcs | 944 | static const struct drm_connector_funcs |
diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c index e4fc8f3bf58b..5e09c061847f 100644 --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c | |||
| @@ -246,9 +246,10 @@ radeon_dp_mst_connector_destroy(struct drm_connector *connector) | |||
| 246 | kfree(radeon_connector); | 246 | kfree(radeon_connector); |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | static void radeon_connector_dpms(struct drm_connector *connector, int mode) | 249 | static int radeon_connector_dpms(struct drm_connector *connector, int mode) |
| 250 | { | 250 | { |
| 251 | DRM_DEBUG_KMS("\n"); | 251 | DRM_DEBUG_KMS("\n"); |
| 252 | return 0; | ||
| 252 | } | 253 | } |
| 253 | 254 | ||
| 254 | static const struct drm_connector_funcs radeon_dp_mst_connector_funcs = { | 255 | static const struct drm_connector_funcs radeon_dp_mst_connector_funcs = { |
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index ed970f622903..dc97c0b3681d 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c | |||
| @@ -726,8 +726,9 @@ static void tegra_dsi_soft_reset(struct tegra_dsi *dsi) | |||
| 726 | tegra_dsi_soft_reset(dsi->slave); | 726 | tegra_dsi_soft_reset(dsi->slave); |
| 727 | } | 727 | } |
| 728 | 728 | ||
| 729 | static void tegra_dsi_connector_dpms(struct drm_connector *connector, int mode) | 729 | static int tegra_dsi_connector_dpms(struct drm_connector *connector, int mode) |
| 730 | { | 730 | { |
| 731 | return 0; | ||
| 731 | } | 732 | } |
| 732 | 733 | ||
| 733 | static void tegra_dsi_connector_reset(struct drm_connector *connector) | 734 | static void tegra_dsi_connector_reset(struct drm_connector *connector) |
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 06ab1783bba1..fe4008a7ddba 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c | |||
| @@ -772,9 +772,10 @@ static bool tegra_output_is_hdmi(struct tegra_output *output) | |||
| 772 | return drm_detect_hdmi_monitor(edid); | 772 | return drm_detect_hdmi_monitor(edid); |
| 773 | } | 773 | } |
| 774 | 774 | ||
| 775 | static void tegra_hdmi_connector_dpms(struct drm_connector *connector, | 775 | static int tegra_hdmi_connector_dpms(struct drm_connector *connector, |
| 776 | int mode) | 776 | int mode) |
| 777 | { | 777 | { |
| 778 | return 0; | ||
| 778 | } | 779 | } |
| 779 | 780 | ||
| 780 | static const struct drm_connector_funcs tegra_hdmi_connector_funcs = { | 781 | static const struct drm_connector_funcs tegra_hdmi_connector_funcs = { |
diff --git a/drivers/gpu/drm/tegra/rgb.c b/drivers/gpu/drm/tegra/rgb.c index 7cd833f5b5b5..9a99d213e1b1 100644 --- a/drivers/gpu/drm/tegra/rgb.c +++ b/drivers/gpu/drm/tegra/rgb.c | |||
| @@ -88,9 +88,10 @@ static void tegra_dc_write_regs(struct tegra_dc *dc, | |||
| 88 | tegra_dc_writel(dc, table[i].value, table[i].offset); | 88 | tegra_dc_writel(dc, table[i].value, table[i].offset); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | static void tegra_rgb_connector_dpms(struct drm_connector *connector, | 91 | static int tegra_rgb_connector_dpms(struct drm_connector *connector, |
| 92 | int mode) | 92 | int mode) |
| 93 | { | 93 | { |
| 94 | return 0; | ||
| 94 | } | 95 | } |
| 95 | 96 | ||
| 96 | static const struct drm_connector_funcs tegra_rgb_connector_funcs = { | 97 | static const struct drm_connector_funcs tegra_rgb_connector_funcs = { |
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 7591d8901f9a..ee8ad0d4a0f2 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c | |||
| @@ -866,8 +866,9 @@ static void tegra_sor_debugfs_exit(struct tegra_sor *sor) | |||
| 866 | sor->debugfs_files = NULL; | 866 | sor->debugfs_files = NULL; |
| 867 | } | 867 | } |
| 868 | 868 | ||
| 869 | static void tegra_sor_connector_dpms(struct drm_connector *connector, int mode) | 869 | static int tegra_sor_connector_dpms(struct drm_connector *connector, int mode) |
| 870 | { | 870 | { |
| 871 | return 0; | ||
| 871 | } | 872 | } |
| 872 | 873 | ||
| 873 | static enum drm_connector_status | 874 | static enum drm_connector_status |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 07cda8cbbddb..2adc11bc0920 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
| @@ -1808,8 +1808,9 @@ void vmw_du_crtc_gamma_set(struct drm_crtc *crtc, | |||
| 1808 | } | 1808 | } |
| 1809 | } | 1809 | } |
| 1810 | 1810 | ||
| 1811 | void vmw_du_connector_dpms(struct drm_connector *connector, int mode) | 1811 | int vmw_du_connector_dpms(struct drm_connector *connector, int mode) |
| 1812 | { | 1812 | { |
| 1813 | return 0; | ||
| 1813 | } | 1814 | } |
| 1814 | 1815 | ||
| 1815 | void vmw_du_connector_save(struct drm_connector *connector) | 1816 | void vmw_du_connector_save(struct drm_connector *connector) |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h index 8d038c36bd57..f1a324cfb4c3 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | |||
| @@ -133,7 +133,7 @@ void vmw_du_crtc_gamma_set(struct drm_crtc *crtc, | |||
| 133 | int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, | 133 | int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, |
| 134 | uint32_t handle, uint32_t width, uint32_t height); | 134 | uint32_t handle, uint32_t width, uint32_t height); |
| 135 | int vmw_du_crtc_cursor_move(struct drm_crtc *crtc, int x, int y); | 135 | int vmw_du_crtc_cursor_move(struct drm_crtc *crtc, int x, int y); |
| 136 | void vmw_du_connector_dpms(struct drm_connector *connector, int mode); | 136 | int vmw_du_connector_dpms(struct drm_connector *connector, int mode); |
| 137 | void vmw_du_connector_save(struct drm_connector *connector); | 137 | void vmw_du_connector_save(struct drm_connector *connector); |
| 138 | void vmw_du_connector_restore(struct drm_connector *connector); | 138 | void vmw_du_connector_restore(struct drm_connector *connector); |
| 139 | enum drm_connector_status | 139 | enum drm_connector_status |
diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h index cc1fee8a12d0..11266d147a29 100644 --- a/include/drm/drm_atomic_helper.h +++ b/include/drm/drm_atomic_helper.h | |||
| @@ -87,8 +87,8 @@ int drm_atomic_helper_page_flip(struct drm_crtc *crtc, | |||
| 87 | struct drm_framebuffer *fb, | 87 | struct drm_framebuffer *fb, |
| 88 | struct drm_pending_vblank_event *event, | 88 | struct drm_pending_vblank_event *event, |
| 89 | uint32_t flags); | 89 | uint32_t flags); |
| 90 | void drm_atomic_helper_connector_dpms(struct drm_connector *connector, | 90 | int drm_atomic_helper_connector_dpms(struct drm_connector *connector, |
| 91 | int mode); | 91 | int mode); |
| 92 | 92 | ||
| 93 | /* default implementations for state handling */ | 93 | /* default implementations for state handling */ |
| 94 | void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc); | 94 | void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc); |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 90a0ff70384a..574656965126 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -527,7 +527,7 @@ struct drm_connector_state { | |||
| 527 | * etc. | 527 | * etc. |
| 528 | */ | 528 | */ |
| 529 | struct drm_connector_funcs { | 529 | struct drm_connector_funcs { |
| 530 | void (*dpms)(struct drm_connector *connector, int mode); | 530 | int (*dpms)(struct drm_connector *connector, int mode); |
| 531 | void (*save)(struct drm_connector *connector); | 531 | void (*save)(struct drm_connector *connector); |
| 532 | void (*restore)(struct drm_connector *connector); | 532 | void (*restore)(struct drm_connector *connector); |
| 533 | void (*reset)(struct drm_connector *connector); | 533 | void (*reset)(struct drm_connector *connector); |
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index 01cafcbe7deb..800e0d1cf32c 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h | |||
| @@ -189,7 +189,7 @@ extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, | |||
| 189 | extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc); | 189 | extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc); |
| 190 | extern bool drm_helper_encoder_in_use(struct drm_encoder *encoder); | 190 | extern bool drm_helper_encoder_in_use(struct drm_encoder *encoder); |
| 191 | 191 | ||
| 192 | extern void drm_helper_connector_dpms(struct drm_connector *connector, int mode); | 192 | extern int drm_helper_connector_dpms(struct drm_connector *connector, int mode); |
| 193 | 193 | ||
| 194 | extern void drm_helper_move_panel_connectors_to_head(struct drm_device *); | 194 | extern void drm_helper_move_panel_connectors_to_head(struct drm_device *); |
| 195 | 195 | ||
