Skip to content

Commit 2080658

Browse files
committed
Merge tag 'exynos-drm-fixes-for-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
Summary: - fix probing fail issue of dsi driver without bridge device. - fix disable sequence of hdmi driver. - trivial cleanups. * tag 'exynos-drm-fixes-for-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm: exynos: mark pm functions as __maybe_unused drm/exynos: select CEC_CORE if CEC_NOTIFIER drm/exynos/hdmi: fix disable sequence drm/exynos: mic: add a bridge at probe drm/exynos/dsi: Remove error handling for bridge_node DT parsing drm/exynos: dsi: do not try to find bridge drm: exynos: hdmi: make of_device_ids const. drm: exynos: constify mixer_match_types and *_mxr_drv_data. exynos_drm: Clean up duplicated assignment in exynos_drm_driver
2 parents d5bcd11 + 7e17510 commit 2080658

File tree

6 files changed

+29
-27
lines changed

6 files changed

+29
-27
lines changed

drivers/gpu/drm/exynos/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ config DRM_EXYNOS_DP
7575
config DRM_EXYNOS_HDMI
7676
bool "HDMI"
7777
depends on DRM_EXYNOS_MIXER || DRM_EXYNOS5433_DECON
78+
select CEC_CORE if CEC_NOTIFIER
7879
help
7980
Choose this option if you want to use Exynos HDMI for DRM.
8081

drivers/gpu/drm/exynos/exynos_drm_drv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ static int exynos_drm_platform_probe(struct platform_device *pdev)
453453
struct component_match *match;
454454

455455
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
456-
exynos_drm_driver.num_ioctls = ARRAY_SIZE(exynos_ioctls);
457456

458457
match = exynos_drm_match_add(&pdev->dev);
459458
if (IS_ERR(match))

drivers/gpu/drm/exynos/exynos_drm_dsi.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,8 +1651,6 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
16511651
return ret;
16521652

16531653
dsi->bridge_node = of_graph_get_remote_node(node, DSI_PORT_IN, 0);
1654-
if (!dsi->bridge_node)
1655-
return -EINVAL;
16561654

16571655
return 0;
16581656
}
@@ -1687,9 +1685,11 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
16871685
return ret;
16881686
}
16891687

1690-
bridge = of_drm_find_bridge(dsi->bridge_node);
1691-
if (bridge)
1692-
drm_bridge_attach(encoder, bridge, NULL);
1688+
if (dsi->bridge_node) {
1689+
bridge = of_drm_find_bridge(dsi->bridge_node);
1690+
if (bridge)
1691+
drm_bridge_attach(encoder, bridge, NULL);
1692+
}
16931693

16941694
return mipi_dsi_host_register(&dsi->dsi_host);
16951695
}

drivers/gpu/drm/exynos/exynos_drm_mic.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -340,16 +340,10 @@ static int exynos_mic_bind(struct device *dev, struct device *master,
340340
void *data)
341341
{
342342
struct exynos_mic *mic = dev_get_drvdata(dev);
343-
int ret;
344343

345-
mic->bridge.funcs = &mic_bridge_funcs;
346-
mic->bridge.of_node = dev->of_node;
347344
mic->bridge.driver_private = mic;
348-
ret = drm_bridge_add(&mic->bridge);
349-
if (ret)
350-
DRM_ERROR("mic: Failed to add MIC to the global bridge list\n");
351345

352-
return ret;
346+
return 0;
353347
}
354348

