diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-12-19 21:50:52 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-12-23 07:59:31 -0500 |
commit | 902530693ef38f3bb007efae594e54443d84fa56 (patch) | |
tree | c81959c7b5e088589c97f3b6ec7fd066cf0ab140 | |
parent | 5ddf4d4a543dd3303b20d7e9a4b3549589c5f095 (diff) |
drm/nvc0/graph: fix fuc, and enable acceleration on GF119
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
3 files changed, 85 insertions, 83 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc index acfc457654bd..0bcfa4d447e5 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc +++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc | |||
@@ -754,6 +754,16 @@ ctx_mmio_exec: | |||
754 | // on load it means: "a save preceeded this load" | 754 | // on load it means: "a save preceeded this load" |
755 | // | 755 | // |
756 | ctx_xfer: | 756 | ctx_xfer: |
757 | // according to mwk, some kind of wait for idle | ||
758 | mov $r15 0xc00 | ||
759 | shl b32 $r15 6 | ||
760 | mov $r14 4 | ||
761 | iowr I[$r15 + 0x200] $r14 | ||
762 | ctx_xfer_idle: | ||
763 | iord $r14 I[$r15 + 0x000] | ||
764 | and $r14 0x2000 | ||
765 | bra ne #ctx_xfer_idle | ||
766 | |||
757 | bra not $p1 #ctx_xfer_pre | 767 | bra not $p1 #ctx_xfer_pre |
758 | bra $p2 #ctx_xfer_pre_load | 768 | bra $p2 #ctx_xfer_pre_load |
759 | ctx_xfer_pre: | 769 | ctx_xfer_pre: |
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h index 85a8d556f484..bb03d2a1d57b 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h +++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h | |||
@@ -799,79 +799,80 @@ uint32_t nvc0_grhub_code[] = { | |||
799 | 0x01fa0613, | 799 | 0x01fa0613, |
800 | 0xf803f806, | 800 | 0xf803f806, |
801 | /* 0x0829: ctx_xfer */ | 801 | /* 0x0829: ctx_xfer */ |
802 | 0x0611f400, | 802 | 0x00f7f100, |
803 | /* 0x082f: ctx_xfer_pre */ | 803 | 0x06f4b60c, |
804 | 0xf01102f4, | 804 | 0xd004e7f0, |
805 | 0x21f510f7, | 805 | /* 0x0836: ctx_xfer_idle */ |
806 | 0x21f50698, | 806 | 0xfecf80fe, |
807 | 0x11f40631, | 807 | 0x00e4f100, |
808 | /* 0x083d: ctx_xfer_pre_load */ | 808 | 0xf91bf420, |
809 | 0x02f7f01c, | 809 | 0xf40611f4, |
810 | 0x065721f5, | 810 | /* 0x0846: ctx_xfer_pre */ |
811 | 0x066621f5, | 811 | 0xf7f01102, |
812 | 0x067821f5, | 812 | 0x9821f510, |
813 | 0x21f5f4bd, | 813 | 0x3121f506, |
814 | 0x21f50657, | 814 | 0x1c11f406, |
815 | /* 0x0856: ctx_xfer_exec */ | 815 | /* 0x0854: ctx_xfer_pre_load */ |
816 | 0x019806b8, | 816 | 0xf502f7f0, |
817 | 0x1427f116, | 817 | 0xf5065721, |
818 | 0x0624b604, | 818 | 0xf5066621, |
819 | 0xf10020d0, | 819 | 0xbd067821, |
820 | 0xf0a500e7, | 820 | 0x5721f5f4, |
821 | 0x1fb941e3, | 821 | 0xb821f506, |
822 | 0x8d21f402, | 822 | /* 0x086d: ctx_xfer_exec */ |
823 | 0xf004e0b6, | 823 | 0x16019806, |
824 | 0x2cf001fc, | 824 | 0x041427f1, |
825 | 0x0124b602, | 825 | 0xd00624b6, |
826 | 0xf405f2fd, | 826 | 0xe7f10020, |
827 | 0x17f18d21, | 827 | 0xe3f0a500, |
828 | 0x13f04afc, | 828 | 0x021fb941, |
829 | 0x0c27f002, | 829 | 0xb68d21f4, |
830 | 0xf50012d0, | 830 | 0xfcf004e0, |
831 | 0xf1020721, | 831 | 0x022cf001, |
832 | 0xf047fc27, | 832 | 0xfd0124b6, |
833 | 0x20d00223, | 833 | 0x21f405f2, |
834 | 0x012cf000, | 834 | 0xfc17f18d, |
835 | 0xd00320b6, | 835 | 0x0213f04a, |
836 | 0xacf00012, | 836 | 0xd00c27f0, |
837 | 0x06a5f001, | 837 | 0x21f50012, |
838 | 0x9800b7f0, | 838 | 0x27f10207, |
839 | 0x0d98140c, | 839 | 0x23f047fc, |
840 | 0x00e7f015, | 840 | 0x0020d002, |
841 | 0x015c21f5, | 841 | 0xb6012cf0, |
842 | 0xf508a7f0, | 842 | 0x12d00320, |
843 | 0xf5010321, | 843 | 0x01acf000, |
844 | 0xf4020721, | 844 | 0xf006a5f0, |
845 | 0xa7f02201, | 845 | 0x0c9800b7, |
846 | 0xc921f40c, | 846 | 0x150d9814, |
847 | 0x0a1017f1, | 847 | 0xf500e7f0, |
848 | 0xf00614b6, | 848 | 0xf0015c21, |
849 | 0x12d00527, | 849 | 0x21f508a7, |
850 | /* 0x08dd: ctx_xfer_post_save_wait */ | 850 | 0x21f50103, |
851 | 0x0012cf00, | 851 | 0x01f40207, |
852 | 0xf40522fd, | 852 | 0x0ca7f022, |
853 | 0x02f4fa1b, | 853 | 0xf1c921f4, |
854 | /* 0x08e9: ctx_xfer_post */ | 854 | 0xb60a1017, |
855 | 0x02f7f032, | 855 | 0x27f00614, |
856 | 0x065721f5, | 856 | 0x0012d005, |
857 | 0x21f5f4bd, | 857 | /* 0x08f4: ctx_xfer_post_save_wait */ |
858 | 0x21f50698, | 858 | 0xfd0012cf, |
859 | 0x21f50226, | 859 | 0x1bf40522, |
860 | 0xf4bd0666, | 860 | 0x3202f4fa, |
861 | 0x065721f5, | 861 | /* 0x0900: ctx_xfer_post */ |
862 | 0x981011f4, | 862 | 0xf502f7f0, |
863 | 0x11fd8001, | 863 | 0xbd065721, |
864 | 0x070bf405, | 864 | 0x9821f5f4, |
865 | 0x07df21f5, | 865 | 0x2621f506, |
866 | /* 0x0914: ctx_xfer_no_post_mmio */ | 866 | 0x6621f502, |
867 | 0x064921f5, | 867 | 0xf5f4bd06, |
868 | /* 0x0918: ctx_xfer_done */ | 868 | 0xf4065721, |
869 | 0x000000f8, | 869 | 0x01981011, |
870 | 0x00000000, | 870 | 0x0511fd80, |
871 | 0x00000000, | 871 | 0xf5070bf4, |
872 | 0x00000000, | 872 | /* 0x092b: ctx_xfer_no_post_mmio */ |
873 | 0x00000000, | 873 | 0xf507df21, |
874 | 0x00000000, | 874 | /* 0x092f: ctx_xfer_done */ |
875 | 0xf8064921, | ||
875 | 0x00000000, | 876 | 0x00000000, |
876 | 0x00000000, | 877 | 0x00000000, |
877 | 0x00000000, | 878 | 0x00000000, |
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c index 47a02081d708..45aff5f5085a 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c | |||
@@ -516,18 +516,9 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
516 | { | 516 | { |
517 | struct nouveau_device *device = nv_device(parent); | 517 | struct nouveau_device *device = nv_device(parent); |
518 | struct nvc0_graph_priv *priv; | 518 | struct nvc0_graph_priv *priv; |
519 | bool enable = true; | ||
520 | int ret, i; | 519 | int ret, i; |
521 | 520 | ||
522 | switch (device->chipset) { | 521 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); |
523 | case 0xd9: /* known broken without binary driver firmware */ | ||
524 | enable = false; | ||
525 | break; | ||
526 | default: | ||
527 | break; | ||
528 | } | ||
529 | |||
530 | ret = nouveau_graph_create(parent, engine, oclass, enable, &priv); | ||
531 | *pobject = nv_object(priv); | 522 | *pobject = nv_object(priv); |
532 | if (ret) | 523 | if (ret) |
533 | return ret; | 524 | return ret; |