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>
This commit is contained in:
Dave Airlie 2013-01-09 14:26:35 +10:00
parent b724324252
commit 9d26e8eaf5
2 changed files with 4 additions and 1 deletions

View File

@ -47,6 +47,7 @@
#include "Pci.h"
#include "xf86platformBus.h"
#include "randrstr.h"
int platformSlotClaimed;
int xf86_num_platform_devices;
@ -499,7 +500,7 @@ xf86platformRemoveDevice(int index)
xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
xf86_remove_platform_device(index);
RRTellChanged(xf86Screens[0]->pScreen);
out:
return;
}

View File

@ -1896,10 +1896,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);