From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Zimmermann Subject: Re: [PATCH 1/2] drm/armada: Replace drm_framebuffer_{un/reference} with put,get functions Date: Tue, 26 Jun 2018 17:37:53 +0200 Message-ID: <6eaf2308-de6f-e6b5-9ecf-6946a194cc46@users.sourceforge.net> References: <20180618132100.16863-1-tdz@users.sourceforge.net> <20180618132100.16863-2-tdz@users.sourceforge.net> <20180626150144.GJ17671@n2100.armlinux.org.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0966067885==" Return-path: 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 BF2A16E545 for ; Tue, 26 Jun 2018 15:38:04 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id p11-v6so2318165wmc.4 for ; Tue, 26 Jun 2018 08:38:04 -0700 (PDT) In-Reply-To: <20180626150144.GJ17671@n2100.armlinux.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Russell King - ARM Linux Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============0966067885== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G0mGymMfeocqi0dz4xdXMDEaXrJSqDD0h" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --G0mGymMfeocqi0dz4xdXMDEaXrJSqDD0h Content-Type: multipart/mixed; boundary="sDIr703Vubk6ym4JVfyhajhbcU595gVSL"; protected-headers="v1" From: Thomas Zimmermann To: Russell King - ARM Linux Cc: daniel@ffwll.ch, dri-devel@lists.freedesktop.org Message-ID: <6eaf2308-de6f-e6b5-9ecf-6946a194cc46@users.sourceforge.net> Subject: Re: [PATCH 1/2] drm/armada: Replace drm_framebuffer_{un/reference} with put,get functions References: <20180618132100.16863-1-tdz@users.sourceforge.net> <20180618132100.16863-2-tdz@users.sourceforge.net> <20180626150144.GJ17671@n2100.armlinux.org.uk> In-Reply-To: <20180626150144.GJ17671@n2100.armlinux.org.uk> --sDIr703Vubk6ym4JVfyhajhbcU595gVSL Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable Hi Am 26.06.2018 um 17:01 schrieb Russell King - ARM Linux: > This will conflict badly with patches to convert armada-drm to atomic > modeset. Is there any rush for this change? Not really. If you point me to the atomic-modeset changes, I'd send you a port of the patches. >=20 > On Mon, Jun 18, 2018 at 03:20:59PM +0200, Thomas Zimmermann wrote: >> 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/ar= mada/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); >> =20 >> work->old_fb =3D 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; >> } >> =20 >> @@ -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); >> } >> =20 >> dplane->next_work =3D !dplane->next_work; >> @@ -1308,7 +1308,7 @@ int armada_drm_plane_disable(struct drm_plane *p= lane, >> 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); >> } >> =20 >> dplane->next_work =3D !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, s= truct 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); >> =20 >> work->old_fb =3D plane->fb; >> } else { >> --=20 >> 2.14.4 >> >=20 --=20 Implement thread-safe and fault-tolerant software in C: visit picotm.org -- GnuPG: http://tdz.users.sourceforge.net/tdz.asc Fingerprint: 16FF F599 82F8 E5AA 18C6 5220 D9DA D7D4 4EF1 DF08 Website: tzimmermann.org --sDIr703Vubk6ym4JVfyhajhbcU595gVSL-- --G0mGymMfeocqi0dz4xdXMDEaXrJSqDD0h Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQW//WZgvjlqhjGUiDZ2tfUTvHfCAUCWzJd2AAKCRDZ2tfUTvHf CJoOAJ46VkPVm+O4eRDuu1DmZ25p2RJorwCfWNMFbXd4QTK637rIWBf5ClI49KA= =4v9b -----END PGP SIGNATURE----- --G0mGymMfeocqi0dz4xdXMDEaXrJSqDD0h-- --===============0966067885== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0966067885==--