diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2014-11-10 11:47:30 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-11-14 04:29:13 -0500 |
commit | b8bbac1d01397ead65516f11adba1c7baf76a016 (patch) | |
tree | b18c93f929fc903a4a8917ec340104a8049b0a72 /drivers/gpu/drm/i915/intel_sprite.c | |
parent | 198c974d7e80a5135fc4a2e69a07ba3e64122f8a (diff) |
drm/i915: use the correct obj when preparing the sprite plane
Commit "drm/i915: create a prepare phase for sprite plane updates"
changed the old_obj pointer we use when committing sprite planes,
which caused a WARN() and a BUG() to be triggered. Later, commit
"drm/i915: use intel_fb_obj() macros to assign gem objects" introduced
the same problem to function intel_commit_sprite_plane().
Regression introduced by:
commit ec82cb793c9224e0692eed904f43490cf70e8258
Author: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Date: Fri Oct 24 14:51:32 2014 +0100
drm/i915: create a prepare phase for sprite plane updates
and:
commit 77cde95217484e845743818691df026cec2534f4
Author: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Date: Fri Oct 24 14:51:33 2014 +0100
drm/i915: use intel_fb_obj() macros to assign gem objects
Credits to Imre Deak for pointing out the exact lines that were wrong.
v2: Also fix intel_commit_sprite_plane() (Ville)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85634
Testcase: igt/pm_rpm/legacy-planes
Testcase: igt/pm_rpm/legacy-planes-dpms
Testcase: igt/pm_rpm/universal-planes
Testcase: igt/pm_rpm/universal-planes-dpms
Credits-to: Imre Deak <imre.deak@intel.com>
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 64076555153a..7d9c340f7693 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c | |||
@@ -1264,10 +1264,11 @@ intel_prepare_sprite_plane(struct drm_plane *plane, | |||
1264 | struct drm_device *dev = plane->dev; | 1264 | struct drm_device *dev = plane->dev; |
1265 | struct drm_crtc *crtc = state->crtc; | 1265 | struct drm_crtc *crtc = state->crtc; |
1266 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 1266 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
1267 | struct intel_plane *intel_plane = to_intel_plane(plane); | ||
1267 | enum pipe pipe = intel_crtc->pipe; | 1268 | enum pipe pipe = intel_crtc->pipe; |
1268 | struct drm_framebuffer *fb = state->fb; | 1269 | struct drm_framebuffer *fb = state->fb; |
1269 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); | 1270 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); |
1270 | struct drm_i915_gem_object *old_obj = intel_fb_obj(plane->fb); | 1271 | struct drm_i915_gem_object *old_obj = intel_plane->obj; |
1271 | int ret; | 1272 | int ret; |
1272 | 1273 | ||
1273 | if (old_obj != obj) { | 1274 | if (old_obj != obj) { |
@@ -1302,7 +1303,7 @@ intel_commit_sprite_plane(struct drm_plane *plane, | |||
1302 | enum pipe pipe = intel_crtc->pipe; | 1303 | enum pipe pipe = intel_crtc->pipe; |
1303 | struct drm_framebuffer *fb = state->fb; | 1304 | struct drm_framebuffer *fb = state->fb; |
1304 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); | 1305 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); |
1305 | struct drm_i915_gem_object *old_obj = intel_fb_obj(plane->fb); | 1306 | struct drm_i915_gem_object *old_obj = intel_plane->obj; |
1306 | int crtc_x, crtc_y; | 1307 | int crtc_x, crtc_y; |
1307 | unsigned int crtc_w, crtc_h; | 1308 | unsigned int crtc_w, crtc_h; |
1308 | uint32_t src_x, src_y, src_w, src_h; | 1309 | uint32_t src_x, src_y, src_w, src_h; |