gma500: Prevent endless loop in panel power up sequence
Subsystems (4)
PATCH 1/3 gma500: Prevent endless loop in panel power up sequence
From: Alan Cox <[email protected]>
Some devices don't have a panel connected to LVDS and thus will never power up. This patch checks the power sequence progress bits in PP_STATUS to prevent an endless loop on such devices.
---
drivers/gpu/drm/gma500/psb_lid.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/gma500/psb_lid.c +9 -3
@@ -40,10 +40,16 @@ static void psb_lid_timer_func(unsigned long data)REG_WRITE (PP_CONTROL ,REG_READ (PP_CONTROL ) |POWER_TARGET_ON );do { pp_status =REG_READ (PP_STATUS ); - }while ((pp_status &PP_ON ) ==0 ); + }while ((pp_status &PP_ON ) ==0 && + (pp_status &PP_SEQUENCE_MASK ) !=0 ); -/*FIXME: should be backlight level before*/ -psb_intel_lvds_set_brightness (dev,100 ); +if (REG_READ (PP_STATUS ) &PP_ON ) { +/*FIXME: should be backlight level before*/ +psb_intel_lvds_set_brightness (dev,100 ); + }else { +DRM_DEBUG ("LVDS panel never powered up" ); +return ; + } }else {psb_intel_lvds_set_brightness (dev,0 );
PATCH 2/3 gma500: handle poulsbo cursor restriction
From: Patrik Jakobsson <[email protected]>
Poulsbo needs a physical address in the cursor base register. We allocate a stolen memory buffer and copy the cursor image provided by userspace into it. When/If we get our own userspace driver we can map this stolen memory directly. The patch also adds a mark in chip ops so we can identify devices that has this requirement.
---
drivers/gpu/drm/gma500/cdv_device.c | 1 drivers/gpu/drm/gma500/mdfld_device.c | 1 drivers/gpu/drm/gma500/oaktrail_device.c | 1 drivers/gpu/drm/gma500/psb_device.c | 1 drivers/gpu/drm/gma500/psb_drv.h | 1 drivers/gpu/drm/gma500/psb_intel_display.c | 62 +++++++++++++++++++++++++--- drivers/gpu/drm/gma500/psb_intel_drv.h | 6 --- 7 files changed, 61 insertions(+), 12 deletions(-)
drivers/gpu/drm/gma500/cdv_device.c +1 -0
@@ -563,6 +563,7 @@ const struct psb_ops cdv_chip_ops = { .crtcs = 2, .hdmi_mask = (1 << 0) | (1 << 1), .lvds_mask = (1 << 1), + .cursor_needs_phys = 0, .sgx_offset = MRST_SGX_OFFSET, .chip_setup = cdv_chip_setup, .errata = cdv_errata,
drivers/gpu/drm/gma500/mdfld_device.c +1 -0
@@ -531,6 +531,7 @@ const struct psb_ops mdfld_chip_ops = { .crtcs = 3, .lvds_mask = (1 << 1), .hdmi_mask = (1 << 1), + .cursor_needs_phys = 0, .sgx_offset = MRST_SGX_OFFSET, .chip_setup = mdfld_chip_setup,
drivers/gpu/drm/gma500/oaktrail_device.c +1 -0
@@ -544,6 +544,7 @@ const struct psb_ops oaktrail_chip_ops = { .crtcs = 2, .hdmi_mask = (1 << 0), .lvds_mask = (1 << 0), + .cursor_needs_phys = 0, .sgx_offset = MRST_SGX_OFFSET, .chip_setup = oaktrail_chip_setup,
drivers/gpu/drm/gma500/psb_device.c +1 -0
@@ -373,6 +373,7 @@ const struct psb_ops psb_chip_ops = { .crtcs = 2, .hdmi_mask = (1 << 0), .lvds_mask = (1 << 1), + .cursor_needs_phys = 1, .sgx_offset = PSB_SGX_OFFSET, .chip_setup = psb_chip_setup, .chip_teardown = psb_chip_teardown,
drivers/gpu/drm/gma500/psb_drv.h +1 -0
@@ -655,6 +655,7 @@ struct psb_ops {int sgx_offset;/* Base offset of SGX device */ int hdmi_mask;/* Mask of HDMI CRTCs */ int lvds_mask;/* Mask of LVDS CRTCs */ +int cursor_needs_phys;/* If cursor base reg need physical address */ /* Sub functions */ struct drm_crtc_helper_funcs const *crtc_helper;
drivers/gpu/drm/gma500/psb_intel_display.c +55 -7
105 lines not on this page · raw message
drivers/gpu/drm/gma500/psb_intel_drv.h +1 -5
@@ -106,11 +106,6 @@ struct psb_intel_mode_device {size_t (*bo_offset) (struct drm_device *dev,void *bo);/* -* Cursor (Can go ?) -*/ -int cursor_needs_physical; - -/* * LVDS info */ int backlight_duty_cycle;/* restore backlight to this value */
@@ -176,6 +171,7 @@ struct psb_intel_crtc {int pipe;int plane;uint32_t cursor_addr; +struct gtt_range *cursor_gt;u8 lut_r[256 ], lut_g[256 ], lut_b[256 ];u8 lut_adj[256 ];struct psb_intel_framebuffer *fbdev_fb;
PATCH 3/3 gma500: Fix Poulsbo suspend/resume crash on devices with SDVO ports
In reply to Alan CoxFrom: Alan Cox <[email protected]>
---
drivers/gpu/drm/gma500/psb_device.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/gma500/psb_device.c +4 -2
@@ -197,7 +197,8 @@ static int psb_save_display_registers(struct drm_device *dev) }list_for_each_entry (connector, &dev->mode_config.connector_list, head) - connector->funcs->save (connector); +if (connector->funcs->save) + connector->funcs->save (connector);mutex_unlock (&dev->mode_config.mutex);return 0 ;
@@ -235,7 +236,8 @@ static int psb_restore_display_registers(struct drm_device *dev) crtc->funcs->restore (crtc);list_for_each_entry (connector, &dev->mode_config.connector_list, head) - connector->funcs->restore (connector); +if (connector->funcs->restore) + connector->funcs->restore (connector);mutex_unlock (&dev->mode_config.mutex);return 0 ;
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html