diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-12-19 21:52:06 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-12-23 07:59:32 -0500 |
commit | eca15296a9c2a5d5d7d8281a710ba4bd0c2e7cd3 (patch) | |
tree | 098f1d5c63ca234c1946b5ad28571ebddca446b1 | |
parent | 902530693ef38f3bb007efae594e54443d84fa56 (diff) |
drm/nve0/graph: fix fuc, and enable acceleration on all known chipsets
Also adds GK106 to chipsets known by ucode.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 files changed, 108 insertions, 86 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc index 7b715fda2763..62ab231cd6b6 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc +++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc | |||
@@ -57,6 +57,11 @@ chipsets: | |||
57 | .b16 #nve4_gpc_mmio_tail | 57 | .b16 #nve4_gpc_mmio_tail |
58 | .b16 #nve4_tpc_mmio_head | 58 | .b16 #nve4_tpc_mmio_head |
59 | .b16 #nve4_tpc_mmio_tail | 59 | .b16 #nve4_tpc_mmio_tail |
60 | .b8 0xe6 0 0 0 | ||
61 | .b16 #nve4_gpc_mmio_head | ||
62 | .b16 #nve4_gpc_mmio_tail | ||
63 | .b16 #nve4_tpc_mmio_head | ||
64 | .b16 #nve4_tpc_mmio_tail | ||
60 | .b8 0 0 0 0 | 65 | .b8 0 0 0 0 |
61 | 66 | ||
62 | // GPC mmio lists | 67 | // GPC mmio lists |
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h index 26c2165bad0f..09ee4702c8b2 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h +++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h | |||
@@ -34,13 +34,16 @@ uint32_t nve0_grgpc_data[] = { | |||
34 | 0x00000000, | 34 | 0x00000000, |
35 | /* 0x0064: chipsets */ | 35 | /* 0x0064: chipsets */ |
36 | 0x000000e4, | 36 | 0x000000e4, |
37 | 0x01040080, | 37 | 0x0110008c, |
38 | 0x014c0104, | 38 | 0x01580110, |
39 | 0x000000e7, | 39 | 0x000000e7, |
40 | 0x01040080, | 40 | 0x0110008c, |
41 | 0x014c0104, | 41 | 0x01580110, |
42 | 0x000000e6, | ||
43 | 0x0110008c, | ||
44 | 0x01580110, | ||
42 | 0x00000000, | 45 | 0x00000000, |
43 | /* 0x0080: nve4_gpc_mmio_head */ | 46 | /* 0x008c: nve4_gpc_mmio_head */ |
44 | 0x00000380, | 47 | 0x00000380, |
45 | 0x04000400, | 48 | 0x04000400, |
46 | 0x0800040c, | 49 | 0x0800040c, |
@@ -74,8 +77,8 @@ uint32_t nve0_grgpc_data[] = { | |||
74 | 0x14003100, | 77 | 0x14003100, |
75 | 0x000031d0, | 78 | 0x000031d0, |
76 | 0x040031e0, | 79 | 0x040031e0, |
77 | /* 0x0104: nve4_gpc_mmio_tail */ | 80 | /* 0x0110: nve4_gpc_mmio_tail */ |
78 | /* 0x0104: nve4_tpc_mmio_head */ | 81 | /* 0x0110: nve4_tpc_mmio_head */ |
79 | 0x00000048, | 82 | 0x00000048, |
80 | 0x00000064, | 83 | 0x00000064, |
81 | 0x00000088, | 84 | 0x00000088, |
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc index 138eeaa28665..7fe9d7cf486b 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc +++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc | |||
@@ -44,6 +44,9 @@ chipsets: | |||
44 | .b8 0xe7 0 0 0 | 44 | .b8 0xe7 0 0 0 |
45 | .b16 #nve4_hub_mmio_head | 45 | .b16 #nve4_hub_mmio_head |
46 | .b16 #nve4_hub_mmio_tail | 46 | .b16 #nve4_hub_mmio_tail |
47 | .b8 0xe6 0 0 0 | ||
48 | .b16 #nve4_hub_mmio_head | ||
49 | .b16 #nve4_hub_mmio_tail | ||
47 | .b8 0 0 0 0 | 50 | .b8 0 0 0 0 |
48 | 51 | ||
49 | nve4_hub_mmio_head: | 52 | nve4_hub_mmio_head: |
@@ -680,6 +683,16 @@ ctx_mmio_exec: | |||
680 | // on load it means: "a save preceeded this load" | 683 | // on load it means: "a save preceeded this load" |
681 | // | 684 | // |
682 | ctx_xfer: | 685 | ctx_xfer: |
686 | // according to mwk, some kind of wait for idle | ||
687 | mov $r15 0xc00 | ||
688 | shl b32 $r15 6 | ||
689 | mov $r14 4 | ||
690 | iowr I[$r15 + 0x200] $r14 | ||
691 | ctx_xfer_idle: | ||
692 | iord $r14 I[$r15 + 0x000] | ||
693 | and $r14 0x2000 | ||
694 | bra ne #ctx_xfer_idle | ||
695 | |||
683 | bra not $p1 #ctx_xfer_pre | 696 | bra not $p1 #ctx_xfer_pre |
684 | bra $p2 #ctx_xfer_pre_load | 697 | bra $p2 #ctx_xfer_pre_load |
685 | ctx_xfer_pre: | 698 | ctx_xfer_pre: |
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h index decf0c60ca3b..e3421af68ab9 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h +++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h | |||
@@ -30,11 +30,13 @@ uint32_t nve0_grhub_data[] = { | |||
30 | 0x00000000, | 30 | 0x00000000, |
31 | /* 0x005c: chipsets */ | 31 | /* 0x005c: chipsets */ |
32 | 0x000000e4, | 32 | 0x000000e4, |
33 | 0x013c0070, | 33 | 0x01440078, |
34 | 0x000000e7, | 34 | 0x000000e7, |
35 | 0x013c0070, | 35 | 0x01440078, |
36 | 0x000000e6, | ||
37 | 0x01440078, | ||
36 | 0x00000000, | 38 | 0x00000000, |
37 | /* 0x0070: nve4_hub_mmio_head */ | 39 | /* 0x0078: nve4_hub_mmio_head */ |
38 | 0x0417e91c, | 40 | 0x0417e91c, |
39 | 0x04400204, | 41 | 0x04400204, |
40 | 0x18404010, | 42 | 0x18404010, |
@@ -86,9 +88,7 @@ uint32_t nve0_grhub_data[] = { | |||
86 | 0x00408840, | 88 | 0x00408840, |
87 | 0x08408900, | 89 | 0x08408900, |
88 | 0x00408980, | 90 | 0x00408980, |
89 | /* 0x013c: nve4_hub_mmio_tail */ | 91 | /* 0x0144: nve4_hub_mmio_tail */ |
90 | 0x00000000, | ||
91 | 0x00000000, | ||
92 | 0x00000000, | 92 | 0x00000000, |
93 | 0x00000000, | 93 | 0x00000000, |
94 | 0x00000000, | 94 | 0x00000000, |
@@ -781,77 +781,78 @@ uint32_t nve0_grhub_code[] = { | |||
781 | 0x0613f002, | 781 | 0x0613f002, |
782 | 0xf80601fa, | 782 | 0xf80601fa, |
783 | /* 0x07fb: ctx_xfer */ | 783 | /* 0x07fb: ctx_xfer */ |
784 | 0xf400f803, | 784 | 0xf100f803, |
785 | 0x02f40611, | 785 | 0xb60c00f7, |
786 | /* 0x0801: ctx_xfer_pre */ | 786 | 0xe7f006f4, |
787 | 0x10f7f00d, | 787 | 0x80fed004, |
788 | 0x067221f5, | 788 | /* 0x0808: ctx_xfer_idle */ |
789 | /* 0x080b: ctx_xfer_pre_load */ | 789 | 0xf100fecf, |
790 | 0xf01c11f4, | 790 | 0xf42000e4, |
791 | 0x21f502f7, | 791 | 0x11f4f91b, |
792 | 0x21f50631, | 792 | 0x0d02f406, |
793 | 0x21f50640, | 793 | /* 0x0818: ctx_xfer_pre */ |
794 | 0xf4bd0652, | 794 | 0xf510f7f0, |
795 | 0x063121f5, | 795 | 0xf4067221, |
796 | 0x069221f5, | 796 | /* 0x0822: ctx_xfer_pre_load */ |
797 | /* 0x0824: ctx_xfer_exec */ | 797 | 0xf7f01c11, |
798 | 0xf1160198, | 798 | 0x3121f502, |
799 | 0xb6041427, | 799 | 0x4021f506, |
800 | 0x20d00624, | 800 | 0x5221f506, |
801 | 0x00e7f100, | 801 | 0xf5f4bd06, |
802 | 0x41e3f0a5, | 802 | 0xf5063121, |
803 | 0xf4021fb9, | 803 | /* 0x083b: ctx_xfer_exec */ |
804 | 0xe0b68d21, | 804 | 0x98069221, |
805 | 0x01fcf004, | 805 | 0x27f11601, |
806 | 0xb6022cf0, | 806 | 0x24b60414, |
807 | 0xf2fd0124, | 807 | 0x0020d006, |
808 | 0x8d21f405, | 808 | 0xa500e7f1, |
809 | 0x4afc17f1, | 809 | 0xb941e3f0, |
810 | 0xf00213f0, | 810 | 0x21f4021f, |
811 | 0x12d00c27, | 811 | 0x04e0b68d, |
812 | 0x0721f500, | 812 | 0xf001fcf0, |
813 | 0xfc27f102, | 813 | 0x24b6022c, |
814 | 0x0223f047, | 814 | 0x05f2fd01, |
815 | 0xf00020d0, | 815 | 0xf18d21f4, |
816 | 0x20b6012c, | 816 | 0xf04afc17, |
817 | 0x0012d003, | 817 | 0x27f00213, |
818 | 0xf001acf0, | 818 | 0x0012d00c, |
819 | 0xb7f006a5, | 819 | 0x020721f5, |
820 | 0x140c9800, | 820 | 0x47fc27f1, |
821 | 0xf0150d98, | 821 | 0xd00223f0, |
822 | 0x21f500e7, | 822 | 0x2cf00020, |
823 | 0xa7f0015c, | 823 | 0x0320b601, |
824 | 0x0321f508, | 824 | 0xf00012d0, |
825 | 0x0721f501, | 825 | 0xa5f001ac, |
826 | 0x2201f402, | 826 | 0x00b7f006, |
827 | 0xf40ca7f0, | 827 | 0x98140c98, |
828 | 0x17f1c921, | 828 | 0xe7f0150d, |
829 | 0x14b60a10, | 829 | 0x5c21f500, |
830 | 0x0527f006, | 830 | 0x08a7f001, |
831 | /* 0x08ab: ctx_xfer_post_save_wait */ | 831 | 0x010321f5, |
832 | 0xcf0012d0, | 832 | 0x020721f5, |
833 | 0x22fd0012, | 833 | 0xf02201f4, |
834 | 0xfa1bf405, | 834 | 0x21f40ca7, |
835 | /* 0x08b7: ctx_xfer_post */ | 835 | 0x1017f1c9, |
836 | 0xf02e02f4, | 836 | 0x0614b60a, |
837 | 0x21f502f7, | 837 | 0xd00527f0, |
838 | 0xf4bd0631, | 838 | /* 0x08c2: ctx_xfer_post_save_wait */ |
839 | 0x067221f5, | 839 | 0x12cf0012, |
840 | 0x022621f5, | 840 | 0x0522fd00, |
841 | 0x064021f5, | 841 | 0xf4fa1bf4, |
842 | 0x21f5f4bd, | 842 | /* 0x08ce: ctx_xfer_post */ |
843 | 0x11f40631, | 843 | 0xf7f02e02, |
844 | 0x80019810, | 844 | 0x3121f502, |
845 | 0xf40511fd, | 845 | 0xf5f4bd06, |
846 | 0x21f5070b, | 846 | 0xf5067221, |
847 | /* 0x08e2: ctx_xfer_no_post_mmio */ | 847 | 0xf5022621, |
848 | /* 0x08e2: ctx_xfer_done */ | 848 | 0xbd064021, |
849 | 0x00f807b1, | 849 | 0x3121f5f4, |
850 | 0x00000000, | 850 | 0x1011f406, |
851 | 0x00000000, | 851 | 0xfd800198, |
852 | 0x00000000, | 852 | 0x0bf40511, |
853 | 0x00000000, | 853 | 0xb121f507, |
854 | 0x00000000, | 854 | /* 0x08f9: ctx_xfer_no_post_mmio */ |
855 | 0x00000000, | 855 | /* 0x08f9: ctx_xfer_done */ |
856 | 0x0000f807, | ||
856 | 0x00000000, | 857 | 0x00000000, |
857 | }; | 858 | }; |
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nve0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nve0.c index 261cfce2728c..9f82e9702b46 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nve0.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nve0.c | |||
@@ -203,7 +203,7 @@ nve0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
203 | struct nvc0_graph_priv *priv; | 203 | struct nvc0_graph_priv *priv; |
204 | int ret, i; | 204 | int ret, i; |
205 | 205 | ||
206 | ret = nouveau_graph_create(parent, engine, oclass, false, &priv); | 206 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); |
207 | *pobject = nv_object(priv); | 207 | *pobject = nv_object(priv); |
208 | if (ret) | 208 | if (ret) |
209 | return ret; | 209 | return ret; |