rcar_du_group_set_routing(rcrtc->group);
/* FIXME: Commit the planes state. This is required here as the CRTC can
- * be started from the DPMS and system resume handler, which don't go
+ * be started from the system resume handler, which don't go
* through .atomic_plane_update() and .atomic_flush() to commit plane
* state. Additionally, given that the plane state atomic commit occurs
* between CRTC disable and enable, the hardware state could also be
rcrtc->outputs = 0;
}
-static void rcar_du_crtc_dpms(struct drm_crtc *crtc, int mode)
-{
- if (mode == DRM_MODE_DPMS_ON)
- rcar_du_crtc_enable(crtc);
- else
- rcar_du_crtc_disable(crtc);
-}
-
static bool rcar_du_crtc_mode_fixup(struct drm_crtc *crtc,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
}
static const struct drm_crtc_helper_funcs crtc_helper_funcs = {
- .dpms = rcar_du_crtc_dpms,
.mode_fixup = rcar_du_crtc_mode_fixup,
.disable = rcar_du_crtc_disable,
.enable = rcar_du_crtc_enable,
rcar_du_lvdsenc_enable(renc->lvds, encoder->crtc, true);
}
-static void rcar_du_encoder_dpms(struct drm_encoder *encoder, int mode)
-{
- if (mode == DRM_MODE_DPMS_ON)
- rcar_du_encoder_enable(encoder);
- else
- rcar_du_encoder_disable(encoder);
-}
-
static bool rcar_du_encoder_mode_fixup(struct drm_encoder *encoder,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
}
static const struct drm_encoder_helper_funcs encoder_helper_funcs = {
- .dpms = rcar_du_encoder_dpms,
.mode_fixup = rcar_du_encoder_mode_fixup,
.mode_set = rcar_du_encoder_mode_set,
.disable = rcar_du_encoder_disable,
}
static const struct drm_connector_funcs connector_funcs = {
- .dpms = drm_helper_connector_dpms,
+ .dpms = drm_atomic_helper_connector_dpms,
.reset = drm_atomic_helper_connector_reset,
.detect = rcar_du_hdmi_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
if (ret < 0)
return ret;
- drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
+ connector->dpms = DRM_MODE_DPMS_OFF;
drm_object_property_set_value(&connector->base,
rcdu->ddev->mode_config.dpms_property, DRM_MODE_DPMS_OFF);
hdmienc->enabled = true;
}
-static void rcar_du_hdmienc_dpms(struct drm_encoder *encoder, int mode)
-{
- struct rcar_du_hdmienc *hdmienc = to_rcar_hdmienc(encoder);
- bool enable = mode == DRM_MODE_DPMS_ON;
-
- if (hdmienc->enabled == enable)
- return;
-
- if (enable)
- rcar_du_hdmienc_enable(encoder);
- else
- rcar_du_hdmienc_disable(encoder);
-}
-
static bool rcar_du_hdmienc_mode_fixup(struct drm_encoder *encoder,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
}
static const struct drm_encoder_helper_funcs encoder_helper_funcs = {
- .dpms = rcar_du_hdmienc_dpms,
.mode_fixup = rcar_du_hdmienc_mode_fixup,
.mode_set = rcar_du_hdmienc_mode_set,
.disable = rcar_du_hdmienc_disable,
}
static const struct drm_connector_funcs connector_funcs = {
- .dpms = drm_helper_connector_dpms,
+ .dpms = drm_atomic_helper_connector_dpms,
.reset = drm_atomic_helper_connector_reset,
.detect = rcar_du_lvds_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
if (ret < 0)
return ret;
- drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
+ connector->dpms = DRM_MODE_DPMS_OFF;
drm_object_property_set_value(&connector->base,
rcdu->ddev->mode_config.dpms_property, DRM_MODE_DPMS_OFF);
}
static const struct drm_connector_funcs connector_funcs = {
- .dpms = drm_helper_connector_dpms,
+ .dpms = drm_atomic_helper_connector_dpms,
.reset = drm_atomic_helper_connector_reset,
.detect = rcar_du_vga_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
if (ret < 0)
return ret;
- drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
+ connector->dpms = DRM_MODE_DPMS_OFF;
drm_object_property_set_value(&connector->base,
rcdu->ddev->mode_config.dpms_property, DRM_MODE_DPMS_OFF);