mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Revert "msm: mdp: Initialize vsync sysfs in probe"
This reverts commit 41db433cc845eb27bb765cc0cf599e872edd709f. Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org> Change-Id: Ie353ed5bc3dd8d23c428973aa260774c7cff0361 Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
This commit is contained in:
parent
69d205069c
commit
8148427eaf
7 changed files with 107 additions and 123 deletions
|
@ -2462,7 +2462,6 @@ static int mdp_probe(struct platform_device *pdev)
|
||||||
/* link to the latest pdev */
|
/* link to the latest pdev */
|
||||||
mfd->pdev = msm_fb_dev;
|
mfd->pdev = msm_fb_dev;
|
||||||
mfd->mdp_rev = mdp_rev;
|
mfd->mdp_rev = mdp_rev;
|
||||||
mfd->vsync_init = NULL;
|
|
||||||
|
|
||||||
if (mdp_pdata) {
|
if (mdp_pdata) {
|
||||||
if (mdp_pdata->cont_splash_enabled) {
|
if (mdp_pdata->cont_splash_enabled) {
|
||||||
|
@ -2591,7 +2590,7 @@ static int mdp_probe(struct platform_device *pdev)
|
||||||
case MIPI_VIDEO_PANEL:
|
case MIPI_VIDEO_PANEL:
|
||||||
#ifndef CONFIG_FB_MSM_MDP303
|
#ifndef CONFIG_FB_MSM_MDP303
|
||||||
mipi = &mfd->panel_info.mipi;
|
mipi = &mfd->panel_info.mipi;
|
||||||
mfd->vsync_init = mdp4_dsi_vsync_init;
|
mdp4_dsi_vsync_init(0);
|
||||||
mfd->hw_refresh = TRUE;
|
mfd->hw_refresh = TRUE;
|
||||||
mfd->dma_fnc = mdp4_dsi_video_overlay;
|
mfd->dma_fnc = mdp4_dsi_video_overlay;
|
||||||
mfd->lut_update = mdp_lut_update_lcdc;
|
mfd->lut_update = mdp_lut_update_lcdc;
|
||||||
|
@ -2635,7 +2634,7 @@ static int mdp_probe(struct platform_device *pdev)
|
||||||
#ifndef CONFIG_FB_MSM_MDP303
|
#ifndef CONFIG_FB_MSM_MDP303
|
||||||
mfd->dma_fnc = mdp4_dsi_cmd_overlay;
|
mfd->dma_fnc = mdp4_dsi_cmd_overlay;
|
||||||
mipi = &mfd->panel_info.mipi;
|
mipi = &mfd->panel_info.mipi;
|
||||||
mfd->vsync_init = mdp4_dsi_rdptr_init;
|
mdp4_dsi_rdptr_init(0);
|
||||||
if (mfd->panel_info.pdest == DISPLAY_1) {
|
if (mfd->panel_info.pdest == DISPLAY_1) {
|
||||||
if_no = PRIMARY_INTF_SEL;
|
if_no = PRIMARY_INTF_SEL;
|
||||||
mfd->dma = &dma2_data;
|
mfd->dma = &dma2_data;
|
||||||
|
@ -2671,7 +2670,7 @@ static int mdp_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
#ifdef CONFIG_FB_MSM_DTV
|
#ifdef CONFIG_FB_MSM_DTV
|
||||||
case DTV_PANEL:
|
case DTV_PANEL:
|
||||||
mfd->vsync_init = mdp4_dtv_vsync_init;
|
mdp4_dtv_vsync_init(0);
|
||||||
pdata->on = mdp4_dtv_on;
|
pdata->on = mdp4_dtv_on;
|
||||||
pdata->off = mdp4_dtv_off;
|
pdata->off = mdp4_dtv_off;
|
||||||
mfd->hw_refresh = TRUE;
|
mfd->hw_refresh = TRUE;
|
||||||
|
@ -2710,7 +2709,7 @@ static int mdp_probe(struct platform_device *pdev)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_FB_MSM_MDP40
|
#ifdef CONFIG_FB_MSM_MDP40
|
||||||
mfd->vsync_init = mdp4_lcdc_vsync_init;
|
mdp4_lcdc_vsync_init(0);
|
||||||
if (mfd->panel.type == HDMI_PANEL) {
|
if (mfd->panel.type == HDMI_PANEL) {
|
||||||
mfd->dma = &dma_e_data;
|
mfd->dma = &dma_e_data;
|
||||||
mdp4_display_intf_sel(EXTERNAL_INTF_SEL, LCDC_RGB_INTF);
|
mdp4_display_intf_sel(EXTERNAL_INTF_SEL, LCDC_RGB_INTF);
|
||||||
|
@ -2816,8 +2815,6 @@ static int mdp_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
pdev_list[pdev_list_cnt++] = pdev;
|
pdev_list[pdev_list_cnt++] = pdev;
|
||||||
mdp4_extn_disp = 0;
|
mdp4_extn_disp = 0;
|
||||||
if (mfd->vsync_init != NULL)
|
|
||||||
mfd->vsync_init(0, mfd);
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
mdp_probe_err:
|
mdp_probe_err:
|
||||||
|
|
|
@ -573,10 +573,10 @@ int mdp4_dsi_cmd_pipe_commit(int cndx, int wait);
|
||||||
int mdp4_lcdc_pipe_commit(int cndx, int wait);
|
int mdp4_lcdc_pipe_commit(int cndx, int wait);
|
||||||
int mdp4_dtv_pipe_commit(int cndx, int wait);
|
int mdp4_dtv_pipe_commit(int cndx, int wait);
|
||||||
int mdp4_dsi_cmd_update_cnt(int cndx);
|
int mdp4_dsi_cmd_update_cnt(int cndx);
|
||||||
void mdp4_dsi_rdptr_init(int cndx, struct msm_fb_data_type *mfd);
|
void mdp4_dsi_rdptr_init(int cndx);
|
||||||
void mdp4_dsi_vsync_init(int cndx, struct msm_fb_data_type *mfd);
|
void mdp4_dsi_vsync_init(int cndx);
|
||||||
void mdp4_lcdc_vsync_init(int cndx, struct msm_fb_data_type *mfd);
|
void mdp4_lcdc_vsync_init(int cndx);
|
||||||
void mdp4_dtv_vsync_init(int cndx, struct msm_fb_data_type *mfd);
|
void mdp4_dtv_vsync_init(int cndx);
|
||||||
void mdp4_overlay_dsi_state_set(int state);
|
void mdp4_overlay_dsi_state_set(int state);
|
||||||
int mdp4_overlay_dsi_state_get(void);
|
int mdp4_overlay_dsi_state_get(void);
|
||||||
void mdp4_overlay_rgb_setup(struct mdp4_overlay_pipe *pipe);
|
void mdp4_overlay_rgb_setup(struct mdp4_overlay_pipe *pipe);
|
||||||
|
|
|
@ -685,19 +685,9 @@ static ssize_t vsync_show_event(struct device *dev,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DEVICE_ATTR(vsync_event, S_IRUGO, vsync_show_event, NULL);
|
void mdp4_dsi_rdptr_init(int cndx)
|
||||||
static struct attribute *vsync_fs_attrs[] = {
|
|
||||||
&dev_attr_vsync_event.attr,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
static struct attribute_group vsync_fs_attr_group = {
|
|
||||||
.attrs = vsync_fs_attrs,
|
|
||||||
};
|
|
||||||
|
|
||||||
void mdp4_dsi_rdptr_init(int cndx, struct msm_fb_data_type *mfd)
|
|
||||||
{
|
{
|
||||||
struct vsycn_ctrl *vctrl;
|
struct vsycn_ctrl *vctrl;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (cndx >= MAX_CONTROLLER) {
|
if (cndx >= MAX_CONTROLLER) {
|
||||||
pr_err("%s: out or range: cndx=%d\n", __func__, cndx);
|
pr_err("%s: out or range: cndx=%d\n", __func__, cndx);
|
||||||
|
@ -708,8 +698,6 @@ void mdp4_dsi_rdptr_init(int cndx, struct msm_fb_data_type *mfd)
|
||||||
if (vctrl->inited)
|
if (vctrl->inited)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
vctrl->mfd = mfd;
|
|
||||||
vctrl->dev = mfd->fbi->dev;
|
|
||||||
vctrl->inited = 1;
|
vctrl->inited = 1;
|
||||||
vctrl->update_ndx = 0;
|
vctrl->update_ndx = 0;
|
||||||
mutex_init(&vctrl->update_lock);
|
mutex_init(&vctrl->update_lock);
|
||||||
|
@ -717,22 +705,8 @@ void mdp4_dsi_rdptr_init(int cndx, struct msm_fb_data_type *mfd)
|
||||||
init_completion(&vctrl->dmap_comp);
|
init_completion(&vctrl->dmap_comp);
|
||||||
init_completion(&vctrl->vsync_comp);
|
init_completion(&vctrl->vsync_comp);
|
||||||
spin_lock_init(&vctrl->spin_lock);
|
spin_lock_init(&vctrl->spin_lock);
|
||||||
atomic_set(&vctrl->suspend, 1);
|
atomic_set(&vctrl->vsync_resume, 1);
|
||||||
INIT_WORK(&vctrl->clk_work, clk_ctrl_work);
|
INIT_WORK(&vctrl->clk_work, clk_ctrl_work);
|
||||||
if (!vctrl->sysfs_created) {
|
|
||||||
ret = sysfs_create_group(&vctrl->dev->kobj,
|
|
||||||
&vsync_fs_attr_group);
|
|
||||||
if (ret) {
|
|
||||||
pr_err("%s: sysfs group creation failed, ret=%d\n",
|
|
||||||
__func__, ret);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kobject_uevent(&vctrl->dev->kobj, KOBJ_ADD);
|
|
||||||
pr_debug("%s: kobject_uevent(KOBJ_ADD)\n", __func__);
|
|
||||||
vctrl->sysfs_created = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mdp4_primary_rdptr(void)
|
void mdp4_primary_rdptr(void)
|
||||||
|
@ -1000,6 +974,14 @@ void mdp4_dsi_cmd_overlay_blt(struct msm_fb_data_type *mfd,
|
||||||
mdp4_dsi_cmd_do_blt(mfd, req->enable);
|
mdp4_dsi_cmd_do_blt(mfd, req->enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DEVICE_ATTR(vsync_event, S_IRUGO, vsync_show_event, NULL);
|
||||||
|
static struct attribute *vsync_fs_attrs[] = {
|
||||||
|
&dev_attr_vsync_event.attr,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
static struct attribute_group vsync_fs_attr_group = {
|
||||||
|
.attrs = vsync_fs_attrs,
|
||||||
|
};
|
||||||
int mdp4_dsi_cmd_on(struct platform_device *pdev)
|
int mdp4_dsi_cmd_on(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -1040,6 +1022,20 @@ int mdp4_dsi_cmd_on(struct platform_device *pdev)
|
||||||
|
|
||||||
pr_debug("%s-:\n", __func__);
|
pr_debug("%s-:\n", __func__);
|
||||||
|
|
||||||
|
if (!vctrl->sysfs_created) {
|
||||||
|
ret = sysfs_create_group(&vctrl->dev->kobj,
|
||||||
|
&vsync_fs_attr_group);
|
||||||
|
if (ret) {
|
||||||
|
pr_err("%s: sysfs group creation failed, ret=%d\n",
|
||||||
|
__func__, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
kobject_uevent(&vctrl->dev->kobj, KOBJ_ADD);
|
||||||
|
pr_debug("%s: kobject_uevent(KOBJ_ADD)\n", __func__);
|
||||||
|
vctrl->sysfs_created = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -411,20 +411,9 @@ static ssize_t vsync_show_event(struct device *dev,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DEVICE_ATTR(vsync_event, S_IRUGO, vsync_show_event, NULL);
|
void mdp4_dsi_vsync_init(int cndx)
|
||||||
|
|
||||||
static struct attribute *vsync_fs_attrs[] = {
|
|
||||||
&dev_attr_vsync_event.attr,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
static struct attribute_group vsync_fs_attr_group = {
|
|
||||||
.attrs = vsync_fs_attrs,
|
|
||||||
};
|
|
||||||
|
|
||||||
void mdp4_dsi_vsync_init(int cndx, struct msm_fb_data_type *mfd)
|
|
||||||
{
|
{
|
||||||
struct vsycn_ctrl *vctrl;
|
struct vsycn_ctrl *vctrl;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (cndx >= MAX_CONTROLLER) {
|
if (cndx >= MAX_CONTROLLER) {
|
||||||
pr_err("%s: out or range: cndx=%d\n", __func__, cndx);
|
pr_err("%s: out or range: cndx=%d\n", __func__, cndx);
|
||||||
|
@ -437,31 +426,15 @@ void mdp4_dsi_vsync_init(int cndx, struct msm_fb_data_type *mfd)
|
||||||
if (vctrl->inited)
|
if (vctrl->inited)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
vctrl->mfd = mfd;
|
|
||||||
vctrl->dev = mfd->fbi->dev;
|
|
||||||
vctrl->inited = 1;
|
vctrl->inited = 1;
|
||||||
vctrl->update_ndx = 0;
|
vctrl->update_ndx = 0;
|
||||||
mutex_init(&vctrl->update_lock);
|
mutex_init(&vctrl->update_lock);
|
||||||
init_completion(&vctrl->vsync_comp);
|
init_completion(&vctrl->vsync_comp);
|
||||||
init_completion(&vctrl->dmap_comp);
|
init_completion(&vctrl->dmap_comp);
|
||||||
init_completion(&vctrl->ov_comp);
|
init_completion(&vctrl->ov_comp);
|
||||||
atomic_set(&vctrl->suspend, 1);
|
atomic_set(&vctrl->suspend, 0);
|
||||||
atomic_set(&vctrl->vsync_resume, 1);
|
atomic_set(&vctrl->vsync_resume, 1);
|
||||||
spin_lock_init(&vctrl->spin_lock);
|
spin_lock_init(&vctrl->spin_lock);
|
||||||
|
|
||||||
if (!vctrl->sysfs_created) {
|
|
||||||
ret = sysfs_create_group(&vctrl->dev->kobj,
|
|
||||||
&vsync_fs_attr_group);
|
|
||||||
if (ret) {
|
|
||||||
pr_err("%s: sysfs group creation failed, ret=%d\n",
|
|
||||||
__func__, ret);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kobject_uevent(&vctrl->dev->kobj, KOBJ_ADD);
|
|
||||||
pr_debug("%s: kobject_uevent(KOBJ_ADD)\n", __func__);
|
|
||||||
vctrl->sysfs_created = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mdp4_dsi_video_base_swap(int cndx, struct mdp4_overlay_pipe *pipe)
|
void mdp4_dsi_video_base_swap(int cndx, struct mdp4_overlay_pipe *pipe)
|
||||||
|
@ -477,6 +450,16 @@ void mdp4_dsi_video_base_swap(int cndx, struct mdp4_overlay_pipe *pipe)
|
||||||
vctrl->base_pipe = pipe;
|
vctrl->base_pipe = pipe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DEVICE_ATTR(vsync_event, S_IRUGO, vsync_show_event, NULL);
|
||||||
|
|
||||||
|
static struct attribute *vsync_fs_attrs[] = {
|
||||||
|
&dev_attr_vsync_event.attr,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct attribute_group vsync_fs_attr_group = {
|
||||||
|
.attrs = vsync_fs_attrs,
|
||||||
|
};
|
||||||
int mdp4_dsi_video_on(struct platform_device *pdev)
|
int mdp4_dsi_video_on(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
int dsi_width;
|
int dsi_width;
|
||||||
|
@ -694,6 +677,20 @@ int mdp4_dsi_video_on(struct platform_device *pdev)
|
||||||
mdp_histogram_ctrl_all(TRUE);
|
mdp_histogram_ctrl_all(TRUE);
|
||||||
mdp4_overlay_dsi_video_start();
|
mdp4_overlay_dsi_video_start();
|
||||||
|
|
||||||
|
if (!vctrl->sysfs_created) {
|
||||||
|
ret = sysfs_create_group(&vctrl->dev->kobj,
|
||||||
|
&vsync_fs_attr_group);
|
||||||
|
if (ret) {
|
||||||
|
pr_err("%s: sysfs group creation failed, ret=%d\n",
|
||||||
|
__func__, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
kobject_uevent(&vctrl->dev->kobj, KOBJ_ADD);
|
||||||
|
pr_debug("%s: kobject_uevent(KOBJ_ADD)\n", __func__);
|
||||||
|
vctrl->sysfs_created = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -353,20 +353,9 @@ static ssize_t vsync_show_event(struct device *dev,
|
||||||
buf[strlen(buf) + 1] = '\0';
|
buf[strlen(buf) + 1] = '\0';
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
void mdp4_dtv_vsync_init(int cndx)
|
||||||
static DEVICE_ATTR(vsync_event, S_IRUGO, vsync_show_event, NULL);
|
|
||||||
static struct attribute *vsync_fs_attrs[] = {
|
|
||||||
&dev_attr_vsync_event.attr,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
static struct attribute_group vsync_fs_attr_group = {
|
|
||||||
.attrs = vsync_fs_attrs,
|
|
||||||
};
|
|
||||||
|
|
||||||
void mdp4_dtv_vsync_init(int cndx, struct msm_fb_data_type *mfd)
|
|
||||||
{
|
{
|
||||||
struct vsycn_ctrl *vctrl;
|
struct vsycn_ctrl *vctrl;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (cndx >= MAX_CONTROLLER) {
|
if (cndx >= MAX_CONTROLLER) {
|
||||||
pr_err("%s: out or range: cndx=%d\n", __func__, cndx);
|
pr_err("%s: out or range: cndx=%d\n", __func__, cndx);
|
||||||
|
@ -379,29 +368,15 @@ void mdp4_dtv_vsync_init(int cndx, struct msm_fb_data_type *mfd)
|
||||||
if (vctrl->inited)
|
if (vctrl->inited)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
vctrl->dev = mfd->fbi->dev;
|
|
||||||
vctrl->inited = 1;
|
vctrl->inited = 1;
|
||||||
vctrl->update_ndx = 0;
|
vctrl->update_ndx = 0;
|
||||||
mutex_init(&vctrl->update_lock);
|
mutex_init(&vctrl->update_lock);
|
||||||
init_completion(&vctrl->vsync_comp);
|
init_completion(&vctrl->vsync_comp);
|
||||||
init_completion(&vctrl->ov_comp);
|
init_completion(&vctrl->ov_comp);
|
||||||
init_completion(&vctrl->dmae_comp);
|
init_completion(&vctrl->dmae_comp);
|
||||||
atomic_set(&vctrl->suspend, 1);
|
atomic_set(&vctrl->suspend, 0);
|
||||||
atomic_set(&vctrl->vsync_resume, 1);
|
atomic_set(&vctrl->vsync_resume, 1);
|
||||||
spin_lock_init(&vctrl->spin_lock);
|
spin_lock_init(&vctrl->spin_lock);
|
||||||
if (!vctrl->sysfs_created) {
|
|
||||||
ret = sysfs_create_group(&vctrl->dev->kobj,
|
|
||||||
&vsync_fs_attr_group);
|
|
||||||
if (ret) {
|
|
||||||
pr_err("%s: sysfs group creation failed, ret=%d\n",
|
|
||||||
__func__, ret);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kobject_uevent(&vctrl->dev->kobj, KOBJ_ADD);
|
|
||||||
pr_debug("%s: kobject_uevent(KOBJ_ADD)\n", __func__);
|
|
||||||
vctrl->sysfs_created = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mdp4_dtv_start(struct msm_fb_data_type *mfd)
|
static int mdp4_dtv_start(struct msm_fb_data_type *mfd)
|
||||||
|
@ -562,6 +537,15 @@ static int mdp4_dtv_stop(struct msm_fb_data_type *mfd)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DEVICE_ATTR(vsync_event, S_IRUGO, vsync_show_event, NULL);
|
||||||
|
static struct attribute *vsync_fs_attrs[] = {
|
||||||
|
&dev_attr_vsync_event.attr,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
static struct attribute_group vsync_fs_attr_group = {
|
||||||
|
.attrs = vsync_fs_attrs,
|
||||||
|
};
|
||||||
|
|
||||||
int mdp4_dtv_on(struct platform_device *pdev)
|
int mdp4_dtv_on(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct msm_fb_data_type *mfd;
|
struct msm_fb_data_type *mfd;
|
||||||
|
@ -602,6 +586,19 @@ int mdp4_dtv_on(struct platform_device *pdev)
|
||||||
|
|
||||||
atomic_set(&vctrl->suspend, 0);
|
atomic_set(&vctrl->suspend, 0);
|
||||||
|
|
||||||
|
if (!vctrl->sysfs_created) {
|
||||||
|
ret = sysfs_create_group(&vctrl->dev->kobj,
|
||||||
|
&vsync_fs_attr_group);
|
||||||
|
if (ret) {
|
||||||
|
pr_err("%s: sysfs group creation failed, ret=%d\n",
|
||||||
|
__func__, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
kobject_uevent(&vctrl->dev->kobj, KOBJ_ADD);
|
||||||
|
pr_debug("%s: kobject_uevent(KOBJ_ADD)\n", __func__);
|
||||||
|
vctrl->sysfs_created = 1;
|
||||||
|
}
|
||||||
pr_info("%s:\n", __func__);
|
pr_info("%s:\n", __func__);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -396,19 +396,9 @@ static ssize_t vsync_show_event(struct device *dev,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DEVICE_ATTR(vsync_event, S_IRUGO, vsync_show_event, NULL);
|
void mdp4_lcdc_vsync_init(int cndx)
|
||||||
static struct attribute *vsync_fs_attrs[] = {
|
|
||||||
&dev_attr_vsync_event.attr,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
static struct attribute_group vsync_fs_attr_group = {
|
|
||||||
.attrs = vsync_fs_attrs,
|
|
||||||
};
|
|
||||||
|
|
||||||
void mdp4_lcdc_vsync_init(int cndx, struct msm_fb_data_type *mfd)
|
|
||||||
{
|
{
|
||||||
struct vsycn_ctrl *vctrl;
|
struct vsycn_ctrl *vctrl;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (cndx >= MAX_CONTROLLER) {
|
if (cndx >= MAX_CONTROLLER) {
|
||||||
pr_err("%s: out or range: cndx=%d\n", __func__, cndx);
|
pr_err("%s: out or range: cndx=%d\n", __func__, cndx);
|
||||||
|
@ -421,30 +411,15 @@ void mdp4_lcdc_vsync_init(int cndx, struct msm_fb_data_type *mfd)
|
||||||
if (vctrl->inited)
|
if (vctrl->inited)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
vctrl->mfd = mfd;
|
|
||||||
vctrl->dev = mfd->fbi->dev;
|
|
||||||
vctrl->inited = 1;
|
vctrl->inited = 1;
|
||||||
vctrl->update_ndx = 0;
|
vctrl->update_ndx = 0;
|
||||||
mutex_init(&vctrl->update_lock);
|
mutex_init(&vctrl->update_lock);
|
||||||
init_completion(&vctrl->vsync_comp);
|
init_completion(&vctrl->vsync_comp);
|
||||||
init_completion(&vctrl->dmap_comp);
|
init_completion(&vctrl->dmap_comp);
|
||||||
init_completion(&vctrl->ov_comp);
|
init_completion(&vctrl->ov_comp);
|
||||||
atomic_set(&vctrl->suspend, 1);
|
atomic_set(&vctrl->suspend, 0);
|
||||||
atomic_set(&vctrl->vsync_resume, 1);
|
atomic_set(&vctrl->vsync_resume, 1);
|
||||||
spin_lock_init(&vctrl->spin_lock);
|
spin_lock_init(&vctrl->spin_lock);
|
||||||
if (!vctrl->sysfs_created) {
|
|
||||||
ret = sysfs_create_group(&vctrl->dev->kobj,
|
|
||||||
&vsync_fs_attr_group);
|
|
||||||
if (ret) {
|
|
||||||
pr_err("%s: sysfs group creation failed, ret=%d\n",
|
|
||||||
__func__, ret);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kobject_uevent(&vctrl->dev->kobj, KOBJ_ADD);
|
|
||||||
pr_debug("%s: kobject_uevent(KOBJ_ADD)\n", __func__);
|
|
||||||
vctrl->sysfs_created = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mdp4_lcdc_base_swap(int cndx, struct mdp4_overlay_pipe *pipe)
|
void mdp4_lcdc_base_swap(int cndx, struct mdp4_overlay_pipe *pipe)
|
||||||
|
@ -460,6 +435,15 @@ void mdp4_lcdc_base_swap(int cndx, struct mdp4_overlay_pipe *pipe)
|
||||||
vctrl->base_pipe = pipe;
|
vctrl->base_pipe = pipe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DEVICE_ATTR(vsync_event, S_IRUGO, vsync_show_event, NULL);
|
||||||
|
static struct attribute *vsync_fs_attrs[] = {
|
||||||
|
&dev_attr_vsync_event.attr,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
static struct attribute_group vsync_fs_attr_group = {
|
||||||
|
.attrs = vsync_fs_attrs,
|
||||||
|
};
|
||||||
|
|
||||||
int mdp4_lcdc_on(struct platform_device *pdev)
|
int mdp4_lcdc_on(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
int lcdc_width;
|
int lcdc_width;
|
||||||
|
@ -674,6 +658,20 @@ int mdp4_lcdc_on(struct platform_device *pdev)
|
||||||
|
|
||||||
mdp_histogram_ctrl_all(TRUE);
|
mdp_histogram_ctrl_all(TRUE);
|
||||||
|
|
||||||
|
if (!vctrl->sysfs_created) {
|
||||||
|
ret = sysfs_create_group(&vctrl->dev->kobj,
|
||||||
|
&vsync_fs_attr_group);
|
||||||
|
if (ret) {
|
||||||
|
pr_err("%s: sysfs group creation failed, ret=%d\n",
|
||||||
|
__func__, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
kobject_uevent(&vctrl->dev->kobj, KOBJ_ADD);
|
||||||
|
pr_debug("%s: kobject_uevent(KOBJ_ADD)\n", __func__);
|
||||||
|
vctrl->sysfs_created = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,6 @@ struct msm_fb_data_type {
|
||||||
int (*start_histogram) (struct mdp_histogram_start_req *req);
|
int (*start_histogram) (struct mdp_histogram_start_req *req);
|
||||||
int (*stop_histogram) (struct fb_info *info, uint32_t block);
|
int (*stop_histogram) (struct fb_info *info, uint32_t block);
|
||||||
void (*vsync_ctrl) (int enable);
|
void (*vsync_ctrl) (int enable);
|
||||||
void (*vsync_init) (int cndx, struct msm_fb_data_type *mfd);
|
|
||||||
void *cursor_buf;
|
void *cursor_buf;
|
||||||
void *cursor_buf_phys;
|
void *cursor_buf_phys;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue