diff options
author | Alan Cox <alan@linux.intel.com> | 2012-04-25 09:38:07 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-04-27 04:24:16 -0400 |
commit | d235e64a4367ad3ff204309490c4325b4f89b25b (patch) | |
tree | 33e84fdfc41628f78c5183f04e450d396c1cbc38 /drivers/gpu/drm/gma500/cdv_intel_lvds.c | |
parent | b60bfb6585bcda7bc7abd32ce9a14d4c8a6acc8e (diff) |
cdv: continue synching up with updated reference code
In particular clean up the errata handling and correct the crtc masks. We do
this a bit differently using our device abstraction for neatness.
This doesn't address the ACPI opregion and hotplug plumbing, nor the IRQ related
changes that will need. It touches on backlight init but the full backlight
support is not in this change set.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/gma500/cdv_intel_lvds.c')
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_lvds.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c index c87b179eadfd..44a8353d92bf 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c | |||
@@ -356,6 +356,8 @@ static void cdv_intel_lvds_mode_set(struct drm_encoder *encoder, | |||
356 | { | 356 | { |
357 | struct drm_device *dev = encoder->dev; | 357 | struct drm_device *dev = encoder->dev; |
358 | struct drm_psb_private *dev_priv = dev->dev_private; | 358 | struct drm_psb_private *dev_priv = dev->dev_private; |
359 | struct psb_intel_crtc *psb_intel_crtc = to_psb_intel_crtc( | ||
360 | encoder->crtc); | ||
359 | u32 pfit_control; | 361 | u32 pfit_control; |
360 | 362 | ||
361 | /* | 363 | /* |
@@ -377,6 +379,8 @@ static void cdv_intel_lvds_mode_set(struct drm_encoder *encoder, | |||
377 | else | 379 | else |
378 | pfit_control = 0; | 380 | pfit_control = 0; |
379 | 381 | ||
382 | pfit_control |= psb_intel_crtc->pipe << PFIT_PIPE_SHIFT; | ||
383 | |||
380 | if (dev_priv->lvds_dither) | 384 | if (dev_priv->lvds_dither) |
381 | pfit_control |= PANEL_8TO6_DITHER_ENABLE; | 385 | pfit_control |= PANEL_8TO6_DITHER_ENABLE; |
382 | 386 | ||
@@ -767,6 +771,19 @@ void cdv_intel_lvds_init(struct drm_device *dev, | |||
767 | goto failed_find; | 771 | goto failed_find; |
768 | } | 772 | } |
769 | 773 | ||
774 | /* setup PWM */ | ||
775 | { | ||
776 | u32 pwm; | ||
777 | |||
778 | pwm = REG_READ(BLC_PWM_CTL2); | ||
779 | if (pipe == 1) | ||
780 | pwm |= PWM_PIPE_B; | ||
781 | else | ||
782 | pwm &= ~PWM_PIPE_B; | ||
783 | pwm |= PWM_ENABLE; | ||
784 | REG_WRITE(BLC_PWM_CTL2, pwm); | ||
785 | } | ||
786 | |||
770 | out: | 787 | out: |
771 | drm_sysfs_connector_add(connector); | 788 | drm_sysfs_connector_add(connector); |
772 | return; | 789 | return; |