From patchwork Mon Dec 2 02:45:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mitul Golani X-Patchwork-Id: 13889831 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 C33D5D49796 for ; Mon, 2 Dec 2024 02:43:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6893410E204; Mon, 2 Dec 2024 02:43:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="khu26crZ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7056810E204; Mon, 2 Dec 2024 02:43:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733107411; x=1764643411; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=K0uDzE0j0lffgNsjDsF3u5Bv3hPcPjqbURUnsPDz6es=; b=khu26crZNX35Ropw+OrzinXnj71hiF6B2sUHdEcfiVW4S/lAfp45bPnD nhKfu/x/O+WcxPu3jci3rArsXxFfOLQPIAtVspbXcGpTozzPwEGxsDDOi 5nEmJ2kI0Z0jbzfZu3SjqaUpxOonPhfLwLRwX83glpwDZBQdnowrDRlzH z20JS+MOvTkamrALX0XXizNkBhRjGLNgI1bOZtV4sMFj6zhMmL2EGWkZM wzYuAZJICLPy56TCg6szImeOB6MD7jduWARMmgl3LiByTWQu0l0Y7OvVx bAEyUFYft7dRL4ulzP8kxGvw5jhhWslMFUMdArAYkHS5tjXTGOt1p7mdf w==; X-CSE-ConnectionGUID: 20K11LJbTWSI14Al5DP4GA== X-CSE-MsgGUID: C0U3eYaHTlejVeXSpm7/IA== X-IronPort-AV: E=McAfee;i="6700,10204,11273"; a="44634841" X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="44634841" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2024 18:43:31 -0800 X-CSE-ConnectionGUID: 1WF7WUPUTl+z9V+pwcFKWg== X-CSE-MsgGUID: alIwvgKnQT6PsTMaZ4PoLg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="92878179" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa010.jf.intel.com with ESMTP; 01 Dec 2024 18:43:29 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org, ville.syrjala@linux.intel.com, jani.nikula@intel.com, ankit.k.nautiyal@intel.com Subject: [PATCH v5 1/6] drm/i915/vrr: Add crtc_state dump for vrr.vsync params Date: Mon, 2 Dec 2024 08:15:35 +0530 Message-ID: <20241202024540.2578856-2-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@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 crtc_state dump for vrr.vsync_{start/end} params to track the state correctly. --v2: - remove vrr_ pretext and use space instead of underscore (Jani). Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_crtc_state_dump.c | 4 +++- 1 file changed, 3 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..221be4f44104 100644 --- a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c +++ b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c @@ -296,11 +296,13 @@ 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, vmin: %d, vmax: %d, pipeline full: %d, guardband: %d flipline: %d, vsync start: %d, vsync end: %d, vmin vblank: %d, vmax vblank: %d\n", str_yes_no(pipe_config->vrr.enable), pipe_config->vrr.vmin, pipe_config->vrr.vmax, pipe_config->vrr.pipeline_full, pipe_config->vrr.guardband, pipe_config->vrr.flipline, + pipe_config->vrr.vsync_start, + pipe_config->vrr.vsync_end, intel_vrr_vmin_vblank_start(pipe_config), intel_vrr_vmax_vblank_start(pipe_config)); From patchwork Mon Dec 2 02:45:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mitul Golani X-Patchwork-Id: 13889832 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 28A63D49792 for ; Mon, 2 Dec 2024 02:43:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B7E5510E2F1; Mon, 2 Dec 2024 02:43:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Yz3qKrqR"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 92B6510E2EC; Mon, 2 Dec 2024 02:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733107413; x=1764643413; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VV18nvtvzXBI17R9QlIohSW3MpkqzW7lEain8+HFV88=; b=Yz3qKrqRig9MQpXWVK/zT6vIATnYSNuNiYJJ7o7+qRbbKyo0vmMT9V8q kK+YSPOKcWUJ5goxuqM4WZY2UGqKbloaF9bNCQef+zCoiTkRRXd6O21my VgTPh/phVZYMHvBT4vNFZZvzy24PjsPyLnUjkwLSRQKLcrYmAI2IuzsT7 +MJ2w27BUdLjPudnLwk08VetJ/dE/jmxsftnggcrl65BLKmtt4cVejvqx OCE+hZR5pjzQ1b0Z7tO4cUYGJ4WH70ZKi6iMzHulflFqi2k0mmR2oHaQL YtGhendr6oMkQqQnr9hvyhuthovf1YdZ2uxpqCi2Y8g/Jq8A3VnZwb2aV g==; X-CSE-ConnectionGUID: UdrMo1sOSoqCQGOA43Q7ZQ== X-CSE-MsgGUID: 4dY3/4RFQ6CeCcuOB9HYVQ== X-IronPort-AV: E=McAfee;i="6700,10204,11273"; a="44634848" X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="44634848" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2024 18:43:33 -0800 X-CSE-ConnectionGUID: Ls6uGFdnQPultQHOtOGOXQ== X-CSE-MsgGUID: tTkT2EnbRYaQrKUPA6kW8g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="92878188" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa010.jf.intel.com with ESMTP; 01 Dec 2024 18:43:31 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org, ville.syrjala@linux.intel.com, jani.nikula@intel.com, ankit.k.nautiyal@intel.com Subject: [PATCH v5 2/6] drm/i915/vrr: Compute vrr.vsync_{start, end} during full modeset Date: Mon, 2 Dec 2024 08:15:36 +0530 Message-ID: <20241202024540.2578856-3-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@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" vrr.vsync_{start,end} computation should not depend on crtc_state->vrr.enable. --v1: - Explain commit message more clearly [Jani] - Instead of tweaking to fastset use vrr.flipline while computing AS_SDP. --v2: - Correct computation of vrr.vsync_start/end should not depend on vrr.enable.[ville] - vrr enable disable requirement should not obstruct by SDP enable disable requirements. [Ville] --v3: - Create separate patch for crtc_state_dump [Ankit]. --v4: - Update commit message and header [Ankit]. Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_vrr.c | 25 ++++++++++-------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index b386e62d1664..c395af419ce3 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -236,7 +236,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.vsync_start = (crtc_state->hw.adjusted_mode.crtc_vtotal - crtc_state->hw.adjusted_mode.vsync_start); @@ -316,6 +316,12 @@ void intel_vrr_set_transcoder_timings(const struct intel_crtc_state *crtc_state) trans_vrr_ctl(crtc_state)); intel_de_write(display, TRANS_VRR_FLIPLINE(display, cpu_transcoder), crtc_state->vrr.flipline - 1); + + if (HAS_AS_SDP(display)) + intel_de_write(display, + TRANS_VRR_VSYNC(display, cpu_transcoder), + VRR_VSYNC_END(crtc_state->vrr.vsync_end) | + VRR_VSYNC_START(crtc_state->vrr.vsync_start)); } void intel_vrr_send_push(const struct intel_crtc_state *crtc_state) @@ -352,12 +358,6 @@ void intel_vrr_enable(const struct intel_crtc_state *crtc_state) intel_de_write(display, TRANS_PUSH(display, cpu_transcoder), TRANS_PUSH_EN); - if (HAS_AS_SDP(display)) - intel_de_write(display, - TRANS_VRR_VSYNC(display, cpu_transcoder), - VRR_VSYNC_END(crtc_state->vrr.vsync_end) | - VRR_VSYNC_START(crtc_state->vrr.vsync_start)); - if (crtc_state->cmrr.enable) { intel_de_write(display, TRANS_VRR_CTL(display, cpu_transcoder), VRR_CTL_VRR_ENABLE | VRR_CTL_CMRR_ENABLE | @@ -382,10 +382,6 @@ void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state) TRANS_VRR_STATUS(display, cpu_transcoder), VRR_STATUS_VRR_EN_LIVE, 1000); intel_de_write(display, TRANS_PUSH(display, cpu_transcoder), 0); - - if (HAS_AS_SDP(display)) - intel_de_write(display, - TRANS_VRR_VSYNC(display, cpu_transcoder), 0); } void intel_vrr_get_config(struct intel_crtc_state *crtc_state) @@ -425,10 +421,6 @@ 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->vrr.enable) { - crtc_state->mode_flags |= I915_MODE_FLAG_VRR; if (HAS_AS_SDP(display)) { trans_vrr_vsync = @@ -440,4 +432,7 @@ void intel_vrr_get_config(struct intel_crtc_state *crtc_state) REG_FIELD_GET(VRR_VSYNC_END_MASK, trans_vrr_vsync); } } + + if (crtc_state->vrr.enable) + crtc_state->mode_flags |= I915_MODE_FLAG_VRR; } From patchwork Mon Dec 2 02:45:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mitul Golani X-Patchwork-Id: 13889833 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 29145D49795 for ; Mon, 2 Dec 2024 02:43:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B6DB810E2FF; Mon, 2 Dec 2024 02:43:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Z0lk4dXS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9654610E2EF; Mon, 2 Dec 2024 02:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733107415; x=1764643415; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wVm8u9SOgxTbsfpRWgAtTC0ZSKVQJ8wJO/iLf7Y5uC0=; b=Z0lk4dXST5mC+ko/GsL5jvC8uO0NwoRG30w8f9MZJj9jADMqkfIv7MIJ Q9PeVxDikWr6mGkYMCUXMTzO0f41hcpFVX7YM8BAf4hKOrlB7WUnADE0i OYcdDPIpGPWPGW2e2WUes70/vJze7qhLMPL9XFMwsgZbPM2p3iq8+vRJ6 YVx/ZlsIVO/QCdczso4zqadLDHD2Y5NLBpAz1pyNGevdkj9co2O69Pt6X l4msTBrpPGW4nkh6jfNaNYSrHyVvgRdCEKAZRk/2dda4KiRtb0cNgQKTM qE8B0459xdDRaAVboALsvKl1lqDVY8xu1iq4ycaAscxjcniVy01QjHIPC w==; X-CSE-ConnectionGUID: 1h6Rluk6Rjyom37qmYIaoA== X-CSE-MsgGUID: BaDD2lXmSE2Dn6+3PeOSRw== X-IronPort-AV: E=McAfee;i="6700,10204,11273"; a="44634851" X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="44634851" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2024 18:43:35 -0800 X-CSE-ConnectionGUID: +9HydJW4TOSWXq3edh1Wug== X-CSE-MsgGUID: hiv0rkzGQAWITb8meJ2olA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="92878199" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa010.jf.intel.com with ESMTP; 01 Dec 2024 18:43:33 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org, ville.syrjala@linux.intel.com, jani.nikula@intel.com, ankit.k.nautiyal@intel.com Subject: [PATCH v5 3/6] drm/i915/dp: fix the Adaptive sync Operation mode for SDP Date: Mon, 2 Dec 2024 08:15:37 +0530 Message-ID: <20241202024540.2578856-4-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ankit Nautiyal 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 053a9a4182e7..306c00cab57e 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2812,7 +2812,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; @@ -2823,7 +2822,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 Dec 2 02:45:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mitul Golani X-Patchwork-Id: 13889834 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 F1DB3D49794 for ; Mon, 2 Dec 2024 02:43:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AB2210E416; Mon, 2 Dec 2024 02:43:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="T1pLqHrZ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9072C10E414; Mon, 2 Dec 2024 02:43:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733107417; x=1764643417; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kr8KxyBE1N1kKfxYgvvzkIjxZnFGbta9wTlPFcdY6p8=; b=T1pLqHrZjuy2tKCEw9Di8jRgVwEzLAUR/ESs6We0G/1ZSDrb4ibUym7/ zwURSI2+X0Q557WqWsWKROoX051btQfDvWNml77g88ZS7zayH/kc6adVi t2Ep0LNUJ/eKND0d/wiiA5aoP5CEvhF/5t5qPkOm6urDBltHR6JkRBzWy dHsOS3GDpxK6SAwcF8/N3v8e4PdyE2HjM9OKdxNM3V8Qeywqyq6HiOfKe H/m2fb0nVRvE+kQ79O9LD7Xyp2kkKTj20wxDtfxrYnjzxOcgHZ3uw4TAI 2Rl4sE665nREPqc45ZwIWk0lw9ME4D1SrfwtPyjEVUB4MI+CCQlzA4NaO A==; X-CSE-ConnectionGUID: qpypqZbTSBqF+zViRYZKKA== X-CSE-MsgGUID: 4RXIUhPJSbCKPVwhdE/RpA== X-IronPort-AV: E=McAfee;i="6700,10204,11273"; a="44634853" X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="44634853" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2024 18:43:37 -0800 X-CSE-ConnectionGUID: 0yaniby9S7io78qLqSwQQQ== X-CSE-MsgGUID: ylbwZqviS9eKggRwjC8Vsw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="92878207" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa010.jf.intel.com with ESMTP; 01 Dec 2024 18:43:35 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org, ville.syrjala@linux.intel.com, jani.nikula@intel.com, ankit.k.nautiyal@intel.com Subject: [PATCH v5 4/6] drm/i915/dp: Compute as_sdp.vtotal based on vrr timings Date: Mon, 2 Dec 2024 08:15:38 +0530 Message-ID: <20241202024540.2578856-5-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@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" Compute as_sdp.vtotal based on minimum vtotal calculated during vrr computation. --v2: - make a separate patch and update to vmin only [Ankit]. --v3: - Update vtotal to vmin for cmrr case as well [Ankit]. Signed-off-by: Mitul Golani Reviewed-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 306c00cab57e..98573dd69028 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2815,15 +2815,14 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp, as_sdp->sdp_type = DP_SDP_ADAPTIVE_SYNC; as_sdp->length = 0x9; as_sdp->duration_incr_ms = 0; + as_sdp->vtotal = crtc_state->vrr.vmin; if (crtc_state->cmrr.enable) { as_sdp->mode = DP_AS_SDP_FAVT_TRR_REACHED; - as_sdp->vtotal = adjusted_mode->vtotal; as_sdp->target_rr = drm_mode_vrefresh(adjusted_mode); as_sdp->target_rr_divider = true; } else { as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL; - as_sdp->vtotal = adjusted_mode->vtotal; as_sdp->target_rr = 0; } } From patchwork Mon Dec 2 02:45:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mitul Golani X-Patchwork-Id: 13889835 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 44CEED49794 for ; Mon, 2 Dec 2024 02:43:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E204310E2F7; Mon, 2 Dec 2024 02:43:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="IqmBrE3C"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 73BD210E629; Mon, 2 Dec 2024 02:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733107419; x=1764643419; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lz4Xt3OiTLKV1FNq/MFN6Lft1td7esa608UCVvSd96s=; b=IqmBrE3CLbB8yE6HBlGcrjy1bx94pnNcBKW3qCU5HMVmAs27F83qoUZg AbAhhLPlqu+v74j5Kn80SUTULCzGpWOWJy0XzWal+7uLV0ccwYEKs1ZGl kol7Jr97me0U0ENoApTbn81aa7ghFVrxZrsrCvJ3WjN13jChhKpHTfBIJ 3QNvfHxbq7+oFjnkPpoCwbNR36LY8RTF4BUx3I/GaAr53d7Op868201y/ wQJPui5oWXXLO0tBcKZx/sUQL/p8kNFi8vfQn/+qDk2qsQNvHiO7HSRO5 ul4dycJqOzdGL22zXAUrBUBj+RSq+1sPB1k1qJ+6l9sCuhym0re16aHZT w==; X-CSE-ConnectionGUID: 3OhroNCGSOeV1mohfToymQ== X-CSE-MsgGUID: Xo+OG61WSX+NWP3bgm5Gaw== X-IronPort-AV: E=McAfee;i="6700,10204,11273"; a="44634858" X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="44634858" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2024 18:43:39 -0800 X-CSE-ConnectionGUID: iVdU/hCdQM+rofkLVyoCBg== X-CSE-MsgGUID: FNi2ZoBpRKaNx5iqerG6QQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="92878212" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa010.jf.intel.com with ESMTP; 01 Dec 2024 18:43:37 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org, ville.syrjala@linux.intel.com, jani.nikula@intel.com, ankit.k.nautiyal@intel.com Subject: [PATCH v5 5/6] drm/i915/dp: Compute as_sdp based on if vrr possible Date: Mon, 2 Dec 2024 08:15:39 +0530 Message-ID: <20241202024540.2578856-6-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@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" Adaptive sync sdp param computation, we can configure during full modeset as well when sink is having vrr support, where it doesn't need dependency on vrr.enable status and can also match vrr enable/disable fastset requirement. --v2: - Separate the change from as_sdp.vtotal. [Ankit] Signed-off-by: Mitul Golani --- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 98573dd69028..73a1a839e0a1 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2807,7 +2807,7 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp, const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; - if (!crtc_state->vrr.enable || !intel_dp->as_sdp_supported) + if (!intel_vrr_possible(crtc_state) || !intel_dp->as_sdp_supported) return; crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC); From patchwork Mon Dec 2 02:45:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mitul Golani X-Patchwork-Id: 13889836 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 881BED49794 for ; Mon, 2 Dec 2024 02:43:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C46610E2FA; Mon, 2 Dec 2024 02:43:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="oE8G2rwz"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FCAF10E2EF; Mon, 2 Dec 2024 02:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733107421; x=1764643421; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XcmuxXGoiktJbQoRJxgPq1eZBL7GztrftXb/Z/N4DBo=; b=oE8G2rwzIWkmfjT/Z37yR3NYs8CYziX6donLNP/QFg/sqa19oVPvbpLc w4g99hjI/0jmi+lM27O5m3xWvnSdmZbUYb+I2980x+XV6AttP4LJTojPZ jTcLiQfMyJiiPTrbEG9TFIvyyO6JshTG6w0zG8FFnDjqN+aqmhejK11ht whIY5wDMayyL19FYDl06r6COQBYxVef8KEgLJP8Oa0JbKupy3XpXYp94x 4yLLo5DUDMs+/mBx4113vxGQ3Njfo+ZMtRPViF2828qQyq7VjLR2AFw+w nK4zSEvXKjTULAU61vK4XM0LMmNwFaLJCa6sCtldLlzTn2nRX5g+E1P7S Q==; X-CSE-ConnectionGUID: FT7rT038ST6i8S1dfGJAwA== X-CSE-MsgGUID: 8LRIjAHNR1mcYZsS0d9ToQ== X-IronPort-AV: E=McAfee;i="6700,10204,11273"; a="44634863" X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="44634863" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2024 18:43:41 -0800 X-CSE-ConnectionGUID: IbBbAY52Rf62vAer7cPDnQ== X-CSE-MsgGUID: OwpBu171S/aHmA4/x52hww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,201,1728975600"; d="scan'208";a="92878238" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa010.jf.intel.com with ESMTP; 01 Dec 2024 18:43:39 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org, ville.syrjala@linux.intel.com, jani.nikula@intel.com, ankit.k.nautiyal@intel.com Subject: [PATCH v5 6/6] drm/i915/display: Move as sdp params change to fastset Date: Mon, 2 Dec 2024 08:15:40 +0530 Message-ID: <20241202024540.2578856-7-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241202024540.2578856-1-mitulkumar.ajitkumar.golani@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_sdp param changes from vrr to cmrr should happen to fastset. Changing as_sdp params should not trigger any modeset. Signed-off-by: Mitul Golani --- drivers/gpu/drm/i915/display/intel_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 4805bf682d43..708e3f86db8f 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -5711,10 +5711,11 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config, PIPE_CONF_CHECK_INFOFRAME(avi); PIPE_CONF_CHECK_INFOFRAME(spd); PIPE_CONF_CHECK_INFOFRAME(hdmi); - if (!fastset) + if (!fastset) { PIPE_CONF_CHECK_INFOFRAME(drm); + PIPE_CONF_CHECK_DP_AS_SDP(as_sdp); + } PIPE_CONF_CHECK_DP_VSC_SDP(vsc); - PIPE_CONF_CHECK_DP_AS_SDP(as_sdp); PIPE_CONF_CHECK_X(sync_mode_slaves_mask); PIPE_CONF_CHECK_I(master_transcoder);