this is the code. tom3q, maybe you can figure what is wrong?
static inline void lockGPUSFR( const char* func_name)
{
#ifdef MULTI_PROCESS
if( ioctl(get_g3d_fd(), S3C_3D_SFR_LOCK) ) {
LOGMSG("ERROR: unable to aquire GPU SFR lock\n");
}
#endif
lock(&gles20_fimgsfr_mutex, func_name);
}
Hmm, are you sure that this is the bottleneck?
The code in kernel module which is executed by the ioctl function is:
Code:static int s3c_g3d_ioctl(struct inode *inode, struct file *file,unsigned int cmd, unsigned long arg) { u32 val; DMA_BLOCK_STRUCT dma_block; s3c_3d_dma_info dma_info; DECLARE_COMPLETION_ONSTACK(complete); u_int virt_addr; struct mm_struct *mm = current->mm; struct s3c_3d_mem_alloc param; #ifdef CONFIG_PM_PWR_GATING struct s3c_3d_pm_status param_pm; #endif Memalloc_desc *memdesc; unsigned int timer; switch (cmd) { [...] case S3C_3D_SFR_LOCK: mutex_lock(&mem_sfr_lock); mutex_lock_processID = (unsigned int)file->private_data; DEBUG("s3c_g3d_ioctl() : You got a muxtex lock !!\n"); break; [...] } return 0; }
E/ ( 2367): lockGPUSFR completed in: 0.03711 ms
E/ ( 1958): lockGPUSFR completed in: 72.68604 ms
E/ ( 1958): lockGPUSFR completed in: 0.03906 ms
E/ ( 2367): lockGPUSFR completed in: 0.04297 ms
E/ ( 2367): lockGPUSFR completed in: 0.03906 ms
E/ ( 1958): lockGPUSFR completed in: 2.43701 ms
E/ ( 2367): lockGPUSFR completed in: 58.28394 ms
E/ ( 2367): lockGPUSFR completed in: 0.03687 ms
E/ ( 1958): lockGPUSFR completed in: 0.04077 ms
E/ ( 2367): lockGPUSFR completed in: 0.04297 ms
E/ ( 2367): lockGPUSFR completed in: 0.04297 ms
E/ ( 1958): lockGPUSFR completed in: 2.02783 ms
E/ ( 2367): lockGPUSFR completed in: 58.30200 ms
E/ ( 2367): lockGPUSFR completed in: 0.04004 ms
E/ ( 1958): lockGPUSFR completed in: 0.04004 ms
E/ ( 2367): lockGPUSFR completed in: 0.04004 ms
E/ ( 2367): lockGPUSFR completed in: 0.04590 ms
E/ ( 1958): lockGPUSFR completed in: 13.77808 ms
E/ ( 2367): lockGPUSFR completed in: 39.47412 ms
E/ ( 2367): lockGPUSFR completed in: 0.02490 ms
E/ ( 2367): lockGPUSFR completed in: 0.02783 ms
E/ ( 2367): lockGPUSFR completed in: 0.02490 ms
E/ ( 1958): lockGPUSFR completed in: 15.83398 ms
E/ ( 2367): lockGPUSFR completed in: 64.67700 ms
E/ ( 2367): lockGPUSFR completed in: 0.03003 ms
E/ ( 2367): lockGPUSFR completed in: 0.02612 ms
E/ ( 1958): lockGPUSFR completed in: 11.42383 ms
E/ ( 1958): lockGPUSFR completed in: 0.02710 ms
E/ ( 2367): lockGPUSFR completed in: 0.03003 ms
E/ ( 2367): lockGPUSFR completed in: 0.03711 ms
E/ ( 2367): lockGPUSFR completed in: 0.02197 ms
E/ ( 1958): lockGPUSFR completed in: 50.50879 ms
im not sure. because im not a programmer. im electrician
PS: it is called more than 1 time per frame rendered (i think)
Last edited by DE_NISKA; 09-06-2010 at 09:41 PM.
that's may be the cause for the random lags in speedx
DE_NISKA could you share your code with performance code ? I can add it by myself but this way will be faster.
I tested driver whole night. and have bad news. every single function is fast enough except one. when fps start to drop is because of this function:
FGL_Error
fglFlush(unsigned int pipelineFlags)
{
unsigned int data;
int ret;
#ifdef INTERRUPT_MODE_ENABLED
READREGP(FGGB_PIPESTATE, data);
if(data & pipelineFlags)
{
ret = fimg_wait_for_flush(pipelineFlags);
if(ret) LOGE("g3d Wait For Flush Interrupt err");
}
#else
do
{
//data = READREG(FGGB_PIPESTATE);
READREGP(FGGB_PIPESTATE, data);
}
while(data & pipelineFlags);
#endif
return FGL_ERR_NO_ERROR;
}
tom3q, can you comment? it is bad news?
edit: it is slow only in benchmarks like quadrant or an3dbench. there is still hope![]()
Last edited by DE_NISKA; 09-07-2010 at 11:18 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks