From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/rockchip: Return -EBUSY if there's already a pending flip event v5 Date: Tue, 24 May 2016 10:37:49 +0200 Message-ID: <20160524083749.GR27098@phenom.ffwll.local> References: <1464074761-5194-1-git-send-email-tomeu.vizoso@collabora.com> <1464074857-5515-1-git-send-email-tomeu.vizoso@collabora.com> <7363560.k3ytHeYgtM@phil> <20160524083050.GQ27098@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: <20160524083050.GQ27098@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: Heiko Stuebner , Tomeu Vizoso , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org List-Id: linux-rockchip.vger.kernel.org T24gVHVlLCBNYXkgMjQsIDIwMTYgYXQgMTA6MzA6NTBBTSArMDIwMCwgRGFuaWVsIFZldHRlciB3 cm90ZToKPiBPbiBUdWUsIE1heSAyNCwgMjAxNiBhdCAxMDoyODo0MkFNICswMjAwLCBIZWlrbyBT dHVlYm5lciB3cm90ZToKPiA+IEhpIFRvbWV1LAo+ID4gCj4gPiBQYXRjaCBzdWJqZWN0OiBwbGVh c2UgcHV0IHRoZSB2ZXJzaW9uIGludG8gdGhlIGJyYWNrZXRzLCBzbyBbUEFUQ0ggdjVdIGFzIGl0 IAo+ID4gc2hvdWxkbid0IGJlIHBhcnQgb2YgdGhlIGNvbW1pdCBsb2cuCj4gPiAKPiA+IEFtIERp ZW5zdGFnLCAyNC4gTWFpIDIwMTYsIDA5OjI3OjM3IHNjaHJpZWIgVG9tZXUgVml6b3NvOgo+ID4g PiBBcyBwZXIgdGhlIGRvY3MsIGF0b21pY19jb21taXQgc2hvdWxkIHJldHVybiA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ZnR3YXJlIEVuZ2luZWVyLCBJbnRlbCBDb3Jwb3JhdGlvbgpo dHRwOi8vYmxvZy5mZndsbC5jaApfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fXwpkcmktZGV2ZWwgbWFpbGluZyBsaXN0CmRyaS1kZXZlbEBsaXN0cy5mcmVlZGVz a3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9k cmktZGV2ZWwK From mboxrd@z Thu Jan 1 00:00:00 1970 From: daniel@ffwll.ch (Daniel Vetter) Date: Tue, 24 May 2016 10:37:49 +0200 Subject: [PATCH] drm/rockchip: Return -EBUSY if there's already a pending flip event v5 In-Reply-To: <20160524083050.GQ27098@phenom.ffwll.local> References: <1464074761-5194-1-git-send-email-tomeu.vizoso@collabora.com> <1464074857-5515-1-git-send-email-tomeu.vizoso@collabora.com> <7363560.k3ytHeYgtM@phil> <20160524083050.GQ27098@phenom.ffwll.local> Message-ID: <20160524083749.GR27098@phenom.ffwll.local> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, May 24, 2016 at 10:30:50AM +0200, Daniel Vetter wrote: > On Tue, May 24, 2016 at 10:28:42AM +0200, Heiko Stuebner wrote: > > Hi Tomeu, > > > > Patch subject: please put the version into the brackets, so [PATCH v5] as it > > shouldn't be part of the commit log. > > > > Am Dienstag, 24. Mai 2016, 09:27:37 schrieb Tomeu Vizoso: > > > As per the docs, atomic_commit should return -EBUSY "if an asycnhronous > > > updated is requested and there is an earlier updated pending". > > > > > v2: Use the status of the workqueue instead of vop->event, and don't add > > > a superfluous wait on the workqueue. > > > > > > v3: Drop work_busy, as there's a sizeable delay when the worker > > > finishes, which introduces a race in which the client has already > > > received the last flip event but the next page flip ioctl will still > > > return -EBUSY because work_busy returns outdated information. > > > > > > v4: Hold dev->event_lock while checking the VOP's event field as > > > suggested by Daniel Stone. > > > > > > v5: Only block if there's outstanding work if it's a blocking call. > > > > similarly, please put the changelog below the "---" and above the diffstat. > > drm culture is to keep it above, since it's kinda useful sometimes when > later on trying to reconstruct wtf was discussed and why a patch was > merged. Maybe needs a bit more context: The only stuff you raised in your review is tiny style nits of pretty much utter irrelevance. No substantial and material feedback anywehere, and in my opinion in such a case either fix up the nits when applying (when you feel really strongly about perfect patches), or just merge as-is. But sending out content-less bikesheds like these just adds noise and helps no-one. I think at least some spelling stuff is the minimal bar (but then just include your r-b tag), but personally I don't even care about that so much, as long as it's still legible. Thanks, Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754702AbcEXIhx (ORCPT ); Tue, 24 May 2016 04:37:53 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36410 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754641AbcEXIht (ORCPT ); Tue, 24 May 2016 04:37:49 -0400 Date: Tue, 24 May 2016 10:37:49 +0200 From: Daniel Vetter To: Heiko Stuebner , Tomeu Vizoso , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] drm/rockchip: Return -EBUSY if there's already a pending flip event v5 Message-ID: <20160524083749.GR27098@phenom.ffwll.local> Mail-Followup-To: Heiko Stuebner , Tomeu Vizoso , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org References: <1464074761-5194-1-git-send-email-tomeu.vizoso@collabora.com> <1464074857-5515-1-git-send-email-tomeu.vizoso@collabora.com> <7363560.k3ytHeYgtM@phil> <20160524083050.GQ27098@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160524083050.GQ27098@phenom.ffwll.local> X-Operating-System: Linux phenom 4.6.0-rc5+ User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 24, 2016 at 10:30:50AM +0200, Daniel Vetter wrote: > On Tue, May 24, 2016 at 10:28:42AM +0200, Heiko Stuebner wrote: > > Hi Tomeu, > > > > Patch subject: please put the version into the brackets, so [PATCH v5] as it > > shouldn't be part of the commit log. > > > > Am Dienstag, 24. Mai 2016, 09:27:37 schrieb Tomeu Vizoso: > > > As per the docs, atomic_commit should return -EBUSY "if an asycnhronous > > > updated is requested and there is an earlier updated pending". > > > > > v2: Use the status of the workqueue instead of vop->event, and don't add > > > a superfluous wait on the workqueue. > > > > > > v3: Drop work_busy, as there's a sizeable delay when the worker > > > finishes, which introduces a race in which the client has already > > > received the last flip event but the next page flip ioctl will still > > > return -EBUSY because work_busy returns outdated information. > > > > > > v4: Hold dev->event_lock while checking the VOP's event field as > > > suggested by Daniel Stone. > > > > > > v5: Only block if there's outstanding work if it's a blocking call. > > > > similarly, please put the changelog below the "---" and above the diffstat. > > drm culture is to keep it above, since it's kinda useful sometimes when > later on trying to reconstruct wtf was discussed and why a patch was > merged. Maybe needs a bit more context: The only stuff you raised in your review is tiny style nits of pretty much utter irrelevance. No substantial and material feedback anywehere, and in my opinion in such a case either fix up the nits when applying (when you feel really strongly about perfect patches), or just merge as-is. But sending out content-less bikesheds like these just adds noise and helps no-one. I think at least some spelling stuff is the minimal bar (but then just include your r-b tag), but personally I don't even care about that so much, as long as it's still legible. Thanks, Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch