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 0FB27C433F5 for ; Mon, 7 Feb 2022 16:36:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 264C910F8DC; Mon, 7 Feb 2022 16:36:04 +0000 (UTC) Received: from wnew4-smtp.messagingengine.com (wnew4-smtp.messagingengine.com [64.147.123.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B3E710F8BB for ; Mon, 7 Feb 2022 16:36:02 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 425982B0014F; Mon, 7 Feb 2022 11:36:01 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 07 Feb 2022 11:36:02 -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=jL7uYegVQeL8Wy6fPZYFOhl8vanvRS yOBuwigSpRMpc=; b=J85drTNnm0oL86qM/72mCsyESh5PMNzlv+yrt9fVA13ain 6ieumesEwYw3L/YMh6anfJMOxBvLcKJO33mvAHaM9pfdwzFydBMB5kJPvUxCXZsc VZOFNF5Sq8dmYGeK6x0PH3M/0F7cmwgWxkTU+7JG90jloofLt7YcMXCYKgei6K+/ Tsz+lClyWZtqZ2MxNVZXhAGbT01mXkjLNaaHZEOy3Nq3j/1O5Hu+JhUIptkqCHtB HWkx71TDa8Ui0+GY7biGrwgTkuWUFT9QhleVnb9DBVK2gaz17j/xiwj+lIBsCD+E x6GY8hJhDyE7HZVpIur207H9Gnf0/BSaRCSKiy3g== 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=jL7uYe gVQeL8Wy6fPZYFOhl8vanvRSyOBuwigSpRMpc=; b=EJZi1O7SkDtyJ1HekQvuId 9Fl578Lc3RQa0WotvZKeZs0qfR6cqa43PQYPGayNneVT7AZNGxs3DU6NRCEGP3Bf BsWJIAVXXIqfSn/LbbKeus8IpyJ3EjPdmP9E/QyqF6JP93Sk4shUmw+bmugrSC8G GgyT7wikO+1sAjcd6QrmDmepNFGXKRwLro6WApPb34PUIrwfMLKL41v+lCKVNICd HZGdWywM3qL8suiOsRN+NPeBQrVb33Yr1BLAHQQEfQB01HAEBQFEsIe2Gj3ChJDA G2h2Bthsc/MLARmHaD7BLF571uTuQZ3CDjp97YO30Cos809F98d+Dg6fMVCiwfrA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Feb 2022 11:36:00 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Subject: [PATCH 14/23] drm/omap: plane: Fix zpos initial value mismatch Date: Mon, 7 Feb 2022 17:35:06 +0100 Message-Id: <20220207163515.1038648-15-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 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. Cc: 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.34.1