<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Oh, what a crazy idea. So you mean it can work like this?</p>
<p>1. use the libgbm/gbm_dri/libEGL/libGLES from mesa which will load radeonsi_dri.so</p>
<p>2. libGL/amdgpu_dri.so from amdgpu-pro</p>
<p><br>
</p>
<p>Regards,</p>
<p>Qiang</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Axel Davy <axel.davy@ens.fr><br>
<b>Sent:</b> Thursday, May 12, 2016 4:04:12 PM<br>
<b>To:</b> Yu, Qiang; mesa-dev@lists.freedesktop.org<br>
<b>Subject:</b> Re: [Mesa-dev] GBM backend dynamic dispatch method</font>
<div> </div>
</div>
<div>
<div class="moz-cite-prefix">Another question:<br>
<br>
Why not just use Mesa handle gbm ?<br>
If I understand radeonsi uses the same libdrm and kernel than amdgpu-pro.<br>
<br>
Thus having Mesa handle gbm should be fine, as radeonsi could work alongside amdgpu-pro.<br>
<br>
Then the only implementation details are about the extension to import gbm bo into EGLImage (and the gbm code to import EGLImage)<br>
Importing into EGL can be done with gbm function to export dma-buf (and then the dma-buf would get imported for EGLImage).<br>
Not sure for the other way, but it could be made possible.<br>
<br>
Also next question would be: why not let radeonsi handle EGL (and gbm), and have amdgpu-pro handle glx only ?<br>
That way amdgpu-pro won't need to duplicate the code for wayland support, gbm support, etc.<br>
<br>
Axel<br>
<br>
On 12/05/2016 09:10, Yu, Qiang wrote :<br>
</div>
<blockquote cite="mid:DM3PR12MB08447482924D4D96F9CEF9308F730@DM3PR12MB0844.namprd12.prod.outlook.com" type="cite">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Thanks Axel, I find the current GBM already works like you said except</p>
<p>GBM_BACKEND only support one backend. So I just have to make amdgpu-pro</p>
<p>backend create_device return NULL for Intel GPU.</p>
<p><br>
</p>
<p>Many thanks,</p>
<p>Qiang</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> mesa-dev
<a class="moz-txt-link-rfc2396E" href="mailto:mesa-dev-bounces@lists.freedesktop.org">
<mesa-dev-bounces@lists.freedesktop.org></a> on behalf of Axel Davy <a class="moz-txt-link-rfc2396E" href="mailto:axel.davy@ens.fr">
<axel.davy@ens.fr></a><br>
<b>Sent:</b> Thursday, May 12, 2016 2:36:34 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:mesa-dev@lists.freedesktop.org">
mesa-dev@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [Mesa-dev] GBM backend dynamic dispatch method</font>
<div> </div>
</div>
<div>
<div class="moz-cite-prefix">Hi,<br>
<br>
I'm not sure if that answers your need, but to me it looks like<br>
it would be simpler if gbm was trying different backends for the given<br>
device, until it succeeds. You'd pass several backends to <span style="font-size: 12pt;">
GBM_BACKEND (perhaps<br>
rename to GBM_BACKENDS), and in your example it would put amdgpu pro first.<br>
Then when using the amd card, amdgpu pro would be used, else since the loading<br>
would fail, it would use the second backend, which would be mesa.<br>
<br>
That's just a suggestion, and you'd better wait for gbm maintainers to voice theirs.<br>
<br>
Axel<br>
</span><br>
On 12/05/2016 04:45, Yu, Qiang wrote:<br>
</div>
<blockquote cite="mid:DM3PR12MB0844B6788E29BA51C9F9CFE68F730@DM3PR12MB0844.namprd12.prod.outlook.com" type="cite">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="background-color:
rgb(255, 255, 255);">
<p style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 12pt;">
Hi guys, </p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 12pt;">
<br>
</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 12pt;">
Let me introduce myself. My name is Qiang Yu, I'm a developer of amdgpu-pro driver.</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 12pt;">
As you know the amdgpu-pro adopts some open source part like GBM but due to its</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 12pt;">
close source OGL part, we implement our<span style="font-size: 12pt;"> own GBM</span><span style="font-size: 12pt;"> backend</span><span style="font-size: 12pt;">. </span></p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 12pt;">
<br>
</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 12pt;">
Currently libgbm only support <span style="font-size:
12pt;">static selection of GBM backend by GBM_BACKEND,</span></p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 12pt;">
<span style="font-size: 12pt;">so for the hybrid GPU case like Intel iGPU + AMD dGPU and AMD dGPU is drived</span></p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 12pt;">
<span style="font-size: 12pt;">by amdgpu-pro, it's not convenient for </span><span style="font-size: 12pt;">client to switch backend all the time and even </span></p>
<p><span style="color: rgb(0, 0, 0); font-family: Calibri,
Arial, Helvetica, sans-serif; font-size: 12pt;"></span><span style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
Helvetica, sans-serif; font-size: 12pt;">impossible</span><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;"> for </span>applications<span style="font-size: 12pt;"> that
need to deal with both GPUs like the XServer.</span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;"><br>
</span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;">So I'm wondering a dynamic dispatch method and hope it can go upstream to the </span></font><span style="font-size: 12pt; font-family: Calibri, Arial,
Helvetica, sans-serif;">libgbm</span><span style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 12pt;">:</span></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;">1. create a /etc/gbm/xxx.conf for libgbm to read when none default backend needed</span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;">2. the content should be like: <kernel driver name>:<gbm backend name></span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;"> In the amdgpu-pro case, the content is: amdgpu:gbm_amdgpu.so</span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;"><br>
</span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;">This method need libgbm use libdrm to determine the FD kernel driver first.</span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;">Any feedback on this method and the hope to go upstream?</span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;"><br>
</span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;">Thanks,</span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;">Qiang</span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 12pt;"><br>
</span></font></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre wrap="">_______________________________________________
mesa-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a>
</pre>
</blockquote>
<p><br>
</p>
</div>
</blockquote>
<br>
</div>
</body>
</html>