diff options
Diffstat (limited to 'shared-core/i915_dma.c')
-rw-r--r-- | shared-core/i915_dma.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 1e493e38..7ccd185c 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -245,7 +245,7 @@ static int i915_initialize(struct drm_device * dev, dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A; /* Program Hardware Status Page */ - if (!IS_G33(dev)) { + if (!I915_NEED_GFX_HWS(dev)) { dev_priv->status_page_dmah = drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE, 0xffffffff); @@ -970,6 +970,9 @@ static int i915_set_status_page(struct drm_device *dev, void *data, drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_hws_addr_t *hws = data; + if (!I915_NEED_GFX_HWS(dev)) + return -EINVAL; + if (!dev_priv) { DRM_ERROR("called with no initialization\n"); return -EINVAL; |