From patchwork Mon Feb 21 09:59:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12753403 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73A7EC433F5 for ; Mon, 21 Feb 2022 10:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PVWZQXsF1DOOD5WLTGO5pVBNVFGVK8tpSs/ljv/mihg=; b=xpIixkruoOgA7+ U1P6e9+IPAi6tLZerU6bXUytx35DLuMd4aqSCvuWj/S9RPO6nPOtl8ufLTYOK33yC/Ur+uAcNiro4 u8TQUg+h3KZvYftoTE7p3WK3BVWDQDd+x3G/4uESMDb5PzKMxwspPYH/5OmTRqy5hy4uRMkw5MklK ViwMer4m0QITHjHBwWVLy2BmfWUP7+sxr3X8vJfqCejgpvNNdNKoHS7G7rdjDpLDRLZfHxkuATJAC oxVh0T74RX0rC9p275KS+oVc2IVTOL5PRgWAM9O1blwx7hPKXbDQKn1NzXXhNZIHfQGyTuANCfUcW XFDO5JcR3cnF9b7n4MBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM63e-0050JJ-Ub; Mon, 21 Feb 2022 10:36:44 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM5Tu-004jIc-E0 for linux-arm-kernel@lists.infradead.org; Mon, 21 Feb 2022 09:59:48 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 8F94658025F; Mon, 21 Feb 2022 04:59:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 21 Feb 2022 04:59:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=SBKxndqRJqKTGvR4OSR8aSqZ+CMFFL Md5Wo8SczSeY0=; b=U8DTRtD3oTrkbtNcH2d7Uus7uiq3VRFP+rZ1I/Cjo9/xDW NNVc0iT5az6Us1qjD9S4tQLzz5248KEyehA70OwSTXyennyBjXwK0bn1AQHQ1U0w m31a3Ii0iwAyuKgoQX6d2/WHsdLfj2OI5KsilA1abC8SUdjCJxu89Wu38o9H9YWV FmWvg75598w09E5n9kSZkwzX/jqbA4gCuTB+TGBLv5FPt6JCF+3pYFC1YjWtqRfz OMGLuzKRH+iFDK+xYS2cjAcDI2EBaA6yUMs1h0PwyPzDcVNDt2asJcf5qITG8SRe 5+RL1EU1Uhlymo/S+iVRwDiNkwKVhL+rA0l1+FNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=SBKxnd qRJqKTGvR4OSR8aSqZ+CMFFLMd5Wo8SczSeY0=; b=BjitJw1W4NWeRT6fQXc3aj /YILW97eHipeUKO2Qz5qbxwI+ekmL69kv8AugrLf7BB8TM1fzNyqLU0iuxfW4bTx 0c3SuUXTnypNcYY3Pn4CjmjAqztO3xIhKXeLJfom8sYtQXCBVsbcyO1HQJrBwBCK PgrmFE790755IAR7ummwU9Paqf4GNQuAlHE3fG6qJ9yAkSb98u7peF1JUeb1K0Hg qB/1e4x2n0Hk7ik/KkW8jEAUIukeDKSbImMl1gwmrV7kPndBtpyN4yxU9pDhj0G3 eheVhZa/tLQyicAodHR4/A/jcZfL7XKywW0gryd6Obd4mQnG30h6YPA+QwHGm3pQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeeigddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Feb 2022 04:59:43 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Cc: Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Alim Akhtar , Inki Dae , Joonyoung Shim , Krzysztof Kozlowski , Kyungmin Park , Seung-Woo Kim Subject: [PATCH v2 10/22] drm/exynos: plane: Remove redundant zpos initialisation Date: Mon, 21 Feb 2022 10:59:06 +0100 Message-Id: <20220221095918.18763-11-maxime@cerno.tech> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221095918.18763-1-maxime@cerno.tech> References: <20220221095918.18763-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_015946_592653_B4FBA448 X-CRM114-Status: GOOD ( 12.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The exynos KMS driver will call drm_plane_create_zpos_property() with an init value depending on the plane purpose. Since the initial value wasn't carried over in the state, the driver had to set it again in exynos_drm_plane_reset(). However, the helpers have been adjusted to set it properly at reset, so this is not needed anymore. Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: Alim Akhtar Cc: Inki Dae Cc: Joonyoung Shim Cc: Krzysztof Kozlowski Cc: Kyungmin Park Cc: Seung-Woo Kim Signed-off-by: Maxime Ripard --- drivers/gpu/drm/exynos/exynos_drm_plane.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index df76bdee7dca..3615cf329e32 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c @@ -122,7 +122,6 @@ static void exynos_plane_mode_set(struct exynos_drm_plane_state *exynos_state) static void exynos_drm_plane_reset(struct drm_plane *plane) { - struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane); struct exynos_drm_plane_state *exynos_state; if (plane->state) { @@ -133,10 +132,8 @@ static void exynos_drm_plane_reset(struct drm_plane *plane) } exynos_state = kzalloc(sizeof(*exynos_state), GFP_KERNEL); - if (exynos_state) { + if (exynos_state) __drm_atomic_helper_plane_reset(plane, &exynos_state->base); - plane->state->zpos = exynos_plane->config->zpos; - } } static struct drm_plane_state * From patchwork Mon Feb 21 09:59:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12753407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 474DEC433EF for ; Mon, 21 Feb 2022 10:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V3FA+Y6L5Lee58vuj3w00hHoKZIM5EcNZ3/vL3yT0eM=; b=FyafZZCpmFTtF7 tTER6VUZAP01pjKUckX+WqWQoETchCzsrTNC/sZXhOTEeXfLIzlj4+hk/BvW4J7fdtvzi/Hi6q/s8 0Pe/opwWpQPH1URevS/gguU7adgrfjoHqf9HRmmWq5z6oaVSZTRZU7c3VEbcHR+CBS5/FVrXrjRig T/smJG3Z5UZ6WhyEu9rwxq0nXIl7CFNTUxPGQmRyli0m5y5DL/Y5QXQiWDJQu5TqQTM5RvwFgylhQ I0sobUyJ8JPqJfAUCLIekwIWgtZZlGooPgGrJWp0KB7YDRzNpPsBvxfmqZi0Ru5hkJBM/xonxt/1m hqNC1czMVuNgJ3t2hRLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM64m-0050r0-2p; Mon, 21 Feb 2022 10:37:52 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM5Tw-004jJa-GD for linux-arm-kernel@lists.infradead.org; Mon, 21 Feb 2022 09:59:50 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id B111D580259; Mon, 21 Feb 2022 04:59:47 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 21 Feb 2022 04:59:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=Esm2do0nmj72SvXO6N2Mer4L5GKfLq 5MKLEQEdP4jfI=; b=aZWIikjF+oY59WWCb4r+CEU+KQyDBlFZZF9wNA4uBC8/NV kg5M+5q9v1AsbHfwFKXx5a4ZXlwaf8cs8tQNHYJRspohIW54/rkN0Rl+/9TFbk6f azrsUj/IumQDx6f5vyjjQlZNODtiAVbfKpJPlDgTLmMrWGrlC51v15DYHz4DIlA6 RBTAiZrbEh7aaE0cJ9o2jyGta3za/MMGpOnY7FNfM01Hwymxi5VlsYUN2RLmMmAn GD16JsHAIrF8SCQkvU3iwGfZLZ4yebv8ctGp4fdp5tIU9ikrWm+E3e5jTwhTzqPe 9pyZyZDYdAe1RyrU8UjXYWe0moW6YLe8hN38fZbA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Esm2do 0nmj72SvXO6N2Mer4L5GKfLq5MKLEQEdP4jfI=; b=NCTQutcVUHpA45a4KxyMkp 6jUaLSq5JsTYgfo4Bv7/RlhzoQcQKIS4cwXPo3ug2+NoPJ1HeegOOvQsFN64beGA mcSC4/IrHzRDbnzZBY7jFqIuLzVEIRY26lIL66GSk52tW1rFCqwWOEYXGTGc4gcc DjCfMofgbD5O7bbvHbL2lZwvcJSneu7RBPNpu9WzUBtfvLJy4HjB5lHXxkiURNdl mMB7m6jtT9yfIiyVvkaNoEqUhDY+NwmAop53O1jM5THGIJEJkVHjdY4Qx5CSmB7W S2PZ/1eDHXysjN7GUQLn8YOcYTDH6Yf+xexFrl85aBvMnK3xxCtyVuct0/vSVucw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeeigddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Feb 2022 04:59:46 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Cc: Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Fabio Estevam , Pengutronix Kernel Team , Philipp Zabel , Sascha Hauer , Shawn Guo Subject: [PATCH v2 11/22] drm/imx: ipuv3-plane: Remove redundant zpos initialisation Date: Mon, 21 Feb 2022 10:59:07 +0100 Message-Id: <20220221095918.18763-12-maxime@cerno.tech> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221095918.18763-1-maxime@cerno.tech> References: <20220221095918.18763-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_015948_674529_092E16DA X-CRM114-Status: GOOD ( 10.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The imx KMS driver will call drm_plane_create_zpos_property() with an init value depending on the plane purpose. Since the initial value wasn't carried over in the state, the driver had to set it again in ipu_plane_state_reset(). However, the helpers have been adjusted to set it properly at reset, so this is not needed anymore. Cc: linux-arm-kernel@lists.infradead.org Cc: NXP Linux Team Cc: Fabio Estevam Cc: Pengutronix Kernel Team Cc: Philipp Zabel Cc: Sascha Hauer Cc: Shawn Guo Signed-off-by: Maxime Ripard --- drivers/gpu/drm/imx/ipuv3-plane.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 846c1aae69c8..414bdf08d0b0 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c @@ -297,7 +297,6 @@ void ipu_plane_disable_deferred(struct drm_plane *plane) static void ipu_plane_state_reset(struct drm_plane *plane) { - unsigned int zpos = (plane->type == DRM_PLANE_TYPE_PRIMARY) ? 0 : 1; struct ipu_plane_state *ipu_state; if (plane->state) { @@ -311,8 +310,6 @@ static void ipu_plane_state_reset(struct drm_plane *plane) if (ipu_state) { __drm_atomic_helper_plane_reset(plane, &ipu_state->base); - ipu_state->base.zpos = zpos; - ipu_state->base.normalized_zpos = zpos; ipu_state->base.color_encoding = DRM_COLOR_YCBCR_BT601; ipu_state->base.color_range = DRM_COLOR_YCBCR_LIMITED_RANGE; } From patchwork Mon Feb 21 09:59:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12753408 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D862EC433F5 for ; Mon, 21 Feb 2022 10:42:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RCbtyZ4Yx9LBzRGq1SgMYlNe621oztEkbt82DzK6Hhk=; b=B1ZnAy+NWlYBNP T0VprX8URXF1lH5LaXhotnvm07KwaAYIH2uet+DSHaSWn2ExnkhjNCbKPRV/cy1LYdz/7iFYBRc8t GGcgCH7rLG/vCT8pf+QHat1cnoqIvir2jtnBYcWOQHbS7iLLmWGXnVtPii6byku391FRSoLkLm4zA T/L0dYijY0rxhcIdlutAiSdu7Iln+xaFCP8lN11/J9488VHpcctX01ZjRnpA9GccyLyfzol9XPWt7 HYMcjXYcs6qA1d80wUEIago9gm7iJw7WcEDZ6sHIykcLKuB65CTvULTc0ONTL+35ZUd6cdWvcYCGJ T8I0ElZz0h82vo43fEHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM67S-0052C3-Rk; Mon, 21 Feb 2022 10:40:42 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM5U9-004jR1-1n for linux-arm-kernel@lists.infradead.org; Mon, 21 Feb 2022 10:00:02 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 4C2A7580263; Mon, 21 Feb 2022 05:00:00 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 21 Feb 2022 05:00:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=+znYlsTYo3T9d5Ixvozjp/PRDBbb4A hXJw9LtbbgDbI=; b=kLFncAvw+M+JXuOKheuemYtEiaci8pToqcFfoujpvn4vIF yaIUPNMvnyimc/qVZulxA8RcSvGCUuPriPOrksdu8gfxDyqjUHwKki0K6x8KFL4K EQrljq+jkwsGOlLdTHP+t5eiB/Fdq97AssieErL3dejUqo652Al3khNv9l9Q8/lF ZfkiUCijYyVAzHrjYa8kWROvB9NcV+FsONH2uPIP4lGbmgaWWgSPNcR0bFe9RMpU Ds+pg82QFIKm5ovd701gGiu/n+WHxj85wzblVPndvmpgjQDIp/YPS2MHQrF59Eo+ tQwTqb5HCciGqbqJB9sthtEkGT3hegkSd4wDLnaw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=+znYls TYo3T9d5Ixvozjp/PRDBbb4AhXJw9LtbbgDbI=; b=Y5hnJ2TBIugNOd2Gt+d+UB OQY9Qt/jXnQF0or0ep7j0qkMnmq85/dX5q+9Mr8bFKsqSdwsaOHPCK7FRJl4Z30C uMjFiL57HlQJjy1lsJjyRPzSzNd2T9u9jrnbeIfGJlD61S+FIMRQ4jElSCo9FBrX KUokFG4hD44PhO+IC4sDuUq8p9b+QRtGlE2Mwaj4raht6UvXu880fzhqhjtNVvyH 9Xwya+pkgHzfMMEPlDrxFFR+qyQHl0CNxRCBCH0SpnNlbjFjxoMWCt0XGknuZcco lMP1ZIGAInLpkcJaZ1h/lfACR3iSv10VeLNEep8+mym4yFxSFDx+YTWWGFL/Hk1w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeeigddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Feb 2022 04:59:59 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Cc: Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Chen-Yu Tsai , Jernej Skrabec Subject: [PATCH v2 17/22] drm/sun4i: layer: Remove redundant zpos initialisation Date: Mon, 21 Feb 2022 10:59:13 +0100 Message-Id: <20220221095918.18763-18-maxime@cerno.tech> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221095918.18763-1-maxime@cerno.tech> References: <20220221095918.18763-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_020001_219091_6ABE55F4 X-CRM114-Status: GOOD ( 14.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The sun4i KMS driver will call drm_plane_create_zpos_property() with an init value depending on the plane type. Since the initial value wasn't carried over in the state, the driver had to set it again in sun4i_backend_layer_reset(). However, the helpers have been adjusted to set it properly at reset, so this is not needed anymore. Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@lists.linux.dev Cc: Chen-Yu Tsai Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_layer.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c index 929e95f86b5b..6d43080791a0 100644 --- a/drivers/gpu/drm/sun4i/sun4i_layer.c +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c @@ -18,7 +18,6 @@ static void sun4i_backend_layer_reset(struct drm_plane *plane) { - struct sun4i_layer *layer = plane_to_sun4i_layer(plane); struct sun4i_layer_state *state; if (plane->state) { @@ -31,10 +30,8 @@ static void sun4i_backend_layer_reset(struct drm_plane *plane) } state = kzalloc(sizeof(*state), GFP_KERNEL); - if (state) { + if (state) __drm_atomic_helper_plane_reset(plane, &state->state); - plane->state->zpos = layer->id; - } } static struct drm_plane_state * @@ -192,7 +189,8 @@ static const uint64_t sun4i_layer_modifiers[] = { static struct sun4i_layer *sun4i_layer_init_one(struct drm_device *drm, struct sun4i_backend *backend, - enum drm_plane_type type) + enum drm_plane_type type, + unsigned int id) { const uint64_t *modifiers = sun4i_layer_modifiers; const uint32_t *formats = sun4i_layer_formats; @@ -204,6 +202,7 @@ static struct sun4i_layer *sun4i_layer_init_one(struct drm_device *drm, if (!layer) return ERR_PTR(-ENOMEM); + layer->id = id; layer->backend = backend; if (IS_ERR_OR_NULL(backend->frontend)) { @@ -226,8 +225,8 @@ static struct sun4i_layer *sun4i_layer_init_one(struct drm_device *drm, &sun4i_backend_layer_helper_funcs); drm_plane_create_alpha_property(&layer->plane); - drm_plane_create_zpos_property(&layer->plane, 0, 0, - SUN4I_BACKEND_NUM_LAYERS - 1); + drm_plane_create_zpos_property(&layer->plane, layer->id, + 0, SUN4I_BACKEND_NUM_LAYERS - 1); return layer; } @@ -249,14 +248,13 @@ struct drm_plane **sun4i_layers_init(struct drm_device *drm, enum drm_plane_type type = i ? DRM_PLANE_TYPE_OVERLAY : DRM_PLANE_TYPE_PRIMARY; struct sun4i_layer *layer; - layer = sun4i_layer_init_one(drm, backend, type); + layer = sun4i_layer_init_one(drm, backend, type, i); if (IS_ERR(layer)) { dev_err(drm->dev, "Couldn't initialize %s plane\n", i ? "overlay" : "primary"); return ERR_CAST(layer); } - layer->id = i; planes[i] = &layer->plane; } From patchwork Mon Feb 21 09:59:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12753409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93097C433F5 for ; Mon, 21 Feb 2022 10:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7P2cZ9QUT4+LlVmcUMRkwVjaTb8wHFN0ZrqRCKIN/nk=; b=zfljnP55dBY1PT DEeJZARVR6kUoLgumqsC/39Ws9vZ3TEQhqKGh9ILgdZA7XDrOBV9M9HAvyVBuw5qIkhF0SSCt6RqY T+O2J582RJpAduHDTbmFP7XIIFiV+ji2UWyehwPw/yJy2VdluYfYErkJwqOj/vUOT5a/FJC5t6afi LlISXUvazsAJW++c50uVJgaizvyCoZTzggPm19mJnU3PkAC7WTRYruWoH3l3wWyYJ2pm1cbKVxRLh UlHaQMTdxim6BVfoKwyYF/B3tU/mnyyQOcpJX97gu24jBI93e/ZsA71Qm71EF/Pij5HB9ZJcIxS4r srlqMtCYEQFxcRNkuDHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM68Z-0052gb-3Z; Mon, 21 Feb 2022 10:41:49 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM5UK-004jXW-O0 for linux-arm-kernel@lists.infradead.org; Mon, 21 Feb 2022 10:00:14 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id F1B26580263; Mon, 21 Feb 2022 05:00:11 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 21 Feb 2022 05:00:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=wo7FPeVWcNwQpaAIKec1keSAY7TMIw rBbsYQO8S+w+A=; b=B8FgR3sCJLWpKMtN0zAS+wpJW16KR5RFXlIZF13uiyprbG gktvFBUgER6uhSV32IFptkArPlQQGCeZroHs7DWpZQwFp9b61ekxXY3AzvtXA/Vt S3qh50NfX0SagN+EoSrAnN8YLbphrkPalYQco8MTtojaUf8WAFLVLMBLTIvRnCQJ rZq6Evn3U1wj6oalunOXcnTFX2EeMVxNSdRDy2hkQxY9HW9zs/f4QwmEsV8BeEPZ uLEOoyaPuq06XQAEzISMNLlTbejilOFPc/i6faWnF5Vcu+jrd0Vz4y/O2SmZezH6 6/ww7ra47rlQJRewPuh2yEpljX813gIgTC/tEB9w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=wo7FPe VWcNwQpaAIKec1keSAY7TMIwrBbsYQO8S+w+A=; b=CsnfciTxo0Le1GCB7XPs9d yX2Fs0vYWJc0yDjpcF4w76mbNUUydjqWmOgLRlqDTxBWNFOUaqPsbWPsWRQtZTGv 5Utm6Bs/mdtC+3rQMkfxGJnMrXlARNUSoIMJCbI8IRM16FaZ2v248/ZXwkTnXzJi gU+8on1nCMEtR82FLrBjooHLE1KJI3psrQQ2owIyFtIF5y+cbuFcf5RbNiD9AFNQ vLRQ8wriKgELvaxpQrDnoTMJAXYG43WkkH4JMdexkusgQS93b8VRZ1sHSoJmhxqh 2K+56acy5rfomJE8c2n5Sfx0hERsMaInI/sCvDpTZnzWFwAnd2zeyLNxV9P3YEaQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeeigddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Feb 2022 05:00:10 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Cc: Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Fabio Estevam , Pengutronix Kernel Team , Philipp Zabel , Sascha Hauer , Shawn Guo Subject: [PATCH v2 21/22] drm/imx: ipuv3-plane: Remove redundant color encoding and range initialisation Date: Mon, 21 Feb 2022 10:59:17 +0100 Message-Id: <20220221095918.18763-22-maxime@cerno.tech> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221095918.18763-1-maxime@cerno.tech> References: <20220221095918.18763-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_020012_928565_E92571FE X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The imx KMS driver will call drm_plane_create_color_properties() with a default encoding and range values of BT601 and Limited Range, respectively. Since the initial value wasn't carried over in the state, the driver had to set it again in ipu_plane_state_reset(). However, the helpers have been adjusted to set it properly at reset, so this is not needed anymore. Cc: linux-arm-kernel@lists.infradead.org Cc: NXP Linux Team Cc: Fabio Estevam Cc: Pengutronix Kernel Team Cc: Philipp Zabel Cc: Sascha Hauer Cc: Shawn Guo Signed-off-by: Maxime Ripard --- drivers/gpu/drm/imx/ipuv3-plane.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 414bdf08d0b0..36b32e8806e3 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c @@ -308,11 +308,8 @@ static void ipu_plane_state_reset(struct drm_plane *plane) ipu_state = kzalloc(sizeof(*ipu_state), GFP_KERNEL); - if (ipu_state) { + if (ipu_state) __drm_atomic_helper_plane_reset(plane, &ipu_state->base); - ipu_state->base.color_encoding = DRM_COLOR_YCBCR_BT601; - ipu_state->base.color_range = DRM_COLOR_YCBCR_LIMITED_RANGE; - } } static struct drm_plane_state *