From patchwork Mon Feb 7 16:35:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12737660 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 751F2C433EF for ; Mon, 7 Feb 2022 16:42:59 +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=3I9E3gOpBycPqLKNOPVnw5w+wIpRq4Q/zP2tDI6+iL8=; b=0x5oUOTd1cVCqk BBrEJXVYIM0NSUTb4RR9953L9X4X/1HOds8gSzrriV0RqQolAExqUc4V5ME4rdCpLW4YCGItADwDm x5okUk4jyE/7RzgU4bkDFLm7CUggx5gc8jCjeFqF0TwjdGSQov0t+kz/hNSJM4XtaKSxDZ09XyPY/ PgzmWNkYXt59rdAuPNYC1tCdnwSzIWJvwUtocSmPwqZBx5KRkCeQGy1HXQ+OABoeRR4iVLtUOM7Id yoytfE1JKSJ9PQl3txyvTiBwAd811/WmuJol9qY2JiOLLvD8EINgbsxhssJMFk2hCOawXk/uhcJr1 j+PmH54QxCMAeHUaGUnw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH74b-00BA0F-6g; Mon, 07 Feb 2022 16:41:06 +0000 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH6zX-00B83p-Hq for linux-arm-kernel@lists.infradead.org; Mon, 07 Feb 2022 16:35:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id EA81F2B00137; Mon, 7 Feb 2022 11:35:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 07 Feb 2022 11:35:48 -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=1SGLDDvT9aYX5Q4yTBAo0kI1LCc9lg 3fqbdaIZNH59U=; b=vUGRVq6w+kT7h3rMBtL57GtHJYL8E2SSUwaEzWcHpaddKi Zb7nJ9ThGQ75na/JHudkcP+CHBYZEU3WVR9mvsUNrjOkuvmOVbu9jsyUefGTApe2 LXgyGs88Vvns0oIrZjPUqBk/7n+Q0j+ddzq6I3YgJO4qmc5Ju5NGlpHGQxRil+6w OrDCcq5iWNEa0+YYQD8u3vm19WQkhE3ZMC3nK1dkZflEk0/5VwrFew+tKqWrUrke rrbAWJunS6lkJW48htP87FBonSB9vRXgBd6ROZJZ7dStOCmVCHEM1v8pwWoldwwD Uh5qPXESIKPl6gza+rmF/I1ObAjhA7z3Sn2XsBxw== 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=1SGLDD vT9aYX5Q4yTBAo0kI1LCc9lg3fqbdaIZNH59U=; b=fkGFKOx+QchCRN9F2gQ/f9 249sVbTag7soZUqY1zgVOFaEDAXekuMaRAAG0XsYD2Kk/UIG2eE9FeUdl1+OxbvW IPVbkyuXFbspWWh4fQ080PJaaFWYLyIPPvmQ7hdeNuWiiY0mp998A32kzL1s6QUG PoEMwa7fNMvSXxDbXJ963NXara1pb3/EXTLa3Socnyr663AY2T9jkpmr/+kT2qK/ QqKbNAjeh4ejqrS9Dn6t1ngSAI2QknowVp4Fht2PHtiaKmFrr7VnD7/YAOscJjyp oYFfYM88nI3GLaWhAq6YBCLSQ+kBrh3GapaOycvh/B3wJj3WLrAa+T70zrvYwHTg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Feb 2022 11:35:45 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Cc: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , 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 10/23] drm/exynos: plane: Remove redundant zpos initialisation Date: Mon, 7 Feb 2022 17:35:02 +0100 Message-Id: <20220207163515.1038648-11-maxime@cerno.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207163515.1038648-1-maxime@cerno.tech> References: <20220207163515.1038648-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220207_083551_638261_4E44A744 X-CRM114-Status: GOOD ( 11.64 ) 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 7 16:35:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12737665 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 5E5B4C433EF for ; Mon, 7 Feb 2022 16:44:17 +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=QFKCZOkEVXmOHr2pkVht8JZ8BgTu/zP2l67saSHwqSM=; b=MMyX1qLIw6JgRD o7SGj/RuIBNfxjVmjLbYjbJ4OrrO6L9I9Cjwbsa/V7b0kNE1wRUUbCCadqerGjMtvPMAKU8Q3nO1R IcV7Ic34nHzC7Nh1bZEHVlTJvTpmMlCoATJEDTmXAJXZ856sy8amZjSlDsstLRVVMEGVEwQYj6YJI 4IIBamLkEu1AtqGs1QOB72WxBWsQlWPUGocmMVcXnz07dCuxUsXu8hYTEfjbWpWlBO6BhpIuXGQ4o ei4NZHN0R8+4MyKPJap4t2OBVQ40Vwzl8taLNg2hC8nqdrJa4ICrrCjKAU1d47baTllgl8iH4kcpl B165ccTKupOd3tyxrNMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH75v-00BAWL-Oy; Mon, 07 Feb 2022 16:42:28 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH6zY-00B850-Bz for linux-arm-kernel@lists.infradead.org; Mon, 07 Feb 2022 16:35:53 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id DE89D5801E3; Mon, 7 Feb 2022 11:35:50 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 07 Feb 2022 11:35:50 -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=xhKVkS6XIZgUH0LRLr+qOPiV5PE9/Z MNzxpdkFVUd1Q=; b=Xd3R5cOhPJN7Wz5H5LxykZUI5Aub4u9z3b0wuRF6LrcPP1 LZjDRV2v1hXEPqQyhaUrbtEqG66GM4UYSUvN1f3Ty5JTbJfYXe8EFbnBibGi0Gsp NELHLgbdDapZT1/k276lVwoHQq50lwj+WJt1FEJhq0MA4uaTYKcoNzrZ2UXlJqaW J7CYXL/s97dZQHw8aeV7SRaAQc3z+yzZzG8ii2RcIul9iMY+VT6longG6Jc8/Xvl Ji7uwjrEumP12kGY2BZwB9lThAzJ2K3KPfi4O+dpdvfubRuawoiln8Q/FmjvNzSf sha+o3B1pVjn0Y3Ku/LseXNy2NhdXRJB7e8baelA== 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=xhKVkS 6XIZgUH0LRLr+qOPiV5PE9/ZMNzxpdkFVUd1Q=; b=b4fk5q7Q4sPW8OhQDSgjfv PbRoOen5Z6TfAFGoVYXCLDySJfXXPj6R6M22QvNFHy6A81bT6jE2Ddpy2QIagfOi PBoPe/tbbBZI/TGKImwj9JaP7emep8HgyNHYwzMJQ6zKnofIVhi+iG3463kY9kcL /NzB5VgZviP/jj+FYmSYnpHrd5Vi46SFG6Ux0OA9WIEGzMm8+otQ2SwCnuxHIhrP qDZ/02mjghwhux9s1dXE3/RVxYSvzwPPjS2e4FkqXNMUWbnjK9M9uDDBOzU0Z5lh cq6gK0RmWUtP9TBbtTpbuuomtnXeKaJBgtBhC9stZNhLfjB0L/M/bDTyJARHg6fw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Feb 2022 11:35:49 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Cc: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Fabio Estevam , Pengutronix Kernel Team , Philipp Zabel , Sascha Hauer , Shawn Guo Subject: [PATCH 11/23] drm/imx: ipuv3-plane: Remove redundant zpos initialisation Date: Mon, 7 Feb 2022 17:35:03 +0100 Message-Id: <20220207163515.1038648-12-maxime@cerno.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207163515.1038648-1-maxime@cerno.tech> References: <20220207163515.1038648-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220207_083552_533305_CB06EE2E X-CRM114-Status: UNSURE ( 9.90 ) X-CRM114-Notice: Please train this message. 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 7 16:35:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12737666 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 CE437C433EF for ; Mon, 7 Feb 2022 16:45:21 +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=WamcGmgXBQI/90m+Gag+htBeZ/V8NDxrxn+M2OEMhYg=; b=W0E5Z3Im/WnIHf H+DJyWdzzlD+/HwCh08fS2deWuqYhB6i+/Ttzz8LM6mR8WmwBWpQDDQokh4BmMpBfqussmq6KGkwJ Vtjd9ne85a/+M7c7gWDDgW5YUvuf5z1AauA/RUBYhaTvnVjGzUn33K2B+YW0flp+QPL+E2aF7E358 i7Xsk7S5bUilJJLPW2PKHonUfsrwzmDgbaxdPmH0sMKNBEzHVNjqDg/poOJoHT836BM0EPiTJ2FTW MWQ0hwozTU8v/+nUyG9mXmVkFIbgbo5HNhzkMDHa2SOdREVRchULkjFHMiHoVkKisH08CIRcDHc0t DFxgs4TrpLNxlz6hUGSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH76s-00BAqx-NH; Mon, 07 Feb 2022 16:43:29 +0000 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH6zy-00B8IR-Dc for linux-arm-kernel@lists.infradead.org; Mon, 07 Feb 2022 16:36:20 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 9C87B2B0015B; Mon, 7 Feb 2022 11:36:16 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 07 Feb 2022 11:36:17 -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=V8EVNwc5nHynWtDy2ZcZZsjHZn7jq0 wud2WmvRiUFsM=; b=WF8LhGW4cnYGmHwbJtXnP0iTA2MujGLHhFHw5pFc7WqkJL Ln/Wl7D9SzVJ9KeeMez8oWFeD+arJ/7w3IiMKUqyJCHI1Qv9qGo+40izdo3cOUoQ sIy1RqZqJItjivQH8yy1crvrqimqbQJqCK2rH1WRz7eIOFn6TKJVb5MytbKb6yy5 EJ4j5ai9soxy8PdzaaPe4jdvbXxiOJfPGq8jmwmQQOAjm1RLMJHaLK+hIZO9C40y JhKeSuXokSSO6PnlAHhefK/FG4oMC2Pdr7kha7rj/TTZGQzwO7leVEeQ8WV9vIvU G05xBbc22pzHlNj6tG30a1x0aQhGTKrGpvrFVjzQ== 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=V8EVNw c5nHynWtDy2ZcZZsjHZn7jq0wud2WmvRiUFsM=; b=SNeqJBqShwbxVaQEGvHE4u C9dBFZJ0M46qhEhyCpDj3ToiC/J6jTvI+qzLkl84VXYgkgBBKd+X+9kF51P2vL2F yGQhWotIyRkvqCmiglop5eN5cwX2kQ3qewzzvbFY/EeowPr4DQOjPn8fWyBNrtNn GaQsqXuBGi5iOsSSzJfMgsWyQ6UxwVPBk+Xe/FZx9OacoPpC+GLmivJiWK9LhffZ h0NYu/l14FhQbTMviFdWGq37XA938Dk1NahTuP4oqF60R/mb5wJr2P3cvpjiF6qF HkQAbUTGMRwcX40iQb0XXu71RQCIrX2ABxi5d8I68uhnQnEyMSiSFWQGD+/RASCQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Feb 2022 11:36:15 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Cc: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Chen-Yu Tsai , Jernej Skrabec Subject: [PATCH 18/23] drm/sun4i: layer: Remove redundant zpos initialisation Date: Mon, 7 Feb 2022 17:35:10 +0100 Message-Id: <20220207163515.1038648-19-maxime@cerno.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207163515.1038648-1-maxime@cerno.tech> References: <20220207163515.1038648-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220207_083618_566213_4A3784AD X-CRM114-Status: GOOD ( 14.30 ) 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 Cc: Jernej Skrabec Signed-off-by: Maxime Ripard Reviewed-by: Jernej Skrabec --- 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 7 16:35:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12737667 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 03AB0C433F5 for ; Mon, 7 Feb 2022 16:46:17 +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=MXO+ojQ06RaRoJIY5Cb+Hw8mLAe6uiY0j/ryWVCmYPc=; b=jl3RpgR4JAev0z 5ndvAW9IGcrVMHgQWCKlvf01ToMtu+Rrpi/2K3s7pBBeyMIRUJPgzyk4zI0OaAWyXMs4aJCErUAXm yukeYEiBd8mKVl9F9fo+qAD9rJMLN2nEivtbMPhDYun9yFLtxoLJWrgU/EOcFb3wq+rx2NTclnWHp HU1lhoQmtlPzhb1xlyJxuIZqB+N1EiExtXT0MjDFEYsRl4T5bjrt/rIDJGgsdCYYYtLJqQWrNdkHL JxlI9IhGbB8ZMAA/kydQ8XNwXsXlIzpkyCvFcA8kcrdyzbAAmsQGF8wpSOmeAql1jlOYqsfwJuMW4 U7N3IREHQbKXInPQ7WVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH77r-00BBAY-9M; Mon, 07 Feb 2022 16:44:28 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH70A-00B8Ol-Cx for linux-arm-kernel@lists.infradead.org; Mon, 07 Feb 2022 16:36:31 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 85FCC5801E3; Mon, 7 Feb 2022 11:36:29 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 07 Feb 2022 11:36:29 -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=tUuaRCM/V57xS9/bxKdm9N2vJq5Tzx 2/8M4BwH//DCw=; b=EKLjIlwXiuwSfrh1YY+hlnIq0lkj48KvVHElSH8XMkQIjS /BCsrIgBFdePDReTCqNA1rrnyMUxoQGJlu4c5utKVaBDT3A9CjLINTUvRyOXCHue 1U/hxx+AhWB7QXPSAy0XJMYg/R7S/nTkpC1n9qLO/7TeDE210vbybntZDQOlBbjo QT8U75d7qt2TANGIRVF0go/+sAw4wHi0L6YFNsExQ2bachUtd+BEdIii5zF5AcWy 9uw5I6RXSjRzTGwhfXlIi52kr4hWmeRR+Q0TvBbrNDLUWZ6DQ66vtXI0dkPArj0F YCx5+M6BtJGbEKJkWgQKNZMzCvEt6zd8tDBqhdmQ== 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=tUuaRC M/V57xS9/bxKdm9N2vJq5Tzx2/8M4BwH//DCw=; b=g7Y5TPiIhLDun0TfsIw3LW GTE+NmIy03RNei/nTYEgOWTLCI2AApJ+FX4ilEfPnwV+90RZvEtppO9uF0E4Dw8Z Px0jHbY9yfraODQDC6yi39sIAHE8XO8fBULEo7wDvFMeY12KrheaCURkVDSrvtgR oZcb7l6kp6b10gbXlRenGFOePsyU3ZALepHakhka+LhwpWpq/5vytKds0urjSQQS esh++tdgFxUa9Kzt2sJ3P78UN+goUa2CbSBecUCgmlrZ0XrlbL2h6QJO/6BCIrtP u9o+gl9bCtn3ugb4CxHu/i480KdXNa6i6ip13I02UWZ0/gxYa9PI/8iQwvXQc/tA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Feb 2022 11:36:28 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Cc: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Fabio Estevam , Pengutronix Kernel Team , Philipp Zabel , Sascha Hauer , Shawn Guo Subject: [PATCH 22/23] drm/imx: ipuv3-plane: Remove redundant color encoding and range initialisation Date: Mon, 7 Feb 2022 17:35:14 +0100 Message-Id: <20220207163515.1038648-23-maxime@cerno.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207163515.1038648-1-maxime@cerno.tech> References: <20220207163515.1038648-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220207_083630_561581_37E24DF6 X-CRM114-Status: GOOD ( 11.16 ) 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 *