* CFrameBuffer::waitForIdle: Added a parameter

to identify the execution at Debug Output
- For example: name of the calling function
This commit is contained in:
Michael Liebmann
2013-05-17 19:44:16 +02:00
parent 5eb7f4aea8
commit d460c50bd5
3 changed files with 10 additions and 6 deletions

View File

@@ -443,7 +443,7 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
/* the GXA seems to do it's job asynchonously, so we need to wait until
it's ready, otherwise the font will sometimes "be overwritten" with
background color or bgcolor will be wrong */
frameBuffer->waitForIdle();
frameBuffer->waitForIdle("Font::RenderString");
#endif
/* fetch bgcolor from framebuffer, using lower left edge of the font... */
fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x +

View File

@@ -145,7 +145,7 @@ void CFrameBuffer::add_gxa_sync_marker(void)
}
/* wait until the current marker comes out of the GXA command queue */
void CFrameBuffer::waitForIdle(void)
void CFrameBuffer::waitForIdle(const char* func)
{
unsigned int cfg, count = 0;
do {
@@ -159,8 +159,12 @@ void CFrameBuffer::waitForIdle(void)
//fprintf(stderr, "%s: read %02x, expected %02x\n", __FUNCTION__, cfg, _mark);
} while(++count < 2048); /* don't deadlock here if there is an error */
if (count > 512) /* more than 100 are unlikely, */
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%d)!\n", count);
if (count > 512) /* more than 100 are unlikely, */{
if (func != NULL)
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%04d) [%s]!\n", count, func);
else
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%d)!\n", count);
}
}
#endif /* USE_NEVIS_GXA */
@@ -1213,7 +1217,7 @@ void CFrameBuffer::paintBoxFrame(const int x, const int y, const int dx, const i
if (type && radius) {
radius = limitRadius(dx, dy, radius);
int line = 0;
waitForIdle();
waitForIdle("CFrameBuffer::paintBoxFrame");
while (line < dy) {
int ofs = 0, ofs_i = 0;
// inner box

View File

@@ -235,7 +235,7 @@ class CFrameBuffer
bool Locked(void) { return locked; };
#ifdef USE_NEVIS_GXA
void add_gxa_sync_marker(void);
void waitForIdle(void);
void waitForIdle(const char* func=NULL);
#else
inline void waitForIdle(void) {};
#endif