Re: Trying to run AMD E9260 (Polaris 11) on NXP LS1012A-RDB

2019-01-18 Thread Bas Vermeulen
I've since replaced the LS1012ARDB with a LS1046ARDB, and this works out of
the box.
The LS1012ARDB does not have an SMMU, which handles hardware coherency on
ARM.
So amdgpu won't work on any ARM without an SMMU.

Bas Vermeulen

On Thu, Jan 10, 2019 at 2:38 PM Koenig, Christian 
wrote:

> Am 10.01.19 um 14:31 schrieb Bas Vermeulen:
>
> On Thu, Jan 10, 2019 at 11:59 AM Christian König <
> ckoenig.leichtzumer...@gmail.com> wrote:
>
>> The PCI Express controller as instantiated on this chip does not support
>> hardware coherency. All incoming PCI Express transactions are made non
>> IO-coherent.
>>
>> Would AMDGPU still work with that PCI Express controller, or is this a
>> show-stopper?
>>
>>
>> I'm really wondering what this comment in the documentation means.
>>
>> As far as I know PCIe doesn't support cache coherency in the downstream
>> and supporting it in the up stream is a must have.
>>
> So what exactly is meant here with IO-coherent?
>>
>
> I believe IO Coherent means that when PCIe writes something to CPU memory,
> the caches are flushed or updated
> (or in this case they aren't). I found
> https://community.arm.com/processors/b/blog/posts/extended-system-coherency---part-1---cache-coherency-fundamentals
>
> with this explanation.
>
>
> Yeah, but as I said this upstream memory coherency is mandatory for PCIe.
>
> When a controller doesn't have that it can't call itself a PCIe
> controller. The spec is pretty clear about that :)
>
> And to answer the original question: Yes, that would be a totally
> show-stopper.
>
> Regards,
> Christian.
>
>
> Regards,
>
> Bas Vermeulen
>
>
>
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: Trying to run AMD E9260 (Polaris 11) on NXP LS1012A-RDB

2019-01-10 Thread Bas Vermeulen
On Thu, Jan 10, 2019 at 11:59 AM Christian König <
ckoenig.leichtzumer...@gmail.com> wrote:

> The PCI Express controller as instantiated on this chip does not support
> hardware coherency. All incoming PCI Express transactions are made non
> IO-coherent.
>
> Would AMDGPU still work with that PCI Express controller, or is this a
> show-stopper?
>
>
> I'm really wondering what this comment in the documentation means.
>
> As far as I know PCIe doesn't support cache coherency in the downstream
> and supporting it in the up stream is a must have.
>
So what exactly is meant here with IO-coherent?
>

