diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-01-11 14:23:12 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-01-17 11:28:31 +1000 |
commit | c693931d93facab671bafdcebf515520663c22fc (patch) | |
tree | 1b478c4367de1337c62c247653a0ef98b71fbbcf /drivers/gpu/drm/nouveau/nouveau_drv.h | |
parent | 07cfe0e7a820ecad078c04e9c2a102521709145d (diff) | |
download | op-kernel-dev-c693931d93facab671bafdcebf515520663c22fc.zip op-kernel-dev-c693931d93facab671bafdcebf515520663c22fc.tar.gz |
drm/nv40: make detection of 0x4097-ful chipsets available everywhere
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 6d749b7..07a7e6a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -1574,6 +1574,20 @@ nv_match_device(struct drm_device *dev, unsigned device, dev->pdev->subsystem_device == sub_device; } +/* returns 1 if device is one of the nv4x using the 0x4497 object class, + * helpful to determine a number of other hardware features + */ +static inline int +nv44_graph_class(struct drm_device *dev) +{ + struct drm_nouveau_private *dev_priv = dev->dev_private; + + if ((dev_priv->chipset & 0xf0) == 0x60) + return 1; + + return !(0x0baf & (1 << (dev_priv->chipset & 0x0f))); +} + /* memory type/access flags, do not match hardware values */ #define NV_MEM_ACCESS_RO 1 #define NV_MEM_ACCESS_WO 2 |