mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 08:10:03 +01:00
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
e233bda3e7
commit
d94e40f049
2 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue