[Mesa-dev] Question about display_gpu and render gpu in dri3_create_screen

Luc Ma onion0709 at gmail.com
Tue Sep 14 01:47:58 UTC 2021


Yes, I did. It crashed the kernel as follows

Sep 14 09:12:34 kernel: [  506.676925][ 4] [ T1045] Hardware name: WEIBU
F20A8/F20A8, BIOS 0.1.3 2021-07-06_20:59:09
Sep 14 09:12:34 kernel: [  506.685091][ 4] [ T1045] pstate: 80000005 (Nzcv
daif -PAN -UAO)
Sep 14 09:12:34 kernel: [  506.691001][ 4] [ T1045] pc : 0x0
Sep 14 09:12:34 kernel: [  506.694341][ 4] [ T1045] lr :
drm_gem_map_dma_buf+0xc0/0x118 [drm]
Sep 14 09:12:34 kernel: [  506.700509][ 4] [ T1045] sp : ffffffa0f4993b10
Sep 14 09:12:34 kernel: [  506.704941][ 4] [ T1045] x29: ffffffa0f4993b10
x28: ffffffa0f4993cd8
Sep 14 09:12:34 kernel: [  506.711370][ 4] [ T1045] x27: 000000000000000c
x26: ffffffa0f33e5200
Sep 14 09:12:34 kernel: [  506.717800][ 4] [ T1045] x25: ffffffa0e7452630
x24: ffffffa0f5a9f000
Sep 14 09:12:34 kernel: [  506.724229][ 4] [ T1045] x23: ffffffa0f33e5328
x22: ffffffa0e820f180
Sep 14 09:12:34 kernel: [  506.730658][ 4] [ T1045] x21: ffffffa0e820f180
x20: 0000000000000000
Sep 14 09:12:34 kernel: [  506.737087][ 4] [ T1045] x19: ffffffa0e820f180
x18: 0000000000000000
Sep 14 09:12:34 kernel: [  506.743516][ 4] [ T1045] x17: 0000000000000000
x16: 0000000000000000
Sep 14 09:12:34 kernel: [  506.749945][ 4] [ T1045] x15: 0000000000000000
x14: 0000000000000000
Sep 14 09:12:34 kernel: [  506.756373][ 4] [ T1045] x13: 0000000000000000
x12: 0000000000000000
Sep 14 09:12:34 kernel: [  506.762802][ 4] [ T1045] x11: 0000000000000000
x10: ffffffa0f43d1938
Sep 14 09:12:34 kernel: [  506.769231][ 4] [ T1045] x9 : 0000000000000000
x8 : ffffffa0e820f200
Sep 14 09:12:34 kernel: [  506.775659][ 4] [ T1045] x7 : 0000000000000000
x6 : 000000000000003f
Sep 14 09:12:34 kernel: [  506.782088][ 4] [ T1045] x5 : 0000000000000040
x4 : 0000000000000000
Sep 14 09:12:34 kernel: [  506.788517][ 4] [ T1045] x3 : 0000000000000000
x2 : ffffffc008d553b0
Sep 14 09:12:34 kernel: [  506.794945][ 4] [ T1045] x1 : 0000000000000000
x0 : ffffffa0f311b000
Sep 14 09:12:34 kernel: [  506.801375][ 4] [ T1045] Call trace:
Sep 14 09:12:34 kernel: [  506.804938][ 4] [ T1045]  0x0
Sep 14 09:12:34 kernel: [  506.807899][ 4] [ T1045]
 dma_buf_map_attachment+0x60/0xb0
Sep 14 09:12:34 kernel: [  506.813398][ 4] [ T1045]
 drm_gem_prime_import_dev+0x7c/0x138 [drm]
Sep 14 09:12:34 kernel: [  506.819675][ 4] [ T1045]
 drm_gem_prime_fd_to_handle+0x1b4/0x1d8 [drm]
Sep 14 09:12:34 kernel: [  506.826213][ 4] [ T1045]
 drm_prime_fd_to_handle_ioctl+0x24/0x38 [drm]
Sep 14 09:12:34 kernel: [  506.832750][ 4] [ T1045]
 drm_ioctl_kernel+0x84/0xd8 [drm]
Sep 14 09:12:34 kernel: [  506.838245][ 4] [ T1045]  drm_ioctl+0x218/0x408
[drm]
Sep 14 09:12:34 kernel: [  506.843326][ 4] [ T1045]
 radeon_drm_ioctl+0x50/0x88 [radeon]
Sep 14 09:12:34 kernel: [  506.849063][ 4] [ T1045]
 do_vfs_ioctl+0x394/0x7e8
Sep 14 09:12:34 kernel: [  506.853843][ 4] [ T1045]  ksys_ioctl+0x78/0xa8
Sep 14 09:12:34 kernel: [  506.858276][ 4] [ T1045]
 __arm64_sys_ioctl+0x1c/0x28
Sep 14 09:12:34 kernel: [  506.863318][ 4] [ T1045]
 el0_svc_common.constprop.0+0x68/0x168
Sep 14 09:12:34 kernel: [  506.869226][ 4] [ T1045]
 el0_svc_handler+0x8c/0x98
Sep 14 09:12:34 kernel: [  506.874093][ 4] [ T1045]  el0_svc+0x8/0xc
Sep 14 09:12:34 kernel: [  506.878093][ 4] [ T1045] Code: bad PC value
Sep 14 09:12:34 kernel: [  506.882265][ 4] [ T1045] ---[ end trace
3888e65eac0454cc ]---

I'm not familiar with the kernel, but I suspect it may be a kmd problem. It
seems like something is missing.

On Mon, 13 Sept 2021 at 20:57, Michel Dänzer <michel at daenzer.net> wrote:

> On 2021-09-13 14:40, Luc Ma wrote:
> > Hello,
> >
> > I recently tried multi-GPU support on the mesa gallium drivers(glx=dri).
> When I exported the env `DRI_PRIME=1`, I found that it didn't work with two
> different drivers loaded at the same time.
> > because there are different driver names in my case. display_gpu driver
> name is "r600" while render_gpu driver name is "nouveau". It failed to
> create display gpu screen
> >
> > if (strcmp(driverName, driverNameDisplayGPU) == 0) {
> >             psc->driScreenDisplayGPU =
> >                psc->image_driver->createNewScreen2(screen,
> psc->fd_display_gpu,
> >
>  pdp->loader_extensions,
> >                                                    extensions,
> >                                                    &driver_configs, psc);
> > }
> >
> > so I am wondering
> >
> > - is it possible to use two GPUs from different vendors on a system with
> gallium? one is for display, another for rendering
> > - is it possible to use two GPUs driven by a shared driver(say both
> "r600") on a system?
>
> Both should work.
>
>
> Did you hit a problem other than psc->driScreenDisplayGPU related code
> being skipped (as is expected ATM with different drivers)?
>
>
> --
> Earthling Michel Dänzer               |               https://redhat.com
> Libre software enthusiast             |             Mesa and X developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20210914/460b8c3e/attachment.htm>


More information about the mesa-dev mailing list