Page 108 of 129 FirstFirst ... 85898106107108109110118 ... LastLast
Results 1,071 to 1,080 of 1287

Thread: 3d driver for the spica

777
  1. [translate]    #1071
    Moderator
    Join Date
    Jun 2010
    Location
    Warsaw, Poland
    Posts
    2,828

    Default

    Quote Originally Posted by DE_NISKA View Post
    Plat::lockGPUSFR(__FUNCTION__) - takes 60ms!!!
    Hmm, what a weird one... It should call the kernel module IOCTL to get the lock. I guess something is messed there.

  2. [translate]    #1072
    Senior Member
    Join Date
    Feb 2010
    Posts
    233

    Default

    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);
    }

  3. [translate]    #1073
    Moderator
    Join Date
    Jun 2010
    Location
    Warsaw, Poland
    Posts
    2,828

    Default

    Quote Originally Posted by DE_NISKA View Post
    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;
    }

  4. [translate]    #1074
    Senior Member
    Join Date
    Feb 2010
    Posts
    233

    Default

    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.

  5. [translate]    #1075
    Moderator
    Join Date
    Jun 2010
    Location
    Warsaw, Poland
    Posts
    2,828

    Default

    Quote Originally Posted by DE_NISKA View Post
    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
    No idea. Maybe something holds the lock and it must wait for it to get released. Anyway, this shouldn't really matter as I don't use the old module anymore in my driver.

  6. [translate]    #1076
    Member
    Join Date
    Apr 2010
    Posts
    99

    Default

    that's may be the cause for the random lags in speedx

  7. [translate]    #1077
    HTD
    HTD is offline
    Senior Member
    Join Date
    May 2010
    Location
    India
    Posts
    506

    Default

    Yea..... That seems to be.
    I Do Stuff.
    Twitter | Blog | Facebook

  8. [translate]    #1078
    Junior Member
    Join Date
    Aug 2010
    Location
    Ruda Śląska, Poland
    Posts
    16

    Default

    DE_NISKA could you share your code with performance code ? I can add it by myself but this way will be faster.

  9. [translate]    #1079
    Senior Member
    Join Date
    Feb 2010
    Posts
    233

    Default

    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.

  10. [translate]    #1080
    Junior Member
    Join Date
    Aug 2010
    Location
    Ruda Śląska, Poland
    Posts
    16

    Default

    I have no access to code now. Which part of code is really executed:
    Quote Originally Posted by DE_NISKA View Post
    READREGP(FGGB_PIPESTATE, data);

    if(data & pipelineFlags)
    {
    ret = fimg_wait_for_flush(pipelineFlags);
    if(ret) LOGE("g3d Wait For Flush Interrupt err");
    }
    or
    Quote Originally Posted by DE_NISKA View Post
    do
    {
    //data = READREG(FGGB_PIPESTATE);
    READREGP(FGGB_PIPESTATE, data);
    }
    while(data & pipelineFlags);

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •