mfd: display-serdes: fix compile errors on kernel-6.1

Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: Id52ed6fe9779cef2fe08c781cbe46f68b621844f
This commit is contained in:
Luo Wei
2024-01-15 18:25:14 +08:00
committed by Tao Huang
parent 81fdd2b9d6
commit 5d0970aacb
4 changed files with 13 additions and 41 deletions

View File

@@ -38,7 +38,7 @@
#include <linux/gpio/consumer.h>
#include <linux/extcon-provider.h>
#include <linux/bitfield.h>
#include <linux/version.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_panel.h>
@@ -46,7 +46,11 @@
#include <drm/drm_of.h>
#include <drm/drm_connector.h>
#include <drm/drm_probe_helper.h>
#if (KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE)
#include <drm/display/drm_dp_helper.h>
#else
#include <drm/drm_dp_helper.h>
#endif
#include <drm/drm_device.h>
#include <drm/drm_modes.h>
#include <drm/drm_atomic_state_helper.h>

View File

@@ -43,24 +43,9 @@ static struct mipi_dsi_device *serdes_attach_dsi(struct serdes_bridge_split *ser
dsi->lanes = 4;
dsi->format = MIPI_DSI_FMT_RGB888;
if (serdes->chip_data->name) {
if ((!strcmp(serdes->chip_data->name, "bu18tl82")) ||
(!strcmp(serdes->chip_data->name, "bu18rl82"))) {
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET;
SERDES_DBG_MFD("%s: %s dsi_mode MIPI_DSI_MODE_VIDEO_BURST 0x%lx\n",
__func__, serdes->chip_data->name, dsi->mode_flags);
} else {
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
SERDES_DBG_MFD("%s: %s dsi_mode MIPI_DSI_MODE_VIDEO_SYNC_PULSE 0x%lx\n",
__func__, serdes->chip_data->name, dsi->mode_flags);
}
} else {
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
SERDES_DBG_MFD("%s: %s dsi_mode MIPI_DSI_MODE_VIDEO_SYNC_PULSE 0x%lx\n",
__func__, serdes->chip_data->name, dsi->mode_flags);
}
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
SERDES_DBG_MFD("%s: %s dsi_mode MIPI_DSI_MODE_VIDEO_SYNC_PULSE 0x%lx\n",
__func__, serdes->chip_data->name, dsi->mode_flags);
ret = mipi_dsi_attach(dsi);
if (ret < 0) {

View File

@@ -43,24 +43,9 @@ static struct mipi_dsi_device *serdes_attach_dsi(struct serdes_bridge *serdes_br
dsi->lanes = 4;
dsi->format = MIPI_DSI_FMT_RGB888;
if (serdes->chip_data->name) {
if ((!strcmp(serdes->chip_data->name, "bu18tl82")) ||
(!strcmp(serdes->chip_data->name, "bu18rl82"))) {
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET;
SERDES_DBG_MFD("%s: %s dsi_mode MIPI_DSI_MODE_VIDEO_BURST 0x%lx\n",
__func__, serdes->chip_data->name, dsi->mode_flags);
} else {
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
SERDES_DBG_MFD("%s: %s dsi_mode MIPI_DSI_MODE_VIDEO_SYNC_PULSE 0x%lx\n",
__func__, serdes->chip_data->name, dsi->mode_flags);
}
} else {
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
SERDES_DBG_MFD("%s: %s dsi_mode MIPI_DSI_MODE_VIDEO_SYNC_PULSE 0x%lx\n",
__func__, serdes->chip_data->name, dsi->mode_flags);
}
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
SERDES_DBG_MFD("%s: %s dsi_mode MIPI_DSI_MODE_VIDEO_SYNC_PULSE 0x%lx\n",
__func__, serdes->chip_data->name, dsi->mode_flags);
ret = mipi_dsi_attach(dsi);
if (ret < 0) {

View File

@@ -153,8 +153,7 @@ static int serdes_panel_parse_dt(struct serdes_panel *serdes_panel)
if (of_find_property(dev->of_node, "panel-size", &len)) {
len /= sizeof(unsigned int);
if (len != 2) {
dev_err(dev, "panel-size length is error, set 2 default\n",
dev->of_node);
dev_err(dev, "panel-size length is error, set 2 default\n");
len = 2;
}
ret = of_property_read_u32_array(dev->of_node, "panel-size",
@@ -168,8 +167,7 @@ static int serdes_panel_parse_dt(struct serdes_panel *serdes_panel)
if (of_find_property(dev->of_node, "rate-count-ssc", &len)) {
len /= sizeof(unsigned int);
if (len != 3) {
dev_err(dev, "rate-count-ssc length is error, set 3 default\n",
dev->of_node);
dev_err(dev, "rate-count-ssc length is error, set 3 default\n");
len = 3;
}
ret = of_property_read_u32_array(dev->of_node, "rate-count-ssc",