diff --git a/arch/arm64/boot/dts/vendor/qcom/kona.dtsi b/arch/arm64/boot/dts/vendor/qcom/kona.dtsi index 776739ce3f3d..8af818ad94c9 100755 --- a/arch/arm64/boot/dts/vendor/qcom/kona.dtsi +++ b/arch/arm64/boot/dts/vendor/qcom/kona.dtsi @@ -373,105 +373,105 @@ #size-cells = <2>; ranges; - hyp_mem: hyp_region@80000000 { + hyp_mem: hyp_region { no-map; reg = <0x0 0x80000000 0x0 0x600000>; }; - xbl_aop_mem: xbl_aop_region@80700000 { + xbl_aop_mem: xbl_aop_region { no-map; reg = <0x0 0x80700000 0x0 0x160000>; }; - cmd_db: reserved-memory@80860000 { + cmd_db: reserved-memory { reg = <0x0 0x80860000 0x0 0x20000>; compatible = "qcom,cmd-db"; no-map; }; - smem_mem: smem_region@80900000 { + smem_mem: smem_region { no-map; reg = <0x0 0x80900000 0x0 0x200000>; }; - removed_mem: removed_region@80b00000 { + removed_mem: removed_region { no-map; reg = <0x0 0x80b00000 0x0 0x5300000>; }; - pil_camera_mem: pil_camera_region@86200000 { + pil_camera_mem: pil_camera_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x86200000 0x0 0x500000>; }; - pil_wlan_fw_mem: pil_wlan_fw_region@86700000 { + pil_wlan_fw_mem: pil_wlan_fw_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x86700000 0x0 0x100000>; }; - pil_ipa_fw_mem: pil_ipa_fw_region@86800000 { + pil_ipa_fw_mem: pil_ipa_fw_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x86800000 0x0 0x10000>; }; - pil_ipa_gsi_mem: pil_ipa_gsi_region@86810000 { + pil_ipa_gsi_mem: pil_ipa_gsi_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x86810000 0x0 0xa000>; }; - pil_gpu_mem: pil_gpu_region@8681a000 { + pil_gpu_mem: pil_gpu_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x8681a000 0x0 0x2000>; }; - pil_npu_mem: pil_npu_region@86900000 { + pil_npu_mem: pil_npu_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x86900000 0x0 0x500000>; }; - pil_video_mem: pil_video_region@86e00000 { + pil_video_mem: pil_video_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x86e00000 0x0 0x500000>; }; - pil_cvp_mem: pil_cvp_region@87300000 { + pil_cvp_mem: pil_cvp_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x87300000 0x0 0x500000>; }; - pil_cdsp_mem: pil_cdsp_region@87800000 { + pil_cdsp_mem: pil_cdsp_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x87800000 0x0 0x1400000>; }; - pil_slpi_mem: pil_slpi_region@88c00000 { + pil_slpi_mem: pil_slpi_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x88c00000 0x0 0x2f00000>; }; - pil_adsp_mem: pil_adsp_region@8bb00000 { + pil_adsp_mem: pil_adsp_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x8bb00000 0x0 0x2500000>; }; - pil_spss_mem: pil_spss_region@8e000000 { + pil_spss_mem: pil_spss_region { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x8e000000 0x0 0x100000>; }; - cdsp_secure_heap: cdsp_secure_heap@8e100000 { + cdsp_secure_heap: cdsp_secure_heap { compatible = "removed-dma-pool"; no-map; reg = <0x0 0x8e100000 0x0 0x4600000>; diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index a2495e9a6669..1638bfe9627c 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -270,15 +270,9 @@ void drm_bridge_post_disable(struct drm_bridge *bridge) if (!bridge) return; - if (bridge->is_dsi_drm_bridge) - mutex_lock(&bridge->lock); - if (bridge->funcs->post_disable) bridge->funcs->post_disable(bridge); - if (bridge->is_dsi_drm_bridge) - mutex_unlock(&bridge->lock); - drm_bridge_post_disable(bridge->next); } EXPORT_SYMBOL(drm_bridge_post_disable); @@ -327,14 +321,8 @@ void drm_bridge_pre_enable(struct drm_bridge *bridge) drm_bridge_pre_enable(bridge->next); - if (bridge->is_dsi_drm_bridge) - mutex_lock(&bridge->lock); - if (bridge->funcs->pre_enable) bridge->funcs->pre_enable(bridge); - - if (bridge->is_dsi_drm_bridge) - mutex_unlock(&bridge->lock); } EXPORT_SYMBOL(drm_bridge_pre_enable); diff --git a/drivers/input/fingerprint/fpc_tee/fpc1020_tee.c b/drivers/input/fingerprint/fpc_tee/fpc1020_tee.c index 273c8a2f8064..9c4a585fd5f7 100644 --- a/drivers/input/fingerprint/fpc_tee/fpc1020_tee.c +++ b/drivers/input/fingerprint/fpc_tee/fpc1020_tee.c @@ -42,7 +42,6 @@ #include #include #include -#include #define FPC_GPIO_NO_DEFAULT -1 #define FPC_GPIO_NO_DEFINED -2 @@ -743,19 +742,6 @@ static ssize_t irq_ack(struct device *dev, static DEVICE_ATTR(irq, S_IRUSR | S_IWUSR, irq_get, irq_ack); -static ssize_t fingerdown_wait_set(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - struct fpc1020_data *fpc1020 = dev_get_drvdata(dev); - - dev_dbg(fpc1020->dev, "%s\n", __func__); - - return count; -} - -static DEVICE_ATTR(fingerdown_wait, S_IWUSR, NULL, fingerdown_wait_set); - static ssize_t vendor_update(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) @@ -806,7 +792,6 @@ static struct attribute *attributes[] = { &dev_attr_power_cfg.attr, &dev_attr_irq.attr, &dev_attr_vendor.attr, - &dev_attr_fingerdown_wait.attr, NULL }; diff --git a/drivers/input/fingerprint/goodix/gf_spi.c b/drivers/input/fingerprint/goodix/gf_spi.c index ccb97ae6de54..5e94425d47c7 100644 --- a/drivers/input/fingerprint/goodix/gf_spi.c +++ b/drivers/input/fingerprint/goodix/gf_spi.c @@ -40,15 +40,10 @@ #include #include #include -#include #include #include #include #include -#include -#ifndef GOODIX_DRM_INTERFACE_WA -#include -#endif #include "gf_spi.h" @@ -535,14 +530,6 @@ static long gf_compat_ioctl(struct file *filp, unsigned int cmd, } #endif /*CONFIG_COMPAT*/ -#ifndef GOODIX_DRM_INTERFACE_WA -static void notification_work(struct work_struct *work) -{ - pr_debug("%s unblank\n", __func__); - dsi_bridge_interface_enable(FP_UNLOCK_REJECTION_TIMEOUT); -} -#endif - static irqreturn_t gf_irq(int irq, void *handle) { struct gf_dev *gf_dev = &gf; @@ -554,17 +541,6 @@ static irqreturn_t gf_irq(int irq, void *handle) __pm_wakeup_event(fp_wakelock, WAKELOCK_HOLD_TIME); sendnlmsg(temp); - if ((gf_dev->wait_finger_down == true) && (gf_dev->device_available == 1) && - (gf_dev->fb_black == 1)) { - key_input = KEY_RIGHT; - input_report_key(gf_dev->input, key_input, 1); - input_sync(gf_dev->input); - input_report_key(gf_dev->input, key_input, 0); - input_sync(gf_dev->input); - gf_dev->wait_finger_down = false; - schedule_work(&gf_dev->work); - } - #elif defined (GF_FASYNC) struct gf_dev *gf_dev = &gf; @@ -749,76 +725,6 @@ static const struct file_operations gf_fops = { #endif }; - -#ifndef GOODIX_DRM_INTERFACE_WA -static int goodix_fb_state_chg_callback(struct notifier_block *nb, - unsigned long val, void *data) -{ - struct gf_dev *gf_dev; - struct fb_event *evdata = data; - unsigned int blank; - char temp[4] = { 0x0 }; - - if (val != MI_DRM_EVENT_BLANK) { - return 0; - } - - pr_debug("[info] %s go to the goodix_fb_state_chg_callback value = %d\n", - __func__, (int)val); - gf_dev = container_of(nb, struct gf_dev, notifier); - - if (evdata && evdata->data && val == MI_DRM_EVENT_BLANK && gf_dev) { - blank = *(int *)(evdata->data); - - switch (blank) { - case MI_DRM_BLANK_POWERDOWN: - if (gf_dev->device_available == 1) { - gf_dev->fb_black = 1; - gf_dev->wait_finger_down = true; -#if defined(GF_NETLINK_ENABLE) - temp[0] = GF_NET_EVENT_FB_BLACK; - sendnlmsg(temp); -#elif defined (GF_FASYNC) - - if (gf_dev->async) { - kill_fasync(&gf_dev->async, SIGIO, POLL_IN); - } - -#endif - } - break; - - case MI_DRM_BLANK_UNBLANK: - if (gf_dev->device_available == 1) { - gf_dev->fb_black = 0; -#if defined(GF_NETLINK_ENABLE) - temp[0] = GF_NET_EVENT_FB_UNBLACK; - sendnlmsg(temp); -#elif defined (GF_FASYNC) - - if (gf_dev->async) { - kill_fasync(&gf_dev->async, SIGIO, POLL_IN); - } - -#endif - } - - break; - - default: - pr_debug("%s defalut\n", __func__); - break; - } - } - - return NOTIFY_OK; -} - -static struct notifier_block goodix_noti_block = { - .notifier_call = goodix_fb_state_chg_callback, -}; -#endif - static struct class *gf_class; #if defined(USE_SPI_BUS) static int gf_probe(struct spi_device *spi) @@ -841,11 +747,6 @@ static int gf_probe(struct platform_device *pdev) gf_dev->reset_gpio = -EINVAL; gf_dev->pwr_gpio = -EINVAL; gf_dev->device_available = 0; - gf_dev->fb_black = 0; - gf_dev->wait_finger_down = false; -#ifndef GOODIX_DRM_INTERFACE_WA - INIT_WORK(&gf_dev->work, notification_work); -#endif if (gf_parse_dts(gf_dev)) { goto error_hw; @@ -915,10 +816,6 @@ static int gf_probe(struct platform_device *pdev) } spi_clock_set(gf_dev, 1000000); -#endif -#ifndef GOODIX_DRM_INTERFACE_WA - gf_dev->notifier = goodix_noti_block; - mi_drm_register_client(&gf_dev->notifier); #endif gf_dev->irq = gf_irq_num(gf_dev); fp_wakelock = wakeup_source_register(&gf_dev->spi->dev, "fp_wakelock"); @@ -982,9 +879,6 @@ static int gf_remove(struct platform_device *pdev) gf_cleanup(gf_dev); } -#ifndef GOODIX_DRM_INTERFACE_WA - mi_drm_unregister_client(&gf_dev->notifier); -#endif mutex_unlock(&device_list_lock); return 0; } diff --git a/drivers/input/fingerprint/goodix_fod/gf_spi.c b/drivers/input/fingerprint/goodix_fod/gf_spi.c index dbbb7e85172a..6969fdf36b0d 100644 --- a/drivers/input/fingerprint/goodix_fod/gf_spi.c +++ b/drivers/input/fingerprint/goodix_fod/gf_spi.c @@ -13,11 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ -#define DEBUG #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -#define GOODIX_DRM_INTERFACE_WA - #include #include #include @@ -40,15 +37,10 @@ #include #include #include -#include #include #include #include #include -#include -#ifndef GOODIX_DRM_INTERFACE_WA -#include -#endif #include "gf_spi.h" @@ -546,17 +538,8 @@ static long gf_compat_ioctl(struct file *filp, unsigned int cmd, } #endif /*CONFIG_COMPAT */ -#ifndef GOODIX_DRM_INTERFACE_WA -static void notification_work(struct work_struct *work) -{ - pr_debug("%s unblank\n", __func__); - dsi_bridge_interface_enable(FP_UNLOCK_REJECTION_TIMEOUT); -} -#endif - static irqreturn_t gf_irq(int irq, void *handle) { - struct gf_dev *gf_dev = &gf; #if defined(GF_NETLINK_ENABLE) char temp[4] = { 0x0 }; uint32_t key_input = 0; @@ -565,16 +548,6 @@ static irqreturn_t gf_irq(int irq, void *handle) __pm_wakeup_event(fp_wakelock, WAKELOCK_HOLD_TIME); sendnlmsg(temp); - if ((gf_dev->wait_finger_down == true) - && (gf_dev->device_available == 1) && (gf_dev->fb_black == 1)) { - key_input = KEY_RIGHT; - input_report_key(gf_dev->input, key_input, 1); - input_sync(gf_dev->input); - input_report_key(gf_dev->input, key_input, 0); - input_sync(gf_dev->input); - gf_dev->wait_finger_down = false; - schedule_work(&gf_dev->work); - } #elif defined (GF_FASYNC) struct gf_dev *gf_dev = &gf; @@ -765,76 +738,6 @@ static const struct file_operations gf_fops = { #endif }; -#ifndef GOODIX_DRM_INTERFACE_WA -static int goodix_fb_state_chg_callback(struct notifier_block *nb, - unsigned long val, void *data) -{ - struct gf_dev *gf_dev; - struct fb_event *evdata = data; - unsigned int blank; - char temp[4] = { 0x0 }; - - if (val != DRM_EVENT_BLANK) { - return 0; - } - - pr_debug - ("[info] %s go to the goodix_fb_state_chg_callback value = %d\n", - __func__, (int)val); - gf_dev = container_of(nb, struct gf_dev, notifier); - - if (evdata && evdata->data && val == DRM_EVENT_BLANK && gf_dev) { - blank = *(int *)(evdata->data); - - switch (blank) { - case DRM_BLANK_POWERDOWN: - if (gf_dev->device_available == 1) { - gf_dev->fb_black = 1; - gf_dev->wait_finger_down = true; -#if defined(GF_NETLINK_ENABLE) - temp[0] = GF_NET_EVENT_FB_BLACK; - sendnlmsg(temp); -#elif defined (GF_FASYNC) - - if (gf_dev->async) { - kill_fasync(&gf_dev->async, SIGIO, - POLL_IN); - } -#endif - } - break; - - case DRM_BLANK_UNBLANK: - if (gf_dev->device_available == 1) { - gf_dev->fb_black = 0; -#if defined(GF_NETLINK_ENABLE) - temp[0] = GF_NET_EVENT_FB_UNBLACK; - sendnlmsg(temp); -#elif defined (GF_FASYNC) - - if (gf_dev->async) { - kill_fasync(&gf_dev->async, SIGIO, - POLL_IN); - } -#endif - } - - break; - - default: - pr_debug("%s defalut\n", __func__); - break; - } - } - - return NOTIFY_OK; -} - -static struct notifier_block goodix_noti_block = { - .notifier_call = goodix_fb_state_chg_callback, -}; -#endif - static struct class *gf_class; #if defined(USE_SPI_BUS) static int gf_probe(struct spi_device *spi) @@ -857,11 +760,6 @@ static int gf_probe(struct platform_device *pdev) gf_dev->reset_gpio = -EINVAL; gf_dev->pwr_gpio = -EINVAL; gf_dev->device_available = 0; - gf_dev->fb_black = 0; - gf_dev->wait_finger_down = false; -#ifndef GOODIX_DRM_INTERFACE_WA - INIT_WORK(&gf_dev->work, notification_work); -#endif if (gf_parse_dts(gf_dev)) { goto error_hw; @@ -932,10 +830,6 @@ static int gf_probe(struct platform_device *pdev) } spi_clock_set(gf_dev, 1000000); -#endif -#ifndef GOODIX_DRM_INTERFACE_WA - gf_dev->notifier = goodix_noti_block; - drm_register_client(&gf_dev->notifier); #endif gf_dev->irq = gf_irq_num(gf_dev); fp_wakelock = wakeup_source_register(&gf_dev->spi->dev, "fp_wakelock"); @@ -998,9 +892,6 @@ static int gf_remove(struct platform_device *pdev) if (gf_dev->users == 0) { gf_cleanup(gf_dev); } -#ifndef GOODIX_DRM_INTERFACE_WA - drm_unregister_client(&gf_dev->notifier); -#endif mutex_unlock(&device_list_lock); return 0; } diff --git a/kernel/sched/core.c b/kernel/sched/core.c index c51e919bc001..157f2fc62e39 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -760,7 +760,7 @@ static struct uclamp_se uclamp_default[UCLAMP_CNT]; static inline unsigned int uclamp_bucket_id(unsigned int clamp_value) { - return clamp_value / UCLAMP_BUCKET_DELTA; + return min_t(unsigned int, clamp_value / UCLAMP_BUCKET_DELTA, UCLAMP_BUCKETS - 1); } static inline unsigned int uclamp_bucket_base_value(unsigned int clamp_value) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d03b09ff2eac..437dcc7de88a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5521,6 +5521,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags) { struct cfs_rq *cfs_rq; struct sched_entity *se = &p->se; + int task_new = !(flags & ENQUEUE_WAKEUP); bool prefer_idle = sched_feat(EAS_PREFER_IDLE) ? (schedtune_prefer_idle(p) > 0) : 0; int idle_h_nr_running = idle_policy(p->policy); @@ -5618,8 +5619,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags) * overutilized. Hopefully the cpu util will be back to * normal before next overutilized check. */ - if ((flags & ENQUEUE_WAKEUP) && - !(prefer_idle && rq->nr_running == 1)) + if (!task_new && !(prefer_idle && rq->nr_running == 1)) update_overutilized_status(rq); } diff --git a/techpack/display/msm/dsi/dsi_display.c b/techpack/display/msm/dsi/dsi_display.c index 832abc811f82..d6a0029a2a14 100644 --- a/techpack/display/msm/dsi/dsi_display.c +++ b/techpack/display/msm/dsi/dsi_display.c @@ -5618,7 +5618,6 @@ int dsi_display_dev_probe(struct platform_device *pdev) display->panel_node = panel_node; display->pdev = pdev; display->boot_disp = boot_disp; - display->is_prim_display = true; dsi_display_parse_cmdline_topology(display, index); diff --git a/techpack/display/msm/dsi/dsi_display.h b/techpack/display/msm/dsi/dsi_display.h index 8f0f126f5aac..37a59aeb376c 100644 --- a/techpack/display/msm/dsi/dsi_display.h +++ b/techpack/display/msm/dsi/dsi_display.h @@ -199,7 +199,6 @@ struct dsi_display { const char *display_type; struct list_head list; bool is_cont_splash_enabled; - bool is_prim_display; bool sw_te_using_wd; struct mutex display_lock; int disp_te_gpio; diff --git a/techpack/display/msm/dsi/dsi_drm.c b/techpack/display/msm/dsi/dsi_drm.c index c1192b2faafe..9110a9d4f9fa 100644 --- a/techpack/display/msm/dsi/dsi_drm.c +++ b/techpack/display/msm/dsi/dsi_drm.c @@ -12,8 +12,6 @@ #include "sde_connector.h" #include "dsi_drm.h" #include "sde_trace.h" -#include -#include #include "msm_drv.h" #include "sde_dbg.h" #include "dsi_defs.h" @@ -33,13 +31,6 @@ static struct dsi_display_mode_priv_info default_priv_info = { .dsc_enabled = false, }; -#define WAIT_RESUME_TIMEOUT 200 - -struct dsi_bridge *gbridge; -static struct delayed_work prim_panel_work; -static atomic_t prim_panel_is_on; -static struct wakeup_source *prim_panel_wakelock; - static void convert_to_dsi_mode(const struct drm_display_mode *drm_mode, struct dsi_display_mode *dsi_mode) { @@ -203,19 +194,6 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge) return; } - if (c_bridge->display->is_prim_display && atomic_read(&prim_panel_is_on) && !mi_cfg->fod_dimlayer_enabled) { - cancel_delayed_work_sync(&prim_panel_work); - __pm_relax(prim_panel_wakelock); - if (c_bridge->display->panel->panel_mode == DSI_OP_VIDEO_MODE) { - DSI_INFO("skip set display config for video panel in fpc\n"); - return; - } else if (c_bridge->display->panel->panel_mode == DSI_OP_CMD_MODE && - c_bridge->dsi_mode.dsi_mode_flags != DSI_MODE_FLAG_DMS) { - DSI_INFO("skip set display config because timming not switch for command panel\n"); - return; - } - } - if (mi_cfg->fod_dimlayer_enabled) { power_mode = sde_connector_get_lp(c_bridge->display->drm_conn); } else { @@ -259,55 +237,7 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge) if (rc) DSI_ERR("Continuous splash pipeline cleanup failed, rc=%d\n", rc); - - if (c_bridge->display->is_prim_display) - atomic_set(&prim_panel_is_on, true); - -} - -/** - * dsi_bridge_interface_enable - Panel light on interface for fingerprint - * In order to improve panel light on performance when unlock device by - * fingerprint, export this interface for fingerprint.Once finger touch - * happened, it could light on LCD panel in advance of android resume. - * - * @timeout: DSI bridge wait time for android resume and set panel on. - * If timeout, dsi bridge will disable panel to avoid fingerprint - * touch by mistake. - */ - -int dsi_bridge_interface_enable(int timeout) -{ - int ret = 0; - - ret = wait_event_timeout(resume_wait_q, - !atomic_read(&resume_pending), - msecs_to_jiffies(WAIT_RESUME_TIMEOUT)); - if (!ret) { - pr_info("Primary fb resume timeout\n"); - return -ETIMEDOUT; - } - - mutex_lock(&gbridge->base.lock); - - if (atomic_read(&prim_panel_is_on)) { - mutex_unlock(&gbridge->base.lock); - return 0; - } - - __pm_stay_awake(prim_panel_wakelock); - gbridge->dsi_mode.dsi_mode_flags = 0; - dsi_bridge_pre_enable(&gbridge->base); - - if (timeout > 0) - schedule_delayed_work(&prim_panel_work, msecs_to_jiffies(timeout)); - else - __pm_relax(prim_panel_wakelock); - - mutex_unlock(&gbridge->base.lock); - return ret; } -EXPORT_SYMBOL(dsi_bridge_interface_enable); static void dsi_bridge_enable(struct drm_bridge *bridge) { @@ -417,22 +347,6 @@ static void dsi_bridge_post_disable(struct drm_bridge *bridge) mi_drm_notifier_call_chain(MI_DRM_EVENT_BLANK, ¬ify_data); SDE_ATRACE_END("dsi_bridge_post_disable"); - - if (c_bridge->display->is_prim_display) - atomic_set(&prim_panel_is_on, false); - -} - -static void prim_panel_off_delayed_work(struct work_struct *work) -{ - mutex_lock(&gbridge->base.lock); - if (atomic_read(&prim_panel_is_on)) { - dsi_bridge_post_disable(&gbridge->base); - __pm_relax(prim_panel_wakelock); - mutex_unlock(&gbridge->base.lock); - return; - } - mutex_unlock(&gbridge->base.lock); } static void dsi_bridge_mode_set(struct drm_bridge *bridge, @@ -1180,19 +1094,6 @@ struct dsi_bridge *dsi_drm_bridge_init(struct dsi_display *display, encoder->bridge = &bridge->base; - encoder->bridge->is_dsi_drm_bridge = true; - mutex_init(&encoder->bridge->lock); - - if (display->is_prim_display) { - gbridge = bridge; - atomic_set(&resume_pending, 0); - prim_panel_wakelock = wakeup_source_create("prim_panel_wakelock"); - wakeup_source_add(prim_panel_wakelock); - atomic_set(&prim_panel_is_on, false); - init_waitqueue_head(&resume_wait_q); - INIT_DELAYED_WORK(&prim_panel_work, prim_panel_off_delayed_work); - } - return bridge; error_free_bridge: kfree(bridge); @@ -1205,12 +1106,5 @@ void dsi_drm_bridge_cleanup(struct dsi_bridge *bridge) if (bridge && bridge->base.encoder) bridge->base.encoder->bridge = NULL; - if (bridge == gbridge) { - atomic_set(&prim_panel_is_on, false); - cancel_delayed_work_sync(&prim_panel_work); - wakeup_source_remove(prim_panel_wakelock); - wakeup_source_destroy(prim_panel_wakelock); - } - kfree(bridge); } diff --git a/techpack/display/msm/dsi/dsi_drm.h b/techpack/display/msm/dsi/dsi_drm.h index 051dd6d97bf0..ec012c2cb529 100644 --- a/techpack/display/msm/dsi/dsi_drm.h +++ b/techpack/display/msm/dsi/dsi_drm.h @@ -23,7 +23,6 @@ struct dsi_bridge { struct dsi_display *display; struct dsi_display_mode dsi_mode; - struct mutex lock; }; /** diff --git a/techpack/display/msm/msm_drv.c b/techpack/display/msm/msm_drv.c index 2d2b2d3361ef..ce21012d2273 100644 --- a/techpack/display/msm/msm_drv.c +++ b/techpack/display/msm/msm_drv.c @@ -62,9 +62,6 @@ #define MSM_VERSION_MINOR 3 #define MSM_VERSION_PATCHLEVEL 0 -atomic_t resume_pending; -wait_queue_head_t resume_wait_q; - #define IDLE_ENCODER_MASK_DEFAULT 1 #define IDLE_TIMEOUT_MS_DEFAULT 100 @@ -1876,19 +1873,6 @@ static struct drm_driver msm_driver = { }; #ifdef CONFIG_PM_SLEEP -static int msm_pm_prepare(struct device *dev) -{ - atomic_inc(&resume_pending); - return 0; -} - -static void msm_pm_complete(struct device *dev) -{ - atomic_set(&resume_pending, 0); - wake_up_all(&resume_wait_q); - return; -} - static int msm_pm_suspend(struct device *dev) { struct drm_device *ddev; @@ -1974,8 +1958,6 @@ static int msm_runtime_resume(struct device *dev) #endif static const struct dev_pm_ops msm_pm_ops = { - .prepare = msm_pm_prepare, - .complete = msm_pm_complete, SET_SYSTEM_SLEEP_PM_OPS(msm_pm_suspend, msm_pm_resume) SET_RUNTIME_PM_OPS(msm_runtime_suspend, msm_runtime_resume, NULL) }; diff --git a/techpack/display/msm/msm_drv.h b/techpack/display/msm/msm_drv.h index 4ecb73cd1b0f..e92d69ab01ab 100644 --- a/techpack/display/msm/msm_drv.h +++ b/techpack/display/msm/msm_drv.h @@ -74,9 +74,6 @@ struct msm_gem_vma; #define TEARDOWN_DEADLOCK_RETRY_MAX 5 -extern atomic_t resume_pending; -extern wait_queue_head_t resume_wait_q; - struct msm_file_private { rwlock_t queuelock; struct list_head submitqueues; diff --git a/techpack/display/msm/sde/sde_encoder.c b/techpack/display/msm/sde/sde_encoder.c index a6cdbcb9016e..dc3138520728 100644 --- a/techpack/display/msm/sde/sde_encoder.c +++ b/techpack/display/msm/sde/sde_encoder.c @@ -4532,7 +4532,7 @@ static void sde_encoder_touch_notify_work_handler(struct kthread_work *work) if (c_bridge) dsi_display = c_bridge->display; - if (dsi_display && dsi_display->is_prim_display && dsi_display->panel + if (dsi_display && dsi_display->panel && dsi_display->panel->mi_cfg.smart_fps_restore) { if (dsi_display->panel->mi_cfg.smart_fps_support && fm_stat.enabled) { calc_fps(0, (int)true);