~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gallium/drivers/radeonsi/si_uvd.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**************************************************************************
2
2
 *
3
3
 * Copyright 2011 Advanced Micro Devices, Inc.
4
 
 * All Rights Reserved.
5
 
 *
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:
13
 
 *
14
 
 * The above copyright notice and this permission notice (including the
15
 
 * next paragraph) shall be included in all copies or substantial portions
16
 
 * of the Software.
17
 
 *
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.
 
4
 *
 
5
 * SPDX-License-Identifier: MIT
25
6
 *
26
7
 **************************************************************************/
27
8
 
122
103
                                               const struct pipe_video_codec *templ)
123
104
{
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;
126
107
 
127
108
   if (templ->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
128
109
      if (vcn) {
135
116
      }
136
117
   }
137
118
 
 
119
   if (ctx->vcn_ip_ver == VCN_4_0_0)
 
120
      ctx->vcn_has_ctx = true;
 
121
 
138
122
   return (vcn) ? radeon_create_decoder(context, templ)
139
123
                : si_common_uvd_create_decoder(context, templ, si_uvd_set_dtb);
140
124
}