I believe IO Coherent means that when PCIe writes something to CPU memory,
the caches are flushed or updated
(or in this case they aren't). I found
https://community.arm.com/processors/b/blog/posts/extended-system-coherency---part-1---cache-coherency-fundamentals

with this explanation.

Regards,

Bas Vermeulen
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: Trying to run AMD E9260 (Polaris 11) on NXP LS1012A-RDB

2019-01-10 Thread Bas Vermeulen
  pid 0 thread  pid 0
[6.735395] amdgpu :01:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR
 0x0017F000
[6.742889] amdgpu :01:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS
0x02048002
[6.750386] amdgpu :01:00.0: VM fault (0x02, vmid 1, pasid 0) at
page 1568768, read from 'TC0' (0x54433000) (72)
[6.984485] amdgpu :01:00.0: [drm:amdgpu_ring_test_helper [amdgpu]]
*ERROR* ring gfx test failed (-110)
[6.994562] [drm:amdgpu_device_init [amdgpu]] *ERROR* hw_init of IP
block  failed -110
[7.004942] amdgpu :01:00.0: amdgpu_device_ip_init failed
[7.011963] amdgpu :01:00.0: Fatal error during GPU init
[7.018890] [drm] amdgpu: finishing device.
[7.308898] WARNING: CPU: 0 PID: 2084 at
/home/bas/linux/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:915
amdgpu_bo_unpin+0xe4/0x110 [amdgpu]
[7.321451] Modules linked in: amdgpu(+) realtek chash gpu_sched ttm
drm_kms_helper drm crct10dif_ce drm_panel_orientation_quirks pfe(C)
ip_tables x_tables ipv6
[7.335850] CPU: 0 PID: 2084 Comm: systemd-udevd Tainted: G C
5.0.0-rc1-1-g3bd6e94bec12-dirty #1
[7.346303] Hardware name: LS1012A RDB Board (DT)
[7.351014] pstate: 4005 (nZcv daif -PAN -UAO)
[7.356090] pc : amdgpu_bo_unpin+0xe4/0x110 [amdgpu]
[7.361307] lr : amdgpu_bo_free_kernel+0x7c/0x148 [amdgpu]
[7.366799] sp : 118c3730
[7.370114] x29: 118c3730 x28: 08e63710
[7.375434] x27: 118c3df0 x26: 0100
[7.380754] x25: 80003599cb60 x24: 8000359927d0
[7.386073] x23: 800035994750 x22: 8000359927d0
[7.391393] x21: 8000358cb800 x20: 111fd000
[7.396713] x19: 8000358cb800 x18: 001e
[7.402033] x17:  x16: 0002
[7.407351] x15: 0400 x14: 0400
[7.412670] x13: cb72 x12: b308
[7.417989] x11: 7ed02488 x10: 800037798030
[7.423308] x9 : 118c36e4 x8 : 
[7.428627] x7 : 00210d00 x6 : 
[7.433946] x5 : 0001 x4 : 0001
[7.439265] x3 : 8000358cb87c x2 : 
[7.444583] x1 :  x0 : 8000358cb800
[7.449903] Call trace:
[7.452583]  amdgpu_bo_unpin+0xe4/0x110 [amdgpu]
[7.457437]  amdgpu_bo_free_kernel+0x7c/0x148 [amdgpu]
[7.462812]  amdgpu_gfx_rlc_fini+0x50/0x78 [amdgpu]
[7.467926]  gfx_v8_0_sw_fini+0xfc/0x1c0 [amdgpu]
[7.472864]  amdgpu_device_fini+0x1e0/0x480 [amdgpu]
[7.478058]  amdgpu_driver_unload_kms+0xa0/0x150 [amdgpu]
[7.483686]  amdgpu_driver_load_kms+0x144/0x1f8 [amdgpu]
[7.489110]  drm_dev_register+0x14c/0x1e0 [drm]
[7.493906]  amdgpu_pci_probe+0xcc/0x188 [amdgpu]
[7.498622]  local_pci_probe+0x3c/0xb0
[7.502375]  pci_device_probe+0x150/0x1b8
[7.506390]  really_probe+0x1f0/0x298
[7.510055]  driver_probe_device+0x58/0x100
[7.514242]  __driver_attach+0xd4/0xd8
[7.517993]  bus_for_each_dev+0x74/0xc8
[7.521832]  driver_attach+0x20/0x28
[7.525410]  bus_add_driver+0x1ac/0x218
[7.529250]  driver_register+0x60/0x110
[7.533089]  __pci_register_driver+0x40/0x48
[7.537599]  amdgpu_init+0x58/0x1000 [amdgpu]
[7.541964]  do_one_initcall+0x5c/0x178
[7.545804]  do_init_module+0x58/0x1b0
[7.549556]  load_module+0x1dc8/0x2178
[7.553308]  __se_sys_finit_module+0xbc/0xd0
[7.557582]  __arm64_sys_finit_module+0x18/0x20
[7.562119]  el0_svc_common+0x60/0x100
[7.565872]  el0_svc_handler+0x2c/0x80
[7.581715] amdgpu :01:00.0: (ptrval) unpin not necessary
[7.594743] [TTM] Finalizing pool allocator
[7.599867] [TTM] Finalizing DMA pool allocator
[7.605265] [TTM] Zone  kernel: Used memory at exit: 0 kiB
[7.611482] [drm] amdgpu: ttm finalized
[7.618028] amdgpu: probe of :01:00.0 failed with error -110

Bas Vermeulen


On Thu, Dec 20, 2018 at 5:11 PM Bas Vermeulen  wrote:

> Hi Alex,
>
> I already have a similar patch in, that doesn't fix it just yet. I'll
> investigate some more.
>
> Bas Vermeulen
>
> On Thu, Dec 20, 2018 at 4:27 PM Alex Deucher 
> wrote:
>
>> On Thu, Dec 20, 2018 at 9:06 AM Bas Vermeulen  wrote:
>> >
>> > Hi all,
>> >
>> > I have connected an E9260 (Polaris 11 based) to a mini-PCIe slot on my
>> NXP LS1012ARDB.
>> > The GPU is seen, all the BARs are correctly assigned (but there's not
>> enough PCIe memory space for the big BARs).
>> >
>> > When I try to load the amdgpu module, I can't get the driver to enable
>> the acceleration (the scratch register check fails).
>> >
>> > The E9260 is connected to a PCIe x1 (Gen2) slot.
>> >
>> > Anyone have an idea on where to look or how to fix this? This is a
>> test-bed before we get an LS1046ARDB with quad core A72's.
>> >
>&g

Re: Trying to run AMD E9260 (Polaris 11) on NXP LS1012A-RDB

2018-12-20 Thread Bas Vermeulen
Hi Alex,

I already have a similar patch in, that doesn't fix it just yet. I'll
investigate some more.

Bas Vermeulen

On Thu, Dec 20, 2018 at 4:27 PM Alex Deucher  wrote:

> On Thu, Dec 20, 2018 at 9:06 AM Bas Vermeulen  wrote:
> >
> > Hi all,
> >
> > I have connected an E9260 (Polaris 11 based) to a mini-PCIe slot on my
> NXP LS1012ARDB.
> > The GPU is seen, all the BARs are correctly assigned (but there's not
> enough PCIe memory space for the big BARs).
> >
> > When I try to load the amdgpu module, I can't get the driver to enable
> the acceleration (the scratch register check fails).
> >
> > The E9260 is connected to a PCIe x1 (Gen2) slot.
> >
> > Anyone have an idea on where to look or how to fix this? This is a
> test-bed before we get an LS1046ARDB with quad core A72's.
> >
> > Any help would be appreciated,
>
> Something like this patch should fix it assuming this is an ARM based
> platform:
> https://patchwork.freedesktop.org/patch/269367/
>
> Alex
>
> >
> > Bas Vermeulen
> > ___
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Trying to run AMD E9260 (Polaris 11) on NXP LS1012A-RDB

2018-12-20 Thread Bas Vermeulen
Hi all,

I have connected an E9260 (Polaris 11 based) to a mini-PCIe slot on my NXP
LS1012ARDB.
The GPU is seen, all the BARs are correctly assigned (but there's not
enough PCIe memory space for the big BARs).

When I try to load the amdgpu module, I can't get the driver to enable the
acceleration (the scratch register check fails).

The E9260 is connected to a PCIe x1 (Gen2) slot.

Anyone have an idea on where to look or how to fix this? This is a test-bed
before we get an LS1046ARDB with quad core A72's.

Any help would be appreciated,

Bas Vermeulen
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


OpenCL with Mesa on E8860 on big endian system (PowerPC)

2018-03-28 Thread Bas Vermeulen
Hi,

I've managed to configure my device-tree correctly, and am now able to
correctly start
the radeon driver with acceleration on my T2080 (an e6500 PowerPC chip)
with an AMD E8860 GPU (radeon/radeonsi). Thanks for the help with that.

I am able to run a small OpenCL program that fills a float buffer with
values (1024 float array, filled with values from 0.0 - 1023.0), and am
even able to read expected data (part of it anyways).
When reading my array, I see that the first 257 values are correct after
byteswapping (as expected, since the GPU is little endian), but all data
above that is random junk.

In order to debug this, I would like to check the values put into
ring0-ring5. Is the format for these documented somewhere, and can anyone
point me to this?

I've already sent a small patch to mesa-dev to fix an endianness issue I
had to fix to get mesa/clover/gallium to work at all. I'd like to get this
working correctly completely.

Bas Vermeulen
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: AMD E8860 on PowerPC with u-boot (T2080)

2018-03-14 Thread Bas Vermeulen
I have the radeon driver working on the T2080, and am currently running
into a problem with gallium/mesa. My problem was a mismatch
between u-boot and my device-tree that caused PCI Express to misbehave.

When I run a program calling OpenCL, I get a segfault. The cause for this
particular crash in src/gallium/drivers/radeonsi/si_state_draw.c:474
is the use of bit fields in union si_vgt_param_key
(from src/gallium/drivers/radeonsi/si_pipe.h:310). I'm fairly sure there
will be other instances.

Is there a best practice on resolving this? Point me in the right direction
and I'll create some patches to get this fixed.

Bas Vermeulen

On Thu, Feb 22, 2018 at 9:51 AM, Christian König <christian.koe...@amd.com>
wrote:

> Am 22.02.2018 um 09:37 schrieb Bas Vermeulen:
>
> On Wed, Feb 21, 2018 at 6:22 PM, Alex Deucher <alexdeuc...@gmail.com>
> wrote:
>
>> On Wed, Feb 21, 2018 at 7:43 AM, Christian König
>> [SNIP]
>> > Apart from that I don't have any good idea any more why that shouldn't
>> work.
>>
>> Does your platform properly handle DMA masks?  Most radeon hw only
>> supports a 40 bit DMA mask.  If there are relevant bits in the upper
>> bits of the address, they will be lost when the hw tries to use the
>> address.  On at least some powerpc hw, I believe there is some memory
>> routing related info in the high bits.
>>
>
> On 4.1 (without the hashing algorithm when printing pointers), The rings
> are placed thus:
>
> [   11.002673] radeon 0002:01:00.0: fence driver on ring 0 use gpu addr
> 0x8c00 and cpu addr 0xc0007c0c8c00
> [   11.012165] radeon 0002:01:00.0: fence driver on ring 1 use gpu addr
> 0x8c04 and cpu addr 0xc0007c0c8c04
> [   11.021657] radeon 0002:01:00.0: fence driver on ring 2 use gpu addr
> 0x8c08 and cpu addr 0xc0007c0c8c08
> [   11.031152] radeon 0002:01:00.0: fence driver on ring 3 use gpu addr
> 0x8c0c and cpu addr 0xc0007c0c8c0c
> [   11.040644] radeon 0002:01:00.0: fence driver on ring 4 use gpu addr
> 0x8c10 and cpu addr 0xc0007c0c8c10
> [   11.051919] radeon 0002:01:00.0: fence driver on ring 5 use gpu addr
> 0x00075a18 and cpu addr 0x880088db5a18
>
> It's also using bit 63 & 62. So this might be something to look into.
>
>
> No, that is just the virtual address of the buffer in kernel space and
> perfectly ok.
>
> What you could try is to force the need_dma32 flag to true, see
> drivers/gpu/drm/radeon/radeon_ttm.c and search for need_dma32.
>
> Regards,
> Christian.
>
>
> Bas Vermeulen
>
>
>
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: AMD E8860 on PowerPC with u-boot (T2080)

2018-02-22 Thread Bas Vermeulen
On Wed, Feb 21, 2018 at 6:22 PM, Alex Deucher <alexdeuc...@gmail.com> wrote:

> On Wed, Feb 21, 2018 at 7:43 AM, Christian König
> <christian.koe...@amd.com> wrote:
> >> The failed VCE resume (-22) seems to be caused by
> >>
> >> if (rdev->vce.vcpu_bo == NULL)
> >> return -EINVAL;
> >>
> >> in radeon_vce.c line 226.
> >
> >
> > Yeah, you don't seem to have the VCE firmware installed. But as long as
> you
> > don't want to do any advanced video encoding with the hardware we can
> simply
> > ignore that for now.
> >
> >> Any idea where to look from there?
> >
> >
> > Unfortunately not the slightest.
> >
> > What's a bit suspicious is that the CPU addresses for the fence locations
> > look odd:
> >>
> >> [   11.350779] radeon 0001:01:00.0: fence driver on ring 0 use gpu addr
> >> 0x8c00 and cpu addr 0x7408d6c9
> >> [   11.360274] radeon 0001:01:00.0: fence driver on ring 1 use gpu addr
> >> 0x8c04 and cpu addr 0x13c11aeb
> >> [   11.369770] radeon 0001:01:00.0: fence driver on ring 2 use gpu addr
> >> 0x8c08 and cpu addr 0xd4ddd131
> >> [   11.379267] radeon 0001:01:00.0: fence driver on ring 3 use gpu addr
> >> 0x8c0c and cpu addr 0x263a4d29
> >> [   11.388763] radeon 0001:01:00.0: fence driver on ring 4 use gpu addr
> >> 0x8c10 and cpu addr 0x6ceb1503
> >> [   11.399277] radeon 0001:01:00.0: fence driver on ring 5 use gpu addr
> >> 0x00075a18 and cpu addr 0x8935a463
> >
> > But could as well be that we don't correctly print them.
> >
> > Apart from that I don't have any good idea any more why that shouldn't
> work.
>
> Does your platform properly handle DMA masks?  Most radeon hw only
> supports a 40 bit DMA mask.  If there are relevant bits in the upper
> bits of the address, they will be lost when the hw tries to use the
> address.  On at least some powerpc hw, I believe there is some memory
> routing related info in the high bits.
>

On 4.1 (without the hashing algorithm when printing pointers), The rings
are placed thus:

[   11.002673] radeon 0002:01:00.0: fence driver on ring 0 use gpu addr
0x8c00 and cpu addr 0xc0007c0c8c00
[   11.012165] radeon 0002:01:00.0: fence driver on ring 1 use gpu addr
0x8c04 and cpu addr 0xc0007c0c8c04
[   11.021657] radeon 0002:01:00.0: fence driver on ring 2 use gpu addr
0x8c08 and cpu addr 0xc0007c0c8c08
[   11.031152] radeon 0002:01:00.0: fence driver on ring 3 use gpu addr
0x8c0c and cpu addr 0xc0007c0c8c0c
[   11.040644] radeon 0002:01:00.0: fence driver on ring 4 use gpu addr
0x8c10 and cpu addr 0xc0007c0c8c10
[   11.051919] radeon 0002:01:00.0: fence driver on ring 5 use gpu addr
0x00075a18 and cpu addr 0x880088db5a18

It's also using bit 63 & 62. So this might be something to look into.

Bas Vermeulen
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: AMD E8860 on PowerPC with u-boot (T2080)

2018-02-21 Thread Bas Vermeulen
I got a 4.15.0 up and running on the board; it needs pci=noaer, but boots
up and sees the E8860 apart from that.

The relevant dmesg output:

[   10.888426] [drm] radeon kernel modesetting enabled.
[   10.892170] radeon 0001:01:00.0: runtime IRQ mapping not provided by arch
[   10.892407] [drm] initializing kernel modesetting (VERDE 0x1002:0x6822
0x1002:0x031E 0x00).
[   11.138410] ATOM BIOS: E268
[   11.139916] [drm] GPU not posted. posting now...
[   11.168970] radeon 0001:01:00.0: VRAM: 2048M 0x -
0x7FFF (2048M used)
[   11.176546] radeon 0001:01:00.0: GTT: 2048M 0x8000 -
0x
[   11.182909] [drm] Detected VRAM RAM=2048M, BAR=256M
[   11.186488] [drm] RAM width 128bits DDR
[   11.189121] [TTM] Zone  kernel: Available graphics memory: 1978102 kiB
[   11.194350] [TTM] Initializing pool allocator
[   11.197407] [TTM] Initializing DMA pool allocator
[   11.200858] [drm] radeon: 2048M of VRAM memory ready
[   11.204527] [drm] radeon: 2048M of GTT memory ready.
[   11.208211] [drm] Loading verde Microcode
[   11.225907] [drm] Internal thermal controller with fan control
[   11.230575] [drm] probing gen 2 caps for device 1957:830 = 73f443/e
[   11.247750] [drm] radeon: dpm initialized
[   11.268255] [drm] Found VCE firmware/feedback version 50.0.1 / 17!
[   11.273152] [drm] GART: num cpu pages 524288, num gpu pages 524288
[   11.281061] [drm] probing gen 2 caps for device 1957:830 = 73f443/e
[   11.286060] [drm] PCIE gen 3 link speeds already enabled
[   11.342009] [drm] PCIE GART of 2048M enabled (table at
0x001D6000).
[   11.347883] radeon 0001:01:00.0: WB enabled
[   11.350779] radeon 0001:01:00.0: fence driver on ring 0 use gpu addr
0x8c00 and cpu addr 0x7408d6c9
[   11.360274] radeon 0001:01:00.0: fence driver on ring 1 use gpu addr
0x8c04 and cpu addr 0x13c11aeb
[   11.369770] radeon 0001:01:00.0: fence driver on ring 2 use gpu addr
0x8c08 and cpu addr 0xd4ddd131
[   11.379267] radeon 0001:01:00.0: fence driver on ring 3 use gpu addr
0x8c0c and cpu addr 0x263a4d29
[   11.388763] radeon 0001:01:00.0: fence driver on ring 4 use gpu addr
0x8c10 and cpu addr 0x6ceb1503
[   11.399277] radeon 0001:01:00.0: fence driver on ring 5 use gpu addr
0x00075a18 and cpu addr 0x8935a463
[   11.419084] radeon 0001:01:00.0: failed VCE resume (-22).
[   11.423181] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[   11.428502] [drm] Driver supports precise vblank timestamp query.
[   11.433301] radeon 0001:01:00.0: radeon: MSI limited to 32-bit
[   11.437896] radeon 0001:01:00.0: radeon: using MSI.
[   11.441499] [drm] radeon: irq initialized.
[   12.127423] [drm:.r600_ring_test [radeon]] *ERROR* radeon: ring 0 test
failed (scratch(0x850C)=0xCAFEDEAD)
[   12.135788] radeon 0001:01:00.0: disabling GPU acceleration
[   12.320848] [drm] Radeon Display Connectors
[   12.323733] [drm] Connector 0:
[   12.325476] [drm]   DP-1
[   12.326711] [drm]   HPD1
[   12.327935] [drm]   DDC: 0x6530 0x6530 0x6534 0x6534 0x6538 0x6538
0x653c 0x653c
[   12.334035] [drm]   Encoders:
[   12.335691] [drm] DFP1: INTERNAL_UNIPHY1
[   12.338662] [drm] Connector 1:
[   12.340405] [drm]   DP-2
[   12.341625] [drm]   HPD4
[   12.342857] [drm]   DDC: 0x6560 0x6560 0x6564 0x6564 0x6568 0x6568
0x656c 0x656c
[   12.348957] [drm]   Encoders:
[   12.350622] [drm] DFP2: INTERNAL_UNIPHY1
[   12.353583] [drm] Connector 2:
[   12.355335] [drm]   DP-3
[   12.356557] [drm]   HPD5
[   12.357788] [drm]   DDC: 0x6540 0x6540 0x6544 0x6544 0x6548 0x6548
0x654c 0x654c
[   12.363888] [drm]   Encoders:
[   12.365543] [drm] DFP3: INTERNAL_UNIPHY2
[   12.368514] [drm] Connector 3:
[   12.370267] [drm]   DP-4
[   12.371487] [drm]   HPD6
[   12.372709] [drm]   DDC: 0x6570 0x6570 0x6574 0x6574 0x6578 0x6578
0x657c 0x657c
[   12.378808] [drm]   Encoders:
[   12.380464] [drm] DFP4: INTERNAL_UNIPHY2
[   12.508848] [drm] Cannot find any crtc or sizes
[   12.512716] [drm] Initialized radeon 2.50.0 20080528 for 0001:01:00.0 on
minor 0
[   13.636810] [drm] Cannot find any crtc or sizes

The failed VCE resume (-22) seems to be caused by

if (rdev->vce.vcpu_bo == NULL)
return -EINVAL;

in radeon_vce.c line 226. Any idea where to look from there?

Bas Vermeulen
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: AMD E8860 on PowerPC with u-boot (T2080)

2018-02-21 Thread Bas Vermeulen
On Wed, Feb 21, 2018 at 10:31 AM, Michel Dänzer <mic...@daenzer.net> wrote:

> On 2018-02-21 10:18 AM, Bas Vermeulen wrote:
> > On Wed, Feb 21, 2018 at 10:06 AM, Michel Dänzer <mic...@daenzer.net
> > <mailto:mic...@daenzer.net>> wrote:
> >
> > > My question is, what do I need to do to correctly initialize the
> E8860
> > > board on my powerpc machine?
> >
> > Start by sharing the dmesg output, and maybe also the kernel build
> > configuration file.
> >
> >
> > Both are attached (gzipped because of size).
>
> It might be related to this:
>
> [   10.482772] radeon: No coherent DMA available.
>
>
I updated my device-tree to add incoming pcie ranges, and that removes this
error:

[   10.161044] [drm] radeon kernel modesetting enabled.
[   10.165168] [drm] initializing kernel modesetting (VERDE 0x1002:0x6822
0x1002:0x031E).
[   10.171799] radeon: No coherent DMA available.
[   10.171831] [drm] register mmio base: 0x4100
[   10.171832] [drm] register mmio size: 262144
[   10.411061] ATOM BIOS: E268
[   10.412569] [drm] GPU not posted. posting now...
[   10.441831] radeon 0002:01:00.0: VRAM: 2048M 0x -
0x7FFF (2048M used)
[   10.449408] radeon 0002:01:00.0: GTT: 1024M 0x8000 -
0xBFFF
[   10.455771] [drm] Detected VRAM RAM=2048M, BAR=256M
[   10.459349] [drm] RAM width 128bits DDR
[   10.462455] [TTM] Zone  kernel: Available graphics memory: 1978634 kiB
[   10.467688] [TTM] Initializing pool allocator
[   10.470755] [TTM] Initializing DMA pool allocator
[   10.474194] [drm] radeon: 2048M of VRAM memory ready
[   10.477859] [drm] radeon: 1024M of GTT memory ready.
[   10.481549] [drm] Loading verde Microcode
[   10.500383] [drm] Internal thermal controller with fan control
[   10.505048] [drm] probing gen 2 caps for device 1957:830 = 73f443/e
[   10.522317] [drm] radeon: dpm initialized
[   10.539675] [drm] GART: num cpu pages 262144, num gpu pages 262144
[   10.546129] [drm] probing gen 2 caps for device 1957:830 = 73f443/e
[   10.551121] [drm] PCIE gen 3 link speeds already enabled
[   10.581276] [drm] PCIE GART of 1024M enabled (table at
0x00277000).
[   10.587142] radeon 0002:01:00.0: WB enabled
[   10.590019] radeon 0002:01:00.0: fence driver on ring 0 use gpu addr
0x8c00 and cpu addr 0xc000ed15bc00
[   10.599515] radeon 0002:01:00.0: fence driver on ring 1 use gpu addr
0x8c04 and cpu addr 0xc000ed15bc04
[   10.609008] radeon 0002:01:00.0: fence driver on ring 2 use gpu addr
0x8c08 and cpu addr 0xc000ed15bc08
[   10.618499] radeon 0002:01:00.0: fence driver on ring 3 use gpu addr
0x8c0c and cpu addr 0xc000ed15bc0c
[   10.627992] radeon 0002:01:00.0: fence driver on ring 4 use gpu addr
0x8c10 and cpu addr 0xc000ed15bc10
[   10.639273] radeon 0002:01:00.0: fence driver on ring 5 use gpu addr
0x00075a18 and cpu addr 0x880088db5a18
[   10.648762] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[   10.654078] [drm] Driver supports precise vblank timestamp query.
[   10.658873] radeon 0002:01:00.0: radeon: MSI limited to 32-bit
[   10.663455] radeon 0002:01:00.0: radeon: using MSI.
[   10.667069] [drm] radeon: irq initialized.
[   11.353989] [drm:.r600_ring_test [radeon]] *ERROR* radeon: ring 0 test
failed (scratch(0x850C)=0xCAFEDEAD)
[   11.362354] radeon 0002:01:00.0: disabling GPU acceleration
[   11.543395] [drm] Radeon Display Connectors
[   11.546272] [drm] Connector 0:
[   11.548027] [drm]   DP-1
[   11.549248] [drm]   HPD1
[   11.550471] [drm]   DDC: 0x6530 0x6530 0x6534 0x6534 0x6538 0x6538
0x653c 0x653c
[   11.556569] [drm]   Encoders:
[   11.558224] [drm] DFP1: INTERNAL_UNIPHY1
[   11.561192] [drm] Connector 1:
[   11.562941] [drm]   DP-2
[   11.564162] [drm]   HPD4
[   11.565384] [drm]   DDC: 0x6560 0x6560 0x6564 0x6564 0x6568 0x6568
0x656c 0x656c
[   11.571480] [drm]   Encoders:
[   11.573136] [drm] DFP2: INTERNAL_UNIPHY1
[   11.576103] [drm] Connector 2:
[   11.577846] [drm]   DP-3
[   11.579074] [drm]   HPD5
[   11.580297] [drm]   DDC: 0x6540 0x6540 0x6544 0x6544 0x6548 0x6548
0x654c 0x654c
[   11.586393] [drm]   Encoders:
[   11.588057] [drm] DFP3: INTERNAL_UNIPHY2
[   11.591023] [drm] Connector 3:
[   11.592767] [drm]   DP-4
[   11.593987] [drm]   HPD6
[   11.595216] [drm]   DDC: 0x6570 0x6570 0x6574 0x6574 0x6578 0x6578
0x657c 0x657c
[   11.601313] [drm]   Encoders:
[   11.602978] [drm] DFP4: INTERNAL_UNIPHY2
[   11.692728] radeon 0002:01:00.0: No connectors reported connected with
modes
[   11.698480] [drm] Cannot find any crtc or sizes - going 1024x768
[   11.708402] [drm] fb mappable at 0xC60478000
[   11.711369] [drm] vram apper at 0xC6000
[   11.714242] [drm] size 3145728
[   11.715993] [drm] fb depth is 24
[   11.717910] [drm]pitch is 4096
[   11.720091] radeon 0002:01:00.0

Re: AMD E8860 on PowerPC with u-boot (T2080)

2018-02-21 Thread Bas Vermeulen
On Wed, Feb 21, 2018 at 10:36 AM, Michel Dänzer <mic...@daenzer.net> wrote:

> On 2018-02-21 09:49 AM, Bas Vermeulen wrote:
> > Hi,
> >
> > I am unsure if this is the right place to ask, but it seems relevant.
> >
> > I am trying to use an AMD E8860 (SI) board connected to an E6500 PowerPC
> > board (T2080RDB from NXP).
>
> BTW, looks like the CPU runs in big endian mode
> (CONFIG_CPU_BIG_ENDIAN=y), doesn't it? If so, be warned that this is
> just the tip of the iceberg. The Mesa radeonsi driver doesn't work on
> big endian hosts yet, fixing that would involve a lot of work and pain.
> And without that, you won't be able to actually use any hardware
> acceleration.
>

Understood. At the moment I want to understand what I am doing wrong in
regards to the kernel part,
I'll cross the userspace bridge when I get there. The end-goal is a
completely different (real-time) OS,
and understanding how things work will help in any case.

Bas Vermeulen
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: AMD E8860 on PowerPC with u-boot (T2080)

2018-02-21 Thread Bas Vermeulen
On Wed, Feb 21, 2018 at 10:31 AM, Christian König <christian.koe...@amd.com>
wrote:

> Am 21.02.2018 um 10:23 schrieb Bas Vermeulen:
>
> On Wed, Feb 21, 2018 at 10:14 AM, Christian König <
> ckoenig.leichtzumer...@gmail.com> wrote:
>
>> Am 21.02.2018 um 10:06 schrieb Michel Dänzer:
>>
>>> On 2018-02-21 09:49 AM, Bas Vermeulen wrote:
>>>
>>>> Hi,
>>>>
>>>> I am unsure if this is the right place to ask, but it seems relevant.
>>>>
>>>
>> Well this list is certainly the right place to ask :)
>
>
> That's what I was hoping for :)
>
>
>>
>> I am trying to use an AMD E8860 (SI) board connected to an E6500 PowerPC
>>>> board (T2080RDB from NXP).
>>>> The T2080RDB does not use a BIOS, and uses u-boot to bootstrap Linux.
>>>>
>>>> I have the E8860 connected to a PCIe x4 slot with an adapter. The kernel
>>>> is a 4.1, with DRM included in the kernel and the radeon as a module.
>>>> The radeon driver detects the card, notices the BIOS hasn't posted and
>>>> starts things up.
>>>> After that, the ring tests get run, and fails on the ring 0 test,
>>>> disabling acceleration. The graphics card is (or seems to be) working
>>>> apart from that, the driver starts up and sees the connectors on the
>>>> board.
>>>>
>>>> When I compare dmesg on an x86 machine and the PPC machine, I see that
>>>> the x86 machine loads a lot more firmware from the kernel (probably the
>>>> acceleration parts?).
>>>>
>>> FWIW, that's probably just a subsequent symptom due to the ring test
>>> failure.
>>>
>>
>> Could be, but IIRC we load all the firmware first then initialize things
>> and then do the ring tests when we try to start the rings.
>>
>> BTW: What driver are you using? radeon or amdgpu?
>
>
> This is a south-island or sea-island chip, so using radeon.
>
>
> Well SI is also supported by amdgpu, I would give that a try as well.
>

