From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAC9DC433E0 for ; Mon, 25 May 2020 12:42:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6E33206D5 for ; Mon, 25 May 2020 12:42:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6E33206D5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 357FD89AC9; Mon, 25 May 2020 12:42:01 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 83E1289AC9 for ; Mon, 25 May 2020 12:41:59 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7BFCEAD17; Mon, 25 May 2020 12:41:59 +0000 (UTC) Subject: Re: [PATCH 07/21] drm/hisilicon/kirin: Use GEM CMA object functions To: Emil Velikov References: <20200522135246.10134-1-tzimmermann@suse.de> <20200522135246.10134-8-tzimmermann@suse.de> From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= mQENBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAG0J1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPokBVAQTAQgAPhYh BHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMB Ah4BAheAAAoJEGgNwR1TC3ojR80H/jH+vYavwQ+TvO8ksXL9JQWc3IFSiGpuSVXLCdg62AmR irxW+qCwNncNQyb9rd30gzdectSkPWL3KSqEResBe24IbA5/jSkPweJasgXtfhuyoeCJ6PXo clQQGKIoFIAEv1s8l0ggPZswvCinegl1diyJXUXmdEJRTWYAtxn/atut1o6Giv6D2qmYbXN7 mneMC5MzlLaJKUtoH7U/IjVw1sx2qtxAZGKVm4RZxPnMCp9E1MAr5t4dP5gJCIiqsdrVqI6i KupZstMxstPU//azmz7ZWWxT0JzgJqZSvPYx/SATeexTYBP47YFyri4jnsty2ErS91E6H8os Bv6pnSn7eAq5AQ0EWznS4AEIAMYmP4M/V+T5RY5at/g7rUdNsLhWv1APYrh9RQefODYHrNRH UE9eosYbT6XMryR9hT8XlGOYRwKWwiQBoWSDiTMo/Xi29jUnn4BXfI2px2DTXwc22LKtLAgT RjP+qbU63Y0xnQN29UGDbYgyyK51DW3H0If2a3JNsheAAK+Xc9baj0LGIc8T9uiEWHBnCH+R dhgATnWWGKdDegUR5BkDfDg5O/FISymJBHx2Dyoklv5g4BzkgqTqwmaYzsl8UxZKvbaxq0zb ehDda8lvhFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r 12+lqdsAEQEAAYkBPAQYAQgAJhYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsMBQkD wmcAAAoJEGgNwR1TC3ojpfcIAInwP5OlcEKokTnHCiDTz4Ony4GnHRP2fXATQZCKxmu4AJY2 h9ifw9Nf2TjCZ6AMvC3thAN0rFDj55N9l4s1CpaDo4J+0fkrHuyNacnT206CeJV1E7NYntxU n+LSiRrOdywn6erjxRi9EYTVLCHcDhBEjKmFZfg4AM4GZMWX1lg0+eHbd5oL1as28WvvI/uI aMyV8RbyXot1r/8QLlWldU3NrTF5p7TMU2y3ZH2mf5suSKHAMtbE4jKJ8ZHFOo3GhLgjVrBW HE9JXO08xKkgD+w6v83+nomsEuf6C6LYrqY/tsZvyEX6zN8CtirPdPWu/VXNRYAl/lat7lSI 3H26qrE= Message-ID: Date: Mon, 25 May 2020 14:41:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, linux-aspeed@lists.ozlabs.org, Neil Armstrong , Dave Airlie , Liviu Dudau , ML dri-devel , nicolas.ferre@microchip.com, Paul Cercueil , Laurent Pinchart , Mihail Atanassov , Sam Ravnborg , =?UTF-8?Q?Marek_Va=c5=a1ut?= , khilman@baylibre.com, Alexey Brodkin , Xinwei Kong , Xinliang Liu , ludovic.desroches@microchip.com, Tomi Valkeinen , "james qian wang \(Arm Technology China\)" , NXP Linux Team , joel@jms.id.au, Alexandre Torgue , Chen Feng , Sascha Hauer , Alison Wang , Jyri Sarha , Chen-Yu Tsai , Vincent Abriou , LAKML , Maxime Coquelin , bbrezillon@kernel.org, andrew@aj.id.au, Philippe Cornu , Yannick Fertre , Kieran Bingham , Sascha Hauer , Rongrong Zou , Shawn Guo Content-Type: multipart/mixed; boundary="===============1256767290==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============1256767290== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wfm2x9SGhUN4Mvdvt7GUgmDbtTSXZIr0q" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wfm2x9SGhUN4Mvdvt7GUgmDbtTSXZIr0q Content-Type: multipart/mixed; boundary="UjtqkFMbXJVAAv0qq3332iJaBv8R2fCJM"; protected-headers="v1" From: Thomas Zimmermann To: Emil Velikov Cc: alexandre.belloni@bootlin.com, linux-aspeed@lists.ozlabs.org, Neil Armstrong , Dave Airlie , Liviu Dudau , Philippe Cornu , Paul Cercueil , Laurent Pinchart , Mihail Atanassov , Sam Ravnborg , Alexandre Torgue , =?UTF-8?Q?Marek_Va=c5=a1ut?= , Alexey Brodkin , ludovic.desroches@microchip.com, Xinliang Liu , Xinwei Kong , Tomi Valkeinen , "james qian wang (Arm Technology China)" , joel@jms.id.au, NXP Linux Team , Chen Feng , Sascha Hauer , Alison Wang , Jyri Sarha , Chen-Yu Tsai , Vincent Abriou , Sascha Hauer , LAKML , Maxime Coquelin , bbrezillon@kernel.org, andrew@aj.id.au, ML dri-devel , nicolas.ferre@microchip.com, Yannick Fertre , Kieran Bingham , khilman@baylibre.com, Rongrong Zou , Shawn Guo Message-ID: Subject: Re: [PATCH 07/21] drm/hisilicon/kirin: Use GEM CMA object functions References: <20200522135246.10134-1-tzimmermann@suse.de> <20200522135246.10134-8-tzimmermann@suse.de> In-Reply-To: --UjtqkFMbXJVAAv0qq3332iJaBv8R2fCJM Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Emil Am 22.05.20 um 20:11 schrieb Emil Velikov: > Hi Thomas, >=20 > On Fri, 22 May 2020 at 14:53, Thomas Zimmermann w= rote: >> >> The kirin driver uses the default implementation for CMA functions; ex= cept >> for the .dumb_create callback. The __DRM_GEM_CMA_DRIVER_OPS macro now = sets >> these defaults and .dumb_create in struct drm_driver. All remaining >> operations are provided by CMA GEM object functions. >> >> Signed-off-by: Thomas Zimmermann >> --- >> drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 12 +----------- >> 1 file changed, 1 insertion(+), 11 deletions(-) >> >> diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers= /gpu/drm/hisilicon/kirin/kirin_drm_ade.c >> index c339e632522a9..b1ffd7d43e562 100644 >> --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c >> +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c >> @@ -921,17 +921,7 @@ DEFINE_DRM_GEM_CMA_FOPS(ade_fops); >> static struct drm_driver ade_driver =3D { >> .driver_features =3D DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOM= IC, >> .fops =3D &ade_fops, >> - .gem_free_object_unlocked =3D drm_gem_cma_free_object, >> - .gem_vm_ops =3D &drm_gem_cma_vm_ops, >> - .dumb_create =3D drm_gem_cma_dumb_create_internal, >=20 > This doesn't seem right. The _internal documentation explicitly says > that this should _not_ be used as .dumb_create. Instead drivers should > use it to implement their callback. >=20 > Since it yields the same result as drm_gem_cma_dumb_create we can use > the default macro below. I noticed this and thought that the driver authors probably had their reasons. Changing the driver to the default macro is probably still a good idea. Best regards Thomas >=20 > Weather to the .dumb_create in separate patch, or squash it here - > I'll leave to you. > In case of the latter, please mentioned it in the commit message. >=20 > -Emil > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel >=20 --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --UjtqkFMbXJVAAv0qq3332iJaBv8R2fCJM-- --wfm2x9SGhUN4Mvdvt7GUgmDbtTSXZIr0q Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl7LvRIACgkQaA3BHVML eiN2ewgAkmuMplpbC5LqXdnzF4LkOCBNUM3nULyjENDhH0jEKFZpowHxLheYo0vV Zf9EyZpbvv95uQoGWm8qPPHPhrG5BKaiQGB4tubCG6zAtFsBbZagjfDrkMJescxs h5Qpqse1JSgmgsAq4GBpcRgy45RiHq96ElO9eHv4uAqtiAbIxmAvklofRnK2XbgL g/xsE/9RfatntMan7tSmAY9Td1OucpPBPY3WGB/Md7/DMPvPh2kxXGYLN2+7LN4Y GWhx7w7hMIZRSGU7dF++C+qwJjsda2Ri3AeaP9uNgQ36OXLvrBXwdTjJ+idRY8nb rE+KZtVpNj7pd2lYizLKbHDiLJixHg== =aTLc -----END PGP SIGNATURE----- --wfm2x9SGhUN4Mvdvt7GUgmDbtTSXZIr0q-- --===============1256767290== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1256767290==--