Files
build/patch/kernel/archive/sm8250-6.12/0002-drm-dsi-emit-panel-turn-on-off-signal-to-touchscreen.patch
2024-12-05 00:23:00 +01:00

57 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Mon, 17 Oct 2022 08:02:58 +0800
Subject: drm: dsi: emit panel turn on/off signal to touchscreen
---
drivers/gpu/drm/msm/dsi/dsi_manager.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -7,6 +7,7 @@
#include "msm_kms.h"
#include "dsi.h"
+#include "drm/drm_notifier.h"
#define DSI_CLOCK_MASTER DSI_0
#define DSI_CLOCK_SLAVE DSI_1
@@ -273,6 +274,7 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
struct mipi_dsi_host *host = msm_dsi->host;
bool is_bonded_dsi = IS_BONDED_DSI();
int ret;
+ enum drm_notifier_data notifier_data;
DBG("id=%d", id);
@@ -286,6 +288,9 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
return;
}
+ notifier_data = MI_DRM_BLANK_UNBLANK;
+ mi_drm_notifier_call_chain(MI_DRM_EVENT_BLANK, &notifier_data);
+
ret = msm_dsi_host_enable(host);
if (ret) {
pr_err("%s: enable host %d failed, %d\n", __func__, id, ret);
@@ -329,9 +334,13 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
struct mipi_dsi_host *host = msm_dsi->host;
bool is_bonded_dsi = IS_BONDED_DSI();
int ret;
+ enum drm_notifier_data notifier_data;
DBG("id=%d", id);
+ notifier_data = MI_DRM_BLANK_POWERDOWN;
+ mi_drm_notifier_call_chain(MI_DRM_EARLY_EVENT_BLANK, &notifier_data);
+
/*
* Do nothing with the host if it is slave-DSI in case of bonded DSI.
* It is safe to call dsi_mgr_phy_disable() here because a single PHY
--
Armbian