diff options
author | Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com> | 2021-07-13 20:51:43 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-07-16 20:46:09 +0300 |
commit | 9075096b09e5905ccaa7f7be548593a6530e097f (patch) | |
tree | 760ac1543467366a56604fe4ca6dad7b9e43da79 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | 554398174d98364ea91a7a9aa6866d65ea72d0da (diff) | |
download | linux-9075096b09e5905ccaa7f7be548593a6530e097f.tar.xz |
amdgpu/nv.c - Optimize code for video codec support structure
Optimized the code for codec info structure initialization
Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index c0316eaba547..8ac6eb9f1fdb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -619,6 +619,13 @@ struct amdgpu_video_codec_info { u32 max_level; }; +#define codec_info_build(type, width, height, level) \ + .codec_type = type,\ + .max_width = width,\ + .max_height = height,\ + .max_pixels_per_frame = height * width,\ + .max_level = level, + struct amdgpu_video_codecs { const u32 codec_count; const struct amdgpu_video_codec_info *codec_array; |