From patchwork Thu Jan 16 20:16:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13942212 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B0950C02187 for ; Thu, 16 Jan 2025 20:16:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EB2510E21B; Thu, 16 Jan 2025 20:16:44 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="nA6ovh9V"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC0D310E21B for ; Thu, 16 Jan 2025 20:16:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737058603; x=1768594603; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jTlxSwWcdPLbXsYuRzkarNOFmh/kk/qDAHwp/J4m1uo=; b=nA6ovh9VmlgyxTHg3ESS/EdH19OrTJ74jFnLrVHun+PUFzC0QUYHo+3B JZUbZOKnylfThOF22XNxchMJFRshu3G4FNn5nUL+5F1aSyETVHWKp1ZSa vEjENFyiaXvMqxHdqIBrL7GPODE1JgOmLET6CECWeobrUmnFnUopo1lMb fZ0kl/aHpHGf2O6uoK4cTV5oRcuC5Mj+Q7wwOrbzFZ/LN+5IXFfvAwA+L YMj+23F7vHgzGkYUXLkF+7+XSBykgc/8P8URoMgbO0xZzWwHjqoyT1rUL xqlBYFuEksjZ04chwtoxvXCOFmyBMXs2pMcx7v8vnVLvPnQweACZrQM6w g==; X-CSE-ConnectionGUID: p0MnSmfdQHC/c9fWUbo+Yw== X-CSE-MsgGUID: 32EUZmzGSLOL1ryZmQqWAw== X-IronPort-AV: E=McAfee;i="6700,10204,11317"; a="40279230" X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="40279230" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2025 12:16:43 -0800 X-CSE-ConnectionGUID: IYgLytA+SOeEPUtuI8uyjA== X-CSE-MsgGUID: +GWyPWVvSa2ps6IsRQ5qfA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="105743484" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 16 Jan 2025 12:16:41 -0800 Received: by stinkbox (sSMTP sendmail emulation); Thu, 16 Jan 2025 22:16:40 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: Paz Zcharya Subject: [PATCH 1/8] drm/i915: Keep TRANS_VBLANK.vblank_start==0 on ADL+ even when doing LRR updates Date: Thu, 16 Jan 2025 22:16:30 +0200 Message-ID: <20250116201637.22486-2-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250116201637.22486-1-ville.syrjala@linux.intel.com> References: <20250116201637.22486-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä intel_set_transcoder_timings() will set TRANS_VBLANK.vblank_start to 0 for clarity on ADL+ (non-DSI) because the hardware no longer uses that value. So the same in intel_set_transcoder_timings_lrr() to make sure the registers stay constitent even when doing LRR timing updates. Cc: Paz Zcharya Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index f5d2eacce119..5ba3b2d658e5 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -2923,6 +2923,14 @@ static void intel_set_transcoder_timings_lrr(const struct intel_crtc_state *crtc crtc_vblank_start = adjusted_mode->crtc_vblank_start; crtc_vblank_end = adjusted_mode->crtc_vblank_end; + if (DISPLAY_VER(dev_priv) >= 13) { + /* + * VBLANK_START not used by hw, just clear it + * to make it stand out in register dumps. + */ + crtc_vblank_start = 1; + } + drm_WARN_ON(&dev_priv->drm, adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE); /* From patchwork Thu Jan 16 20:16:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13942213 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02CC6C02183 for ; Thu, 16 Jan 2025 20:16:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8433110E28C; Thu, 16 Jan 2025 20:16:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KsEgVKDb"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id BC15110E28C for ; Thu, 16 Jan 2025 20:16:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737058606; x=1768594606; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qOTOrDrdR5AIRq/gAZoN0n6kSI2GO+4AqOT6eZJ1Yj4=; b=KsEgVKDbcc5t8+89WdZe5ZA+nMImBUUiC7SUGO2e9JJPjk2ChSwXeD1k y5ClGIWBpJcLj7KIrP4O7qQwCHHBMTGv39ZtFPAP8zIlT3oReVFM3T0MO qDg9QdjFmk9M+p11w3CnfAUv+zuDNLL4qm22tz74lXUatwiWfpAk+/FTc e04KaKu74VuLa7J+Kxc51idT1Xg0dCcnjuHaBx39cFt/I5JMj8o7DK1HP OLZCTfvgEWDkvN92kFUi+majX3K4MrE75wcDNjfR/HfFJpmW/gvDIV0s6 UKtTL7VitECud2sTAxhJMpwCCAHhzdk5LYXjtpRyz8WAyTR+9rtyQCg6i w==; X-CSE-ConnectionGUID: qjEqXEsoTpezdvT69eJwug== X-CSE-MsgGUID: Y829JOLBQjyROrbwIwWyFA== X-IronPort-AV: E=McAfee;i="6700,10204,11317"; a="40279232" X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="40279232" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2025 12:16:46 -0800 X-CSE-ConnectionGUID: nI40Os5BTd2Eqd5wl4cZAg== X-CSE-MsgGUID: HWRnf1/5SKGKvTTvVnvHkw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="105743486" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 16 Jan 2025 12:16:44 -0800 Received: by stinkbox (sSMTP sendmail emulation); Thu, 16 Jan 2025 22:16:43 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: Paz Zcharya Subject: [PATCH 2/8] drm/i915: Handle interlaced modes in intel_set_transcoder_timings_lrr() Date: Thu, 16 Jan 2025 22:16:31 +0200 Message-ID: <20250116201637.22486-3-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250116201637.22486-1-ville.syrjala@linux.intel.com> References: <20250116201637.22486-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä I want to start using intel_set_transcoder_timings_lrr() also for fixing up the vblank delay during boot. To that end make sure it can cope with interlaced modes as well. Note that we have soft-defeatured interlaced modes on tgl+ so technically this is dead code, but if we ever have the need to bring interlaced support back it seems better to handle this. Cc: Paz Zcharya Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 5ba3b2d658e5..1260e394afc7 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -2923,6 +2923,12 @@ static void intel_set_transcoder_timings_lrr(const struct intel_crtc_state *crtc crtc_vblank_start = adjusted_mode->crtc_vblank_start; crtc_vblank_end = adjusted_mode->crtc_vblank_end; + if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) { + /* the chip adds 2 halflines automatically */ + crtc_vtotal -= 1; + crtc_vblank_end -= 1; + } + if (DISPLAY_VER(dev_priv) >= 13) { /* * VBLANK_START not used by hw, just clear it @@ -2931,8 +2937,6 @@ static void intel_set_transcoder_timings_lrr(const struct intel_crtc_state *crtc crtc_vblank_start = 1; } - drm_WARN_ON(&dev_priv->drm, adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE); - /* * The hardware actually ignores TRANS_VBLANK.VBLANK_END in DP mode. * But let's write it anyway to keep the state checker happy. From patchwork Thu Jan 16 20:16:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13942214 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01487C02183 for ; Thu, 16 Jan 2025 20:16:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9931A10E2CD; Thu, 16 Jan 2025 20:16:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="DxOi6R2O"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id AFFD810E2CD for ; Thu, 16 Jan 2025 20:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737058609; x=1768594609; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pz+zxLLlEkvCkBuAIiiLumSTmD7CucmiuWx3pY7FC8E=; b=DxOi6R2OdBJtLvtI/birJuRk8DCSoTNhwtICSKQ9wyfk6cKm3aKBWPNK Ag7U+2H+LHOPnqkbFIrtLRECh6ufvrTBwjrUDcxl4Dh5GUiJhVqaty68o def+RLkLt/XtvRQo40NEFNn4VUxNut+T5fZ/pNn1hTz4qCJ8IOpS3TreL NrCBDs8yfbmQrz/zJhSfUDiG3b48+5wWZK1xO8/yixatT65zuEAP5HvSv W/BgOUAVOazhUtsX+eAEfX9Xbzhdzoumq2d/l6h8FahqJX/AXQ3HUR4YS owkSrOYm1IyMENi3WYcLPnldz3jcXAj0JsnuvMiy7KSrRGHssEIv9R3HI w==; X-CSE-ConnectionGUID: 4tzQW8qIQHiQAc8wvnLIKQ== X-CSE-MsgGUID: YlT/M6TzSYSJ7l0Fz5+Bxg== X-IronPort-AV: E=McAfee;i="6700,10204,11317"; a="40279236" X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="40279236" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2025 12:16:49 -0800 X-CSE-ConnectionGUID: pS2Gt6ZTQD6NBSaH+ypJiQ== X-CSE-MsgGUID: OHnjo+V7TdKh8ynIHoHcsw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="105743488" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 16 Jan 2025 12:16:47 -0800 Received: by stinkbox (sSMTP sendmail emulation); Thu, 16 Jan 2025 22:16:46 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: Paz Zcharya Subject: [PATCH 3/8] drm/i915: Update TRANS_SET_CONTEXT_LATENCY during LRR updates Date: Thu, 16 Jan 2025 22:16:32 +0200 Message-ID: <20250116201637.22486-4-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250116201637.22486-1-ville.syrjala@linux.intel.com> References: <20250116201637.22486-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä Update TRANS_SET_CONTEXT_LATENCY in intel_set_transcoder_timings_lrr() as well. While for actual LRR updates this should not change, I want to reuse this code to also sanitize the vblank delay during boot, and in that case we do need to update this. Cc: Paz Zcharya Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 1260e394afc7..ac6fc177099f 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -2930,6 +2930,10 @@ static void intel_set_transcoder_timings_lrr(const struct intel_crtc_state *crtc } if (DISPLAY_VER(dev_priv) >= 13) { + intel_de_write(dev_priv, + TRANS_SET_CONTEXT_LATENCY(dev_priv, cpu_transcoder), + crtc_vblank_start - crtc_vdisplay); + /* * VBLANK_START not used by hw, just clear it * to make it stand out in register dumps. From patchwork Thu Jan 16 20:16:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13942215 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B264C02183 for ; Thu, 16 Jan 2025 20:16:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F7B510E2D7; Thu, 16 Jan 2025 20:16:54 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="F4NDYofq"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id CF48510E2D0 for ; Thu, 16 Jan 2025 20:16:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737058612; x=1768594612; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=46JnZ9Yf3TiDPCo5hZM+E0LP7gZN2kZOFh6vX2TZ18g=; b=F4NDYofqPdkgMN3r84br11NuWBBFCcJq+LmSQsUs9ug7WzBZoakDkULa 6wXHWfG4/JUMp5/6Ay2PbkCx3qyIO+WwUXCEXI1VOvwZ49rAK1totx3VQ 58ylKz9cLzjrcgMHWrM4+42IqjPHeTkfJufLP5DKtp3PoOiabkxcSbSXq 50UO3mu823qzA7Wy+2HRgmi4ZDIVbsg1Pg9x+mVfxiVpDH/+zun7Jaxm3 2fPCNsTt77Yztdn1dxCny7VRGoLPBCTb8qGjJ5PxaO1AbWIdDSNFVo5Bb zLJXUJ6CWj1DuoJaSLrsnUEFnjbJmybRkt/6TX4liNzJhjw03j6Dww8Wd Q==; X-CSE-ConnectionGUID: 6teuo5F6S7C5FTD9OemHQg== X-CSE-MsgGUID: 7a4inuYBR+iW/HsEy5MJ3w== X-IronPort-AV: E=McAfee;i="6700,10204,11317"; a="40279240" X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="40279240" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2025 12:16:52 -0800 X-CSE-ConnectionGUID: PE1V2cPBR7+zHb8rcpkFkw== X-CSE-MsgGUID: gmPto7VPRnyQ5wLhq+LZUA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="105743490" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 16 Jan 2025 12:16:50 -0800 Received: by stinkbox (sSMTP sendmail emulation); Thu, 16 Jan 2025 22:16:49 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: Paz Zcharya Subject: [PATCH 4/8] drm/i915: Warn if someone tries to use intel_set_transcoder_timings*() on DSI outputs Date: Thu, 16 Jan 2025 22:16:33 +0200 Message-ID: <20250116201637.22486-5-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250116201637.22486-1-ville.syrjala@linux.intel.com> References: <20250116201637.22486-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä intel_set_transcoder_timings*() aren't currently suitable for DSI. Warn if someone accidentally calls them in such cases. Cc: Paz Zcharya Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index ac6fc177099f..fa398d7d1baa 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -2837,6 +2837,8 @@ static void intel_set_transcoder_timings(const struct intel_crtc_state *crtc_sta u32 crtc_vdisplay, crtc_vtotal, crtc_vblank_start, crtc_vblank_end; int vsyncshift = 0; + drm_WARN_ON(&dev_priv->drm, transcoder_is_dsi(cpu_transcoder)); + /* We need to be careful not to changed the adjusted mode, for otherwise * the hw state checker will get angry at the mismatch. */ crtc_vdisplay = adjusted_mode->crtc_vdisplay; @@ -2918,6 +2920,8 @@ static void intel_set_transcoder_timings_lrr(const struct intel_crtc_state *crtc const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; u32 crtc_vdisplay, crtc_vtotal, crtc_vblank_start, crtc_vblank_end; + drm_WARN_ON(&dev_priv->drm, transcoder_is_dsi(cpu_transcoder)); + crtc_vdisplay = adjusted_mode->crtc_vdisplay; crtc_vtotal = adjusted_mode->crtc_vtotal; crtc_vblank_start = adjusted_mode->crtc_vblank_start; From patchwork Thu Jan 16 20:16:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13942216 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 911C1C02183 for ; Thu, 16 Jan 2025 20:16:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35D2D10E2D5; Thu, 16 Jan 2025 20:16:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Ea6wlLzm"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id C4EF910E2D0 for ; Thu, 16 Jan 2025 20:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737058615; x=1768594615; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h4xNC07k/4Qw+q+yi+hVVRL49QPQXq6IiKTUNeCk1DQ=; b=Ea6wlLzm8tJgg2HDpa4FQRSh50AAkBqzZlvJg6NGGAZA74UHtyq+hd58 ojHiXtGv44Ym8oegKZ5gvxcl0wB+/Oj6wY+OholCWVEWCm7kImyEUn2hd nB75xgi2qZ/Ox45m9QwwwNi1ZkkMIMZrP8STh5Os8u9uCGFemts9Xd0Gb ZJSvF3JaBjU/UhFRyGQu/u7k/N7Sop8xtrSLme0gRalMrfZ4cza41Xmi9 IZnPlfE9m6VPzOoJMMG+Ez1zDVkIkJo/A458VX3uU0UGjaLo+NHVCOWd2 G9wkCWu6rClY3VRkI8OFRYmfXpta0mT2zJlSMxvZ9rxrLI1pUkwoeaAMI A==; X-CSE-ConnectionGUID: kcnydTNuRgeHtSDq0wzkQw== X-CSE-MsgGUID: ZWf7oWyWTsGKaQnsrGBHpQ== X-IronPort-AV: E=McAfee;i="6700,10204,11317"; a="40279242" X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="40279242" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2025 12:16:55 -0800 X-CSE-ConnectionGUID: UMFvC5zoTBe4Tr1tx5Lg5Q== X-CSE-MsgGUID: aLbGLXOXQ0a+rQVk1obHnw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="105743493" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 16 Jan 2025 12:16:53 -0800 Received: by stinkbox (sSMTP sendmail emulation); Thu, 16 Jan 2025 22:16:52 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: Paz Zcharya Subject: [PATCH 5/8] drm/i915: Extract lrr_params_changed() Date: Thu, 16 Jan 2025 22:16:34 +0200 Message-ID: <20250116201637.22486-6-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250116201637.22486-1-ville.syrjala@linux.intel.com> References: <20250116201637.22486-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä Pull the "do we actually need a LRR update?" checks into a small helper for clarity. Cc: Paz Zcharya Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index fa398d7d1baa..9b42d980ed7e 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -6081,6 +6081,13 @@ static int intel_modeset_checks(struct intel_atomic_state *state) return 0; } +static bool lrr_params_changed(const struct drm_display_mode *old_adjusted_mode, + const struct drm_display_mode *new_adjusted_mode) +{ + return old_adjusted_mode->crtc_vblank_end != new_adjusted_mode->crtc_vblank_end || + old_adjusted_mode->crtc_vtotal != new_adjusted_mode->crtc_vtotal; +} + static void intel_crtc_check_fastset(const struct intel_crtc_state *old_crtc_state, struct intel_crtc_state *new_crtc_state) { @@ -6101,8 +6108,8 @@ static void intel_crtc_check_fastset(const struct intel_crtc_state *old_crtc_sta &new_crtc_state->dp_m_n)) new_crtc_state->update_m_n = false; - if ((old_crtc_state->hw.adjusted_mode.crtc_vtotal == new_crtc_state->hw.adjusted_mode.crtc_vtotal && - old_crtc_state->hw.adjusted_mode.crtc_vblank_end == new_crtc_state->hw.adjusted_mode.crtc_vblank_end)) + if (!lrr_params_changed(&old_crtc_state->hw.adjusted_mode, + &new_crtc_state->hw.adjusted_mode)) new_crtc_state->update_lrr = false; if (intel_crtc_needs_modeset(new_crtc_state)) From patchwork Thu Jan 16 20:16:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13942217 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9028C02183 for ; Thu, 16 Jan 2025 20:17:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C91210E2DE; Thu, 16 Jan 2025 20:17:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="F6ySMrHy"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id B530710E2DE for ; Thu, 16 Jan 2025 20:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737058618; x=1768594618; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eMlICTkfiFkopTS0rZu81jT/ZVbXq5xTKxJrD1PgTrk=; b=F6ySMrHy2fwQMJ5H+AnQKRthyiK9iqM3yK82NHcp4Td1pxZXqvJ3N6Rz YYx3cIvESUHgEY0aM4I4vYWBCAHMQDEzgVC34Ed7ZsA+c8TWH/CIp0dXv wjz//z2NJJnTRVwQak7bNtgteHu59HrY4I+rQZ2jysRSr0X1gOM4HrvXp UoOD59jdhMgCeUM3KNpTGxmMDPlQbjaNCGSAbz81Du/O9+K8H/uLhQzNf FPvXoeOknZCeIPnHOCRBgRMYiQm5Z7bDgLHUwkriaqOg7VVaHPXqh9+Fn mG23TP6HjBWfcJ+fBeaLPd//M+snKfMb4ptmiUXVgP6bhayRCnlxPNmPR Q==; X-CSE-ConnectionGUID: w7tnq6xaRgKssNeqFAQ1Sg== X-CSE-MsgGUID: Cjnq523ZRdCNCgFXq8XVsQ== X-IronPort-AV: E=McAfee;i="6700,10204,11317"; a="40279244" X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="40279244" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2025 12:16:58 -0800 X-CSE-ConnectionGUID: giNMHuzzRgWcy1eThg1l9Q== X-CSE-MsgGUID: E0ogpcDmS2SPFwxDMlfXoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="105743494" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 16 Jan 2025 12:16:56 -0800 Received: by stinkbox (sSMTP sendmail emulation); Thu, 16 Jan 2025 22:16:55 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: Paz Zcharya Subject: [PATCH 6/8] drm/i915: Allow fastboot to fix up the vblank delay Date: Thu, 16 Jan 2025 22:16:35 +0200 Message-ID: <20250116201637.22486-7-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250116201637.22486-1-ville.syrjala@linux.intel.com> References: <20250116201637.22486-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä GOP might not agree with our idea of what the vblank delay should be. Reuse the LRR codepaths to fix that up via a fastset. The relevant registers aren't actually double buffered so this is a little bit dodgy. While I've not seen any real issues from frobbing these live, let's limit this to just the fastboot case (by only allowing it when old_crtc_state->inherited==true). Cc: Paz Zcharya Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 26 +++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 9b42d980ed7e..471fe7d80f30 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -5358,6 +5358,19 @@ pipe_config_cx0pll_mismatch(struct drm_printer *p, bool fastset, intel_cx0pll_dump_hw_state(display, b); } +static bool allow_vblank_delay_fastset(const struct intel_crtc_state *old_crtc_state) +{ + struct intel_display *display = to_intel_display(old_crtc_state); + + /* + * Allow fastboot to fix up vblank delay (handled via LRR + * codepaths), a bit dodgy as the registers aren't + * double buffered but seems to be working more or less... + */ + return HAS_LRR(display) && old_crtc_state->inherited && + !intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DSI); +} + bool intel_pipe_config_compare(const struct intel_crtc_state *current_config, const struct intel_crtc_state *pipe_config, @@ -5490,7 +5503,8 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config, PIPE_CONF_CHECK_I(name.crtc_hsync_start); \ PIPE_CONF_CHECK_I(name.crtc_hsync_end); \ PIPE_CONF_CHECK_I(name.crtc_vdisplay); \ - PIPE_CONF_CHECK_I(name.crtc_vblank_start); \ + if (!fastset || !allow_vblank_delay_fastset(current_config)) \ + PIPE_CONF_CHECK_I(name.crtc_vblank_start); \ PIPE_CONF_CHECK_I(name.crtc_vsync_start); \ PIPE_CONF_CHECK_I(name.crtc_vsync_end); \ if (!fastset || !pipe_config->update_lrr) { \ @@ -6084,7 +6098,8 @@ static int intel_modeset_checks(struct intel_atomic_state *state) static bool lrr_params_changed(const struct drm_display_mode *old_adjusted_mode, const struct drm_display_mode *new_adjusted_mode) { - return old_adjusted_mode->crtc_vblank_end != new_adjusted_mode->crtc_vblank_end || + return old_adjusted_mode->crtc_vblank_start != new_adjusted_mode->crtc_vblank_start || + old_adjusted_mode->crtc_vblank_end != new_adjusted_mode->crtc_vblank_end || old_adjusted_mode->crtc_vtotal != new_adjusted_mode->crtc_vtotal; } @@ -6098,11 +6113,14 @@ static void intel_crtc_check_fastset(const struct intel_crtc_state *old_crtc_sta if (old_crtc_state->vrr.in_range != new_crtc_state->vrr.in_range) new_crtc_state->update_lrr = false; - if (!intel_pipe_config_compare(old_crtc_state, new_crtc_state, true)) + if (!intel_pipe_config_compare(old_crtc_state, new_crtc_state, true)) { drm_dbg_kms(&i915->drm, "[CRTC:%d:%s] fastset requirement not met, forcing full modeset\n", crtc->base.base.id, crtc->base.name); - else + } else { + if (allow_vblank_delay_fastset(old_crtc_state)) + new_crtc_state->update_lrr = true; new_crtc_state->uapi.mode_changed = false; + } if (intel_compare_link_m_n(&old_crtc_state->dp_m_n, &new_crtc_state->dp_m_n)) From patchwork Thu Jan 16 20:16:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13942218 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A68A8C02183 for ; Thu, 16 Jan 2025 20:17:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 525AE10E9F2; Thu, 16 Jan 2025 20:17:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="cA7LdSrP"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1237F10E9F3 for ; Thu, 16 Jan 2025 20:17:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737058622; x=1768594622; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QoOYo/3YTciOJ76p6nBHVywzwD84RkgX4TzF4uhr9vw=; b=cA7LdSrPyP18aUXqtwMmIlbh1f+dqpZvf+qDcJEYr1RpsCeWjswWZoB3 n3qXgG9v66Q+B77lbu7l6FXEj5kV23MdATDccMsgYjKbZLzN0Liwg7yLQ 0Et6bsQ8Fp9hj4RpvoMQNKWwFjqW114LbVSlMpA3gAtk1LCcrHPt7W1Mq nMYFTetKDtc782nJ5MR0qv1GDobFxF7XGGa+1J84rkXXP/YQV7Pr44tIe r4mdy4d7TAaNeI8RUWOK/u2Uk9Tz72Sv5DWmd8YwIZl2Ad4ktIdfPNS8K 3ReiswoLQ3ZdfU0TTQKbLaluvyTmpZbfqRvLh1d7bud/AheC1DTOuhUsM w==; X-CSE-ConnectionGUID: O5WfZVrBSZGz4LjT58THXg== X-CSE-MsgGUID: ZM+vk+hFRFS/09rRXhwWwA== X-IronPort-AV: E=McAfee;i="6700,10204,11317"; a="40279248" X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="40279248" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2025 12:17:01 -0800 X-CSE-ConnectionGUID: Doe6sU5/TCKaiPLR5iDEGA== X-CSE-MsgGUID: EEZ1Uct/TaKkYBuO433LVA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="105743497" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 16 Jan 2025 12:16:59 -0800 Received: by stinkbox (sSMTP sendmail emulation); Thu, 16 Jan 2025 22:16:58 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: Paz Zcharya , Ankit Nautiyal Subject: [PATCH 7/8] drm/i915/dsb: Add support for triggering VRR push with DSB Date: Thu, 16 Jan 2025 22:16:36 +0200 Message-ID: <20250116201637.22486-8-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250116201637.22486-1-ville.syrjala@linux.intel.com> References: <20250116201637.22486-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä We have at least two options for how to do the TRANS_PUSH_SEND + commit completion signalling with the DSB: Option A) 1. trigger TRANS_PUSH_SEND 2. wait for "safe window" 3. signal the interrupt In this cases step 2 should not do anything if we were already between vmin and vmax decision boundaries. Otherwise we'll wait until the next start of the vblank period. Option B) 1. wait for "safe window" 2. trigger TRANS_PUSH_SEND 3. signal the interrupt This option is perhaps a bit less racy, but if we do somehow screw up and the wait is a nop but the push gets deferred until the next frame then we'll end up completing the commit a frame too early. So for now I'm leaning towards option A since losing the race won't have any drastic consequences. To deal with the race we can give the DSB a bit more time to start step 2 before the hardware has started the vblank termination properly. Often times it seems to be fast enough to make it in time even without any extra vblank delay (the push is issued somewhere within a scanline and it latches on the next scanline). v2: Use intel_vrr_possible() to determine if we need some vblank delay (also avoids adding it for DSI which doens't actually program the transcoder registers correctly for it) Cc: Paz Zcharya Signed-off-by: Ville Syrjälä Reviewed-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_display.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 471fe7d80f30..82c27da45d33 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -2630,6 +2630,14 @@ static int intel_crtc_vblank_delay(const struct intel_crtc_state *crtc_state) if (intel_crtc_needs_wa_14015401596(crtc_state)) vblank_delay = max(vblank_delay, 1); + /* + * Add a minimal vblank delay to make sure the push + * doesn't doesn't race with the "wait for safe + * window" we use for frame completion with DSB. + */ + if (intel_vrr_possible(crtc_state)) + vblank_delay = max(vblank_delay, 1); + return vblank_delay; } @@ -7761,6 +7769,8 @@ static void intel_atomic_dsb_finish(struct intel_atomic_state *state, intel_crtc_planes_update_arm(new_crtc_state->dsb_commit, state, crtc); + intel_vrr_send_push(new_crtc_state->dsb_commit, new_crtc_state); + if (!new_crtc_state->dsb_color_vblank) { intel_dsb_wait_vblanks(new_crtc_state->dsb_commit, 1); intel_dsb_wait_vblank_delay(state, new_crtc_state->dsb_commit); From patchwork Thu Jan 16 20:16:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13942219 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2F71C02187 for ; Thu, 16 Jan 2025 20:17:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7448F10E9F7; Thu, 16 Jan 2025 20:17:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="eW30hEdy"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2231F10E9FA for ; Thu, 16 Jan 2025 20:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737058625; x=1768594625; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=r5AUeADN+C3fFAGQmFI1/3rIHXDxN5ESb3SUxYVcq3k=; b=eW30hEdyUiEOt2D/3R/WO9W1KRTjX24osBzHVyjFHTqlHkw1FO4fHZCT o7rtQcNVkpeLDEsbRHiZc7KcMzw/hm/EJsNUE+7JKy0rWwdeXqJ8PAnQu Zr+8bxtLgRE0u5cTk1pcvDPrDnwaCATT/YHwezuoxNZS3PnlyV78nG5zL EMkAZ7u7BfUjdzQ24GckWZNKxbjhRq9ndSIdtmyOpiEz8c1diOGpLqrOZ GIyTTHu/LLhKAen4/EaCxtdDsRd4Br1FQIjM5Pn2tbgEcpAitm5ijYQ8K 1kirp0molmfAPSOxBVkAgQGVrARGYGTSYdKk1Gyyhy0eH/3D9Ifa68vl9 g==; X-CSE-ConnectionGUID: o55za+PmSQS+HceGhR9o3Q== X-CSE-MsgGUID: x+0yMW8YSMuolgbB2G3a+g== X-IronPort-AV: E=McAfee;i="6700,10204,11317"; a="40279251" X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="40279251" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2025 12:17:05 -0800 X-CSE-ConnectionGUID: Qg09QsCWSlKStg3/ke2WWA== X-CSE-MsgGUID: U6tTGZsXQoqCm/mHo3g+1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,210,1732608000"; d="scan'208";a="105743509" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 16 Jan 2025 12:17:02 -0800 Received: by stinkbox (sSMTP sendmail emulation); Thu, 16 Jan 2025 22:17:02 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: Paz Zcharya , Ankit Nautiyal Subject: [PATCH 8/8] drm/i915/dsb: Allow DSB to perform commits when VRR is enabled Date: Thu, 16 Jan 2025 22:16:37 +0200 Message-ID: <20250116201637.22486-9-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250116201637.22486-1-ville.syrjala@linux.intel.com> References: <20250116201637.22486-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä Now that we know how to issue the push with the DSB we can allow the DSB to drive the commits even when VRR is active. Cc: Paz Zcharya Signed-off-by: Ville Syrjälä Reviewed-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_display.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 82c27da45d33..a3269d5b954e 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -7728,7 +7728,6 @@ static void intel_atomic_dsb_finish(struct intel_atomic_state *state, /* FIXME deal with everything */ new_crtc_state->use_dsb = new_crtc_state->update_planes && - !new_crtc_state->vrr.enable && !new_crtc_state->do_async_flip && !new_crtc_state->has_psr && !new_crtc_state->scaler_state.scaler_users &&