diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2015-01-21 19:35:48 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-27 03:57:25 -0500 |
commit | c196e1d66c36b0731cffc39fe28922b17c2901d9 (patch) | |
tree | d8b995b22e2c307b1228f0b9837885a2e5c5af56 /drivers/gpu | |
parent | 1356837e55e273c9178c13f5fbddf086da285283 (diff) |
drm/i915: Switch plane properties to full atomic helper.
This will exercise our atomic pipeline for legacy property updates.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_atomic_plane.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 26 |
3 files changed, 11 insertions, 27 deletions
diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c index 4a3914f1cdee..9e6f727dfd19 100644 --- a/drivers/gpu/drm/i915/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c | |||
@@ -118,6 +118,15 @@ static int intel_plane_atomic_check(struct drm_plane *plane, | |||
118 | intel_crtc = to_intel_crtc(crtc); | 118 | intel_crtc = to_intel_crtc(crtc); |
119 | 119 | ||
120 | /* | 120 | /* |
121 | * Both crtc and plane->crtc could be NULL if we're updating a | ||
122 | * property while the plane is disabled. We don't actually have | ||
123 | * anything driver-specific we need to test in that case, so | ||
124 | * just return success. | ||
125 | */ | ||
126 | if (!crtc) | ||
127 | return 0; | ||
128 | |||
129 | /* | ||
121 | * The original src/dest coordinates are stored in state->base, but | 130 | * The original src/dest coordinates are stored in state->base, but |
122 | * we want to keep another copy internal to our driver that we can | 131 | * we want to keep another copy internal to our driver that we can |
123 | * clip/modify ourselves. | 132 | * clip/modify ourselves. |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 2dc6d64d9234..423ef959264d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <drm/i915_drm.h> | 37 | #include <drm/i915_drm.h> |
38 | #include "i915_drv.h" | 38 | #include "i915_drv.h" |
39 | #include "i915_trace.h" | 39 | #include "i915_trace.h" |
40 | #include <drm/drm_atomic_helper.h> | ||
40 | #include <drm/drm_dp_helper.h> | 41 | #include <drm/drm_dp_helper.h> |
41 | #include <drm/drm_crtc_helper.h> | 42 | #include <drm/drm_crtc_helper.h> |
42 | #include <drm/drm_plane_helper.h> | 43 | #include <drm/drm_plane_helper.h> |
@@ -12055,7 +12056,7 @@ const struct drm_plane_funcs intel_plane_funcs = { | |||
12055 | .update_plane = drm_plane_helper_update, | 12056 | .update_plane = drm_plane_helper_update, |
12056 | .disable_plane = drm_plane_helper_disable, | 12057 | .disable_plane = drm_plane_helper_disable, |
12057 | .destroy = intel_plane_destroy, | 12058 | .destroy = intel_plane_destroy, |
12058 | .set_property = intel_plane_set_property, | 12059 | .set_property = drm_atomic_helper_plane_set_property, |
12059 | .atomic_get_property = intel_plane_atomic_get_property, | 12060 | .atomic_get_property = intel_plane_atomic_get_property, |
12060 | .atomic_set_property = intel_plane_atomic_set_property, | 12061 | .atomic_set_property = intel_plane_atomic_set_property, |
12061 | .atomic_duplicate_state = intel_plane_duplicate_state, | 12062 | .atomic_duplicate_state = intel_plane_duplicate_state, |
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 50683d4b9bad..0a52c44ad03d 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c | |||
@@ -1362,32 +1362,6 @@ out_unlock: | |||
1362 | return ret; | 1362 | return ret; |
1363 | } | 1363 | } |
1364 | 1364 | ||
1365 | int intel_plane_set_property(struct drm_plane *plane, | ||
1366 | struct drm_property *prop, | ||
1367 | uint64_t val) | ||
1368 | { | ||
1369 | struct drm_device *dev = plane->dev; | ||
1370 | uint64_t old_val; | ||
1371 | int ret = -ENOENT; | ||
1372 | |||
1373 | if (prop == dev->mode_config.rotation_property) { | ||
1374 | /* exactly one rotation angle please */ | ||
1375 | if (hweight32(val & 0xf) != 1) | ||
1376 | return -EINVAL; | ||
1377 | |||
1378 | if (plane->state->rotation == val) | ||
1379 | return 0; | ||
1380 | |||
1381 | old_val = plane->state->rotation; | ||
1382 | plane->state->rotation = val; | ||
1383 | ret = intel_plane_restore(plane); | ||
1384 | if (ret) | ||
1385 | plane->state->rotation = old_val; | ||
1386 | } | ||
1387 | |||
1388 | return ret; | ||
1389 | } | ||
1390 | |||
1391 | int intel_plane_restore(struct drm_plane *plane) | 1365 | int intel_plane_restore(struct drm_plane *plane) |
1392 | { | 1366 | { |
1393 | if (!plane->crtc || !plane->fb) | 1367 | if (!plane->crtc || !plane->fb) |