-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(kernel-rolling) (FTBFS) gpu: Add Support for JM9100 GPU #170
(kernel-rolling) (FTBFS) gpu: Add Support for JM9100 GPU #170
Conversation
Hi @MingcongBai. Thanks for your PR. I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add Jemoic JM9100 GPU driver support. Signed-off-by: WangYuli <[email protected]>
The code styles of this driver is quite frightening. These files are littered with unaligned comments, redundant braces, misspellings and other inelegant and undisciplined code which makes the whole driver has a huge obstacle before becoming acceptable. We cannot let this get the way of jemoic GPU. Signed-off-by: WangYuli <[email protected]>
eb80712
to
2e8b96f
Compare
Fails to build on all architectures: drivers/gpu/drm/mwv207/mwv207_sched.c: In function ‘mwv207_sched_create’:
drivers/gpu/drm/mwv207/mwv207_sched.c:242:63: error: passing argument 3 of ‘drm_sched_init’ makes pointer from integer without a cast [-Werror=int-conversion]
242 | ret = drm_sched_init(&sched->base, &mwv207_sched_ops, hw_submission, hang_limit,
| ^~~~~~~~~~~~~
| |
| unsigned int
In file included from drivers/gpu/drm/mwv207/mwv207_sched.c:16:
./include/drm/gpu_scheduler.h:547:45: note: expected ‘struct workqueue_struct *’ but argument is of type ‘unsigned int’
547 | struct workqueue_struct *submit_wq,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
drivers/gpu/drm/mwv207/mwv207_submit.c: In function ‘mwv207_submit_ioctl’:
In file included from ./include/uapi/linux/posix_types.h:5,
from ./include/uapi/linux/types.h:14,
from ./include/linux/types.h:6,
from ./include/linux/kasan-checks.h:5,
from ./include/asm-generic/rwonce.h:26,
from ./arch/x86/include/generated/asm/rwonce.h:1,
from ./include/linux/compiler.h:251,
from ./include/linux/build_bug.h:5,
from ./include/linux/init.h:5,
from ./include/linux/moduleparam.h:5,
from drivers/gpu/drm/mwv207/mwv207_sched.c:15:
./include/linux/stddef.h:8:14: error: passing argument 6 of ‘drm_sched_init’ makes integer from pointer without a cast [-Werror=int-conversion]
8 | #define NULL ((void *)0)
| ^~~~~~~~~~~
| |
| void *
drivers/gpu/drm/mwv207/mwv207_sched.c:244:25: note: in expansion of macro ‘NULL’
244 | NULL, NULL,
| ^~~~
./include/drm/gpu_scheduler.h:548:64: note: expected ‘unsigned int’ but argument is of type ‘void *’
548 | u32 num_rqs, u32 credit_limit, unsigned int hang_limit,
| ~~~~~~~~~~~~~^~~~~~~~~~
./include/linux/stddef.h:8:14: error: passing argument 7 of ‘drm_sched_init’ makes integer from pointer without a cast [-Werror=int-conversion]
8 | #define NULL ((void *)0)
| ^~~~~~~~~~~
| |
| void *
drivers/gpu/drm/mwv207/mwv207_sched.c:244:25: note: in expansion of macro ‘NULL’
244 | NULL, NULL,
| ^~~~
./include/drm/gpu_scheduler.h:548:64: note: expected ‘unsigned int’ but argument is of type ‘void *’
548 | u32 num_rqs, u32 credit_limit, unsigned int hang_limit,
| ~~~~~~~~~~~~~^~~~~~~~~~
./include/linux/stddef.h:8:14: error: passing argument 7 of ‘drm_sched_init’ makes integer from pointer without a cast [-Werror=int-conversion]
8 | #define NULL ((void *)0)
| ^~~~~~~~~~~
| |
| void *
drivers/gpu/drm/mwv207/mwv207_sched.c:244:31: note: in expansion of macro ‘NULL’
244 | NULL, NULL,
| ^~~~
./include/drm/gpu_scheduler.h:549:25: note: expected ‘long int’ but argument is of type ‘void *’
549 | long timeout, struct workqueue_struct *timeout_wq,
| ~~~~~^~~~~~~
drivers/gpu/drm/mwv207/mwv207_submit.c:599:72: error: passing argument 3 of ‘drm_sched_job_init’ makes integer from pointer without a cast [-Werror=int-conversion]
599 | ret = drm_sched_job_init(&mjob->base, mjob->engine_entity, mjob->ctx);
| ~~~~^~~~~
| |
| struct mwv207_ctx *
drivers/gpu/drm/mwv207/mwv207_sched.c:245:29: error: passing argument 8 of ‘drm_sched_init’ from incompatible pointer type [-Werror=incompatible-pointer-types]
245 | pipe->fname, jdev->dev);
| ~~~~^~~~~~~
| |
| const char *
./include/drm/gpu_scheduler.h:549:59: note: expected ‘struct workqueue_struct *’ but argument is of type ‘const char *’
549 | long timeout, struct workqueue_struct *timeout_wq,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from drivers/gpu/drm/mwv207/mwv207_sched.h:17,
from drivers/gpu/drm/mwv207/mwv207_submit.c:20:
./include/drm/gpu_scheduler.h:555:28: note: expected ‘u32’ {aka ‘unsigned int’} but argument is of type ‘struct mwv207_ctx *’
555 | u32 credits, void *owner);
| ~~~~^~~~~~~
drivers/gpu/drm/mwv207/mwv207_sched.c:245:42: error: passing argument 9 of ‘drm_sched_init’ from incompatible pointer type [-Werror=incompatible-pointer-types]
245 | pipe->fname, jdev->dev);
| ~~~~^~~~~
| |
| struct device *
./include/drm/gpu_scheduler.h:550:30: note: expected ‘atomic_t *’ but argument is of type ‘struct device *’
550 | atomic_t *score, const char *name, struct device *dev);
| ~~~~~~~~~~^~~~~
drivers/gpu/drm/mwv207/mwv207_sched.c:242:15: error: too few arguments to function ‘drm_sched_init’
242 | ret = drm_sched_init(&sched->base, &mwv207_sched_ops, hw_submission, hang_limit,
| ^~~~~~~~~~~~~~
./include/drm/gpu_scheduler.h:545:5: note: declared here
545 | int drm_sched_init(struct drm_gpu_scheduler *sched,
| ^~~~~~~~~~~~~~
drivers/gpu/drm/mwv207/mwv207_submit.c:599:15: error: too few arguments to function ‘drm_sched_job_init’
599 | ret = drm_sched_job_init(&mjob->base, mjob->engine_entity, mjob->ctx);
| ^~~~~~~~~~~~~~~~~~
./include/drm/gpu_scheduler.h:553:5: note: declared here
553 | int drm_sched_job_init(struct drm_sched_job *job,
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/mwv207/mwv207_sched.c: In function ‘mwv207_sched_suspend’:
drivers/gpu/drm/mwv207/mwv207_sched.c:276:48: error: ‘struct drm_gpu_scheduler’ has no member named ‘hw_rq_count’
276 | if (atomic_read(&jdev->sched[i]->hw_rq_count))
| ^~
cc1: all warnings being treated as errors |
[ Upstream commit 8ecf3c1 ] Recent additions in BPF like cpu v4 instructions, test_bpf module exhibits the following failures: test_bpf: deepin-community#82 ALU_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: deepin-community#83 ALU_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: deepin-community#84 ALU64_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: deepin-community#85 ALU64_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: deepin-community#86 ALU64_MOVSX | BPF_W jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: deepin-community#165 ALU_SDIV_X: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times) test_bpf: deepin-community#166 ALU_SDIV_K: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times) test_bpf: deepin-community#169 ALU_SMOD_X: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: deepin-community#170 ALU_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: deepin-community#172 ALU64_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: deepin-community#313 BSWAP 16: 0x0123456789abcdef -> 0xefcd eBPF filter opcode 00d7 (@2) unsupported jited:0 301 PASS test_bpf: deepin-community#314 BSWAP 32: 0x0123456789abcdef -> 0xefcdab89 eBPF filter opcode 00d7 (@2) unsupported jited:0 555 PASS test_bpf: deepin-community#315 BSWAP 64: 0x0123456789abcdef -> 0x67452301 eBPF filter opcode 00d7 (@2) unsupported jited:0 268 PASS test_bpf: deepin-community#316 BSWAP 64: 0x0123456789abcdef >> 32 -> 0xefcdab89 eBPF filter opcode 00d7 (@2) unsupported jited:0 269 PASS test_bpf: deepin-community#317 BSWAP 16: 0xfedcba9876543210 -> 0x1032 eBPF filter opcode 00d7 (@2) unsupported jited:0 460 PASS test_bpf: deepin-community#318 BSWAP 32: 0xfedcba9876543210 -> 0x10325476 eBPF filter opcode 00d7 (@2) unsupported jited:0 320 PASS test_bpf: deepin-community#319 BSWAP 64: 0xfedcba9876543210 -> 0x98badcfe eBPF filter opcode 00d7 (@2) unsupported jited:0 222 PASS test_bpf: deepin-community#320 BSWAP 64: 0xfedcba9876543210 >> 32 -> 0x10325476 eBPF filter opcode 00d7 (@2) unsupported jited:0 273 PASS test_bpf: deepin-community#344 BPF_LDX_MEMSX | BPF_B eBPF filter opcode 0091 (@5) unsupported jited:0 432 PASS test_bpf: deepin-community#345 BPF_LDX_MEMSX | BPF_H eBPF filter opcode 0089 (@5) unsupported jited:0 381 PASS test_bpf: deepin-community#346 BPF_LDX_MEMSX | BPF_W eBPF filter opcode 0081 (@5) unsupported jited:0 505 PASS test_bpf: deepin-community#490 JMP32_JA: Unconditional jump: if (true) return 1 eBPF filter opcode 0006 (@1) unsupported jited:0 261 PASS test_bpf: Summary: 1040 PASSED, 10 FAILED, [924/1038 JIT'ed] Fix them by adding missing processing. Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions") Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/91de862dda99d170697eb79ffb478678af7e0b27.1709652689.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin <[email protected]>
Picked and rebased from #102.
Introduce patches to support JMGPU JM9100 (MWV207).
This pull request requires porting to Kernel versions >= 6.7 due to changes in GPU memory management interfaces (logs pending).
Builds tested