3#ifndef DRM_GEM_VRAM_HELPER_H
4#define DRM_GEM_VRAM_HELPER_H
11#include <drm/ttm/ttm_bo.h>
12#include <drm/ttm/ttm_placement.h>
23#define DRM_GEM_VRAM_PL_FLAG_SYSTEM (1 << 0)
24#define DRM_GEM_VRAM_PL_FLAG_VRAM (1 << 1)
25#define DRM_GEM_VRAM_PL_FLAG_TOPDOWN (1 << 2)
52 struct ttm_buffer_object
bo;
75 struct ttm_buffer_object *
bo)
94 unsigned long pg_align);
103 unsigned long pg_align,
104 unsigned long pitch_align,
133#define DRM_GEM_VRAM_PLANE_HELPER_FUNCS \
134 .prepare_fb = drm_gem_vram_plane_helper_prepare_fb, \
135 .cleanup_fb = drm_gem_vram_plane_helper_cleanup_fb
144#define DRM_GEM_VRAM_DRIVER \
145 .debugfs_init = drm_vram_mm_debugfs_init, \
146 .dumb_create = drm_gem_vram_driver_dumb_create, \
147 .dumb_map_offset = drm_gem_ttm_dumb_map_offset
179static inline struct drm_vram_mm *drm_vram_mm_of_bdev(
180 struct ttm_device *
bdev)
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
#define container_of(ptr, type, member)
Definition container_of.h:19
int map
Definition d_mode.c:31
size_t size
Definition drm_bridge.h:1299
int drm_gem_vram_driver_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args)
int drm_gem_vram_vmap(struct drm_gem_vram_object *gbo, struct iosys_map *map)
void drm_gem_vram_put(struct drm_gem_vram_object *gbo)
int drm_gem_vram_fill_create_dumb(struct drm_file *file, struct drm_device *dev, unsigned long pg_align, unsigned long pitch_align, struct drm_mode_create_dumb *args)
enum drm_mode_status drm_vram_helper_mode_valid(struct drm_device *dev, const struct drm_display_mode *mode)
void drm_gem_vram_vunmap(struct drm_gem_vram_object *gbo, struct iosys_map *map)
void drm_vram_mm_debugfs_init(struct drm_minor *minor)
s64 drm_gem_vram_offset(struct drm_gem_vram_object *gbo)
struct drm_gem_vram_object * drm_gem_vram_create(struct drm_device *dev, size_t size, unsigned long pg_align)
void drm_gem_vram_plane_helper_cleanup_fb(struct drm_plane *plane, struct drm_plane_state *old_state)
int drmm_vram_helper_init(struct drm_device *dev, uint64_t vram_base, size_t vram_size)
int drm_gem_vram_plane_helper_prepare_fb(struct drm_plane *plane, struct drm_plane_state *new_state)
drm_mode_status
Definition drm_modes.h:91
struct drm_plane * plane
Definition drm_plane.h:828
const struct device * dev
Definition drm_print.h:519
int64_t s64
Definition kernel.h:21
const char const char va_list args
Definition seq_buf.h:182
Definition drm_device.h:75
Definition drm_modes.h:252
Definition drm_file.h:165
Definition drm_gem_vram_helper.h:51
unsigned int vmap_use_count
Definition drm_gem_vram_helper.h:61
struct iosys_map map
Definition drm_gem_vram_helper.h:53
struct ttm_placement placement
Definition drm_gem_vram_helper.h:64
struct ttm_buffer_object bo
Definition drm_gem_vram_helper.h:52
struct ttm_place placements[2]
Definition drm_gem_vram_helper.h:65
Definition drm_mode.h:1249
Definition drm_plane.h:54
Definition drm_plane.h:641
Definition drm_gem_vram_helper.h:164
struct ttm_device bdev
Definition drm_gem_vram_helper.h:168
uint64_t vram_base
Definition drm_gem_vram_helper.h:165
size_t vram_size
Definition drm_gem_vram_helper.h:166
Definition iosys-map.h:109