#ifdef CONFIG_FB_SIS_315 if(ivideo->sisvga_engine == SIS_315_VGA) { u32 tempq = 0; u8  temp = 0; 
printk(KERN_INFO "sisfb: Memory heap starting at %dK, size %dK\n", (int)(ivideo->heapstart / 1024), (int)(ivideo->sisfb_heap_size / 1024)); 
sisfb_heap_init(struct sis_video_info *ivideo){     SIS_OH *poh;     ivideo->heapstart = ivideo->sisfb_mem = sisfb_getheapstart(ivideo);     ivideo->sisfb_heap_start = ivideo->video_vbase + ivideo->heapstart;     ivideo->sisfb_heap_end   = ivideo->video_vbase + ivideo->video_size;     /* Initialize command queue (We use MMIO only) */#ifdef CONFIG_FB_SIS_315     if(ivideo->sisvga_engine == SIS_315_VGA) {        u32 tempq = 0;	u8  temp = 0;        ivideo->sisfb_heap_end -= COMMAND_QUEUE_AREA_SIZE;	outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_THRESHOLD, COMMAND_QUEUE_THRESHOLD);	outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_SET, SIS_CMD_QUEUE_RESET);	tempq = MMIO_IN32(ivideo->mmio_vbase, MMIO_QUEUE_READPORT);	MMIO_OUT32(ivideo->mmio_vbase, MMIO_QUEUE_WRITEPORT, tempq);	temp = SIS_CMD_QUEUE_SIZE_512k;	temp |= (SIS_MMIO_CMD_ENABLE | SIS_CMD_AUTO_CORR);	outSISIDXREG(SISSR, IND_SIS_CMDQUEUE_SET, temp);	tempq = (u32)(ivideo->video_size - COMMAND_QUEUE_AREA_SIZE);	MMIO_OUT32(ivideo->mmio_vbase, MMIO_QUEUE_PHYBASE, tempq);	ivideo->caps |= MMIO_CMD_QUEUE_CAP;     }#endif#ifdef CONFIG_FB_SIS_300     if(ivideo->sisvga_engine == SIS_300_VGA) {     	unsigned long tqueue_pos;	u8 tq_state;	ivideo->sisfb_heap_end -= TURBO_QUEUE_AREA_SIZE;	tqueue_pos = (ivideo->video_size - TURBO_QUEUE_AREA_SIZE) / (64 * 1024);	inSISIDXREG(SISSR, IND_SIS_TURBOQUEUE_SET, tq_state);	tq_state |= 0xf0;	tq_state &= 0xfc;	tq_state |= (u8)(tqueue_pos >> 8);	outSISIDXREG(SISSR, IND_SIS_TURBOQUEUE_SET, tq_state);	outSISIDXREG(SISSR, IND_SIS_TURBOQUEUE_ADR, (u8)(tqueue_pos & 0xff));	ivideo->caps |= TURBO_QUEUE_CAP;     }#endif     /* Reserve memory for the HWCursor */     ivideo->sisfb_heap_end -= ivideo->hwcursor_size;     ivideo->hwcursor_vbase = ivideo->sisfb_heap_end;     ivideo->caps |= HW_CURSOR_CAP;     ivideo->sisfb_heap_size = ivideo->sisfb_heap_end - ivideo->sisfb_heap_start;     if(ivideo->cardnumber == 0) {     	printk(KERN_INFO "sisfb: Memory heap starting at %dK, size %dK\n",     		(int)(ivideo->heapstart / 1024), (int)(ivideo->sisfb_heap_size / 1024));	sisfb_heap.vinfo = ivideo;     	sisfb_heap.poha_chain = NULL;     	sisfb_heap.poh_freelist = NULL;     	poh = sisfb_poh_new_node();     	if(poh == NULL) return 1;     	poh->poh_next = &sisfb_heap.oh_free;     	poh->poh_prev = &sisfb_heap.oh_free;     	poh->size = ivideo->sisfb_heap_size;     	poh->offset = ivideo->heapstart;     	sisfb_heap.oh_free.poh_next = poh;     	sisfb_heap.oh_free.poh_prev = poh;     	sisfb_heap.oh_free.size = 0;     	sisfb_heap.max_freesize = poh->size;     	sisfb_heap.oh_used.poh_next = &sisfb_heap.oh_used;     	sisfb_heap.oh_used.poh_prev = &sisfb_heap.oh_used;     	sisfb_heap.oh_used.size = SENTINEL;     } else {        printk(KERN_INFO "Skipped heap initialization for secondary cards\n");     }     return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/sis_main.c/clean/drivers/video/sis/sis_main.c