From 9a27f048b4be3826660c4d9d4262c52934c93f58 Mon Sep 17 00:00:00 2001 From: yxj Date: Thu, 13 Mar 2014 11:18:00 +0800 Subject: [PATCH] rk fb: add rk_fb_trsm_ops --- drivers/video/rockchip/lcdc/rk3188_lcdc.c | 10 +++++++--- drivers/video/rockchip/rk_fb.c | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/video/rockchip/lcdc/rk3188_lcdc.c b/drivers/video/rockchip/lcdc/rk3188_lcdc.c index 28229cb82d0c..18c20311265e 100755 --- a/drivers/video/rockchip/lcdc/rk3188_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3188_lcdc.c @@ -553,7 +553,8 @@ static int rk3188_load_screen(struct rk_lcdc_driver *dev_drv, bool initscreen) screen->ft = 1000 / fps; dev_info(lcdc_dev->dev, "%s: dclk:%lu>>fps:%d ", lcdc_dev->driver.name, clk_get_rate(lcdc_dev->dclk), fps); - + if (dev_drv->trsm_ops && dev_drv->trsm_ops->enable) + dev_drv->trsm_ops->enable(); if (screen->init) screen->init(); @@ -1038,7 +1039,9 @@ static int rk3188_lcdc_early_suspend(struct rk_lcdc_driver *dev_drv) dev_drv->suspend_flag = 1; flush_kthread_worker(&dev_drv->update_regs_worker); - + + if (dev_drv->trsm_ops && dev_drv->trsm_ops->disable) + dev_drv->trsm_ops->disable(); spin_lock(&lcdc_dev->reg_lock); if (likely(lcdc_dev->clk_on)) { lcdc_msk_reg(lcdc_dev, DSP_CTRL1, m_BLANK_EN, @@ -1102,7 +1105,8 @@ static int rk3188_lcdc_early_resume(struct rk_lcdc_driver *dev_drv) spin_unlock(&lcdc_dev->reg_lock); } - + if (dev_drv->trsm_ops && dev_drv->trsm_ops->enable) + dev_drv->trsm_ops->enable(); return 0; } diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index a2b3d32f0c3a..ce7ebe16a329 100755 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -2385,6 +2385,7 @@ static int init_lcdc_device_driver(struct rk_fb *rk_fb, rk_disp_pwr_ctr_parse_dt(dev_drv); if (dev_drv->prop == PRMRY) rk_fb_get_prmry_screen(screen); + dev_drv->trsm_ops = rk_fb_trsm_ops_get(screen->type); return 0; } -- 2.34.1