1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright 2025 Advanced Micro Devices, Inc.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 */
23
24/* Define the cleaner shader gfx_10_1_10 */
25static const u32 gfx_10_1_10_cleaner_shader_hex[] = {
26 0xb0804004, 0xbf8a0000,
27 0xbf068100, 0xbf840023,
28 0xbe8203b8, 0xbefc0380,
29 0x7e008480, 0x7e028480,
30 0x7e048480, 0x7e068480,
31 0x7e088480, 0x7e0a8480,
32 0x7e0c8480, 0x7e0e8480,
33 0xbefc0302, 0x80828802,
34 0xbf84fff5, 0xbe8203ff,
35 0x80000000, 0x87020102,
36 0xbf840012, 0xbefe03c1,
37 0xbeff03c1, 0xd7650001,
38 0x0001007f, 0xd7660001,
39 0x0002027e, 0x16020288,
40 0xbe8203bf, 0xbefc03c1,
41 0xd9382000, 0x00020201,
42 0xd9386040, 0x00040401,
43 0xd70f6a01, 0x000202ff,
44 0x00000400, 0x80828102,
45 0xbf84fff7, 0xbefc03ff,
46 0x00000068, 0xbe803000,
47 0xbe813000, 0xbe823000,
48 0xbe833000, 0x80fc847c,
49 0xbf84fffa, 0xbeea0480,
50 0xbeec0480, 0xbeee0480,
51 0xbef00480, 0xbef20480,
52 0xbef40480, 0xbef60480,
53 0xbef80480, 0xbefa0480,
54 0xbf810000, 0xbf9f0000,
55 0xbf9f0000, 0xbf9f0000,
56 0xbf9f0000, 0xbf9f0000,
57};
58
59/* Define the cleaner shader gfx_10_3_0 */
60static const u32 gfx_10_3_0_cleaner_shader_hex[] = {
61 0xb0804004, 0xbf8a0000,
62 0xbe8203b8, 0xbefc0380,
63 0x7e008480, 0x7e028480,
64 0x7e048480, 0x7e068480,
65 0x7e088480, 0x7e0a8480,
66 0x7e0c8480, 0x7e0e8480,
67 0xbefc0302, 0x80828802,
68 0xbf84fff5, 0xbe8203ff,
69 0x80000000, 0x87020002,
70 0xbf840012, 0xbefe03c1,
71 0xbeff03c1, 0xd7650001,
72 0x0001007f, 0xd7660001,
73 0x0002027e, 0x16020288,
74 0xbe8203bf, 0xbefc03c1,
75 0xd9382000, 0x00020201,
76 0xd9386040, 0x00040401,
77 0xd70f6a01, 0x000202ff,
78 0x00000400, 0x80828102,
79 0xbf84fff7, 0xbefc03ff,
80 0x00000068, 0xbe803080,
81 0xbe813080, 0xbe823080,
82 0xbe833080, 0x80fc847c,
83 0xbf84fffa, 0xbeea0480,
84 0xbeec0480, 0xbeee0480,
85 0xbef00480, 0xbef20480,
86 0xbef40480, 0xbef60480,
87 0xbef80480, 0xbefa0480,
88 0xbf810000, 0xbf9f0000,
89 0xbf9f0000, 0xbf9f0000,
90 0xbf9f0000, 0xbf9f0000,
91};
92

source code of linux/drivers/gpu/drm/amd/amdgpu/gfx_v10_0_cleaner_shader.h