diff mbox series

[v2,1/2] drm/i915/mso: using joiner is not possible with eDP MSO

Message ID 137a010815ab8ba8f266fea7a85fe14d7bfb74cd.1718360103.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: fix MSO vs. joiner issue | expand

Commit Message

Jani Nikula June 14, 2024, 10:16 a.m. UTC
It's not possible to use the joiner at the same time with eDP MSO. When
a panel needs MSO, it's not optional, so MSO trumps joiner.

While just reporting false for intel_dp_has_joiner() should be
sufficient, also skip creation of the joiner force enable debugfs to
better handle this in testing.

Cc: stable@vger.kernel.org
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1668
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 8 ++++++--
 drivers/gpu/drm/i915/display/intel_dp.c              | 4 ++++
 2 files changed, 10 insertions(+), 2 deletions(-)

Comments

Ville Syrjälä June 14, 2024, 11:41 a.m. UTC | #1
On Fri, Jun 14, 2024 at 01:16:03PM +0300, Jani Nikula wrote:
> It's not possible to use the joiner at the same time with eDP MSO. When
> a panel needs MSO, it's not optional, so MSO trumps joiner.
> 
> While just reporting false for intel_dp_has_joiner() should be
> sufficient, also skip creation of the joiner force enable debugfs to
> better handle this in testing.
> 
> Cc: stable@vger.kernel.org
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1668
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 8 ++++++--
>  drivers/gpu/drm/i915/display/intel_dp.c              | 4 ++++
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 91757fed9c6d..5eb31404436c 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -1546,8 +1546,12 @@ void intel_connector_debugfs_add(struct intel_connector *connector)
>  	if (DISPLAY_VER(i915) >= 11 &&
>  	    (connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
>  	     connector_type == DRM_MODE_CONNECTOR_eDP)) {
> -		debugfs_create_bool("i915_bigjoiner_force_enable", 0644, root,
> -				    &connector->force_bigjoiner_enable);
> +		struct intel_dp *intel_dp = intel_attached_dp(connector);

That won't give you anything on MST. Dunno if there's any point in
trying to do anything here anyway. We don't account for the other
intel_dp_has_joiner() restrictions here either.

> +
> +		/* eDP MSO is not compatible with joiner */
> +		if (!intel_dp->mso_link_count)
> +			debugfs_create_bool("i915_bigjoiner_force_enable", 0644, root,
> +					    &connector->force_bigjoiner_enable);
>  	}
>  
>  	if (connector_type == DRM_MODE_CONNECTOR_DSI ||
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 9a9bb0f5b7fe..ab33c9de393a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -465,6 +465,10 @@ bool intel_dp_has_joiner(struct intel_dp *intel_dp)
>  	struct intel_encoder *encoder = &intel_dig_port->base;
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>  
> +	/* eDP MSO is not compatible with joiner */
> +	if (intel_dp->mso_link_count)
> +		return false;
> +

This part looks fine.

>  	return DISPLAY_VER(dev_priv) >= 12 ||
>  		(DISPLAY_VER(dev_priv) == 11 &&
>  		 encoder->port != PORT_A);
> -- 
> 2.39.2
Jani Nikula June 14, 2024, 2:01 p.m. UTC | #2
On Fri, 14 Jun 2024, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Fri, Jun 14, 2024 at 01:16:03PM +0300, Jani Nikula wrote:
>> It's not possible to use the joiner at the same time with eDP MSO. When
>> a panel needs MSO, it's not optional, so MSO trumps joiner.
>> 
>> While just reporting false for intel_dp_has_joiner() should be
>> sufficient, also skip creation of the joiner force enable debugfs to
>> better handle this in testing.
>> 
>> Cc: stable@vger.kernel.org
>> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
>> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1668
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 8 ++++++--
>>  drivers/gpu/drm/i915/display/intel_dp.c              | 4 ++++
>>  2 files changed, 10 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> index 91757fed9c6d..5eb31404436c 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> @@ -1546,8 +1546,12 @@ void intel_connector_debugfs_add(struct intel_connector *connector)
>>  	if (DISPLAY_VER(i915) >= 11 &&
>>  	    (connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
>>  	     connector_type == DRM_MODE_CONNECTOR_eDP)) {
>> -		debugfs_create_bool("i915_bigjoiner_force_enable", 0644, root,
>> -				    &connector->force_bigjoiner_enable);
>> +		struct intel_dp *intel_dp = intel_attached_dp(connector);
>
> That won't give you anything on MST.

Gah!

> Dunno if there's any point in
> trying to do anything here anyway. We don't account for the other
> intel_dp_has_joiner() restrictions here either.

The only point would be skipping a bunch of IGT tests. With the debugfs
in place, kms_big_joiner thinks it enables joiner, and runs extra joiner
tests for nothing.

Thoughts? I guess the simplest fix for stable could be just the last
hunk here.

BR,
Jani.


>
>> +
>> +		/* eDP MSO is not compatible with joiner */
>> +		if (!intel_dp->mso_link_count)
>> +			debugfs_create_bool("i915_bigjoiner_force_enable", 0644, root,
>> +					    &connector->force_bigjoiner_enable);
>>  	}
>>  
>>  	if (connector_type == DRM_MODE_CONNECTOR_DSI ||
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> index 9a9bb0f5b7fe..ab33c9de393a 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -465,6 +465,10 @@ bool intel_dp_has_joiner(struct intel_dp *intel_dp)
>>  	struct intel_encoder *encoder = &intel_dig_port->base;
>>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>>  
>> +	/* eDP MSO is not compatible with joiner */
>> +	if (intel_dp->mso_link_count)
>> +		return false;
>> +
>
> This part looks fine.
>
>>  	return DISPLAY_VER(dev_priv) >= 12 ||
>>  		(DISPLAY_VER(dev_priv) == 11 &&
>>  		 encoder->port != PORT_A);
>> -- 
>> 2.39.2
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 91757fed9c6d..5eb31404436c 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -1546,8 +1546,12 @@  void intel_connector_debugfs_add(struct intel_connector *connector)
 	if (DISPLAY_VER(i915) >= 11 &&
 	    (connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
 	     connector_type == DRM_MODE_CONNECTOR_eDP)) {
-		debugfs_create_bool("i915_bigjoiner_force_enable", 0644, root,
-				    &connector->force_bigjoiner_enable);
+		struct intel_dp *intel_dp = intel_attached_dp(connector);
+
+		/* eDP MSO is not compatible with joiner */
+		if (!intel_dp->mso_link_count)
+			debugfs_create_bool("i915_bigjoiner_force_enable", 0644, root,
+					    &connector->force_bigjoiner_enable);
 	}
 
 	if (connector_type == DRM_MODE_CONNECTOR_DSI ||
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 9a9bb0f5b7fe..ab33c9de393a 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -465,6 +465,10 @@  bool intel_dp_has_joiner(struct intel_dp *intel_dp)
 	struct intel_encoder *encoder = &intel_dig_port->base;
 	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
 
+	/* eDP MSO is not compatible with joiner */
+	if (intel_dp->mso_link_count)
+		return false;
+
 	return DISPLAY_VER(dev_priv) >= 12 ||
 		(DISPLAY_VER(dev_priv) == 11 &&
 		 encoder->port != PORT_A);