diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index 5cc0574bf..8418b9ed9 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -52,7 +52,7 @@ libneutrino_driver_a_SOURCES += \ vfd.cpp else libneutrino_driver_a_SOURCES += \ - fb_accel_cs_nevis.cpp \ + fb_accel_cs_hd1.cpp \ vfd.cpp endif endif diff --git a/src/driver/fb_accel.h b/src/driver/fb_accel.h index fe085b759..dd2072ce2 100644 --- a/src/driver/fb_accel.h +++ b/src/driver/fb_accel.h @@ -78,7 +78,7 @@ class CFbAccelSTi void setBlendLevel(int); }; -class CFbAccelCSNevis +class CFbAccelCSHD1 : public CFbAccel { private: @@ -90,8 +90,8 @@ class CFbAccelCSNevis void run(void); fb_pixel_t *backbuffer; public: - CFbAccelCSNevis(); - ~CFbAccelCSNevis(); + CFbAccelCSHD1(); + ~CFbAccelCSHD1(); void init(const char * const); int setMode(unsigned int xRes, unsigned int yRes, unsigned int bpp); void paintPixel(int x, int y, const fb_pixel_t col); diff --git a/src/driver/fb_accel_cs_nevis.cpp b/src/driver/fb_accel_cs_hd1.cpp similarity index 87% rename from src/driver/fb_accel_cs_nevis.cpp rename to src/driver/fb_accel_cs_hd1.cpp index c083d0629..3cac06001 100644 --- a/src/driver/fb_accel_cs_nevis.cpp +++ b/src/driver/fb_accel_cs_hd1.cpp @@ -95,7 +95,7 @@ static void _write_gxa(volatile unsigned char *base_addr, unsigned int offset, u /* this adds a tagged marker into the GXA queue. Once this comes out of the other end of the queue, all commands before it are finished */ -void CFbAccelCSNevis::add_gxa_sync_marker(void) +void CFbAccelCSHD1::add_gxa_sync_marker(void) { unsigned int cmd = GXA_CMD_QMARK | GXA_PARAM_COUNT(1); // TODO: locking? @@ -106,7 +106,7 @@ void CFbAccelCSNevis::add_gxa_sync_marker(void) } /* wait until the current marker comes out of the GXA command queue */ -void CFbAccelCSNevis::waitForIdle(const char *func) +void CFbAccelCSHD1::waitForIdle(const char *func) { unsigned int cfg, count = 0; do { @@ -124,12 +124,12 @@ void CFbAccelCSNevis::waitForIdle(const char *func) fprintf(stderr, LOGTAG "waitForIdle: count is big (%d) [%s]!\n", count, func?func:""); } -CFbAccelCSNevis::CFbAccelCSNevis() +CFbAccelCSHD1::CFbAccelCSHD1() { fb_name = "Coolstream NEVIS GXA framebuffer"; } -void CFbAccelCSNevis::init(const char * const) +void CFbAccelCSHD1::init(const char * const) { fprintf(stderr, ">FBACCEL::INIT\n"); CFrameBuffer::init(); @@ -163,7 +163,7 @@ fprintf(stderr, ">FBACCEL::INIT\n"); ; }; -CFbAccelCSNevis::~CFbAccelCSNevis() +CFbAccelCSHD1::~CFbAccelCSHD1() { if (gxa_base != MAP_FAILED) munmap((void *)gxa_base, 0x40000); @@ -175,7 +175,7 @@ CFbAccelCSNevis::~CFbAccelCSNevis() close(fd); } -void CFbAccelCSNevis::setColor(fb_pixel_t col) +void CFbAccelCSHD1::setColor(fb_pixel_t col) { if (col == lastcol) return; @@ -183,7 +183,7 @@ void CFbAccelCSNevis::setColor(fb_pixel_t col) lastcol = col; } -void CFbAccelCSNevis::paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col) +void CFbAccelCSHD1::paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col) { OpenThreads::ScopedLock m_lock(mutex); unsigned int cmd = GXA_CMD_BLT | GXA_CMD_NOT_TEXT | GXA_CMD_NOT_ALPHA | @@ -200,12 +200,12 @@ void CFbAccelCSNevis::paintRect(const int x, const int y, const int dx, const in add_gxa_sync_marker(); } -void CFbAccelCSNevis::paintPixel(const int x, const int y, const fb_pixel_t col) +void CFbAccelCSHD1::paintPixel(const int x, const int y, const fb_pixel_t col) { paintLine(x, y, x + 1, y, col); } -void CFbAccelCSNevis::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col) +void CFbAccelCSHD1::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col) { if (!getActive()) return; @@ -219,7 +219,7 @@ void CFbAccelCSNevis::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t _write_gxa(gxa_base, cmd, GXA_POINT(xa, ya)); /* start point */ } -void CFbAccelCSNevis::paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius, int type) +void CFbAccelCSHD1::paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius, int type) { /* draw a filled rectangle (with additional round corners) */ @@ -227,11 +227,11 @@ void CFbAccelCSNevis::paintBoxRel(const int x, const int y, const int dx, const return; if (dx == 0 || dy == 0) { - dprintf(DEBUG_DEBUG, "[CFbAccelCSNevis] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx, y+dy); + dprintf(DEBUG_DEBUG, "[CFbAccelCSHD1] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx, y+dy); return; } if (radius < 0) - dprintf(DEBUG_NORMAL, "[CFbAccelCSNevis] [%s - %d]: WARNING! radius < 0 [%d] FIXME\n", __func__, __LINE__, radius); + dprintf(DEBUG_NORMAL, "[CFbAccelCSHD1] [%s - %d]: WARNING! radius < 0 [%d] FIXME\n", __func__, __LINE__, radius); checkFbArea(x, y, dx, dy, true); @@ -259,9 +259,9 @@ void CFbAccelCSNevis::paintBoxRel(const int x, const int y, const int dx, const if (dx-ofr-ofl < 1) { if (dx-ofr-ofl == 0){ - dprintf(DEBUG_INFO, "[CFbAccelCSNevis] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx-ofr-ofl, y+line); + dprintf(DEBUG_INFO, "[CFbAccelCSHD1] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx-ofr-ofl, y+line); }else{ - dprintf(DEBUG_INFO, "[CFbAccelCSNevis] [%s - %04d]: Calculated width: %d\n (radius %d, dx %d, offsetLeft %d, offsetRight %d).\n Width can not be less than 0, abort.\n", + dprintf(DEBUG_INFO, "[CFbAccelCSHD1] [%s - %04d]: Calculated width: %d\n (radius %d, dx %d, offsetLeft %d, offsetRight %d).\n Width can not be less than 0, abort.\n", __func__, __LINE__, dx-ofr-ofl, radius, dx, ofl, ofr); } line++; @@ -285,7 +285,7 @@ void CFbAccelCSNevis::paintBoxRel(const int x, const int y, const int dx, const checkFbArea(x, y, dx, dy, false); } -void CFbAccelCSNevis::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp) +void CFbAccelCSHD1::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp) { int xc, yc; xc = (width > xRes) ? xRes : width; @@ -310,7 +310,7 @@ void CFbAccelCSNevis::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uin CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp); } -void CFbAccelCSNevis::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff) +void CFbAccelCSHD1::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff) { if(width <1 || height <1 || !boxBuf ) return; @@ -333,7 +333,7 @@ void CFbAccelCSNevis::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint3 CFrameBuffer::blitBox2FB(boxBuf, width, height, xoff, yoff); } -void CFbAccelCSNevis::setupGXA() +void CFbAccelCSHD1::setupGXA() { // We (re)store the GXA regs here in case DFB override them and was not // able to restore them. @@ -349,7 +349,7 @@ void CFbAccelCSNevis::setupGXA() } /* wrong name... */ -int CFbAccelCSNevis::setMode(unsigned int, unsigned int, unsigned int) +int CFbAccelCSHD1::setMode(unsigned int, unsigned int, unsigned int) { fb_fix_screeninfo _fix; @@ -375,18 +375,18 @@ int CFbAccelCSNevis::setMode(unsigned int, unsigned int, unsigned int) return 0; /* dont fail because of this */ } -fb_pixel_t * CFbAccelCSNevis::getBackBufferPointer() const +fb_pixel_t * CFbAccelCSHD1::getBackBufferPointer() const { return backbuffer; } -void CFbAccelCSNevis::setBlendMode(uint8_t mode) +void CFbAccelCSHD1::setBlendMode(uint8_t mode) { if (ioctl(fd, FBIO_SETBLENDMODE, mode)) printf("FBIO_SETBLENDMODE failed.\n"); } -void CFbAccelCSNevis::setBlendLevel(int level) +void CFbAccelCSHD1::setBlendLevel(int level) { unsigned char value = 0xFF; if (level >= 0 && level <= 100) diff --git a/src/driver/fb_generic.cpp b/src/driver/fb_generic.cpp index 90ac9ad5f..4fa47fa8e 100644 --- a/src/driver/fb_generic.cpp +++ b/src/driver/fb_generic.cpp @@ -127,7 +127,7 @@ CFrameBuffer* CFrameBuffer::getInstance() #ifdef BOXMODEL_APOLLO frameBuffer = new CFbAccelCSApollo(); #else - frameBuffer = new CFbAccelCSNevis(); + frameBuffer = new CFbAccelCSHD1(); #endif #endif #if HAVE_GENERIC_HARDWARE