mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
radeonsi/vcn: Enable VCN4 AV1 encode WA
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31889>
(cherry picked from commit c9ade8c3b5)
This commit is contained in:
parent
904c9d6464
commit
85cfa40dcc
3 changed files with 10 additions and 2 deletions
|
|
@ -204,7 +204,7 @@
|
|||
"description": "radeonsi/vcn: Enable VCN4 AV1 encode WA",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ typedef struct rvcn_enc_session_init_s {
|
|||
uint32_t pre_encode_chroma_enabled;
|
||||
uint32_t slice_output_enabled;
|
||||
uint32_t display_remote;
|
||||
uint32_t WA_flags;
|
||||
} rvcn_enc_session_init_t;
|
||||
|
||||
typedef struct rvcn_enc_layer_control_s {
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ static void radeon_enc_op_preset(struct radeon_encoder *enc)
|
|||
|
||||
static void radeon_enc_session_init(struct radeon_encoder *enc)
|
||||
{
|
||||
struct si_screen *sscreen = (struct si_screen *)enc->screen;
|
||||
uint32_t av1_height = enc->enc_pic.pic_height_in_luma_samples;
|
||||
|
||||
switch (u_reduce_video_profile(enc->base.profile)) {
|
||||
|
|
@ -122,6 +123,12 @@ static void radeon_enc_session_init(struct radeon_encoder *enc)
|
|||
enc->enc_pic.render_width) ||
|
||||
(enc->enc_pic.session_init.aligned_picture_height !=
|
||||
enc->enc_pic.render_height);
|
||||
|
||||
if (sscreen->info.vcn_ip_version == VCN_4_0_2 ||
|
||||
sscreen->info.vcn_ip_version == VCN_4_0_5 ||
|
||||
sscreen->info.vcn_ip_version == VCN_4_0_6)
|
||||
enc->enc_pic.session_init.WA_flags = 1;
|
||||
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
|
|
@ -143,7 +150,7 @@ static void radeon_enc_session_init(struct radeon_encoder *enc)
|
|||
RADEON_ENC_CS(enc->enc_pic.session_init.pre_encode_chroma_enabled);
|
||||
RADEON_ENC_CS(enc->enc_pic.session_init.slice_output_enabled);
|
||||
RADEON_ENC_CS(enc->enc_pic.session_init.display_remote);
|
||||
RADEON_ENC_CS(0);
|
||||
RADEON_ENC_CS(enc->enc_pic.session_init.WA_flags);
|
||||
RADEON_ENC_END();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue