Minimal GPU setup
Amol
suratiamol at gmail.com
Tue Feb 8 09:34:36 UTC 2022
Thank you Christian.
On 06/02/2022, Christian König <christian.koenig at amd.com> wrote:
> Hi Amol,
>
> Am 05.02.22 um 10:47 schrieb Amol:
. . .
>> Is posting the BIOS and loading the microcode enough to get me started
>> with running basic tasks (DMA transfers, simple packet processing, etc.)?
>
> Well yes and no. As bare minimum you need the following:
> 1. Firmware loading
> 2. Memory management
> 3. Ring buffer setup
> 4. Hardware initialization
>
> When that is done you can write commands into the ring buffers of the CP
> or SDMA and see if they are executed (see the *_ring_test() functions in
> the driver). SDMA is usually easier to get working.
The DMA-ring-test of making the SDMA write into a WB location in the
system RAM succeeded.
The sequence followed mimics what the Linux driver does for the most part,
until evergreen_gpu_init. That and the portions of power mgmt, interrupt mgmt,
indirect buffer mgmt, the entire _modeset_init were skipped for now.
The WB and the CP, DMA ring buffers are PAGE_SIZE buffers in the system
RAM. GTT is a 512-entries table, in the BAR0 aperture, appropriately filled in
to map the WB, CP and DMA buffers.
>
> When you got that working you can worry about IB (indirect buffers)
> which are basically subroutines calls written into the ring buffers.
>
> Most commands (like copy from A to B, fill something, write value X to
> memory or write X into register Y) can be used from the ring buffers
> directly, but IIRC some context switching commands which are part of the
> rendering process require special handling.
>
> But keep in mind that all of this will just be horrible slow because the
> ASIC runs with the bootup clocks which are something like 100Mhz or even
> only 17Mhz on very old models. To change that you need to implement
> power management, interrupt handling etc etc....
Understood. Yes, the DPM and the IH portions. I think by programming only
for the hardware I have I can manage to set them up with comparatively less
effort.
Thanks,
Amol
>
> Good luck,
> Christian.
>
>>
>> Thanks,
>> Amol
>
>
More information about the amd-gfx
mailing list