mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
rk30 lcdc: add open and release interface
fix a wrong register configratoin
This commit is contained in:
@@ -393,7 +393,7 @@ static int win1_set_par(struct rk30_lcdc_device *lcdc_dev,rk_screen *screen,
|
||||
LcdWrReg(lcdc_dev, WIN1_SCL_FACTOR_CBR, v_X_SCL_FACTOR(ScaleCbrX) | v_Y_SCL_FACTOR(ScaleCbrY));
|
||||
LcdMskReg(lcdc_dev, SYS_CTRL1, m_W1_EN|m_W1_FORMAT, v_W1_EN(1)|v_W1_FORMAT(par->format));
|
||||
LcdWrReg(lcdc_dev, WIN1_YRGB_MST, addr);
|
||||
LcdWrReg(lcdc_dev, WIN0_ACT_INFO,v_ACT_WIDTH(xact) | v_ACT_HEIGHT(yact));
|
||||
LcdWrReg(lcdc_dev, WIN1_ACT_INFO,v_ACT_WIDTH(xact) | v_ACT_HEIGHT(yact));
|
||||
LcdWrReg(lcdc_dev, WIN1_DSP_ST,v_DSP_STX(xpos) | v_DSP_STY(ypos));
|
||||
LcdWrReg(lcdc_dev, WIN1_DSP_INFO,v_DSP_WIDTH(par->xsize) | v_DSP_HEIGHT(par->ysize));
|
||||
// enable win1 color key and set the color to black(rgb=0)
|
||||
|
||||
@@ -84,7 +84,28 @@ defautl:we alloc three buffer,one for fb0 and fb2 display ui,one for ipp rotate
|
||||
fb1 and fb3 are used for video play,the buffer is alloc by android,and
|
||||
pass the phy addr to fix.smem_start by ioctl
|
||||
****************************************************************************/
|
||||
static int rk_fb_open(struct fb_info *info,int user)
|
||||
{
|
||||
struct rk_fb_inf *inf = dev_get_drvdata(info->device);
|
||||
struct fb_fix_screeninfo *fix = &info->fix;
|
||||
if(!strcmp(fix->id,"fb1")){
|
||||
inf->video_mode = 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static int rk_fb_release(struct fb_info *info,int user)
|
||||
{
|
||||
struct rk_fb_inf *inf = dev_get_drvdata(info->device);
|
||||
struct fb_fix_screeninfo *fix = &info->fix;
|
||||
if(!strcmp(fix->id,"fb1")){
|
||||
inf->video_mode = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int rk_fb_ioctl(struct fb_info *info, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
@@ -394,6 +415,8 @@ static int fb_setcolreg(unsigned regno,
|
||||
|
||||
static struct fb_ops fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.fb_open = rk_fb_open,
|
||||
.fb_release = rk_fb_release,
|
||||
.fb_check_var = rk_fb_check_var,
|
||||
.fb_set_par = rk_fb_set_par,
|
||||
.fb_blank = rk_fb_blank,
|
||||
|
||||
Reference in New Issue
Block a user