diff options
author | Keith Packard <keithp@keithp.com> | 2011-02-03 19:57:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-04 12:58:01 -0500 |
commit | 811aaa55ba21ab37407018cfc01770d6b037d3fb (patch) | |
tree | 217516756f6804d655d3654747ce090043fa85dc /drivers/gpu | |
parent | 89840966c57967fa5b36151c83b7c13fc9c5b3fd (diff) |
drm: Only set DPMS ON when actually configuring a mode
In drm_crtc_helper_set_config, instead of always forcing all outputs
to DRM_MODE_DPMS_ON, only set them if the CRTC is actually getting a
mode set, as any mode set will turn all outputs on.
This fixes https://lkml.org/lkml/2011/1/24/457
Signed-off-by: Keith Packard <keithp@keithp.com>
Cc: stable@kernel.org (2.6.37)
Reported-and-tested-by: Carlos R. Mafra <crmafra2@gmail.com>
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 952b3d4fb2a6..17459ee49ec3 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -665,6 +665,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) | |||
665 | ret = -EINVAL; | 665 | ret = -EINVAL; |
666 | goto fail; | 666 | goto fail; |
667 | } | 667 | } |
668 | DRM_DEBUG_KMS("Setting connector DPMS state to on\n"); | ||
669 | for (i = 0; i < set->num_connectors; i++) { | ||
670 | DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id, | ||
671 | drm_get_connector_name(set->connectors[i])); | ||
672 | set->connectors[i]->dpms = DRM_MODE_DPMS_ON; | ||
673 | } | ||
668 | } | 674 | } |
669 | drm_helper_disable_unused_functions(dev); | 675 | drm_helper_disable_unused_functions(dev); |
670 | } else if (fb_changed) { | 676 | } else if (fb_changed) { |
@@ -681,12 +687,6 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) | |||
681 | goto fail; | 687 | goto fail; |
682 | } | 688 | } |
683 | } | 689 | } |
684 | DRM_DEBUG_KMS("Setting connector DPMS state to on\n"); | ||
685 | for (i = 0; i < set->num_connectors; i++) { | ||
686 | DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id, | ||
687 | drm_get_connector_name(set->connectors[i])); | ||
688 | set->connectors[i]->dpms = DRM_MODE_DPMS_ON; | ||
689 | } | ||
690 | 690 | ||
691 | kfree(save_connectors); | 691 | kfree(save_connectors); |
692 | kfree(save_encoders); | 692 | kfree(save_encoders); |