aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-05-21 10:27:44 -0400
committerDave Airlie <airlied@redhat.com>2012-05-22 05:15:45 -0400
commit7beff62ee39d3ccf088bb77f61a63037f714d235 (patch)
treeb6a2aa20f68594c6e7bcb800bc9b826d48a1cee7
parentbc794829141f28e14fe7d0e07e35870bd9aee78c (diff)
gma500: Fix Poulsbo suspend/resume crash on devices with SDVO ports
Reported-by: Guillaume Clément <guillaume@baobob.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/gma500/psb_device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/psb_device.c b/drivers/gpu/drm/gma500/psb_device.c
index 2a3e2da4ea8e..eff039bf92d4 100644
--- a/drivers/gpu/drm/gma500/psb_device.c
+++ b/drivers/gpu/drm/gma500/psb_device.c
@@ -197,7 +197,8 @@ static int psb_save_display_registers(struct drm_device *dev)
197 } 197 }
198 198
199 list_for_each_entry(connector, &dev->mode_config.connector_list, head) 199 list_for_each_entry(connector, &dev->mode_config.connector_list, head)
200 connector->funcs->save(connector); 200 if (connector->funcs->save)
201 connector->funcs->save(connector);
201 202
202 mutex_unlock(&dev->mode_config.mutex); 203 mutex_unlock(&dev->mode_config.mutex);
203 return 0; 204 return 0;
@@ -235,7 +236,8 @@ static int psb_restore_display_registers(struct drm_device *dev)
235 crtc->funcs->restore(crtc); 236 crtc->funcs->restore(crtc);
236 237
237 list_for_each_entry(connector, &dev->mode_config.connector_list, head) 238 list_for_each_entry(connector, &dev->mode_config.connector_list, head)
238 connector->funcs->restore(connector); 239 if (connector->funcs->restore)
240 connector->funcs->restore(connector);
239 241
240 mutex_unlock(&dev->mode_config.mutex); 242 mutex_unlock(&dev->mode_config.mutex);
241 return 0; 243 return 0;