From patchwork Tue Jul 9 03:26:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13727220 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 B9F07C3DA47 for ; Tue, 9 Jul 2024 03:26:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4241510E20B; Tue, 9 Jul 2024 03:26:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="fyW2Dlj3"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 314EE10E0AE for ; Tue, 9 Jul 2024 03:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720495561; x=1752031561; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hSz65qbq4P4C6bZHFD4dUPCHE1q6wm8RPLYUBYyriOk=; b=fyW2Dlj3NFC1szXyoMn3eDpwiJPIP7qa9/yQ13JXrAYTygCdhMBfD0Dp ggv/xIEd1XwVCzryvGWDxRY98K7s5NBL9qT7PgXiqsNTo4FF/LPLRwSS/ jdnb/PeBUhn/Ji8m7LR8oBCAZ/GeLrDE0jEe7xI+6iOzdZu53Nqzb6WIL biLIyRDYtTrt307ftT36V74MAeLj+lPnFKlv76lU4BcLEJkybTHbjKsNi CGEHCj6/WaqcUI6ggjcuWVBExlrp0D5yO8rGCejvs8Dlxe+4o87krxzOA fx8fO5OKa69jFqLY/PNwvy0CjNppWmyx/UIrGhIOZTbYSXZ5hBhFtXRPy A==; X-CSE-ConnectionGUID: AtS4L/fET86eMG51cVIHuw== X-CSE-MsgGUID: A6qhieNZRw6j97F0ua/ZHA== X-IronPort-AV: E=McAfee;i="6700,10204,11127"; a="21536451" X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="21536451" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:01 -0700 X-CSE-ConnectionGUID: ocP0XujnSUe5+2bzvOwVHw== X-CSE-MsgGUID: BE4qSxCRRZOpeXCbi9XfrQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="48374164" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:25:59 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, mitulkumar.ajitkumar.golani@intel.com Subject: [PATCH 01/10] drm/i915/dp: fix the Adaptive sync Operation mode for SDP Date: Tue, 9 Jul 2024 08:56:42 +0530 Message-Id: <20240709032651.1824185-2-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240709032651.1824185-1-ankit.k.nautiyal@intel.com> References: <20240709032651.1824185-1-ankit.k.nautiyal@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" Currently we support Adaptive sync operation mode with dynamic frame rate, but instead the operation mode with fixed rate is set. This was initially set correctly in the earlier version of changes but later got changed, while defining a macro for the same. Fixes: a5bd5991cb8a ("drm/i915/display: Compute AS SDP parameters") Cc: Mitul Golani Cc: Ankit Nautiyal Cc: Jani Nikula Reviewed-by: Mitul Golani Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 3903f6ead6e6..3f46e13bb7b8 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2631,7 +2631,6 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp, crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC); - /* Currently only DP_AS_SDP_AVT_FIXED_VTOTAL mode supported */ as_sdp->sdp_type = DP_SDP_ADAPTIVE_SYNC; as_sdp->length = 0x9; as_sdp->duration_incr_ms = 0; @@ -2643,7 +2642,7 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp, as_sdp->target_rr = drm_mode_vrefresh(adjusted_mode); as_sdp->target_rr_divider = true; } else { - as_sdp->mode = DP_AS_SDP_AVT_FIXED_VTOTAL; + as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL; as_sdp->vtotal = adjusted_mode->vtotal; as_sdp->target_rr = 0; } From patchwork Tue Jul 9 03:26:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13727221 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 0EFEBC3DA45 for ; Tue, 9 Jul 2024 03:26:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7770E10E338; Tue, 9 Jul 2024 03:26:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="d9oh2k+B"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 39F1510E338 for ; Tue, 9 Jul 2024 03:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720495563; x=1752031563; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1AGZoUKuFORD93QklvEolhhpG4TQOy39AnVi+Xvfcec=; b=d9oh2k+BgP0ZEkrCKKsUIVUArwzPq/UdwRzNuf8Z5lWNDWkS0Abj747U ZRsER8kVNbMsonIZzmiHPoJBVlZmggc9gMA7FV9B3Ps5/Zha16vOJJzmo 49pTe2Qz66Mal/LOl3UCWY0spYAF2mlJ7lSqyiFPoDpqwLCGEWAhqN2Lw XH8FWEfRf0aLiVmUt5BPA75PwDO3BIQKTqZ5pdP5YUA7OCGjRfyTuAQHr aoR3qKvqdS9VU/r/29dzP4rdoJVk2bdb+5h+jH8iM2y5s9aCfdK6IFG97 pzvRfqXkLtwoMaeF08A/PhL4o6fhiZ/K8Qts/gvM9gMETSpaLyQ8Vz01x A==; X-CSE-ConnectionGUID: kvkByD07R5CSfEtlUohfCA== X-CSE-MsgGUID: G0PD/1zMT1GCjoX0nFxtlA== X-IronPort-AV: E=McAfee;i="6700,10204,11127"; a="21536454" X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="21536454" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:03 -0700 X-CSE-ConnectionGUID: 2pijD5zhQ9iRY2iAD2c/eA== X-CSE-MsgGUID: 07shsBrXTI26s2cdCA+qPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="48374172" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:01 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, mitulkumar.ajitkumar.golani@intel.com Subject: [PATCH 02/10] drm/i915/display: Add member fixed_rr to denote Fixed refresh rate with VRRTG Date: Tue, 9 Jul 2024 08:56:43 +0530 Message-Id: <20240709032651.1824185-3-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240709032651.1824185-1-ankit.k.nautiyal@intel.com> References: <20240709032651.1824185-1-ankit.k.nautiyal@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" Add fixed_rr member to struct vrr to represent the case where a fixed refresh rate with VRR timing generator is required. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_display.c | 4 +++- drivers/gpu/drm/i915/display/intel_display_types.h | 2 +- drivers/gpu/drm/i915/display/intel_vrr.c | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index c2c388212e2e..85695dc2b2e5 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1004,7 +1004,8 @@ static bool vrr_params_changed(const struct intel_crtc_state *old_crtc_state, old_crtc_state->vrr.vmin != new_crtc_state->vrr.vmin || old_crtc_state->vrr.vmax != new_crtc_state->vrr.vmax || old_crtc_state->vrr.guardband != new_crtc_state->vrr.guardband || - old_crtc_state->vrr.pipeline_full != new_crtc_state->vrr.pipeline_full; + old_crtc_state->vrr.pipeline_full != new_crtc_state->vrr.pipeline_full || + old_crtc_state->vrr.fixed_rr != new_crtc_state->vrr.fixed_rr; } static bool cmrr_params_changed(const struct intel_crtc_state *old_crtc_state, @@ -5469,6 +5470,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config, if (!fastset) { PIPE_CONF_CHECK_BOOL(vrr.enable); + PIPE_CONF_CHECK_BOOL(vrr.fixed_rr); PIPE_CONF_CHECK_I(vrr.vmin); PIPE_CONF_CHECK_I(vrr.vmax); PIPE_CONF_CHECK_I(vrr.flipline); diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 8713835e2307..875370219892 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1407,7 +1407,7 @@ struct intel_crtc_state { /* Variable Refresh Rate state */ struct { - bool enable, in_range; + bool enable, in_range, fixed_rr; u8 pipeline_full; u16 flipline, vmin, vmax, guardband; u32 vsync_end, vsync_start; diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index 5a0da64c7db3..24568dae717a 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -421,6 +421,9 @@ void intel_vrr_get_config(struct intel_crtc_state *crtc_state) TRANS_VRR_VMAX(dev_priv, cpu_transcoder)) + 1; crtc_state->vrr.vmin = intel_de_read(dev_priv, TRANS_VRR_VMIN(dev_priv, cpu_transcoder)) + 1; + if (crtc_state->vrr.vmax == crtc_state->vrr.flipline && + crtc_state->vrr.vmin == crtc_state->vrr.flipline) + crtc_state->vrr.fixed_rr = true; } if (crtc_state->vrr.enable) { From patchwork Tue Jul 9 03:26:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13727222 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 A0315C3271E for ; Tue, 9 Jul 2024 03:26:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B2CE10E33A; Tue, 9 Jul 2024 03:26:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Fo/g7wAj"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2DBBA10E33A for ; Tue, 9 Jul 2024 03:26: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=1720495565; x=1752031565; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1DWeqDZ21skzl7OMON7e040OWqRJaPSPd9ztXxfl7zY=; b=Fo/g7wAjObDosBOwG4mLh2DXNvKgQIMeOYBidEEVM4sKknWOsxHtut7M oS8hc7jAgI2CNPwbNEWDgoMYC8T6mH1huSn4vWHkRZYhPVfl1DEGMpdpM f8CqWVkhtNFPPKYLZ5678jBadE5cBxJZWhJ+2PDBUqiYYWpHs2d0d0dvV hmUU/jaR2Oh5f5VHrujcYwXchRAJmR0iUoerLwJ7A9ZABJija9JiUErtM 50i/x2IHc3Dd6VmP3aRuHmbxY02oJ6XoMVPy3do2zqnGccRw1ud2wwB/s KTD7CnGxphWPL13qQzNClxIp/qRecUmJ5tDhAWs5Fot6SFVYJalny4jbm Q==; X-CSE-ConnectionGUID: OwZHnJjqQnOww/7gm4xXMw== X-CSE-MsgGUID: merG/KpiREuMITijJcinqA== X-IronPort-AV: E=McAfee;i="6700,10204,11127"; a="21536456" X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="21536456" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:05 -0700 X-CSE-ConnectionGUID: 8mxmXu/mTHuCta3j8RTfyw== X-CSE-MsgGUID: mhfc6sfVQtCXGHSClGY56w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="48374176" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:03 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, mitulkumar.ajitkumar.golani@intel.com Subject: [PATCH 03/10] drm/i915/dp: Set FAVT mode in DP SDP with fixed refresh rate Date: Tue, 9 Jul 2024 08:56:44 +0530 Message-Id: <20240709032651.1824185-4-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240709032651.1824185-1-ankit.k.nautiyal@intel.com> References: <20240709032651.1824185-1-ankit.k.nautiyal@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" While running with fixed refresh rate and VRR timing generator set FAVT mode (Fixed Vtotal) in DP Adaptive Sync SDP to intimate the panel about Fixed refresh rate. Signed-off-by: Ankit Nautiyal Reviewed-by: Mitul Golani --- drivers/gpu/drm/i915/display/intel_dp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 3f46e13bb7b8..dcb94526cf00 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2642,6 +2642,10 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp, as_sdp->target_rr = drm_mode_vrefresh(adjusted_mode); as_sdp->target_rr_divider = true; } else { + if (crtc_state->vrr.fixed_rr) + as_sdp->mode = DP_AS_SDP_AVT_FIXED_VTOTAL; + else + as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL; as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL; as_sdp->vtotal = adjusted_mode->vtotal; as_sdp->target_rr = 0; From patchwork Tue Jul 9 03:26:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13727223 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 AEEF6C3DA45 for ; Tue, 9 Jul 2024 03:26:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 49F7410E3F7; Tue, 9 Jul 2024 03:26:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="OhrBC1PF"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1F5E710E479 for ; Tue, 9 Jul 2024 03:26:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720495567; x=1752031567; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6sjRps4vVBzYzP2x8Sxec4RRjzRmr00cCqQyhB4X6i0=; b=OhrBC1PFNhrbN5lNs4xJ8Fsgm67yxXv4gKOVx9/8ifJjhJGjCP12XSB0 9/HZJPXAegO8IOdIMBx+HeH0RHfykbPxxBkowQLHW6oG2sC84jdz/IiU2 QS3kTdyGJ5yyzXFI/JuKi3orRV+JzGVbTwEdD1lL0BXFs1/ED7Zx4C8cv 8qCuQDKt6DxPb0snB5q6Tp3D+4utscC0QfzAuTQbu+0Ze7w/OMuNaiEbK qNZYNZCvuDqsV1sTlR8KDcATqnViKvAQMgW4wTN5hWUqkD3sfhN6Cb7fu RUshxdcThJikR76zSwgVo3tTJ3eUaSLgzOAhUIXif0UOW+8S5TPvqps3p A==; X-CSE-ConnectionGUID: jzAqBVB8TZG5kQWegxUX9A== X-CSE-MsgGUID: cYCiMZm5SZalQNf/MlGt5w== X-IronPort-AV: E=McAfee;i="6700,10204,11127"; a="21536460" X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="21536460" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:07 -0700 X-CSE-ConnectionGUID: 1sxKNdeARv+Z2t447AymKQ== X-CSE-MsgGUID: n4VtJ0g8Tnea9ujvftwf9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="48374182" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:05 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, mitulkumar.ajitkumar.golani@intel.com Subject: [PATCH 04/10] drm/i915/vrr: Compute vrr vsync if platforms support it Date: Tue, 9 Jul 2024 08:56:45 +0530 Message-Id: <20240709032651.1824185-5-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240709032651.1824185-1-ankit.k.nautiyal@intel.com> References: <20240709032651.1824185-1-ankit.k.nautiyal@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" Previously, TRANS_VRR_VSYNC was exclusively used for panels with adaptive-sync SDP support in VRR scenarios. However, to drive fixed refresh rates using the VRR Timing generator, we now need to program TRANS_VRR_VSYNC regardless of adaptive sync SDP support. Therefore, let's remove the adaptive sync SDP check and program TRANS_VRR_VSYNC for platforms where VRR timing generator is used. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_vrr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index 24568dae717a..43b772f91556 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -233,8 +233,7 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state, crtc_state->mode_flags |= I915_MODE_FLAG_VRR; } - if (intel_dp_as_sdp_supported(intel_dp) && - crtc_state->vrr.enable) { + if (HAS_AS_SDP(i915) && crtc_state->vrr.enable) { crtc_state->vrr.vsync_start = (crtc_state->hw.adjusted_mode.crtc_vtotal - crtc_state->hw.adjusted_mode.vsync_start); From patchwork Tue Jul 9 03:26:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13727224 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 E2BE5C3DA47 for ; Tue, 9 Jul 2024 03:26:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8ACA010E479; Tue, 9 Jul 2024 03:26:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Hdb7jMQz"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 16A1910E479 for ; Tue, 9 Jul 2024 03:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720495569; x=1752031569; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bhd+5+rPwN/NlkX1D/SdRWGJ3qhcWoirzRxfZuPbgwc=; b=Hdb7jMQzNfEF8RHRi4imuIFdu5XktR2LtAERXODcRocnATTWF+qrc+ni edMkJJVmTqDcLEFczucad8d4g2nSbekP+sxx603ghgQyY6Pwou+tXJfta GVD9qq9EsBVpCUDu+iEODW+EOzbH724TRiu0AkfuXuZWMPdBeTPoHlRr4 sVeRixgwq4Q69zt1i9sKuikB3Q1b96TJZCHXSgN19u5T6lgcd3IvUh8v0 iPwNfUCNjOlj+oJ0Hn7T9RmcMlAtAe1SD4GvyZ9z+xLWrsaSEn9TBaNwp +R1U1MKLe46zNFvG2kKICCBpjcXuyK5V0C2RoPRa9ThkFeFRfu3vI9pHk g==; X-CSE-ConnectionGUID: on8rl1iIQu2rdvVf25jfbA== X-CSE-MsgGUID: A7QttvbqTv2QO5TLOqrLLA== X-IronPort-AV: E=McAfee;i="6700,10204,11127"; a="21536462" X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="21536462" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:09 -0700 X-CSE-ConnectionGUID: bGygtChOR3G4W2dLS5gzng== X-CSE-MsgGUID: KTI0+QevTEeHM2hVpqG9qQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="48374185" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:07 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, mitulkumar.ajitkumar.golani@intel.com Subject: [PATCH 05/10] drm/i915/hdmi: Use VRR Timing generator for HDMI Date: Tue, 9 Jul 2024 08:56:46 +0530 Message-Id: <20240709032651.1824185-6-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240709032651.1824185-1-ankit.k.nautiyal@intel.com> References: <20240709032651.1824185-1-ankit.k.nautiyal@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" Add support for using VRR Timing generator for HDMI panels. Signed-off-by: Ankit Nautiyal Reviewed-by: Mitul Golani --- drivers/gpu/drm/i915/display/intel_hdmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c index 19498ee455fa..c8442772bacf 100644 --- a/drivers/gpu/drm/i915/display/intel_hdmi.c +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c @@ -59,6 +59,7 @@ #include "intel_lspcon.h" #include "intel_panel.h" #include "intel_snps_phy.h" +#include "intel_vrr.h" inline struct drm_i915_private *intel_hdmi_to_i915(struct intel_hdmi *intel_hdmi) { @@ -2366,6 +2367,8 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder, } } + intel_vrr_compute_config(pipe_config, conn_state); + intel_hdmi_compute_gcp_infoframe(encoder, pipe_config, conn_state); From patchwork Tue Jul 9 03:26:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13727225 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 E3AABC3271E for ; Tue, 9 Jul 2024 03:26:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A5EA10E47F; Tue, 9 Jul 2024 03:26:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QRgCQ+/E"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A47310E47A for ; Tue, 9 Jul 2024 03:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720495571; x=1752031571; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6Yc8EUu97yz15Bq8u58gNMIhIKyW73BfvIMv5Oigm38=; b=QRgCQ+/E2FNzVmlXTS0EqY7UKdWXhn4iabp+eBubnPsUrC5dzQ3wMh0z 8dHk7bjOZ3oaMGLncFF/Kz2XYJHh15hkMtqQ2vc3rsjunqAYIArq67+LM If7g4Ohi3hdFFByF2vicn+g17t0DMhUxcowm2pp+oW09SrPoB0fwS22XW R5pq27hVyCpvzu8uoEaPi9D88zQ+ya+7Szje5MfymizYuzvQRhkyRv4Du 0f2kdZ/rpv+tpzly8D/KWAPBfVAxs2+alROXr6YUifgOEm2dOTv7kl8NC dbs4cHgQe4dMOSkGJpp1R2J1egg4qwrmI1FwN0twkFk8/ArZIkHEOgLkw g==; X-CSE-ConnectionGUID: foQPLBY7SKeefKulKXaR0A== X-CSE-MsgGUID: Gpr0pVFvS2emxPZ7AT6hKQ== X-IronPort-AV: E=McAfee;i="6700,10204,11127"; a="21536465" X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="21536465" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:11 -0700 X-CSE-ConnectionGUID: xXM6/2B6TGSzUjFYq5x9Hw== X-CSE-MsgGUID: +nqZS4dcSB+j5+JzwJGBjQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="48374193" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:09 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, mitulkumar.ajitkumar.golani@intel.com Subject: [PATCH 06/10] drm/i915/display: Disable PSR before disabling VRR Date: Tue, 9 Jul 2024 08:56:47 +0530 Message-Id: <20240709032651.1824185-7-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240709032651.1824185-1-ankit.k.nautiyal@intel.com> References: <20240709032651.1824185-1-ankit.k.nautiyal@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" As per bspec 49268: Disable PSR before disabling VRR. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 85695dc2b2e5..a979931a081b 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1182,6 +1182,8 @@ static void intel_pre_plane_update(struct intel_atomic_state *state, intel_atomic_get_new_crtc_state(state, crtc); enum pipe pipe = crtc->pipe; + intel_psr_pre_plane_update(state, crtc); + if (vrr_disabling(old_crtc_state, new_crtc_state)) { intel_vrr_disable(old_crtc_state); intel_crtc_update_active_timings(old_crtc_state, false); @@ -1192,8 +1194,6 @@ static void intel_pre_plane_update(struct intel_atomic_state *state, intel_drrs_deactivate(old_crtc_state); - intel_psr_pre_plane_update(state, crtc); - if (hsw_ips_pre_update(state, crtc)) intel_crtc_wait_for_next_vblank(crtc); From patchwork Tue Jul 9 03:26:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13727226 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 98A45C3DA45 for ; Tue, 9 Jul 2024 03:26:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3EF1910E31B; Tue, 9 Jul 2024 03:26:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="kuRFWgeb"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 01EE910E47A for ; Tue, 9 Jul 2024 03:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720495573; x=1752031573; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2b22XpkZX/jwfW/ML35NRopWVrqRIdaQbawe9VweTjg=; b=kuRFWgebAiCpNFzi3aLbt8ztlz/4D1gpE58gfwp5To74C5qUJr5nocko iGRLN0Ta4gnT9hZTGu9YU/X4CZRCFvdPqi8DPdNieASW/fcGvb/dhiNxG UZZpODcp3VLGtzlx3WMlZqRxRfLSgK9tHU2y+hJ64V38pNUJ9pCUInuBm 68DTuEmOQQ1vD+btRbqJjK1h3ny1KARSGtrBOFLinkWcBkHgT2jJewO3U 1O2q/6/5bFP5pSZqfdZajQZi3zYNDUfhTs5ycC31nK50cZNOUTnC/Vx2c X+lzLNKUtA+W5EFCVnfbW3n67MZY5dj5QzCtyydLEgZ90mSO/iHp4umzM g==; X-CSE-ConnectionGUID: jOOyrkUbR6e7qTqwiK+V0Q== X-CSE-MsgGUID: clZo2Va7QSSbaMJ5aqsQnA== X-IronPort-AV: E=McAfee;i="6700,10204,11127"; a="21536469" X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="21536469" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:13 -0700 X-CSE-ConnectionGUID: 6v8p09OfTB6KnyBb0Wax4Q== X-CSE-MsgGUID: vU6J1TqtR56LOsZPWtmNqA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="48374198" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:11 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, mitulkumar.ajitkumar.golani@intel.com Subject: [PATCH 07/10] drm/i915/psr: Allow PSR for fixed refrsh rate with VRR TG Date: Tue, 9 Jul 2024 08:56:48 +0530 Message-Id: <20240709032651.1824185-8-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240709032651.1824185-1-ankit.k.nautiyal@intel.com> References: <20240709032651.1824185-1-ankit.k.nautiyal@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" At the moment PSR/PSR2 are not supported with variable refresh rate. However it can be supported with fixed refresh rate while running with VRR timing generator. Enable PSR for fixed refresh rate when using the VRR timing generator. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 9cb1cdaaeefa..5a228d8e93b5 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1523,7 +1523,7 @@ static bool _psr_compute_config(struct intel_dp *intel_dp, * Current PSR panels don't work reliably with VRR enabled * So if VRR is enabled, do not enable PSR. */ - if (crtc_state->vrr.enable) + if (crtc_state->vrr.enable && !crtc_state->vrr.fixed_rr) return false; if (!CAN_PSR(intel_dp)) From patchwork Tue Jul 9 03:26:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13727227 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 DF419C3271E for ; Tue, 9 Jul 2024 03:26:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82E9B10E47B; Tue, 9 Jul 2024 03:26:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Tir6pHkm"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id E688B10E47C for ; Tue, 9 Jul 2024 03:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720495575; x=1752031575; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qsJtFPECpVonxR8FJznGhosm1QlA6y0p8/mxoC7Oq6o=; b=Tir6pHkmEpFIhiMvL7UnE3Lrps+BSJEnUbAZ67vWWnQx28Fo6JzWCpmn kteEzSCdy31IfJ6esh/eyf2EVVHKWhgqvduFaV7VmK6IgnwfaWcUEDLeI Q+jSzk5KRKBU3H7ky0sELJ2TKGBvq9ertSmezGlycvMac/k+z6g0HtuUO /8rQ5bhcsRYFr0ZfmVX14lvdY1Xt6RRleTS2oYq3U3ISUbyxdqVt1CPoh wu2WdGOx3rwbW1L3hIdTBcGbPdG6mrGTx2SeKmlO4C+lL6r3/0yHxeMbA VvBUjZ5nVxur4x+M1A5nGLyJG4yUsHTzzPSto7K24cF6EJlQ7RH4b6B/O g==; X-CSE-ConnectionGUID: f9q3Smm3RpmlN/Y0g0wt0g== X-CSE-MsgGUID: shdMdGumTr25HupG44SOGQ== X-IronPort-AV: E=McAfee;i="6700,10204,11127"; a="21536477" X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="21536477" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:15 -0700 X-CSE-ConnectionGUID: O/SZnhgCTG69QvnniNEtjQ== X-CSE-MsgGUID: jdwHw7zxQWCJNzc+ceR93w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="48374203" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:13 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, mitulkumar.ajitkumar.golani@intel.com Subject: [PATCH 08/10] drm/i915/vrr: Avoid sending PUSH when VRR TG is used with Fixed refresh rate Date: Tue, 9 Jul 2024 08:56:49 +0530 Message-Id: <20240709032651.1824185-9-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240709032651.1824185-1-ankit.k.nautiyal@intel.com> References: <20240709032651.1824185-1-ankit.k.nautiyal@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" As per Bspec:68925: Push enable must be set if not configuring for a fixed refresh rate (i.e Vmin == Flipline == Vmax is not true). Signed-off-by: Ankit Nautiyal Reviewed-by: Mitul Golani --- drivers/gpu/drm/i915/display/intel_vrr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index 43b772f91556..43ade1c24784 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -316,7 +316,7 @@ void intel_vrr_send_push(const struct intel_crtc_state *crtc_state) struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; - if (!crtc_state->vrr.enable) + if (!crtc_state->vrr.enable || crtc_state->vrr.fixed_rr) return; intel_de_write(dev_priv, TRANS_PUSH(dev_priv, cpu_transcoder), @@ -329,7 +329,7 @@ bool intel_vrr_is_push_sent(const struct intel_crtc_state *crtc_state) struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; - if (!crtc_state->vrr.enable) + if (!crtc_state->vrr.enable || crtc_state->vrr.fixed_rr) return false; return intel_de_read(dev_priv, TRANS_PUSH(dev_priv, cpu_transcoder)) & TRANS_PUSH_SEND; @@ -343,8 +343,9 @@ void intel_vrr_enable(const struct intel_crtc_state *crtc_state) if (!crtc_state->vrr.enable) return; - intel_de_write(dev_priv, TRANS_PUSH(dev_priv, cpu_transcoder), - TRANS_PUSH_EN); + if (!crtc_state->vrr.fixed_rr) + intel_de_write(dev_priv, TRANS_PUSH(dev_priv, cpu_transcoder), + TRANS_PUSH_EN); if (HAS_AS_SDP(dev_priv)) intel_de_write(dev_priv, From patchwork Tue Jul 9 03:26:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13727228 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 05150C3DA47 for ; Tue, 9 Jul 2024 03:26:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A1B3810E47C; Tue, 9 Jul 2024 03:26:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Cs8ea8PT"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD86D10E47C for ; Tue, 9 Jul 2024 03:26:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720495577; x=1752031577; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9RfYfSiDdCgce1dHXFunLqC0PuQmXGWXbF9n7Qo29NI=; b=Cs8ea8PTrVjALP0uEgeSzZ1kfFSnlNkuyZu8veoJ68TYWzwZWukhD2vu oIss0cLAS1tL5f9yHBdNLtPbIj2NGRwFqE1J+7NB3/MUUnkE+MNzTX4l1 BK4qqPB/Oh/FK2OvkJNJ8Io/RY+WyR/grax4F7f+BvWpwWk88h0DacgZh sbhIYJ9Fi3zOT6xsIzMZ2zj8Yi18EKxqfnvR54nvXmoDl2OYTy11t5f95 tKQfteJjb+AwXbpMlaKLaBR7bJ+MtHx8LZ8cgp+r05Q2WwDWrV41xzbGd YiQ+3AnM883Pfn7Bvg1Qs6+/v9mrxj8Tsz6oda1G/XRC/NLJ7pgYIOi0Z A==; X-CSE-ConnectionGUID: 1SqKKUVkSpej+NGYUxuWxA== X-CSE-MsgGUID: S1yIdKQRQJ6+hnQjSG59gw== X-IronPort-AV: E=McAfee;i="6700,10204,11127"; a="21536478" X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="21536478" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:17 -0700 X-CSE-ConnectionGUID: j5J4g6wcTFekUidyMf526w== X-CSE-MsgGUID: lbJo9EMUSAWlwgpG0z7L8g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="48374206" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:15 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, mitulkumar.ajitkumar.golani@intel.com Subject: [PATCH 09/10] drm/i915/vrr: Handle joiner with vrr Date: Tue, 9 Jul 2024 08:56:50 +0530 Message-Id: <20240709032651.1824185-10-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240709032651.1824185-1-ankit.k.nautiyal@intel.com> References: <20240709032651.1824185-1-ankit.k.nautiyal@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" Do not program transcoder registers for VRR for the secondary pipe of the joiner. Remove check to skip VRR for joiner case. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_vrr.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index 43ade1c24784..9f6b83f059cb 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -171,13 +171,6 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state, const struct drm_display_info *info = &connector->base.display_info; int vmin, vmax; - /* - * FIXME all joined pipes share the same transcoder. - * Need to account for that during VRR toggle/push/etc. - */ - if (crtc_state->joiner_pipes) - return; - if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) return; @@ -274,6 +267,9 @@ void intel_vrr_set_transcoder_timings(const struct intel_crtc_state *crtc_state) struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; + if (intel_crtc_is_joiner_secondary(crtc_state)) + return; + /* * This bit seems to have two meanings depending on the platform: * TGL: generate VRR "safe window" for DSB vblank waits @@ -316,6 +312,9 @@ void intel_vrr_send_push(const struct intel_crtc_state *crtc_state) struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; + if (intel_crtc_is_joiner_secondary(crtc_state)) + return; + if (!crtc_state->vrr.enable || crtc_state->vrr.fixed_rr) return; @@ -340,6 +339,9 @@ void intel_vrr_enable(const struct intel_crtc_state *crtc_state) struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; + if (intel_crtc_is_joiner_secondary(crtc_state)) + return; + if (!crtc_state->vrr.enable) return; @@ -369,6 +371,9 @@ void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state) struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); enum transcoder cpu_transcoder = old_crtc_state->cpu_transcoder; + if (intel_crtc_is_joiner_secondary(old_crtc_state)) + return; + if (!old_crtc_state->vrr.enable) return; From patchwork Tue Jul 9 03:26:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13727229 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 CC265C3DA45 for ; Tue, 9 Jul 2024 03:26:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5673310E47D; Tue, 9 Jul 2024 03:26:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="j08oJ/J1"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id D65B810E47D for ; Tue, 9 Jul 2024 03:26:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720495579; x=1752031579; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JOyMZqNNef1NeOXRXLKwEwBn9DXTI6liUH6aJf0wQDA=; b=j08oJ/J1dxXubxfPqUObmMn/un9WUsRKSM50x9Huv02Tq4Nup74ow4JS ckO9j8fY1u484N+AiIsJPRSbxV+ph47keDqP/s2Le6r1hXh81ZOCm/viG JbC8C8WMWcSJDe88RRqsFp4VpTMnf187H5pRM3Ts7Ql3PJvp4jRAKcatj Swm9KBjMwIYNm4vDnPDki27ryp8140tNKisVpZOHJ1AccnPEjNWrQN8aW BuvUTd8QSCpa9kvnbIrTnZBl8iT7bBWwDkjoXrsXfKgtpf6ZPsd1s3dXC m2fsKgG+DzFiMAz3wNBAOEB9nraEJmT6XUB/0S7Lw8U3S8YjTtrL6/T9x g==; X-CSE-ConnectionGUID: kV6xzrY6SgO7+P9q6m9s7w== X-CSE-MsgGUID: 7LrnCF7sQ1CBTdiBxtGMvA== X-IronPort-AV: E=McAfee;i="6700,10204,11127"; a="21536481" X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="21536481" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:19 -0700 X-CSE-ConnectionGUID: ECEfkwnbShar182Swi1N8w== X-CSE-MsgGUID: DNy0E0JhRVqu6Q5QRCUgkA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,193,1716274800"; d="scan'208";a="48374211" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2024 20:26:17 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, mitulkumar.ajitkumar.golani@intel.com Subject: [PATCH 10/10] drm/i915/vrr: Always use VRR timing generator for XELPD+ Date: Tue, 9 Jul 2024 08:56:51 +0530 Message-Id: <20240709032651.1824185-11-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240709032651.1824185-1-ankit.k.nautiyal@intel.com> References: <20240709032651.1824185-1-ankit.k.nautiyal@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" Currently VRR timing generator is used only when VRR is enabled by userspace. From XELPD+, gradually move away from older timing generator and use VRR timing generator for fixed refresh rate also. In such a case, Flipline VMin and VMax all are set to the Vtotal of the mode, which effectively makes the VRR timing generator work in fixed refresh rate mode. v2: Use VRR Timing Generator from XELPD+ instead of MTL as it needs Wa_14015406119. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_vrr.c | 59 +++++++++++++++--------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index 9f6b83f059cb..7af08e7a7896 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -174,41 +174,56 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state, if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) return; - crtc_state->vrr.in_range = - intel_vrr_is_in_range(connector, drm_mode_vrefresh(adjusted_mode)); - if (!crtc_state->vrr.in_range) - return; - if (HAS_LRR(i915)) crtc_state->update_lrr = true; - vmin = DIV_ROUND_UP(adjusted_mode->crtc_clock * 1000, - adjusted_mode->crtc_htotal * info->monitor_range.max_vfreq); - vmax = adjusted_mode->crtc_clock * 1000 / - (adjusted_mode->crtc_htotal * info->monitor_range.min_vfreq); + if (!crtc_state->uapi.vrr_enabled && DISPLAY_VER(i915) >= 20) { + /* + * for XELPD+ always go for VRR timing generator even for + * fixed refresh rate. + */ + crtc_state->vrr.vmin = adjusted_mode->crtc_vtotal; + crtc_state->vrr.vmax = adjusted_mode->crtc_vtotal; + crtc_state->vrr.flipline = adjusted_mode->crtc_vtotal; + crtc_state->vrr.fixed_rr = true; + } else { - vmin = max_t(int, vmin, adjusted_mode->crtc_vtotal); - vmax = max_t(int, vmax, adjusted_mode->crtc_vtotal); + crtc_state->vrr.in_range = + intel_vrr_is_in_range(connector, drm_mode_vrefresh(adjusted_mode)); - if (vmin >= vmax) - return; + if (!crtc_state->vrr.in_range) + return; - /* - * flipline determines the min vblank length the hardware will - * generate, and flipline>=vmin+1, hence we reduce vmin by one - * to make sure we can get the actual min vblank length. - */ - crtc_state->vrr.vmin = vmin - 1; - crtc_state->vrr.vmax = vmax; - crtc_state->vrr.flipline = crtc_state->vrr.vmin + 1; + vmin = DIV_ROUND_UP(adjusted_mode->crtc_clock * 1000, + adjusted_mode->crtc_htotal * info->monitor_range.max_vfreq); + vmax = adjusted_mode->crtc_clock * 1000 / + (adjusted_mode->crtc_htotal * info->monitor_range.min_vfreq); + + vmin = max_t(int, vmin, adjusted_mode->crtc_vtotal); + vmax = max_t(int, vmax, adjusted_mode->crtc_vtotal); + + if (vmin >= vmax) + return; + + /* + * flipline determines the min vblank length the hardware will + * generate, and flipline>=vmin+1, hence we reduce vmin by one + * to make sure we can get the actual min vblank length. + */ + crtc_state->vrr.vmin = vmin - 1; + crtc_state->vrr.vmax = vmax; + + crtc_state->vrr.flipline = crtc_state->vrr.vmin + 1; + crtc_state->vrr.fixed_rr = false; + } /* * When panel is VRR capable and userspace has * not enabled adaptive sync mode then Fixed Average * Vtotal mode should be enabled. */ - if (crtc_state->uapi.vrr_enabled) { + if (crtc_state->uapi.vrr_enabled || crtc_state->vrr.fixed_rr) { crtc_state->vrr.enable = true; crtc_state->mode_flags |= I915_MODE_FLAG_VRR; } else if (is_cmrr_frac_required(crtc_state) && is_edp) {