Korona wrote:
Do you set the base address of the framebuffer? You could dump the GTT and see if it has memory mapped or not.
By "only access it through the BAR" I meant that you're not supposed to look up the physical addresses of the pages mapped to the GTT and manipulate them directly (e.g. if the GTT maps page 0x1234000 to offset 0, you're not supposed to change the framebuffer through physical address 0x1234000 but through offset 0 of the BAR). While such accesses work for some usages, they cause cache coherency issues for others (including framebuffer access, IIRC).
If you mean PLANE_SURF (DSPASURF) then yes, I set it to 0. (Doe, Linux sets it to 0x010C0000 on my machine, where does that address come from?)
It says in the manual: "It represents an offset from the graphics memory aperture base and is mapped to physical pages through the global GTT".
I always thought of it as an offset from the BAR? Is that wrong?
"...and is mapped to" by who, me or the card itself?
I'm not "looking anything up" really, not touching the GTT at all.
Edit:
GTT dump:
01 00 00 7C 00 00 00 00 01 10 00 7C 00 00 00 00
01 20 00 7C 00 00 00 00 01 30 00 7C 00 00 00 00
01 40 00 7C 00 00 00 00 01 50 00 7C 00 00 00 00
01 60 00 7C 00 00 00 00 01 70 00 7C 00 00 00 00
....you get the idea