summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvc0_graph.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-05-24 14:37:41 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-06-23 15:57:07 +1000
commit847adea2c701b519b43d8c958c5082a22eeba346 (patch)
treea16bdc1fd3bc21d98a712ece351ab129f2497658 /drivers/gpu/drm/nouveau/nvc0_graph.h
parent068da16198ad09343b0c3647d26f81683921bc84 (diff)
downloadblackbird-op-linux-847adea2c701b519b43d8c958c5082a22eeba346.tar.gz
blackbird-op-linux-847adea2c701b519b43d8c958c5082a22eeba346.zip
drm/nvc0/gr: macro to determine fermi class, will use it in a few places
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvc0_graph.h')
-rw-r--r--drivers/gpu/drm/nouveau/nvc0_graph.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.h b/drivers/gpu/drm/nouveau/nvc0_graph.h
index f5d184e0689d..2b667d4e88ca 100644
--- a/drivers/gpu/drm/nouveau/nvc0_graph.h
+++ b/drivers/gpu/drm/nouveau/nvc0_graph.h
@@ -72,4 +72,26 @@ struct nvc0_graph_chan {
int nvc0_grctx_generate(struct nouveau_channel *);
+/* nvc0_graph.c uses this also to determine supported chipsets */
+static inline u32
+nvc0_graph_class(struct drm_device *dev)
+{
+ struct drm_nouveau_private *dev_priv = dev->dev_private;
+
+ switch (dev_priv->chipset) {
+ case 0xc0:
+ case 0xc3:
+ case 0xc4:
+ return 0x9097;
+#if 0
+ case 0xc1:
+ return 0x9197;
+ case 0xc8:
+ return 0x9297;
+#endif
+ default:
+ return 0;
+ }
+}
+
#endif
OpenPOWER on IntegriCloud