|
@@ -2953,61 +2953,6 @@ out:
|
|
|
}
|
|
|
EXPORT_SYMBOL(drm_atomic_helper_resume);
|
|
|
|
|
|
-/**
|
|
|
- * drm_atomic_helper_connector_set_property - helper for connector properties
|
|
|
- * @connector: DRM connector
|
|
|
- * @property: DRM property
|
|
|
- * @val: value of property
|
|
|
- *
|
|
|
- * Provides a default connector set_property handler using the atomic driver
|
|
|
- * interface.
|
|
|
- *
|
|
|
- * RETURNS:
|
|
|
- * Zero on success, error code on failure
|
|
|
- */
|
|
|
-int
|
|
|
-drm_atomic_helper_connector_set_property(struct drm_connector *connector,
|
|
|
- struct drm_property *property,
|
|
|
- uint64_t val)
|
|
|
-{
|
|
|
- struct drm_atomic_state *state;
|
|
|
- struct drm_connector_state *connector_state;
|
|
|
- int ret = 0;
|
|
|
-
|
|
|
- state = drm_atomic_state_alloc(connector->dev);
|
|
|
- if (!state)
|
|
|
- return -ENOMEM;
|
|
|
-
|
|
|
- /* ->set_property is always called with all locks held. */
|
|
|
- state->acquire_ctx = connector->dev->mode_config.acquire_ctx;
|
|
|
-retry:
|
|
|
- connector_state = drm_atomic_get_connector_state(state, connector);
|
|
|
- if (IS_ERR(connector_state)) {
|
|
|
- ret = PTR_ERR(connector_state);
|
|
|
- goto fail;
|
|
|
- }
|
|
|
-
|
|
|
- ret = drm_atomic_connector_set_property(connector, connector_state,
|
|
|
- property, val);
|
|
|
- if (ret)
|
|
|
- goto fail;
|
|
|
-
|
|
|
- ret = drm_atomic_commit(state);
|
|
|
-fail:
|
|
|
- if (ret == -EDEADLK)
|
|
|
- goto backoff;
|
|
|
-
|
|
|
- drm_atomic_state_put(state);
|
|
|
- return ret;
|
|
|
-
|
|
|
-backoff:
|
|
|
- drm_atomic_state_clear(state);
|
|
|
- drm_atomic_legacy_backoff(state);
|
|
|
-
|
|
|
- goto retry;
|
|
|
-}
|
|
|
-EXPORT_SYMBOL(drm_atomic_helper_connector_set_property);
|
|
|
-
|
|
|
static int page_flip_common(struct drm_atomic_state *state,
|
|
|
struct drm_crtc *crtc,
|
|
|
struct drm_framebuffer *fb,
|