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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 0F526C433DB for ; Fri, 15 Jan 2021 20:42:36 +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 C3BF323A9D for ; Fri, 15 Jan 2021 20:42:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3BF323A9D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com 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 2376889FD7; Fri, 15 Jan 2021 20:42:35 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by gabe.freedesktop.org (Postfix) with ESMTPS id B5DC089FD7; Fri, 15 Jan 2021 20:42:33 +0000 (UTC) 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-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: Haneen Mohammed , Alexandre Belloni , Neil Armstrong , David Airlie , Liviu Dudau , dri-devel@lists.freedesktop.org, Sandy Huang , Paul Cercueil , Gerd Hoffmann , Anitha Chrisanthus , Daniel Vetter , Mihail Atanassov , Sam Ravnborg , Michal Simek , linux-kernel@vger.kernel.org, Jerome Brunet , Marek Vasut , linux-rockchip@lists.infradead.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 , Hyun Kwon , Chun-Kuang Hu , Thomas Zimmermann , Leo Li , Chen Feng , Sascha Hauer , Martin Blumenstingl , Hans de Goede , 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 , freedreno@lists.freedesktop.org, Kevin Hilman , Alex Deucher , Tian Tao , Shawn Guo Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel