Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp410277rdb; Thu, 15 Feb 2024 04:13:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV0vviPvpmxpLsksE+fi55G7mV9FbaXRBzt7ABCVM/tmTPS1ub/ijn8eiHOAA95zI4VvN6qo8PL7P5xSwpHAL1Ni7zkkGSWxOWQVzfsew== X-Google-Smtp-Source: AGHT+IH/L5nqyKZ3zkFV5oOwEGWXSti126irkgGlmbu5UorbSQKMsgi9p19iEAXEPjO3o0m/UlW5 X-Received: by 2002:aa7:c152:0:b0:562:10a7:9ebc with SMTP id r18-20020aa7c152000000b0056210a79ebcmr1010371edp.18.1707999218109; Thu, 15 Feb 2024 04:13:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707999218; cv=pass; d=google.com; s=arc-20160816; b=sFbNb8Pl0S5YSbRTR80jD4658vkel4OKFGeNFecCpwxEBWQyCNjtydP/BDjcLppimW 6nW/6n0xtUs9rUU7CNNOwOcJAuSaA+4Skr8hVLmbqAV/hph0AokNFQmiu4aGnsuZzBcY pu1u8hJUkZztEsyEVkI0uT9pm98zG3tc0vffvyfFKTmoF5ApHHN6vzvm5gZ63K/i3+lh LDx86mZGNBm7QWzKF8pNUVrm2GG0GCHEF7P5RHn0OsxvAPHUDMUAL03B4mDOjpf0tr68 XSY+ezLJ2am18Mm2XX0MJDoMjerqlzUWtPA3YdEVhq+sYI2WSc1RWQe7ZIXEQ/Yx3nPk qOeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=MpjFvrJHEvLR1rwljrTCryuXjkaerLLnurehV7C17yE=; fh=yn2+dCnPeWIn9cKA5/D3faAt9WE25Rhhh7094kQksYU=; b=rOD8S8ujj3pqP/fbCxltHyLJx0/jZqJ337BXCzaqKRQE5vznOvLutoNd8abv51WG23 Sn9zZiUT9/qFHBKylfFnuaV3c8XRv3BL1HD97sMaJr3sleVAvLCXcvtaZHP2DSJzZsdc evOnn3Ej/XCmDjCAENKgXi34YhNafPUngG+dN1dfMX8pGa+ee9FT0NeDmvzpWbHk43I5 /Hvr2UZzlnYepuoQxjwHcuZGdLG+5lzH0+Khzi90x9/1VHzacsgP9ikFDa6RYLr1n2ZQ hwnAZv+pCXidZwCAA6pQ/UX1Fa8O6GucAEnTDRdVKFnJYpiMVdvQI+1FaxgbiWhkN4nB OB7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=p5R8Z1Jq; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-66865-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66865-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l20-20020a50d6d4000000b005639fbc2756si594850edj.286.2024.02.15.04.13.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 04:13:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66865-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=p5R8Z1Jq; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-66865-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66865-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 28FCF1F2696E for ; Thu, 15 Feb 2024 12:12:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 473D312BF15; Thu, 15 Feb 2024 12:12:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="p5R8Z1Jq" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 D25B27484 for ; Thu, 15 Feb 2024 12:12:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707999163; cv=none; b=rwThyL/EfIn8b/ueaeLdoH3g3sbg1mEV5kaaZAh2luNNf0Z6i6SPLIcXo13cun1tjVbAN26n43PQ1IQvrMoDvsm83Sr/36MnWv8pxVoTn62EVfQMNADe/d0cPTdOZjMp5ybFHOc5Z0VARqZYIz+LKnAjA1TFYpYgwZogDSsRN2g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707999163; c=relaxed/simple; bh=EaukzfZ/zQxKbnDwRDMhXhmoDaS50dhGCB7iA691Zy0=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=b1Qvxr5IG4m2HVkB47YerkpVftDhEriU27H8zdg/UVUVqON43TVx/RbW5w4VeLOVINQSMkiHZqAlDwFUoA5Rwgum0wHbi3zi6p/TphOdD9VJnDztK0/pbFgf54ixOhloPeY7n1o6ZwbbVAjB9gMeTzTnDojhwrjKVvJl69ABTO0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=p5R8Z1Jq; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 41FCC8jU101571; Thu, 15 Feb 2024 06:12:08 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707999128; bh=MpjFvrJHEvLR1rwljrTCryuXjkaerLLnurehV7C17yE=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=p5R8Z1Jq1zJxh8mHjct8FxoDXlmH4WfFpUqvrqATGfyh91xrKbL+G1+VCHnJKfMmw oKMbYHRkeRSSG4O62nPpRncOjluu3ERmJvdroxATubJa+FrFbxF6JDRd6IT/PJMCOA WQASiCmlo1jQL8SokFJcgJ65pJZzs2uGonwHAWcQ= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 41FCC85d012101 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Feb 2024 06:12:08 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 15 Feb 2024 06:12:08 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 15 Feb 2024 06:12:08 -0600 Received: from [172.24.227.31] (uda0496377.dhcp.ti.com [172.24.227.31]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 41FCC4qm059758; Thu, 15 Feb 2024 06:12:05 -0600 Message-ID: <8928f697-560c-423f-b618-c60b6f4dda6b@ti.com> Date: Thu, 15 Feb 2024 17:42:03 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] drm/tidss: Fix initial plane zpos values Content-Language: en-US To: Tomi Valkeinen , Jyri Sarha , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , "Sam Ravnborg" , Devarsh Thakkar , "Francesco Dolcini" CC: Tomi Valkeinen , , References: <20240213-tidss-fixes-v1-0-d709e8dfa505@ideasonboard.com> <20240213-tidss-fixes-v1-1-d709e8dfa505@ideasonboard.com> From: Aradhya Bhatia In-Reply-To: <20240213-tidss-fixes-v1-1-d709e8dfa505@ideasonboard.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Tomi, thank you for the fixes. On 13/02/24 13:46, Tomi Valkeinen wrote: > 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, > Weston seems 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. > > Signed-off-by: Tomi Valkeinen > Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Reviewed-by: Aradhya Bhatia > --- > 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 e1c0ef0c3894..68fed531f6a7 100644 > --- a/drivers/gpu/drm/tidss/tidss_plane.c > +++ b/drivers/gpu/drm/tidss/tidss_plane.c > @@ -213,7 +213,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, >