mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-14 13:18:09 +02: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>
(cherry picked from commit 9d26e8eaf5)
This commit is contained in:
parent
33b110d2dd
commit
4cd0af4bb2
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