diff --git a/src/add-ons/accelerants/intel_extreme/accelerant.cpp b/src/add-ons/accelerants/intel_extreme/accelerant.cpp index 9afa155f8e..d34cc10297 100644 --- a/src/add-ons/accelerants/intel_extreme/accelerant.cpp +++ b/src/add-ons/accelerants/intel_extreme/accelerant.cpp @@ -16,7 +16,7 @@ #include -#define TRACE_ACCELERANT +//#define TRACE_ACCELERANT #ifdef TRACE_ACCELERANT extern "C" void _sPrintf(const char *format, ...); # define TRACE(x) _sPrintf x @@ -163,7 +163,7 @@ uninit_common(void) status_t intel_init_accelerant(int device) { - syslog(LOG_ERR, "intel_extreme.accelerant here!\n"); + TRACE(("intel_init_accelerant()\n")); status_t status = init_common(device, false); if (status != B_OK) @@ -182,6 +182,7 @@ intel_init_accelerant(int device) ssize_t intel_accelerant_clone_info_size(void) { + TRACE(("intel_accelerant_clone_info_size()\n")); // clone info is device name, so return its maximum size return B_PATH_NAME_LENGTH; } @@ -190,6 +191,7 @@ intel_accelerant_clone_info_size(void) void intel_get_accelerant_clone_info(void *info) { + TRACE(("intel_get_accelerant_clone_info()\n")); ioctl(gInfo->device, INTEL_GET_DEVICE_NAME, info, B_PATH_NAME_LENGTH); } @@ -253,6 +255,8 @@ intel_uninit_accelerant(void) status_t intel_get_accelerant_device_info(accelerant_device_info *info) { + TRACE(("intel_get_accelerant_device_info()\n")); + info->version = B_ACCELERANT_VERSION; strcpy(info->name, "Intel Extreme Graphics 2"); strcpy(info->chipset, "i865G"); @@ -269,6 +273,7 @@ intel_get_accelerant_device_info(accelerant_device_info *info) sem_id intel_accelerant_retrace_semaphore() { + TRACE(("intel_accelerant_retrace_semaphore()\n")); return -1; } diff --git a/src/add-ons/accelerants/intel_extreme/dpms.cpp b/src/add-ons/accelerants/intel_extreme/dpms.cpp index d6addf3ef9..bb6916d446 100644 --- a/src/add-ons/accelerants/intel_extreme/dpms.cpp +++ b/src/add-ons/accelerants/intel_extreme/dpms.cpp @@ -11,6 +11,15 @@ #include "accelerant.h" +//#define TRACE_DPMS +#ifdef TRACE_DPMS +extern "C" void _sPrintf(const char *format, ...); +# define TRACE(x) _sPrintf x +#else +# define TRACE(x) ; +#endif + + void enable_display_plane(bool enable) { @@ -84,6 +93,7 @@ set_display_power_mode(uint32 mode) uint32 intel_dpms_capabilities(void) { + TRACE(("intel_dpms_capabilities()\n")); return B_DPMS_ON | B_DPMS_SUSPEND | B_DPMS_STAND_BY | B_DPMS_OFF; } @@ -91,6 +101,7 @@ intel_dpms_capabilities(void) uint32 intel_dpms_mode(void) { + TRACE(("intel_dpms_mode()\n")); return gInfo->shared_info->dpms_mode; } @@ -98,6 +109,7 @@ intel_dpms_mode(void) status_t intel_set_dpms_mode(uint32 mode) { + TRACE(("intel_set_dpms_mode()\n")); gInfo->shared_info->dpms_mode = mode; set_display_power_mode(mode); diff --git a/src/add-ons/accelerants/intel_extreme/engine.cpp b/src/add-ons/accelerants/intel_extreme/engine.cpp index 7017d78ce7..958e9fcc8b 100644 --- a/src/add-ons/accelerants/intel_extreme/engine.cpp +++ b/src/add-ons/accelerants/intel_extreme/engine.cpp @@ -11,6 +11,15 @@ #include "intel_extreme.h" +//#define TRACE_ENGINE +#ifdef TRACE_ENGINE +extern "C" void _sPrintf(const char *format, ...); +# define TRACE(x) _sPrintf x +#else +# define TRACE(x) ; +#endif + + static engine_token sEngineToken = {1, 0 /*B_2D_ACCELERATION*/, NULL}; @@ -19,6 +28,7 @@ static engine_token sEngineToken = {1, 0 /*B_2D_ACCELERATION*/, NULL}; uint32 intel_accelerant_engine_count(void) { + TRACE(("intel_accelerant_engine_count()\n")); return 1; } @@ -27,6 +37,7 @@ status_t intel_acquire_engine(uint32 capabilities, uint32 maxWait, sync_token *syncToken, engine_token **_engineToken) { + TRACE(("intel_acquire_engine()\n")); *_engineToken = &sEngineToken; return B_OK; @@ -36,6 +47,7 @@ intel_acquire_engine(uint32 capabilities, uint32 maxWait, sync_token *syncToken, status_t intel_release_engine(engine_token *engineToken, sync_token *syncToken) { + TRACE(("intel_release_engine()\n")); if (syncToken != NULL) syncToken->engine_id = engineToken->engine_id; @@ -46,12 +58,14 @@ intel_release_engine(engine_token *engineToken, sync_token *syncToken) void intel_wait_engine_idle(void) { + TRACE(("intel_wait_engine_idle()\n")); } status_t intel_get_sync_token(engine_token *engineToken, sync_token *syncToken) { + TRACE(("intel_get_sync_token()\n")); return B_OK; } @@ -59,6 +73,7 @@ intel_get_sync_token(engine_token *engineToken, sync_token *syncToken) status_t intel_sync_to_token(sync_token *syncToken) { + TRACE(("intel_sync_to_token()\n")); return B_OK; } diff --git a/src/add-ons/accelerants/intel_extreme/mode.cpp b/src/add-ons/accelerants/intel_extreme/mode.cpp index 1da38bef16..74fd18bd4e 100644 --- a/src/add-ons/accelerants/intel_extreme/mode.cpp +++ b/src/add-ons/accelerants/intel_extreme/mode.cpp @@ -12,7 +12,7 @@ #include "utility.h" -#define TRACE_MODE +//#define TRACE_MODE #ifdef TRACE_MODE extern "C" void _sPrintf(const char *format, ...); # define TRACE(x) _sPrintf x @@ -226,6 +226,8 @@ intel_propose_display_mode(display_mode *target, const display_mode *low, status_t intel_set_display_mode(display_mode *mode) { + TRACE(("intel_set_display_mode()\n")); + if (mode == NULL) return B_BAD_VALUE; @@ -372,6 +374,7 @@ intel_get_pixel_clock_limits(display_mode *mode, uint32 *_low, uint32 *_high) status_t intel_move_display(uint16 horizontalStart, uint16 verticalStart) { + TRACE(("intel_move_display()\n")); return B_ERROR; } @@ -379,6 +382,7 @@ intel_move_display(uint16 horizontalStart, uint16 verticalStart) status_t intel_get_timing_constraints(display_timing_constraints *constraints) { + TRACE(("intel_get_timing_contraints()\n")); return B_ERROR; } @@ -386,5 +390,6 @@ intel_get_timing_constraints(display_timing_constraints *constraints) void intel_set_indexed_colors(uint count, uint8 first, uint8 *colorData, uint32 flags) { + TRACE(("intel_set_indexed_colors()\n")); } diff --git a/src/add-ons/kernel/drivers/graphics/intel_extreme/intel_extreme.cpp b/src/add-ons/kernel/drivers/graphics/intel_extreme/intel_extreme.cpp index 44edcb7c6e..3ded9aed90 100644 --- a/src/add-ons/kernel/drivers/graphics/intel_extreme/intel_extreme.cpp +++ b/src/add-ons/kernel/drivers/graphics/intel_extreme/intel_extreme.cpp @@ -70,7 +70,7 @@ PhysicalMemoryMapper::Keep() // #pragma mark - - +#if 0 #define DUMPED_BLOCK_SIZE 16 void @@ -86,7 +86,7 @@ dumpBlock(int file, const uint8 *buffer, int size) for (; i < start+DUMPED_BLOCK_SIZE; i++) { if (!(i % 4)) - pos += snprintf(line + pos, sizeof(line) - pos, " "); + pos += sprintf(line + pos, sizeof(line) - pos, " "); if (i >= size) break; @@ -98,7 +98,7 @@ dumpBlock(int file, const uint8 *buffer, int size) write(file, line, pos); } } - +#endif status_t intel_extreme_init(intel_info &info)