enum gen6_blt_mask value_mask,
enum gen6_blt_mask write_mask)
{
- const uint8_t cmd_len = 5;
+ const uint8_t cmd_len = (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) ? 6 : 5;
const int cpp = gen6_blt_translate_value_cpp(value_mask);
uint32_t *dw;
unsigned pos;
- ILO_DEV_ASSERT(builder->dev, 6, 7.5);
+ ILO_DEV_ASSERT(builder->dev, 6, 8);
assert(width < gen6_blt_max_bytes_per_scanline);
assert(height < gen6_blt_max_scanlines);
gen6_blt_translate_value_mask(value_mask) |
dst->pitch;
dw[2] = height << 16 | width;
- dw[4] = pattern;
- ilo_builder_batch_reloc(builder, pos + 3,
- dst->bo, dst->offset, INTEL_RELOC_WRITE);
+ if (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) {
+ dw[5] = pattern;
+
+ ilo_builder_batch_reloc64(builder, pos + 3,
+ dst->bo, dst->offset, INTEL_RELOC_WRITE);
+ } else {
+ dw[4] = pattern;
+
+ ilo_builder_batch_reloc(builder, pos + 3,
+ dst->bo, dst->offset, INTEL_RELOC_WRITE);
+ }
}
static inline void
enum gen6_blt_mask value_mask,
enum gen6_blt_mask write_mask)
{
- const uint8_t cmd_len = 6;
+ const uint8_t cmd_len = (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) ? 7 : 6;
const int cpp = gen6_blt_translate_value_cpp(value_mask);
int dst_align = 4, dst_pitch_shift = 0;
uint32_t *dw;
unsigned pos;
- ILO_DEV_ASSERT(builder->dev, 6, 7.5);
+ ILO_DEV_ASSERT(builder->dev, 6, 8);
assert(width * cpp < gen6_blt_max_bytes_per_scanline);
assert(height < gen6_blt_max_scanlines);
dst->pitch >> dst_pitch_shift;
dw[2] = dst->y << 16 | dst->x;
dw[3] = (dst->y + height) << 16 | (dst->x + width);
- dw[5] = pattern;
- ilo_builder_batch_reloc(builder, pos + 4,
- dst->bo, dst->offset, INTEL_RELOC_WRITE);
+ if (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) {
+ dw[6] = pattern;
+
+ ilo_builder_batch_reloc64(builder, pos + 4,
+ dst->bo, dst->offset, INTEL_RELOC_WRITE);
+ } else {
+ dw[5] = pattern;
+
+ ilo_builder_batch_reloc(builder, pos + 4,
+ dst->bo, dst->offset, INTEL_RELOC_WRITE);
+ }
}
static inline void
enum gen6_blt_mask value_mask,
enum gen6_blt_mask write_mask)
{
- const uint8_t cmd_len = 6;
+ const uint8_t cmd_len = (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) ? 8 : 6;
const int cpp = gen6_blt_translate_value_cpp(value_mask);
uint32_t *dw;
unsigned pos;
- ILO_DEV_ASSERT(builder->dev, 6, 7.5);
+ ILO_DEV_ASSERT(builder->dev, 6, 8);
assert(width < gen6_blt_max_bytes_per_scanline);
assert(height < gen6_blt_max_scanlines);
dw[0] = GEN6_BLITTER_CMD(SRC_COPY_BLT) |
gen6_blt_translate_write_mask(write_mask) |
(cmd_len - 2);
-
dw[1] = rop << GEN6_BLITTER_BR13_ROP__SHIFT |
gen6_blt_translate_value_mask(value_mask) |
dst->pitch;
-
dw[2] = height << 16 | width;
- dw[4] = src->pitch;
- ilo_builder_batch_reloc(builder, pos + 3,
- dst->bo, dst->offset, INTEL_RELOC_WRITE);
- ilo_builder_batch_reloc(builder, pos + 5, src->bo, src->offset, 0);
+ if (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) {
+ dw[5] = src->pitch;
+
+ ilo_builder_batch_reloc64(builder, pos + 3,
+ dst->bo, dst->offset, INTEL_RELOC_WRITE);
+ ilo_builder_batch_reloc64(builder, pos + 6, src->bo, src->offset, 0);
+ } else {
+ dw[4] = src->pitch;
+
+ ilo_builder_batch_reloc(builder, pos + 3,
+ dst->bo, dst->offset, INTEL_RELOC_WRITE);
+ ilo_builder_batch_reloc(builder, pos + 5, src->bo, src->offset, 0);
+ }
}
static inline void
enum gen6_blt_mask value_mask,
enum gen6_blt_mask write_mask)
{
- const uint8_t cmd_len = 8;
+ const uint8_t cmd_len = (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) ? 10 : 8;
const int cpp = gen6_blt_translate_value_cpp(value_mask);
int dst_align = 4, dst_pitch_shift = 0;
int src_align = 4, src_pitch_shift = 0;
uint32_t *dw;
unsigned pos;
- ILO_DEV_ASSERT(builder->dev, 6, 7.5);
+ ILO_DEV_ASSERT(builder->dev, 6, 8);
assert(width * cpp < gen6_blt_max_bytes_per_scanline);
assert(height < gen6_blt_max_scanlines);
dst->pitch >> dst_pitch_shift;
dw[2] = dst->y << 16 | dst->x;
dw[3] = (dst->y + height) << 16 | (dst->x + width);
- dw[5] = src->y << 16 | src->x;
- dw[6] = src->pitch >> src_pitch_shift;
- ilo_builder_batch_reloc(builder, pos + 4,
- dst->bo, dst->offset, INTEL_RELOC_WRITE);
- ilo_builder_batch_reloc(builder, pos + 7, src->bo, src->offset, 0);
+ if (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) {
+ dw[6] = src->y << 16 | src->x;
+ dw[7] = src->pitch >> src_pitch_shift;
+
+ ilo_builder_batch_reloc64(builder, pos + 4,
+ dst->bo, dst->offset, INTEL_RELOC_WRITE);
+ ilo_builder_batch_reloc64(builder, pos + 8, src->bo, src->offset, 0);
+ } else {
+ dw[5] = src->y << 16 | src->x;
+ dw[6] = src->pitch >> src_pitch_shift;
+
+ ilo_builder_batch_reloc(builder, pos + 4,
+ dst->bo, dst->offset, INTEL_RELOC_WRITE);
+ ilo_builder_batch_reloc(builder, pos + 7, src->bo, src->offset, 0);
+ }
}
#endif /* ILO_BUILDER_BLT_H */