Am So, den 19.12.2004 schrieb Tomas Carnecky um 15:32:
> Felix K�hling wrote:
> > Am Sa, den 18.12.2004 schrieb Tomas Carnecky um 14:54:
> >
> > Most (all?) supported hardware doesn't support multiple clipping
> > rectangles in hardware, so the driver iterates over them and draws all
> > primitives once in each clipping rectangle.
>
> Quite CPU expensive, isn't it?
More GPU expensive. Because it's the GPU that does all the real work.
;-)
>
> >
> >>It seems to me that the framebuffer is allocated from the main meory,
> >>not from the videocard memory.
> >>
> >>Ok, I think I've found it: linux-code/drm_bufs.c::drm_addmap (or
> >>DRM_IOCTL_ADD_MAP).
> >>
> >>typedef struct drm_map {
> >> unsigned long offset; /**< Requested physical address (0 for SAREA)*/
> >> unsigned long size; /**< Requested physical size (bytes) */
> >> drm_map_type_t type; /**< Type of memory to map */
> >> drm_map_flags_t flags; /**< Flags */
> >> void *handle; /**< User-space: "Handle" to pass to mmap() */
> >> /**< Kernel-space: kernel-virtual address */
> >> int mtrr; /**< MTRR slot used */
> >> /* Private data */
> >>} drm_map_t;
> >
> >
> > DRM maps are created by the Xserver (2D driver) in order to make certain
> > address ranges available to DRM clients (3D driver). This way
> > front/back/depth buffers, DMA buffers, texture regions, sometimes MMIO
> > regions and the shared memory area that contains the global DRM lock are
> > handled. DRM clients can map these into their address space using the
> > drm_map ioctl.
>
> Who exactly does map the memory? The Xserver or the DRM library? If it's
> the Xserver, how can it know where all the different buffers are?
I'm not sure I understand the question. I'll rephrase the above and hope
it clears up any misunderstandings. The Xserver creates the maps using
the drm_addmap ioctl. It knows the physical location of the video memory
from the the PCI resource lists (you may want to take a look at the PCI
scan in your Xorg.0.log for details). As for AGP memory, it only needs
to pass offsets in the AGP aperture. Shared memory areas (only the Sarea
in most/all drivers) are allocated at free physical addresses. They
don't even need to be physically contiguous.
These drm maps are mapped by the 3D driver into the direct rendering
application's address space using the drm_map ioctl.
The DRM library is only a set of wrapper functions to the underlying
OS-dependent ioctl-mechanism for calling DRM functions.
>
> tom
--
| Felix K�hling <[EMAIL PROTECTED]> http://fxk.de.vu |
| PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3 B152 151C 5CC1 D888 E595 |
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel