diff mbox series

[v5,4/6] drm/i915/dp: Compute as_sdp.vtotal based on vrr timings

Message ID 20241202024540.2578856-5-mitulkumar.ajitkumar.golani@intel.com (mailing list archive)
State New
Headers show
Series Add AS_SDP to fastset | expand

Commit Message

Mitul Golani Dec. 2, 2024, 2:45 a.m. UTC
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 <mitulkumar.ajitkumar.golani@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Nautiyal, Ankit K Dec. 5, 2024, 4:50 a.m. UTC | #1
On 12/2/2024 8:15 AM, Mitul Golani wrote:
> 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 <mitulkumar.ajitkumar.golani@intel.com>


Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

> ---
>   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;
>   	}
>   }
diff mbox series

Patch

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;
 	}
 }