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=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 8A343C433DB for ; Fri, 15 Jan 2021 20:42:39 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 341C323A9D for ; Fri, 15 Jan 2021 20:42:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 341C323A9D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CC3A68749F; Fri, 15 Jan 2021 20:42:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r0WtIPCcm9PR; Fri, 15 Jan 2021 20:42:38 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 49435872EE; Fri, 15 Jan 2021 20:42:38 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 33E7DC0893; Fri, 15 Jan 2021 20:42:38 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 51B68C013A for ; Fri, 15 Jan 2021 20:42:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3F35686C19 for ; Fri, 15 Jan 2021 20:42:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i-YMMsrzEwTT for ; Fri, 15 Jan 2021 20:42:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 5B27586C06 for ; Fri, 15 Jan 2021 20:42:35 +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> 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 , 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 X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" 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 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization