Skip to content

Commit 4bdd8c2

Browse files
hkalvalarodrigovivi
authored andcommitted
drm/xe/xe2: Set tile y type in XY_FAST_COPY_BLT to Tile4
Set bits 30 and 31 of XY_FAST_COPY_BLT's dword1 for XeHP and above. Destination or source being Y-Major is selected on dword0 and there's nothing to set on dword1. According to the bspec for Xe2, "Behavior is undefined when programmed the value 0". Also for XeHP, the only value allowed in those bits is 0b11, not being possible to select "Legacy Tile-Y" anymore, only the newer Tile4. So, unconditionally set those bits for graphics IP 12.50 and above. v2: Reword commit message and extend it to graphics version >= 12.50 (Matt Roper) Bspec: 57567 Cc: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Haridhar Kalvala <haridhar.kalvala@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20230929213640.3189912-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent c690f0e commit 4bdd8c2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

drivers/gpu/drm/xe/regs/xe_gpu_commands.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757

5858
#define XY_FAST_COPY_BLT_CMD (2 << 29 | 0x42 << 22)
5959
#define XY_FAST_COPY_BLT_DEPTH_32 (3<<24)
60+
#define XY_FAST_COPY_BLT_D1_SRC_TILE4 REG_BIT(31)
61+
#define XY_FAST_COPY_BLT_D1_DST_TILE4 REG_BIT(30)
6062

6163
#define PVC_MEM_SET_CMD (2 << 29 | 0x5b << 22)
6264
#define PVC_MEM_SET_CMD_LEN_DW 7

drivers/gpu/drm/xe/xe_migrate.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,12 +543,19 @@ static void emit_copy(struct xe_gt *gt, struct xe_bb *bb,
543543
u64 src_ofs, u64 dst_ofs, unsigned int size,
544544
unsigned int pitch)
545545
{
546+
struct xe_device *xe = gt_to_xe(gt);
547+
546548
xe_gt_assert(gt, size / pitch <= S16_MAX);
547549
xe_gt_assert(gt, pitch / 4 <= S16_MAX);
548550
xe_gt_assert(gt, pitch <= U16_MAX);
549551

550552
bb->cs[bb->len++] = XY_FAST_COPY_BLT_CMD | (10 - 2);
551-
bb->cs[bb->len++] = XY_FAST_COPY_BLT_DEPTH_32 | pitch;
553+
if (GRAPHICS_VERx100(xe) >= 1250)
554+
bb->cs[bb->len++] = XY_FAST_COPY_BLT_DEPTH_32 | pitch |
555+
XY_FAST_COPY_BLT_D1_SRC_TILE4 |
556+
XY_FAST_COPY_BLT_D1_DST_TILE4;
557+
else
558+
bb->cs[bb->len++] = XY_FAST_COPY_BLT_DEPTH_32 | pitch;
552559
bb->cs[bb->len++] = 0;
553560
bb->cs[bb->len++] = (size / pitch) << 16 | pitch / 4;
554561
bb->cs[bb->len++] = lower_32_bits(dst_ofs);

0 commit comments

Comments
 (0)