Back to index

libdrm  2.4.37
Public Attributes
_drm_intel_bufmgr Struct Reference

Context for a buffer manager instance. More...

#include <intel_bufmgr_priv.h>

List of all members.

Public Attributes

drm_intel_bo *(* bo_alloc )(drm_intel_bufmgr *bufmgr, const char *name, unsigned long size, unsigned int alignment)
 Allocate a buffer object.
drm_intel_bo *(* bo_alloc_for_render )(drm_intel_bufmgr *bufmgr, const char *name, unsigned long size, unsigned int alignment)
 Allocate a buffer object, hinting that it will be used as a render target.
drm_intel_bo *(* bo_alloc_tiled )(drm_intel_bufmgr *bufmgr, const char *name, int x, int y, int cpp, uint32_t *tiling_mode, unsigned long *pitch, unsigned long flags)
 Allocate a tiled buffer object.
void(* bo_reference )(drm_intel_bo *bo)
 Takes a reference on a buffer object.
void(* bo_unreference )(drm_intel_bo *bo)
 Releases a reference on a buffer object, freeing the data if no references remain.
int(* bo_map )(drm_intel_bo *bo, int write_enable)
 Maps the buffer into userspace.
int(* bo_unmap )(drm_intel_bo *bo)
 Reduces the refcount on the userspace mapping of the buffer object.
int(* bo_subdata )(drm_intel_bo *bo, unsigned long offset, unsigned long size, const void *data)
 Write data into an object.
int(* bo_get_subdata )(drm_intel_bo *bo, unsigned long offset, unsigned long size, void *data)
 Read data from an object.
void(* bo_wait_rendering )(drm_intel_bo *bo)
 Waits for rendering to an object by the GPU to have completed.
void(* destroy )(drm_intel_bufmgr *bufmgr)
 Tears down the buffer manager instance.
int(* bo_emit_reloc )(drm_intel_bo *bo, uint32_t offset, drm_intel_bo *target_bo, uint32_t target_offset, uint32_t read_domains, uint32_t write_domain)
 Add relocation entry in reloc_buf, which will be updated with the target buffer's real offset on on command submission.
int(* bo_emit_reloc_fence )(drm_intel_bo *bo, uint32_t offset, drm_intel_bo *target_bo, uint32_t target_offset, uint32_t read_domains, uint32_t write_domain)
int(* bo_exec )(drm_intel_bo *bo, int used, drm_clip_rect_t *cliprects, int num_cliprects, int DR4)
 Executes the command buffer pointed to by bo.
int(* bo_mrb_exec )(drm_intel_bo *bo, int used, drm_clip_rect_t *cliprects, int num_cliprects, int DR4, unsigned flags)
 Executes the command buffer pointed to by bo on the selected ring buffer.
int(* bo_pin )(drm_intel_bo *bo, uint32_t alignment)
 Pin a buffer to the aperture and fix the offset until unpinned.
int(* bo_unpin )(drm_intel_bo *bo)
 Unpin a buffer from the aperture, allowing it to be removed.
int(* bo_set_tiling )(drm_intel_bo *bo, uint32_t *tiling_mode, uint32_t stride)
 Ask that the buffer be placed in tiling mode.
int(* bo_get_tiling )(drm_intel_bo *bo, uint32_t *tiling_mode, uint32_t *swizzle_mode)
 Get the current tiling (and resulting swizzling) mode for the bo.
int(* bo_flink )(drm_intel_bo *bo, uint32_t *name)
 Create a visible name for a buffer which can be used by other apps.
int(* bo_busy )(drm_intel_bo *bo)
 Returns 1 if mapping the buffer for write could cause the process to block, due to the object being active in the GPU.
int(* bo_madvise )(drm_intel_bo *bo, int madv)
 Specify the volatility of the buffer.
int(* check_aperture_space )(drm_intel_bo **bo_array, int count)
int(* bo_disable_reuse )(drm_intel_bo *bo)
 Disable buffer reuse for buffers which will be shared in some way, as with scanout buffers.
int(* bo_is_reusable )(drm_intel_bo *bo)
 Query whether a buffer is reusable.
int(* get_pipe_from_crtc_id )(drm_intel_bufmgr *bufmgr, int crtc_id)
 Return the pipe associated with a crtc_id so that vblank synchronization can use the correct data in the request.
int(* bo_references )(drm_intel_bo *bo, drm_intel_bo *target_bo)
 Returns true if target_bo is in the relocation tree rooted at bo.
int debug

Detailed Description

Context for a buffer manager instance.

Contains public methods followed by private storage for the buffer manager.

Definition at line 42 of file intel_bufmgr_priv.h.


Member Data Documentation

drm_intel_bo*(* _drm_intel_bufmgr::bo_alloc)(drm_intel_bufmgr *bufmgr, const char *name, unsigned long size, unsigned int alignment)

Allocate a buffer object.

Buffer objects are not necessarily initially mapped into CPU virtual address space or graphics device aperture. They must be mapped using bo_map() or drm_intel_gem_bo_map_gtt() to be used by the CPU.

Definition at line 50 of file intel_bufmgr_priv.h.

drm_intel_bo*(* _drm_intel_bufmgr::bo_alloc_for_render)(drm_intel_bufmgr *bufmgr, const char *name, unsigned long size, unsigned int alignment)

Allocate a buffer object, hinting that it will be used as a render target.

This is otherwise the same as bo_alloc.

Definition at line 59 of file intel_bufmgr_priv.h.

drm_intel_bo*(* _drm_intel_bufmgr::bo_alloc_tiled)(drm_intel_bufmgr *bufmgr, const char *name, int x, int y, int cpp, uint32_t *tiling_mode, unsigned long *pitch, unsigned long flags)

Allocate a tiled buffer object.

Alignment for tiled objects is set automatically; the 'flags' argument provides a hint about how the object will be used initially.

Valid tiling formats are: I915_TILING_NONE I915_TILING_X I915_TILING_Y

Note the tiling format may be rejected; callers should check the 'tiling_mode' field on return, as well as the pitch value, which may have been rounded up to accommodate for tiling restrictions.

Definition at line 79 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_busy)(drm_intel_bo *bo)

Returns 1 if mapping the buffer for write could cause the process to block, due to the object being active in the GPU.

Definition at line 229 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_disable_reuse)(drm_intel_bo *bo)

Disable buffer reuse for buffers which will be shared in some way, as with scanout buffers.

When the buffer reference count goes to zero, it will be freed and not placed in the reuse list.

Parameters:
boBuffer to disable reuse for

Definition at line 254 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_emit_reloc)(drm_intel_bo *bo, uint32_t offset, drm_intel_bo *target_bo, uint32_t target_offset, uint32_t read_domains, uint32_t write_domain)

Add relocation entry in reloc_buf, which will be updated with the target buffer's real offset on on command submission.

Relocations remain in place for the lifetime of the buffer object.

Parameters:
boBuffer to write the relocation into.
offsetByte offset within reloc_bo of the pointer to target_bo.
target_boBuffer whose offset should be written into the relocation entry.
target_offsetConstant value to be added to target_bo's offset in relocation entry.
read_domainsGEM read domains which the buffer will be read into by the command that this relocation is part of.
write_domainsGEM read domains which the buffer will be dirtied in by the command that this relocation is part of.

Definition at line 162 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_emit_reloc_fence)(drm_intel_bo *bo, uint32_t offset, drm_intel_bo *target_bo, uint32_t target_offset, uint32_t read_domains, uint32_t write_domain)

Definition at line 165 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_exec)(drm_intel_bo *bo, int used, drm_clip_rect_t *cliprects, int num_cliprects, int DR4)

Executes the command buffer pointed to by bo.

Definition at line 172 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_flink)(drm_intel_bo *bo, uint32_t *name)

Create a visible name for a buffer which can be used by other apps.

Parameters:
bufBuffer to create a name for
nameReturned name

Definition at line 223 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_get_subdata)(drm_intel_bo *bo, unsigned long offset, unsigned long size, void *data)

Read data from an object.

This is an optional function, if missing, drm_intel_bo will map/memcpy/unmap.

Definition at line 125 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_get_tiling)(drm_intel_bo *bo, uint32_t *tiling_mode, uint32_t *swizzle_mode)

Get the current tiling (and resulting swizzling) mode for the bo.

