Acceleration of 2D operations for kdrive

Abhinav Duggal abhinavduggal at gmail.com
Fri Feb 2 00:33:33 PST 2007


Hi all,
        I have ported kdrive on arm.I want to accelerate the 2D operations
of drawing lines,rectangles,filling rectangles,blit operations etc using a
smart graphics accelerator for a SOC on which i am working . I have seen the
sample drivers for neomagic and nvidia. They are not accelerating primitive
drawing functions.Can these functions be accelerated?I think kdrive does not
provide support for accelerating the primitive functions.It does it through
software only because of overhead in these drawing primitives.
It only provides supoort for accelerating the ones in the following
structure
typedef struct _KaaScreenInfo {
    int         offsetAlign;
    int         pitchAlign;
    int         flags;

    int         (*markSync) (ScreenPtr pScreen);
    void        (*waitMarker) (ScreenPtr pScreen, int marker);

    Bool        (*PrepareSolid) (PixmapPtr      pPixmap,
                                 int            alu,
                                 Pixel          planemask,
                                 Pixel          fg);
    void        (*Solid) (int x1, int y1, int x2, int y2);
    void        (*DoneSolid) (void);

    Bool        (*PrepareCopy) (PixmapPtr       pSrcPixmap,
                                PixmapPtr       pDstPixmap,
                                Bool            upsidedown,
                                Bool            reverse,
                                int             alu,
                                Pixel           planemask);
    void        (*Copy) (int    srcX,
                         int    srcY,
                         int    dstX,
                         int    dstY,
                         int    width,
                         int    height);
    void        (*DoneCopy) (void);

    Bool        (*PrepareBlend) (int            op,
                                 PicturePtr     pSrcPicture,
                                 PicturePtr     pDstPicture,
                                 PixmapPtr      pSrc,
                                 PixmapPtr      pDst);
    void        (*Blend) (int   srcX,
                          int   srcY,
                          int   dstX,
                          int   dstY,
                          int   width,
                          int   height);
    void        (*DoneBlend) (void);

    Bool        (*CheckComposite) (int          op,
                                   PicturePtr   pSrcPicture,
                                   PicturePtr   pMaskPicture,
                                   PicturePtr   pDstPicture);
    Bool        (*PrepareComposite) (int                op,
                                     PicturePtr         pSrcPicture,
                                     PicturePtr         pMaskPicture,
                                     PicturePtr         pDstPicture,
                                          PixmapPtr          pSrc,
                                     PixmapPtr          pMask,
                                     PixmapPtr          pDst);
    void        (*Composite) (int       srcX,
                             int        srcY,
                             int        maskX,
                             int        maskY,
                             int        dstX,
                             int        dstY,
                             int        width,
                             int        height);
    void        (*DoneComposite) (void);

    Bool        (*PrepareTrapezoids) (PicturePtr pDstPicture,
                                      PixmapPtr pDst);
    void        (*Trapezoids) (KaaTrapezoid      *traps,
                               int               ntraps);
    void        (*DoneTrapezoids) (void);

    Bool        (*UploadToScreen) (PixmapPtr            pDst,
                                   char                 *src,
                                   int                  src_pitch);
    Bool        (*UploadToScratch) (PixmapPtr           pSrc,
                                   PixmapPtr            pDst);
} KaaScreenInfoRec, *KaaScreenInfoPtr;

Is it true?Please help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20070202/881a57db/attachment.html>


More information about the xorg mailing list