icfans

如何support反裝180度 LCM

0
阅读(2212)

[DESCRIPTION]
180LCM, wfd driverOVL180, LCDbuffer, IC, , LCD.
[SOLUTION]
(, ):
1. __wfd_lcd_CnvtAngleToHwDef()rotate angle180
WFDuint
__wfd_lcd_CnvtAngleToHwDef(WFD_DEVICE* device, WFDint angle, WFDboolean flip)
{
switch (angle)
{
//case 0:
case 180:
{
return ((WFD_FALSE == flip) ? WFD_LCD_LAYER_ROTATE_NORMAL:
WFD_LCD_LAYER_FLIP);
}
//case 90:
case 270:
{
return ((WFD_FALSE == flip) ? WFD_LCD_LAYER_ROTATE_270:
WFD_LCD_LAYER_FLIP_ROTATE_270);
}
//case 180:
case 0:
{
return ((WFD_FALSE == flip) ? WFD_LCD_LAYER_ROTATE_180:
WFD_LCD_LAYER_FLIP_ROTATE_180);
}
//case 270:
case 90:
{
return ((WFD_FALSE == flip) ? WFD_LCD_LAYER_ROTATE_90:
WFD_LCD_LAYER_FLIP_ROTATE_90);
}
default:
{
WFD_ASSERT_CHECK(device, 0, WFD_ERROR_ILLEGAL_ARGUMENT, 0xffffff);
return 0xffffff;
}
}
//return WFD_LCD_LAYER_ROTATE_NORMAL;
}
2. __wfd_lcd_Blt()ROI offsetpartialRefreshRectangle
static WFDboolean
__wfd_lcd_Blt(WFD_DEVICE* device, WFD_PORT* port, WFDEventType event)
{
...............
//LCD_SET_ROI_OFFSET((pPortCfg->roiDestRectangle[RECT_OFFSETX] +
WFD_LCD_ROI_ORIGIN_X),
// (pPortCfg->roiDestRectangle[RECT_OFFSETY] +
WFD_LCD_ROI_ORIGIN_Y));
LCD_SET_ROI_OFFSET(WFD_LCD_ROI_ORIGIN_X
+(LCD_WIDTH-pPortCfg->roiDestRectangle[RECT_OFFSETX]-pPortCfg-
>roiDestRectangle[RECT_WIDTH]),
WFD_LCD_ROI_ORIGIN_Y
+(LCD_HEIGHT-pPortCfg->roiDestRectangle[RECT_OFFSETY]-pPortCfg-
>roiDestRectangle[RECT_HEIGHT]));
...............
//port->portFuncTable->BlockWrite(
// pPortCfg->partialRefreshRectangle[RECT_OFFSETX],
// pPortCfg->partialRefreshRectangle[RECT_OFFSETY],
// pPortCfg->partialRefreshRectangle[RECT_OFFSETX] + pPortCfg-
>partialRefreshRectangle[RECT_WIDTH] - 1,
// pPortCfg->partialRefreshRectangle[RECT_OFFSETY] + pPortCfg-
>partialRefreshRectangle[RECT_HEIGHT] - 1);
port->portFuncTable->BlockWrite(
LCD_WIDTH-pPortCfg->partialRefreshRectangle[RECT_OFFSETX]-pPortCfg-
>partialRefreshRectangle[RECT_WIDTH],
LCD_HEIGHT-pPortCfg->partialRefreshRectangle[RECT_OFFSETY]-pPortCfg-
>partialRefreshRectangle[RECT_HEIGHT],
LCD_WIDTH-pPortCfg->partialRefreshRectangle[RECT_OFFSETX]-1,
LCD_HEIGHT-pPortCfg->partialRefreshRectangle[RECT_OFFSETY]-1);
...............
}
3. __wfd_lcd_PipelineCommit()destinationRectangle
static WFDboolean
__wfd_lcd_PipelineCommit(WFD_DEVICE* device, WFD_PIPELINE* pipeline)
{
...............
//LCD_SET_LAYER_OFFSET(id,
// (config->destinationRectangle[RECT_OFFSETX] +
WFD_LCD_ROI_ORIGIN_X),
// (config->destinationRectangle[RECT_OFFSETY] +
WFD_LCD_ROI_ORIGIN_Y));
// For video layer, we need to copy src rect w/h to dest w/h since dest rect is default
0
if (0 == config->destinationRectangle[RECT_WIDTH] ||
0 == config->destinationRectangle[RECT_HEIGHT])
{
config->destinationRectangle[RECT_WIDTH] = config-
>sourceRectangle[RECT_WIDTH];
config->destinationRectangle[RECT_HEIGHT] = config-
>sourceRectangle[RECT_HEIGHT];
}
LCD_SET_LAYER_OFFSET(id,
WFD_LCD_ROI_ORIGIN_X+(LCD_WIDTH-config-
>destinationRectangle[RECT_OFFSETX]-config-
>destinationRectangle[RECT_WIDTH]),
WFD_LCD_ROI_ORIGIN_Y+(LCD_HEIGHT-config-
>destinationRectangle[RECT_OFFSETY]-config-
>destinationRectangle[RECT_HEIGHT]));
...............
}

icFANS
4. lcdTear_VsyncModeConfig()lcm_startY
static lcdTearErrorCode
lcdTear_VsyncModeConfig(
kal_uint32 port_id,
kal_uint32 lcm_startY,
kal_uint32 roiWidth,
kal_uint32 roiHeight)
{
...............
//kal_uint32 final_hsync_cnt = lcm_startY;
kal_uint32 final_hsync_cnt = LCD_HEIGHT-lcm_startY-roiHeight;
...............
}
5. m c,r drv_display new