summaryrefslogtreecommitdiff
path: root/lib/intel_batchbuffer.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-01-19 15:15:30 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-02-01 14:19:48 +0100
commit48bdef4f5754e38bdcc5c4510fdcaf0796f0b50c (patch)
treea62fab616638823fcdd9bbb29138d253a0358a8d /lib/intel_batchbuffer.c
parent06c53e9ae44f1759740738d5ea8029594da31e56 (diff)
lib/intel_batchbuffer: Add src/dst delta arguments to igt_blitter_fast_copy too
Nothing uses this currently, but other copy functions have the same delta now. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'lib/intel_batchbuffer.c')
-rw-r--r--lib/intel_batchbuffer.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index 127d8470..7c04ccf3 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -695,12 +695,14 @@ void igt_blitter_fast_copy__raw(int fd,
* igt_blitter_fast_copy:
* @batch: batchbuffer object
* @src: source i-g-t buffer object
+ * @src_delta: offset into the source i-g-t bo
* @src_x: source pixel x-coordination
* @src_y: source pixel y-coordination
* @width: width of the copied rectangle
* @height: height of the copied rectangle
* @bpp: source and destination bits per pixel
* @dst: destination i-g-t buffer object
+ * @dst_delta: offset into the destination i-g-t bo
* @dst_x: destination pixel x-coordination
* @dst_y: destination pixel y-coordination
*
@@ -709,10 +711,12 @@ void igt_blitter_fast_copy__raw(int fd,
* The source and destination surfaces cannot overlap.
*/
void igt_blitter_fast_copy(struct intel_batchbuffer *batch,
- struct igt_buf *src, unsigned src_x, unsigned src_y,
+ struct igt_buf *src, unsigned src_delta,
+ unsigned src_x, unsigned src_y,
unsigned width, unsigned height,
int bpp,
- struct igt_buf *dst, unsigned dst_x, unsigned dst_y)
+ struct igt_buf *dst, unsigned dst_delta,
+ unsigned dst_x, unsigned dst_y)
{
uint32_t src_pitch, dst_pitch;
uint32_t dword0, dword1;
@@ -736,11 +740,11 @@ void igt_blitter_fast_copy(struct intel_batchbuffer *batch,
OUT_BATCH(dword1 | dst_pitch);
OUT_BATCH((dst_y << 16) | dst_x); /* dst x1,y1 */
OUT_BATCH(((dst_y + height) << 16) | (dst_x + width)); /* dst x2,y2 */
- OUT_RELOC(dst->bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
+ OUT_RELOC(dst->bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, dst_delta);
OUT_BATCH(0); /* dst address upper bits */
OUT_BATCH((src_y << 16) | src_x); /* src x1,y1 */
OUT_BATCH(src_pitch);
- OUT_RELOC(src->bo, I915_GEM_DOMAIN_RENDER, 0, 0);
+ OUT_RELOC(src->bo, I915_GEM_DOMAIN_RENDER, 0, src_delta);
OUT_BATCH(0); /* src address upper bits */
ADVANCE_BATCH();