stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.10] Revert "drm/i915/opregion: check port number bounds for SWSCI display power state"
@ 2022-05-17  0:08 Greg Thelen
  2022-05-19 12:59 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Thelen @ 2022-05-17  0:08 UTC (permalink / raw)
  To: stable; +Cc: Jani Nikula, Greg Thelen

This reverts commit b84857c06ef9e72d09fadafdbb3ce9af64af954f.

5.10 stable contains 2 identical commits:
1. commit eb7bf11e8ef1 ("drm/i915/opregion: check port number bounds for SWSCI display power state")
2. commit b84857c06ef9 ("drm/i915/opregion: check port number bounds for SWSCI display power state")

Both commits add separate checks for the same condition. Revert the 2nd
redundant check to match upstream, which only has one check.

Signed-off-by: Greg Thelen <gthelen@google.com>
---
 drivers/gpu/drm/i915/display/intel_opregion.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c
index 6d083b98f6ae..abff2d6cedd1 100644
--- a/drivers/gpu/drm/i915/display/intel_opregion.c
+++ b/drivers/gpu/drm/i915/display/intel_opregion.c
@@ -376,21 +376,6 @@ int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,
 		return -EINVAL;
 	}
 
-	/*
-	 * The port numbering and mapping here is bizarre. The now-obsolete
-	 * swsci spec supports ports numbered [0..4]. Port E is handled as a
-	 * special case, but port F and beyond are not. The functionality is
-	 * supposed to be obsolete for new platforms. Just bail out if the port
-	 * number is out of bounds after mapping.
-	 */
-	if (port > 4) {
-		drm_dbg_kms(&dev_priv->drm,
-			    "[ENCODER:%d:%s] port %c (index %u) out of bounds for display power state notification\n",
-			    intel_encoder->base.base.id, intel_encoder->base.name,
-			    port_name(intel_encoder->port), port);
-		return -EINVAL;
-	}
-
 	if (!enable)
 		parm |= 4 << 8;
 
-- 
2.36.0.550.gb090851708-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 5.10] Revert "drm/i915/opregion: check port number bounds for SWSCI display power state"
  2022-05-17  0:08 [PATCH 5.10] Revert "drm/i915/opregion: check port number bounds for SWSCI display power state" Greg Thelen
@ 2022-05-19 12:59 ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2022-05-19 12:59 UTC (permalink / raw)
  To: Greg Thelen; +Cc: stable, Jani Nikula

On Mon, May 16, 2022 at 05:08:35PM -0700, Greg Thelen wrote:
> This reverts commit b84857c06ef9e72d09fadafdbb3ce9af64af954f.
> 
> 5.10 stable contains 2 identical commits:
> 1. commit eb7bf11e8ef1 ("drm/i915/opregion: check port number bounds for SWSCI display power state")
> 2. commit b84857c06ef9 ("drm/i915/opregion: check port number bounds for SWSCI display power state")
> 
> Both commits add separate checks for the same condition. Revert the 2nd
> redundant check to match upstream, which only has one check.
> 
> Signed-off-by: Greg Thelen <gthelen@google.com>
> ---
>  drivers/gpu/drm/i915/display/intel_opregion.c | 15 ---------------
>  1 file changed, 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c
> index 6d083b98f6ae..abff2d6cedd1 100644
> --- a/drivers/gpu/drm/i915/display/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/display/intel_opregion.c
> @@ -376,21 +376,6 @@ int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,
>  		return -EINVAL;
>  	}
>  
> -	/*
> -	 * The port numbering and mapping here is bizarre. The now-obsolete
> -	 * swsci spec supports ports numbered [0..4]. Port E is handled as a
> -	 * special case, but port F and beyond are not. The functionality is
> -	 * supposed to be obsolete for new platforms. Just bail out if the port
> -	 * number is out of bounds after mapping.
> -	 */
> -	if (port > 4) {
> -		drm_dbg_kms(&dev_priv->drm,
> -			    "[ENCODER:%d:%s] port %c (index %u) out of bounds for display power state notification\n",
> -			    intel_encoder->base.base.id, intel_encoder->base.name,
> -			    port_name(intel_encoder->port), port);
> -		return -EINVAL;
> -	}
> -
>  	if (!enable)
>  		parm |= 4 << 8;
>  
> -- 
> 2.36.0.550.gb090851708-goog
> 

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 5.10] Revert "drm/i915/opregion: check port number bounds for SWSCI display power state"
  2022-05-19 12:58 ` Greg KH
@ 2022-05-19 13:24   ` Yu Liao
  0 siblings, 0 replies; 5+ messages in thread
