From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: [PATCH 8/9] drm/omap: fix preclose to wait for scheduled work Date: Mon, 8 Sep 2014 16:09:39 +0300 Message-ID: <540DAA93.6060902@ti.com> References: <1409745310-19092-1-git-send-email-tomi.valkeinen@ti.com> <1409745310-19092-8-git-send-email-tomi.valkeinen@ti.com> <20140903143253.GU15520@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0976892431==" Return-path: Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A5136E2AC for ; Mon, 8 Sep 2014 06:09:46 -0700 (PDT) In-Reply-To: <20140903143253.GU15520@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0976892431== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="w0nCcs3LSspanJEwM58Iw84b2gQkMxn4c" --w0nCcs3LSspanJEwM58Iw84b2gQkMxn4c Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 03/09/14 17:32, Daniel Vetter wrote: > On Wed, Sep 03, 2014 at 02:55:09PM +0300, Tomi Valkeinen wrote: >> We already wait for all scheduled work to be done on the driver's unlo= ad >> function. However, I think we need to wait on preclose() also, so that= >> when an application closes the drm file descriptor, we are sure that >> there's no left around. Hmm, that's supposed to say "there's no work left around". > The justification (likely, didn't check omapdrm code) for this is that = we > need to clear out all outstanding drm_events. Currently i915 and some > other drivers (but not all) have that open-coded. We should probably tr= ack > drm_events on a per-fd list and move this logic into the core instead o= f > adding more driver-specific hacks. To be honest, I'm not 100% sure what we need to wait for =3D). I'm still learning DRM, and omapdrm's work handling is not the easiest one to follow. But yes, at least the page-flip event is one that rings alarm bells in my head, if the fb is allowed to be closed and there's still an event outstanding. With this patch we wait until all work is done in the preclose. The performance is not an issue here, so I went for "better safe than sorry".= Tomi --w0nCcs3LSspanJEwM58Iw84b2gQkMxn4c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUDaqTAAoJEPo9qoy8lh71GLYQAJiJ8OANgpSiop9NkgVr/vRW YstwTQML7K99LfIn8s9ecb4kWiJcQdGJslQICs8vh2DRQStHaQhfseoapyXtsgeu Q1ZflibW8WIIlo5s43MPX6lD+tL3P1ioH/Pt76EHEgwFN4gyw77iE5a4hkq0dsZc iUnMxzozNcQFgr8uvKRJX7D/7dr1Pi7i5Qk1PGDTzt7cRjoCT81uXve2xE+KXewF 9X+DmIyDRBlhDNOyzBmh8kNhpQBluz8/X7x7Cbx7BhHNiSgBfnoiAY1nouQjyMuB 3Yu+e6t/sVS2JtMTMHuRLffQCH8chbnKGnRQDFrwvgoxN27x1B1u9AQnvvf1Tzg/ 52RosBE/ck1zFtaWLQxvM+SEkIlKum+5q4n7THC6xyh42kwOPVnpZ6hIK2wmqrk8 5/2DICIb32TFhTMSN3uAQEPH6FGcfe8Uw+1NUwP6zyONCkmmWtvVfOM89k8GUEAy 417lJ5DwQr4J2i6BKvf6RJvATkPgXsELPZ7LDUis77l5XtIkz4cDfDqffx3BA4Lh DiIv3nYYljavGm4NxvsY7v4ezosvFmaO3fH/R3EXwx+xRwd38bavvr490ljdg3Hu oRSZlizKiUJL1cYjqrZqeYTqygm0yNSni8lfGleOxsHsysM43Z4ifcA5YyZfTFbX icoF7WzQzDHXTXxPkVXz =9RVU -----END PGP SIGNATURE----- --w0nCcs3LSspanJEwM58Iw84b2gQkMxn4c-- --===============0976892431== 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 http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0976892431==--