summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-03-08 08:30:03 +1000
committerDave Airlie <airlied@linux.ie>2008-03-08 08:30:30 +1000
commitce3733572e4eea6d9adb167d8fccac745455445b (patch)
treefe19d802b6bc3e8a9d5178ecd3ba59ec9871faa3 /shared-core
parent1ccccbd4ce3463edb459eb193feb572938fce19e (diff)
drm/radeon: check sarea_priv exists
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/radeon_state.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/shared-core/radeon_state.c b/shared-core/radeon_state.c
index 70651d7f..8489549c 100644
--- a/shared-core/radeon_state.c
+++ b/shared-core/radeon_state.c
@@ -3126,12 +3126,14 @@ static int radeon_cp_setparam(struct drm_device *dev, void *data, struct drm_fil
DRM_DEBUG("color tiling disabled\n");
dev_priv->front_pitch_offset &= ~RADEON_DST_TILE_MACRO;
dev_priv->back_pitch_offset &= ~RADEON_DST_TILE_MACRO;
- dev_priv->sarea_priv->tiling_enabled = 0;
+ if (dev_priv->sarea_priv)
+ dev_priv->sarea_priv->tiling_enabled = 0;
} else if (sp->value == 1) {
DRM_DEBUG("color tiling enabled\n");
dev_priv->front_pitch_offset |= RADEON_DST_TILE_MACRO;
dev_priv->back_pitch_offset |= RADEON_DST_TILE_MACRO;
- dev_priv->sarea_priv->tiling_enabled = 1;
+ if (dev_priv->sarea_priv)
+ dev_priv->sarea_priv->tiling_enabled = 1;
}
break;
case RADEON_SETPARAM_PCIGART_LOCATION: