Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2735483lqp; Mon, 25 Mar 2024 07:55:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUfYiBjBkbx1CwAJuDOsFb7OA7dn3uJAMFQ1TY10Ht+LRIktY2pEIv5H2WhcWHpHtW8El/GKl8zYyHhnd3O6YUchzeIJepbNyatdnvIcQ== X-Google-Smtp-Source: AGHT+IGhAd4Aa2Z2Vp1/IpA8/wOEK9PMk99aZRVx987Bzu46u/2OY2ucft+Tctl0+zk+hK/VqZb3 X-Received: by 2002:a05:6a21:a598:b0:1a3:af03:6b0 with SMTP id gd24-20020a056a21a59800b001a3af0306b0mr8053552pzc.7.1711378518860; Mon, 25 Mar 2024 07:55:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711378518; cv=pass; d=google.com; s=arc-20160816; b=Aqy1kwujAnkwaAK60tnOJbzjcRDpI0FRZsbCEGjSP6elA5uQd6fThrPU6xfPw4Ksfz +2igH1HNEicDZFg7gZI+HYa82bBa0RYUNHbX1A7GREu7DpBu48RqegIWNocei/qg2vzV ULaMpJIpru7G8oXE1vGGA4ovN5QyElN7ymHgAzz/lPM6sSQDP5ioc2fJEdQmJbzY9hEx /XqEaTSnb4dF0pVJu7COtJaEKjLTpywR9/u2JeWXB3ix9jLvmIDC3qjjD4lzwROjIW7T XhQsKsm9Bx1HsG8Uk6bjyJX0JwztxVKY0+BobxuaHmx6RLK+ZJYlkpKbi0ZV0Ui37A7E 52UQ== 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=SjAHChcnq0iwQY592i5+j+XyYGRiWP+QPL0jv2WrZTk=; fh=mcs2eJK81y7a8Lo+s4C+J+/Z98bbHAdQdct3DGrYd/I=; b=zXpO6xzHhJIQ7c9RKfbWz2NWctxgFC6un6Q3/xUJ/0xZ5opzWNfxfEFp9qvXF+QsW8 hVOiq4RnLvysk3U1ATkLWChi9W2P/Ug81Q0iVi4G89XOqMDLVsxj6W7sIVsvSzk9x5hK 24d4Pa7QikWc/ref7uJ2TuUufBYRb8M/9wb2vMVUcYZU/inpxMpGWRKO3UswK/eChFBb BXZnZWSf9XhTpWwWkV0cBtT81Ip/dOshZ4g3BpLHTePaUPUfgYuH5X3342SmiWxoMDBj qitvO34VMbhKdOW29G4EiA1GzL4v3Usgot4qIqaD9v4zv4Kf/miRme8GNjzixY/9zZfB NQwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IhNm+kvA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116190-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id v13-20020a63464d000000b005dd565d7626si7240342pgk.900.2024.03.25.07.55.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 07:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IhNm+kvA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116190-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 45760B3EC7B for ; Mon, 25 Mar 2024 11:43:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC81E17BB18; Mon, 25 Mar 2024 03:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IhNm+kvA" 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 67ECC284543; Sun, 24 Mar 2024 23:43:09 +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=1711323790; cv=none; b=Mc0rkj9aK++/QDwS4NS75xrRPxD7d9tvweK0v/umdIJ2A+2XBUiI4g7JZybrPt3zejGnGZBSZYUUIoH5wmdKw8W2zrGpAz4g7iJZm0kesoD+DCnCeJ6X2kRKPG4/UM7h5kuiO8j5ZyjeaWfTLfbhMWK0jhbqspUMrob+pdSaYSQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323790; c=relaxed/simple; bh=+v+Bo3Zpez8dY5cSC1s1jooMHNg7M0a4EuKuqRako8E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fMl0Cpj9WzISAjQNoGkHzBo6O3NhQs91WP54VXo8F7K2STwZhTiSkyWj3IxONVVXzHe0X7LoUsGBWE/4fzeZQaMa3N/9OcRaJ1UgA5JcXavMKYNv8VjzGUUKm4WC9WOBIvugYMWjCEDW+8QFvJ6pUBEaYsHkyItJqdNmxJ2OOmk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IhNm+kvA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACDF0C43390; Sun, 24 Mar 2024 23:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323789; bh=+v+Bo3Zpez8dY5cSC1s1jooMHNg7M0a4EuKuqRako8E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IhNm+kvApIoymwcmvVsQwKjVpI4kCRa1cXFgmfQFioLIz1Z5jpEFkYkeuVN1OQnk2 Rt9xKHTOjmcra93QlN+y5BRzKBvBTpRQFgMjm2nrSGl/N9NtGjbw3wyCAIAmpsbzVk IgPPJ8PZualqIih6vieMe1mD0d4+uOlDdq0mrD6k7f5jQWMuiFXYd4Cp1VlvvLTeuo Gv7kkSiYBQ0o1Q4ZU03O5h4+hgsZlfn2tcPgDnSM9jjvfQjR8Qi7nd1AtZRJlPVm1p BOYN9GhwzPBP9WjVj0ikJBhgpKR1rYbeeWH833B/P8xrky4r9uMvnYUnO66lBLNDO/ VvP6BxVXNK1gQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tomi Valkeinen , Aradhya Bhatia , Sasha Levin Subject: [PATCH 5.10 166/238] drm/tidss: Fix initial plane zpos values Date: Sun, 24 Mar 2024 19:39:14 -0400 Message-ID: <20240324234027.1354210-167-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-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 43e72d0b2d84d..e2ebd5fdc1138 100644 --- a/drivers/gpu/drm/tidss/tidss_plane.c +++ b/drivers/gpu/drm/tidss/tidss_plane.c @@ -202,7 +202,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