drm/msm: rename hdmi symbols
[deliverable/linux.git] / drivers / gpu / drm / msm / hdmi / hdmi_bridge.c
index 92b69ae8caf9c41c9c6cb80249ed726faafde5f8..bacbd5d8df0ec21fe2000a6d1735e84a63e7329d 100644 (file)
@@ -23,11 +23,11 @@ struct hdmi_bridge {
 };
 #define to_hdmi_bridge(x) container_of(x, struct hdmi_bridge, base)
 
-void hdmi_bridge_destroy(struct drm_bridge *bridge)
+void msm_hdmi_bridge_destroy(struct drm_bridge *bridge)
 {
 }
 
-static void power_on(struct drm_bridge *bridge)
+static void msm_hdmi_power_on(struct drm_bridge *bridge)
 {
        struct drm_device *dev = bridge->dev;
        struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge);
@@ -86,7 +86,7 @@ static void power_off(struct drm_bridge *bridge)
        }
 }
 
-static void hdmi_bridge_pre_enable(struct drm_bridge *bridge)
+static void msm_hdmi_bridge_pre_enable(struct drm_bridge *bridge)
 {
        struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge);
        struct hdmi *hdmi = hdmi_bridge->hdmi;
@@ -95,51 +95,51 @@ static void hdmi_bridge_pre_enable(struct drm_bridge *bridge)
        DBG("power up");
 
        if (!hdmi->power_on) {
-               power_on(bridge);
+               msm_hdmi_phy_resource_enable(phy);
+               msm_hdmi_power_on(bridge);
                hdmi->power_on = true;
-               hdmi_audio_update(hdmi);
+               msm_hdmi_audio_update(hdmi);
        }
 
-       if (phy)
-               phy->funcs->powerup(phy, hdmi->pixclock);
+       msm_hdmi_phy_powerup(phy, hdmi->pixclock);
 
-       hdmi_set_mode(hdmi, true);
+       msm_hdmi_set_mode(hdmi, true);
 
        if (hdmi->hdcp_ctrl)
-               hdmi_hdcp_on(hdmi->hdcp_ctrl);
+               msm_hdmi_hdcp_on(hdmi->hdcp_ctrl);
 }
 
-static void hdmi_bridge_enable(struct drm_bridge *bridge)
+static void msm_hdmi_bridge_enable(struct drm_bridge *bridge)
 {
 }
 
-static void hdmi_bridge_disable(struct drm_bridge *bridge)
+static void msm_hdmi_bridge_disable(struct drm_bridge *bridge)
 {
 }
 
-static void hdmi_bridge_post_disable(struct drm_bridge *bridge)
+static void msm_hdmi_bridge_post_disable(struct drm_bridge *bridge)
 {
        struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge);
        struct hdmi *hdmi = hdmi_bridge->hdmi;
        struct hdmi_phy *phy = hdmi->phy;
 
        if (hdmi->hdcp_ctrl)
-               hdmi_hdcp_off(hdmi->hdcp_ctrl);
+               msm_hdmi_hdcp_off(hdmi->hdcp_ctrl);
 
        DBG("power down");
-       hdmi_set_mode(hdmi, false);
+       msm_hdmi_set_mode(hdmi, false);
 
-       if (phy)
-               phy->funcs->powerdown(phy);
+       msm_hdmi_phy_powerdown(phy);
 
        if (hdmi->power_on) {
                power_off(bridge);
                hdmi->power_on = false;
-               hdmi_audio_update(hdmi);
+               msm_hdmi_audio_update(hdmi);
+               msm_hdmi_phy_resource_disable(phy);
        }
 }
 
-static void hdmi_bridge_mode_set(struct drm_bridge *bridge,
+static void msm_hdmi_bridge_mode_set(struct drm_bridge *bridge,
                 struct drm_display_mode *mode,
                 struct drm_display_mode *adjusted_mode)
 {
@@ -196,20 +196,20 @@ static void hdmi_bridge_mode_set(struct drm_bridge *bridge,
        DBG("frame_ctrl=%08x", frame_ctrl);
        hdmi_write(hdmi, REG_HDMI_FRAME_CTRL, frame_ctrl);
 
-       hdmi_audio_update(hdmi);
+       msm_hdmi_audio_update(hdmi);
 }
 
-static const struct drm_bridge_funcs hdmi_bridge_funcs = {
-               .pre_enable = hdmi_bridge_pre_enable,
-               .enable = hdmi_bridge_enable,
-               .disable = hdmi_bridge_disable,
-               .post_disable = hdmi_bridge_post_disable,
-               .mode_set = hdmi_bridge_mode_set,
+static const struct drm_bridge_funcs msm_hdmi_bridge_funcs = {
+               .pre_enable = msm_hdmi_bridge_pre_enable,
+               .enable = msm_hdmi_bridge_enable,
+               .disable = msm_hdmi_bridge_disable,
+               .post_disable = msm_hdmi_bridge_post_disable,
+               .mode_set = msm_hdmi_bridge_mode_set,
 };
 
 
 /* initialize bridge */
-struct drm_bridge *hdmi_bridge_init(struct hdmi *hdmi)
+struct drm_bridge *msm_hdmi_bridge_init(struct hdmi *hdmi)
 {
        struct drm_bridge *bridge = NULL;
        struct hdmi_bridge *hdmi_bridge;
@@ -225,7 +225,7 @@ struct drm_bridge *hdmi_bridge_init(struct hdmi *hdmi)
        hdmi_bridge->hdmi = hdmi;
 
        bridge = &hdmi_bridge->base;
-       bridge->funcs = &hdmi_bridge_funcs;
+       bridge->funcs = &msm_hdmi_bridge_funcs;
 
        ret = drm_bridge_attach(hdmi->dev, bridge);
        if (ret)
@@ -235,7 +235,7 @@ struct drm_bridge *hdmi_bridge_init(struct hdmi *hdmi)
 
 fail:
        if (bridge)
-               hdmi_bridge_destroy(bridge);
+               msm_hdmi_bridge_destroy(bridge);
 
        return ERR_PTR(ret);
 }
This page took 0.02595 seconds and 5 git commands to generate.