aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/drm/i915_dma.c
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2008-02-19 20:59:09 +1000
committerDave Airlie <airlied@redhat.com>2008-02-20 09:37:09 +1000
commitb39d50e53b1bb27f6c29f88a697a4af78427dffd (patch)
tree1a38bfdeb6c1de8df69eb11bb1a8f36cdf8f28fd /drivers/char/drm/i915_dma.c
parent60f92683943c5b7a85963b283d6f8a853aa09203 (diff)
i915: wrap chipset types requiring hw status set ioctl
Also applys to recent added new chipset. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/i915_dma.c')
-rw-r--r--drivers/char/drm/i915_dma.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c
index 43986d81ae3..e9d6663bec7 100644
--- a/drivers/char/drm/i915_dma.c
+++ b/drivers/char/drm/i915_dma.c
@@ -171,7 +171,7 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
dev_priv->allow_batchbuffer = 1;
/* 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);
@@ -720,6 +720,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;