diff options
author | Zhao Yakui <yakui.zhao@intel.com> | 2009-12-08 22:23:42 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-08 22:28:07 -0500 |
commit | b16d9acbdb97452d1418420e069acf7381ef10bb (patch) | |
tree | f483f41167a02e0f660bfcbfd828c7d186a90d3a | |
parent | 7b0a9e8302522d5f7bb7fab6b8a3c8ce8181609c (diff) |
drm: disable all the possible outputs/crtcs before entering KMS mode
Sometimes we will use a crtc for integerated LVDS, which is different with
that assigned by BIOS. If we want to get flicker-free transitions,
then we could read out the current state for it and set our current state
accordingly.
But it is true that if we aren't reading current state out, we do need
to turn everything off before modesetting. Otherwise the clocks can get very
angry and we get things worse than a flicker at boot.
In fact we also do the similar thing in UMS mode. We will disable all the
possible outputs/crtcs for the first modesetting.
So we disable all the possible outputs/crtcs before entering the KMS mode.
Before we configure connector/encoder/crtc, the function of
drm_helper_disable_unused_function can disable all the possible outputs/crtcs.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Rafal Milecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 3963b3c1081a..4231d6db72ec 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -1020,6 +1020,9 @@ bool drm_helper_initial_config(struct drm_device *dev) | |||
1020 | { | 1020 | { |
1021 | int count = 0; | 1021 | int count = 0; |
1022 | 1022 | ||
1023 | /* disable all the possible outputs/crtcs before entering KMS mode */ | ||
1024 | drm_helper_disable_unused_functions(dev); | ||
1025 | |||
1023 | drm_fb_helper_parse_command_line(dev); | 1026 | drm_fb_helper_parse_command_line(dev); |
1024 | 1027 | ||
1025 | count = drm_helper_probe_connector_modes(dev, | 1028 | count = drm_helper_probe_connector_modes(dev, |