mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-09 23:22:22 +00:00
dix: add ability to link output slave gpus to the current gpu (v1.1)
Just add the interfaces to attach/detach output slaves, and a linked list to keep track of them. Hook up the randr providers list to include these slaves. v1.1: add another assert to the add path. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
05d2472cd2
commit
382dd45bb8
4 changed files with 33 additions and 0 deletions
|
|
@ -3743,6 +3743,7 @@ static int init_screen(ScreenPtr pScreen, int i, Bool gpu)
|
|||
pScreen->CreateScreenResources = 0;
|
||||
|
||||
xorg_list_init(&pScreen->unattached_list);
|
||||
xorg_list_init(&pScreen->output_slave_list);
|
||||
|
||||
/*
|
||||
* This loop gets run once for every Screen that gets added,
|
||||
|
|
@ -3909,3 +3910,19 @@ DetachUnboundGPU(ScreenPtr slave)
|
|||
slave->current_master = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
AttachOutputGPU(ScreenPtr pScreen, ScreenPtr new)
|
||||
{
|
||||
assert(new->isGPU);
|
||||
assert(!new->current_master);
|
||||
xorg_list_add(&new->output_head, &pScreen->output_slave_list);
|
||||
new->current_master = pScreen;
|
||||
}
|
||||
|
||||
void
|
||||
DetachOutputGPU(ScreenPtr slave)
|
||||
{
|
||||
assert(slave->isGPU);
|
||||
xorg_list_del(&slave->output_head);
|
||||
slave->current_master = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue