Information resources
I'm looking for resources I can read to learn more. I mostly have some basic questions that are probably in a FAQ or something, so if someone could point me the right way I'd appreciate it.
Specifically some of the things I have been wondering are:
1) It looks like the firmware is in the kernel tree in HEX file form. Where can I find the source code?
2) What is a "fence"?
Quoted 4 lines · Phillip Susi
I'm looking for resources I can read to learn more. I mostly have some basic questions that are probably in a FAQ or something, so if someone could point me the right way I'd appreciate it.
dri.freedesktop.org has most informations we have (which is not a lot) There is doc in kernel also about drm, high level.
Quoted 4 lines
Specifically some of the things I have been wondering are:
1) It looks like the firmware is in the kernel tree in HEX file form. Where can I find the source code?
We don't have source of firmware, only nouveau is reverse engineering the nvidia one.
Quoted 1 line
2) What is a "fence"?
It's what it means, it tell the cpu when the gpu reached some point in command stream or resource usage so we know we can free or move memory that was previously in use. Or simply to know when gpu is done doing somethings.
Cheers,
Jerome Glisse
Quoted 2 lines · Jerome Glisse
We don't have source of firmware, only nouveau is reverse engineering the nvidia one.
Then where does the firmware come from? I've been glancing at the AMD documentation for the R600 and I'd like to figure out why the firmware seems to be running in an infinite loop without ever halting, and driving the temperature of my card over 80 C, but I need the original assembly code for that.
Quoted 6 lines
Quoted 1 line
2) What is a "fence"?
It's what it means, it tell the cpu when the gpu reached some point in command stream or resource usage so we know we can free or move memory that was previously in use. Or simply to know when gpu is done doing somethings.
So it is kind of like a barrier in the IO world? You put a dozen commands into the pipeline and then a fence, and when they all complete, the fence gives you feedback so you know?
Quoted 9 lines · Phillip Susi
Quoted 2 lines · Jerome Glisse
We don't have source of firmware, only nouveau is reverse engineering the nvidia one.
Then where does the firmware come from? I've been glancing at the AMD documentation for the R600 and I'd like to figure out why the firmware seems to be running in an infinite loop without ever halting, and driving the temperature of my card over 80 C, but I need the original assembly code for that.
How do you know its running in an infinite loop?
the firmware comes in blobs from AMD.
Quoted 11 lines
Quoted 7 lines
Quoted 2 lines
2) What is a "fence"?
It's what it means, it tell the cpu when the gpu reached some point in command stream or resource usage so we know we can free or move memory that was previously in use. Or simply to know when gpu is done doing somethings.
So it is kind of like a barrier in the IO world? You put a dozen commands into the pipeline and then a fence, and when they all complete, the fence gives you feedback so you know?
Pretty much yes.
Dave.
Quoted 1 line · Dave Airlie
How do you know its running in an infinite loop?
Because the gpu temperature is rising to over 80 C, so it is busy doing something. And this is booting with init=/bin/bash, so NOTHING is running that could be keeping it busy.
I had been under the impression that since ati/amd started releasing documentation a few years ago that the mesa driver had managed to implement its own firmware. I sounds more like it has ripped the firmware out of the proprietary driver and reverse engineered the interface?
Quoted 6 lines · Phillip Susi
Quoted 1 line · Dave Airlie
How do you know its running in an infinite loop?
Because the gpu temperature is rising to over 80 C, so it is busy doing something. And this is booting with init=/bin/bash, so NOTHING is running that could be keeping it busy.
So you made an assumpution you knew how graphics cards worked and derived a theory, unfortunately the assumption was wrong.
a GPU doing nothing still runs at a high clock speed, clocking the memory bus for the video RAM at full tilt. We don't have reliably dynamic power management yet so at the moment manual clock switching is all we have.
Even if the CP was running in a tight loop it consumes no power compared to the memory interfaces.
Quoted 5 lines
I had been under the impression that since ati/amd started releasing documentation a few years ago that the mesa driver had managed to implement its own firmware. I sounds more like it has ripped the firmware out of the proprietary driver and reverse engineered the interface?
Yes and no. AMD supplied firmware from their driver with the interfaces documented like they have done since r100. You could write your own microcode after you RE and write an assembler for the CP core, but so far nobody has done this and we have a lot of other areas to improve before most of the developers would care.
Dave.
I am going to have to get caught up on the development chain. I dropped off for a while while I pursued my MS degree and concentrated on paying the bills, but I am going to have to get back into the thick of coding. I am going through withdrawal. Management courses and systems administration tasks are enough to drive any good developer to blog on facebook.
Quoted 32 lines · Dave Airlie
Quoted 6 lines · Phillip Susi
Quoted 1 line · Dave Airlie
How do you know its running in an infinite loop?
Because the gpu temperature is rising to over 80 C, so it is busy doing something. And this is booting with init=/bin/bash, so NOTHING is running that could be keeping it busy.
So you made an assumpution you knew how graphics cards worked and derived a theory, unfortunately the assumption was wrong.
a GPU doing nothing still runs at a high clock speed, clocking the memory bus for the video RAM at full tilt. We don't have reliably dynamic power management yet so at the moment manual clock switching is all we have.
Even if the CP was running in a tight loop it consumes no power compared to the memory interfaces.
Quoted 5 lines
I had been under the impression that since ati/amd started releasing documentation a few years ago that the mesa driver had managed to implement its own firmware. I sounds more like it has ripped the firmware out of the proprietary driver and reverse engineered the
interface?
Yes and no. AMD supplied firmware from their driver with the interfaces documented like they have done since r100. You could write your own microcode after you RE and write an assembler for the CP core, but so far nobody has done this and we have a lot of other areas to improve before most of the developers would care.
Quoted 7 lines
Dave.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 2 lines · Dave Airlie
So you made an assumpution you knew how graphics cards worked and derived a theory, unfortunately the assumption was wrong.
How so? After studying the R600 documentation I found, it sounds like whatever microcode is in that firmware image is constantly running, trying to process input from the ring buffer. Perhaps you could point me to more documentation to read, as the one I found seemed to be geared more towards GPGPU programming.
Quoted 4 lines
a GPU doing nothing still runs at a high clock speed, clocking the memory bus for the video RAM at full tilt. We don't have reliably dynamic power management yet so at the moment manual clock switching is all we have.
If it were actually doing nothing ( as opposed to busy waiting ), then it wouldn't be hammering the memory bus full tilt.
Quoted 2 lines
Even if the CP was running in a tight loop it consumes no power compared to the memory interfaces.
How so? The memory interface feeds requested data to the CP, so if it isn't running...
Quoted 5 lines
Yes and no. AMD supplied firmware from their driver with the interfaces documented like they have done since r100. You could write your own microcode after you RE and write an assembler for the CP core, but so far nobody has done this and we have a lot of other areas to improve before most of the developers would care.
Could you point me to this documentation?
Quoted 10 lines · Phillip Susi
Quoted 3 lines · Dave Airlie
So you made an assumpution you knew how graphics cards worked and derived a theory, unfortunately the assumption was wrong.
How so? After studying the R600 documentation I found, it sounds like whatever microcode is in that firmware image is constantly running, trying to process input from the ring buffer. Perhaps you could point me to more documentation to read, as the one I found seemed to be geared more towards GPGPU programming.
The CP only starts fetching and processing commands when the read and write pointers are different. Once they are the same, the CP stops executing. See Chapter 5 of this doc:
http://www.x.org/docs/AMD/R5xx_Acceleration_v1.5.pdf
It's for r5xx hardware, but the CP works the same way on all radeons.
Quoted 8 lines
Quoted 5 lines
a GPU doing nothing still runs at a high clock speed, clocking the memory bus for the video RAM at full tilt. We don't have reliably dynamic power management yet so at the moment manual clock switching is all we have.
If it were actually doing nothing ( as opposed to busy waiting ), then it wouldn't be hammering the memory bus full tilt.
The memory clock is still running at whatever clock it's set to unless you manually change it. Things are like displays are constantly being fed from vram.
Quoted 7 lines
Quoted 3 lines
Even if the CP was running in a tight loop it consumes no power compared to the memory interfaces.
How so? The memory interface feeds requested data to the CP, so if it isn't running...
Quoted 7 lines
Quoted 5 lines
Yes and no. AMD supplied firmware from their driver with the interfaces documented like they have done since r100. You could write your own microcode after you RE and write an assembler for the CP core, but so far nobody has done this and we have a lot of other areas to improve before most of the developers would care.
Could you point me to this documentation?
See chapter 6 of this doc for pre6xx asics:
http://www.x.org/docs/AMD/R5xx_Acceleration_v1.5.pdf
and this chapter 5 of this doc for 6xx+ asics:
http://www.x.org/docs/AMD/R6xx_R7xx_3D.pdf
Alex
Quoted 6 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 3 lines · Alex Deucher
The memory clock is still running at whatever clock it's set to unless you manually change it. Things are like displays are constantly being fed from vram.
Sure, the master clock is still running, but the dac only reads from the frame buffer so fast. Most of the clocks should be idle ( no read or write line asserted, no addressing, etc ) so it shouldn't be dissipating THAT much heat should it?
Quoted 11 lines · Phillip Susi
Quoted 4 lines · Alex Deucher
The memory clock is still running at whatever clock it's set to unless you manually change it. Things are like displays are constantly being fed from vram.
Sure, the master clock is still running, but the dac only reads from the frame buffer so fast. Most of the clocks should be idle ( no read or write line asserted, no addressing, etc ) so it shouldn't be dissipating THAT much heat should it?
The clocks branches are all on and as I said before, clock gating isn't implemented yet on newer asics.
Alex
The infinite loop you mentioned sounds like it could be several things. Polling could explain an infinite loop - "while true {checkForUpdates();}". Such code was common enough in some videi games, too. I think that mechanism has been replaced by scheduled and periodic checks in most cases, but you could have some old code running somewhere.
Sent from my iPhone
Quoted 24 lines · Phillip Susi
Quoted 2 lines · Jerome Glisse
We don't have source of firmware, only nouveau is reverse engineering the nvidia one.
Then where does the firmware come from? I've been glancing at the AMD documentation for the R600 and I'd like to figure out why the firmware seems to be running in an infinite loop without ever halting, and driving the temperature of my card over 80 C, but I need the original assembly code for that.
Quoted 6 lines
Quoted 1 line
2) What is a "fence"?
It's what it means, it tell the cpu when the gpu reached some point in command stream or resource usage so we know we can free or move memory that was previously in use. Or simply to know when gpu is done doing somethings.
So it is kind of like a barrier in the IO world? You put a dozen commands into the pipeline and then a fence, and when they all complete, the fence gives you feedback so you know?
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Phillip Susi
Quoted 2 lines · Jerome Glisse
We don't have source of firmware, only nouveau is reverse engineering the nvidia one.
Then where does the firmware come from? I've been glancing at the AMD documentation for the R600 and I'd like to figure out why the firmware seems to be running in an infinite loop without ever halting, and driving the temperature of my card over 80 C, but I need the original assembly code for that.
The CP firmware has nothing to do with the temperature. The CP firmware is just a packet parser for reading in command buffers and programming the register backbone. Just alike a CPU, the GPU runs at whatever speed it's clock is set to. You can manually force lower power states using sysfs. See the power management section of this page:
http://wiki.x.org/wiki/RadeonFeature
Alex
Quoted 16 lines
Quoted 7 lines
Quoted 2 lines
2) What is a "fence"?
It's what it means, it tell the cpu when the gpu reached some point in command stream or resource usage so we know we can free or move memory that was previously in use. Or simply to know when gpu is done doing somethings.
So it is kind of like a barrier in the IO world? You put a dozen commands into the pipeline and then a fence, and when they all complete, the fence gives you feedback so you know?
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Alex Deucher
The CP firmware has nothing to do with the temperature. The CP firmware is just a packet parser for reading in command buffers and programming the register backbone. Just alike a CPU, the GPU runs at whatever speed it's clock is set to. You can manually force lower power states using sysfs. See the power management section of this page:
http://wiki.x.org/wiki/RadeonFeature
I have tried writing low to power_profile and it seems to make little to no difference. A cpu executing a tight loop busy waiting for something to do wastes a lot more power than one that has executed a HLT instruction, or used even better stop states to gate off clocks that are not needed. It seems to me that when there is nothing for the GPU to do, it also should stop executing instructions and gate off any unneeded clocks.
Quoted 10 lines · Phillip Susi
Quoted 8 lines · Alex Deucher
The CP firmware has nothing to do with the temperature. The CP firmware is just a packet parser for reading in command buffers and programming the register backbone. Just alike a CPU, the GPU runs at whatever speed it's clock is set to. You can manually force lower power states using sysfs. See the power management section of this page:
http://wiki.x.org/wiki/RadeonFeature
Quoted 7 lines
I have tried writing low to
power_profileand it seems to make little to no difference. A cpu executing a tight loop busy waiting for something to do wastes a lot more power than one that has executed a HLT instruction, or used even better stop states to gate off clocks that are not needed. It seems to me that when there is nothing for the GPU to do, it also should stop executing instructions and gate off any unneeded clocks.
It only executes instructions when you tell it to; it's not running constantly. At the moment clock gating support is not implemented on newer asics.
Alex