xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Jul 19 20:56:05 UTC 2025
hw/xfree86/drivers/modesetting/drmmode_display.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
New commits:
commit 0d39d7a8f31cf2519b7743ea4964eecc4d0aead9
Author: Martin von Gagern <gagern at google.com>
Date: Mon Apr 28 15:53:57 2025 +0200
modesetting: Check for NULL mode_output before printing warning message
Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1816
Signed-off-by: Martin von Gagern <gagern at google.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1938>
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 6769d3dbf..354e5b6a7 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -4220,11 +4220,19 @@ drmmode_update_kms_state(drmmode_ptr drmmode)
drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation,
crtc->x, crtc->y);
- xf86DrvMsg(scrn->scrnIndex, X_WARNING,
- "hotplug event: connector %u's link-state is BAD, "
- "tried resetting the current mode. You may be left"
- "with a black screen if this fails...\n",
- drmmode_output->mode_output->connector_id);
+ drmModeConnectorPtr mode_output = drmmode_output->mode_output;
+ if (mode_output) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "hotplug event: connector %u's link-state is BAD, "
+ "tried resetting the current mode. You may be left "
+ "with a black screen if this fails...\n",
+ mode_output->connector_id);
+ } else {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "hotplug event: NULL connector's link-state is BAD, "
+ "tried resetting the current mode. You may be left "
+ "with a black screen if this fails...\n");
+ }
}
break;
}
More information about the xorg-commit
mailing list