From patchwork Mon Jun 18 13:20:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 10471367 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9A2F66020C for ; Mon, 18 Jun 2018 13:21:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B5AB28A0A for ; Mon, 18 Jun 2018 13:21:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73EA928A02; Mon, 18 Jun 2018 13:21:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C00FD28A02 for ; Mon, 18 Jun 2018 13:21:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 21C5B6E417; Mon, 18 Jun 2018 13:21:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id B75756E049 for ; Mon, 18 Jun 2018 13:21:05 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id j15-v6so15611820wme.0 for ; Mon, 18 Jun 2018 06:21:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=5Cw3wz4MnWHxEaWYetZvOrHIYvswUUNi3BZgGdyBEO0=; b=nYbhPRK/1q0exr+pu+gWfUyvtOeaCa67POm6pAbLFBTV2/sTeBBAbpa13CJc2wGHd6 /rFV024/rocQG65Twvs9ee12xM9G1y7ax7oviEWi1AMuyOE7PtyKNK/8G9Ld1Isp2go0 kjmfS4GQw5DCbP3MEMftzku2dz//lxltnt0d7mwlQQcscIU+x35hbI/Ra/2Ct/6HJlX5 6TtFXa3Fy/YVZGaR4pIX8MliHyOFKlGfb76mLc7/co6OtbNcqwPDmbaoZ+xOJJSf4wEd u73lSMW+VMC3uVWc+EOBTUtFzndSWqbWnqwYn5/RLq14MHW5MFwVZdKMBr1a4aITFoIg I8uA== X-Gm-Message-State: APt69E2DzN21I5ENMFozn2Z96K4INTfy+mwYTFIxDATAWOIVM0jG1yo5 fcnWnQxLWhWjAKIWe4aquYg= X-Google-Smtp-Source: ADUXVKIAqtTvr+26oaBBFGkpq16iU7TsQftApQ5sFBLCrM7goM0EMBXUxRnYU7XRA8gRRhdqPdvsow== X-Received: by 2002:a50:ec19:: with SMTP id g25-v6mr11128536edr.242.1529328064472; Mon, 18 Jun 2018 06:21:04 -0700 (PDT) Received: from localhost.localdomain (200116b82a328300a80ff4c3a5bdfeeb.dip.versatel-1u1.de. [2001:16b8:2a32:8300:a80f:f4c3:a5bd:feeb]) by smtp.gmail.com with ESMTPSA id d13-v6sm11291664edb.18.2018.06.18.06.21.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 06:21:03 -0700 (PDT) From: Thomas Zimmermann To: linux@armlinux.org.uk Subject: [PATCH 1/2] drm/armada: Replace drm_framebuffer_{un/reference} with put, get functions Date: Mon, 18 Jun 2018 15:20:59 +0200 Message-Id: <20180618132100.16863-2-tdz@users.sourceforge.net> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180618132100.16863-1-tdz@users.sourceforge.net> References: <20180618132100.16863-1-tdz@users.sourceforge.net> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch unifies the naming of DRM functions for reference counting of struct drm_framebuffer. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/armada/armada_crtc.c | 8 ++++---- drivers/gpu/drm/armada/armada_overlay.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c index 03eeee11dd5b..38724b554a54 100644 --- a/drivers/gpu/drm/armada/armada_crtc.c +++ b/drivers/gpu/drm/armada/armada_crtc.c @@ -1220,7 +1220,7 @@ static int armada_drm_primary_update(struct drm_plane *plane, * Take a reference on the new framebuffer - we want to * hold on to it while the hardware is displaying it. */ - drm_framebuffer_reference(fb); + drm_framebuffer_get(fb); work->old_fb = plane->fb; } else { @@ -1239,7 +1239,7 @@ static int armada_drm_primary_update(struct drm_plane *plane, if (!dplane->state.vsync_update) { work->fn(dcrtc, work); if (work->old_fb) - drm_framebuffer_unreference(work->old_fb); + drm_framebuffer_put(work->old_fb); return 0; } @@ -1248,7 +1248,7 @@ static int armada_drm_primary_update(struct drm_plane *plane, if (ret) { work->fn(dcrtc, work); if (work->old_fb) - drm_framebuffer_unreference(work->old_fb); + drm_framebuffer_put(work->old_fb); } dplane->next_work = !dplane->next_work; @@ -1308,7 +1308,7 @@ int armada_drm_plane_disable(struct drm_plane *plane, if (armada_drm_plane_work_queue(dcrtc, work)) { work->fn(dcrtc, work); if (work->old_fb) - drm_framebuffer_unreference(work->old_fb); + drm_framebuffer_put(work->old_fb); } dplane->next_work = !dplane->next_work; diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c index c391955009d6..bb2874d84d74 100644 --- a/drivers/gpu/drm/armada/armada_overlay.c +++ b/drivers/gpu/drm/armada/armada_overlay.c @@ -228,7 +228,7 @@ armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc, * Take a reference on the new framebuffer - we want to * hold on to it while the hardware is displaying it. */ - drm_framebuffer_reference(fb); + drm_framebuffer_get(fb); work->old_fb = plane->fb; } else {