aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvc0_graph.h
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-23 06:06:09 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-23 06:06:09 +0200
commit499ba610c2829adafbf393c2f3773d73ae4445f3 (patch)
treefae89854e0b3e704dd6410780e392901df1a6759 /drivers/gpu/drm/nouveau/nvc0_graph.h
parent817ba283acf2d7b5aa073b96fd989f336fcff72a (diff)
downloadkernel_samsung_smdk4412-499ba610c2829adafbf393c2f3773d73ae4445f3.zip
kernel_samsung_smdk4412-499ba610c2829adafbf393c2f3773d73ae4445f3.tar.gz
kernel_samsung_smdk4412-499ba610c2829adafbf393c2f3773d73ae4445f3.tar.bz2
merge more graphics stuff from 3.2.72
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvc0_graph.h')
-rw-r--r--drivers/gpu/drm/nouveau/nvc0_graph.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.h b/drivers/gpu/drm/nouveau/nvc0_graph.h
index f5d184e0..636fe98 100644
--- a/drivers/gpu/drm/nouveau/nvc0_graph.h
+++ b/drivers/gpu/drm/nouveau/nvc0_graph.h
@@ -57,8 +57,7 @@ struct nvc0_graph_priv {
struct nouveau_gpuobj *unk4188b4;
struct nouveau_gpuobj *unk4188b8;
- u8 magic_not_rop_nr;
- u32 magicgpc918;
+ u8 magic_not_rop_nr;
};
struct nvc0_graph_chan {
@@ -72,4 +71,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:
+ case 0xce: /* guess, mmio trace shows only 0x9097 state */
+ case 0xcf: /* guess, mmio trace shows only 0x9097 state */
+ return 0x9097;
+ case 0xc1:
+ return 0x9197;
+ case 0xc8:
+ return 0x9297;
+ default:
+ return 0;
+ }
+}
+
#endif