Minimal GPU setup

Deucher, Alexander Alexander.Deucher at amd.com
Mon Feb 7 16:27:07 UTC 2022


[AMD Official Use Only]

Most of the register programming in evergreen_gpu_init is required.  That code handles things like harvesting (e.g., disabling bad hardware resources) and setting sane asic specific settings in some registers.  If you don't do it, work may get scheduled to bad or incorrectly configured hardware blocks which will lead to hangs or corrupted results.  You can probably skip some of them, but I don't remember what is minimally required off hand.  It's generally a good idea to re-initialize those registers anyway in case someone has previously messed with them (e.g., manual register munging or GPU passed through to a VM etc.).

Posting the bios is enough to get you a working memory controller and enough asic setup to light up displays (basically what you need for pre-OS console).  As Christian mentioned, loading the ucodes will get the associated engines working so that you can start feeding commands to the GPU, but without proper configuration of the various hardware blocks on the GPU, you may not have success in feeding data to the GPU.

Alex


________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Amol <suratiamol at gmail.com>
Sent: Saturday, February 5, 2022 4:47 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Subject: Minimal GPU setup

Hello,

I am learning to program Radeon HD 7350 by reading the radeon
driver source in Linux, and the guides/manuals from AMD.

I understand the general flow of initialization the driver performs. I
have also been able to understand and re-implement the ATOM
BIOS virtual machine.

I am trying to program the device up from scratch (i.e. bare-metal).
Do I need to perform all those steps that the driver does? Reading
the evergreen_gpu_init function is demotivating; it initializes many
fields and registers which I suspect may not be required for a minimal
setup.

Is posting the BIOS and loading the microcode enough to get me started
with running basic tasks (DMA transfers, simple packet processing, etc.)?

Thanks,
Amol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20220207/f2c63504/attachment.htm>


More information about the amd-gfx mailing list