DirectFB - Home of the pragmatist Roadmap

[directfb-dev] Re: Non-working AGP hack
Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[directfb-dev] Re: Non-working AGP hack

On Tue, 2002-06-18 at 13:23, Ville Syrjälä wrote:
> I tried to glue some AGP stuff to DirectFB and G400 (patch included). So
> far all it manages to do is hang my system. I'm still able to use the
> magic sysrq key to reboot with my disks clean. It's supposed to put all
> video surfaces into AGP memory.
> I haven't found any decent docs on the agpgart interface so I'm not sure
> if what I'm doing is correct. Currently I allocate 64MB of AGP memory but
> I adjust the heap offset to 32MB so only the upper half of that gets used.
> This way I can check if the buffer is in card memory or AGP memory. Card <
> 32MB, AGP >= 32MB. 
I haven't read the code thoroughly nor tested the patch since I don't
have a matrox card.  But from what I can see, the agp bind offset is at
32MB, and then you tell the driver that the framebuffer pointer is at
that offset (state->destination->video.offset).  Unfortunately, that
will not coincide with the framebuffer drivers's internal pointer and
buffer length (fix->smem_start and fix->smem_len) which is probably at
offset 0 and size == card vidmem length.  From the point of view of the
framebuffer driver, the AGP surface is not displayable.  And you will
get undefined behavior with other operations such as display panning,

Probably the AGP surface can be used as a backbuffer from which you can
write to then later on blit to the frontbuffer.  I doubt flipping will
work since flips require FB_IOCTL_PANDISPLAY. Ie. it need to have a
video policy similar to CSP_SYSTEMONLY with the exception that it
supports hardware blits.

> I tried running df_dok and from what I can tell it tried to do a
> StretchBlit or Blit3D from AGP memory to card memory. Maybe it's the
> cursor? All I see is the blue background.
df_dok does not implement dual buffers as far as I can tell, so the
front_buffer == back_buffer. And the backbuffer is the undisplayable AGP


Info:  To unsubscribe send a mail to with
"unsubscribe directfb-dev" as subject.

Home | Main Index | Thread Index / Development / Old Archives