Skip to content

Commit eb9d625

Browse files
bokun-xxmtgalexdeucher
authored andcommitted
drm/amd/amdgpu/vcn: Add RB decouple feature under SRIOV - P3
- Update VCN header for RB decouple feature - Add metadata struct, metadata will be placed after each RB Signed-off-by: Bokun Zhang <[email protected]> Reviewed-by: Leo Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent fc31367 commit eb9d625

File tree

1 file changed

+41
-7
lines changed

1 file changed

+41
-7
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@
169169
#define AMDGPU_VCN_SMU_VERSION_INFO_FLAG (1 << 11)
170170
#define AMDGPU_VCN_SMU_DPM_INTERFACE_FLAG (1 << 11)
171171
#define AMDGPU_VCN_VF_RB_SETUP_FLAG (1 << 14)
172+
#define AMDGPU_VCN_VF_RB_DECOUPLE_FLAG (1 << 15)
173+
174+
#define MAX_NUM_VCN_RB_SETUP 4
172175

173176
#define AMDGPU_VCN_IB_FLAG_DECODE_BUFFER 0x00000001
174177
#define AMDGPU_VCN_CMD_FLAG_MSG_BUFFER 0x00000001
@@ -335,22 +338,42 @@ struct amdgpu_fw_shared {
335338
struct amdgpu_fw_shared_smu_interface_info smu_interface_info;
336339
};
337340

341+
struct amdgpu_vcn_rb_setup_info {
342+
uint32_t rb_addr_lo;
343+
uint32_t rb_addr_hi;
344+
uint32_t rb_size;
345+
};
346+
338347
struct amdgpu_fw_shared_rb_setup {
339348
uint32_t is_rb_enabled_flags;
340-
uint32_t rb_addr_lo;
341-
uint32_t rb_addr_hi;
342-
uint32_t rb_size;
343-
uint32_t rb4_addr_lo;
344-
uint32_t rb4_addr_hi;
345-
uint32_t rb4_size;
346-
uint32_t reserved[6];
349+
350+
union {
351+
struct {
352+
uint32_t rb_addr_lo;
353+
uint32_t rb_addr_hi;
354+
uint32_t rb_size;
355+
uint32_t rb4_addr_lo;
356+
uint32_t rb4_addr_hi;
357+
uint32_t rb4_size;
358+
uint32_t reserved[6];
359+
};
360+
361+
struct {
362+
struct amdgpu_vcn_rb_setup_info rb_info[MAX_NUM_VCN_RB_SETUP];
363+
};
364+
};
347365
};
348366

349367
struct amdgpu_fw_shared_drm_key_wa {
350368
uint8_t method;
351369
uint8_t reserved[3];
352370
};
353371

372+
struct amdgpu_fw_shared_queue_decouple {
373+
uint8_t is_enabled;
374+
uint8_t reserved[7];
375+
};
376+
354377
struct amdgpu_vcn4_fw_shared {
355378
uint32_t present_flag_0;
356379
uint8_t pad[12];
@@ -361,6 +384,8 @@ struct amdgpu_vcn4_fw_shared {
361384
struct amdgpu_fw_shared_rb_setup rb_setup;
362385
struct amdgpu_fw_shared_smu_interface_info smu_dpm_interface;
363386
struct amdgpu_fw_shared_drm_key_wa drm_key_wa;
387+
uint8_t pad3[9];
388+
struct amdgpu_fw_shared_queue_decouple decouple;
364389
};
365390

366391
struct amdgpu_vcn_fwlog {
@@ -378,6 +403,15 @@ struct amdgpu_vcn_decode_buffer {
378403
uint32_t pad[30];
379404
};
380405

406+
struct amdgpu_vcn_rb_metadata {
407+
uint32_t size;
408+
uint32_t present_flag_0;
409+
410+
uint8_t version;
411+
uint8_t ring_id;
412+
uint8_t pad[26];
413+
};
414+
381415
#define VCN_BLOCK_ENCODE_DISABLE_MASK 0x80
382416
#define VCN_BLOCK_DECODE_DISABLE_MASK 0x40
383417
#define VCN_BLOCK_QUEUE_DISABLE_MASK 0xC0

0 commit comments

Comments
 (0)