瀏覽代碼

disp: msm: dsi: adapt MIPI_DSI_* flags for multiple SIs

Commit bf0d220 ("disp: msm: dsi: add _NO_ to MIPI_DSI_* flags
disabling features") update names of DSI flags to follow upstream
convention. Purpose of the name change is to more clearly indicate
what is not supported when the flag is set.
This change puts macros around MIPI_DSI_* flags to adapt the name change
of flags for kernel version 5.10 and version 5.15..

Change-Id: I1c9a8da3819a6b641ca9b6d81191bc944913b49e
Signed-off-by: Bruce Hoo <[email protected]>
Bruce Hoo 3 年之前
父節點
當前提交
c9d1adc535
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      msm/dsi/dsi_display.c

+ 10 - 0
msm/dsi/dsi_display.c

@@ -7,6 +7,7 @@
 #include <linux/of.h>
 #include <linux/of_gpio.h>
 #include <linux/err.h>
+#include <linux/version.h>
 
 #include "msm_drv.h"
 #include "sde_connector.h"
@@ -6362,12 +6363,21 @@ static int dsi_host_ext_attach(struct mipi_dsi_host *host,
 			panel->video_config.traffic_mode =
 					DSI_VIDEO_TRAFFIC_SYNC_START_EVENTS;
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
 		panel->video_config.hsa_lp11_en =
 			dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA;
 		panel->video_config.hbp_lp11_en =
 			dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HBP;
 		panel->video_config.hfp_lp11_en =
 			dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HFP;
+#else
+		panel->video_config.hsa_lp11_en =
+			dsi->mode_flags & MIPI_DSI_MODE_VIDEO_HSA;
+		panel->video_config.hbp_lp11_en =
+			dsi->mode_flags & MIPI_DSI_MODE_VIDEO_HBP;
+		panel->video_config.hfp_lp11_en =
+			dsi->mode_flags & MIPI_DSI_MODE_VIDEO_HFP;
+#endif
 		panel->video_config.pulse_mode_hsa_he =
 			dsi->mode_flags & MIPI_DSI_MODE_VIDEO_HSE;
 	} else {