|
@@ -1575,42 +1575,6 @@ static void dw_hdmi_update_phy_mask(struct dw_hdmi *hdmi)
|
|
hdmi_writeb(hdmi, hdmi->phy_mask, HDMI_PHY_MASK0);
|
|
hdmi_writeb(hdmi, hdmi->phy_mask, HDMI_PHY_MASK0);
|
|
}
|
|
}
|
|
|
|
|
|
-static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge,
|
|
|
|
- struct drm_display_mode *orig_mode,
|
|
|
|
- struct drm_display_mode *mode)
|
|
|
|
-{
|
|
|
|
- struct dw_hdmi *hdmi = bridge->driver_private;
|
|
|
|
-
|
|
|
|
- mutex_lock(&hdmi->mutex);
|
|
|
|
-
|
|
|
|
- /* Store the display mode for plugin/DKMS poweron events */
|
|
|
|
- memcpy(&hdmi->previous_mode, mode, sizeof(hdmi->previous_mode));
|
|
|
|
-
|
|
|
|
- mutex_unlock(&hdmi->mutex);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static void dw_hdmi_bridge_disable(struct drm_bridge *bridge)
|
|
|
|
-{
|
|
|
|
- struct dw_hdmi *hdmi = bridge->driver_private;
|
|
|
|
-
|
|
|
|
- mutex_lock(&hdmi->mutex);
|
|
|
|
- hdmi->disabled = true;
|
|
|
|
- dw_hdmi_update_power(hdmi);
|
|
|
|
- dw_hdmi_update_phy_mask(hdmi);
|
|
|
|
- mutex_unlock(&hdmi->mutex);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static void dw_hdmi_bridge_enable(struct drm_bridge *bridge)
|
|
|
|
-{
|
|
|
|
- struct dw_hdmi *hdmi = bridge->driver_private;
|
|
|
|
-
|
|
|
|
- mutex_lock(&hdmi->mutex);
|
|
|
|
- hdmi->disabled = false;
|
|
|
|
- dw_hdmi_update_power(hdmi);
|
|
|
|
- dw_hdmi_update_phy_mask(hdmi);
|
|
|
|
- mutex_unlock(&hdmi->mutex);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static enum drm_connector_status
|
|
static enum drm_connector_status
|
|
dw_hdmi_connector_detect(struct drm_connector *connector, bool force)
|
|
dw_hdmi_connector_detect(struct drm_connector *connector, bool force)
|
|
{
|
|
{
|
|
@@ -1703,6 +1667,42 @@ static const struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs =
|
|
.best_encoder = drm_atomic_helper_best_encoder,
|
|
.best_encoder = drm_atomic_helper_best_encoder,
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge,
|
|
|
|
+ struct drm_display_mode *orig_mode,
|
|
|
|
+ struct drm_display_mode *mode)
|
|
|
|
+{
|
|
|
|
+ struct dw_hdmi *hdmi = bridge->driver_private;
|
|
|
|
+
|
|
|
|
+ mutex_lock(&hdmi->mutex);
|
|
|
|
+
|
|
|
|
+ /* Store the display mode for plugin/DKMS poweron events */
|
|
|
|
+ memcpy(&hdmi->previous_mode, mode, sizeof(hdmi->previous_mode));
|
|
|
|
+
|
|
|
|
+ mutex_unlock(&hdmi->mutex);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void dw_hdmi_bridge_disable(struct drm_bridge *bridge)
|
|
|
|
+{
|
|
|
|
+ struct dw_hdmi *hdmi = bridge->driver_private;
|
|
|
|
+
|
|
|
|
+ mutex_lock(&hdmi->mutex);
|
|
|
|
+ hdmi->disabled = true;
|
|
|
|
+ dw_hdmi_update_power(hdmi);
|
|
|
|
+ dw_hdmi_update_phy_mask(hdmi);
|
|
|
|
+ mutex_unlock(&hdmi->mutex);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void dw_hdmi_bridge_enable(struct drm_bridge *bridge)
|
|
|
|
+{
|
|
|
|
+ struct dw_hdmi *hdmi = bridge->driver_private;
|
|
|
|
+
|
|
|
|
+ mutex_lock(&hdmi->mutex);
|
|
|
|
+ hdmi->disabled = false;
|
|
|
|
+ dw_hdmi_update_power(hdmi);
|
|
|
|
+ dw_hdmi_update_phy_mask(hdmi);
|
|
|
|
+ mutex_unlock(&hdmi->mutex);
|
|
|
|
+}
|
|
|
|
+
|
|
static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = {
|
|
static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = {
|
|
.enable = dw_hdmi_bridge_enable,
|
|
.enable = dw_hdmi_bridge_enable,
|
|
.disable = dw_hdmi_bridge_disable,
|
|
.disable = dw_hdmi_bridge_disable,
|