Didn't know that,


> And BTW please try a more recent kernel as well, 4.1 is rather old.
>

Somewhat easier said than done; it's an NXP board, and they only supply 4.1
at the moment.
I'll see if I can upgrade to 4.15.x.


>
>
>
>
>>
>> My question is, what do I need to do to correctly initialize the E8860
>>>> board on my powerpc machine?
>>>>
>>> Start by sharing the dmesg output, and maybe also the kernel build
>>> configuration file.
>>>
>>
>> Maybe also open a bug report to attach the dmesg, see
>> bugs.freedesktop.org.
>>
>
> Sure. What project does the radeon driver fall under? I couldn't find the
> right category under Mesa, not sure what
> to file it under.
>
>
> Product DRI and then select DRM/Radeon as component.
>

Gotcha.

Bas Vermeulen
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: AMD E8860 on PowerPC with u-boot (T2080)

2018-02-21 Thread Bas Vermeulen
On Wed, Feb 21, 2018 at 10:14 AM, Christian König <
ckoenig.leichtzumer...@gmail.com> wrote:

> Am 21.02.2018 um 10:06 schrieb Michel Dänzer:
>
>> On 2018-02-21 09:49 AM, Bas Vermeulen wrote:
>>
>>> Hi,
>>>
>>> I am unsure if this is the right place to ask, but it seems relevant.
>>>
>>
> Well this list is certainly the right place to ask :)


That's what I was hoping for :)


>
> I am trying to use an AMD E8860 (SI) board connected to an E6500 PowerPC
>>> board (T2080RDB from NXP).
>>> The T2080RDB does not use a BIOS, and uses u-boot to bootstrap Linux.
>>>
>>> I have the E8860 connected to a PCIe x4 slot with an adapter. The kernel
>>> is a 4.1, with DRM included in the kernel and the radeon as a module.
>>> The radeon driver detects the card, notices the BIOS hasn't posted and
>>> starts things up.
>>> After that, the ring tests get run, and fails on the ring 0 test,
>>> disabling acceleration. The graphics card is (or seems to be) working
>>> apart from that, the driver starts up and sees the connectors on the
>>> board.
>>>
>>> When I compare dmesg on an x86 machine and the PPC machine, I see that
>>> the x86 machine loads a lot more firmware from the kernel (probably the
>>> acceleration parts?).
>>>
>> FWIW, that's probably just a subsequent symptom due to the ring test
>> failure.
>>
>
> Could be, but IIRC we load all the firmware first then initialize things
> and then do the ring tests when we try to start the rings.
>
> BTW: What driver are you using? radeon or amdgpu?


This is a south-island or sea-island chip, so using radeon.


>
> My question is, what do I need to do to correctly initialize the E8860
>>> board on my powerpc machine?
>>>
>> Start by sharing the dmesg output, and maybe also the kernel build
>> configuration file.
>>
>
> Maybe also open a bug report to attach the dmesg, see bugs.freedesktop.org
> .
>

