diff options
author | Keith Packard <keithp@keithp.com> | 2009-05-30 23:42:28 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-06-03 19:32:12 -0400 |
commit | c9fb15f60eb517c958dec64dca9357bf62bf2201 (patch) | |
tree | 17c67c910ddc93f7adf0b48d27c0256a89d1dc7e /drivers/gpu/drm/i915/intel_lvds.c | |
parent | e36ebaf49274ffa78f17b62bcae4c92c33b5b391 (diff) |
drm: Hook up DPMS property handling in drm_crtc.c. Add drm_helper_connector_dpms.
Making the drm_crtc.c code recognize the DPMS property and invoke the
connector->dpms function doesn't remove any capability from the driver while
reducing code duplication.
That just highlighted the problem with the existing DPMS functions which
could turn off the connector, but failed to turn off any relevant crtcs. The
new drm_helper_connector_dpms function manages all of that, using the
drm_helper-specific crtc and encoder dpms functions, automatically computing
the appropriate DPMS level for each object in the system.
This fixes the current troubles in the i915 driver which left PLLs, pipes
and planes running while in DPMS_OFF mode or even while they were unused.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 53731f0ffcb5..c92a64ac8549 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -343,11 +343,6 @@ static int intel_lvds_set_property(struct drm_connector *connector, | |||
343 | struct drm_property *property, | 343 | struct drm_property *property, |
344 | uint64_t value) | 344 | uint64_t value) |
345 | { | 345 | { |
346 | struct drm_device *dev = connector->dev; | ||
347 | |||
348 | if (property == dev->mode_config.dpms_property && connector->encoder) | ||
349 | intel_lvds_dpms(connector->encoder, (uint32_t)(value & 0xf)); | ||
350 | |||
351 | return 0; | 346 | return 0; |
352 | } | 347 | } |
353 | 348 | ||
@@ -366,6 +361,7 @@ static const struct drm_connector_helper_funcs intel_lvds_connector_helper_funcs | |||
366 | }; | 361 | }; |
367 | 362 | ||
368 | static const struct drm_connector_funcs intel_lvds_connector_funcs = { | 363 | static const struct drm_connector_funcs intel_lvds_connector_funcs = { |
364 | .dpms = drm_helper_connector_dpms, | ||
369 | .save = intel_lvds_save, | 365 | .save = intel_lvds_save, |
370 | .restore = intel_lvds_restore, | 366 | .restore = intel_lvds_restore, |
371 | .detect = intel_lvds_detect, | 367 | .detect = intel_lvds_detect, |