drm/legacy: place all drm legacy members under DRM_LEGACY.
This places a bunch of the legacy members of drm_device into only being there when legacy is enabled. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
61ae227032
commit
83c163f7eb
2 changed files with 11 additions and 1 deletions
|
@ -72,6 +72,7 @@ int drm_legacy_getsareactx(struct drm_device *d, void *v, struct drm_file *f);
|
||||||
|
|
||||||
#define DRM_MAP_HASH_OFFSET 0x10000000
|
#define DRM_MAP_HASH_OFFSET 0x10000000
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_DRM_LEGACY)
|
||||||
static inline int drm_legacy_create_map_hash(struct drm_device *dev)
|
static inline int drm_legacy_create_map_hash(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
return drm_ht_create(&dev->map_hash, 12);
|
return drm_ht_create(&dev->map_hash, 12);
|
||||||
|
@ -81,6 +82,14 @@ static inline void drm_legacy_remove_map_hash(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
drm_ht_remove(&dev->map_hash);
|
drm_ht_remove(&dev->map_hash);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static inline int drm_legacy_create_map_hash(struct drm_device *dev)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void drm_legacy_remove_map_hash(struct drm_device *dev) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_DRM_LEGACY)
|
#if IS_ENABLED(CONFIG_DRM_LEGACY)
|
||||||
|
|
|
@ -306,7 +306,7 @@ struct drm_device {
|
||||||
|
|
||||||
/* Everything below here is for legacy driver, never use! */
|
/* Everything below here is for legacy driver, never use! */
|
||||||
/* private: */
|
/* private: */
|
||||||
|
#if IS_ENABLED(CONFIG_DRM_LEGACY)
|
||||||
/* Context handle management - linked list of context handles */
|
/* Context handle management - linked list of context handles */
|
||||||
struct list_head ctxlist;
|
struct list_head ctxlist;
|
||||||
|
|
||||||
|
@ -353,6 +353,7 @@ struct drm_device {
|
||||||
|
|
||||||
/* Scatter gather memory */
|
/* Scatter gather memory */
|
||||||
struct drm_sg_mem *sg;
|
struct drm_sg_mem *sg;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue