Landscape UI on Portait LCM (竖屏横用/直屏横用)使用

1. 直屏比橫屏便宜許多 
2. Qwerty keypad phone(全键盘手机),客戶普遍用”直屏橫放“的方式來实现, 但得自己承受 performance 和tearing(斜切屏) 問題. 因为使用LCM做90度Rotate,则必然出现斜切屏。
3. MTK 提供tearing-free(斜切屏解决方法) 以及 good performance。无需LCM做90度 Rotate,由MTK完成rotate。但是需要消耗更多的RAM资源 ,因为需要多一些working buffers但有一定限制条件。 


1.    设置project.mak
1)10A [MT6252/MT6253]
LANDSCAPE_UI_ON_POTRAIT_LCM = TRUE
LANDSCAPE_UI_ON_POTRAIT_LCM_CCW_ROTATION_ANGLE = 270
HORIZONTAL_CAMERA = FALSE
2)HAL(11A/11B及以后)
MAIN_LCD_SIZE = 
LCM_SCANLINE_ROTATION_SUPPORT = TRUE
// Main LCD
MAIN_LCM_SCANLINE_ROTATION = TRUE
MAIN_LCM_SCANLINE_ROTATION_CCW_ANGLE = 270  // 270/90
// Sub LCD
SUB_LCM_SCANLINE_ROTATION = FALSE
SUB_LCM_SCANLINE_ROTATION_CCW_ANGLE = 0
HORIZONTAL_CAMERA = FALSE
2.    特别说明及限制
1)11B1132MP [MT6252] 
a)需要申请patch,Patch ID: MAUI_03081992
b)如果如下有些option在您的makefile中不存在,还请自行添加。
MAIN_LCD_SIZE = 
LCM_SCANLINE_ROTATION_SUPPORT = TRUE
MAIN_LCM_SCANLINE_ROTATION = TRUE
MAIN_LCM_SCANLINE_ROTATION_CCW_ANGLE = 270
SUB_LCM_SCANLINE_ROTATION = FALSE
SUB_LCM_SCANLINE_ROTATION_CCW_ANGLE = 0
2) MT6252平台,受MDP限制,必须设置CCW_ANGLE = 270.   
如果界面出现了180度反转,修改LCM setting里scan Direction的方向180度即可。
   
3)如果是MT6250 & MT6255平台.開了LCM_SCANLINE_ROTATION_SUPPORT = TRUE之後會遇到開不了機的問題.
請修改2隻檔案.
     1.open hal/display/flatten/src/flatten_api.c
Please find the function (FlattenGetOwnership).
        //if(KAL_TRUE == system_init_status)  (Please mark this line)
        {
           system_init_status = kal_query_systemInit();// only in systemInit needs to check
        }    
        if ( (KAL_TRUE == system_init_status) || (INT_QueryExceptionStatus()) )
        {
           g2dSetCallbackFunction(g2d_handle,NULL);
        }
    2.open hal/display/flatten/src/hw_6250/flatten_api_6250.c
          or /hal/display/flatten/src/hw_6255/flatten_api_6255.c
Please find the function (__flatten_gOvlRot_WaitEvent).
 
        IRQMask(IRQ_GOVL_CODE);
        while(GOVL_IS_RUNNING);
        //__flatten_gRot_WaitHWIdle();
        {
            pCtrlConfig->rotationAngle = FLATTEN_ROTATION_0;
            //RestoreIRQMask(save_irq_mask);
        }
       GOVL_CLEAR_INT_STATUS;  (Please add code).
        REG_GOVL_IRQ;
 
        __flatten_gOvl_ExecActiveEventsCb(FLATTEN_GOVL_HW_TRANSFER_COMPLETE_EVENT);
        IRQUnmask(IRQ_GOVL_CODE);
 
at last, please m r drv_display and try again.
Thanks.

你可能感兴趣的:(ARM,MTK)