Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: imre.deak@intel.com
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/ddi: clarify intel_ddi_connector_get_hw_state() for DP MST
Date: Tue, 26 Nov 2024 11:16:45 +0200	[thread overview]
Message-ID: <87a5dmxsle.fsf@intel.com> (raw)
In-Reply-To: <Z0Sd1EbzyqEw7smW@ideak-desk.fi.intel.com>

On Mon, 25 Nov 2024, Imre Deak <imre.deak@intel.com> wrote:
> On Mon, Nov 25, 2024 at 02:09:59PM +0200, Jani Nikula wrote:
>> encoder->get_hw_state() returns false for DP MST, and currently always
>> interprets 128b/132b as MST. Therefore the DDI MST mode checks in
>> intel_ddi_connector_get_hw_state() are redundant.
>> 
>> Prepare for future, and handle 128b/132b SST and warn on 8b/10b MST.
>> 
>> Cc: Imre Deak <imre.deak@intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Looks ok to me:
> Reviewed-by: Imre Deak <imre.deak@intel.com>

Thanks, pushed to drm-intel-next.

BR,
Jani.


>
>> ---
>>  drivers/gpu/drm/i915/display/intel_ddi.c | 11 +++++++----
>>  1 file changed, 7 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
>> index e25b712bf03b..7d37ddd9ad12 100644
>> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
>> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
>> @@ -731,6 +731,7 @@ bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector)
>>  	if (!wakeref)
>>  		return false;
>>  
>> +	/* Note: This returns false for DP MST primary encoders. */
>>  	if (!encoder->get_hw_state(encoder, &pipe)) {
>>  		ret = false;
>>  		goto out;
>> @@ -752,12 +753,14 @@ bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector)
>>  	} else if (ddi_mode == TRANS_DDI_MODE_SELECT_DP_SST) {
>>  		ret = type == DRM_MODE_CONNECTOR_eDP ||
>>  			type == DRM_MODE_CONNECTOR_DisplayPort;
>> -	} else if (ddi_mode == TRANS_DDI_MODE_SELECT_DP_MST ||
>> -		   (ddi_mode == TRANS_DDI_MODE_SELECT_FDI_OR_128B132B && HAS_DP20(display))) {
>> +	} else if (ddi_mode == TRANS_DDI_MODE_SELECT_FDI_OR_128B132B && HAS_DP20(display)) {
>>  		/*
>> -		 * If the transcoder is in MST state then connector isn't
>> -		 * connected.
>> +		 * encoder->get_hw_state() should have bailed out on MST. This
>> +		 * must be SST and non-eDP.
>>  		 */
>> +		ret = type == DRM_MODE_CONNECTOR_DisplayPort;
>> +	} else if (drm_WARN_ON(display->drm, ddi_mode == TRANS_DDI_MODE_SELECT_DP_MST)) {
>> +		/* encoder->get_hw_state() should have bailed out on MST. */
>>  		ret = false;
>>  	} else {
>>  		ret = false;
>> -- 
>> 2.39.5
>> 

-- 
Jani Nikula, Intel

      reply	other threads:[~2024-11-26  9:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 12:09 [PATCH] drm/i915/ddi: clarify intel_ddi_connector_get_hw_state() for DP MST Jani Nikula
2024-11-25 12:52 ` ✓ CI.Patch_applied: success for " Patchwork
2024-11-25 12:53 ` ✓ CI.checkpatch: " Patchwork
2024-11-25 12:54 ` ✓ CI.KUnit: " Patchwork
2024-11-25 13:12 ` ✓ CI.Build: " Patchwork
2024-11-25 13:14 ` ✓ CI.Hooks: " Patchwork
2024-11-25 13:15 ` ✗ CI.checksparse: warning " Patchwork
2024-11-25 13:33 ` ✓ Xe.CI.BAT: success " Patchwork
2024-11-25 14:55 ` ✗ Xe.CI.Full: failure " Patchwork
2024-11-25 15:55 ` [PATCH] " Imre Deak
2024-11-26  9:16   ` Jani Nikula [this message]

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=87a5dmxsle.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /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