From patchwork Mon Feb 7 16:34:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12737682 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A97DCC433FE for ; Mon, 7 Feb 2022 16:56:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354096AbiBGQzn (ORCPT ); Mon, 7 Feb 2022 11:55:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1391395AbiBGQq1 (ORCPT ); Mon, 7 Feb 2022 11:46:27 -0500 Received: from wnew4-smtp.messagingengine.com (wnew4-smtp.messagingengine.com [64.147.123.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2F54C03FEC2 for ; Mon, 7 Feb 2022 08:46:12 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id DC7942B00104; Mon, 7 Feb 2022 11:35:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 07 Feb 2022 11:35:31 -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=KkWATsWD3yxx4KnUgpTvJTkg+itLze ChvgKpxGcaR3U=; b=FdKZbNacRrKJxZkJ//+nVJpMR+O52n2YC6TbQalo02S65i 6iqAZwMUZX6EERRWeamp0qNENw0bP8tOvvEvtnGJnbZfDlMUFoPJs2gLamNgiHOt 42ZJMjQv2QPfRAYfOJKZ5lTbDkWeUAM2FdPyekXMFyNGJaryIaETJ4qwEp4bl2pN OCQPxMb0zw1sNkVhWn5gVUc9UvhMmeOARmUlgokKAa69zGV+vuw38yU1SuKDmqOH nT91NhRl7Ky1fBI4Yko354vj9kawrWHWTwBP8BIhky88OpKx69d/WKYB3jJ66deX M5MOKMvSAsLTAOH3JDZ9OTFgvb52HomlTWGK0/8Q== 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=KkWATs WD3yxx4KnUgpTvJTkg+itLzeChvgKpxGcaR3U=; b=I7NyxhFonpeRLYTU5bM2TG ApiYJZ07jz9EocpBNCUFMyMXmrlz8Bl3egfNrpXuVCVKHDfyAatleoC4k7axfiSu NdD77bg90IONRzJErZuFoSzVG8nD+VTD/ZgCWVUmP3IRi94OdnA5wWx+UDF5ucst 8LHuMuSnKa5zVb28ERSAMriR1MxtEANZSo5aB1IAqTRrPjVsHxtKnOco0dWBsI/6 L3zMt6yX11fVmjQYFbF5EzBlw+w4rGI+4OqI654B8Gx+8VnTZNGkgu/wtCofqYlM +UOvkNnsEJZIfgBhiCDIL0WrrQL4pH1wcvZHgK8oKvwyNT4e9+A+6SBto71LP7lw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Feb 2022 11:35: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 , freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Abhinav Kumar , Rob Clark , Sean Paul Subject: [PATCH 04/23] drm/msm/mdp5: Fix zpos initial value mismatch Date: Mon, 7 Feb 2022 17:34:56 +0100 Message-Id: <20220207163515.1038648-5-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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org While the mdp5_plane_install_properties() function calls drm_plane_create_zpos_property() with an initial value of 1, mdp5_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: freedreno@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org Cc: Abhinav Kumar Cc: Rob Clark Cc: Sean Paul Signed-off-by: Maxime Ripard Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c index c6b69afcbac8..d60982f4bd11 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c @@ -48,6 +48,8 @@ static void mdp5_plane_destroy(struct drm_plane *plane) static void mdp5_plane_install_properties(struct drm_plane *plane, struct drm_mode_object *obj) { + unsigned int zpos; + drm_plane_create_rotation_property(plane, DRM_MODE_ROTATE_0, DRM_MODE_ROTATE_0 | @@ -59,7 +61,12 @@ static void mdp5_plane_install_properties(struct drm_plane *plane, BIT(DRM_MODE_BLEND_PIXEL_NONE) | BIT(DRM_MODE_BLEND_PREMULTI) | BIT(DRM_MODE_BLEND_COVERAGE)); - drm_plane_create_zpos_property(plane, 1, 1, 255); + + if (plane->type == DRM_PLANE_TYPE_PRIMARY) + zpos = STAGE_BASE; + else + zpos = STAGE0 + drm_plane_index(plane); + drm_plane_create_zpos_property(plane, zpos, 1, 255); } static void