[PATCH 4/4] randr: report changes when we disconnect a GPU slave
Dave Airlie
airlied at gmail.com
Tue Jan 8 20:32:50 PST 2013
From: Dave Airlie <airlied at redhat.com>
When we disconnect an output/offload slave set the changed bits,
so a later TellChanged can do something.
Then when we remove a GPU slave device, sent change notification
to the protocol screen.
This allows hot unplugged USB devices to disappear in clients.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
hw/xfree86/common/xf86platformBus.c | 3 ++-
hw/xfree86/modes/xf86RandR12.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 9ff1a08..8ce472f 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -47,6 +47,7 @@
#include "Pci.h"
#include "xf86platformBus.h"
+#include "randrstr.h"
int platformSlotClaimed;
int xf86_num_platform_devices;
@@ -502,7 +503,7 @@ xf86platformRemoveDevice(int index)
xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
xf86_remove_platform_device(index);
-
+ RRTellChanged(xf86Screens[0]->pScreen);
out:
return;
}
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 01fc9c5..7f570cf 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1895,10 +1895,12 @@ xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider)
if (config->randr_provider->offload_sink) {
DetachOffloadGPU(screen);
config->randr_provider->offload_sink = NULL;
+ RRSetChanged(screen);
}
else if (config->randr_provider->output_source) {
DetachOutputGPU(screen);
config->randr_provider->output_source = NULL;
+ RRSetChanged(screen);
}
else if (screen->current_master)
DetachUnboundGPU(screen);
--
1.8.1
More information about the xorg-devel
mailing list