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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, 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 62F08C433E0 for ; Tue, 26 Jan 2021 15:24:53 +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 2440522D58 for ; Tue, 26 Jan 2021 15:24:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2440522D58 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.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=XUzorgjnpYzUnSmJ0JigQ3Ub82BeJX6pQHKtiQnSWgA=; b=nygQ8EQMWx2Lijs9LU+weRweA 0Os/SjSkTvPekM7r6aSkjbZz9X/MzrUofb/Eht2IaM3agejj2JmSLqYWsGV5eUzCjeToJxf9uTIxZ FNDM5m48+iD7NkMn+jl4XAosZYRNIwABMyU8luJWkaB8+LvqMsxiwVm0G1n7HAbc3HvlKn13vUeyc r78PdvvZMLoEgNoopnJ1m/MDXikl7eVkor9eUSip/r85zotB1Tm2+qiXSwAFgOUNxmx1KTAhTZ+bc wrO29lBoMVZnGxbnanWSwmV7LY4pKj5z2tlMC3iFY0UK3gaC+4sfVbQjP+pXD1Ti8LbZABWWr0w9j bphXCMCKw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4QCz-0002RS-6Z; Tue, 26 Jan 2021 15:24:45 +0000 Received: from mga01.intel.com ([192.55.52.88]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4OL4-0007om-A2; Tue, 26 Jan 2021 13:24:59 +0000 IronPort-SDR: XaU55DbI5Qo+hlSSIRltyDZkcArTX9POvwvs0bOX/cq/ChDOqLhm4R+evFI10/X9aiAHDTIgM2 dq92SLkxzfsA== X-IronPort-AV: E=McAfee;i="6000,8403,9875"; a="198687066" X-IronPort-AV: E=Sophos;i="5.79,375,1602572400"; d="scan'208";a="198687066" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2021 05:24:54 -0800 IronPort-SDR: g4Zswe3qz4zMid/EyEG5xz4WWhFPriWd/t2t5KrG0ShP0j9WNEEJayXNCJQTEkRkM2/IHRNzgx zk+bb8SSGplQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,375,1602572400"; d="scan'208";a="369103591" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga002.jf.intel.com with SMTP; 26 Jan 2021 05:24:36 -0800 Received: by stinkbox (sSMTP sendmail emulation); Tue, 26 Jan 2021 15:24:35 +0200 Date: Tue, 26 Jan 2021 15:24:35 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Maxime Ripard Subject: Re: [PATCH v2 10/11] drm: Use state helper instead of the plane state pointer Message-ID: References: <20210121163537.1466118-1-maxime@cerno.tech> <20210121163537.1466118-10-maxime@cerno.tech> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210121163537.1466118-10-maxime@cerno.tech> X-Patchwork-Hint: comment X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210126_082458_491685_9F77754B X-CRM114-Status: GOOD ( 17.07 ) X-Mailman-Approved-At: Tue, 26 Jan 2021 10:24:44 -0500 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 , Neil Armstrong , David Airlie , Liviu Dudau , dri-devel@lists.freedesktop.org, Russell King , Paul Cercueil , Thierry Reding , Gerd Hoffmann , Anitha Chrisanthus , Daniel Vetter , Sam Ravnborg , Jerome Brunet , Marek Vasut , linux-renesas-soc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Joonyoung Shim , linux-rockchip@lists.infradead.org, Alexey Brodkin , Michal Simek , Krzysztof Kozlowski , Jonathan Hunter , Roland Scheidegger , Xinliang Liu , Chen-Yu Tsai , VMware Graphics , NXP Linux Team , Chen Feng , Dave Airlie , Xinwei Kong , Chun-Kuang Hu , Alexandre Torgue , Martin Blumenstingl , linux-arm-msm@vger.kernel.org, Sascha Hauer , Alison Wang , Maarten Lankhorst , linux-mips@vger.kernel.org, Hans de Goede , linux-tegra@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-mediatek@lists.infradead, Hyun Kwon , Philippe Cornu , Sandy Huang , Yannick Fertre , Ludovic Desroches , Thomas Zimmermann , freedreno@lists.freedesktop.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org On Thu, Jan 21, 2021 at 05:35:35PM +0100, Maxime Ripard wrote: > Many drivers reference the plane->state pointer in order to get the > current plane state in their atomic_update or atomic_disable hooks, > which would be the new plane state in the global atomic state since > _swap_state happened when those hooks are run. > = > Use the drm_atomic_get_new_plane_state helper to get that state to make it > more obvious. > = > This was made using the coccinelle script below: > = > @ plane_atomic_func @ > identifier helpers; > identifier func; > @@ > = > ( > static const struct drm_plane_helper_funcs helpers =3D { > ..., > .atomic_disable =3D func, > ..., > }; > | > static const struct drm_plane_helper_funcs helpers =3D { > ..., > .atomic_update =3D func, > ..., > }; > ) > = > @ adds_new_state @ > identifier plane_atomic_func.func; > identifier plane, state; > identifier new_state; > @@ > = > func(struct drm_plane *plane, struct drm_atomic_state *state) > { > ... > - struct drm_plane_state *new_state =3D plane->state; > + struct drm_plane_state *new_state =3D drm_atomic_get_new_plane_state(st= ate, plane); > ... > } > = > @ include depends on adds_new_state @ > @@ > = > #include > = > @ no_include depends on !include && adds_new_state @ > @@ > = > + #include > #include > = > Signed-off-by: Maxime Ripard Looks great. Reviewed-by: Ville Syrj=E4l=E4 -- = Ville Syrj=E4l=E4 Intel _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic