Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp274965pxb; Fri, 15 Jan 2021 12:45:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTuYgND0Y4y67ZYG3W5aWWWmBLyOua+DIqmJXUooC0xZbeko8zBgD9uJqBHE2hJtzAcAlv X-Received: by 2002:a17:906:1741:: with SMTP id d1mr10529447eje.182.1610743553231; Fri, 15 Jan 2021 12:45:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610743553; cv=none; d=google.com; s=arc-20160816; b=eF/URnycZH1MrVnS4fqXYXx2uP8Ku9bOEnR6VFJ8HWmeDNnalRL+7TiUry1a1FjVkN DmVs+VOg8S043S5DdhWwDR8ZR+6WJ9XpFHBwm1IMASagfVmbI56zuonY3X6jR+zotWK9 WUP145V2Rs6tT8oLXqFV4oustHChFgY1FfwmMWb/YBtYC/MxBCPFZbwaqE/1v64AirJX PtMRjDodtIgdBuM9gUvHRrT8PeakLiw6Zx6L08qBejfd/BTAhge0Q0y1CPHbjdo8LVqW xcSqgeGNhv74trPX7qawsOLOxgvLCcgcQMnbEI/sPJmg3qAROS8Rbx7JuIxxfCQezy7/ ewng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3Vhynm7q2je7o+LsmbPMwyxsNLPrncgpapZzcNenhF4=; b=Oeh7SlGGtsPc919oEy7sXqZ4m8dg4qJlVf+NfDdzMaTxWa/7KwiWODkKY+BEge/+RZ E4PpxLZUpc7IxgbeZF0G4ZFo6teqZU/caSrcLXlnvl6ldvpsggMp3Ts32BVMFF8wu+8v HzQPXhe674BJGHLa34OkOj7wdKNhmQedxdi/H0NVvsDVR9/g13rqa/jVpZN1ZenO9pVV QqxOocWVxyt8QfhlMFA+v4gMzxNN06E6pYPWNEUUSMJlIT3elix66AIUNWPOrF2XsAc9 GMos42XDQMFFdx89Ci7F2ErumTIB8ye7F8FlghuIJrZ7O0sH4HfqDbUAvrvW/MkjHCKW P0tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ePDFtIg2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si4247377ejf.192.2021.01.15.12.45.29; Fri, 15 Jan 2021 12:45:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ePDFtIg2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730479AbhAOUnS (ORCPT + 99 others); Fri, 15 Jan 2021 15:43:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727798AbhAOUnQ (ORCPT ); Fri, 15 Jan 2021 15:43:16 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C0A2C061757; Fri, 15 Jan 2021 12:42:36 -0800 (PST) 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 Cc: Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org, Harry Wentland , Leo Li , Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , Daniel Vetter , "James (Qian) Wang" , Liviu Dudau , Mihail Atanassov , Brian Starkey , Russell King , Dave Airlie , Sam Ravnborg , Boris Brezillon , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Maxime Ripard , Xinliang Liu , Tian Tao , John Stultz , Xinwei Kong , Chen Feng , Laurentiu Palcu , Lucas Stach , Philipp Zabel , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Paul Cercueil , Anitha Chrisanthus , Edmund Dea , Chun-Kuang Hu , Matthias Brugger , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Rob Clark , Sean Paul , Marek Vasut , Stefan Agner , Tomi Valkeinen , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Benjamin Gaignard , Vincent Abriou , Chen-Yu Tsai , Jernej Skrabec , Jyri Sarha , Hans de Goede , Gerd Hoffmann , Rodrigo Siqueira , Melissa Wen , Haneen Mohammed , VMware Graphics , Roland Scheidegger , Hyun Kwon , Michal Simek , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-rockchip@lists.infradead.org, virtualization@lists.linux-foundation.org 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-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210115125703.1315064-5-maxime@cerno.tech> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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