Skip to contentSkip to conversation

modesetting: Skip no-longer-present connectors when resetting BAD links

PATCH In review Michel Dänzer 2 participants 2 messages Oct 20, 2017 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 modesetting: Skip no-longer-present connectors when resetting BAD links

From: Keith Packard <[email protected]>

Outputs may have NULL mode_output (connector) pointers if the connector disappears while the server is running. Skip these when resetting outputs with BAD link status.

(Ported from xserver commit 37f4e7651a2fd51efa613a08a1e705553be33e76)

---
 src/drmmode_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
src/drmmode_display.c +4 -1
index 2cef93cdd..4ca94e71d 100644
@@ -2600,9 +2600,12 @@ amdgpu_mode_hotplug(ScrnInfoPtr scrn, drmmode_ptr drmmode)
 	for (i = 0; i < config->num_output; i++) {
 		xf86OutputPtr output = config->output[i];
 		drmmode_output_private_ptr drmmode_output = output->driver_private;
-		uint32_t con_id = drmmode_output->mode_output->connector_id;
+		uint32_t con_id;
 		drmModeConnectorPtr koutput;
 
+		if (drmmode_output->mode_output == NULL)
+			continue;
+		con_id = drmmode_output->mode_output->connector_id;
 		/* Get an updated view of the properties for the current connector and
 		 * look for the link-status property
 		 */
Signature · 6 lines
2.14.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20171020154939.15757-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 10 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Friday, October 20, 2017 11:50 AM
To: [email protected]
Subject: [PATCH xf86-video-amdgpu] modesetting: Skip no-longer-present connectors when resetting BAD links

From: Keith Packard <[email protected]>

Quoted 7 lines

Outputs may have NULL mode_output (connector) pointers if the connector disappears while the server is running. Skip these when resetting outputs with BAD link status.

(Ported from xserver commit 37f4e7651a2fd51efa613a08a1e705553be33e76)

Quoted 29 lines
---
 src/drmmode_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
src/drmmode_display.c +4 -1
index 2cef93cdd..4ca94e71d 100644
@@ -2600,9 +2600,12 @@ amdgpu_mode_hotplug(ScrnInfoPtr scrn,
 drmmode_ptr drmmode)
 	for (i = 0; i < config->num_output; i++) {
 		xf86OutputPtr output = config->output[i];
 		drmmode_output_private_ptr drmmode_output = output-
 >driver_private;
-		uint32_t con_id = drmmode_output->mode_output-
 >connector_id;
+		uint32_t con_id;
 		drmModeConnectorPtr koutput;
 
+		if (drmmode_output->mode_output == NULL)
+			continue;
+		con_id = drmmode_output->mode_output->connector_id;

/* Get an updated view of the properties for the current
connector and

src/drmmode_display.c +0 -1
 		 * look for the link-status property
 		 */
--

2.14.2

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx