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:
parent
b724324252
commit
9d26e8eaf5
|
@ -47,6 +47,7 @@
|
||||||
#include "Pci.h"
|
#include "Pci.h"
|
||||||
#include "xf86platformBus.h"
|
#include "xf86platformBus.h"
|
||||||
|
|
||||||
|
#include "randrstr.h"
|
||||||
int platformSlotClaimed;
|
int platformSlotClaimed;
|
||||||
|
|
||||||
int xf86_num_platform_devices;
|
int xf86_num_platform_devices;
|
||||||
|
@ -499,7 +500,7 @@ xf86platformRemoveDevice(int index)
|
||||||
xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
|
xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
|
||||||
|
|
||||||
xf86_remove_platform_device(index);
|
xf86_remove_platform_device(index);
|
||||||
|
RRTellChanged(xf86Screens[0]->pScreen);
|
||||||
out:
|
out:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1896,10 +1896,12 @@ xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider)
|
||||||
if (config->randr_provider->offload_sink) {
|
if (config->randr_provider->offload_sink) {
|
||||||
DetachOffloadGPU(screen);
|
DetachOffloadGPU(screen);
|
||||||
config->randr_provider->offload_sink = NULL;
|
config->randr_provider->offload_sink = NULL;
|
||||||
|
RRSetChanged(screen);
|
||||||
}
|
}
|
||||||
else if (config->randr_provider->output_source) {
|
else if (config->randr_provider->output_source) {
|
||||||
DetachOutputGPU(screen);
|
DetachOutputGPU(screen);
|
||||||
config->randr_provider->output_source = NULL;
|
config->randr_provider->output_source = NULL;
|
||||||
|
RRSetChanged(screen);
|
||||||
}
|
}
|
||||||
else if (screen->current_master)
|
else if (screen->current_master)
|
||||||
DetachUnboundGPU(screen);
|
DetachUnboundGPU(screen);
|
||||||
|
|
Loading…
Reference in New Issue