dix: Add dixPrivatesCreated helper function

This is a preparation patch for adding prime hw-cursor support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
Dave Airlie 2016-09-06 12:50:14 +02:00 committed by Hans de Goede
parent 3fe4107643
commit a52530a655
2 changed files with 12 additions and 0 deletions

View File

@ -783,3 +783,12 @@ dixResetPrivates(void)
global_keys[t].allocated = 0;
}
}
Bool
dixPrivatesCreated(DevPrivateType type)
{
if (global_keys[type].created)
return TRUE;
else
return FALSE;
}

View File

@ -252,6 +252,9 @@ dixFreeScreenSpecificPrivates(ScreenPtr pScreen);
extern void
dixInitScreenSpecificPrivates(ScreenPtr pScreen);
/* is this private created - so hotplug can avoid crashing */
Bool dixPrivatesCreated(DevPrivateType type);
extern _X_EXPORT void *
_dixAllocateScreenObjectWithPrivates(ScreenPtr pScreen,
unsigned size,