1
1
/**************************************************************************
3
3
* Copyright 2011 Advanced Micro Devices, Inc.
6
* Permission is hereby granted, free of charge, to any person obtaining a
7
* copy of this software and associated documentation files (the
8
* "Software"), to deal in the Software without restriction, including
9
* without limitation the rights to use, copy, modify, merge, publish,
10
* distribute, sub license, and/or sell copies of the Software, and to
11
* permit persons to whom the Software is furnished to do so, subject to
12
* the following conditions:
14
* The above copyright notice and this permission notice (including the
15
* next paragraph) shall be included in all copies or substantial portions
18
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21
* IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR
22
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5
* SPDX-License-Identifier: MIT
26
7
**************************************************************************/
122
103
const struct pipe_video_codec *templ)
124
105
struct si_context *ctx = (struct si_context *)context;
125
bool vcn = ctx->family >= CHIP_RAVEN;
106
bool vcn = ctx->vcn_ip_ver >= VCN_1_0_0;
127
108
if (templ->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
119
if (ctx->vcn_ip_ver == VCN_4_0_0)
120
ctx->vcn_has_ctx = true;
138
122
return (vcn) ? radeon_create_decoder(context, templ)
139
123
: si_common_uvd_create_decoder(context, templ, si_uvd_set_dtb);