Benign repos Download

vcn_v3_0.c

Assigns a negative errno constantCopies bytes with native memcpy
SHA-256dc43e5e525902d2ca4ea27b56e1259ecf60df070b468bf93fd76383d42022a73

Evidence

imports amdgpu.h lines 18–43
18:67… RWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
24#include <linux/firmware.h>
25#include "amdgpu.h"
26#include "amdgpu_vcn.h"
27#include "amdgpu_pm.h"
28#include "amdgpu_cs.h"
29#include "soc15.h"
30#include "soc15d.h"
31#include "vcn_v2_0.h"
32#include "mmsch_v3_0.h"
33#include "vcn_sw_ring.h"
34
35#include "vcn/vcn_3_0_0_offset.h"
36#include "vcn/vcn_3_0_0_sh_mask.h"
37#include "ivsrcid/vcn/irqsrcs_vcn_2_0.h"
38
39#include <drm/drm_drv.h>
40
41#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00
42#define VCN1_VID_SOC_ADDRESS_3_0 0x48200
43#defin …
Kernel error code return lines 137–145
137:10…
138 if (adev->vcn.harvest_config == (AMDGPU_VCN_HARVEST_VCN0 |
139 AMDGPU_VCN_HARVEST_VCN1))
140 /* both instances are harvested, disable the block */
141 return -ENOENT;
142
143 for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
144 if (amdgpu_ip_version(adev, UVD_HWIP, 0) ==
145 IP_VERSION(3, 0, 33))
Uses a large-bound native loop lines 1283–1296
⋯4 lines
1287 uint32_t status;
1288
1289 for (k = 0; k < 100; ++k) {
1290 status = RREG32_SOC15(VCN, i, mmUVD_STATUS);
1291 if (status & 2)
⋯5 lines
Copies bytes with native memcpy lines 1540–1545
1540:27… h_v3_0_init_header);
1541 table_loc = (uint32_t *)table->cpu_addr;
1542 memcpy((void *)table_loc, &header, size);
1543
1544 /* message MMSCH (in VCN[0]) to initialize this client
1545 * 1, write to mmsch_vf_ctx_addr_l …
Assigns a negative errno constant lines 1947–1959
1947:13… addr - start;
1948
1949 /* Check length */
1950 if (msg[1] > end - addr) {
1951 r = -EINVAL;
1952 goto out;
1953 }
⋯6 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.