Skip to contentSkip to conversation

Card's view of framebuffer offset into userspace?

Linux-fbdev-users Petr Vandrovec 2 participants 2 messages Jul 15, 2002 1 message not in the archive Framebuffer layer

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 3 lines · Ville Syrjälä

Is there a way to ge the framebuffer offset to userspace? I hacked DirectFB to draw to the crtc2 display but currently I've had to hardcode the framebuffer offset. So I need something I can feed to tmy G400.

In what environment? With matroxfb you have special framebuffer which is displayed by CRTC2 engine. Offset is not explicitly exported, but if you'll take low 24 bits from fb_start, you'll get offset on G400/G450/G550 devices.

Accessing CRTC2's memory through primary head's framebuffer is not supported.
Best regards,
Petr Vandrovec [email protected]

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#2 lore raw
Quoted 7 lines · Petr Vandrovec
Quoted 3 lines · Ville Syrjälä

Is there a way to ge the framebuffer offset to userspace? I hacked DirectFB to draw to the crtc2 display but currently I've had to hardcode the framebuffer offset. So I need something I can feed to tmy G400.

In what environment? With matroxfb you have special framebuffer which is displayed by CRTC2 engine.

Yes. That's what DirectFB uses for mode switching and buffer flipping. But I need something for the DSTORG,SRCORG and TEXORG registers. DirectFB uses it's own memory manager and the offsets there start from the beginning of the framebuffer. It assumes the hardware sees the framebuffer at offset 0 but with the CRTC2 that's not true.

Quoted 3 lines

Offset is not explicitly exported, but
if you'll take low 24 bits from fb_start, you'll get offset on G400/G450/G550 devices.

I don't see such a thing anywhere. Do you mean smem_start? Ok just tried with (smem_start + offset & 0x1ffffff) and it works for both heads. So that's actually 25 bits. Maybe I should just use 28 bits to accomodate larger framebuffers?

Signature · 9 lines
Ville Syrjälä
[email protected]
http://www.sci.fi/~syrjala/


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf