Skip to content

Commit ea272ce

Browse files
Veerabadhran Gopalakrishnanalexdeucher
authored andcommitted
amdgpu/nv.c - Added video codec support for Yellow Carp
Added the supported codecs in the video capabilities query. Signed-off-by: Veerabadhran Gopalakrishnan <[email protected]> Reviewed-by: James Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 876d98e commit ea272ce

File tree

1 file changed

+19
-1
lines changed
  • drivers/gpu/drm/amd/amdgpu

1 file changed

+19
-1
lines changed

drivers/gpu/drm/amd/amdgpu/nv.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,19 @@ static const struct amdgpu_video_codecs bg_video_codecs_encode = {
333333
.codec_array = NULL,
334334
};
335335

336+
/* Yellow Carp*/
337+
static const struct amdgpu_video_codec_info yc_video_codecs_decode_array[] = {
338+
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 4096, 4906, 52)},
339+
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC, 8192, 4352, 186)},
340+
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9, 8192, 4352, 0)},
341+
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG, 4096, 4096, 0)},
342+
};
343+
344+
static const struct amdgpu_video_codecs yc_video_codecs_decode = {
345+
.codec_count = ARRAY_SIZE(bg_video_codecs_decode_array),
346+
.codec_array = bg_video_codecs_decode_array,
347+
};
348+
336349
static int nv_query_video_codecs(struct amdgpu_device *adev, bool encode,
337350
const struct amdgpu_video_codecs **codecs)
338351
{
@@ -353,12 +366,17 @@ static int nv_query_video_codecs(struct amdgpu_device *adev, bool encode,
353366
case CHIP_NAVY_FLOUNDER:
354367
case CHIP_DIMGREY_CAVEFISH:
355368
case CHIP_VANGOGH:
356-
case CHIP_YELLOW_CARP:
357369
if (encode)
358370
*codecs = &nv_video_codecs_encode;
359371
else
360372
*codecs = &sc_video_codecs_decode;
361373
return 0;
374+
case CHIP_YELLOW_CARP:
375+
if (encode)
376+
*codecs = &nv_video_codecs_encode;
377+
else
378+
*codecs = &yc_video_codecs_decode;
379+
return 0;
362380
case CHIP_BEIGE_GOBY:
363381
if (encode)
364382
*codecs = &bg_video_codecs_encode;

0 commit comments

Comments
 (0)