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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 40F1DC433EF for ; Mon, 21 Feb 2022 09:59:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 56FA910E59E; Mon, 21 Feb 2022 09:59:48 +0000 (UTC) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by gabe.freedesktop.org (Postfix) with ESMTPS id C043E10E30C for ; Mon, 21 Feb 2022 09:59:32 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 1018158025C; Mon, 21 Feb 2022 04:59:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 21 Feb 2022 04:59:32 -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=VPg+UnfrAzU5ntjvg2DJr90goy3Svo 9ACwSAth3XrMs=; b=S09kgt4/eROIjTu5vAyveowY6F9/TRrCI4TnZtAW5emQg+ 9MQTpciIOVDjMqhj72CVnxhxGoDxfT3RQuyqyeETJgLIUVcpFJLyEmG4+lXL16R4 hWIB7CgkqinByPWpC5JGCCSbH7xDiXUlYeYY8wZ6xAW7L7TnHdyCYEg1Bw6UsraZ /YZJRaSL0yjSxA6oSor8OlP+lj0RrgMatErEId5FRIFb+IGF3Tn4Q0+qoxpgdxc4 m4f8TvxNouKv0Wz5M10FQjFJucR+RYFr7ToBgpCxE/SOE7CRfXRdwAG2cfvG0xLl 6VJ1/FX86lY0usA4RZVesqOzYdIYAm+Vyei2A2Hg== 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=VPg+Un frAzU5ntjvg2DJr90goy3Svo9ACwSAth3XrMs=; b=ErXr6gQSk31SG1N8Hr0LQR Pfu5kN9/0CkgZp+xgwY3/+0O0g/7LVf1snCCy3D4yBbLBCHxOdAf1EZx9KUo0hO9 xJDSfnd3ZvqSj0NAbZpV7EfFSCsqD00kFcVj2Ic/LLUODCHBKOVUO4KjP9ImCts/ /5BXLc2tSEK+7BJQfpEzGqoNTqO2v1k692SmFK1cNDACWAIkQhVkSwafVcbcPAvQ ItGma5PYSbidQLwYkHNhOQ2iozpb7EzRXYNzIKQRkD5QkxCG+Om2rDmu7AQMpnX6 6tIM3lr3E3fODf78RXRZof/KBPXC29syaZ3FYcA1l9f1vtpCNPQyGaL1/2Frw36w == 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:31 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Subject: [PATCH v2 04/22] drm/omap: plane: Fix zpos initial value mismatch Date: Mon, 21 Feb 2022 10:59:00 +0100 Message-Id: <20220221095918.18763-5-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 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dom Cobley , Tim Gover , Dave Stevenson , dri-devel@lists.freedesktop.org, Tomi Valkeinen , Maxime Ripard , Thomas Zimmermann , Phil Elwell Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" While the omap_plane_init() function calls drm_plane_create_zpos_property() with an initial value of 0, omap_plane_reset() will force it to another value depending on the plane type. Fix the discrepancy by setting the initial zpos value to the same value in the drm_plane_create_zpos_property() call. Reviewed-by: Tomi Valkeinen Signed-off-by: Maxime Ripard --- drivers/gpu/drm/omapdrm/omap_plane.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index b35205c4e979..e67baf9a942c 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c @@ -533,6 +533,7 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, unsigned int num_planes = dispc_get_num_ovls(priv->dispc); struct drm_plane *plane; struct omap_plane *omap_plane; + unsigned int zpos; int ret; u32 nformats; const u32 *formats; @@ -564,7 +565,16 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, drm_plane_helper_add(plane, &omap_plane_helper_funcs); omap_plane_install_properties(plane, &plane->base); - drm_plane_create_zpos_property(plane, 0, 0, num_planes - 1); + + /* + * Set the zpos default depending on whether we are a primary or overlay + * plane. + */ + if (plane->type == DRM_PLANE_TYPE_PRIMARY) + zpos = 0; + else + zpos = omap_plane->id; + drm_plane_create_zpos_property(plane, zpos, 0, num_planes - 1); drm_plane_create_alpha_property(plane); drm_plane_create_blend_mode_property(plane, BIT(DRM_MODE_BLEND_PREMULTI) | BIT(DRM_MODE_BLEND_COVERAGE)); -- 2.35.1