Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2567770lqp; Mon, 25 Mar 2024 02:55:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWkIAo6ZuOo29LTxZKFaC4iG8wjGZ7NE57eU8XBG2n2AVEtPp/FBy39Qydva2CC3xhSrvZzXv9GLbiBdGJQOlgStLu0HFKKCjeAaiqKA== X-Google-Smtp-Source: AGHT+IH0MM6n3HXjf2p77yJG5oVwZjo2Ig6j15EOvFEOFwSyPLOezmzOcS11eXYez1qJDwkFyF+w X-Received: by 2002:a05:6214:1d2c:b0:696:45a3:dfe9 with SMTP id f12-20020a0562141d2c00b0069645a3dfe9mr10252871qvd.18.1711360553331; Mon, 25 Mar 2024 02:55:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711360553; cv=pass; d=google.com; s=arc-20160816; b=Rb9RBGGUzTNlvKkuUkfgPaiqFmc+uHwql9F/svoyha+78MY6N1oomznp0RRibChLT/ R2GRlUfh1DInQBFfwr8iZH9jR72gNAgPatoMWus70l/NrzGkauOOZtqQJWZsIBlqc7Tr TTeYM7b6Ok8QaxflW7inNXONOzV3rzN3jRJPZw3rY1PR6dgIPfQ0mbpvXo/A5XhIOtvo qinYbzsTmt66IdjPToz7N8HQ6iGF+MSCIB+Dhzvm0ZgtiS7HbBEZsvMJfwVxS1rfJKpl 1dCaV4tXSY/3tU0Kt0pnSeh0w4E1fXdbVh/Ayse+DthX5K+DoEmjlZmdjtooyn1Sk/QX a3qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=XUP8RxkIEKYy+g2BXLFhWM6YongQ2eMU6tMRrInUQeI=; fh=mcs2eJK81y7a8Lo+s4C+J+/Z98bbHAdQdct3DGrYd/I=; b=x2fBj/B9OATAmDWNsNj3vnjWI5JZ5JyTSmFJ9Z8BMRp6R5hhvMkfHQiDs6bNWWspv8 SCoLFl5NoA+Be6JNCyEkzbOlVmhfH45039pG5FmYjAyMbv7ly3XEbJjq2vC8hOIDhZAA NP4peVkDDig2txsYqr7Ue9BFMbVXA9I4W7kpanwMFu/jGOVBXuwIYzEx0Yv2HJHe2wfK WeNB3ZfnztcGQH9BZBKznHhlqsL6XC4su3oYb9j1eakkDcZUp4yX1rOjZ4uqdyJ73LKC mQwZVlkyEj4HPYov0slM6f4Z3yPMvoQOrKMY//csbgyN7ws9HCVnsY9kUWHrz9NyVcM7 8IsQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KPrAZrZf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c14-20020ad45aee000000b00696899b4f6csi2339580qvh.441.2024.03.25.02.55.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 02:55:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KPrAZrZf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 13D071C31EC8 for ; Mon, 25 Mar 2024 09:55:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E3AB3941C3; Mon, 25 Mar 2024 03:04:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KPrAZrZf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8067A14C581; Sun, 24 Mar 2024 23:17:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322234; cv=none; b=L1aYEKx70Dd6I8h3H/LhHDN58+uxZlOan8fm3Oz5zGDiwWdQyZ2dSVZrpwOCEy3EJoMnitvE+HWrlu9j3VdnBggaqWZGWAafh2f3m14EBVeLwCqwlLu9FaxIiAIcegyzZTGDK4IYBLdN01yYwi4HWwoIWZNF2kgfvj+xyAFuZDY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322234; c=relaxed/simple; bh=iZgMns2rA9Thds77z35AZf+v1OfqQkQbsN5QHiFZhtk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YDd5C2s4WzsJ0plgo4mHtg+0y6g5/1G3ldsAyfnLKVoKN+SsBUfY0NXd7232rn1E/IZluREwYS2OYZZ6n4EzVWmUItjVU2GwaRNdjFfVXWOleQj4OBlefKN7tG7kfI/5X32fSWW63wNBoIUhc1uKAEeYTeuSYcXkfmDIJc554zA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KPrAZrZf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF871C433C7; Sun, 24 Mar 2024 23:17:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322234; bh=iZgMns2rA9Thds77z35AZf+v1OfqQkQbsN5QHiFZhtk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KPrAZrZfuoXTwkW1yUbx3eplNg/U5bcbBNsKz/63BfX5p2SZcS9u2pelsZVkSyWoT dtGzpvTqxpOYxNav4kF8jCVCBU8isZHmBFuxVu1seZEtZCRhcohO9hOQIfNI6sAMSv N4juDidR8Kf/rUuFO5ZaPZ3Cjx69GF1ZKkNMHZQ7CcfzI7N/a+T3ygZ3Rmie2JGpfK F1gip9ffQXro+k8c3oHvm5qfrJCBeMIwpjPhy7POoy9BvGDq4QPqotaG+dGk7Pa5Ui 4ICj2bJ5r28IffCbBabEDnJmDSFOirvL09cNTmWGzImvPo08J4v2ne6BTtVjfbm35O 2Yx50C9q1H/UA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tomi Valkeinen , Aradhya Bhatia , Sasha Levin Subject: [PATCH 6.1 315/451] drm/tidss: Fix initial plane zpos values Date: Sun, 24 Mar 2024 19:09:51 -0400 Message-ID: <20240324231207.1351418-316-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Tomi Valkeinen [ Upstream commit 3ec948ccb2c4b99e8fbfdd950adbe92ea577b395 ] When the driver sets up the zpos property it sets the default zpos value to the HW id of the plane. That is fine as such, but as on many DSS versions the driver arranges the DRM planes in a different order than the HW planes (to keep the non-scalable planes first), this leads to odd initial zpos values. An example is J721e, where the initial zpos values for DRM planes are 1, 3, 0, 2. In theory the userspace should configure the zpos values properly when using multiple planes, and in that sense the initial zpos values shouldn't matter, but there's really no reason not to fix this and help the userspace apps which don't handle zpos perfectly. In particular, some versions of Weston seem to have issues dealing with the planes with the current default zpos values. So let's change the zpos values for the DRM planes to 0, 1, 2, 3. Another option would be to configure the planes marked as primary planes to zpos 0. On a two display system this would give us plane zpos values of 0, 0, 1, 2. The end result and behavior would be very similar in this option, and I'm not aware that this would actually help us in any way. So, to keep the code simple, I opted for the 0, 1, 2, 3 values. Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Reviewed-by: Aradhya Bhatia Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240213-tidss-fixes-v1-1-d709e8dfa505@ideasonboard.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/tidss/tidss_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tidss/tidss_plane.c b/drivers/gpu/drm/tidss/tidss_plane.c index 42d50ec5526d7..435b3b66ae632 100644 --- a/drivers/gpu/drm/tidss/tidss_plane.c +++ b/drivers/gpu/drm/tidss/tidss_plane.c @@ -211,7 +211,7 @@ struct tidss_plane *tidss_plane_create(struct tidss_device *tidss, drm_plane_helper_add(&tplane->plane, &tidss_plane_helper_funcs); - drm_plane_create_zpos_property(&tplane->plane, hw_plane_id, 0, + drm_plane_create_zpos_property(&tplane->plane, tidss->num_planes, 0, num_planes - 1); ret = drm_plane_create_color_properties(&tplane->plane, -- 2.43.0