355349
static void exynos_mic_unbind(struct device *dev, struct device *master,
@@ -365,8 +359,6 @@ static void exynos_mic_unbind(struct device *dev, struct device *master,
365359

366360
already_disabled:
367361
mutex_unlock(&mic_mutex);
368-
369-
drm_bridge_remove(&mic->bridge);
370362
}
371363

372364
static const struct component_ops exynos_mic_component_ops = {
@@ -461,6 +453,15 @@ static int exynos_mic_probe(struct platform_device *pdev)
461453

462454
platform_set_drvdata(pdev, mic);
463455

456+
mic->bridge.funcs = &mic_bridge_funcs;
457+
mic->bridge.of_node = dev->of_node;
458+
459+
ret = drm_bridge_add(&mic->bridge);
460+
if (ret) {
461+
DRM_ERROR("mic: Failed to add MIC to the global bridge list\n");
462+
return ret;
463+
}
464+
464465
pm_runtime_enable(dev);
465466

466467
ret = component_add(dev, &exynos_mic_component_ops);
@@ -479,8 +480,13 @@ static int exynos_mic_probe(struct platform_device *pdev)
479480

480481
static int exynos_mic_remove(struct platform_device *pdev)
481482
{
483+
struct exynos_mic *mic = platform_get_drvdata(pdev);
484+
482485
component_del(&pdev->dev, &exynos_mic_component_ops);
483486
pm_runtime_disable(&pdev->dev);
487+
488+
drm_bridge_remove(&mic->bridge);
489+
484490
return 0;
485491
}
486492

drivers/gpu/drm/exynos/exynos_hdmi.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,8 +1501,6 @@ static void hdmi_disable(struct drm_encoder *encoder)
15011501
*/
15021502
cancel_delayed_work(&hdata->hotplug_work);
15031503
cec_notifier_set_phys_addr(hdata->notifier, CEC_PHYS_ADDR_INVALID);
1504-
1505-
hdmiphy_disable(hdata);
15061504
}
15071505

15081506
static const struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = {
@@ -1676,7 +1674,7 @@ static int hdmi_resources_init(struct hdmi_context *hdata)
16761674
return hdmi_bridge_init(hdata);
16771675
}
16781676

1679-
static struct of_device_id hdmi_match_types[] = {
1677+
static const struct of_device_id hdmi_match_types[] = {
16801678
{
16811679
.compatible = "samsung,exynos4210-hdmi",
16821680
.data = &exynos4210_hdmi_driver_data,
@@ -1934,8 +1932,7 @@ static int hdmi_remove(struct platform_device *pdev)
19341932
return 0;
19351933
}
19361934

1937-
#ifdef CONFIG_PM
1938-
static int exynos_hdmi_suspend(struct device *dev)
1935+
static int __maybe_unused exynos_hdmi_suspend(struct device *dev)
19391936
{
19401937
struct hdmi_context *hdata = dev_get_drvdata(dev);
19411938

@@ -1944,7 +1941,7 @@ static int exynos_hdmi_suspend(struct device *dev)
19441941
return 0;
19451942
}
19461943

1947-
static int exynos_hdmi_resume(struct device *dev)
1944+
static int __maybe_unused exynos_hdmi_resume(struct device *dev)
19481945
{
19491946
struct hdmi_context *hdata = dev_get_drvdata(dev);
19501947
int ret;
@@ -1955,7 +1952,6 @@ static int exynos_hdmi_resume(struct device *dev)
19551952

19561953
return 0;
19571954
}
1958-
#endif
19591955

19601956
static const struct dev_pm_ops exynos_hdmi_pm_ops = {
19611957
SET_RUNTIME_PM_OPS(exynos_hdmi_suspend, exynos_hdmi_resume, NULL)

drivers/gpu/drm/exynos/exynos_mixer.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,28 +1094,28 @@ static const struct exynos_drm_crtc_ops mixer_crtc_ops = {
10941094
.atomic_check = mixer_atomic_check,
10951095
};
10961096

1097-
static struct mixer_drv_data exynos5420_mxr_drv_data = {
1097+
static const struct mixer_drv_data exynos5420_mxr_drv_data = {
10981098
.version = MXR_VER_128_0_0_184,
10991099
.is_vp_enabled = 0,
11001100
};
11011101

1102-
static struct mixer_drv_data exynos5250_mxr_drv_data = {
1102+
static const struct mixer_drv_data exynos5250_mxr_drv_data = {
11031103
.version = MXR_VER_16_0_33_0,
11041104
.is_vp_enabled = 0,
11051105
};
11061106

1107-
static struct mixer_drv_data exynos4212_mxr_drv_data = {
1107+
static const struct mixer_drv_data exynos4212_mxr_drv_data = {
11081108
.version = MXR_VER_0_0_0_16,
11091109
.is_vp_enabled = 1,
11101110
};
11111111

1112-
static struct mixer_drv_data exynos4210_mxr_drv_data = {
1112+
static const struct mixer_drv_data exynos4210_mxr_drv_data = {
11131113
.version = MXR_VER_0_0_0_16,
11141114
.is_vp_enabled = 1,
11151115
.has_sclk = 1,
11161116
};
11171117

1118-
static struct of_device_id mixer_match_types[] = {
1118+
static const struct of_device_id mixer_match_types[] = {
11191119
{
11201120
.compatible = "samsung,exynos4210-mixer",
11211121
.data = &exynos4210_mxr_drv_data,

0 commit comments

Comments
 (0)