Changeset 43018


Ignore:
Timestamp:
11/18/18 20:11:51 (5 years ago)
Author:
obi
Message:

add hiaccel support

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/mipselport.h

    r41783 r43018  
    254254                if(status.bcm == 1 && status.usedirectfb == 0)
    255255                        bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0);
     256#ifdef HAVE_HISILICON_ACCEL
     257                else if(status.usedirectfb == 0)
     258                        dinobot_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0, 0);
     259#endif
    256260                blit();
    257261               
     
    260264                {
    261265                        bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0);
     266#ifdef HAVE_HISILICON_ACCEL
     267                        dinobot_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0, 0);
     268#endif
    262269                        blit();
    263270                }
     
    380387                                if(status.screenanim < 10)
    381388                                        bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, dst_left, dst_top, dst_width, dst_height, 0, 0);
     389#ifdef HAVE_HISILICON_ACCEL
     390                                if(status.screenanim < 10)
     391                                        dinobot_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, dst_left, dst_top, dst_width, dst_height, 0, 0, 0);
     392#endif
    382393                                else
    383394                                {
     
    391402                                                dsleft = 0;
    392403                                        bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, dsleft, dstop, dswidth, dsheight, dst_left, dst_top, dst_width, dst_height, 0, 0);
     404#ifdef HAVE_HISILICON_ACCEL
     405                                        dinobot_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, dsleft, dstop, dswidth, dsheight, dst_left, dst_top, dst_width, dst_height, 0, 0, 0);
     406#endif
    393407                                }       
    394408                        }       
     
    405419                }
    406420                if(status.bcm == 1 && status.usedirectfb == 0)
     421                {
    407422                        bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0);
     423                }
     424#ifdef HAVE_HISILICON_ACCEL
     425                else if(status.usedirectfb == 0)
     426                        dinobot_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0, 0);
     427#endif
    408428                else
    409429                {
     
    419439                if(status.bcm == 1 && status.usedirectfb == 0)
    420440                        bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0);
     441#ifdef HAVE_HISILICON_ACCEL
     442                else if(status.usedirectfb == 0)
     443                        dinobot_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0, 0);
     444#endif
    421445        }
    422446        if(doblit == 1)
     
    746770        if(mode == 0 || mode == 2)
    747771        {
    748                
     772//#ifdef BCM_ACCEL     
    749773                if(status.bcm == 1 && tmpfb->data_phys != 0)
    750774                {
    751775                        bcm_accel_fill(tmpfb->data_phys, tmpfb->width, tmpfb->height, tmpfb->pitch, posx, posy, width, height, tmpcol);
    752776                }
     777//#endif
     778#ifdef HAVE_HISILICON_ACCEL
     779                else if(tmpfb->data_phys != 0)
     780                {
     781                        dinobot_accel_fill(tmpfb->data_phys, tmpfb->width, tmpfb->height, tmpfb->pitch, posx, posy, width, height, tmpcol);
     782                }
     783#endif
    753784                else
    754785                {
     
    9741005                flag = 1;
    9751006        }
     1007#ifdef HAVE_HISILICON_ACCEL
     1008        else if(source_phys > 0 && target_phys >0)
     1009        {
     1010                dinobot_accel_blit(source_phys, qwidth, qheight, qpitch, 0, target_phys, zwidth, zheight, zpitch, 0, 0, width, height, posx, posy, scalewidth, scaleheight, 0, 0, 0);
     1011                flag = 1;
     1012        }
     1013#endif
    9761014        else
    9771015        {
  • titan/titan/titan.c

    r43014 r43018  
    253253#endif
    254254
    255 #define TIMECODE "1472042241"
    256 
     255#define TIMECODE "1542558853"
     256
     257#if !defined(HAVE_HISILICON_ACCEL)
    257258// mipsel start
    258259/* Apparently, surfaces must be 64-byte aligned */
     
    264265//gAccel *gAccel::instance;
    265266#define BCM_ACCEL
     267#endif
     268
     269#ifdef HAVE_HISILICON_ACCEL
     270extern int  dinobot_accel_init(void);
     271extern void dinobot_accel_close(void);
     272extern void dinobot_accel_blit(
     273                int src_addr, int src_width, int src_height, int src_stride, int src_format,
     274                int dst_addr, int dst_width, int dst_height, int dst_stride,
     275                int src_x, int src_y, int width, int height,
     276                int dst_x, int dst_y, int dwidth, int dheight,
     277                int pal_addr,int pal_size, int flags);
     278extern void dinobot_accel_fill(
     279                int dst_addr, int dst_width, int dst_height, int dst_stride,
     280                int x, int y, int width, int height,
     281                unsigned long color);
     282extern bool dinobot_accel_has_alphablending();
     283#endif
    266284
    267285#ifdef BCM_ACCEL
     
    803821        initlocale(getconfig("localepath", NULL));
    804822
    805 #ifdef MIPSEL
     823//#ifdef MIPSEL
     824#ifdef BCM_ACCEL
    806825        bcm_accel_init();
    807826#endif
     827#ifdef HAVE_HISILICON_ACCEL
     828        dinobot_accel_init();
     829#endif
     830//#endif
    808831
    809832        fb = openfb(getconfig("fbdev", NULL), 0);
     
    10271050        if(checkbox("ATEMIO510") == 0)
    10281051                addtimer(&updatevfd, START, 1000, -1, NULL, NULL, NULL);
     1052
     1053printf("00000000\n");
     1054
     1055                        setvideomode("720", 0);
     1056                        changefbresolution("720", 0);
     1057                        autoresolution();
     1058printf("00001111\n");
     1059
    10291060
    10301061        if(getconfigint("firststart", NULL) == 1)
     
    10821113                addconfig("autoscan", "0");
    10831114        }
    1084 
    1085         // oe-alliance needs this
    1086         setvideomode("720", 0);
    1087         changefbresolution("720", 0);
    1088         autoresolution();
    1089 
     1115printf("111111111\n");
     1116       
    10901117        //first wizzard
    10911118        if(getconfigint("nofirstwizzard", NULL) < 2)
     
    11291156                textbox(_("Info"), _(msg), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1100, 680, 30, 0);
    11301157                free(msg); msg = NULL;
     1158printf("2222222222\n");
    11311159               
    11321160                writevfd("");
     
    11341162                drawscreen(skin, 0, 0);
    11351163                addconfig("nofirstwizzard", "2");
     1164printf("3333333333\n");
     1165
    11361166        }
    11371167        else
     
    11441174                        servicecheckret(serviceret, 0);
    11451175        }
     1176printf("4444444444\n");
    11461177
    11471178// fixt manual start
     
    11621193        ret = settint(getconfigint("vs_tint", NULL));
    11631194        videoApplySettings();
     1195printf("555555555\n");
    11641196       
    11651197#ifndef SIMULATE
     
    12001232        //start newsletter
    12011233        startnewsletter(1);
     1234printf("6666666666\n");
    12021235
    12031236        //thumb create thread
     
    12201253        // work
    12211254        resettvpic();
    1222        
     1255
    12231256        char* cmd = NULL;
    12241257#ifdef SH4
     
    12291262        cmd = ostrcat("/media/hdd/movie/titankey.mipsel", NULL, 0, 0);
    12301263#endif
     1264printf("777777777\n");
    12311265
    12321266        //for atemio to unlock box with stick
     
    12621296        }
    12631297        free(cmd); cmd = NULL;
     1298printf("88888888888\n");
    12641299
    12651300        //must called direct befor screeninfobar
     
    13181353                }
    13191354        }
     1355printf("9999999999\n");
    13201356
    13211357        addtimer(&guestthread, START, 1000, 1, NULL, NULL, NULL);
     1358printf("9999999999111\n");
     1359
    13221360        startinternreader(1);
     1361printf("9999999999222\n");
    13231362       
    13241363        screeninfobar();
     1364printf("9999999999333\n");
    13251365
    13261366        //for testign screens
Note: See TracChangeset for help on using the changeset viewer.