Sure. What project does the radeon driver fall under? I couldn't find the
right category under Mesa, not sure what
to file it under.

Bas Vermeulen
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: AMD E8860 on PowerPC with u-boot (T2080)

2018-02-21 Thread Bas Vermeulen
On Wed, Feb 21, 2018 at 10:06 AM, Michel Dänzer <mic...@daenzer.net> wrote:

> On 2018-02-21 09:49 AM, Bas Vermeulen wrote:
> > Hi,
> >
> > I am unsure if this is the right place to ask, but it seems relevant.
> >
> > I am trying to use an AMD E8860 (SI) board connected to an E6500 PowerPC
> > board (T2080RDB from NXP).
> > The T2080RDB does not use a BIOS, and uses u-boot to bootstrap Linux.
> >
> > I have the E8860 connected to a PCIe x4 slot with an adapter. The kernel
> > is a 4.1, with DRM included in the kernel and the radeon as a module.
> > The radeon driver detects the card, notices the BIOS hasn't posted and
> > starts things up.
> > After that, the ring tests get run, and fails on the ring 0 test,
> > disabling acceleration. The graphics card is (or seems to be) working
> > apart from that, the driver starts up and sees the connectors on the
> board.
> >
> > When I compare dmesg on an x86 machine and the PPC machine, I see that
> > the x86 machine loads a lot more firmware from the kernel (probably the
> > acceleration parts?).
>
> FWIW, that's probably just a subsequent symptom due to the ring test
> failure.
>

