ChanServ changed the topic of #etnaviv to: #etnaviv - the home of the reverse-engineered Vivante GPU driver - Logs https://oftc.irclog.whitequark.org/etnaviv
larunbe has joined #etnaviv
alarumbe has quit [Ping timeout: 480 seconds]
frieder has joined #etnaviv
larunbe has quit []
SpieringsAE has joined #etnaviv
lynxeye has joined #etnaviv
alarumbe has joined #etnaviv
SpieringsAE has quit [Quit: SpieringsAE]
gerddie has joined #etnaviv
<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.
<austriancoder> gerddie: how big are the buffers you need? They might fit into the kernel internal cmdbuffer. then you get the address like done for the link opcode: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/etnaviv/etnaviv_buffer.c?h=v6.15#n173
<gerddie> The size is less than 2k
<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]
tlwoerner_ has joined #etnaviv
tlwoerner has quit [Ping timeout: 480 seconds]
lynxeye has quit [Quit: Leaving.]