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=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 D8E66C433E0 for ; Fri, 15 Jan 2021 20:42:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 9693F23A9D for ; Fri, 15 Jan 2021 20:42:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9693F23A9D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GL3YSbmk2Y9D29YB6DUx3zgiVpAgalhL7CFDK3IvwTk=; b=G2wq0pvaCYZ7a2TRGqJGFKLwW EuD+LfHJqD/FgtJPzgdvF8gXy5A01YPVGeUS2RekkvqkgGeTvMCAiRX0A8pDdkhXPASnnZFUaCjtN YKM6oY6pyoggbeC8CSPqxMULHL9wAkJ8b94aZn0cF+3m/kxWWkOzJKWdsuhOkEgT7F6a9bemTndtl 4z13uGMUB0+52rBqaD3Ps2uMMYmWKuTj+NahAiTs9LYtSTPduiIzhOCNZJ8OAPUCIoxPVJB0HCqQH SylFT5lueepvjdRU5b1ZsW+P7TUIHoQsWP03xTcP8r3OVdF+6kJssdluhTODfHKHmkK2xZvcPc0Of meitA30Yg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0VvX-00006G-W8; Fri, 15 Jan 2021 20:42:36 +0000 Received: from perceval.ideasonboard.com ([2001:4b98:dc2:55:216:3eff:fef7:d647]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0VvV-00005i-LX; Fri, 15 Jan 2021 20:42:34 +0000 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6768E58B; Fri, 15 Jan 2021 21:42:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1610743351; bh=YM0UFEEnI3+Rh/NmmpBAyHwTyu8kF8Q6d7WaAvXYXmg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ePDFtIg2t/f8Sh35gudyogfQHgJctjLWaOxjX9MALH284FX8TVNfetW4hT9f9t6Zs RkKSbZK9kxaFvE9rFVQDu2VmmTQ6+yQ/IEntNmQ4OGrAWr43Z8LNSl81omX5DWIITd FZb6j2pMbH2Kg7TVoFuIiyWnRsiWGYMJt85Nq3bg= Date: Fri, 15 Jan 2021 22:42:14 +0200 From: Laurent Pinchart To: Maxime Ripard Subject: Re: [PATCH 05/10] drm: Use the state pointer directly in planes atomic_check Message-ID: References: <20210115125703.1315064-1-maxime@cerno.tech> <20210115125703.1315064-5-maxime@cerno.tech> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210115125703.1315064-5-maxime@cerno.tech> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210115_154233_834787_B826A0FF X-CRM114-Status: GOOD ( 17.52 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Haneen Mohammed , Alexandre Belloni , Heiko =?utf-8?Q?St=C3=BCbner?= , Neil Armstrong , David Airlie , Liviu Dudau , dri-devel@lists.freedesktop.org, Sandy Huang , Paul Cercueil , Rob Clark , Gerd Hoffmann , Benjamin Gaignard , Anitha Chrisanthus , Daniel Vetter , Mihail Atanassov , Sam Ravnborg , Michal Simek , linux-kernel@vger.kernel.org, Jerome Brunet , Marek Vasut , linux-rockchip@lists.infradead.org, Fabio Estevam , freedreno@lists.freedesktop.org, linux-mediatek@lists.infradead.org, Russell King , amd-gfx@lists.freedesktop.org, Roland Scheidegger , Xinliang Liu , Ludovic Desroches , "James \(Qian\) Wang" , NXP Linux Team , linux-arm-msm@vger.kernel.org, Dave Airlie , Xinwei Kong , Harry Wentland , Hyun Kwon , Philipp Zabel , Chun-Kuang Hu , Thomas Zimmermann , Leo Li , Chen Feng , Sascha Hauer , Maarten Lankhorst , Maxime Ripard , Martin Blumenstingl , Hans de Goede , John Stultz , Stefan Agner , Laurentiu Palcu , Matthias Brugger , linux-amlogic@lists.infradead.org, Chen-Yu Tsai , Sean Paul , Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org, Melissa Wen , Jernej Skrabec , VMware Graphics , Rodrigo Siqueira , Tomi Valkeinen , Boris Brezillon , Jyri Sarha , virtualization@lists.linux-foundation.org, Nicolas Ferre , Christian =?utf-8?B?S8O2bmln?= , Vincent Abriou , Edmund Dea , Daniel Vetter , Kevin Hilman , Alex Deucher , Tian Tao , Shawn Guo , Brian Starkey , Lucas Stach Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Hi Maxime, Thank you for the patch. On Fri, Jan 15, 2021 at 01:56:57PM +0100, Maxime Ripard wrote: > Now that atomic_check takes the global atomic state as a parameter, we > don't need to go through the pointer in the plane state. > > This was done using the following coccinelle script: > > @ plane_atomic_func @ > identifier helpers; > identifier func; > @@ > > static struct drm_plane_helper_funcs helpers = { > ..., > .atomic_check = func, > ..., > }; > > @@ > identifier plane_atomic_func.func; > identifier plane, state; > identifier plane_state; > @@ > > func(struct drm_plane *plane, struct drm_atomic_state *state) { > ... > - struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane); > <... when != plane_state > - plane_state->state > + state > ...> > } > > @@ > identifier plane_atomic_func.func; > identifier plane, state; > identifier plane_state; > @@ > > func(struct drm_plane *plane, struct drm_atomic_state *state) { > ... > struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane); > <... > - plane_state->state > + state > ...> > } > > Signed-off-by: Maxime Ripard > --- [snip] > drivers/gpu/drm/omapdrm/omap_plane.c | 2 +- > drivers/gpu/drm/xlnx/zynqmp_disp.c | 2 +- For these, with the small issue below addressed, Reviewed-by: Laurent Pinchart [snip] > diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c > index b0a3ba528718..d749acc78c85 100644 > --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c > +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c > @@ -1152,7 +1152,7 @@ zynqmp_disp_plane_atomic_check(struct drm_plane *plane, > if (!new_plane_state->crtc) > return 0; > > - crtc_state = drm_atomic_get_crtc_state(new_plane_state->state, > + crtc_state = drm_atomic_get_crtc_state(state, > new_plane_state->crtc); This now holds on a single line. > if (IS_ERR(crtc_state)) > return PTR_ERR(crtc_state); [snip] -- Regards, Laurent Pinchart _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic