drm/dp_mst: Don't report ports connected if nothing is attached to them
Subsystems (3)
PATCH 1/4 drm/dp_mst: Don't report ports connected if nothing is attached to them
Reporting a port as connected if nothing is attached to them leads to any i2c transactions on this port trying to use an uninitialized i2c adapter, fix this.
Let's account for this case even if branch devices have no good reason to report a port as unplugged with their peer device type set to 'none'.
References: https://gitlab.freedesktop.org/drm/intel/-/issues/2987
References: https://gitlab.freedesktop.org/drm/intel/-/issues/1963
--- drivers/gpu/drm/drm_dp_mst_topology.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_dp_mst_topology.c +1 -0
@@ -4224,6 +4224,7 @@ drm_dp_mst_detect_port(struct drm_connector *connector,switch (port->pdt) {case DP_PEER_DEVICE_NONE : +break ;case DP_PEER_DEVICE_MST_BRANCHING :if (!port->mcs) ret = connector_status_connected;
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/4 drm/dp_mst: Don't cache EDIDs for physical ports
Caching EDIDs for physical ports prevents updating the EDID if a port gets reconnected via a Connection Status Notification message, fix this.
--- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_dp_mst_topology.c +2 -1
@@ -2302,7 +2302,8 @@ drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb, }if (port->pdt !=DP_PEER_DEVICE_NONE && -drm_dp_mst_is_end_device (port->pdt, port->mcs)) { +drm_dp_mst_is_end_device (port->pdt, port->mcs) && + port->port_num >=DP_MST_LOGICAL_PORT_0 ) { port->cached_edid =drm_get_edid (port->connector, &port->aux.ddc);drm_connector_set_tile_property (port->connector);
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
RE: [PATCH 2/4] drm/dp_mst: Don't cache EDIDs for physical ports
[AMD Public Use]
Quoted 23 lines
-----Original Message-----
From: Imre Deak <[email protected]>
Sent: Monday, February 1, 2021 8:02 PM
To: [email protected]
Cc: Lin, Wayne <[email protected]>; Lyude Paul <[email protected]>
Subject: [PATCH 2/4] drm/dp_mst: Don't cache EDIDs for physical portsCaching EDIDs for physical ports prevents updating the EDID if a port gets reconnected via a Connection Status Notification message, fix this.
Fixes db1a07956968 ("drm/dp_mst: Handle SST-only branch device case")Cc Wayne Lin <[email protected]>Cc Lyude Paul <[email protected]>Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_dp_mst_topology.c +0
-0
drivers/gpu/drm/drm_dp_mst_topology.c drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb, · line 2306
Quoted 6 lines
drivers/gpu/drm/drm_dp_mst_topology.c +2
-1@@ -2302,7 +2302,8 @@ drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb, }if (port->pdt !=DP_PEER_DEVICE_NONE && -drm_dp_mst_is_end_device (port->pdt, port->mcs)) { +drm_dp_mst_is_end_device (port->pdt, port->mcs) && + port->port_num >=DP_MST_LOGICAL_PORT_0 ) {
Hi Imre Deak,
Thanks for the patch!
Just curious that you mean we don't want to fetch the EDID of the sst monitor like below case?
Src->MST device ->SST monitor
I thought we still need to get the EDID even the monitor is connected to the physical output port of mst device. Maybe what we should fix here is why the EDID is not get updated once reconnected via CSN message?
Thanks!
Quoted 5 lines
drivers/gpu/drm/drm_dp_mst_topology.c +0
-1port->cached_edid =drm_get_edid (port->connector, &port->aux.ddc);drm_connector_set_tile_property (port->connector); --2.25.1
Regards,
Wayne Lin
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/4] drm/dp_mst: Don't cache EDIDs for physical ports
Quoted 33 lines · Wayne
[AMD Public Use]
Quoted 23 lines
-----Original Message-----
From: Imre Deak <[email protected]>
Sent: Monday, February 1, 2021 8:02 PM
To: [email protected]
Cc: Lin, Wayne <[email protected]>; Lyude Paul <[email protected]>
Subject: [PATCH 2/4] drm/dp_mst: Don't cache EDIDs for physical portsCaching EDIDs for physical ports prevents updating the EDID if a port gets reconnected via a Connection Status Notification message, fix this.
Fixes db1a07956968 ("drm/dp_mst: Handle SST-only branch device case")Cc Wayne Lin <[email protected]>Cc Lyude Paul <[email protected]>Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_dp_mst_topology.c +0
-0drivers/gpu/drm/drm_dp_mst_topology.c drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb, · line 2306
Quoted 6 lines
drivers/gpu/drm/drm_dp_mst_topology.c +2
-1@@ -2302,7 +2302,8 @@ drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb, }if (port->pdt !=DP_PEER_DEVICE_NONE && -drm_dp_mst_is_end_device (port->pdt, port->mcs)) { +drm_dp_mst_is_end_device (port->pdt, port->mcs) && + port->port_num >=DP_MST_LOGICAL_PORT_0 ) {Hi Imre Deak,
Quoted 5 lines
Thanks for the patch!
Just curious that you mean we don't want to fetch the EDID of the sst monitor like below case?Src->MST device ->SST monitor
The intention of the mst cached_edid logic is to cache the EDID for logical ports where the EDID cannot change anyway. The EDID on physical ports is fetched during connector probing just as for any other connector.
Quoted 2 lines
I thought we still need to get the EDID even the monitor is connected to the physical output port of mst device.
For sinks attached to phyisical ports we get the EDID whenever probing the corresponding connector.
Quoted 2 lines
Maybe what we should fix here is why the EDID is not get updated once reconnected via CSN message?
This patch fixes the problem that we stopped updating the EDID for physical connectors. After this change it will get updated when probing such connectors.
Quoted 8 lines
Thanks!
Quoted 5 lines
drivers/gpu/drm/drm_dp_mst_topology.c +0
-1port->cached_edid =drm_get_edid (port->connector, &port->aux.ddc);drm_connector_set_tile_property (port->connector); --2.25.1
Regards,
Wayne Lin
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
RE: [PATCH 2/4] drm/dp_mst: Don't cache EDIDs for physical ports
[AMD Official Use Only - Internal Distribution Only]
Quoted 56 lines
-----Original Message-----
From: Imre Deak <[email protected]>
Sent: Tuesday, February 2, 2021 7:22 PM
To: Lin, Wayne <[email protected]>
Cc: [email protected]; Lyude Paul <[email protected]>
Subject: Re: [PATCH 2/4] drm/dp_mst: Don't cache EDIDs for physical portsQuoted 36 lines · Wayne
[AMD Public Use]
Quoted 26 lines
-----Original Message-----
From: Imre Deak <[email protected]>
Sent: Monday, February 1, 2021 8:02 PM
To: [email protected]
Cc: Lin, Wayne <[email protected]>; Lyude Paul <[email protected]>
Subject: [PATCH 2/4] drm/dp_mst: Don't cache EDIDs for physical portsCaching EDIDs for physical ports prevents updating the EDID if a port gets reconnected via a Connection Status Notification message, fix this.
Fixes db1a07956968 ("drm/dp_mst: Handle SST-only branch devicecase")
Cc Wayne Lin <[email protected]>Cc Lyude Paul <[email protected]>Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_dp_mst_topology.c +0
-0drivers/gpu/drm/drm_dp_mst_topology.c drm_dp_mst_port_add_connector(struct · line 2306
Quoted 6 lines
drivers/gpu/drm/drm_dp_mst_topology.c +2
-1@@ -2302,7 +2302,8 @@ drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb, }if (port->pdt !=DP_PEER_DEVICE_NONE && -drm_dp_mst_is_end_device (port->pdt, port->mcs)) { +drm_dp_mst_is_end_device (port->pdt, port->mcs) && + port->port_num >=DP_MST_LOGICAL_PORT_0 ) {Hi Imre Deak,
Quoted 5 lines
Thanks for the patch!
Just curious that you mean we don't want to fetch the EDID of the sst monitor like below case?Src->MST device ->SST monitorThe intention of the mst
cached_edidlogic is to cache the EDID for logical ports where the EDID cannot change anyway. The EDID on physical ports is fetched during connector probing just as for any other connector.Quoted 2 lines
I thought we still need to get the EDID even the monitor is connected to the physical output port of mst device.
Quoted 8 lines
For sinks attached to phyisical ports we get the EDID whenever probing the corresponding connector.
Quoted 2 lines
Maybe what we should fix here is why the EDID is not get updated once reconnected via CSN message?
This patch fixes the problem that we stopped updating the EDID for physical connectors. After this change it will get updated when probing such connectors.
Appreciate for the explanation.
Thanks!
Quoted 8 lines
Quoted 8 lines
Thanks!
Quoted 5 lines
drivers/gpu/drm/drm_dp_mst_topology.c +0
-1port->cached_edid =drm_get_edid (port->connector, &port->aux.ddc);drm_connector_set_tile_property (port->connector); --2.25.1
Regards,
Wayne Lin
Regards,
Wayne Lin
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/4] drm/dp_mst: Don't cache EDIDs for physical ports
In reply to Imre DeakQuoted 7 lines · Imre Deak
Caching EDIDs for physical ports prevents updating the EDID if a port gets reconnected via a Connection Status Notification message, fix this.
Fixes db1a07956968 ("drm/dp_mst: Handle SST-only branch device case")Cc Wayne Lin <[email protected]>Cc Lyude Paul <[email protected]>Signed-off-by Imre Deak <[email protected]>
Pushed patches 2-4 to drm-misc-next, thanks for the review.
Quoted 25 lines
--- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_dp_mst_topology.c +2
-1@@ -2302,7 +2302,8 @@ drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb, }if (port->pdt !=DP_PEER_DEVICE_NONE && -drm_dp_mst_is_end_device (port->pdt, port->mcs)) { +drm_dp_mst_is_end_device (port->pdt, port->mcs) && + port->port_num >=DP_MST_LOGICAL_PORT_0 ) { port->cached_edid =drm_get_edid (port->connector, &port->aux.ddc);drm_connector_set_tile_property (port->connector);Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/4 drm/dp_mst: Remove redundant tile property setting
In reply to Imre Deakdrm_get_edid() already updates the tile property since
commit 2de3a078497b ("drm/dp: Set the connector's TILE property even for DP SST connectors") so no need to update it after calling this function.
--- drivers/gpu/drm/drm_dp_mst_topology.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +1 -3
@@ -2303,11 +2303,9 @@ drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb,if (port->pdt !=DP_PEER_DEVICE_NONE &&drm_dp_mst_is_end_device (port->pdt, port->mcs) && - port->port_num >=DP_MST_LOGICAL_PORT_0 ) { + port->port_num >=DP_MST_LOGICAL_PORT_0 ) port->cached_edid =drm_get_edid (port->connector, &port->aux.ddc); -drm_connector_set_tile_property (port->connector); - }drm_connector_register (port->connector);return ;
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/4 drm/dp_mst: Use DP_MST_LOGICAL_PORT_0 instead of magic number
In reply to Imre DeakUse the macro defined for the first logical port instead of the corresponding magic number.
--- drivers/gpu/drm/drm_dp_mst_topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +1 -2
@@ -4232,9 +4232,8 @@ drm_dp_mst_detect_port(struct drm_connector *connector,case DP_PEER_DEVICE_SST_SINK : ret = connector_status_connected;/* for logical ports - cache the EDID */ -if (port->port_num >=8 && !port->cached_edid) { +if (port->port_num >=DP_MST_LOGICAL_PORT_0 && !port->cached_edid) port->cached_edid =drm_get_edid (connector, &port->aux.ddc); - }break ;case DP_PEER_DEVICE_DP_LEGACY_CONV :if (port->ldps)
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
For the whole series:
Quoted 32 lines · Imre Deak
Reporting a port as connected if nothing is attached to them leads to any i2c transactions on this port trying to use an uninitialized i2c adapter, fix this.
Let's account for this case even if branch devices have no good reason to report a port as unplugged with their peer device type set to 'none'.
Fixes db1a07956968 ("drm/dp_mst: Handle SST-only branch device case")References: https://gitlab.freedesktop.org/drm/intel/-/issues/2987
References: https://gitlab.freedesktop.org/drm/intel/-/issues/1963Cc Wayne Lin <[email protected]>Cc Lyude Paul <[email protected]>Cc <[email protected]> # v5.5+Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/drm_dp_mst_topology.c | 1 +1 file changed, 1 insertion(+)drivers/gpu/drm/drm_dp_mst_topology.c +0
-0@@ -4224,6 +4224,7 @@ drm_dp_mst_detect_port(struct drm_connector *connector,
switch (port->pdt) {
caseDP_PEER_DEVICE_NONE:
+ break;
caseDP_PEER_DEVICE_MST_BRANCHING:
if (!port->mcs)
ret =connector_status_connected;
Signature · 13 lines
Sincerely, Lyude Paul (she/her) Software Engineer at Red Hat Note: I deal with a lot of emails and have a lot of bugs on my plate. If you've asked me a question, are waiting for a review/merge on a patch, etc. and I haven't responded in a while, please feel free to send me another email to check on my status. I don't bite! _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Imre Deak
Reporting a port as connected if nothing is attached to them leads to any i2c transactions on this port trying to use an uninitialized i2c adapter, fix this.
Let's account for this case even if branch devices have no good reason to report a port as unplugged with their peer device type set to 'none'.
Quoted 8 lines
Fixes db1a07956968 ("drm/dp_mst: Handle SST-only branch device case")References: https://gitlab.freedesktop.org/drm/intel/-/issues/2987
References: https://gitlab.freedesktop.org/drm/intel/-/issues/1963Cc Wayne Lin <[email protected]>Cc Lyude Paul <[email protected]>Cc <[email protected]> # v5.5+Signed-off-by Imre Deak <[email protected]>
Thanks for the report and review, I pushed this one patch to drm-misc-fixes.
I fixed a typo in the commit message.
Quoted 23 lines
--- drivers/gpu/drm/drm_dp_mst_topology.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/drm_dp_mst_topology.c +1
-0@@ -4224,6 +4224,7 @@ drm_dp_mst_detect_port(struct drm_connector *connector,switch (port->pdt) {case DP_PEER_DEVICE_NONE : +break ;case DP_PEER_DEVICE_MST_BRANCHING :if (!port->mcs) ret = connector_status_connected;Signature · 6 lines
2.25.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx