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=-15.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 B5427C433DB for ; Fri, 22 Jan 2021 14:06:49 +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 570C8221FD for ; Fri, 22 Jan 2021 14:06:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 570C8221FD 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 B84C189BAB; Fri, 22 Jan 2021 14:06:48 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3556489BAB for ; Fri, 22 Jan 2021 14:06:47 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C328FAD19; Fri, 22 Jan 2021 14:06:45 +0000 (UTC) Subject: Re: [PATCH] drm/todo: Add entry for moving to dma_resv_lock To: Daniel Vetter , DRI Development References: <20210122133624.1751802-1-daniel.vetter@ffwll.ch> From: Thomas Zimmermann Message-ID: <97c93ad7-9aa1-dcf7-42a9-4f8076eeb135@suse.de> Date: Fri, 22 Jan 2021 15:06:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210122133624.1751802-1-daniel.vetter@ffwll.ch> 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: David Airlie , linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org, =?UTF-8?Q?Christian_K=c3=b6nig?= , Daniel Vetter Content-Type: multipart/mixed; boundary="===============1198737766==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============1198737766== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HaDnuMBCYLhsDliuMvZN6yNcVbtbbFnmX" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HaDnuMBCYLhsDliuMvZN6yNcVbtbbFnmX Content-Type: multipart/mixed; boundary="c8l1JC1rMcFzs0Nla4OljL8uVpN9IeK3I"; protected-headers="v1" From: Thomas Zimmermann To: Daniel Vetter , DRI Development Cc: David Airlie , =?UTF-8?Q?Christian_K=c3=b6nig?= , linaro-mm-sig@lists.linaro.org, Daniel Vetter , linux-media@vger.kernel.org Message-ID: <97c93ad7-9aa1-dcf7-42a9-4f8076eeb135@suse.de> Subject: Re: [PATCH] drm/todo: Add entry for moving to dma_resv_lock References: <20210122133624.1751802-1-daniel.vetter@ffwll.ch> In-Reply-To: <20210122133624.1751802-1-daniel.vetter@ffwll.ch> --c8l1JC1rMcFzs0Nla4OljL8uVpN9IeK3I Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 22.01.21 um 14:36 schrieb Daniel Vetter: > Requested by Thomas. I think it justifies a new level, since I tried > to make some forward progress on this last summer, and gave up (for > now). This is very tricky. Adding it to the TODO list is a first step. :) Acked-by: Thomas Zimmermann >=20 > Signed-off-by: Daniel Vetter > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Cc: David Airlie > Cc: Daniel Vetter > Cc: Sumit Semwal > Cc: "Christian K=C3=B6nig" > Cc: linux-media@vger.kernel.org > Cc: linaro-mm-sig@lists.linaro.org > --- > Documentation/gpu/todo.rst | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) >=20 > diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst > index dea9082c0e5f..f872d3d33218 100644 > --- a/Documentation/gpu/todo.rst > +++ b/Documentation/gpu/todo.rst > @@ -23,6 +23,9 @@ Advanced: Tricky tasks that need fairly good understa= nding of the DRM subsystem > and graphics topics. Generally need the relevant hardware for develop= ment and > testing. > =20 > +Expert: Only attempt these if you've successfully completed some trick= y > +refactorings already and are an expert in the specific area > + > Subsystem-wide refactorings > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > =20 > @@ -168,6 +171,22 @@ Contact: Daniel Vetter, respective driver maintain= ers > =20 > Level: Advanced > =20 > +Move Buffer Object Locking to dma_resv_lock() > +--------------------------------------------- > + > +Many drivers have their own per-object locking scheme, usually using > +mutex_lock(). This causes all kinds of trouble for buffer sharing, sin= ce > +depending which driver is the exporter and importer, the locking hiera= rchy is > +reversed. > + > +To solve this we need one standard per-object locking mechanism, which= is > +dma_resv_lock(). This lock needs to be called as the outermost lock, w= ith all > +other driver specific per-object locks removed. The problem is tha rol= ling out > +the actual change to the locking contract is a flag day, due to struct= dma_buf > +buffer sharing. > + > +Level: Expert > + > Convert logging to drm_* functions with drm_device paramater > ------------------------------------------------------------ > =20 >=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 --c8l1JC1rMcFzs0Nla4OljL8uVpN9IeK3I-- --HaDnuMBCYLhsDliuMvZN6yNcVbtbbFnmX Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEExndm/fpuMUdwYFFolh/E3EQov+AFAmAK2/QFAwAAAAAACgkQlh/E3EQov+D8 Fw/+MS3JyICgqsu8kPrj+GPX9X6pa7qf9iup7N4mOQhvxjsa2dRI1DBcxqNNs11ePCw21faWnEZU JT/FhKCYZaMdeMDYKLSby2D0wyrV4XhN5xW2NrOPSox9uF9Do2XzxStMl89IHai+qkOLX5/4RSXt L5KMtC6t/6DhV/xkLLx1ealvABlL7Z1CPrqL8acGqbXABcUixGTi4hVWSED43M2FrHsTpYvtDvqX n79juLQpwdtnr7qAwoTMo/Fj6mrU29p0apd0Nb2LR1qfYMyE0idZPQbIcQJNyXMzL4D0YE0P/1dY YL/KKk+7SsWRY+ewrHOOt2tE8ZI3x7dYuU8h204RB17WUQIMghu5dwsPIjhyoysDTINHgKTrZfHr l/ruWNfxgoBpxb4XdPVrOSbB4b3BelFVGaJ5Q3nzN7Jzdfn6oyZAsTAlfK0L4wThk/heDkVAiVqk 1IoTLQl2ihjj1tB3AsTCjZRfcSWH81Ksz5uCgQwzV1CcfgPYzGiCkg1U7EXcuNidkn9oDu4VgJhv Nq1y+Awe/vi9ilsMRraX5O6oHPuIExwD+Amus0E6klaLEltOI9Yn38VMkwXUw8AwwVDnBK16s+Ki u871/Dr7GLELcTeACuRP9r7McW4ba00Sw1tCswJPXHaqFkVqdj3AkAJODLLO52ePhhenxvyxhs2U Upc= =R+9w -----END PGP SIGNATURE----- --HaDnuMBCYLhsDliuMvZN6yNcVbtbbFnmX-- --===============1198737766== 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 --===============1198737766==--