On Fri, Mar 9, 2012 at 2:50 AM, Yufeng Shen miletus@chromium.org wrote:
So a simple case of disabling a CRTC and then re-enabling it.
Disabling:
CRTC X is originally connected to output Y
XRRSetCrtcConfig() is called to disable CRTC X
drm_helper_connector_dpms() then gets called on the connector
connected to CRTC X, in the function, the connector->encoder is set to DPMS OFF, and the encoder->crtc set to DPMS OFF but the encoder->crtc is still CRTC X
Re-enabling:
XRRSetCrtcConfig() is called to to enable CRTC X on output Y
drm_crtc_helper_set_config () is now called,
suppose fb is not changed, mode is not changed, encoder is not changed and the encoder->crtc is not changed, then we have mode_changed == false and the mode is not reset
So the CRTC X won't be connected to output Y.
What I don't understand the code is that why XRRSetCrtcConfig() ends up only calling drm_helper_connector_dpms() ? I think it should do more than that, at least it should set the related encoder->crtc = NULL
any comments ? _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
As far as i know DPMS designed is a simple switch, meaning that the mode remains active, so if you do DPMS ON it should come back. If for some reason the driver is disconnecting the encoder from the crtc, then it is the drivers responsibility to reconnect it when DPMS ON happens.
But don't take my word for it, others may have more/other information.