From patchwork Wed Nov 20 08:49:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Golani, Mitulkumar Ajitkumar" X-Patchwork-Id: 13880878 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 6B36ED6E2DE for ; Wed, 20 Nov 2024 08:47:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AA2810E6D1; Wed, 20 Nov 2024 08:47:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="dapDjBB5"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 87BC710E6CF for ; Wed, 20 Nov 2024 08:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732092467; x=1763628467; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Nn3xOyx12OEM8FZ4MHT9Ctakexp9RBuS6QeGLXT0aAs=; b=dapDjBB54rTJkVJWhJKGu98LDHEYO1dk2Yo3UUO2rg4ZdvgR+ZWcpUBZ jbGtQARUk86YMxNsIBT50/Uo8mHKVBJGzE3HvtZx2XJXhYltD5oTSeF+o 7EhvqT1Au0+gHi7UDe2i8al8/jKxzkHtTTwUv3d0Got5pP0XcUNh/oQDk hJR6rTBEDbwSEo5Z6cKazJ/g0V422VPHOmAwjGS/VcGaAYnTUPd3kK8g6 AxSZf6qn1U9RDmn4xzwBFOnibZrCtNaWjBM93BtSzYY2EmU1LIFybCXTC vU6okIYEVK9bbybDNA0lSoqwOwIs0SqBuySoNbi60OVcaa217vAFCYjmC Q==; X-CSE-ConnectionGUID: rlF5yDMqSN+F2FT3VefwYQ== X-CSE-MsgGUID: s5U9c787T128ESyCr2rJxg== X-IronPort-AV: E=McAfee;i="6700,10204,11261"; a="31887141" X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="31887141" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2024 00:47:46 -0800 X-CSE-ConnectionGUID: QPy+37Q2TNy37jnd+Uz6nA== X-CSE-MsgGUID: +UcAKqRiTAmRYjSmg2Aa+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="89956740" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa006.jf.intel.com with ESMTP; 20 Nov 2024 00:47:45 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: ankit.k.nautiyal@intel.com, ville.syrjala@linux.intel.com, jani.nikula@intel.com Subject: [PATCH v4 1/5] drm/i915/vrr: Add crtc_state dump for vrr.vsync params Date: Wed, 20 Nov 2024 14:19:44 +0530 Message-ID: <20241120084948.1834306-2-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241120084948.1834306-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241120084948.1834306-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. Signed-off-by: Mitul Golani --- 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..92dbf2cc150c 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, vrr_vsync_start: %d, vrr_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 Wed Nov 20 08:49:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Golani, Mitulkumar Ajitkumar" X-Patchwork-Id: 13880879 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 77353D6E2DB for ; Wed, 20 Nov 2024 08:47:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BEC710E6D2; Wed, 20 Nov 2024 08:47:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="dMwA4obB"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7260610E6CF for ; Wed, 20 Nov 2024 08:47:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732092468; x=1763628468; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VAyjLwI+VJ5z3oCPFmMZjYXM3mxcDRu6aR5TOac3EvU=; b=dMwA4obB4jzlVZ5VDMuJI1rdpPQfznBoOlxs3UHXEZRUhPZts8Do97g5 N9NjN8rCBvbcHRsPvcTT1GIdpAHFJ2AspRY3gLA6i6bjzz9rLbV22XuEX vxMlxA4lH5fypJ3jD8c7vwHmTUsqWXu0HXHweqX6RJH7i6QAmiBUTw8vA ttY3KyaKMN78jpn9qLogaZpHQoRROArQBSJqbOEES+/0NSk5oVgkFQaPS SlJMZQEGGSp/Dce2AuDctFVnzjEX8yLsvDERXs5S8KMZbwsU4wQ6Ndk/M N6EX0sYDdb3Be4f+zXbQ0RQdEYArRRo44qWCDdJft62PjnZrMLZT1DaXZ Q==; X-CSE-ConnectionGUID: 3jANOlNLRgCQJoQPdDxfOg== X-CSE-MsgGUID: OgSD+/9UQZyuUVWsxdFuIQ== X-IronPort-AV: E=McAfee;i="6700,10204,11261"; a="31887142" X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="31887142" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2024 00:47:48 -0800 X-CSE-ConnectionGUID: kut39CP3SAm4IA7Nhi3dMQ== X-CSE-MsgGUID: QjXAV0LrS2ev40rLNOyyag== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="89956748" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa006.jf.intel.com with ESMTP; 20 Nov 2024 00:47:47 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: ankit.k.nautiyal@intel.com, ville.syrjala@linux.intel.com, jani.nikula@intel.com Subject: [PATCH v4 2/5] drm/i915/vrr: Update vrr.vsync_{start, end} computation Date: Wed, 20 Nov 2024 14:19:45 +0530 Message-ID: <20241120084948.1834306-3-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241120084948.1834306-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241120084948.1834306-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. Also add them to state dump. --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]. Signed-off-by: Mitul Golani --- 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 Wed Nov 20 08:49:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Golani, Mitulkumar Ajitkumar" X-Patchwork-Id: 13880880 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 B4704D6E2DE for ; Wed, 20 Nov 2024 08:47:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E1F310E6D4; Wed, 20 Nov 2024 08:47:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="PB+yTIu6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5AD6010E6D4 for ; Wed, 20 Nov 2024 08:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732092470; x=1763628470; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wVm8u9SOgxTbsfpRWgAtTC0ZSKVQJ8wJO/iLf7Y5uC0=; b=PB+yTIu6usK0qcbIP/Jig7cWt53N7b8xL8AJVw0YT8b7uw1AOZYGrO6s CZwaHgyVWBNDxilQ2SQSGf2QwHTKFUzj65enROj1Ur/6bnTvtCE5BMp1/ J3cqmzegLq0hJp/P5uC1PasemoJwhmdHgzSQ6GGX0M58LWyVt6Ya8FJ9o 3fexDDbzQsJc8mhXdltqozp4R0hLBLQme29ZSZ6EDITxrtwj3/2DpMD/f 5+01De0t8rqoB3WHbsBNPKJwcAg8cGlRspwhX8ERp4fVnVujE1lphWUcx A3ZxMvwvNjWnLrbvwSRM+DReJ0lMnDt2hW3QyI1iWLJiE28ek8duBIYfA g==; X-CSE-ConnectionGUID: te5P8Z5aRmejhXMIvXoWaA== X-CSE-MsgGUID: S+huqKCnQ6ahDiAgJ1mPzg== X-IronPort-AV: E=McAfee;i="6700,10204,11261"; a="31887143" X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="31887143" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2024 00:47:50 -0800 X-CSE-ConnectionGUID: eZpPI9jcRTW8LCcPSix5nA== X-CSE-MsgGUID: WbuMGBEMQYimHcdxI+Yb/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="89956760" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa006.jf.intel.com with ESMTP; 20 Nov 2024 00:47:48 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: ankit.k.nautiyal@intel.com, ville.syrjala@linux.intel.com, jani.nikula@intel.com Subject: [PATCH v4 3/5] drm/i915/dp: fix the Adaptive sync Operation mode for SDP Date: Wed, 20 Nov 2024 14:19:46 +0530 Message-ID: <20241120084948.1834306-4-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241120084948.1834306-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241120084948.1834306-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 Wed Nov 20 08:49:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Golani, Mitulkumar Ajitkumar" X-Patchwork-Id: 13880881 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 5DE94D6E2DF for ; Wed, 20 Nov 2024 08:47:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 03F6710E6C4; Wed, 20 Nov 2024 08:47:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="TX8WRtOd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE7A010E6C4 for ; Wed, 20 Nov 2024 08:47:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732092472; x=1763628472; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TbGOjjE6FUugnjkQf39hlFA2S9FtCHGEda+zoalSWng=; b=TX8WRtOduN09+hifQZDWJOtdWYkpqoblM9Sl3bAkKvYMWbMdgwezEmdt 55FQw5ZwKBuIk4rOuqihLtlQT2+yZ549uv3Q9+0gd6tIojTBhvbVnTQMU rBfn168GW+cW6GWwmXnrVhD2RXw6h3DRO9Yd/aHl68XoLgUjeMTSHEJ8r 8h8LerKRP+LCLAI5ttBen1YVv3sSwzoazl7a+ZuFG6DlbKYdmz8bXvmkw /IzX5jAqbidQaK+COpAoD/lpHLYH+FHLB5xz7aWYk9RNIsM3A5Rt2xQR1 1f9F9j072G3W5N6pvyeZ1XQ3fuBZbWKGcQGZNNFf0FxiWFm1X5nH5WlRa Q==; X-CSE-ConnectionGUID: Aaq3BmnDRqq4q8depUoy3w== X-CSE-MsgGUID: FTHxsO6dTqyyaY89ifWrwA== X-IronPort-AV: E=McAfee;i="6700,10204,11261"; a="31887144" X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="31887144" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2024 00:47:52 -0800 X-CSE-ConnectionGUID: /Dhz1GU8Tyy4LQpMpGG9Pg== X-CSE-MsgGUID: oGzcapl/QK+2Mpk7wT4quA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="89956769" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa006.jf.intel.com with ESMTP; 20 Nov 2024 00:47:50 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: ankit.k.nautiyal@intel.com, ville.syrjala@linux.intel.com, jani.nikula@intel.com Subject: [PATCH v4 4/5] drm/i915/dp: Compute as_sdp.vtotal based on vrr timings Date: Wed, 20 Nov 2024 14:19:47 +0530 Message-ID: <20241120084948.1834306-5-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241120084948.1834306-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241120084948.1834306-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]. 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 306c00cab57e..e39ae59370c0 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2823,7 +2823,7 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp, as_sdp->target_rr_divider = true; } else { as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL; - as_sdp->vtotal = adjusted_mode->vtotal; + as_sdp->vtotal = crtc_state->vrr.vmin; as_sdp->target_rr = 0; } } From patchwork Wed Nov 20 08:49:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Golani, Mitulkumar Ajitkumar" X-Patchwork-Id: 13880882 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 07220D6E2DE for ; Wed, 20 Nov 2024 08:47:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9888E10E6D3; Wed, 20 Nov 2024 08:47:54 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="At5GKFB0"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id A0BED10E6D5 for ; Wed, 20 Nov 2024 08:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732092474; x=1763628474; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ltoh536+NR88G9J/xvQlmy8dyv7QNT1JV3JJqIkOu1w=; b=At5GKFB0upRnLkWWYx7NwO6f1FOcVI5zjD+AI4DrIyP/O4DSTuqQz1WF QTeTbU4wAChy/iiwr1KfX2flNGzwhFFbUS2NUn7PepoJNzE3U0Gz9ou0R SwfT7PFD/NA3qAQ7ldX6pq+Zu0LE05lKUPgbPPEvASaWFTUI4tTdc6dnV 9t+6g45v3OeY5087eDY6GJfhSkNioP8hoaNqo51rBDYsQ8ydoaUphv+T0 ry+rRSbCo4etK+0bpRjVQcnkfokaPB7Hd+qKYfO3ajf0515233X6MsjnR 7pDhtyJfTYMRJlhzoys1mhkh8hg5AiFCG4Azv6VLK8wGAO8MLdXbXRLLW A==; X-CSE-ConnectionGUID: bja10lefTzexJ7p25nlKww== X-CSE-MsgGUID: Hhd0z4hcTwiLnXina9hdYA== X-IronPort-AV: E=McAfee;i="6700,10204,11261"; a="31887145" X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="31887145" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2024 00:47:54 -0800 X-CSE-ConnectionGUID: 0vAx2vj7SBCG+1/JBl+D2w== X-CSE-MsgGUID: tICdlxyNQCOz7hkn/MNZRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,169,1728975600"; d="scan'208";a="89956779" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa006.jf.intel.com with ESMTP; 20 Nov 2024 00:47:52 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: ankit.k.nautiyal@intel.com, ville.syrjala@linux.intel.com, jani.nikula@intel.com Subject: [PATCH v4 5/5] drm/i915/dp: Compute as_sdp based on if vrr possible Date: Wed, 20 Nov 2024 14:19:48 +0530 Message-ID: <20241120084948.1834306-6-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241120084948.1834306-1-mitulkumar.ajitkumar.golani@intel.com> References: <20241120084948.1834306-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 e39ae59370c0..bff9d2ec08e3 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);