Gotcha.


> > My question is, what do I need to do to correctly initialize the E8860
> > board on my powerpc machine?
>
> Start by sharing the dmesg output, and maybe also the kernel build
> configuration file.
>

Both are attached (gzipped because of size).

The card gets initialized of a sorts, and there are no PCIE errors (using a
slightly different
setup for the PCIe controllers in my device-tree for the board results in
PCIe errors being thrown).

Bas Vermeulen


defconfig.e8860.gz
Description: GNU Zip compressed data


dmesg.e8860.gz
Description: GNU Zip compressed data
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


AMD E8860 on PowerPC with u-boot (T2080)

2018-02-21 Thread Bas Vermeulen
Hi,

I am unsure if this is the right place to ask, but it seems relevant.

I am trying to use an AMD E8860 (SI) board connected to an E6500 PowerPC
board (T2080RDB from NXP).
The T2080RDB does not use a BIOS, and uses u-boot to bootstrap Linux.

I have the E8860 connected to a PCIe x4 slot with an adapter. The kernel is
a 4.1, with DRM included in the kernel and the radeon as a module. The
radeon driver detects the card, notices the BIOS hasn't posted and starts
things up.
After that, the ring tests get run, and fails on the ring 0 test, disabling
acceleration. The graphics card is (or seems to be) working apart from
that, the driver starts up and sees the connectors on the board.

When I compare dmesg on an x86 machine and the PPC machine, I see that the
x86 machine loads a lot more firmware from the kernel (probably the
acceleration parts?).

My question is, what do I need to do to correctly initialize the E8860
board on my powerpc machine?
Is there some documentation you can point me to, or someone to ask?

Bas Vermeulen
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx