diff options
author | Mark Brown <broonie@linaro.org> | 2014-04-29 13:01:28 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-29 13:01:28 -0400 |
commit | 3e93457b45a1a8c69227ce596ee2005fa06f20dd (patch) | |
tree | 248c27e432533b1af80a9b2240eaa8e48e3b87cc /drivers/gpu/drm/omapdrm/omap_plane.c | |
parent | 290414499cf94284a97cc3c33214d13ccfcd896a (diff) | |
parent | c42ba72ec3a7a1b6aa30122931f1f4b91b601c31 (diff) |
Merge tag 'ib-mfd-regulator-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into regulator-tps65090
Immutable branch between MFD and Regulator due for v3.16 merge-window.
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_plane.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_plane.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 046d5e660c04..3cf31ee59aac 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c | |||
@@ -225,6 +225,11 @@ int omap_plane_mode_set(struct drm_plane *plane, | |||
225 | omap_plane->apply_done_cb.arg = arg; | 225 | omap_plane->apply_done_cb.arg = arg; |
226 | } | 226 | } |
227 | 227 | ||
228 | if (plane->fb) | ||
229 | drm_framebuffer_unreference(plane->fb); | ||
230 | |||
231 | drm_framebuffer_reference(fb); | ||
232 | |||
228 | plane->fb = fb; | 233 | plane->fb = fb; |
229 | plane->crtc = crtc; | 234 | plane->crtc = crtc; |
230 | 235 | ||
@@ -241,10 +246,13 @@ static int omap_plane_update(struct drm_plane *plane, | |||
241 | struct omap_plane *omap_plane = to_omap_plane(plane); | 246 | struct omap_plane *omap_plane = to_omap_plane(plane); |
242 | omap_plane->enabled = true; | 247 | omap_plane->enabled = true; |
243 | 248 | ||
244 | if (plane->fb) | 249 | /* omap_plane_mode_set() takes adjusted src */ |
245 | drm_framebuffer_unreference(plane->fb); | 250 | switch (omap_plane->win.rotation & 0xf) { |
246 | 251 | case BIT(DRM_ROTATE_90): | |
247 | drm_framebuffer_reference(fb); | 252 | case BIT(DRM_ROTATE_270): |
253 | swap(src_w, src_h); | ||
254 | break; | ||
255 | } | ||
248 | 256 | ||
249 | return omap_plane_mode_set(plane, crtc, fb, | 257 | return omap_plane_mode_set(plane, crtc, fb, |
250 | crtc_x, crtc_y, crtc_w, crtc_h, | 258 | crtc_x, crtc_y, crtc_w, crtc_h, |