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=-10.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 9C3ADC433E2 for ; Tue, 14 Jul 2020 08:39:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C89121D90 for ; Tue, 14 Jul 2020 08:39:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="ebQ0Mwri" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725793AbgGNIjU (ORCPT ); Tue, 14 Jul 2020 04:39:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbgGNIjU (ORCPT ); Tue, 14 Jul 2020 04:39:20 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B0BDC061794 for ; Tue, 14 Jul 2020 01:39:20 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id c80so1319820wme.0 for ; Tue, 14 Jul 2020 01:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wWL0p/Vwv0P0ZyYXD3ZMaH3SKBU8WIQHi3HTc/T6A9w=; b=ebQ0MwriHk720YK7jpRkgDh2q1K2tVmNTC1YJBlS9yxg5jlb36yjp65sCLFR8BptZ1 yZjZyyJaO41YaqFoM6++oKXxdeZXDR1ZfvX30KrXnQzzpONVPuYR1S+CF443DmyIJlu5 Ubb6RD5v3HGzwEZnMQENeriNav21kKQkbJstQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wWL0p/Vwv0P0ZyYXD3ZMaH3SKBU8WIQHi3HTc/T6A9w=; b=OHA/gsZ2IXv3+vbG1ywpdEonfYNPzu2v0iPE0Y5NBM95kg1oE3TTeSPm84mGs8XQtt XNMZa2cGAXWEQIZ4MqlT17G7uMHx1BNMGLDAfaGY1KofxBNHJyz5DMxuzvTSImhOmHPE WU63nraNe8TpBO0EMjX0KqUPGL3jGFGgj3pog1PIa6v7SC8+i8akaIzM6owdwEMvGC62 5u+ph7LOXYoKpvpyCo844RKd0gGMF8X2Ns9RCSfA5ZnjeKXdI7G/6n74QY5cBKIfG2KD YQ71gjWnQyi+XYmF44jOZMZ+Tc3xBDv2SwwDCYF2/LxwU/CUu/23Dw16TjvivbAG0yvw HH8g== X-Gm-Message-State: AOAM530nuP7xXMImUGXHsMym4tSLPgpHBT8vp6B3GsoN3Svx8x3dKhZz IRFd/QvfdAmtYPvzLYQ1zHhYZg== X-Google-Smtp-Source: ABdhPJyOnLYCZDLW6HYI2v9CjdLtSc+vjAnr+zti6cxE291NZ0S4kQLPNPRV5xw+YN8juLwXY+es/Q== X-Received: by 2002:a7b:c054:: with SMTP id u20mr3129190wmc.2.1594715958922; Tue, 14 Jul 2020 01:39:18 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id k11sm30494142wrd.23.2020.07.14.01.39.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 01:39:18 -0700 (PDT) Date: Tue, 14 Jul 2020 10:39:16 +0200 From: Daniel Vetter To: Laurent Pinchart Cc: Daniel Vetter , DRI Development , Intel Graphics Development , linux-rdma@vger.kernel.org, Daniel Vetter , Kieran Bingham , linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH 12/25] drm/rcar-du: Annotate dma-fence critical section in commit path Message-ID: <20200714083916.GV3278063@phenom.ffwll.local> References: <20200707201229.472834-1-daniel.vetter@ffwll.ch> <20200707201229.472834-13-daniel.vetter@ffwll.ch> <20200707233240.GR19803@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200707233240.GR19803@pendragon.ideasonboard.com> X-Operating-System: Linux phenom 5.6.0-1-amd64 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Wed, Jul 08, 2020 at 02:32:40AM +0300, Laurent Pinchart wrote: > Hi Daniel, > > Thank you for the patch. > > On Tue, Jul 07, 2020 at 10:12:16PM +0200, Daniel Vetter wrote: > > Ends right after drm_atomic_helper_commit_hw_done(), absolutely > > nothing fancy going on here. > > Just looking at this patch and the commit message, I have no idea what > this does, and why. It would be nice to expand the commit message to > give some more context, and especially explain why ending signalling > right after drm_atomic_helper_commit_hw_done() is the right option. > > I suppose I'll have to check the whole series in the meantime :-) Yes first three patches. They should land in the next few days. The explanation is a few pages long, not sure that makes much sense to copypaste into every driver patch here. Also patch 16 has some more explanation specific for display. > > Signed-off-by: Daniel Vetter > > Cc: Laurent Pinchart > > Cc: Kieran Bingham > > Cc: linux-renesas-soc@vger.kernel.org > > --- > > drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c > > index 482329102f19..42c5dc588435 100644 > > --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c > > +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c > > @@ -391,6 +391,7 @@ static void rcar_du_atomic_commit_tail(struct drm_atomic_state *old_state) > > struct drm_crtc_state *crtc_state; > > struct drm_crtc *crtc; > > unsigned int i; > > + bool fence_cookie = dma_fence_begin_signalling(); > > Can this be moved right before the > drm_atomic_helper_commit_modeset_disables() call ? The critical section starts even before this function starts, but for composability each part is individually annotated. That's why I've put it as the very first thing in every patch. Currently there's nothing between the funciton start and drm_atomic_helper_commit_modeset_disables which could break dma-fence rules, but the entire point of annotations is to not have to manually prove stuff like this. Wrapping it all is the point here. Does that make sense? Also, what I'm realling looking for is testing with lockdep enabled. Neither me nor you is going to catch issues with review here :-) -Daniel > > > > > /* > > * Store RGB routing to DPAD0 and DPAD1, the hardware will be configured > > @@ -417,6 +418,7 @@ static void rcar_du_atomic_commit_tail(struct drm_atomic_state *old_state) > > drm_atomic_helper_commit_modeset_enables(dev, old_state); > > > > drm_atomic_helper_commit_hw_done(old_state); > > + dma_fence_end_signalling(fence_cookie); > > drm_atomic_helper_wait_for_flip_done(dev, old_state); > > > > drm_atomic_helper_cleanup_planes(dev, old_state); > > -- > Regards, > > Laurent Pinchart -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch 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=-9.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 62FC8C433E4 for ; Tue, 14 Jul 2020 08:39:22 +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 39A3821897 for ; Tue, 14 Jul 2020 08:39:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="ebQ0Mwri" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39A3821897 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch 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 73C206E25B; Tue, 14 Jul 2020 08:39:21 +0000 (UTC) Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E0696E110 for ; Tue, 14 Jul 2020 08:39:20 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id q15so3759330wmj.2 for ; Tue, 14 Jul 2020 01:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wWL0p/Vwv0P0ZyYXD3ZMaH3SKBU8WIQHi3HTc/T6A9w=; b=ebQ0MwriHk720YK7jpRkgDh2q1K2tVmNTC1YJBlS9yxg5jlb36yjp65sCLFR8BptZ1 yZjZyyJaO41YaqFoM6++oKXxdeZXDR1ZfvX30KrXnQzzpONVPuYR1S+CF443DmyIJlu5 Ubb6RD5v3HGzwEZnMQENeriNav21kKQkbJstQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wWL0p/Vwv0P0ZyYXD3ZMaH3SKBU8WIQHi3HTc/T6A9w=; b=jK8iyVxMCFe6VoEzrmLYRKCl9+lGiuQH1PgEEbBdZlXlVwZQEb8uK74c45Yt8uBBfz g82Ef7oQSVA8JTcjKWrN10IlyF4XRdtUNIqioJbC3BJ5t0/7WHCYCLYI6g9wDVLziAA2 bQ7qyVdruxN+y/rH3JU93S8u8a4wbzOTpTpb5cqFSo521+gpcXSGJBkh5RwLPdpI7QGD wYlq8HlF+NUMyl8LjyeSSk7OO1M1ye5D2t8tNmkXxHlF98xPEXeuk5dCH+IIPeDCgBIl hXVqgiDewCIYFlGdGbCczrlnJb0YiI+AhmGnNB1lkmRDCf2k5aY5Pe+PS+dMSVBFjzm9 AamQ== X-Gm-Message-State: AOAM532xYVW97oJicvHIZm0dB1Oh2ZPjocLxMO3O31ltaMrPossCFVWC M6ZNfOUakV7K8I3Q39MLCR+KioKNBys= X-Google-Smtp-Source: ABdhPJyOnLYCZDLW6HYI2v9CjdLtSc+vjAnr+zti6cxE291NZ0S4kQLPNPRV5xw+YN8juLwXY+es/Q== X-Received: by 2002:a7b:c054:: with SMTP id u20mr3129190wmc.2.1594715958922; Tue, 14 Jul 2020 01:39:18 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id k11sm30494142wrd.23.2020.07.14.01.39.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 01:39:18 -0700 (PDT) Date: Tue, 14 Jul 2020 10:39:16 +0200 From: Daniel Vetter To: Laurent Pinchart Subject: Re: [PATCH 12/25] drm/rcar-du: Annotate dma-fence critical section in commit path Message-ID: <20200714083916.GV3278063@phenom.ffwll.local> References: <20200707201229.472834-1-daniel.vetter@ffwll.ch> <20200707201229.472834-13-daniel.vetter@ffwll.ch> <20200707233240.GR19803@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200707233240.GR19803@pendragon.ideasonboard.com> X-Operating-System: Linux phenom 5.6.0-1-amd64 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: linux-rdma@vger.kernel.org, Daniel Vetter , Intel Graphics Development , DRI Development , linux-renesas-soc@vger.kernel.org, Kieran Bingham , Daniel Vetter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Jul 08, 2020 at 02:32:40AM +0300, Laurent Pinchart wrote: > Hi Daniel, > > Thank you for the patch. > > On Tue, Jul 07, 2020 at 10:12:16PM +0200, Daniel Vetter wrote: > > Ends right after drm_atomic_helper_commit_hw_done(), absolutely > > nothing fancy going on here. > > Just looking at this patch and the commit message, I have no idea what > this does, and why. It would be nice to expand the commit message to > give some more context, and especially explain why ending signalling > right after drm_atomic_helper_commit_hw_done() is the right option. > > I suppose I'll have to check the whole series in the meantime :-) Yes first three patches. They should land in the next few days. The explanation is a few pages long, not sure that makes much sense to copypaste into every driver patch here. Also patch 16 has some more explanation specific for display. > > Signed-off-by: Daniel Vetter > > Cc: Laurent Pinchart > > Cc: Kieran Bingham > > Cc: linux-renesas-soc@vger.kernel.org > > --- > > drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c > > index 482329102f19..42c5dc588435 100644 > > --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c > > +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c > > @@ -391,6 +391,7 @@ static void rcar_du_atomic_commit_tail(struct drm_atomic_state *old_state) > > struct drm_crtc_state *crtc_state; > > struct drm_crtc *crtc; > > unsigned int i; > > + bool fence_cookie = dma_fence_begin_signalling(); > > Can this be moved right before the > drm_atomic_helper_commit_modeset_disables() call ? The critical section starts even before this function starts, but for composability each part is individually annotated. That's why I've put it as the very first thing in every patch. Currently there's nothing between the funciton start and drm_atomic_helper_commit_modeset_disables which could break dma-fence rules, but the entire point of annotations is to not have to manually prove stuff like this. Wrapping it all is the point here. Does that make sense? Also, what I'm realling looking for is testing with lockdep enabled. Neither me nor you is going to catch issues with review here :-) -Daniel > > > > > /* > > * Store RGB routing to DPAD0 and DPAD1, the hardware will be configured > > @@ -417,6 +418,7 @@ static void rcar_du_atomic_commit_tail(struct drm_atomic_state *old_state) > > drm_atomic_helper_commit_modeset_enables(dev, old_state); > > > > drm_atomic_helper_commit_hw_done(old_state); > > + dma_fence_end_signalling(fence_cookie); > > drm_atomic_helper_wait_for_flip_done(dev, old_state); > > > > drm_atomic_helper_cleanup_planes(dev, old_state); > > -- > Regards, > > Laurent Pinchart -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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=-9.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 7E649C433E1 for ; Tue, 14 Jul 2020 08:39:21 +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 54F2421897 for ; Tue, 14 Jul 2020 08:39:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="ebQ0Mwri" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54F2421897 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EBDDF6E110; Tue, 14 Jul 2020 08:39:20 +0000 (UTC) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D7A46E110 for ; Tue, 14 Jul 2020 08:39:20 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id 22so3755851wmg.1 for ; Tue, 14 Jul 2020 01:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wWL0p/Vwv0P0ZyYXD3ZMaH3SKBU8WIQHi3HTc/T6A9w=; b=ebQ0MwriHk720YK7jpRkgDh2q1K2tVmNTC1YJBlS9yxg5jlb36yjp65sCLFR8BptZ1 yZjZyyJaO41YaqFoM6++oKXxdeZXDR1ZfvX30KrXnQzzpONVPuYR1S+CF443DmyIJlu5 Ubb6RD5v3HGzwEZnMQENeriNav21kKQkbJstQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wWL0p/Vwv0P0ZyYXD3ZMaH3SKBU8WIQHi3HTc/T6A9w=; b=fTaTEJQLLeo1T2hgUTNSHrBJG/pISBeJAaGvEAsoh+qBUJkdC4vKBoRUPdE0B+nWR6 uVySvbYYEr3UyMyn848xdpCZMxw3Z6XyJudaIXMLw2dku0R9lWfwDWZZJqLzPAq6xyTi N3Jycx5phDM/xxrTtB1lwyF8zq1vr1ArmcWsQqzrTw1qoxpbuL7Ia24FjhataOJem7Iz pphYG9YJ/2Dw6ImsG6J/fIhFDUj2wi9SfE9WokvLX7iyOMqhQ4TTeCEwArLBsC6+9iFm gO3eQ9DJ0XPL4lv/kvMtO8OU98ZTLCiTC0AETjSiES48nf8bXXqu2FQ7amDt6ZjgxdoO gRGA== X-Gm-Message-State: AOAM5316IJlDpsBdfCo5v0Wim4tr0Ulz/hfrjUo6q/DZgbtLZIumWC+M xrw2xDvQDc998SmVBC4lC5ckOQ== X-Google-Smtp-Source: ABdhPJyOnLYCZDLW6HYI2v9CjdLtSc+vjAnr+zti6cxE291NZ0S4kQLPNPRV5xw+YN8juLwXY+es/Q== X-Received: by 2002:a7b:c054:: with SMTP id u20mr3129190wmc.2.1594715958922; Tue, 14 Jul 2020 01:39:18 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id k11sm30494142wrd.23.2020.07.14.01.39.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 01:39:18 -0700 (PDT) Date: Tue, 14 Jul 2020 10:39:16 +0200 From: Daniel Vetter To: Laurent Pinchart Message-ID: <20200714083916.GV3278063@phenom.ffwll.local> References: <20200707201229.472834-1-daniel.vetter@ffwll.ch> <20200707201229.472834-13-daniel.vetter@ffwll.ch> <20200707233240.GR19803@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200707233240.GR19803@pendragon.ideasonboard.com> X-Operating-System: Linux phenom 5.6.0-1-amd64 Subject: Re: [Intel-gfx] [PATCH 12/25] drm/rcar-du: Annotate dma-fence critical section in commit path X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rdma@vger.kernel.org, Daniel Vetter , Intel Graphics Development , DRI Development , linux-renesas-soc@vger.kernel.org, Kieran Bingham , Daniel Vetter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, Jul 08, 2020 at 02:32:40AM +0300, Laurent Pinchart wrote: > Hi Daniel, > > Thank you for the patch. > > On Tue, Jul 07, 2020 at 10:12:16PM +0200, Daniel Vetter wrote: > > Ends right after drm_atomic_helper_commit_hw_done(), absolutely > > nothing fancy going on here. > > Just looking at this patch and the commit message, I have no idea what > this does, and why. It would be nice to expand the commit message to > give some more context, and especially explain why ending signalling > right after drm_atomic_helper_commit_hw_done() is the right option. > > I suppose I'll have to check the whole series in the meantime :-) Yes first three patches. They should land in the next few days. The explanation is a few pages long, not sure that makes much sense to copypaste into every driver patch here. Also patch 16 has some more explanation specific for display. > > Signed-off-by: Daniel Vetter > > Cc: Laurent Pinchart > > Cc: Kieran Bingham > > Cc: linux-renesas-soc@vger.kernel.org > > --- > > drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c > > index 482329102f19..42c5dc588435 100644 > > --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c > > +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c > > @@ -391,6 +391,7 @@ static void rcar_du_atomic_commit_tail(struct drm_atomic_state *old_state) > > struct drm_crtc_state *crtc_state; > > struct drm_crtc *crtc; > > unsigned int i; > > + bool fence_cookie = dma_fence_begin_signalling(); > > Can this be moved right before the > drm_atomic_helper_commit_modeset_disables() call ? The critical section starts even before this function starts, but for composability each part is individually annotated. That's why I've put it as the very first thing in every patch. Currently there's nothing between the funciton start and drm_atomic_helper_commit_modeset_disables which could break dma-fence rules, but the entire point of annotations is to not have to manually prove stuff like this. Wrapping it all is the point here. Does that make sense? Also, what I'm realling looking for is testing with lockdep enabled. Neither me nor you is going to catch issues with review here :-) -Daniel > > > > > /* > > * Store RGB routing to DPAD0 and DPAD1, the hardware will be configured > > @@ -417,6 +418,7 @@ static void rcar_du_atomic_commit_tail(struct drm_atomic_state *old_state) > > drm_atomic_helper_commit_modeset_enables(dev, old_state); > > > > drm_atomic_helper_commit_hw_done(old_state); > > + dma_fence_end_signalling(fence_cookie); > > drm_atomic_helper_wait_for_flip_done(dev, old_state); > > > > drm_atomic_helper_cleanup_planes(dev, old_state); > > -- > Regards, > > Laurent Pinchart -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx