]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/exynos/exynos_hdmi.c
drm: exynos: mark pm functions as __maybe_unused
[karo-tx-linux.git] / drivers / gpu / drm / exynos / exynos_hdmi.c
index 1ff6ab6371e8e7aaa6bce6b1fe1dee64c9e08390..d3b69d66736fc9f71fbbb4c7aa0e86646035a7e4 100644 (file)
@@ -1486,8 +1486,6 @@ static void hdmi_enable(struct drm_encoder *encoder)
 static void hdmi_disable(struct drm_encoder *encoder)
 {
        struct hdmi_context *hdata = encoder_to_hdmi(encoder);
-       struct drm_crtc *crtc = encoder->crtc;
-       const struct drm_crtc_helper_funcs *funcs = NULL;
 
        if (!hdata->powered)
                return;
@@ -1498,18 +1496,11 @@ static void hdmi_disable(struct drm_encoder *encoder)
         * to disable TV Subsystem should be as following,
         *      VP -> Mixer -> HDMI
         *
-        * Below codes will try to disable Mixer and VP(if used)
-        * prior to disabling HDMI.
+        * To achieve such sequence HDMI is disabled together with HDMI PHY, via
+        * pipe clock callback.
         */
-       if (crtc)
-               funcs = crtc->helper_private;
-       if (funcs && funcs->disable)
-               (*funcs->disable)(crtc);
-
-       cec_notifier_set_phys_addr(hdata->notifier, CEC_PHYS_ADDR_INVALID);
        cancel_delayed_work(&hdata->hotplug_work);
-
-       hdmiphy_disable(hdata);
+       cec_notifier_set_phys_addr(hdata->notifier, CEC_PHYS_ADDR_INVALID);
 }
 
 static const struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = {
@@ -1683,7 +1674,7 @@ static int hdmi_resources_init(struct hdmi_context *hdata)
        return hdmi_bridge_init(hdata);
 }
 
-static struct of_device_id hdmi_match_types[] = {
+static const struct of_device_id hdmi_match_types[] = {
        {
                .compatible = "samsung,exynos4210-hdmi",
                .data = &exynos4210_hdmi_driver_data,
@@ -1941,8 +1932,7 @@ static int hdmi_remove(struct platform_device *pdev)
        return 0;
 }
 
-#ifdef CONFIG_PM
-static int exynos_hdmi_suspend(struct device *dev)
+static int __maybe_unused exynos_hdmi_suspend(struct device *dev)
 {
        struct hdmi_context *hdata = dev_get_drvdata(dev);
 
@@ -1951,7 +1941,7 @@ static int exynos_hdmi_suspend(struct device *dev)
        return 0;
 }
 
-static int exynos_hdmi_resume(struct device *dev)
+static int __maybe_unused exynos_hdmi_resume(struct device *dev)
 {
        struct hdmi_context *hdata = dev_get_drvdata(dev);
        int ret;
@@ -1962,7 +1952,6 @@ static int exynos_hdmi_resume(struct device *dev)
 
        return 0;
 }
-#endif
 
 static const struct dev_pm_ops exynos_hdmi_pm_ops = {
        SET_RUNTIME_PM_OPS(exynos_hdmi_suspend, exynos_hdmi_resume, NULL)