From ee235f08f1cd4ffc96fcd3e9a690c2c954afd663 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 12 Aug 2009 23:46:46 +0100 Subject: Tidy up headers, formatting and unused code --- src/glamo-dri2.c | 14 ++++++------ src/glamo-kms-crtc.c | 1 + src/glamo-kms-crtc.h | 5 ----- src/glamo-kms-display.h | 27 ---------------------- src/glamo-kms-driver.c | 3 ++- src/glamo-kms-exa.c | 59 ++++++++++++++----------------------------------- src/glamo-kms-exa.h | 2 +- src/glamo-kms-output.c | 1 + src/glamo-kms-output.h | 25 +++++++++++++++++++++ 9 files changed, 54 insertions(+), 83 deletions(-) delete mode 100644 src/glamo-kms-display.h create mode 100644 src/glamo-kms-output.h (limited to 'src') diff --git a/src/glamo-dri2.c b/src/glamo-dri2.c index b500067..4186bfa 100644 --- a/src/glamo-dri2.c +++ b/src/glamo-dri2.c @@ -58,7 +58,7 @@ typedef struct { static DRI2BufferPtr glamoCreateBuffers(DrawablePtr pDraw, - unsigned int *attachments, int count) + unsigned int *attachments, int count) { ScreenPtr pScreen = pDraw->pScreen; DRI2BufferPtr buffers; @@ -93,10 +93,10 @@ static DRI2BufferPtr glamoCreateBuffers(DrawablePtr pDraw, /* Anything else - create a new pixmap */ pPixmap = (*pScreen->CreatePixmap)(pScreen, - pDraw->width, - pDraw->height, - pDraw->depth, - 0); + pDraw->width, + pDraw->height, + pDraw->depth, + 0); } @@ -117,7 +117,7 @@ static DRI2BufferPtr glamoCreateBuffers(DrawablePtr pDraw, static void glamoDestroyBuffers(DrawablePtr pDraw, - DRI2BufferPtr buffers, int count) + DRI2BufferPtr buffers, int count) { ScreenPtr pScreen = pDraw->pScreen; int i; @@ -136,7 +136,7 @@ static void glamoDestroyBuffers(DrawablePtr pDraw, static void glamoCopyRegion(DrawablePtr pDraw, RegionPtr pRegion, - DRI2BufferPtr pDestBuffer, DRI2BufferPtr pSrcBuffer) + DRI2BufferPtr pDestBuffer, DRI2BufferPtr pSrcBuffer) { } diff --git a/src/glamo-kms-crtc.c b/src/glamo-kms-crtc.c index aafc539..17444b0 100644 --- a/src/glamo-kms-crtc.c +++ b/src/glamo-kms-crtc.c @@ -58,6 +58,7 @@ #include #include "glamo.h" +#include "glamo-kms-crtc.h" struct crtc_private diff --git a/src/glamo-kms-crtc.h b/src/glamo-kms-crtc.h index 8c16054..1860b2d 100644 --- a/src/glamo-kms-crtc.h +++ b/src/glamo-kms-crtc.h @@ -22,9 +22,4 @@ #include "xf86.h" -/* crtc.c */ extern void crtc_init(ScrnInfoPtr pScrn); - - -/* output.c */ -extern void output_init(ScrnInfoPtr pScrn); diff --git a/src/glamo-kms-display.h b/src/glamo-kms-display.h deleted file mode 100644 index 45b8eb7..0000000 --- a/src/glamo-kms-display.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * EXA via DRI for the SMedia Glamo3362 X.org Driver - * - * Copyright 2009 Thomas White - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * - */ - -#include "xf86.h" - -extern void *GlamoKMSExaInit(ScrnInfoPtr pScrn); -extern void GlamoKMSExaClose(ScrnInfoPtr pScrn); -extern unsigned int driGetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags); diff --git a/src/glamo-kms-driver.c b/src/glamo-kms-driver.c index bf47131..55d2377 100644 --- a/src/glamo-kms-driver.c +++ b/src/glamo-kms-driver.c @@ -72,6 +72,7 @@ #include "glamo-kms-exa.h" #include "glamo-dri2.h" #include "glamo-kms-crtc.h" +#include "glamo-kms-output.h" static const char *fbSymbols[] = { @@ -489,7 +490,7 @@ void GlamoKMSLeaveVT(int scrnIndex, int flags) ModeStatus GlamoKMSValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, - int flags) + int flags) { return MODE_OK; } diff --git a/src/glamo-kms-exa.c b/src/glamo-kms-exa.c index 3d9701f..5303aeb 100644 --- a/src/glamo-kms-exa.c +++ b/src/glamo-kms-exa.c @@ -54,6 +54,7 @@ #include "glamo-log.h" #include "glamo.h" #include "glamo-regs.h" +#include "glamo-kms-exa.h" #include #include @@ -195,7 +196,7 @@ unsigned int driGetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags) } -Bool GlamoKMSExaPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) +static Bool GlamoKMSExaPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) { ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; GlamoPtr pGlamo = GlamoPTR(pScrn); @@ -228,7 +229,7 @@ Bool GlamoKMSExaPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) } -void GlamoKMSExaSolid(PixmapPtr pPix, int x1, int y1, int x2, int y2) +static void GlamoKMSExaSolid(PixmapPtr pPix, int x1, int y1, int x2, int y2) { ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; GlamoPtr pGlamo = GlamoPTR(pScrn); @@ -241,7 +242,7 @@ void GlamoKMSExaSolid(PixmapPtr pPix, int x1, int y1, int x2, int y2) } -void GlamoKMSExaDoneSolid(PixmapPtr pPix) +static void GlamoKMSExaDoneSolid(PixmapPtr pPix) { ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum]; GlamoPtr pGlamo = GlamoPTR(pScrn); @@ -251,8 +252,8 @@ void GlamoKMSExaDoneSolid(PixmapPtr pPix) } -Bool GlamoKMSExaPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, - int alu, Pixel pm) +static Bool GlamoKMSExaPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, + int alu, Pixel pm) { ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum]; GlamoPtr pGlamo = GlamoPTR(pScrn); @@ -299,8 +300,8 @@ Bool GlamoKMSExaPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, } -void GlamoKMSExaCopy(PixmapPtr pDst, int srcX, int srcY, int dstX, int dstY, - int width, int height) +static void GlamoKMSExaCopy(PixmapPtr pDst, int srcX, int srcY, + int dstX, int dstY, int width, int height) { ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; GlamoPtr pGlamo = GlamoPTR(pScrn); @@ -315,7 +316,7 @@ void GlamoKMSExaCopy(PixmapPtr pDst, int srcX, int srcY, int dstX, int dstY, } -void GlamoKMSExaDoneCopy(PixmapPtr pDst) +static void GlamoKMSExaDoneCopy(PixmapPtr pDst) { ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; GlamoPtr pGlamo = GlamoPTR(pScrn); @@ -325,39 +326,13 @@ void GlamoKMSExaDoneCopy(PixmapPtr pDst) } -Bool GlamoKMSExaCheckComposite(int op, - PicturePtr pSrcPicture, - PicturePtr pMaskPicture, - PicturePtr pDstPicture) -{ - return FALSE; -} - - -Bool GlamoKMSExaPrepareComposite(int op, PicturePtr pSrcPicture, - PicturePtr pMaskPicture, - PicturePtr pDstPicture, - PixmapPtr pSrc, - PixmapPtr pMask, - PixmapPtr pDst) -{ - return FALSE; -} - - -void GlamoKMSExaComposite(PixmapPtr pDst, int srcX, int srcY, - int maskX, int maskY, int dstX, int dstY, - int width, int height) -{ -} - - -void GlamoKMSExaDoneComposite(PixmapPtr pDst) +static int GlamoKMSExaMarkSync(ScreenPtr pScreen) { + return 1; } -void GlamoKMSExaWaitMarker(ScreenPtr pScreen, int marker) +static void GlamoKMSExaWaitMarker(ScreenPtr pScreen, int marker) { // ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; // GlamoPtr pGlamo = GlamoPTR(pScrn); @@ -564,16 +539,16 @@ void GlamoKMSExaInit(ScrnInfoPtr pScrn) exa->DoneCopy = GlamoKMSExaDoneCopy; /* Composite (though these just cause fallback) */ - exa->CheckComposite = GlamoKMSExaCheckComposite; - exa->PrepareComposite = GlamoKMSExaPrepareComposite; - exa->Composite = GlamoKMSExaComposite; - exa->DoneComposite = GlamoKMSExaDoneComposite; + exa->CheckComposite = NULL;//GlamoKMSExaCheckComposite; + exa->PrepareComposite = NULL;//GlamoKMSExaPrepareComposite; + exa->Composite = NULL;//GlamoKMSExaComposite; + exa->DoneComposite = NULL;//GlamoKMSExaDoneComposite; exa->DownloadFromScreen = NULL; exa->UploadToScreen = NULL; exa->UploadToScratch = NULL; -// exa->MarkSync = GlamoKMSExaMarkSync; + exa->MarkSync = GlamoKMSExaMarkSync; exa->WaitMarker = GlamoKMSExaWaitMarker; /* Prepare temporary buffers */ diff --git a/src/glamo-kms-exa.h b/src/glamo-kms-exa.h index 45b8eb7..6452050 100644 --- a/src/glamo-kms-exa.h +++ b/src/glamo-kms-exa.h @@ -22,6 +22,6 @@ #include "xf86.h" -extern void *GlamoKMSExaInit(ScrnInfoPtr pScrn); +extern void GlamoKMSExaInit(ScrnInfoPtr pScrn); extern void GlamoKMSExaClose(ScrnInfoPtr pScrn); extern unsigned int driGetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags); diff --git a/src/glamo-kms-output.c b/src/glamo-kms-output.c index 991a8be..f9f5ff6 100644 --- a/src/glamo-kms-output.c +++ b/src/glamo-kms-output.c @@ -57,6 +57,7 @@ #include #include "glamo.h" +#include "glamo-kms-output.h" static char *connector_enum_list[] = { diff --git a/src/glamo-kms-output.h b/src/glamo-kms-output.h new file mode 100644 index 0000000..0bb7565 --- /dev/null +++ b/src/glamo-kms-output.h @@ -0,0 +1,25 @@ +/* + * KMS Support for the SMedia Glamo3362 X.org Driver + * + * Copyright 2009 Thomas White + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#include "xf86.h" + +extern void output_init(ScrnInfoPtr pScrn); -- cgit v1.2.3