Parameters:
bufBuffer to get tiling mode for
tiling_modereturned tiling mode
swizzle_modereturned swizzling mode

Definition at line 214 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_is_reusable)(drm_intel_bo *bo)

Query whether a buffer is reusable.

Parameters:
boBuffer to query

Definition at line 261 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_madvise)(drm_intel_bo *bo, int madv)

Specify the volatility of the buffer.

Parameters:
boBuffer to create a name for
madvThe purgeable status

Use I915_MADV_DONTNEED to mark the buffer as purgeable, and it will be reclaimed under memory pressure. If you subsequently require the buffer, then you must pass I915_MADV_WILLNEED to mark the buffer as required.

Returns 1 if the buffer was retained, or 0 if it was discarded whilst marked as I915_MADV_DONTNEED.

Definition at line 243 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_map)(drm_intel_bo *bo, int write_enable)

Maps the buffer into userspace.

This function will block waiting for any existing execution on the buffer to complete, first. The resulting mapping is available at buf->virtual.

Definition at line 102 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_mrb_exec)(drm_intel_bo *bo, int used, drm_clip_rect_t *cliprects, int num_cliprects, int DR4, unsigned flags)

Executes the command buffer pointed to by bo on the selected ring buffer.

Definition at line 179 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_pin)(drm_intel_bo *bo, uint32_t alignment)

Pin a buffer to the aperture and fix the offset until unpinned.

Parameters:
bufBuffer to pin
alignmentRequired alignment for aperture, in bytes

Definition at line 189 of file intel_bufmgr_priv.h.

void(* _drm_intel_bufmgr::bo_reference)(drm_intel_bo *bo)

Takes a reference on a buffer object.

Definition at line 87 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_references)(drm_intel_bo *bo, drm_intel_bo *target_bo)

Returns true if target_bo is in the relocation tree rooted at bo.

Enables verbose debugging printouts

Definition at line 277 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_set_tiling)(drm_intel_bo *bo, uint32_t *tiling_mode, uint32_t stride)

Ask that the buffer be placed in tiling mode.

Parameters:
bufBuffer to set tiling mode for
tiling_modedesired, and returned tiling mode

Definition at line 204 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_subdata)(drm_intel_bo *bo, unsigned long offset, unsigned long size, const void *data)

Write data into an object.

This is an optional function, if missing, drm_intel_bo will map/memcpy/unmap.

Definition at line 116 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_unmap)(drm_intel_bo *bo)

Reduces the refcount on the userspace mapping of the buffer object.

Definition at line 108 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::bo_unpin)(drm_intel_bo *bo)

Unpin a buffer from the aperture, allowing it to be removed.

Parameters:
bufBuffer to unpin

Definition at line 196 of file intel_bufmgr_priv.h.

void(* _drm_intel_bufmgr::bo_unreference)(drm_intel_bo *bo)

Releases a reference on a buffer object, freeing the data if no references remain.

Definition at line 93 of file intel_bufmgr_priv.h.

void(* _drm_intel_bufmgr::bo_wait_rendering)(drm_intel_bo *bo)

Waits for rendering to an object by the GPU to have completed.

This is not required for any access to the BO by bo_map, bo_subdata, etc. It is merely a way for the driver to implement glFinish.

Definition at line 135 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::check_aperture_space)(drm_intel_bo **bo_array, int count)

Definition at line 245 of file intel_bufmgr_priv.h.

Definition at line 280 of file intel_bufmgr_priv.h.

void(* _drm_intel_bufmgr::destroy)(drm_intel_bufmgr *bufmgr)

Tears down the buffer manager instance.

Definition at line 140 of file intel_bufmgr_priv.h.

int(* _drm_intel_bufmgr::get_pipe_from_crtc_id)(drm_intel_bufmgr *bufmgr, int crtc_id)

Return the pipe associated with a crtc_id so that vblank synchronization can use the correct data in the request.

This is only supported for KMS and gem at this point, when unsupported, this function returns -1 and leaves the decision of what to do in that case to the caller

Parameters:
bufmgrthe associated buffer manager
crtc_idthe crtc identifier

Definition at line 274 of file intel_bufmgr_priv.h.


The documentation for this struct was generated from the following file: