<gerddie>
austriancoder: right now I'm trying to understand what I have to submit as address for the image and the shader. What I do is get some buffer by using 'etnaviv_cmdbuf_init(gpu->drm->dev_private->cmdbuf_suballoc, &payload_buffer, buffer_size)' . Then I fill the input image at offset 0 of this buffer and the shader at some other offset. This seems
<gerddie>
to go fine. When I emit the command stream I tried a few things as buffer base address, but either the system crashes or I get an AXI bus error, and the flop reset doesn't work. So what would be the equivalend of "buffer->va" that is used in userspace by "etna_cmd_stream_reloc"? (I assume "use_softpin", because this is what it is using with the
<gerddie>
user space code on this hardware). The code is called at the end of "etnaviv_gpu_hw_init"
<lynxeye>
gerddie: If you got a cmdbuf etnaviv_cmdbuf_get_va will tell you its address in the GPU address space.
<lynxeye>
gerddie: However you won't even have a address space in etnaviv_gpu_hw_init yet. The right place to slot in this buffer is etnaviv_gpu_start_fe_idleloop, just like the iommuv2 initialization.
<austriancoder>
gerddie: the internal command buffer is SZ_4K
<lynxeye>
austriancoder: The kernel ring buffer is 4K. The cmdbuf suballoc region that's used when allocating a cmdbuf via etnaviv_cmdbuf_init is 512K, so 2K should be no problem.
<austriancoder>
jup
<gerddie>
lynxeye: etnaviv_gpu_start_fe_idleloop is called from etnaviv_gpu_submit, so should I add some other flag that would make sure that the flop reset is only run once after poweron/reset ?
<austriancoder>
gerddie: there is already something in place: gpu->state == ETNA_GPU_STATE_INITIALIZED
<austriancoder>
etnaviv_gpu_start_fe_idleloop sets gpu->state to ETNA_GPU_STATE_RUNNING
<gerddie>
austriancoder lynxeye Okay, thanks for your pointers, I think this unblocked me for the moment
<lynxeye>
exactly, start_fe_idleloop is only called when the GPU has actually been stopped before due to runtime PM or right out of reset
frieder has quit [Remote host closed the connection]