<div dir="ltr">Thanks for all the comments!<div><br></div><div>@Mike Blumenkrantz,   when I built mesa with <span style="background-color:transparent;color:rgb(24,128,56);font-family:"Roboto Mono",monospace;font-size:9pt">-Dgallium-drivers=radeonsi,virgl,zink,</span><br></div><div>How should I instruct the mesa to use GBM/ZINK during run time? <br></div><div>When I use <font size="1">"MESA_LOADER_DRIVER_OVERRIDE=zink</font>",<span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px"> </span> the test fails by "<span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px">MESA: error: ZINK: failed to choose pdev</span>".  </div>











</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 22 Jul 2024 at 10:52, Mike Blumenkrantz <<a href="mailto:michael.blumenkrantz@gmail.com">michael.blumenkrantz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><span style="background-color:rgb(255,255,255)">Hi,</span></div><div><span style="background-color:rgb(255,255,255)"><br></span></div><div><span style="background-color:rgb(255,255,255)">If you aren't hitting the kopper init paths (e.g., kopper_init_screen), you're doing something wrong.</span></div><div><span style="background-color:rgb(255,255,255)"><br></span></div><span style="background-color:rgb(255,255,255)">I'm not sure exactly what's going on there with gfxstream, but for gbm+zink you should be getting a backtrace like this on init:</span><div><span style="background-color:rgb(255,255,255)"><br></span></div><div><div style="font-family:"Droid Sans Mono","monospace",monospace;font-size:10px;line-height:14px;white-space:pre-wrap"><div><span style="background-color:rgb(255,255,255)"><font color="#000000">#0  kopper_init_screen (screen=0x25e010, driver_name_is_inferred=false) at ../src/gallium/frontends/dri/kopper.c:117</font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">#1  0x00007ffff486dc77 in driCreateNewScreen3 (scrn=0, fd=7, loader_extensions=0x7ffff7e6c2e0 <gbm_dri_screen_extensions>, driver_extensions=0x7ffff72ff760 <galliumvk_driver_extensions>, driver_configs=0x25df98, driver_name_is_inferred=false, data=0x25de50) at ../src/gallium/frontends/dri/dri_util.c:140</font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">#2  0x00007ffff7e5cdf8 in dri_screen_create_for_driver (dri=0x25de50, driver_name=0x25dc10 "zink", driver_name_is_inferred=false) at ../src/gbm/backends/dri/gbm_dri.c:300</font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">#3  0x00007ffff7e5cf0d in dri_screen_create (dri=0x25de50, driver_name_is_inferred=false) at ../src/gbm/backends/dri/gbm_dri.c:337</font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">#4  0x00007ffff7e5f0f1 in dri_device_create (fd=7, gbm_backend_version=1) at ../src/gbm/backends/dri/gbm_dri.c:1268</font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">#5  0x00007ffff7e5b76f in backend_create_device (bd=0x7ffff7e6b310 <builtin_backends>, fd=7) at ../src/gbm/main/backend.c:105</font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">#6  0x00007ffff7e5b8d2 in find_backend (name=0x0, fd=7) at ../src/gbm/main/backend.c:163</font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">#7  0x00007ffff7e5ba72 in _gbm_create_device (fd=7) at ../src/gbm/main/backend.c:229</font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">#8  0x00007ffff7e5bbd2 in gbm_create_device (fd=7) at ../src/gbm/main/gbm.c:138</font></span></div><div style="color:rgb(201,209,217)"><span style="font-family:Arial,Helvetica,sans-serif;font-size:small;color:rgb(34,34,34)"><br></span></div><div style="color:rgb(201,209,217)"><span style="font-family:Arial,Helvetica,sans-serif;font-size:small;color:rgb(34,34,34)"><br></span></div><div style="color:rgb(201,209,217)"><span style="font-family:Arial,Helvetica,sans-serif;font-size:small;color:rgb(34,34,34)">Regards,</span></div><div style="color:rgb(201,209,217)"><span style="font-family:Arial,Helvetica,sans-serif;font-size:small;color:rgb(34,34,34)">Mike</span></div><div style="color:rgb(201,209,217)"><span style="font-family:Arial,Helvetica,sans-serif;font-size:small;color:rgb(34,34,34)"><br></span></div><div style="color:rgb(201,209,217)"><span style="font-family:Arial,Helvetica,sans-serif;font-size:small;color:rgb(34,34,34)">On Mon, Jul 22, 2024 at 10:40 AM Lei Zhou <<a href="mailto:lei.zhou@linaro.org" target="_blank">lei.zhou@linaro.org</a>> wrote:</span><br></div></div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span style="background-color:rgb(255,255,255)">Dear mesa/experts,</span><div><span style="background-color:rgb(255,255,255)"><br></span></div><div><span style="background-color:rgb(255,255,255)">Need your support to help us better understand how we can go about this behavior.</span></div><div><span style="background-color:rgb(255,255,255)"><br></span></div><div><span style="background-color:rgb(255,255,255)">Here is what we have:</span></div><div><span style="background-color:rgb(255,255,255)">     1.    We are running QEMU based Debian guest with <span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px">-device virtio-gpu-rutabaga,gfxstream-vulkan=on,cross-domain=on.   </span>Expect to run vulkan application eg.vkcube-wayland from guest via wayland proxy over gfxstream and wayland protocol.   Please check this link (<a href="https://www.qemu.org/docs/master/system/devices/virtio-gpu.html" target="_blank">https://www.qemu.org/docs/master/system/devices/virtio-gpu.html</a>) for what is rutabaga/gfxstream GPU mode.     In theory,  it should be sufficient to render vkcube graphics over vulkan/gfxstream/virtio-gpu via host wayland compositor with a physical GPU driver.</span></div><div><span style="background-color:rgb(255,255,255)">  2.  On guest side mesa,  we compile with these options</span></div><div><span style="background-color:rgb(255,255,255)">      <span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-size:9pt;font-family:"Roboto Mono",monospace;color:rgb(24,128,56);vertical-align:baseline">-Dgallium-drivers=radeonsi,virgl,zink</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-size:9pt;font-family:"Roboto Mono",monospace;color:rgb(0,0,0);vertical-align:baseline"> </span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-size:9pt;font-family:"Roboto Mono",monospace;color:rgb(24,128,56);vertical-align:baseline">-Dvulkan-drivers=virtio,amd.</span></span></div><div><span style="background-color:rgb(255,255,255)"><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-size:9pt;font-family:"Roboto Mono",monospace;color:rgb(24,128,56);vertical-align:baseline">  </span>3.  When running $vkcube-wayland with wayland proxy,  gbm_create_device(...) will be invoked to acquire drm device resource, which will invoke driCreateNewScreen2 -> dri2_init_screen() etc.</span></div><div><span style="background-color:rgb(255,255,255)"><br></span></div><div><span style="background-color:rgb(255,255,255)">    <b><i>within mesa/src/gallium/frontends/dri/dri2.c,  what was the intention to indicate that "no zink" will be used?</i></b></span></div><div><span style="background-color:rgb(255,255,255)">===========================================</span></div><div><span style="background-color:rgb(255,255,255)">#ifdef HAVE_LIBDRM<br>if (pipe_loader_drm_probe_fd(&screen->dev, screen->fd, <b>false</b>)) <<=== <b>ZINK usage</b><br>      pscreen = pipe_loader_create_screen(screen->dev, driver_name_is_inferred);<br>#endif<br></span></div><div><span style="background-color:rgb(255,255,255)">=============================================</span></div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(159,160,28)"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"></span></p><p style="margin:0px;font-stretch:normal;line-height:normal"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">4.  In current behavior, </span><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">virtio_gpu_driver_descriptor </span><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">will be discovered and used.  Which will depend on "</span>-device virtio-gpu-gl-pci" the capsets of virgl and virgl2, which is not what we are using.<br></span></p><p style="margin:0px;font-stretch:normal;line-height:normal"><span style="background-color:rgb(255,255,255)"><br></span></p><p style="margin:0px;font-stretch:normal;line-height:normal"><span style="background-color:rgb(255,255,255)">Any clarification will be highly appreciated!</span></p><p style="margin:0px;font-stretch:normal;line-height:normal"><span style="background-color:rgb(255,255,255)">Lei Zhou</span></p>

















<div><span style="color:rgb(24,128,56);font-family:"Roboto Mono",monospace;font-size:9pt;background-color:rgb(255,255,255)"> </span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px"><br></span></div>





</div>
</blockquote></div></div>
</blockquote></div>