summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2013-01-09 14:26:35 +1000
committerDave Airlie <airlied@redhat.com>2013-11-05 13:24:40 +1000
commit4cd0af4bb2662554e9bf3c044b8233019515e758 (patch)
tree6b576ecfd3e63933e8f819b50238edc556b04bd7
parent33b110d2dd74d4474c13f529b36fe30019fabcfc (diff)
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. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 9d26e8eaf5a2d7c3e65670ac20254c60f665c463)
-rw-r--r--hw/xfree86/common/xf86platformBus.c3
-rw-r--r--hw/xfree86/modes/xf86RandR12.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index db831a883..e368deeb8 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;
@@ -507,7 +508,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 8a4bad798..db31432fc 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1908,10 +1908,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) {
xf86DetachOutputGPU(screen);
config->randr_provider->output_source = NULL;
+ RRSetChanged(screen);
}
else if (screen->current_master)
DetachUnboundGPU(screen);