Loading drivers/video/fbdev/msm/mdss_dsi.c +4 −5 Original line number Diff line number Diff line /* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1704,7 +1704,7 @@ static int mdss_dsi_unblank(struct mdss_panel_data *pdata) mipi->vsync_enable && mipi->hw_vsync_mode) { mdss_dsi_set_tear_on(ctrl_pdata); if (mdss_dsi_is_te_based_esd(ctrl_pdata)) enable_irq(gpio_to_irq(ctrl_pdata->disp_te_gpio)); panel_update_te_irq(pdata, true); } ctrl_pdata->ctrl_state |= CTRL_STATE_PANEL_INIT; Loading Loading @@ -1775,8 +1775,7 @@ static int mdss_dsi_blank(struct mdss_panel_data *pdata, int power_state) if ((pdata->panel_info.type == MIPI_CMD_PANEL) && mipi->vsync_enable && mipi->hw_vsync_mode) { if (mdss_dsi_is_te_based_esd(ctrl_pdata)) { disable_irq(gpio_to_irq( ctrl_pdata->disp_te_gpio)); panel_update_te_irq(pdata, false); atomic_dec(&ctrl_pdata->te_irq_ready); } mdss_dsi_set_tear_off(ctrl_pdata); Loading drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c +4 −5 Original line number Diff line number Diff line /* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2018, 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -2099,7 +2099,7 @@ static int mdss_mdp_cmd_wait4pingpong(struct mdss_mdp_ctl *ctl, void *arg) struct mdss_mdp_cmd_ctx *ctx; struct mdss_panel_data *pdata; unsigned long flags; int rc = 0, te_irq; int rc = 0; ctx = (struct mdss_mdp_cmd_ctx *) ctl->intf_ctx[MASTER_CTX]; if (!ctx) { Loading Loading @@ -2155,8 +2155,7 @@ static int mdss_mdp_cmd_wait4pingpong(struct mdss_mdp_ctl *ctl, void *arg) atomic_read(&ctx->koff_cnt)); /* enable TE irq to check if it is coming from the panel */ te_irq = gpio_to_irq(pdata->panel_te_gpio); enable_irq(te_irq); panel_update_te_irq(pdata, true); /* wait for 20ms to ensure we are getting the next TE */ usleep_range(20000, 20010); Loading @@ -2179,7 +2178,7 @@ static int mdss_mdp_cmd_wait4pingpong(struct mdss_mdp_ctl *ctl, void *arg) } /* disable te irq */ disable_irq_nosync(te_irq); panel_update_te_irq(pdata, false); ctx->pp_timeout_report_cnt++; rc = -EPERM; Loading drivers/video/fbdev/msm/mdss_panel.h +21 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ #include <linux/stringify.h> #include <linux/types.h> #include <linux/debugfs.h> #include <linux/of_gpio.h> #include <linux/gpio.h> #include <linux/interrupt.h> /* panel id type */ struct panel_id { Loading Loading @@ -1010,6 +1013,7 @@ struct mdss_panel_data { bool panel_disable_mode; int panel_te_gpio; bool is_te_irq_enabled; struct completion te_done; }; Loading @@ -1021,6 +1025,23 @@ struct mdss_panel_debugfs_info { struct mdss_panel_debugfs_info *next; }; static inline void panel_update_te_irq(struct mdss_panel_data *pdata, bool enable) { if (!pdata) { pr_err("Invalid Params\n"); return; } if (enable && !pdata->is_te_irq_enabled) { enable_irq(gpio_to_irq(pdata->panel_te_gpio)); pdata->is_te_irq_enabled = true; } else if (!enable && pdata->is_te_irq_enabled) { disable_irq(gpio_to_irq(pdata->panel_te_gpio)); pdata->is_te_irq_enabled = false; } } /** * mdss_get_panel_framerate() - get panel frame rate based on panel information * @panel_info: Pointer to panel info containing all panel information Loading Loading
drivers/video/fbdev/msm/mdss_dsi.c +4 −5 Original line number Diff line number Diff line /* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1704,7 +1704,7 @@ static int mdss_dsi_unblank(struct mdss_panel_data *pdata) mipi->vsync_enable && mipi->hw_vsync_mode) { mdss_dsi_set_tear_on(ctrl_pdata); if (mdss_dsi_is_te_based_esd(ctrl_pdata)) enable_irq(gpio_to_irq(ctrl_pdata->disp_te_gpio)); panel_update_te_irq(pdata, true); } ctrl_pdata->ctrl_state |= CTRL_STATE_PANEL_INIT; Loading Loading @@ -1775,8 +1775,7 @@ static int mdss_dsi_blank(struct mdss_panel_data *pdata, int power_state) if ((pdata->panel_info.type == MIPI_CMD_PANEL) && mipi->vsync_enable && mipi->hw_vsync_mode) { if (mdss_dsi_is_te_based_esd(ctrl_pdata)) { disable_irq(gpio_to_irq( ctrl_pdata->disp_te_gpio)); panel_update_te_irq(pdata, false); atomic_dec(&ctrl_pdata->te_irq_ready); } mdss_dsi_set_tear_off(ctrl_pdata); Loading
drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c +4 −5 Original line number Diff line number Diff line /* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2018, 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -2099,7 +2099,7 @@ static int mdss_mdp_cmd_wait4pingpong(struct mdss_mdp_ctl *ctl, void *arg) struct mdss_mdp_cmd_ctx *ctx; struct mdss_panel_data *pdata; unsigned long flags; int rc = 0, te_irq; int rc = 0; ctx = (struct mdss_mdp_cmd_ctx *) ctl->intf_ctx[MASTER_CTX]; if (!ctx) { Loading Loading @@ -2155,8 +2155,7 @@ static int mdss_mdp_cmd_wait4pingpong(struct mdss_mdp_ctl *ctl, void *arg) atomic_read(&ctx->koff_cnt)); /* enable TE irq to check if it is coming from the panel */ te_irq = gpio_to_irq(pdata->panel_te_gpio); enable_irq(te_irq); panel_update_te_irq(pdata, true); /* wait for 20ms to ensure we are getting the next TE */ usleep_range(20000, 20010); Loading @@ -2179,7 +2178,7 @@ static int mdss_mdp_cmd_wait4pingpong(struct mdss_mdp_ctl *ctl, void *arg) } /* disable te irq */ disable_irq_nosync(te_irq); panel_update_te_irq(pdata, false); ctx->pp_timeout_report_cnt++; rc = -EPERM; Loading
drivers/video/fbdev/msm/mdss_panel.h +21 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ #include <linux/stringify.h> #include <linux/types.h> #include <linux/debugfs.h> #include <linux/of_gpio.h> #include <linux/gpio.h> #include <linux/interrupt.h> /* panel id type */ struct panel_id { Loading Loading @@ -1010,6 +1013,7 @@ struct mdss_panel_data { bool panel_disable_mode; int panel_te_gpio; bool is_te_irq_enabled; struct completion te_done; }; Loading @@ -1021,6 +1025,23 @@ struct mdss_panel_debugfs_info { struct mdss_panel_debugfs_info *next; }; static inline void panel_update_te_irq(struct mdss_panel_data *pdata, bool enable) { if (!pdata) { pr_err("Invalid Params\n"); return; } if (enable && !pdata->is_te_irq_enabled) { enable_irq(gpio_to_irq(pdata->panel_te_gpio)); pdata->is_te_irq_enabled = true; } else if (!enable && pdata->is_te_irq_enabled) { disable_irq(gpio_to_irq(pdata->panel_te_gpio)); pdata->is_te_irq_enabled = false; } } /** * mdss_get_panel_framerate() - get panel frame rate based on panel information * @panel_info: Pointer to panel info containing all panel information Loading