Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp204534lqo; Thu, 16 May 2024 04:04:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUDvEwDnb3/+s0tsY8i30Sj+S4oJ/suvcbNRUKMcpCFvh0Wk7GcrtP+nxlKfmST6McjRTEpgt4enu1lfaxhQuOjEtDi4YZyfbPzBSuYQQ== X-Google-Smtp-Source: AGHT+IE3mtisY1IJ086xIwekvtoTfqAeVqfHupT11yrb4Pw1RJEJLWbHJ9extgF+y1LvvMc89MKo X-Received: by 2002:a17:90a:53c3:b0:2b2:81c0:4d85 with SMTP id 98e67ed59e1d1-2b6ccd85e89mr15195881a91.45.1715857477849; Thu, 16 May 2024 04:04:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715857477; cv=pass; d=google.com; s=arc-20160816; b=JM3CJNYhe3JK/3f1R58UG6rLJrYXK7Wa8KEtNuaMr9+XK7tkwHwDJgZX60RKmrKPT7 w0NzxL9kGixu97ASo2kjN6MGfbipg6NHb9YcYED0U8BvKXAED8n6iELdrP3g8vC7NYRs HJnh8/qk4BlBlllCNt5wvBnaYeouEWmdx/XaP7bYv5kKjl5TsJwryWxFw7isLyB5xgXN P8Y2DDtM+kNfoMAPaAr85zgJrX2BPCtf4KgIcP3Eto8ugGW/Fu1XGNZGkIrjuentzx2O 2hIK45SavY64td+sPtpR1f2Yz+tenu2x4Bfc6l3bihUjdhc9Nt4SPIVw5Ub9i+dV/MSz GPKw== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=lTpO+vDr+i1DXP9/efSc+OD0Rw3hlSvVfUFca2sm+Ho=; fh=LTA9gvRfqAmQfEtR1KPwlh7D3UyBtAitKeTiD06jS+k=; b=q0ftd+5bVAqgYT3bpR7y4hOQ1QWHUwX81tX9r0Zm1vKNHOU4SeUtKoZDyjmIIrhqeH 8yWnSl8mA38Ddy18CqJnuqlN19e55v8/B5eAlek2OuyShON3REG3sYmgAhpOswLNller 2Tn7/LmvswmlJ4nd5af2e2Ljn8H8yk4f47X/3v0mhgB4XkLteKAZ1vd2TPHtl4hEcoXX f4IzMBbPlnsGyj+BDc68hBkjmaoQ1FJe9SojEXiDa8cgjdu0c6hLDBY1ZEUOZ0wssU/E r/aWTTlQ0jU6+ZVpIOOKupyzthYoX8cPmmCyy/d/mEiiwYRsohc9rXLJmJ86b/tCIjSn jbSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="ZDzE1F/E"; 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-180926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628ea7512si17721450a91.111.2024.05.16.04.04.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 04:04:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="ZDzE1F/E"; 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-180926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180926-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6C8132857E7 for ; Thu, 16 May 2024 11:04:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 50D0B145353; Thu, 16 May 2024 11:04:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="ZDzE1F/E" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 771AD143747 for ; Thu, 16 May 2024 11:04:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715857470; cv=none; b=dY24lvbyFjK6GepQ5zmF0Cz+U1GM5+re5lJjCV5fp/K1PibzOQ8JAr02o7I0jaCo5ZIp75pJkVy+ZzM1weRTg83Q4ps4ekJy8wKHmL3V1XhPJnunU7lgWXPIPp82R3eRBaGC3x2svJsr7A6C2hVFp/Z3P6XYKL206kvvbmbtewQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715857470; c=relaxed/simple; bh=q9fOqKMBjQQWhoJo23KF/9wowv5gNdy21Ctid1L9BGk=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=ezTuRJbAwM/Y6ankxyC+hREJ1544Z/nakEqkzGJGl4AdwKSKy1kGhb3tIHyE8+nFgxwll6lRblzdYWiuOJrfmr3bqiLzLi5Qitcl5z2VXNmYd+2QOazoEU9xW+Pc5WPueZsU7q7NNScihTTUXFRef/WDDvmVvghhcwwYNJJd+Zg= 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=ZDzE1F/E; arc=none smtp.client-ip=198.47.23.248 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 fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44GB3lOS026211; Thu, 16 May 2024 06:03:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1715857427; bh=lTpO+vDr+i1DXP9/efSc+OD0Rw3hlSvVfUFca2sm+Ho=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=ZDzE1F/Ej89zJlvDvqrnkxeTT4MUb7Fr7OXFs9RukFNjJLzkP/JfSDhzuaZuMd700 9L0CRKHh/8BtFlRa57AwbguLhW+84e+Pa4uDC9mY/+qiPk/jAdjuIEYaI90T6XswcX wrTc0re2mFAmwcAR9Uhajfi4bvftRjvR9hQfnSVE= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44GB3l4Q070919 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 16 May 2024 06:03:47 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 16 May 2024 06:03:47 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE108.ent.ti.com (10.64.6.29) 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, 16 May 2024 06:03:47 -0500 Received: from [172.24.227.31] (uda0496377.dhcp.ti.com [172.24.227.31]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44GB3erv060086; Thu, 16 May 2024 06:03:41 -0500 Message-ID: <1c4f5862-b1a2-4812-a109-987338ec3a72@ti.com> Date: Thu, 16 May 2024 16:33:40 +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/7] drm/tidss: Add CRTC mode_fixup To: Maxime Ripard CC: Tomi Valkeinen , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Jyri Sarha , Thomas Zimmermann , David Airlie , Daniel Vetter , DRI Development List , Linux Kernel List , Sam Ravnborg , Thierry Reding , Kieran Bingham , Nishanth Menon , Vignesh Raghavendra , Praneeth Bajjuri , Udit Kumar , Devarsh Thakkar , Jayesh Choudhary , Jai Luthra References: <20240511153051.1355825-1-a-bhatia1@ti.com> <20240511153051.1355825-2-a-bhatia1@ti.com> <20240516-tuscan-mamba-of-debate-c4cddf@penduick> Content-Language: en-US From: Aradhya Bhatia In-Reply-To: <20240516-tuscan-mamba-of-debate-c4cddf@penduick> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Hi Maxime, Thank you for reviewing the patches. On 16/05/24 13:40, Maxime Ripard wrote: > Hi, > > On Sat, May 11, 2024 at 09:00:45PM +0530, Aradhya Bhatia wrote: >> Add support for mode_fixup for the tidss CRTC. >> >> Some bridges like the cdns-dsi consume the crtc_* timing parameters for >> programming the blanking values. Allow for the normal timing parameters >> to get copied to crtc_* timing params. >> >> Signed-off-by: Aradhya Bhatia >> --- >> drivers/gpu/drm/tidss/tidss_crtc.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/drivers/gpu/drm/tidss/tidss_crtc.c b/drivers/gpu/drm/tidss/tidss_crtc.c >> index 94f8e3178df5..797ef53d9ad2 100644 >> --- a/drivers/gpu/drm/tidss/tidss_crtc.c >> +++ b/drivers/gpu/drm/tidss/tidss_crtc.c >> @@ -309,12 +309,23 @@ enum drm_mode_status tidss_crtc_mode_valid(struct drm_crtc *crtc, >> return dispc_vp_mode_valid(tidss->dispc, tcrtc->hw_videoport, mode); >> } >> >> +static >> +bool tidss_crtc_mode_fixup(struct drm_crtc *crtc, >> + const struct drm_display_mode *mode, >> + struct drm_display_mode *adjusted_mode) >> +{ >> + drm_mode_set_crtcinfo(adjusted_mode, 0); >> + >> + return true; >> +} >> + >> static const struct drm_crtc_helper_funcs tidss_crtc_helper_funcs = { >> .atomic_check = tidss_crtc_atomic_check, >> .atomic_flush = tidss_crtc_atomic_flush, >> .atomic_enable = tidss_crtc_atomic_enable, >> .atomic_disable = tidss_crtc_atomic_disable, >> >> + .mode_fixup = tidss_crtc_mode_fixup, >> .mode_valid = tidss_crtc_mode_valid, >> }; > > mode_fixup is deprecated for atomic drivers, so the solution must be > different there. > > It's also not clear to me how it could change anything there: > drm_mode_set_crtcinfo with no flags will make crtc_* field exactly > identical to their !crtc counterparts. > I checked the flag options. There isn't any flag required. The only reason to add this call is because cdns-dsi strictly requires the crtc_* fields to be populated during the bridge enable. Secondly, if mode_fixup is deprecated, I think the crtc_atomic_check would be the next best place to add this call. Regards Aradhya