aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaneen Mohammed <hamohammed.sa@gmail.com>2017-09-20 14:57:16 -0400
committerSean Paul <seanpaul@chromium.org>2017-10-16 15:02:44 -0400
commita52ff2a509a77aacdcc464f26181e77d49880da9 (patch)
tree1d6051260b86b66abd680cd12957c5f64dabd112
parent4c3cf375bc4042eb8682cc6f4314efe66990421a (diff)
drm/armada: Replace drm_framebuffer_reference/unreference() with _get/put()
This patch replace instances of drm_framebuffer_reference/unreference with *_get/put() suffixes, because get/put is shorter and consistent with the kernel use of *_get/put suffixes. This was done with the following Coccinelle script: @r1@ expression e; @@ ( -drm_framebuffer_reference(e); +drm_framebuffer_get(e); | -drm_framebuffer_unreference(e); +drm_framebuffer_put(e); ) Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/e1df1b3375faa819029559b11c32e10501c5c5d6.1505932812.git.hamohammed.sa@gmail.com
-rw-r--r--drivers/gpu/drm/armada/armada_crtc.c14
-rw-r--r--drivers/gpu/drm/armada/armada_drv.c2
-rw-r--r--drivers/gpu/drm/armada/armada_overlay.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
index 381dfa104cbb..2e065facdce7 100644
--- a/drivers/gpu/drm/armada/armada_crtc.c
+++ b/drivers/gpu/drm/armada/armada_crtc.c
@@ -298,7 +298,7 @@ static void armada_drm_crtc_finish_fb(struct armada_crtc *dcrtc,
298 298
299 if (force) { 299 if (force) {
300 /* Display is disabled, so just drop the old fb */ 300 /* Display is disabled, so just drop the old fb */
301 drm_framebuffer_unreference(fb); 301 drm_framebuffer_put(fb);
302 return; 302 return;
303 } 303 }
304 304
@@ -321,7 +321,7 @@ static void armada_drm_crtc_finish_fb(struct armada_crtc *dcrtc,
321 * the best. The worst that will happen is the buffer gets 321 * the best. The worst that will happen is the buffer gets
322 * reused before it has finished being displayed. 322 * reused before it has finished being displayed.
323 */ 323 */
324 drm_framebuffer_unreference(fb); 324 drm_framebuffer_put(fb);
325} 325}
326 326
327static void armada_drm_vblank_off(struct armada_crtc *dcrtc) 327static void armada_drm_vblank_off(struct armada_crtc *dcrtc)
@@ -577,7 +577,7 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc,
577 unsigned i; 577 unsigned i;
578 bool interlaced; 578 bool interlaced;
579 579
580 drm_framebuffer_reference(crtc->primary->fb); 580 drm_framebuffer_get(crtc->primary->fb);
581 581
582 interlaced = !!(adj->flags & DRM_MODE_FLAG_INTERLACE); 582 interlaced = !!(adj->flags & DRM_MODE_FLAG_INTERLACE);
583 583
@@ -718,7 +718,7 @@ static int armada_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
718 MAX_SCHEDULE_TIMEOUT); 718 MAX_SCHEDULE_TIMEOUT);
719 719
720 /* Take a reference to the new fb as we're using it */ 720 /* Take a reference to the new fb as we're using it */
721 drm_framebuffer_reference(crtc->primary->fb); 721 drm_framebuffer_get(crtc->primary->fb);
722 722
723 /* Update the base in the CRTC */ 723 /* Update the base in the CRTC */
724 armada_drm_crtc_update_regs(dcrtc, regs); 724 armada_drm_crtc_update_regs(dcrtc, regs);
@@ -742,7 +742,7 @@ void armada_drm_crtc_plane_disable(struct armada_crtc *dcrtc,
742 * primary plane. 742 * primary plane.
743 */ 743 */
744 if (plane->fb) 744 if (plane->fb)
745 drm_framebuffer_unreference(plane->fb); 745 drm_framebuffer_put(plane->fb);
746 746
747 /* Power down the Y/U/V FIFOs */ 747 /* Power down the Y/U/V FIFOs */
748 sram_para1 = CFG_PDWN16x66 | CFG_PDWN32x66; 748 sram_para1 = CFG_PDWN16x66 | CFG_PDWN32x66;
@@ -1045,12 +1045,12 @@ static int armada_drm_crtc_page_flip(struct drm_crtc *crtc,
1045 * Ensure that we hold a reference on the new framebuffer. 1045 * Ensure that we hold a reference on the new framebuffer.
1046 * This has to match the behaviour in mode_set. 1046 * This has to match the behaviour in mode_set.
1047 */ 1047 */
1048 drm_framebuffer_reference(fb); 1048 drm_framebuffer_get(fb);
1049 1049
1050 ret = armada_drm_crtc_queue_frame_work(dcrtc, work); 1050 ret = armada_drm_crtc_queue_frame_work(dcrtc, work);
1051 if (ret) { 1051 if (ret) {
1052 /* Undo our reference above */ 1052 /* Undo our reference above */
1053 drm_framebuffer_unreference(fb); 1053 drm_framebuffer_put(fb);
1054 kfree(work); 1054 kfree(work);
1055 return ret; 1055 return ret;
1056 } 1056 }
diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
index 2d45103d06cb..e857b88a9799 100644
--- a/drivers/gpu/drm/armada/armada_drv.c
+++ b/drivers/gpu/drm/armada/armada_drv.c
@@ -25,7 +25,7 @@ static void armada_drm_unref_work(struct work_struct *work)
25 struct drm_framebuffer *fb; 25 struct drm_framebuffer *fb;
26 26
27 while (kfifo_get(&priv->fb_unref, &fb)) 27 while (kfifo_get(&priv->fb_unref, &fb))
28 drm_framebuffer_unreference(fb); 28 drm_framebuffer_put(fb);
29} 29}
30 30
31/* Must be called with dev->event_lock held */ 31/* Must be called with dev->event_lock held */
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c
index edc44910d79f..b411b608821a 100644
--- a/drivers/gpu/drm/armada/armada_overlay.c
+++ b/drivers/gpu/drm/armada/armada_overlay.c
@@ -177,7 +177,7 @@ armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
177 * Take a reference on the new framebuffer - we want to 177 * Take a reference on the new framebuffer - we want to
178 * hold on to it while the hardware is displaying it. 178 * hold on to it while the hardware is displaying it.
179 */ 179 */
180 drm_framebuffer_reference(fb); 180 drm_framebuffer_get(fb);
181 181
182 if (plane->fb) 182 if (plane->fb)
183 armada_ovl_retire_fb(dplane, plane->fb); 183 armada_ovl_retire_fb(dplane, plane->fb);
@@ -278,7 +278,7 @@ static int armada_ovl_plane_disable(struct drm_plane *plane,
278 278
279 fb = xchg(&dplane->old_fb, NULL); 279 fb = xchg(&dplane->old_fb, NULL);
280 if (fb) 280 if (fb)
281 drm_framebuffer_unreference(fb); 281 drm_framebuffer_put(fb);
282 282
283 return 0; 283 return 0;
284} 284}