aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_tcon.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index 4834c90b4912..c78cd35a1294 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -974,7 +974,8 @@ static bool sun4i_tcon_connected_to_tcon_top(struct device_node *node)
974 974
975 remote = of_graph_get_remote_node(node, 0, -1); 975 remote = of_graph_get_remote_node(node, 0, -1);
976 if (remote) { 976 if (remote) {
977 ret = !!of_match_node(sun8i_tcon_top_of_table, remote); 977 ret = !!(IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) &&
978 of_match_node(sun8i_tcon_top_of_table, remote));
978 of_node_put(remote); 979 of_node_put(remote);
979 } 980 }
980 981
@@ -1402,13 +1403,20 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon,
1402 if (!pdev) 1403 if (!pdev)
1403 return -EINVAL; 1404 return -EINVAL;
1404 1405
1405 if (encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { 1406 if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) &&
1407 encoder->encoder_type == DRM_MODE_ENCODER_TMDS) {
1406 ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id); 1408 ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id);
1407 if (ret) 1409 if (ret)
1408 return ret; 1410 return ret;
1409 } 1411 }
1410 1412
1411 return sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); 1413 if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) {
1414 ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id);
1415 if (ret)
1416 return ret;
1417 }
1418
1419 return 0;
1412} 1420}
1413 1421
1414static const struct sun4i_tcon_quirks sun4i_a10_quirks = { 1422static const struct sun4i_tcon_quirks sun4i_a10_quirks = {