diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-13 14:27:42 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-06 22:16:13 +0100 |
commit | 4caad34c932115dc0a9fd9c2995ebb2d38b9359c (patch) | |
tree | b79aa46d4331338008244068b0ad42fd15275fe2 /dix | |
parent | 9b5cf2ed76b00937af12304e0e8dbd60df62067e (diff) |
dix: add unattached list for attaching screens to initially. (v1.1)
This list is meant for attaching unbound gpu screens to initially,
before the client side rebinds them.
v1.1: add another assert in 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>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/dispatch.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c index fa397285c..9e8462124 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3742,6 +3742,8 @@ static int init_screen(ScreenPtr pScreen, int i, Bool gpu) pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ pScreen->CreateScreenResources = 0; + xorg_list_init(&pScreen->unattached_list); + /* * This loop gets run once for every Screen that gets added, * but thats ok. If the ddx layer initializes the formats @@ -3889,3 +3891,21 @@ RemoveGPUScreen(ScreenPtr pScreen) free(pScreen); } + +void +AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr new) +{ + assert(new->isGPU); + assert(!new->current_master); + xorg_list_add(&new->unattached_head, &pScreen->unattached_list); + new->current_master = pScreen; +} + +void +DetachUnboundGPU(ScreenPtr slave) +{ + assert(slave->isGPU); + xorg_list_del(&slave->unattached_head); + slave->current_master = NULL; +} + |