Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: ville.syrjala@linux.intel.com, jouni.hogander@intel.com
Subject: Re: [PATCH] drm/i915/vrr: Program EMP_AS_SDP_TL for DP AS SDP
Date: Fri, 02 May 2025 12:18:38 +0300	[thread overview]
Message-ID: <87wmazwett.fsf@intel.com> (raw)
In-Reply-To: <3a97d2ac-648a-453e-a6ff-b6645441ffab@intel.com>

On Thu, 01 May 2025, "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com> wrote:
> On 4/30/2025 5:12 PM, Jani Nikula wrote:
>> On Tue, 29 Apr 2025, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
>>> The register EMP_AS_SDP_TL (MTL) was introduced for configuring the
>>> double buffering point and transmission line for
>>> HDMI Video Timing Extended Metadata Packet (VTEMP) for VRR.
>>> This was also intended to be configured for DP to HDMI2.1 PCON to
>>> support VRR.
>>>
>>>  From BMG and LNL+ onwards, this register was extended to Display Port
>>> Adaptive Sync SDP to have a common register to configure double
>>> buffering point and transmission line for both HDMI and DP VRR related
>>> packets.
>>>
>>> Currently, we do not support VRR for either native HDMI or via PCON.
>>> However we need to configure this for DP SDP case. As per the spec,
>>> program the register to set Vsync start as the double buffering point
>>> for DP AS SDP.
>>>
>>> Bspec:70984, 71197
>>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>>> ---
>>>   drivers/gpu/drm/i915/display/intel_vrr.c      | 20 +++++++++++++++++++
>>>   drivers/gpu/drm/i915/display/intel_vrr_regs.h |  6 ++++++
>>>   2 files changed, 26 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
>>> index c6565baf815a..2447bdfde5af 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
>>> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
>>> @@ -576,6 +576,22 @@ bool intel_vrr_always_use_vrr_tg(struct intel_display *display)
>>>   	return false;
>>>   }
>>>   
>>> +static
>>> +void intel_vrr_set_emp_as_sdp_tl(const struct intel_crtc_state *crtc_state)
>> How do you pronounce that function name?
>
> Haha, good point!. Now that you have pointed it out, this sounds very 
> silly and particularly difficult to read aloud. (^_^;)
>
> Perhaps intel_vrr_set_packet_transmission_line would be better.

Sounds good to me. I didn't check against what the function actually
does. But it sound better. ;D

BR,
Jani.



>
>
> Regards,
>
> Ankit
>
>>
>> BR,
>> Jani.
>>
>>> +{
>>> +	struct intel_display *display = to_intel_display(crtc_state);
>>> +	enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
>>> +
>>> +	/*
>>> +	 * For BMG and LNL+ onwards the EMP_AS_SDP_TL is used for programming
>>> +	 * double buffering point and transmission line for Adaptive Sync SDP.
>>> +	 */
>>> +	if (DISPLAY_VERx100(display) == 1401 || DISPLAY_VER(display) >= 20)
>>> +		intel_de_write(display,
>>> +			       EMP_AS_SDP_TL(display, cpu_transcoder),
>>> +			       EMP_AS_SDP_DB_TL(crtc_state->vrr.vsync_start));
>>> +}
>>> +
>>>   void intel_vrr_enable(const struct intel_crtc_state *crtc_state)
>>>   {
>>>   	struct intel_display *display = to_intel_display(crtc_state);
>>> @@ -595,6 +611,8 @@ void intel_vrr_enable(const struct intel_crtc_state *crtc_state)
>>>   		       TRANS_PUSH_EN);
>>>   
>>>   	if (!intel_vrr_always_use_vrr_tg(display)) {
>>> +		intel_vrr_set_emp_as_sdp_tl(crtc_state);
>>> +
>>>   		if (crtc_state->cmrr.enable) {
>>>   			intel_de_write(display, TRANS_VRR_CTL(display, cpu_transcoder),
>>>   				       VRR_CTL_VRR_ENABLE | VRR_CTL_CMRR_ENABLE |
>>> @@ -646,6 +664,8 @@ void intel_vrr_transcoder_enable(const struct intel_crtc_state *crtc_state)
>>>   	intel_de_write(display, TRANS_PUSH(display, cpu_transcoder),
>>>   		       TRANS_PUSH_EN);
>>>   
>>> +	intel_vrr_set_emp_as_sdp_tl(crtc_state);
>>> +
>>>   	intel_de_write(display, TRANS_VRR_CTL(display, cpu_transcoder),
>>>   		       VRR_CTL_VRR_ENABLE | trans_vrr_ctl(crtc_state));
>>>   }
>>> diff --git a/drivers/gpu/drm/i915/display/intel_vrr_regs.h b/drivers/gpu/drm/i915/display/intel_vrr_regs.h
>>> index 6ed0e0dc97e7..d2af1b6710bf 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_vrr_regs.h
>>> +++ b/drivers/gpu/drm/i915/display/intel_vrr_regs.h
>>> @@ -108,6 +108,12 @@
>>>   #define VRR_VSYNC_START_MASK			REG_GENMASK(12, 0)
>>>   #define VRR_VSYNC_START(vsync_start)		REG_FIELD_PREP(VRR_VSYNC_START_MASK, (vsync_start))
>>>   
>>> +/* Common register for HDMI VTEMP and DP AS SDP */
>>> +#define _EMP_AS_SDP_TL_A			0x60204
>>> +#define EMP_AS_SDP_DB_TL_MASK			REG_GENMASK(12, 0)
>>> +#define EMP_AS_SDP_TL(dev_priv, trans)		_MMIO_TRANS2(dev_priv, trans, _EMP_AS_SDP_TL_A)
>>> +#define EMP_AS_SDP_DB_TL(db_transmit_line)	REG_FIELD_PREP(EMP_AS_SDP_DB_TL_MASK, (db_transmit_line))
>>> +
>>>   /*CMRR Registers*/
>>>   
>>>   #define _TRANS_CMRR_M_LO_A			0x604F0

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-05-02  9:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 14:30 [PATCH] drm/i915/vrr: Program EMP_AS_SDP_TL for DP AS SDP Ankit Nautiyal
2025-04-29 14:47 ` ✓ CI.Patch_applied: success for " Patchwork
2025-04-29 14:47 ` ✗ CI.checkpatch: warning " Patchwork
2025-04-29 14:49 ` ✓ CI.KUnit: success " Patchwork
2025-04-29 14:57 ` ✓ CI.Build: " Patchwork
2025-04-29 15:00 ` ✓ CI.Hooks: " Patchwork
2025-04-29 15:01 ` ✓ CI.checksparse: " Patchwork
2025-04-29 17:10 ` [PATCH] " Hogander, Jouni
2025-04-29 18:13 ` ✗ Xe.CI.Full: failure for " Patchwork
2025-04-30 11:42 ` [PATCH] " Jani Nikula
2025-05-01 15:17   ` Nautiyal, Ankit K
2025-05-02  9:18     ` Jani Nikula [this message]
2025-05-06  7:52 ` ✓ Xe.CI.BAT: success for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmazwett.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jouni.hogander@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox