From patchwork Mon Sep 2 08:06:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786891 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 F349DCA0ED3 for ; Mon, 2 Sep 2024 08:05:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7264510E066; Mon, 2 Sep 2024 08:05:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KIzTy1pn"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F55510E066 for ; Mon, 2 Sep 2024 08:05:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725264301; x=1756800301; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y4KWHN0eVGQmVQYusn/c+IIKbezsIJPuSYNJw+39bFc=; b=KIzTy1pn8Rp85kdwHVaCkPe4IAMlIUm2T/D60BBxPmi86MnF6vbvzbO2 h7ekuEySb8LSVG5lupi2cd9V5yCnATuhs5JFlIwB1VxbU5GpMMWKaDoA2 5bAd9GIBb2d/LgFP1oJS4o0UG6irJ22gnlaDPDZVqWwzutjxPOIWslmWd j/kebRDjfp4C6nI5/Zx1hMUlpmA6j7d75t04R/ZcRKFeeoi6y+R9eXfi9 wVlDe0C3slGGxhDpklKE8+9sd0+m44Kj0S9rFfCkT8c+p3yjzq77bF7DM aYPnUOvONYUy2E0tvXfeVCIVCwnME7T0B5InnpsyciyyooYo/k3ed1+77 A==; X-CSE-ConnectionGUID: Kt1Ks2lGQMWC+64kMkyXlQ== X-CSE-MsgGUID: vVemSH4tRluKo8ch++XDtg== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967380" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967380" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:01 -0700 X-CSE-ConnectionGUID: 98zN5inkTQeEtjYn+9ha6A== X-CSE-MsgGUID: g/C16rF+TpGbtIlIAGFoow== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039798" 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; 02 Sep 2024 01:04: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/13] drm/i915/dp: Avoid vrr compute config for HDMI sink Date: Mon, 2 Sep 2024 13:36:22 +0530 Message-ID: <20240902080635.2946858-2-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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 do not support VRR with HDMI so skip vrr compute config step for DP with HDMI sink. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 789c2f78826d..4fc60149f5ed 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -3101,7 +3101,12 @@ intel_dp_compute_config(struct intel_encoder *encoder, if (!HAS_DDI(dev_priv)) g4x_dp_set_clock(encoder, pipe_config); - intel_vrr_compute_config(pipe_config, conn_state); + /* + * VRR via PCON is currently unsupported. + * TODO: Add support for VRR for DP HDMI2.1 PCON. + */ + if (!intel_dp_has_hdmi_sink(intel_dp)) + intel_vrr_compute_config(pipe_config, conn_state); intel_dp_compute_as_sdp(intel_dp, pipe_config); intel_psr_compute_config(intel_dp, pipe_config, conn_state); intel_alpm_lobf_compute_config(intel_dp, pipe_config, conn_state); From patchwork Mon Sep 2 08:06:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786893 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 1EF7FCD3420 for ; Mon, 2 Sep 2024 08:05:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9285910E233; Mon, 2 Sep 2024 08:05:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="MJXDpSyg"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 76FC810E233 for ; Mon, 2 Sep 2024 08:05: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=1725264303; x=1756800303; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=l5J3n3hWwf7KwALbs7m+XSX57SctyU4P5JJ7Ix1Kh3Y=; b=MJXDpSygRv1HDUOHnLTUngZc+A4UQ2X6+hcT6Rwg3iZDiTnsQVJXto2S wtBVPJbAnWuCwkebToJQ6sJniBjmewn+L5HU6oOV7n+pNcijfTyMgbdB2 4RolmcQ7RJg6cnt/hBMT3VEZp89SxnW+jK37lLsP0JchaDlB3eSXVAyFN Y6VzaBih8hbjB7IGfZx1TzlK4Rn8KYa7yrL3ObryNzXU4uL/4Bza1gj5p xoZNKEvwLTN0Ib6h9RvgDgWOi5uivTyWEMa52/ha8MEVpUgdwByZkwjL8 bMOln2hlfVWqSgVWjinm9t6ThChC3nuBxc+bG015kJazeYYqIEDiGgZS8 w==; X-CSE-ConnectionGUID: Pw3y56QFQHuGV7E7eN/UmA== X-CSE-MsgGUID: E+urMV+wRYixo7bKZ2q3Wg== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967384" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967384" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:03 -0700 X-CSE-ConnectionGUID: 3pwdpQu+QO6AYBqgsgPy9A== X-CSE-MsgGUID: 7SKvAPVuTv61eAuaFBPwaw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039820" 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; 02 Sep 2024 01:05: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/13] drm/i915/dp: fix the Adaptive sync Operation mode for SDP Date: Mon, 2 Sep 2024 13:36:23 +0530 Message-ID: <20240902080635.2946858-3-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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 4fc60149f5ed..f733cf61e399 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2726,7 +2726,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; @@ -2738,7 +2737,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 Mon Sep 2 08:06:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786894 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 A4FC5CA0ED3 for ; Mon, 2 Sep 2024 08:05:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BC4110E235; Mon, 2 Sep 2024 08:05:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="iGgd1LzS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5BD2D10E234 for ; Mon, 2 Sep 2024 08:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725264305; x=1756800305; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=++O6zAt69isyTM34KXFVgnl90IcyWWavrsmciZHeCfQ=; b=iGgd1LzSfhyaY7gTkm7UTVtHRdPTsy/rQ0Uoyfj9KKtwFX63BWZJxVpF emsNkQDxkzKKgMWO3LQG2vJPS34SdIJ13KukWyGr249HFGOK96K0uFt0R C/Ki0Z/fsqNJEKzyCxa7sa1NPdqtG4BiWI35bIlSgKSsz7s1otrtwWa8W 9RO1FICz8N7x4FsPIJfFXt5p1acz4/+3izHsaxBVIoahEyE8q5XdFKJYH yt8F3EE/GYlt7NOKD/pjgg0ysqTa5zm1+Qf0ebvHHkEhX9B/0yrKQDm5s 5teeCKMvD0vPiiBfW0bqMOA59EnhcZrEcnH8YLtX/JZxYQk39yjjIAZ6x A==; X-CSE-ConnectionGUID: g+TtThl0Tui2+ks3p+irNw== X-CSE-MsgGUID: /FcLVs7fSlC/znD0LpTiAg== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967386" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967386" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:05 -0700 X-CSE-ConnectionGUID: PcdrRiluSr27KKF6yNfN1A== X-CSE-MsgGUID: p9C5Sq1BS1eQ6Zv/T4FWOA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039837" 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; 02 Sep 2024 01:05: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/13] drm/i915/display: Add member fixed_rr to denote Fixed refresh rate with VRRTG Date: Mon, 2 Sep 2024 13:36:24 +0530 Message-ID: <20240902080635.2946858-4-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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. v2: Move get_config change where vrr.fixed is actually set. (Mitul) Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_display.c | 4 +++- drivers/gpu/drm/i915/display/intel_display_types.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 78ce402a5cd0..8b437e79c8df 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1005,7 +1005,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, @@ -5480,6 +5481,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 868ff8976ed9..62a796f61d20 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; From patchwork Mon Sep 2 08:06:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786895 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 67588CD3420 for ; Mon, 2 Sep 2024 08:05:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0271E10E23D; Mon, 2 Sep 2024 08:05:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="R3VfQnzL"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3AE9710E234 for ; Mon, 2 Sep 2024 08:05:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725264307; x=1756800307; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wTBGaVE5aLjk8j3sz+2QQw8Ec6X3tTW/0F8/v834ha8=; b=R3VfQnzL3U4S46LPexgcDhB6J2tH9L3dgpQqUUN0RdD+spyoWhxx8gZD zaZbtg8z1K9QQLIZU00LuwSlDk22IGRCpOTjsU8AHZP7HyK36CEzPLfgt jdfqUeVzdTt0KPRfsGuLnUpDfOiHPKJfagEz8jctCpbWOFKPlM+YvQ0q5 zjXgksqHN2D657KHwrlJcgF44SAMHvb/9es+5xTADc1ojoNCJ5S7UN/cr 2weOjkFGIxzkdKFxp2Dn4lXQbZWtIqJ7UoIqtiYGOBCCG2Jn0IQ1I2X6+ uc3BOz7SZXjkNcaRippYxCOAEt+Z1jNkdhMNjKv/w9lvUA3IXC39v2gB3 Q==; X-CSE-ConnectionGUID: js4HFBWQTnGMfKkmJRmf+w== X-CSE-MsgGUID: 7XI1K7wgQVW27gQ2/qRmJw== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967388" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967388" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:06 -0700 X-CSE-ConnectionGUID: ix2E5jWkSuOANES2yS3ZIQ== X-CSE-MsgGUID: LLJn6rWORHmeCOjomP6tFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039847" 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; 02 Sep 2024 01:05: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/13] drm/i915/display: Enable MSA Ignore Timing PAR only when in not fixed_rr mode Date: Mon, 2 Sep 2024 13:36:25 +0530 Message-ID: <20240902080635.2946858-5-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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" MSA Ignore Timing PAR enable is set in the DP sink when we enable variable refresh rate. When using VRR timing generator for fixed refresh rate we do not want to ignore the mode timings, as the refresh rate is still fixed. Modify the checks to enable MSA Ignore Timing PAR only when not in fixed_rr mode. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- drivers/gpu/drm/i915/display/intel_dp_link_training.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index 25ff3ff0ab95..f6df1de2c6a3 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -2213,7 +2213,7 @@ static void intel_dp_sink_set_msa_timing_par_ignore_state(struct intel_dp *intel { struct drm_i915_private *i915 = dp_to_i915(intel_dp); - if (!crtc_state->vrr.enable) + if (!crtc_state->vrr.enable || crtc_state->vrr.fixed_rr) return; if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_DOWNSPREAD_CTRL, diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c index 9c8738295106..4820a4bdbe26 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c @@ -718,8 +718,14 @@ void intel_dp_link_training_set_mode(struct intel_dp *intel_dp, int link_rate, b static void intel_dp_update_downspread_ctrl(struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state) { + bool enable_msa_timing_par_ignore; + + /* Enable MSA TIMING PAR IGNORE only in non fixed_rr mode */ + if (crtc_state->vrr.enable && !crtc_state->vrr.fixed_rr) + enable_msa_timing_par_ignore = true; + intel_dp_link_training_set_mode(intel_dp, - crtc_state->port_clock, crtc_state->vrr.flipline); + crtc_state->port_clock, enable_msa_timing_par_ignore); } void intel_dp_link_training_set_bw(struct intel_dp *intel_dp, From patchwork Mon Sep 2 08:06:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786896 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 69C1BCA0ED3 for ; Mon, 2 Sep 2024 08:05:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B6C310E234; Mon, 2 Sep 2024 08:05:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="IjLzVhlW"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1E25610E23F for ; Mon, 2 Sep 2024 08:05:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725264308; x=1756800308; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2E+r97iG5vmE1SbrPqUGiu2ZywI5p2va9oQ5DCJChdQ=; b=IjLzVhlWqrKIFS93Jhm7zzvhFwtyjaBANu2yYtrHElwc56iBDn4I/1xT Iq9CkUn4itGA4u+PztIKQ7CVmKyvyBANvpVW7c19dcBCNGYsgl0kC0AVc 9Pn86XvdrY81nABDmmV/DP9fgQN0GEnpWirGcfilg1/VU15RrglV6GtBX XQuxIwb5k0OSTbG2XfC/PrmzsPAzxDvAsjzdrCUmApgi+I7n8IPfT/496 cq7VUUruynQ+U5JoIZ3UyieoYCK6ZFyCEpSLNa4uxVHHndPbigJr4AxR2 JRws95+LjmRJrFFwKJ3khLMvfWrlaDzOCkxrouETINY7CzR6ANEwYeHJN Q==; X-CSE-ConnectionGUID: cVsjizWjR0+QFUTgzBUxiw== X-CSE-MsgGUID: xNavGXdxQlSXlXZaB2uhjw== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967391" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967391" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:08 -0700 X-CSE-ConnectionGUID: lv4NlcxyQs2eLIHQlP7VaQ== X-CSE-MsgGUID: Qkj+dUgQQ+qPo2looKSi7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039860" 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; 02 Sep 2024 01:05: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/13] drm/i915/dp: Set FAVT mode in DP SDP with fixed refresh rate Date: Mon, 2 Sep 2024 13:36:26 +0530 Message-ID: <20240902080635.2946858-6-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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 f733cf61e399..05399f87d7f8 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2737,6 +2737,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 Mon Sep 2 08:06:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786897 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 5FD0FCD13CF for ; Mon, 2 Sep 2024 08:05:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0095010E237; Mon, 2 Sep 2024 08:05:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="MpW3MKfl"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id D80A110E23A for ; Mon, 2 Sep 2024 08:05: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=1725264310; x=1756800310; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BQBFH8lqc4/yJYn7tMDrhjuR7TZM1KwjqGifaCci0r4=; b=MpW3MKfl7c42kpEqfEBK5krhA+4eebbURQlPo5BomuFjP0WfUbPSA7nG sYwR385hceyVuFD8LYE8AB8hqpITmITlAk9MiIohIIFdr1IapEI0I9i4M KpMPp6yG7PgcPGDNBVbs0ZMf1GKVsu1GX0gdkZLeAwm/GGD0RBIXkxUK7 bnY9MigEssp77F92W7wxQYrtrQD8LcHPI0BtXAHte3JfpWZmBbop5PVUk DOp8ZudcLaHBfBuwdGgKqEyNopCZb910Omb13p7O6VFuYb+mx8G1p+SXH 3liB0DWNTfF0Hs7LbxjG2XZqwEar7X1TurLhVRX1cpSkZsOayKPKQgvT2 g==; X-CSE-ConnectionGUID: SaPYML8jTYeepTswIs2RZQ== X-CSE-MsgGUID: yA5oCiwnSP26oCKMrasOWA== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967394" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967394" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:10 -0700 X-CSE-ConnectionGUID: SZFtylG5TYSBUVBaSYrasA== X-CSE-MsgGUID: KQBj49LqRkyFlXfiO0qafQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039873" 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; 02 Sep 2024 01:05: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/13] drm/i915/vrr: Compute vrr vsync if platforms support it Date: Mon, 2 Sep 2024 13:36:27 +0530 Message-ID: <20240902080635.2946858-7-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index 9a51f5bac307..03af50b9f9eb 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -231,7 +231,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 && crtc_state->vrr.enable) { + if (HAS_AS_SDP(display) && 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 Mon Sep 2 08:06:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786898 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 19E9ECD3420 for ; Mon, 2 Sep 2024 08:05:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B2A7010E23F; Mon, 2 Sep 2024 08:05:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Ykj5zKhP"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id C635E10E23C for ; Mon, 2 Sep 2024 08:05: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=1725264312; x=1756800312; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xwZC+8BQx0Ju6kd3npKEUkokpAlKZZoB5HJtWHe8kFc=; b=Ykj5zKhPYk2D2dJl82Yx8bLT5xVwQzMTlyZv7XALD1l/ZA1Pm+iIxqUO lyimIwKZiQHfj5/33CH1b3iYkqY1yu6gG1UYjWFrIRX90zshNYvZdD36R GZj5IpLnwj3Yawz2ifqWHcF0hFMtIwwPMjjeMlXUlAuA8iyeHLqzW83WG mcP7WjjqOwZl7MvjxkoNzb3pFA0B5rkFj1zfSgaY6OJQTswtJBUFh8Xvv oM3l8Gp4CFuWfJBblgD6Ziepc0wp74P8BTxH3QCdzj8Kz/TFmYGVXt7eI TdIjDFuRCN32C6bTFwIwVtFhZTnKPRzvo7Gjl2JWuF1cqSu8pNI4EYwMN Q==; X-CSE-ConnectionGUID: j0E6VR06TJGpgko3JuVFUQ== X-CSE-MsgGUID: gv6KMskqQZqsmXdqmZYg3w== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967397" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967397" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:12 -0700 X-CSE-ConnectionGUID: pTvMDJAwS2SDlB09/FIePw== X-CSE-MsgGUID: 1BQVqn1PS/68XmCMOC9hOg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039884" 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; 02 Sep 2024 01:05:10 -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/13] drm/i915/hdmi: Use VRR Timing generator for HDMI Date: Mon, 2 Sep 2024 13:36:28 +0530 Message-ID: <20240902080635.2946858-8-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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 Mon Sep 2 08:06:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786899 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 CD387CD13CF for ; Mon, 2 Sep 2024 08:05:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6802210E238; Mon, 2 Sep 2024 08:05:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="cnIrf5kg"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F0B710E23C for ; Mon, 2 Sep 2024 08:05:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725264314; x=1756800314; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=G1VgTillNeT2r8+fG1s1eLtgVeiTXNdCpxHBOeSUbxc=; b=cnIrf5kg9d4X9eW0ylBkP6nf+39N+PRzhAXcnv4ALC+u+fNtSfZ1B0Ju yn76+vc0+7Et3nz1bpqTfBYRKysZyo6QR9cn85DtIsl7+cbpES3DFQEMl Ncortc1k64vFCTll1MeLkx+VQCcGgqNgsC4x8zveaIirnSwgZROn7ZbN3 F+lnfj6KplIMY98h2qkL8jR2pP51bj7eLQe51/j8fiG5rfmFCrXswFpG6 Z1Qd4jSdPZ55NFXM/gLqB110nl1sAxhbIQO9JCn0hxLG2Nzj+S4MTBARL 038134hJm24SK5CU+DwfwlAvrLA3cheUL64zjsIvWNeNGvkXIrmpy7NMg w==; X-CSE-ConnectionGUID: yXB2+QENRWeDScBd1csNsA== X-CSE-MsgGUID: ZUO5+rlaRWuSMn9ge365YA== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967399" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967399" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:14 -0700 X-CSE-ConnectionGUID: 44TphiJSTXCokKUUawTwOA== X-CSE-MsgGUID: L7lAycYlTQ6Arebs40pMaQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039894" 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; 02 Sep 2024 01:05:12 -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/13] drm/i915/display: Disable PSR before disabling VRR Date: Mon, 2 Sep 2024 13:36:29 +0530 Message-ID: <20240902080635.2946858-9-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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 8b437e79c8df..df6d4cab05e6 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1193,6 +1193,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 (intel_crtc_vrr_disabling(state, crtc)) { intel_vrr_disable(old_crtc_state); intel_crtc_update_active_timings(old_crtc_state, false); @@ -1203,8 +1205,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 Mon Sep 2 08:06:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786900 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 7831ACA0ED3 for ; Mon, 2 Sep 2024 08:05:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B99110E23C; Mon, 2 Sep 2024 08:05:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="GGgBrGRa"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE0C210E239 for ; Mon, 2 Sep 2024 08:05:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725264316; x=1756800316; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9jvV9YJWZWYefhwfacPMGE7RhgIMbtPheuS1A/Y6Lbk=; b=GGgBrGRaMF4JidQ6Oxo9FT4Ss845vrcFWi6ILW/NaXM4YiO7KpSMd80a W5woXeDDd/BG3BPsphZrbPJt5tuw7NrwBX46IbmT3vMn9qeQdqXjLOzf2 Ck1dT39PLScr80KbzCl9da49LG6ymoswk0GiDee7MHOew+OiVuAqnBOSb TxNppXLU8/VnZjKD/p8hUPTZ+2w4h6lsGvxkO0yZyYIt0XG0KM4oNAR2e V8IRWCSJlawUsjhLi3oQqNIVg/i5zmXlF4pZisdFoszLXa7RSSGSCQ9ni hg0BU6cbdy08D5aHNGdgswcTlaZSlVBxQKxLlnscI5SCFEzprAKBC/Wy/ w==; X-CSE-ConnectionGUID: CxLY6275RKOZX0PUP6jSBg== X-CSE-MsgGUID: 5KjHU+ZdSsugriev4Nl9oQ== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967402" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967402" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:16 -0700 X-CSE-ConnectionGUID: j3SBc0oPSiimDKS8s+nZKg== X-CSE-MsgGUID: YElGg+cgQL6mvbkSTm0G7Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039906" 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; 02 Sep 2024 01:05:14 -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/13] drm/i915/psr: Allow PSR for fixed refrsh rate with VRR TG Date: Mon, 2 Sep 2024 13:36:30 +0530 Message-ID: <20240902080635.2946858-10-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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 257526362b39..d868454153ef 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 Mon Sep 2 08:06:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786901 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 28E60CA0ED3 for ; Mon, 2 Sep 2024 08:05:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8B8810E239; Mon, 2 Sep 2024 08:05:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="efDX+NZW"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6753110E240 for ; Mon, 2 Sep 2024 08:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725264318; x=1756800318; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=01TI6opKis2D5vpCt2AiVC4+l1KGvKSUhCR7gRbq13c=; b=efDX+NZWB3UD8R4GpTGftpMEWT1hrIV2QjFkRlH7tU20wLQhAHtDWznj feSE1vgV6EH/jZ/Rvq/QW3KRgU8usAk0MVPEhWT8RvcoNXhsZ/xfiwbOL mBJQKzhHBOdzO862r3N0pOGd4INjfrN8xPx/DTRn21N9wDQOgPBkEd8DF HXtXyZDggzhNkUcGoH514OfrJ+Oqvml1GyVzxLIMOZpb35zBrR182NOHd 0Iq2bieMhUs46nOlgni5jo+1r7iI/2Hc3jCaZazYfSA42J0XP7F4VJO3U 0rrYOlYx2SOo5asuXlyx8jKcYncaf9cd/smUOpLCVfHXMvib0XYDzwq4b g==; X-CSE-ConnectionGUID: YvfWbcbjTOCjUtblK8VPpg== X-CSE-MsgGUID: PY20M6jQToy9ZBn4NxOqtA== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967403" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967403" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:18 -0700 X-CSE-ConnectionGUID: cj1qQcb2SRa3Mv720IDI9A== X-CSE-MsgGUID: 5N3t6pBQQF+P9z1CAUP3Ng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039915" 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; 02 Sep 2024 01:05:16 -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/13] drm/i915/vrr: Avoid sending PUSH when VRR TG is used with Fixed refresh rate Date: Mon, 2 Sep 2024 13:36:31 +0530 Message-ID: <20240902080635.2946858-11-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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 03af50b9f9eb..5e947465c6e0 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -313,7 +313,7 @@ void intel_vrr_send_push(const struct intel_crtc_state *crtc_state) struct intel_display *display = to_intel_display(crtc_state); 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(display, TRANS_PUSH(display, cpu_transcoder), @@ -325,7 +325,7 @@ bool intel_vrr_is_push_sent(const struct intel_crtc_state *crtc_state) struct intel_display *display = to_intel_display(crtc_state); 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(display, TRANS_PUSH(display, cpu_transcoder)) & TRANS_PUSH_SEND; @@ -339,8 +339,9 @@ void intel_vrr_enable(const struct intel_crtc_state *crtc_state) if (!crtc_state->vrr.enable) return; - intel_de_write(display, TRANS_PUSH(display, cpu_transcoder), - TRANS_PUSH_EN); + if (!crtc_state->vrr.fixed_rr) + intel_de_write(display, TRANS_PUSH(display, cpu_transcoder), + TRANS_PUSH_EN); if (HAS_AS_SDP(display)) intel_de_write(display, From patchwork Mon Sep 2 08:06:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786902 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 C40D5CD3420 for ; Mon, 2 Sep 2024 08:05:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6648A10E23B; Mon, 2 Sep 2024 08:05:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="bmZ3hOLh"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 509C010E239 for ; Mon, 2 Sep 2024 08:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725264320; x=1756800320; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vam2QhzhBVW5QkDYiP+Rn8xCNUaFclElSi7CzXeG8Po=; b=bmZ3hOLh864LuSZ2x8R4ziL//7SYBebpEn31RcojtLRUJ2AIEqJNI0KI pNnbU7bJq6Qlz83lPc+c4s6XCIwaaZ7QK5Jj/PTrM/CY6Y4KxralNDs2G N0G9rDBY4boyPW1OaK6a1igfGZCdsZXJF07fseY84Z5qBoKw7XkaDnOnn W6o5dQg73FmAh3yurEWn7sc01S6vTPDuhCZ4RWWS7CTNkz58fFOIiZChp UDCW7ZLIpgyMk42mlYOy5oxhb5NCScye6em7XtokLNY6uJOnjg3G4JMUU BBGbsgLBG5MZS+qbf5kH52VedU02MUErAzyrDUy8LsSpSTKYsb+bKL4nJ Q==; X-CSE-ConnectionGUID: iBe2WxEIRoGP8ajp1SzXJA== X-CSE-MsgGUID: Wm5i2bCYTGufmfjvXgXNIQ== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967404" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967404" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:19 -0700 X-CSE-ConnectionGUID: eiyYNzFfSB+Is8nJ2FAofw== X-CSE-MsgGUID: zrI26ifVRHCcDqnaakml4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039925" 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; 02 Sep 2024 01:05:18 -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 11/13] drm/i915/vrr: Handle joiner with vrr Date: Mon, 2 Sep 2024 13:36:32 +0530 Message-ID: <20240902080635.2946858-12-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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 5e947465c6e0..e01d4b4b8fa7 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -169,13 +169,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; @@ -272,6 +265,9 @@ void intel_vrr_set_transcoder_timings(const struct intel_crtc_state *crtc_state) struct intel_display *display = to_intel_display(crtc_state); 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 @@ -313,6 +309,9 @@ void intel_vrr_send_push(const struct intel_crtc_state *crtc_state) struct intel_display *display = to_intel_display(crtc_state); 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; @@ -336,6 +335,9 @@ void intel_vrr_enable(const struct intel_crtc_state *crtc_state) struct intel_display *display = to_intel_display(crtc_state); enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; + if (intel_crtc_is_joiner_secondary(crtc_state)) + return; + if (!crtc_state->vrr.enable) return; @@ -364,6 +366,9 @@ void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state) struct intel_display *display = to_intel_display(old_crtc_state); 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 Mon Sep 2 08:06:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786904 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 31A0ACD13CF for ; Mon, 2 Sep 2024 08:05:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1C8B10E23A; Mon, 2 Sep 2024 08:05:23 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="K1hIp/hc"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2F2210E23A for ; Mon, 2 Sep 2024 08:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725264322; x=1756800322; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=as/KSRPrL8F/iL1eF15bcB47STaw7YK0D+5qhKV22hQ=; b=K1hIp/hcaEqHpvh6v2QDzRgPDfa/z4f5ejCO+Ke5AdMG/6P059TnMfFP LU6eKyz1r9a8ZcECRijpUyJacSVEXqDlt898UTisvYa6lDgeX3JoQP8+V h6XY4SO7YgYslC12IlvC2iMvaJp89bP6ZCeolLCGViMWn2cx1okqdM04q rSiXO8+nBjfO3t6pU8gPhCu6xKZQfvVszFqFDvTzH9n7NUNDQr4sY8H5P /2Q/0m1kXXdUVIdQgFkTeGK1aMXeLWLc57VEbnCOZP3RhFkkPmcWL7KyO H909soGVyGTqUHuy8hjOc2V/OntiS7/JLN4CkbxsazulEVC5DSpGwWJ6K A==; X-CSE-ConnectionGUID: QnQAsKlOTWix7y/OlaCAiA== X-CSE-MsgGUID: NOTMj48qSEqId/zzy0R0kA== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967409" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967409" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:22 -0700 X-CSE-ConnectionGUID: QsW5wEx3QFGBNmOnHd2m2A== X-CSE-MsgGUID: Ptwn3ZBaQw+ssyzU5Ped1A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039944" 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; 02 Sep 2024 01:05:20 -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 12/13] drm/i915/vrr: Always use VRR timing generator for XELPD+ Date: Mon, 2 Sep 2024 13:36:33 +0530 Message-ID: <20240902080635.2946858-13-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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. v3: Set vrr.fixed during vrr_get_config (Mitul) v4: Avoid setting vrr.fixed when vrr.cmrr is enabled. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_vrr.c | 61 +++++++++++++++--------- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index e01d4b4b8fa7..625728aff5a2 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -172,41 +172,54 @@ 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(display)) 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(display) >= 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 { + crtc_state->vrr.in_range = + intel_vrr_is_in_range(connector, drm_mode_vrefresh(adjusted_mode)); - vmin = max_t(int, vmin, adjusted_mode->crtc_vtotal); - vmax = max_t(int, vmax, adjusted_mode->crtc_vtotal); + if (!crtc_state->vrr.in_range) + return; - if (vmin >= vmax) - return; + 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); - /* - * 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; + 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.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) { @@ -421,6 +434,10 @@ void intel_vrr_get_config(struct intel_crtc_state *crtc_state) TRANS_VRR_VMAX(display, cpu_transcoder)) + 1; crtc_state->vrr.vmin = intel_de_read(display, TRANS_VRR_VMIN(display, cpu_transcoder)) + 1; + if (!crtc_state->cmrr.enable && + 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 Mon Sep 2 08:06:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13786903 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 5CE46CA0ED3 for ; Mon, 2 Sep 2024 08:05:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BDC7010E241; Mon, 2 Sep 2024 08:05:23 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Y6lUBAha"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id EA50310E23A for ; Mon, 2 Sep 2024 08:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725264323; x=1756800323; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=U2eR3j/PbmtZd7fxfFMb2lsw9WLSelfDM+cNmjcioEw=; b=Y6lUBAhaPRFatr3qCKFNSL6g0oSZ9LRf0uGL18778DqEnfoWLT+/wR4f D8FGSYnvoAtX2pDhFFk1E/1sy60/65FCxIOVxgof9LOMnU2MvakRKVYEN EbOrc25nXObHhxbH9jDTALcTy9Pm4zVOtxuWaGgIPXRAVYTAHrC8BHBAf FrfASsed6aQsYPl/wlG7C8WzoVSTC2Rgmi+3ebtlKQZHO3dMe6VYpeiGe yOutKMZDJrG538dMFE970sRY2DW+6rwwmET020k9p1Mo4FwPeJaY2TRpf HRyt+fk+t/MZ7IIROYYkhxT5VQbpKei9vu199f8+h29GkB1+Mx6nlTSM9 w==; X-CSE-ConnectionGUID: MybJ+J3oQ/i1KWoA+DuXtw== X-CSE-MsgGUID: 4Ff3YSzRRvqWDA6ZVOcEBA== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="23967415" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="23967415" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 01:05:23 -0700 X-CSE-ConnectionGUID: uGMwReAlSfK06hgezHKtDA== X-CSE-MsgGUID: kn7WqlZnQrS9IQCzMKwOYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65039963" 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; 02 Sep 2024 01:05:22 -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 13/13] drm/i915/display: Add fixed_rr to crtc_state_dump Date: Mon, 2 Sep 2024 13:36:34 +0530 Message-ID: <20240902080635.2946858-14-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240902080635.2946858-1-ankit.k.nautiyal@intel.com> References: <20240902080635.2946858-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" Print vrr.fixed_rr along with other vrr parameters. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_crtc_state_dump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c index 705ec5ad385c..55bb1c327fab 100644 --- a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c +++ b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c @@ -296,8 +296,9 @@ void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config, intel_dump_buffer("ELD: ", pipe_config->eld, drm_eld_size(pipe_config->eld)); - drm_printf(&p, "vrr: %s, vmin: %d, vmax: %d, pipeline full: %d, guardband: %d flipline: %d, vmin vblank: %d, vmax vblank: %d\n", + drm_printf(&p, "vrr: %s, fixed_rr: %s vmin: %d, vmax: %d, pipeline full: %d, guardband: %d flipline: %d, vmin vblank: %d, vmax vblank: %d\n", str_yes_no(pipe_config->vrr.enable), + str_yes_no(pipe_config->vrr.fixed_rr), pipe_config->vrr.vmin, pipe_config->vrr.vmax, pipe_config->vrr.pipeline_full, pipe_config->vrr.guardband, pipe_config->vrr.flipline,