linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/amd/dm: Misc MST connector fixes
@ 2018-11-16 23:24 Lyude Paul
  2018-11-16 23:24 ` [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders Lyude Paul
  2018-11-16 23:24 ` [PATCH 2/2] drm/amd/dm: Understand why attaching path/tile properties are needed Lyude Paul
  0 siblings, 2 replies; 7+ messages in thread
From: Lyude Paul @ 2018-11-16 23:24 UTC (permalink / raw)
  To: amd-gfx
  Cc: Jerry Zuo, Alex Deucher, Leo Li, David Airlie,
	Christian König, Daniel Vetter, linux-kernel, Roman Li,
	dri-devel, David (ChunMing) Zhou, Shirish S, Jerry (Fangzhi) Zuo,
	Harry Wentland, Lyude Paul, Tony Cheng

Some fixes for things I spotted after trying to look at a bug Jerry Zuo
mentioned to me. Didn't manage to reproduce the bug! But I found these.

Cc: Jerry Zuo <Jerry.Zuo@amd.com>

Lyude Paul (2):
  drm/amd/dm: Don't forget to attach MST encoders
  drm/amd/dm: Understand why attaching path/tile properties are needed

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
2.19.1


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

* [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders
  2018-11-16 23:24 [PATCH 0/2] drm/amd/dm: Misc MST connector fixes Lyude Paul
@ 2018-11-16 23:24 ` Lyude Paul
  2018-11-19 15:00   ` Zuo, Jerry
  2018-11-16 23:24 ` [PATCH 2/2] drm/amd/dm: Understand why attaching path/tile properties are needed Lyude Paul
  1 sibling, 1 reply; 7+ messages in thread
From: Lyude Paul @ 2018-11-16 23:24 UTC (permalink / raw)
  To: amd-gfx
  Cc: Jerry Zuo, Harry Wentland, Leo Li, Alex Deucher,
	Christian König, David (ChunMing) Zhou, David Airlie,
	Roman Li, Shirish S, Daniel Vetter, dri-devel, linux-kernel

Drive-by fix, this is bound to cause problems somewhere.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Jerry Zuo <Jerry.Zuo@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index d02c32a1039c..0cca1809fdcd 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -342,6 +342,8 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 		master->connector_id);
 
 	aconnector->mst_encoder = dm_dp_create_fake_mst_encoder(master);
+	drm_connector_attach_encoder(&aconnector->base,
+				     &aconnector->mst_encoder->base);
 
 	/*
 	 * TODO: understand why this one is needed
-- 
2.19.1


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

* [PATCH 2/2] drm/amd/dm: Understand why attaching path/tile properties are needed
  2018-11-16 23:24 [PATCH 0/2] drm/amd/dm: Misc MST connector fixes Lyude Paul
  2018-11-16 23:24 ` [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders Lyude Paul
@ 2018-11-16 23:24 ` Lyude Paul
  2018-11-19 19:44   ` Zuo, Jerry
  1 sibling, 1 reply; 7+ messages in thread
From: Lyude Paul @ 2018-11-16 23:24 UTC (permalink / raw)
  To: amd-gfx
  Cc: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Jerry (Fangzhi) Zuo,
	Roman Li, Tony Cheng, Daniel Vetter, Shirish S, dri-devel,
	linux-kernel

Path property is used for userspace to know what MST connector goes to
what actual DRM DisplayPort connector, the tiling property is for tiling
configurations. Not sure what else there is to figure out.

Signed-off-by: Lyude Paul <lyude@redhat.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 0cca1809fdcd..1b0d209d8367 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -345,9 +345,6 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 	drm_connector_attach_encoder(&aconnector->base,
 				     &aconnector->mst_encoder->base);
 
-	/*
-	 * TODO: understand why this one is needed
-	 */
 	drm_object_attach_property(
 		&connector->base,
 		dev->mode_config.path_property,
-- 
2.19.1


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

* RE: [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders
  2018-11-16 23:24 ` [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders Lyude Paul
@ 2018-11-19 15:00   ` Zuo, Jerry
  2018-11-19 18:51     ` Lyude Paul
  0 siblings, 1 reply; 7+ messages in thread
From: Zuo, Jerry @ 2018-11-19 15:00 UTC (permalink / raw)
  To: Lyude Paul, amd-gfx
  Cc: Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Li, Roman, S, Shirish, Daniel Vetter, dri-devel,
	linux-kernel

Reviewed-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>

The change fixed MST + SST daisy chain and S3 scenarios. The issue shows huge delay in MST + SST daisy chain, and soft hang in S3 resume.

The aux sequence is changed by failed iteration search in drm_connector_for_each_possible_encoder(). 
The failure of searching for the best encoder for the connector due to the miss of attached encoder in the process of adding MST connector. The iteration search takes time to push drm_dp_send_enum_path_resources() aux transaction after the mode probe, and causes conflict to drm_dp_mst_i2c_xfer(), leading to the aux transaction timeout.

-----Original Message-----
From: Lyude Paul <lyude@redhat.com> 
Sent: November 16, 2018 6:25 PM
To: amd-gfx@lists.freedesktop.org
Cc: Zuo, Jerry <Jerry.Zuo@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie>; Li, Roman <Roman.Li@amd.com>; S, Shirish <Shirish.S@amd.com>; Daniel Vetter <daniel.vetter@ffwll.ch>; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders

Drive-by fix, this is bound to cause problems somewhere.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Jerry Zuo <Jerry.Zuo@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index d02c32a1039c..0cca1809fdcd 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -342,6 +342,8 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 		master->connector_id);
 
 	aconnector->mst_encoder = dm_dp_create_fake_mst_encoder(master);
+	drm_connector_attach_encoder(&aconnector->base,
+				     &aconnector->mst_encoder->base);
 
 	/*
 	 * TODO: understand why this one is needed
-- 
2.19.1


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

* Re: [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders
  2018-11-19 15:00   ` Zuo, Jerry
@ 2018-11-19 18:51     ` Lyude Paul
  2018-11-19 18:54       ` Zuo, Jerry
  0 siblings, 1 reply; 7+ messages in thread
From: Lyude Paul @ 2018-11-19 18:51 UTC (permalink / raw)
  To: Zuo, Jerry, amd-gfx
  Cc: Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Li, Roman, S, Shirish, Daniel Vetter, dri-devel,
	linux-kernel

Cool! If it did actually fix those problems, would you mind making sure this
gets Cc'd to stable when it gets pushed upstream?

On Mon, 2018-11-19 at 15:00 +0000, Zuo, Jerry wrote:
> Reviewed-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
> 
> The change fixed MST + SST daisy chain and S3 scenarios. The issue shows
> huge delay in MST + SST daisy chain, and soft hang in S3 resume.
> 
> The aux sequence is changed by failed iteration search in
> drm_connector_for_each_possible_encoder(). 
> The failure of searching for the best encoder for the connector due to the
> miss of attached encoder in the process of adding MST connector. The
> iteration search takes time to push drm_dp_send_enum_path_resources() aux
> transaction after the mode probe, and causes conflict to
> drm_dp_mst_i2c_xfer(), leading to the aux transaction timeout.
> 
> -----Original Message-----
> From: Lyude Paul <lyude@redhat.com> 
> Sent: November 16, 2018 6:25 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Zuo, Jerry <Jerry.Zuo@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>
> ; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Deucher, Alexander <
> Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>;
> Zhou, David(ChunMing) <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie>
> ; Li, Roman <Roman.Li@amd.com>; S, Shirish <Shirish.S@amd.com>; Daniel
> Vetter <daniel.vetter@ffwll.ch>; dri-devel@lists.freedesktop.org; 
> linux-kernel@vger.kernel.org
> Subject: [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders
> 
> Drive-by fix, this is bound to cause problems somewhere.
> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: Jerry Zuo <Jerry.Zuo@amd.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index d02c32a1039c..0cca1809fdcd 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -342,6 +342,8 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr
> *mgr,
>  		master->connector_id);
>  
>  	aconnector->mst_encoder = dm_dp_create_fake_mst_encoder(master);
> +	drm_connector_attach_encoder(&aconnector->base,
> +				     &aconnector->mst_encoder->base);
>  
>  	/*
>  	 * TODO: understand why this one is needed
-- 
Cheers,
	Lyude Paul


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

* RE: [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders
  2018-11-19 18:51     ` Lyude Paul
@ 2018-11-19 18:54       ` Zuo, Jerry
  0 siblings, 0 replies; 7+ messages in thread
From: Zuo, Jerry @ 2018-11-19 18:54 UTC (permalink / raw)
  To: Lyude Paul, amd-gfx
  Cc: Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Li, Roman, S, Shirish, Daniel Vetter, dri-devel,
	linux-kernel

Sure, I'll do it.

-----Original Message-----
From: Lyude Paul <lyude@redhat.com> 
Sent: November 19, 2018 1:52 PM
To: Zuo, Jerry <Jerry.Zuo@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie>; Li, Roman <Roman.Li@amd.com>; S, Shirish <Shirish.S@amd.com>; Daniel Vetter <daniel.vetter@ffwll.ch>; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders

Cool! If it did actually fix those problems, would you mind making sure this gets Cc'd to stable when it gets pushed upstream?

On Mon, 2018-11-19 at 15:00 +0000, Zuo, Jerry wrote:
> Reviewed-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
> 
> The change fixed MST + SST daisy chain and S3 scenarios. The issue 
> shows huge delay in MST + SST daisy chain, and soft hang in S3 resume.
> 
> The aux sequence is changed by failed iteration search in 
> drm_connector_for_each_possible_encoder().
> The failure of searching for the best encoder for the connector due to 
> the miss of attached encoder in the process of adding MST connector. 
> The iteration search takes time to push 
> drm_dp_send_enum_path_resources() aux transaction after the mode 
> probe, and causes conflict to drm_dp_mst_i2c_xfer(), leading to the aux transaction timeout.
> 
> -----Original Message-----
> From: Lyude Paul <lyude@redhat.com>
> Sent: November 16, 2018 6:25 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Zuo, Jerry <Jerry.Zuo@amd.com>; Wentland, Harry 
> <Harry.Wentland@amd.com> ; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; 
> Deucher, Alexander < Alexander.Deucher@amd.com>; Koenig, Christian 
> <Christian.Koenig@amd.com>; Zhou, David(ChunMing) 
> <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie> ; Li, Roman 
> <Roman.Li@amd.com>; S, Shirish <Shirish.S@amd.com>; Daniel Vetter 
> <daniel.vetter@ffwll.ch>; dri-devel@lists.freedesktop.org; 
> linux-kernel@vger.kernel.org
> Subject: [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders
> 
> Drive-by fix, this is bound to cause problems somewhere.
> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: Jerry Zuo <Jerry.Zuo@amd.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git 
> a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index d02c32a1039c..0cca1809fdcd 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -342,6 +342,8 @@ dm_dp_add_mst_connector(struct 
> drm_dp_mst_topology_mgr *mgr,
>  		master->connector_id);
>  
>  	aconnector->mst_encoder = dm_dp_create_fake_mst_encoder(master);
> +	drm_connector_attach_encoder(&aconnector->base,
> +				     &aconnector->mst_encoder->base);
>  
>  	/*
>  	 * TODO: understand why this one is needed
--
Cheers,
	Lyude Paul


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

* RE: [PATCH 2/2] drm/amd/dm: Understand why attaching path/tile properties are needed
  2018-11-16 23:24 ` [PATCH 2/2] drm/amd/dm: Understand why attaching path/tile properties are needed Lyude Paul
@ 2018-11-19 19:44   ` Zuo, Jerry
  0 siblings, 0 replies; 7+ messages in thread
From: Zuo, Jerry @ 2018-11-19 19:44 UTC (permalink / raw)
  To: Lyude Paul, amd-gfx
  Cc: Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Li, Roman, Cheng, Tony, Daniel Vetter, S, Shirish,
	dri-devel, linux-kernel

-----Original Message-----
From: Lyude Paul <lyude@redhat.com> 
Sent: November 16, 2018 6:25 PM
To: amd-gfx@lists.freedesktop.org
Cc: Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie>; Zuo, Jerry <Jerry.Zuo@amd.com>; Li, Roman <Roman.Li@amd.com>; Cheng, Tony <Tony.Cheng@amd.com>; Daniel Vetter <daniel.vetter@ffwll.ch>; S, Shirish <Shirish.S@amd.com>; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] drm/amd/dm: Understand why attaching path/tile properties are needed

Path property is used for userspace to know what MST connector goes to what actual DRM DisplayPort connector, the tiling property is for tiling configurations. Not sure what else there is to figure out.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 0cca1809fdcd..1b0d209d8367 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -345,9 +345,6 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 	drm_connector_attach_encoder(&aconnector->base,
 				     &aconnector->mst_encoder->base);
 
-	/*
-	 * TODO: understand why this one is needed
-	 */
 	drm_object_attach_property(
 		&connector->base,
 		dev->mode_config.path_property,
--
2.19.1


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

end of thread, other threads:[~2018-11-19 19:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-16 23:24 [PATCH 0/2] drm/amd/dm: Misc MST connector fixes Lyude Paul
2018-11-16 23:24 ` [PATCH 1/2] drm/amd/dm: Don't forget to attach MST encoders Lyude Paul
2018-11-19 15:00   ` Zuo, Jerry
2018-11-19 18:51     ` Lyude Paul
2018-11-19 18:54       ` Zuo, Jerry
2018-11-16 23:24 ` [PATCH 2/2] drm/amd/dm: Understand why attaching path/tile properties are needed Lyude Paul
2018-11-19 19:44   ` Zuo, Jerry

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