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_device.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_device.c')
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_device.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c index a54cc738926a..5cc06a8fcb7a 100644 --- a/drivers/gpu/drm/gma500/cdv_device.c +++ b/drivers/gpu/drm/gma500/cdv_device.c | |||
@@ -49,6 +49,9 @@ static void cdv_disable_vga(struct drm_device *dev) | |||
49 | static int cdv_output_init(struct drm_device *dev) | 49 | static int cdv_output_init(struct drm_device *dev) |
50 | { | 50 | { |
51 | struct drm_psb_private *dev_priv = dev->dev_private; | 51 | struct drm_psb_private *dev_priv = dev->dev_private; |
52 | |||
53 | drm_mode_create_scaling_mode_property(dev); | ||
54 | |||
52 | cdv_disable_vga(dev); | 55 | cdv_disable_vga(dev); |
53 | 56 | ||
54 | cdv_intel_crt_init(dev, &dev_priv->mode_dev); | 57 | cdv_intel_crt_init(dev, &dev_priv->mode_dev); |
@@ -238,6 +241,18 @@ static void cdv_init_pm(struct drm_device *dev) | |||
238 | dev_err(dev->dev, "GPU: power management timed out.\n"); | 241 | dev_err(dev->dev, "GPU: power management timed out.\n"); |
239 | } | 242 | } |
240 | 243 | ||
244 | static void cdv_errata(struct drm_device *dev) | ||
245 | { | ||
246 | /* Disable bonus launch. | ||
247 | * CPU and GPU competes for memory and display misses updates and flickers. | ||
248 | * Worst with dual core, dual displays. | ||
249 | * | ||
250 | * Fixes were done to Win 7 gfx driver to disable a feature called Bonus | ||
251 | * Launch to work around the issue, by degrading performance. | ||
252 | */ | ||
253 | CDV_MSG_WRITE32(3, 0x30, 0x08027108); | ||
254 | } | ||
255 | |||
241 | /** | 256 | /** |
242 | * cdv_save_display_registers - save registers lost on suspend | 257 | * cdv_save_display_registers - save registers lost on suspend |
243 | * @dev: our DRM device | 258 | * @dev: our DRM device |
@@ -355,7 +370,7 @@ static int cdv_restore_display_registers(struct drm_device *dev) | |||
355 | REG_WRITE(PSB_INT_MASK_R, regs->cdv.saveIMR); | 370 | REG_WRITE(PSB_INT_MASK_R, regs->cdv.saveIMR); |
356 | 371 | ||
357 | /* Fix arbitration bug */ | 372 | /* Fix arbitration bug */ |
358 | CDV_MSG_WRITE32(3, 0x30, 0x08027108); | 373 | cdv_errata(dev); |
359 | 374 | ||
360 | drm_mode_config_reset(dev); | 375 | drm_mode_config_reset(dev); |
361 | 376 | ||
@@ -464,8 +479,11 @@ const struct psb_ops cdv_chip_ops = { | |||
464 | .accel_2d = 0, | 479 | .accel_2d = 0, |
465 | .pipes = 2, | 480 | .pipes = 2, |
466 | .crtcs = 2, | 481 | .crtcs = 2, |
482 | .hdmi_mask = (1 << 0) | (1 << 1), | ||
483 | .lvds_mask = (1 << 1), | ||
467 | .sgx_offset = MRST_SGX_OFFSET, | 484 | .sgx_offset = MRST_SGX_OFFSET, |
468 | .chip_setup = cdv_chip_setup, | 485 | .chip_setup = cdv_chip_setup, |
486 | .errata = cdv_errata, | ||
469 | 487 | ||
470 | .crtc_helper = &cdv_intel_helper_funcs, | 488 | .crtc_helper = &cdv_intel_helper_funcs, |
471 | .crtc_funcs = &cdv_intel_crtc_funcs, | 489 | .crtc_funcs = &cdv_intel_crtc_funcs, |