summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-11-09 11:30:50 +1000
committerDave Airlie <airlied@redhat.com>2007-11-09 11:30:50 +1000
commitd983ed90cb9de559271817e04bddc8b40fc16a0d (patch)
treed4eb5ae06f952771cb7198a1b7b6fabab08cdc10 /shared-core
parente9805de5c736f899dea5220ab8b521cc69c9eca6 (diff)
i915: cleanup pageflip derefs sarea even if no sarea exists
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_dma.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 47befeb5..117f1265 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -1070,10 +1070,12 @@ out_free:
int i915_do_cleanup_pageflip(struct drm_device * dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- int i, planes, num_pages = dev_priv->sarea_priv->third_handle ? 3 : 2;
+ int i, planes, num_pages;
DRM_DEBUG("%s\n", __FUNCTION__);
-
+ if (!dev_priv->sarea_priv)
+ return 0;
+ num_pages = dev_priv->sarea_priv->third_handle ? 3 : 2;
for (i = 0, planes = 0; i < 2; i++) {
if (dev_priv->sarea_priv->pf_current_page & (0x3 << (2 * i))) {
dev_priv->sarea_priv->pf_current_page =