mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Revert "Revert "mako: enable lgit lcd driver""
This reverts commit ba14d0b42c
.
Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
parent
ef1120d0a4
commit
97b83c2355
6 changed files with 108 additions and 4 deletions
|
@ -298,7 +298,7 @@ static int apq8064_paddr_to_memtype(unsigned int paddr)
|
|||
return MEMTYPE_EBI1;
|
||||
}
|
||||
|
||||
#define FMEM_ENABLED 1
|
||||
#define FMEM_ENABLED 0
|
||||
|
||||
#ifdef CONFIG_ION_MSM
|
||||
#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
|
||||
|
|
|
@ -317,6 +317,11 @@ config FB_MSM_LVDS_CHIMEI_WXGA
|
|||
select FB_MSM_LVDS
|
||||
default n
|
||||
|
||||
config FB_MSM_LVDS_FRC_FHD
|
||||
bool
|
||||
select FB_MSM_LVDS
|
||||
default n
|
||||
|
||||
config FB_MSM_MIPI_TOSHIBA_VIDEO_WVGA_PT
|
||||
bool
|
||||
select FB_MSM_MIPI_DSI_TOSHIBA
|
||||
|
|
|
@ -75,6 +75,7 @@ msm_mipi-objs := mipi_dsi.o mipi_dsi_host.o
|
|||
obj-$(CONFIG_FB_MSM_MIPI_DSI) += msm_mipi.o
|
||||
|
||||
# MIPI manufacture
|
||||
obj-$(CONFIG_FB_MSM_MIPI_DSI_LGIT) += mipi_lgit.o
|
||||
obj-$(CONFIG_FB_MSM_MIPI_DSI_TOSHIBA) += mipi_toshiba.o
|
||||
obj-$(CONFIG_FB_MSM_MIPI_DSI_NOVATEK) += mipi_novatek.o
|
||||
obj-$(CONFIG_FB_MSM_MIPI_DSI_ORISE) += mipi_orise.o
|
||||
|
@ -129,6 +130,7 @@ obj-y += mipi_chimei_wxga_pt.o
|
|||
obj-y += mipi_chimei_wuxga.o
|
||||
obj-y += mipi_truly_video_wvga_pt.o
|
||||
else
|
||||
obj-$(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WXGA_PT) += mipi_lgit_video_wxga_pt.o
|
||||
obj-$(CONFIG_FB_MSM_MIPI_TOSHIBA_VIDEO_WVGA_PT) += mipi_toshiba_video_wvga_pt.o
|
||||
obj-$(CONFIG_FB_MSM_MIPI_TOSHIBA_VIDEO_WSVGA_PT) += mipi_toshiba_video_wsvga_pt.o
|
||||
obj-$(CONFIG_FB_MSM_MIPI_TOSHIBA_VIDEO_WUXGA) += mipi_toshiba_video_wuxga.o
|
||||
|
|
|
@ -268,7 +268,8 @@ static int mipi_dsi_on(struct platform_device *pdev)
|
|||
else
|
||||
down(&mfd->dma->mutex);
|
||||
|
||||
ret = panel_next_on(pdev);
|
||||
if (mfd->op_enable)
|
||||
ret = panel_next_on(pdev);
|
||||
|
||||
mipi_dsi_op_mode_config(mipi->mode);
|
||||
|
||||
|
|
|
@ -700,8 +700,8 @@ void mipi_dsi_clk_enable(void)
|
|||
if (clk_set_rate(dsi_byte_div_clk, 1) < 0) /* divided by 1 */
|
||||
pr_err("%s: dsi_byte_div_clk - "
|
||||
"clk_set_rate failed\n", __func__);
|
||||
if (clk_set_rate(dsi_esc_clk, esc_byte_ratio) < 0) /* divided by esc */
|
||||
pr_err("%s: dsi_esc_clk - " /* clk ratio */
|
||||
if (clk_set_rate(dsi_esc_clk, 2) < 0) /* divided by 2 */
|
||||
pr_err("%s: dsi_esc_clk - "
|
||||
"clk_set_rate failed\n", __func__);
|
||||
mipi_dsi_pclk_ctrl(&dsi_pclk, 1);
|
||||
mipi_dsi_clk_ctrl(&dsicore_clk, 1);
|
||||
|
|
|
@ -117,6 +117,11 @@ static void msm_fb_scale_bl(__u32 *bl_lvl);
|
|||
static void msm_fb_commit_wq_handler(struct work_struct *work);
|
||||
static int msm_fb_pan_idle(struct msm_fb_data_type *mfd);
|
||||
|
||||
#ifdef CONFIG_LGE_DISP_FBREAD
|
||||
static ssize_t msm_fb_read(struct fb_info *info, char __user *buf,
|
||||
size_t count, loff_t *ppos);
|
||||
#endif
|
||||
|
||||
#ifdef MSM_FB_ENABLE_DBGFS
|
||||
|
||||
#define MSM_FB_MAX_DBGFS 1024
|
||||
|
@ -1187,7 +1192,11 @@ static struct fb_ops msm_fb_ops = {
|
|||
.owner = THIS_MODULE,
|
||||
.fb_open = msm_fb_open,
|
||||
.fb_release = msm_fb_release,
|
||||
#ifdef CONFIG_LGE_DISP_FBREAD
|
||||
.fb_read = msm_fb_read,
|
||||
#else
|
||||
.fb_read = NULL,
|
||||
#endif
|
||||
.fb_write = NULL,
|
||||
.fb_cursor = NULL,
|
||||
.fb_check_var = msm_fb_check_var, /* vinfo check */
|
||||
|
@ -1247,8 +1256,13 @@ static int msm_fb_register(struct msm_fb_data_type *mfd)
|
|||
var->grayscale = 0, /* No graylevels */
|
||||
var->nonstd = 0, /* standard pixel format */
|
||||
var->activate = FB_ACTIVATE_VBL, /* activate it at vsync */
|
||||
#if defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WXGA_PT)
|
||||
var->height = 102, /* height of picture in mm */
|
||||
var->width = 61, /* width of picture in mm */
|
||||
#else
|
||||
var->height = -1, /* height of picture in mm */
|
||||
var->width = -1, /* width of picture in mm */
|
||||
#endif
|
||||
var->accel_flags = 0, /* acceleration flags */
|
||||
var->sync = 0, /* see FB_SYNC_* */
|
||||
var->rotate = 0, /* angle we rotate counter clockwise */
|
||||
|
@ -1578,6 +1592,10 @@ static int msm_fb_register(struct msm_fb_data_type *mfd)
|
|||
("FrameBuffer[%d] %dx%d size=%d bytes is registered successfully!\n",
|
||||
mfd->index, fbi->var.xres, fbi->var.yres, fbi->fix.smem_len);
|
||||
|
||||
#ifdef CONFIG_UPDATE_LCDC_LUT
|
||||
if (msm_fb_pdata->update_lcdc_lut)
|
||||
msm_fb_pdata->update_lcdc_lut();
|
||||
#endif
|
||||
#ifdef CONFIG_FB_MSM_LOGO
|
||||
/* Flip buffer */
|
||||
if (!load_565rle_image(INIT_IMAGE_FILE, bf_supported))
|
||||
|
@ -4333,6 +4351,84 @@ int __init msm_fb_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* To implement "msm_fb_read" for screenshot such as DDMS"
|
||||
*/
|
||||
#ifdef CONFIG_LGE_DISP_FBREAD
|
||||
static ssize_t
|
||||
msm_fb_read(struct fb_info *info, char __user *buf, size_t count, loff_t *ppos)
|
||||
{
|
||||
|
||||
unsigned long p = *ppos;
|
||||
u32 *buffer;
|
||||
u8 *dst;
|
||||
u8 __iomem *src;
|
||||
u8 r, g, b;
|
||||
int c, i, cnt = 0, err = 0;
|
||||
unsigned long total_size;
|
||||
int line_length, xres, bpp;
|
||||
|
||||
total_size = info->screen_size;
|
||||
|
||||
if (total_size == 0)
|
||||
total_size = info->fix.smem_len;
|
||||
|
||||
if (p >= total_size)
|
||||
return 0;
|
||||
|
||||
if (count >= total_size)
|
||||
count = total_size;
|
||||
|
||||
if (count + p > total_size)
|
||||
count = total_size - p;
|
||||
|
||||
buffer = kmalloc((count > PAGE_SIZE) ? PAGE_SIZE : count,
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
src = (u8 __iomem *) (info->screen_base + p);
|
||||
|
||||
xres = info->var.xres;
|
||||
line_length = ALIGN(xres, 32);
|
||||
|
||||
bpp = info->var.bits_per_pixel/8;
|
||||
|
||||
for (i = 0; i < count; i += 4) {
|
||||
|
||||
c = 4;
|
||||
r = fb_readb(src++);
|
||||
g = fb_readb(src++);
|
||||
b = fb_readb(src++);
|
||||
src++;
|
||||
|
||||
*ppos += c;
|
||||
|
||||
if ((p+i)%(line_length*bpp) >= xres*bpp)
|
||||
continue;
|
||||
|
||||
dst = (u8 *)buffer;
|
||||
*dst++ = r;
|
||||
*dst++ = g;
|
||||
*dst++ = b;
|
||||
*dst++ = 0xff;
|
||||
|
||||
if (copy_to_user(buf, buffer, c)) {
|
||||
err = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
cnt += c;
|
||||
buf += c;
|
||||
}
|
||||
|
||||
kfree(buffer);
|
||||
|
||||
return (err) ? err : cnt;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Called by v4l2 driver to enable/disable overlay pipe */
|
||||
int msm_fb_v4l2_enable(struct mdp_overlay *req, bool enable, void **par)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue