diff options
author | Archit Taneja <architt@codeaurora.org> | 2015-08-03 04:35:45 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2015-08-15 18:27:24 -0400 |
commit | a9ddac9c5765712fa7eace55feeaf7c4ac75e32b (patch) | |
tree | a7b2150d8c197185c98854572c02880aacd66c20 | |
parent | 60d05cb4eabcfcab00784677c2a55ed1b9bda2ec (diff) |
drm/msm/dsi: Refer to connected device as 'device' instead of 'panel'
We currently support only panels connected to dsi output. We're going to
also support external bridge chips now.
Change 'panel_node' to 'device_node' in the struct msm_dsi_host and
'panel_flags' to 'device_flags' in msm_dsi. This makes things sound a
bit more generic.
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_host.c | 24 | ||||
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_manager.c | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index 3d6ae79a6bb4..5c8fbc475831 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c | |||
@@ -18,7 +18,7 @@ struct drm_encoder *msm_dsi_get_encoder(struct msm_dsi *msm_dsi) | |||
18 | if (!msm_dsi || !msm_dsi->panel) | 18 | if (!msm_dsi || !msm_dsi->panel) |
19 | return NULL; | 19 | return NULL; |
20 | 20 | ||
21 | return (msm_dsi->panel_flags & MIPI_DSI_MODE_VIDEO) ? | 21 | return (msm_dsi->device_flags & MIPI_DSI_MODE_VIDEO) ? |
22 | msm_dsi->encoders[MSM_DSI_VIDEO_ENCODER_ID] : | 22 | msm_dsi->encoders[MSM_DSI_VIDEO_ENCODER_ID] : |
23 | msm_dsi->encoders[MSM_DSI_CMD_ENCODER_ID]; | 23 | msm_dsi->encoders[MSM_DSI_CMD_ENCODER_ID]; |
24 | } | 24 | } |
diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h index 912057df5c02..1a5990551c15 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.h +++ b/drivers/gpu/drm/msm/dsi/dsi.h | |||
@@ -60,7 +60,7 @@ struct msm_dsi { | |||
60 | struct mipi_dsi_host *host; | 60 | struct mipi_dsi_host *host; |
61 | struct msm_dsi_phy *phy; | 61 | struct msm_dsi_phy *phy; |
62 | struct drm_panel *panel; | 62 | struct drm_panel *panel; |
63 | unsigned long panel_flags; | 63 | unsigned long device_flags; |
64 | 64 | ||
65 | struct device *phy_dev; | 65 | struct device *phy_dev; |
66 | bool phy_enabled; | 66 | bool phy_enabled; |
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 9b784321c2e0..0fa55354ad2c 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c | |||
@@ -232,8 +232,8 @@ struct msm_dsi_host { | |||
232 | 232 | ||
233 | struct drm_display_mode *mode; | 233 | struct drm_display_mode *mode; |
234 | 234 | ||
235 | /* Panel info */ | 235 | /* connected device info */ |
236 | struct device_node *panel_node; | 236 | struct device_node *device_node; |
237 | unsigned int channel; | 237 | unsigned int channel; |
238 | unsigned int lanes; | 238 | unsigned int lanes; |
239 | enum mipi_dsi_pixel_format format; | 239 | enum mipi_dsi_pixel_format format; |
@@ -1404,7 +1404,7 @@ static int dsi_host_attach(struct mipi_dsi_host *host, | |||
1404 | msm_host->format = dsi->format; | 1404 | msm_host->format = dsi->format; |
1405 | msm_host->mode_flags = dsi->mode_flags; | 1405 | msm_host->mode_flags = dsi->mode_flags; |
1406 | 1406 | ||
1407 | WARN_ON(dsi->dev.of_node != msm_host->panel_node); | 1407 | WARN_ON(dsi->dev.of_node != msm_host->device_node); |
1408 | 1408 | ||
1409 | /* Some gpios defined in panel DT need to be controlled by host */ | 1409 | /* Some gpios defined in panel DT need to be controlled by host */ |
1410 | ret = dsi_host_init_panel_gpios(msm_host, &dsi->dev); | 1410 | ret = dsi_host_init_panel_gpios(msm_host, &dsi->dev); |
@@ -1423,7 +1423,7 @@ static int dsi_host_detach(struct mipi_dsi_host *host, | |||
1423 | { | 1423 | { |
1424 | struct msm_dsi_host *msm_host = to_msm_dsi_host(host); | 1424 | struct msm_dsi_host *msm_host = to_msm_dsi_host(host); |
1425 | 1425 | ||
1426 | msm_host->panel_node = NULL; | 1426 | msm_host->device_node = NULL; |
1427 | 1427 | ||
1428 | DBG("id=%d", msm_host->id); | 1428 | DBG("id=%d", msm_host->id); |
1429 | if (msm_host->dev) | 1429 | if (msm_host->dev) |
@@ -1458,7 +1458,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host) | |||
1458 | { | 1458 | { |
1459 | struct device *dev = &msm_host->pdev->dev; | 1459 | struct device *dev = &msm_host->pdev->dev; |
1460 | struct device_node *np = dev->of_node; | 1460 | struct device_node *np = dev->of_node; |
1461 | struct device_node *endpoint, *panel_node; | 1461 | struct device_node *endpoint, *device_node; |
1462 | int ret; | 1462 | int ret; |
1463 | 1463 | ||
1464 | ret = of_property_read_u32(np, "qcom,dsi-host-index", &msm_host->id); | 1464 | ret = of_property_read_u32(np, "qcom,dsi-host-index", &msm_host->id); |
@@ -1481,17 +1481,17 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host) | |||
1481 | } | 1481 | } |
1482 | 1482 | ||
1483 | /* Get panel node from the output port's endpoint data */ | 1483 | /* Get panel node from the output port's endpoint data */ |
1484 | panel_node = of_graph_get_remote_port_parent(endpoint); | 1484 | device_node = of_graph_get_remote_port_parent(endpoint); |
1485 | if (!panel_node) { | 1485 | if (!device_node) { |
1486 | dev_err(dev, "%s: no valid device\n", __func__); | 1486 | dev_err(dev, "%s: no valid device\n", __func__); |
1487 | of_node_put(endpoint); | 1487 | of_node_put(endpoint); |
1488 | return -ENODEV; | 1488 | return -ENODEV; |
1489 | } | 1489 | } |
1490 | 1490 | ||
1491 | of_node_put(endpoint); | 1491 | of_node_put(endpoint); |
1492 | of_node_put(panel_node); | 1492 | of_node_put(device_node); |
1493 | 1493 | ||
1494 | msm_host->panel_node = panel_node; | 1494 | msm_host->device_node = device_node; |
1495 | 1495 | ||
1496 | return 0; | 1496 | return 0; |
1497 | } | 1497 | } |
@@ -1644,8 +1644,8 @@ int msm_dsi_host_register(struct mipi_dsi_host *host, bool check_defer) | |||
1644 | * Don't try to defer if there is nothing connected to the dsi | 1644 | * Don't try to defer if there is nothing connected to the dsi |
1645 | * output | 1645 | * output |
1646 | */ | 1646 | */ |
1647 | if (check_defer && msm_host->panel_node) { | 1647 | if (check_defer && msm_host->device_node) { |
1648 | if (!of_drm_find_panel(msm_host->panel_node)) | 1648 | if (!of_drm_find_panel(msm_host->device_node)) |
1649 | return -EPROBE_DEFER; | 1649 | return -EPROBE_DEFER; |
1650 | } | 1650 | } |
1651 | } | 1651 | } |
@@ -2066,7 +2066,7 @@ struct drm_panel *msm_dsi_host_get_panel(struct mipi_dsi_host *host, | |||
2066 | struct msm_dsi_host *msm_host = to_msm_dsi_host(host); | 2066 | struct msm_dsi_host *msm_host = to_msm_dsi_host(host); |
2067 | struct drm_panel *panel; | 2067 | struct drm_panel *panel; |
2068 | 2068 | ||
2069 | panel = of_drm_find_panel(msm_host->panel_node); | 2069 | panel = of_drm_find_panel(msm_host->device_node); |
2070 | if (panel_flags) | 2070 | if (panel_flags) |
2071 | *panel_flags = msm_host->mode_flags; | 2071 | *panel_flags = msm_host->mode_flags; |
2072 | 2072 | ||
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index ca4ff4ab663e..f43c66ca81fb 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c | |||
@@ -156,7 +156,7 @@ static enum drm_connector_status dsi_mgr_connector_detect( | |||
156 | DBG("id=%d", id); | 156 | DBG("id=%d", id); |
157 | if (!msm_dsi->panel) { | 157 | if (!msm_dsi->panel) { |
158 | msm_dsi->panel = msm_dsi_host_get_panel(msm_dsi->host, | 158 | msm_dsi->panel = msm_dsi_host_get_panel(msm_dsi->host, |
159 | &msm_dsi->panel_flags); | 159 | &msm_dsi->device_flags); |
160 | 160 | ||
161 | /* There is only 1 panel in the global panel list | 161 | /* There is only 1 panel in the global panel list |
162 | * for dual DSI mode. Therefore slave dsi should get | 162 | * for dual DSI mode. Therefore slave dsi should get |
@@ -177,7 +177,7 @@ static enum drm_connector_status dsi_mgr_connector_detect( | |||
177 | */ | 177 | */ |
178 | if (msm_dsi->panel && IS_DUAL_DSI() && | 178 | if (msm_dsi->panel && IS_DUAL_DSI() && |
179 | other_dsi && other_dsi->panel) { | 179 | other_dsi && other_dsi->panel) { |
180 | bool cmd_mode = !(msm_dsi->panel_flags & | 180 | bool cmd_mode = !(msm_dsi->device_flags & |
181 | MIPI_DSI_MODE_VIDEO); | 181 | MIPI_DSI_MODE_VIDEO); |
182 | struct drm_encoder *encoder = msm_dsi_get_encoder( | 182 | struct drm_encoder *encoder = msm_dsi_get_encoder( |
183 | dsi_mgr_get_dsi(DSI_ENCODER_MASTER)); | 183 | dsi_mgr_get_dsi(DSI_ENCODER_MASTER)); |