From: Brian Date: Wed, 23 Jan 2008 23:19:40 +0000 (-0700) Subject: Cell: remove old test code X-Git-Tag: 062012170305~17580^2~390^2~2898 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5d2c1eef943bcd1c4c42dcb2b2634cdf6e243e0;p=profile%2Fivi%2Fmesa.git Cell: remove old test code --- diff --git a/src/mesa/pipe/cell/ppu/cell_context.c b/src/mesa/pipe/cell/ppu/cell_context.c index 3db1dbd..98e13d8 100644 --- a/src/mesa/pipe/cell/ppu/cell_context.c +++ b/src/mesa/pipe/cell/ppu/cell_context.c @@ -268,16 +268,5 @@ cell_create_context(struct pipe_winsys *winsys, struct cell_winsys *cws) } } - -#if 0 - test_spus(cell); -#endif - return &cell->pipe; } - - -#if 0 -/** [4] to ensure 16-byte alignment for each status word */ -uint buffer_status[CELL_MAX_SPUS][CELL_NUM_BATCH_BUFFERS][4] ALIGN16_ATTRIB; -#endif diff --git a/src/mesa/pipe/cell/ppu/cell_spu.c b/src/mesa/pipe/cell/ppu/cell_spu.c index 5a52af1..4627bc8 100644 --- a/src/mesa/pipe/cell/ppu/cell_spu.c +++ b/src/mesa/pipe/cell/ppu/cell_spu.c @@ -133,71 +133,6 @@ cell_start_spus(struct cell_context *cell) } -/** wait for all SPUs to finish working */ -/** XXX temporary */ -void -finish_all(uint num_spus) -{ - uint i; - - for (i = 0; i < num_spus; i++) { - send_mbox_message(cell_global.spe_contexts[i], CELL_CMD_FINISH); - } - for (i = 0; i < num_spus; i++) { - /* wait for mbox message */ - unsigned k; - - while (spe_out_mbox_read(cell_global.spe_contexts[i], &k, 1) < 1) - ; - - assert(k == CELL_CMD_FINISH); - } -} - - -/** - ** Send test commands (XXX temporary) - **/ -void -test_spus(struct cell_context *cell) -{ - uint i; - struct pipe_surface *csurf = cell->framebuffer.cbufs[0]; - struct pipe_surface *zsurf = cell->framebuffer.zsbuf; - - printf("PPU: sleep(2)\n\n\n"); - sleep(2); - - for (i = 0; i < cell->num_spus; i++) { - cell_global.command[i].fb.color_start = cell->cbuf_map[0]; - cell_global.command[i].fb.depth_start = cell->zsbuf_map; - cell_global.command[i].fb.width = csurf->width; - cell_global.command[i].fb.height = csurf->height; - cell_global.command[i].fb.color_format = PIPE_FORMAT_A8R8G8B8_UNORM; - cell_global.command[i].fb.depth_format = PIPE_FORMAT_Z32_UNORM; - send_mbox_message(cell_global.spe_contexts[i], CELL_CMD_FRAMEBUFFER); - } - - for (i = 0; i < cell->num_spus; i++) { - cell_global.command[i].clear.value = 0xff880044; /* XXX */ - cell_global.command[i].clear.surface = 0; - send_mbox_message(cell_global.spe_contexts[i], CELL_CMD_CLEAR_SURFACE); - } - - finish_all(cell->num_spus); - - { - uint *b = (uint*) cell->cbuf_map[0]; - printf("PPU: Clear results: 0x%x 0x%x 0x%x 0x%x\n", - b[0], b[1000], b[2000], b[3000]); - } - - for (i = 0; i < cell->num_spus; i++) { - send_mbox_message(cell_global.spe_contexts[i], CELL_CMD_EXIT); - } -} - - /** * Tell all the SPUs to stop/exit. */ diff --git a/src/mesa/pipe/cell/ppu/cell_spu.h b/src/mesa/pipe/cell/ppu/cell_spu.h index b4bfbce..19eff94 100644 --- a/src/mesa/pipe/cell/ppu/cell_spu.h +++ b/src/mesa/pipe/cell/ppu/cell_spu.h @@ -76,13 +76,6 @@ cell_start_spus(struct cell_context *cell); extern void -finish_all(uint num_spus); - -extern void -test_spus(struct cell_context *cell); - - -extern void cell_spu_exit(struct cell_context *cell);