xorg-x11-server/0001-modesetting-Weaksauce-atomic-property-debugging.patch

65 lines
2.5 KiB
Diff

From 6915752b2da77c29bf8c861a6d4f2383e667323b Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 5 Oct 2018 14:07:46 -0400
Subject: [PATCH xserver 1/4] modesetting: Weaksauce atomic property debugging
This would be a good idea to have around for troubleshooting purposes,
but this particular patch is Not Good.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index cb48aa46b..a8d989a24 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -415,6 +415,13 @@ drmmode_ConvertToKMode(ScrnInfoPtr scrn,
drmModeModeInfo * kmode, DisplayModePtr mode);
+static int
+drmmodeatomicaddproperty(drmModeAtomicReqPtr req, uint32_t obj, uint32_t prop, uint64_t value)
+{
+ ErrorF("Adding to %p: %x %x %lx\n", req, obj, prop, value);
+ return drmModeAtomicAddProperty(req, obj, prop, value);
+}
+
static int
plane_add_prop(drmModeAtomicReq *req, drmmode_crtc_private_ptr drmmode_crtc,
enum drmmode_plane_property prop, uint64_t val)
@@ -425,7 +432,8 @@ plane_add_prop(drmModeAtomicReq *req, drmmode_crtc_private_ptr drmmode_crtc,
if (!info)
return -1;
- ret = drmModeAtomicAddProperty(req, drmmode_crtc->plane_id,
+ ErrorF("Setting %s\n", info->name);
+ ret = drmmodeatomicaddproperty(req, drmmode_crtc->plane_id,
info->prop_id, val);
return (ret <= 0) ? -1 : 0;
}
@@ -467,7 +475,8 @@ crtc_add_prop(drmModeAtomicReq *req, drmmode_crtc_private_ptr drmmode_crtc,
if (!info)
return -1;
- ret = drmModeAtomicAddProperty(req, drmmode_crtc->mode_crtc->crtc_id,
+ ErrorF("Setting %s\n", info->name);
+ ret = drmmodeatomicaddproperty(req, drmmode_crtc->mode_crtc->crtc_id,
info->prop_id, val);
return (ret <= 0) ? -1 : 0;
}
@@ -482,7 +491,8 @@ connector_add_prop(drmModeAtomicReq *req, drmmode_output_private_ptr drmmode_out
if (!info)
return -1;
- ret = drmModeAtomicAddProperty(req, drmmode_output->output_id,
+ ErrorF("Setting %s\n", info->name);
+ ret = drmmodeatomicaddproperty(req, drmmode_output->output_id,
info->prop_id, val);
return (ret <= 0) ? -1 : 0;
}
--
2.20.1