aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_atomic.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-27 09:49:39 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-17 14:23:23 -0500
commit07cc0ef67fa873c8d21e0b626d57753bfd190095 (patch)
tree44beb89d906d8ad625b222f3b7ea4feb87666b67 /drivers/gpu/drm/drm_atomic.c
parentb4274fbee6fc7ca3dd1cc786456ec6fbc14f864d (diff)
drm/atomic: Introduce state->obj backpointers
Useful since this way we can pass around just the state objects and will get ther real object, too. Specifically this allows us to again simplify the parameters for set_crtc_for_plane. v2: msm already has it's own specific plane_reset hook, don't forget that one! v3: Fixup kerneldoc, reported by 0-day builder. Cc: Rob Clark <robdclark@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> (v2) Tested-by: Rob Clark <robdclark@gmail.com> (v2) Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r--drivers/gpu/drm/drm_atomic.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index ff5f034cc405..cbd5e7240b6b 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -344,8 +344,7 @@ EXPORT_SYMBOL(drm_atomic_get_connector_state);
344 344
345/** 345/**
346 * drm_atomic_set_crtc_for_plane - set crtc for plane 346 * drm_atomic_set_crtc_for_plane - set crtc for plane
347 * @state: the incoming atomic state 347 * @plane_state: the plane whose incoming state to update
348 * @plane: the plane whose incoming state to update
349 * @crtc: crtc to use for the plane 348 * @crtc: crtc to use for the plane
350 * 349 *
351 * Changing the assigned crtc for a plane requires us to grab the lock and state 350 * Changing the assigned crtc for a plane requires us to grab the lock and state
@@ -358,16 +357,12 @@ EXPORT_SYMBOL(drm_atomic_get_connector_state);
358 * sequence must be restarted. All other errors are fatal. 357 * sequence must be restarted. All other errors are fatal.
359 */ 358 */
360int 359int
361drm_atomic_set_crtc_for_plane(struct drm_atomic_state *state, 360drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state,
362 struct drm_plane *plane, struct drm_crtc *crtc) 361 struct drm_crtc *crtc)
363{ 362{
364 struct drm_plane_state *plane_state = 363 struct drm_plane *plane = plane_state->plane;
365 drm_atomic_get_plane_state(state, plane);
366 struct drm_crtc_state *crtc_state; 364 struct drm_crtc_state *crtc_state;
367 365
368 if (WARN_ON(IS_ERR(plane_state)))
369 return PTR_ERR(plane_state);
370
371 if (plane_state->crtc) { 366 if (plane_state->crtc) {
372 crtc_state = drm_atomic_get_crtc_state(plane_state->state, 367 crtc_state = drm_atomic_get_crtc_state(plane_state->state,
373 plane_state->crtc); 368 plane_state->crtc);