/**************************************************************************1*2* Copyright 2008-2009 VMware, Inc., Palo Alto, CA., USA3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR18* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,19* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL20* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,21* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR22* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE23* USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/26/*27* Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>28*/2930#ifndef _DRM_GLOBAL_H_31#define _DRM_GLOBAL_H_32enum drm_global_types {33DRM_GLOBAL_TTM_MEM = 0,34DRM_GLOBAL_TTM_BO,35DRM_GLOBAL_TTM_OBJECT,36DRM_GLOBAL_NUM37};3839struct drm_global_reference {40enum drm_global_types global_type;41size_t size;42void *object;43int (*init) (struct drm_global_reference *);44void (*release) (struct drm_global_reference *);45};4647extern void drm_global_init(void);48extern void drm_global_release(void);49extern int drm_global_item_ref(struct drm_global_reference *ref);50extern void drm_global_item_unref(struct drm_global_reference *ref);5152#endif535455