aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/vi.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2021-02-02 11:11:45 -0500
committerAlex Deucher <alexander.deucher@amd.com>2021-02-26 17:23:49 -0500
commit6f786950b1ff051c6dd913b1bb3aaa9b57befcbf (patch)
treeae483eb6352789d5e5930c2f38db12cdf6054de3 /drivers/gpu/drm/amd/amdgpu/vi.c
parentdrm/amdgpu: bump driver version for new video codec INFO ioctl query (diff)
downloadlinux-dev-6f786950b1ff051c6dd913b1bb3aaa9b57befcbf.tar.xz
linux-dev-6f786950b1ff051c6dd913b1bb3aaa9b57befcbf.zip
drm/amdgpu/codec: drop the internal codec index
And just use the ioctl index. They are the same. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vi.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vi.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index c33d46a99b7f..ea338de5818a 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -24,6 +24,8 @@
#include <linux/pci.h>
#include <linux/slab.h>
+#include <drm/amdgpu_drm.h>
+
#include "amdgpu.h"
#include "amdgpu_atombios.h"
#include "amdgpu_ih.h"
@@ -90,7 +92,7 @@ static const struct amdgpu_video_codecs topaz_video_codecs_encode =
static const struct amdgpu_video_codec_info tonga_video_codecs_encode_array[] =
{
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_MPEG4_AVC,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC,
.max_width = 4096,
.max_height = 2304,
.max_pixels_per_frame = 4096 * 2304,
@@ -108,14 +110,14 @@ static const struct amdgpu_video_codecs tonga_video_codecs_encode =
static const struct amdgpu_video_codec_info polaris_video_codecs_encode_array[] =
{
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_MPEG4_AVC,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC,
.max_width = 4096,
.max_height = 2304,
.max_pixels_per_frame = 4096 * 2304,
.max_level = 0,
},
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_HEVC,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC,
.max_width = 4096,
.max_height = 2304,
.max_pixels_per_frame = 4096 * 2304,
@@ -140,28 +142,28 @@ static const struct amdgpu_video_codecs topaz_video_codecs_decode =
static const struct amdgpu_video_codec_info tonga_video_codecs_decode_array[] =
{
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_MPEG2,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2,
.max_width = 4096,
.max_height = 4096,
.max_pixels_per_frame = 4096 * 4096,
.max_level = 3,
},
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_MPEG4,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4,
.max_width = 4096,
.max_height = 4096,
.max_pixels_per_frame = 4096 * 4096,
.max_level = 5,
},
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_MPEG4_AVC,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC,
.max_width = 4096,
.max_height = 4096,
.max_pixels_per_frame = 4096 * 4096,
.max_level = 52,
},
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_VC1,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1,
.max_width = 4096,
.max_height = 4096,
.max_pixels_per_frame = 4096 * 4096,
@@ -179,42 +181,42 @@ static const struct amdgpu_video_codecs tonga_video_codecs_decode =
static const struct amdgpu_video_codec_info cz_video_codecs_decode_array[] =
{
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_MPEG2,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2,
.max_width = 4096,
.max_height = 4096,
.max_pixels_per_frame = 4096 * 4096,
.max_level = 3,
},
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_MPEG4,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4,
.max_width = 4096,
.max_height = 4096,
.max_pixels_per_frame = 4096 * 4096,
.max_level = 5,
},
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_MPEG4_AVC,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC,
.max_width = 4096,
.max_height = 4096,
.max_pixels_per_frame = 4096 * 4096,
.max_level = 52,
},
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_VC1,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1,
.max_width = 4096,
.max_height = 4096,
.max_pixels_per_frame = 4096 * 4096,
.max_level = 4,
},
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_HEVC,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC,
.max_width = 4096,
.max_height = 4096,
.max_pixels_per_frame = 4096 * 4096,
.max_level = 186,
},
{
- .codec_type = AMDGPU_VIDEO_CODEC_TYPE_JPEG,
+ .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG,
.max_width = 4096,
.max_height = 4096,
.max_pixels_per_frame = 4096 * 4096,