linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] drm/radeon: Fix a missing check bug in radeon_dp_mst_detect()
@ 2021-04-07  3:10 wangyingjie55
  2021-04-08 20:17 ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: wangyingjie55 @ 2021-04-07  3:10 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel, airlied
  Cc: wangyingjie55, amd-gfx, dri-devel, linux-kernel

From: Yingjie Wang <wangyingjie55@126.com>

In radeon_dp_mst_detect(), We should check whether or not @connector
has been unregistered from userspace. If the connector is unregistered,
we should return disconnected status.

Fixes: 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)")
Signed-off-by: Yingjie Wang <wangyingjie55@126.com>
---
 drivers/gpu/drm/radeon/radeon_dp_mst.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
index 2c32186c4acd..4e4c937c36c6 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
@@ -242,6 +242,9 @@ radeon_dp_mst_detect(struct drm_connector *connector,
 		to_radeon_connector(connector);
 	struct radeon_connector *master = radeon_connector->mst_port;
 
+	if (drm_connector_is_unregistered(connector))
+		return connector_status_disconnected;
+
 	return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
 				      radeon_connector->port);
 }
-- 
2.7.4


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

* Re: [PATCH v1] drm/radeon: Fix a missing check bug in radeon_dp_mst_detect()
  2021-04-07  3:10 [PATCH v1] drm/radeon: Fix a missing check bug in radeon_dp_mst_detect() wangyingjie55
@ 2021-04-08 20:17 ` Alex Deucher
  2021-04-10  0:43   ` Yingjie Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2021-04-08 20:17 UTC (permalink / raw)
  To: wangyingjie55
  Cc: Deucher, Alexander, Christian Koenig, Dave Airlie, Daniel Vetter,
	Dave Airlie, Maling list - DRI developers, amd-gfx list, LKML

Applied.  Thanks!

Alex

On Wed, Apr 7, 2021 at 2:23 AM <wangyingjie55@126.com> wrote:
>
> From: Yingjie Wang <wangyingjie55@126.com>
>
> In radeon_dp_mst_detect(), We should check whether or not @connector
> has been unregistered from userspace. If the connector is unregistered,
> we should return disconnected status.
>
> Fixes: 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)")
> Signed-off-by: Yingjie Wang <wangyingjie55@126.com>
> ---
>  drivers/gpu/drm/radeon/radeon_dp_mst.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> index 2c32186c4acd..4e4c937c36c6 100644
> --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
> +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> @@ -242,6 +242,9 @@ radeon_dp_mst_detect(struct drm_connector *connector,
>                 to_radeon_connector(connector);
>         struct radeon_connector *master = radeon_connector->mst_port;
>
> +       if (drm_connector_is_unregistered(connector))
> +               return connector_status_disconnected;
> +
>         return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
>                                       radeon_connector->port);
>  }
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re:Re: [PATCH v1] drm/radeon: Fix a missing check bug in radeon_dp_mst_detect()
  2021-04-08 20:17 ` Alex Deucher
@ 2021-04-10  0:43   ` Yingjie Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Yingjie Wang @ 2021-04-10  0:43 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Deucher, Alexander, Christian Koenig, Dave Airlie, Daniel Vetter,
	Dave Airlie, Maling list - DRI developers, amd-gfx list, LKML

My pleasure!
At 2021-04-09 04:17:36, "Alex Deucher" <alexdeucher@gmail.com> wrote:
>Applied.  Thanks!
>
>Alex
>
>On Wed, Apr 7, 2021 at 2:23 AM <wangyingjie55@126.com> wrote:
>>
>> From: Yingjie Wang <wangyingjie55@126.com>
>>
>> In radeon_dp_mst_detect(), We should check whether or not @connector
>> has been unregistered from userspace. If the connector is unregistered,
>> we should return disconnected status.
>>
>> Fixes: 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)")
>> Signed-off-by: Yingjie Wang <wangyingjie55@126.com>
>> ---
>>  drivers/gpu/drm/radeon/radeon_dp_mst.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
>> index 2c32186c4acd..4e4c937c36c6 100644
>> --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
>> +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
>> @@ -242,6 +242,9 @@ radeon_dp_mst_detect(struct drm_connector *connector,
>>                 to_radeon_connector(connector);
>>         struct radeon_connector *master = radeon_connector->mst_port;
>>
>> +       if (drm_connector_is_unregistered(connector))
>> +               return connector_status_disconnected;
>> +
>>         return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
>>                                       radeon_connector->port);
>>  }
>> --
>> 2.7.4
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2021-04-10  1:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07  3:10 [PATCH v1] drm/radeon: Fix a missing check bug in radeon_dp_mst_detect() wangyingjie55
2021-04-08 20:17 ` Alex Deucher
2021-04-10  0:43   ` Yingjie Wang

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).