From 388c8278cf81848635d8b4af75f0ccc189344acf Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 9 Jan 2013 14:32:50 +1000 Subject: [PATCH] randr: report changes when we disconnect a GPU slave 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 Signed-off-by: Fedora X Ninjas --- 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 2b02e79..4ccb005 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; @@ -497,7 +498,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.4