From: Yu Liao @ 2022-05-19 13:24 UTC (permalink / raw)
  To: Greg KH; +Cc: stable, liwei391, jani.nikula

Thanks, and this issue also exists in 5.15 and 5.17.

On 2022/5/19 20:58, Greg KH wrote:
> On Tue, May 17, 2022 at 08:49:32PM +0800, Yu Liao wrote:
>> This reverts commit b84857c06ef9e72d09fadafdbb3ce9af64af954f, as it's a
>> duplicate of commit eb7bf11e8ef1 ("drm/i915/opregion: check port number
>> bounds for SWSCI display power state").
>>
>> Cc: stable@vger.kernel.org # v5.10+
>> Signed-off-by: Yu Liao <liaoyu15@huawei.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_opregion.c | 15 ---------------
>>  1 file changed, 15 deletions(-)
> 
> Someone sent this right before you did:
> 	https://lore.kernel.org/r/20220517000835.2450573-1-gthelen@google.com
> 
> I'll merge them together...
> 
> thanks,
> 
> greg k-h
> .

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 5.10] Revert "drm/i915/opregion: check port number bounds for SWSCI display power state"
  2022-05-17 12:49 Yu Liao
@ 2022-05-19 12:58 ` Greg KH
  2022-05-19 13:24   ` Yu Liao
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2022-05-19 12:58 UTC (permalink / raw)
  To: Yu Liao; +Cc: stable, liwei391, jani.nikula

On Tue, May 17, 2022 at 08:49:32PM +0800, Yu Liao wrote:
> This reverts commit b84857c06ef9e72d09fadafdbb3ce9af64af954f, as it's a
> duplicate of commit eb7bf11e8ef1 ("drm/i915/opregion: check port number
> bounds for SWSCI display power state").
> 
> Cc: stable@vger.kernel.org # v5.10+
> Signed-off-by: Yu Liao <liaoyu15@huawei.com>
> ---
>  drivers/gpu/drm/i915/display/intel_opregion.c | 15 ---------------
>  1 file changed, 15 deletions(-)

Someone sent this right before you did:
	https://lore.kernel.org/r/20220517000835.2450573-1-gthelen@google.com

I'll merge them together...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 5.10] Revert "drm/i915/opregion: check port number bounds for SWSCI display power state"
@ 2022-05-17 12:49 Yu Liao
  2022-05-19 12:58 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Yu Liao @ 2022-05-17 12:49 UTC (permalink / raw)
  To: gregkh; +Cc: stable, liaoyu15, liwei391, jani.nikula

This reverts commit b84857c06ef9e72d09fadafdbb3ce9af64af954f, as it's a
duplicate of commit eb7bf11e8ef1 ("drm/i915/opregion: check port number
bounds for SWSCI display power state").

Cc: stable@vger.kernel.org # v5.10+
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
---
 drivers/gpu/drm/i915/display/intel_opregion.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c
index 6d083b98f6ae..abff2d6cedd1 100644
--- a/drivers/gpu/drm/i915/display/intel_opregion.c
+++ b/drivers/gpu/drm/i915/display/intel_opregion.c
@@ -376,21 +376,6 @@ int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,
 		return -EINVAL;
 	}
 
-	/*
-	 * The port numbering and mapping here is bizarre. The now-obsolete
-	 * swsci spec supports ports numbered [0..4]. Port E is handled as a
-	 * special case, but port F and beyond are not. The functionality is
-	 * supposed to be obsolete for new platforms. Just bail out if the port
-	 * number is out of bounds after mapping.
-	 */
-	if (port > 4) {
-		drm_dbg_kms(&dev_priv->drm,
-			    "[ENCODER:%d:%s] port %c (index %u) out of bounds for display power state notification\n",
-			    intel_encoder->base.base.id, intel_encoder->base.name,
-			    port_name(intel_encoder->port), port);
-		return -EINVAL;
-	}
-
 	if (!enable)
 		parm |= 4 << 8;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-19 13:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17  0:08 [PATCH 5.10] Revert "drm/i915/opregion: check port number bounds for SWSCI display power state" Greg Thelen
2022-05-19 12:59 ` Greg KH
2022-05-17 12:49 Yu Liao
2022-05-19 12:58 ` Greg KH
2022-05-19 13:24   ` Yu Liao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).