OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 6:58 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Radeon display core register map
PostPosted: Sun Oct 23, 2022 7:47 am 
Offline
Member
Member
User avatar

Joined: Mon Jan 15, 2018 2:27 pm
Posts: 201
I am thinking about buying a bundle of some older AMD graphics cards for experimenting (mostly Northern Islands GPUs). I can find a lot of documentation for their ISA and 3D engine, but not much about 2D (modesetting and stuff). All I know is that they use DCE5 display engine. I bet I could reverse Linux drivers, but that's a lot of work. Am I missing something?


Top
 Profile  
 
 Post subject: Re: Radeon display core register map
PostPosted: Wed Oct 26, 2022 12:35 am 
Offline
Member
Member

Joined: Sat Jul 02, 2016 7:02 am
Posts: 207
In order to configure the device, there does not seem to be any alternative to Linux sources.

One can cut down on the amount of code that needs to be written by noting down the exact versions of the structures that your particular card must adhere to.

The major steps involved in configuring the device are:

(1) Implementing the ATOMBIOS virtual machine.
(2) POSTing the BIOS by executing the ATOM_CMD_INIT table (on the said virtual machine)
(3) Loading the microcode and 'golden' registers.
(4) Intializing the power manager (DPM) to the default clock and voltage.
(5) Initializing the rings (DMA, IH, GFX). The drivers also run simple tests on GFX and DMA rings to see that the rings are setup correctly and that the GPU responds to the commands. You can initially set up a target to reach this state, since it helps confirm that the above steps at least bring the GPU where its command processor is in a working condition.
(6) Setting up GART (seems optional if you do not have a need for it). This is the reverse of the PCIe window. Through GART, the GPU can access page frames of system RAM.
(7) Modesetting the selected mode (initializing the crtc, encoder, and connectors, and changing the power state to correspond to the selected mode. The virtual machine again is utilized here).

Scanning the Linux driver source first should help you reach the understanding of the general layout of the steps.

The ATOMBIOS itself can be dissassembled to see what code its runs. Dissassemblers such as AtomDis are available on the web. But, there's no need to disassemble the BIOS for normal functioning of the card; make sure that the virtual machine instructions are implemented correctly, else incorrect implementations can potentially hang the host system (even if the card is passed through to a x86 VM) while running the BIOS code.

There are old demos that you can find in order to get an idea about filling up the command streams.
One such demo is here: https://gitlab.freedesktop.org/mesa/r600_demo.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], SemrushBot [Bot] and 62 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group