X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=intel%2Fintel_bufmgr_priv.h;h=59ebd18605cca9d2d605fba5bad2cfb1ffab0442;hb=c09dcbc736afb2e6a05d4cfc5c3d878ace43e2ba;hp=febee0f7267267f441a1285ef2cbf08a131f1129;hpb=10ce0ec18806ae32a5d615c693626a085b0dd7b8;p=platform%2Fupstream%2Flibdrm.git diff --git a/intel/intel_bufmgr_priv.h b/intel/intel_bufmgr_priv.h index febee0f..59ebd18 100644 --- a/intel/intel_bufmgr_priv.h +++ b/intel/intel_bufmgr_priv.h @@ -62,6 +62,18 @@ struct _drm_intel_bufmgr { unsigned int alignment); /** + * Allocate a buffer object from an existing user accessible + * address malloc'd with the provided size. + * Alignment is used when mapping to the gtt. + * Flags may be I915_VMAP_READ_ONLY or I915_USERPTR_UNSYNCHRONIZED + */ + drm_intel_bo *(*bo_alloc_userptr)(drm_intel_bufmgr *bufmgr, + const char *name, void *addr, + uint32_t tiling_mode, uint32_t stride, + unsigned long size, + unsigned long flags); + + /** * Allocate a tiled buffer object. * * Alignment for tiled objects is set automatically; the 'flags' @@ -162,12 +174,24 @@ struct _drm_intel_bufmgr { 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); + 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); /** Executes the command buffer pointed to by bo. */ 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 on the selected + * ring buffer + */ + int (*bo_mrb_exec) (drm_intel_bo *bo, int used, + drm_clip_rect_t *cliprects, int num_cliprects, + int DR4, unsigned flags); + /** * Pin a buffer to the aperture and fix the offset until unpinned * @@ -242,6 +266,13 @@ struct _drm_intel_bufmgr { int (*bo_disable_reuse) (drm_intel_bo *bo); /** + * Query whether a buffer is reusable. + * + * \param bo Buffer to query + */ + int (*bo_is_reusable) (drm_intel_bo *bo); + + /** * * Return the pipe associated with a crtc_id so that vblank * synchronization can use the correct data in the request. @@ -261,6 +292,11 @@ struct _drm_intel_bufmgr { int debug; }; +struct _drm_intel_context { + unsigned int ctx_id; + struct _drm_intel_bufmgr *bufmgr; +}; + #define ALIGN(value, alignment) ((value + alignment - 1) & ~(alignment - 1)) #define ROUND_UP_TO(x, y) (((x) + (y) - 1) / (y) * (y)) #define ROUND_UP_TO_MB(x) ROUND_UP_TO((x), 1024*1024)