rk3188 lcdc: write config done for HDMI,fix scale bug

This commit is contained in:
yxj
2013-02-04 15:12:33 +08:00
parent 5e27e6f0af
commit af8cd160c8
2 changed files with 25 additions and 3 deletions

View File

@@ -30,6 +30,7 @@
#include <asm/div64.h>
#include <asm/uaccess.h>
#include <mach/iomux.h>
#include "../hdmi/rk_hdmi.h"
#include "rk3188_lcdc.h"
@@ -378,7 +379,6 @@ static int rk3188_load_screen(struct rk_lcdc_device_driver *dev_drv, bool initsc
u16 x_res = screen->x_res;
u16 y_res = screen->y_res;
spin_lock(&lcdc_dev->reg_lock);
if(likely(lcdc_dev->clk_on))
{
@@ -710,7 +710,18 @@ static int win0_display(struct rk3188_lcdc_device *lcdc_dev,struct layer_par *p
if(likely(lcdc_dev->clk_on))
{
lcdc_writel(lcdc_dev, WIN0_YRGB_MST0, y_addr);
lcdc_writel(lcdc_dev, WIN0_CBR_MST0, uv_addr);
lcdc_writel(lcdc_dev, WIN0_CBR_MST0, uv_addr);
#if defined(CONFIG_RK_HDMI)
#if defined(CONFIG_DUAL_LCDC_DUAL_DISP_IN_KERNEL)
if(lcdc_dev->driver.screen_ctr_info->prop == EXTEND)
{
if(hdmi_get_hotplug() == HDMI_HPD_ACTIVED)
{
lcdc_cfg_done(lcdc_dev);
}
}
#endif
#endif
}
spin_unlock(&lcdc_dev->reg_lock);
@@ -730,6 +741,17 @@ static int win1_display(struct rk3188_lcdc_device *lcdc_dev,struct layer_par *p
if(likely(lcdc_dev->clk_on))
{
lcdc_writel(lcdc_dev,WIN1_MST,y_addr);
#if defined(CONFIG_RK_HDMI)
#if defined(CONFIG_DUAL_LCDC_DUAL_DISP_IN_KERNEL)
if(lcdc_dev->driver.screen_ctr_info->prop == EXTEND)
{
if(hdmi_get_hotplug() == HDMI_HPD_ACTIVED)
{
lcdc_cfg_done(lcdc_dev);
}
}
#endif
#endif
}
spin_unlock(&lcdc_dev->reg_lock);

View File

@@ -287,7 +287,7 @@
#define DSP_LUT_ADDR (0x800)
#define CalScale(x, y) ((((u32)x)*0x1000)/y)
#define CalScale(x, y) ((((u32)(x-1))*0x1000)/(y-1))
struct rk3188_lcdc_device{
int id;