<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Yusuf,<br>
<br>
good to hear that you were able to solve your MMIO problems.<br>
<br>
And yes amdgpu has unfortunately some bugs on big endian systems.<br>
<br>
But as John noted when you solved the issues with the MMIO BARs
you can also use the Vesa driver with the VGA emulation.<br>
<br>
Regards,<br>
Christian.<br>
<br>
Am 18.02.20 um 16:00 schrieb Yusuf Altıparmak:<br>
</div>
<blockquote type="cite"
cite="mid:CAGzVRjy8DRGxwgkz3-0=Jc06FNQRVzP3OrwdFwMNSAR09qvJgA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div style="font-family:sans-serif;font-size:12.8px" dir="auto">
<div style="width:328px;margin:16px 0px">
<div dir="ltr">
<div dir="auto"><b>Hello Mr. Alex, Mr. Cönig and Mr.
Bridgman, </b></div>
<div dir="auto"><b><br>
</b></div>
<div dir="auto"><b>Mr. Cönig, we have talked about MMIO
problem before. You helped me a lot about that and now
driver is not giving any error about MMIO. That
problem was about bus configuration of my embedded
system. It does not proceed more than 4GB besides 0x0
adress is aligned for I/O and MMIO is allowed between
0xE0000000 and 0xffffffff. Fortunately, I now am able
to claim 256 MB and other 4 BARs adress between this
range. I can attach lspci -v output. </b></div>
<div dir="auto"><b><br>
</b></div>
<div dir="auto"><b>Mr. Bridgman, I am using U-boot as
bootloader and the system is 64 bit PowerPc e5500
core. This means big endian kernel. </b></div>
<div dir="auto"><b><br>
</b></div>
<div dir="auto"><b>Right now, the driver 'amdgpu' is
having error when </b></div>
<div dir="auto"><b>it tries to load smc firmware. I ve
been trying to solve this problem for months but I
haven't solve it yet. </b></div>
<div dir="auto"><b><br>
</b></div>
<div dir="auto"><b>Other firmwares seems loading without
any error. I was suspecting that endianness is causing
this problem but if it was shouldn't other firmwares
get fail before smc firmware gets loaded? </b></div>
<div dir="auto"><b><br>
</b></div>
<div dir="auto"><b>I tried all of the firmwares in
repository but result remained same. </b></div>
<div dir="auto"><b><br>
</b></div>
<div><b>Full dmesg:</b><br>
</div>
<div dir="auto">[ 5.426009] [drm] amdgpu kernel
modesetting enabled.
<br>
</div>
[ 5.430109] [drm] initializing kernel modesetting
(POLARIS12 0x1002:0x6987 0x1787:0x2389 0x80).
<br>
[ 5.437591] [drm] register mmio base: 0x20200000
<br>
[ 5.440899] [drm] register mmio size: 262144
<br>
[ 5.443888] [drm] add ip block number 0
<vi_common>
<br>
[ 5.447465] [drm] add ip block number 1
<gmc_v8_0>
<br>
[ 5.450953] [drm] add ip block number 2
<tonga_ih>
<br>
[ 5.454442] [drm] add ip block number 3
<powerplay>
<br>
[ 5.458018] [drm] add ip block number 4 <dm>
<br>
[ 5.460979] [drm] add ip block number 5
<gfx_v8_0>
<br>
[ 5.464466] [drm] add ip block number 6
<sdma_v3_0>
<br>
[ 5.468042] [drm] add ip block number 7
<uvd_v6_0>
<br>
[ 5.471531] [drm] add ip block number 8
<vce_v3_0>
<br>
[ 5.475047] [drm] UVD is enabled in VM mode
<br>
[ 5.477928] [drm] UVD ENC is enabled in VM mode
<br>
[ 5.481154] [drm] VCE enabled in VM mode
<br>
[ 5.712355] ATOM BIOS: 113-ER16BFC-001
<br>
[ 5.714830] [drm] GPU posting now...
<br>
[ 5.833704] [drm] vm size is 64 GB, 2 levels, block
size is 10-bit, fragment size is 9-bit
<br>
[ 5.840950] amdgpu 0001:01:00.0: BAR 2: releasing [mem
0x220000000-0x2201fffff 64bit pref]
<br>
[ 5.847930] amdgpu 0001:01:00.0: BAR 0: releasing [mem
0x210000000-0x21fffffff 64bit pref]
<br>
[ 5.855688] [drm:.amdgpu_device_resize_fb_bar [amdgpu]]
*ERROR* Problem resizing BAR0 (-2).
<br>
[ 5.855706] amdgpu 0001:01:00.0: BAR 0: assigned [mem
0x230000000-0x23fffffff 64bit pref]
<br>
[ 5.869663] amdgpu 0001:01:00.0: BAR 2: assigned [mem
0x240000000-0x2401fffff 64bit pref]
<br>
[ 5.876582] amdgpu 0001:01:00.0: VRAM: 4096M
0x000000F400000000 - 0x000000F4FFFFFFFF (4096M used)
<br>
[ 5.884160] amdgpu 0001:01:00.0: GART: 256M
0x0000000000000000 - 0x000000000FFFFFFF
<br>
[ 5.890519] [drm] Detected VRAM RAM=4096M, BAR=256M
<br>
[ 5.894093] [drm] RAM width 128bits GDDR5
<br>
[ 5.896941] [TTM] Zone kernel: Available graphics
memory: 4062380 kiB
<br>
[ 5.902177] [TTM] Zone dma32: Available graphics
memory: 2097152 kiB
<br>
[ 5.907402] [TTM] Initializing pool allocator
<br>
[ 5.910464] [TTM] Initializing DMA pool allocator
<br>
[ 5.919973] [drm] amdgpu: 4096M of VRAM memory ready
<br>
[ 5.923659] [drm] amdgpu: 4096M of GTT memory ready.
<br>
[ 5.927358] [drm] GART: num cpu pages 65536, num gpu
pages 65536
<br>
[ 5.932957] [drm] PCIE GART of 256M enabled (table at
0x000000F400000000).
<br>
[ 5.939122] [drm] Chained IB support enabled!
<br>
[ 5.948873] [drm] Found UVD firmware Version: 1.79
Family ID: 16
<br>
[ 5.953647] [drm] UVD ENC is disabled
<br>
[ 5.975818] [drm] Found VCE firmware Version: 52.4
Binary ID: 3
<br>
[ 6.404774] amdgpu: [powerplay] Failed to send Message.
<br>
[ 6.835902] amdgpu: [powerplay] SMU Firmware start
failed!
<br>
[ 6.840086] amdgpu: [powerplay] Failed to load SMU
ucode.
<br>
[ 6.844184] amdgpu: [powerplay] smc start failed
<br>
<b>[ 6.847498] amdgpu: [powerplay] powerplay hw init
failed </b>
<br>
<b>[ 6.852281] [drm:.amdgpu_device_init [amdgpu]]
*ERROR* hw_init of IP block <powerplay> failed -22</b>
<br>
<b>[ 6.859883] amdgpu 0001:01:00.0:
amdgpu_device_ip_init failed </b> <b>
<br>
[ 6.864330] amdgpu 0001:01:00.0: Fatal error during
GPU init </b> <b>
<br>
[ 6.868689] [drm] amdgpu: finishing device. </b>
<br>
<b>[ 7.339427] pcieport 0001:00:00.0: AER: Corrected
error received: 0001:00:00.0
<br>
[ 7.345374] pcieport 0001:00:00.0: PCIe Bus Error:
severity=Corrected, type=Data Link Layer, (Transmitter
ID) <br>
[ 7.353993] pcieport 0001:00:00.0: device
[1957:0824] error status/mask=00001000/00002000
<br>
[ 7.361047] pcieport 0001:00:00.0: [12] Timeout
</b>
<br>
[ 7.706137] amdgpu: [powerplay]
<br>
last message was failed ret is 0
<br>
[ 8.127667] amdgpu: [powerplay]
<br>
failed to send message 261 ret is 0
<br>
[ 8.966331] amdgpu: [powerplay]
<br>
last message was failed ret is 0
<br>
[ 9.320290] pcieport 0001:00:00.0: AER: Corrected error
received: 0001:00:00.0
<br>
[ 9.326226] pcieport 0001:00:00.0: PCIe Bus Error:
severity=Corrected, type=Data Link Layer, (Transmitter ID)
<br>
[ 9.334845] pcieport 0001:00:00.0: device [1957:0824]
error status/mask=00001000/00002000
<br>
[ 9.341899] pcieport 0001:00:00.0: [12] Timeout
<br>
[ 9.387975] amdgpu: [powerplay]
<br>
failed to send message 261 ret is 0
<br>
[ 10.226636] amdgpu: [powerplay]
<br>
last message was failed ret is 0
<br>
[ 10.648275] amdgpu: [powerplay]
<br>
failed to send message 261 ret is 0
<br>
[ 11.486932] amdgpu: [powerplay]
<br>
last message was failed ret is 0
<br>
[ 11.908570] amdgpu: [powerplay]
<br>
failed to send message 261 ret is 0
<br>
[ 12.747228] amdgpu: [powerplay]
<br>
last message was failed ret is 0
<br>
[ 13.168866] amdgpu: [powerplay]
<br>
failed to send message 261 ret is 0
<br>
[ 14.007523] amdgpu: [powerplay]
<br>
last message was failed ret is 0
<br>
[ 14.429161] amdgpu: [powerplay]
<br>
failed to send message 261 ret is 0
<br>
[ 15.267816] amdgpu: [powerplay]
<br>
last message was failed ret is 0
<br>
[ 15.689456] amdgpu: [powerplay]
<br>
failed to send message 261 ret is 0
<br>
[ 16.528114] amdgpu: [powerplay]
<br>
last message was failed ret is 0
<br>
[ 16.949756] amdgpu: [powerplay]
<br>
failed to send message 261 ret is 0
<br>
[ 17.788411] amdgpu: [powerplay]
<br>
last message was failed ret is 0
<br>
[ 18.210051] amdgpu: [powerplay]
<br>
failed to send message 261 ret is 0
<br>
[ 19.048710] amdgpu: [powerplay]
<br>
last message was failed ret is 0
<br>
[ 19.470347] amdgpu: [powerplay]
<br>
failed to send message 261 ret is 0
<br>
[ 19.786774] [TTM] Finalizing pool allocator
<br>
[ 19.789696] [TTM] Finalizing DMA pool allocator
<br>
[ 19.793004] [TTM] Zone kernel: Used memory at exit: 0
kiB
<br>
[ 19.797209] [TTM] Zone dma32: Used memory at exit: 0
kiB
<br>
[ 19.801410] [drm] amdgpu: ttm finalized
<b>
<br>
[ 19.804496] amdgpu: probe of 0001:01:00.0 failed with
error -22 </b><br>
</div>
</div>
</div>
<div style="font-family:sans-serif;font-size:12.8px" dir="auto"><br>
</div>
<br>
<div class="gmail_quote" dir="auto">
<div dir="ltr" class="gmail_attr">18 Şub 2020 Sal 17:43
tarihinde Bridgman, John <<a
href="mailto:John.Bridgman@amd.com" moz-do-not-send="true">John.Bridgman@amd.com</a>>
şunu yazdı:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<p
style="font-family:Arial;font-size:10pt;color:#0078d7;margin:15pt"
align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">>And
we already checked, 256MB is unfortunately the minimum
you can resize the VRAM BAR on the E9171 to.<br>
</div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br>
</div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">Ahh,
OK... I didn't realize we had already looked into
that. I guess that approach isn't going to work.
<br>
</div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br>
</div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">Yusef,
guessing you are using a 32-bit CPU ? Is it possible
to talk to whoever does SBIOS for your platform to see
if you could maybe reduce address space allocated to
RAM and bump up the MMIO space ?<br>
</div>
<div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_-1727261425459073512divRplyFwdMsg"
dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
Christian König <<a
href="mailto:ckoenig.leichtzumerken@gmail.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true">ckoenig.leichtzumerken@gmail.com</a>><br>
<b>Sent:</b> February 18, 2020 9:19 AM<br>
<b>To:</b> Bridgman, John <<a
href="mailto:John.Bridgman@amd.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true">John.Bridgman@amd.com</a>>;
Alex Deucher <<a
href="mailto:alexdeucher@gmail.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true">alexdeucher@gmail.com</a>>;
Yusuf Altıparmak <<a
href="mailto:yusufalti1997@gmail.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true">yusufalti1997@gmail.com</a>><br>
<b>Cc:</b> amd-gfx list <<a
href="mailto:amd-gfx@lists.freedesktop.org"
target="_blank" rel="noreferrer"
moz-do-not-send="true">amd-gfx@lists.freedesktop.org</a>><br>
<b>Subject:</b> Re: writing custom driver for VGA
emulation ?</font>
<div> </div>
</div>
<div style="background-color:#ffffff">
<div>The problem Yusuf runs into is that his
platform has multiple PCIe root hubs, but only
512MB of MMIO address space. That is not enough to
fit all the BARs of an E9171 into.<br>
<br>
But without the BARs neither the VGA emulation nor
amdgpu not anything else will work correctly.<br>
<br>
And we already checked, 256MB is unfortunately the
minimum you can resize the VRAM BAR on the E9171
to.<br>
<br>
What could maybe work is to trick the upstream
bridge of the VGA device into not routing all the
addresses to the BARs and actually use only a
smaller portion of visible VRAM. But that would be
highly experimental and requires a rather big hack
into the PCI(e) subsystem in the Linux kernel.<br>
<br>
Regards,<br>
Christian.<br>
<br>
Am 18.02.20 um 15:08 schrieb Bridgman, John:<br>
</div>
<blockquote type="cite">
<p
style="margin-top:0px;margin-bottom:0px;font-family:Arial;font-size:10pt;color:#0078d7;margin:15pt"
align="Left">
[AMD Official Use Only - Internal Distribution
Only]<br>
</p>
<br>
<div>
<div>Does the VBIOS come up with something like
a splash screen, ie is VBIOS able to
initialize and drive the card ?<br>
</div>
<div><br>
</div>
<div>If so then another option might be to use a
VESA driver rather than VGA. <br>
</div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br>
</div>
<div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br>
</div>
<hr style="display:inline-block;width:98%">
<div
id="m_-1727261425459073512x_divRplyFwdMsg"
dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
amd-gfx
<a
href="mailto:amd-gfx-bounces@lists.freedesktop.org"
target="_blank" rel="noreferrer"
moz-do-not-send="true">
<amd-gfx-bounces@lists.freedesktop.org></a> on behalf of Alex
Deucher <a
href="mailto:alexdeucher@gmail.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true">
<alexdeucher@gmail.com></a><br>
<b>Sent:</b> February 18, 2020 8:50 AM<br>
<b>To:</b> Yusuf Altıparmak <a
href="mailto:yusufalti1997@gmail.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true">
<yusufalti1997@gmail.com></a><br>
<b>Cc:</b> amd-gfx list <a
href="mailto:amd-gfx@lists.freedesktop.org"
target="_blank" rel="noreferrer"
moz-do-not-send="true">
<amd-gfx@lists.freedesktop.org></a><br>
<b>Subject:</b> Re: writing custom driver
for VGA emulation ?</font>
<div> </div>
</div>
<div><font size="2"><span
style="font-size:11pt">
<div>On Tue, Feb 18, 2020 at 2:56 AM
Yusuf Altıparmak<br>
<a
href="mailto:yusufalti1997@gmail.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true"><yusufalti1997@gmail.com></a>
wrote:<br>
><br>
> Hello AMD team;<br>
><br>
> I have E 9171 GPU and want to use
it on a embedded system which has
limited MMIO space on PCIe bus (MAX
512 MB).<br>
><br>
> I received feedbacks that I can
only use VGA emulation with this
memory space. I was unable to get
'amdgpu' driver working with Xorg due
to I had many errors(firmwares are not
loading) in each step and tired of
solving them one by one.<br>
><br>
> I want to write a simple custom
driver for this GPU with kernel
version 4.19.<br>
> Is it possible to print some
colors on screen with a custom driver
over PCIe communication ? or writing
some words on screen as VGA ?<br>
><br>
> If answer is yes, then which code
pieces (on amdgpu driver folder) or
reference documentation should I use?
I have Register Reference Guide.pdf.<br>
><br>
> I will be appreciated for your
guidance.<br>
<br>
That is not going to do what you want
on your platform. The VGA<br>
emulation requires that you set up the
card first to enable it, which<br>
in turn requires MMIO access and thus
you are back to square one.<br>
<br>
Alex<br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a
href="mailto:amd-gfx@lists.freedesktop.org"
target="_blank" rel="noreferrer"
moz-do-not-send="true">amd-gfx@lists.freedesktop.org</a><br>
<a
href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CJohn.Bridgman%40amd.com%7Ccda5469b6f5f4ae43e6d08d7b47d899a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637176323587003958&sdata=6eKo51jnHbE1QWkDB%2BN%2FFLMLB40HA2wVN3mU1l%2FeFhk%3D&reserved=0"
target="_blank" rel="noreferrer"
moz-do-not-send="true">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cjohn.bridgman%40amd.com%7Ce7bf224775ad487d240708d7b47992f4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637176306561328560&sdata=QbfaIN%2F6LvgUihz5O0x41TwvdGYy7QTS5IVJq3RXYlA%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
amd-gfx mailing list
<a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank" rel="noreferrer" moz-do-not-send="true">amd-gfx@lists.freedesktop.org</a>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CJohn.Bridgman%40amd.com%7Ccda5469b6f5f4ae43e6d08d7b47d899a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637176323587003958&sdata=6eKo51jnHbE1QWkDB%2BN%2FFLMLB40HA2wVN3mU1l%2FeFhk%3D&reserved=0" target="_blank" rel="noreferrer" moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
</pre>
</blockquote>
<br>
<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
amd-gfx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
</pre>
</blockquote>
<br>
</body>
</html>