summaryrefslogtreecommitdiff
path: root/lib/intel_batchbuffer.h
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2019-12-04 15:49:11 +0200
committerImre Deak <imre.deak@intel.com>2019-12-09 10:30:01 +0200
commit19052bb86bf158c80123974cc79eb53cba3ef500 (patch)
treea4c66b867bdc77c135e88cdcaadcd3eb2b913709 /lib/intel_batchbuffer.h
parentd999a7c546764cd6c84efd3e55583b69a4d82e9f (diff)
lib: Add vebox copy support
To produce surfaces that are compressed using the media compression format we need to use one of the media engines. The simplest way for this is to use the vebox engine's tiling convert command, so add support for this. v2: - Rebase on latest igt. (Mika) Cc: Mika Kahola <mika.kahola@intel.com> Cc: Brian Welty <brian.welty@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'lib/intel_batchbuffer.h')
-rw-r--r--lib/intel_batchbuffer.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
index 888188f9..37e3affe 100644
--- a/lib/intel_batchbuffer.h
+++ b/lib/intel_batchbuffer.h
@@ -213,6 +213,7 @@ void intel_copy_bo(struct intel_batchbuffer *batch,
enum i915_compression {
I915_COMPRESSION_NONE,
I915_COMPRESSION_RENDER,
+ I915_COMPRESSION_MEDIA,
};
/**
@@ -220,18 +221,20 @@ enum i915_compression {
* @bo: underlying libdrm buffer object
* @stride: stride of the buffer
* @tiling: tiling mode bits
+ * @compression: memory compression mode
* @bpp: bits per pixel, 8, 16 or 32.
* @data: pointer to the memory mapping of the buffer
* @size: size of the buffer object
*
* This is a i-g-t buffer object wrapper structure which augments the baseline
- * libdrm buffer object with suitable data needed by the render copy and the
- * fill functions.
+ * libdrm buffer object with suitable data needed by the render/vebox copy and
+ * the fill functions.
*/
struct igt_buf {
drm_intel_bo *bo;
uint32_t stride;
uint32_t tiling;
+ enum i915_compression compression;
uint32_t bpp;
uint32_t *data;
uint32_t size;
@@ -307,6 +310,29 @@ typedef void (*igt_render_copyfunc_t)(struct intel_batchbuffer *batch,
igt_render_copyfunc_t igt_get_render_copyfunc(int devid);
+
+/**
+ * igt_vebox_copyfunc_t:
+ * @batch: batchbuffer object
+ * @src: source i-g-t buffer object
+ * @width: width of the copied rectangle
+ * @height: height of the copied rectangle
+ * @dst: destination i-g-t buffer object
+ *
+ * This is the type of the per-platform vebox copy functions. The
+ * platform-specific implementation can be obtained by calling
+ * igt_get_vebox_copyfunc().
+ *
+ * A vebox copy function will emit a batchbuffer to the kernel which executes
+ * the specified blit copy operation using the vebox engine.
+ */
+typedef void (*igt_vebox_copyfunc_t)(struct intel_batchbuffer *batch,
+ const struct igt_buf *src,
+ unsigned width, unsigned height,
+ const struct igt_buf *dst);
+
+igt_vebox_copyfunc_t igt_get_vebox_copyfunc(int devid);
+
/**
* igt_fillfunc_t:
* @batch: batchbuffer object