changeset 24568:83c2e53e6e4d

add some commented register dumping code
author faust3
date Thu, 20 Sep 2007 17:55:25 +0000
parents 02249da619ce
children bc5dfd30626d
files vidix/nvidia_vid.c
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/nvidia_vid.c	Thu Sep 20 09:04:40 2007 +0000
+++ b/vidix/nvidia_vid.c	Thu Sep 20 17:55:25 2007 +0000
@@ -1128,3 +1128,32 @@
   .set_eq = nv_set_eq,
   .set_gkey = nv_set_gkeys,
 };
+
+
+#if 0
+//gcc -o nvidia_vid nvidia_vid.c -I ../ -lm ../vidix/libvidix.a
+
+int main(int argc,char* argv[]){
+  if(nv_probe(0,0)){
+        printf("no supported chip found\n");
+        return 1;
+  }
+  if(nv_init()){
+	printf("could not init\n");
+	return 1;
+  }
+  if(info->chip.arch >= NV_ARCH_10){
+    printf("NV_PVIDEO_BASE (0x900) 0x%x\n",VID_RD32(info->chip.PVIDEO, 0x900));
+    printf("NV_PVIDEO_LIMIT (0x908) 0x%x\n",VID_RD32(info->chip.PVIDEO, 0x908));
+    printf("NV_PVIDEO_OFFSET (0x920) 0x%x\n",VID_RD32(info->chip.PVIDEO, 0x920));
+    printf("NV_PVIDEO_FORMAT (0x958) 0x%x\n",VID_RD32(info->chip.PVIDEO, 0x958));
+    printf("NV_PVIDEO_STOP (0x704) 0x%x\n",VID_RD32(info->chip.PVIDEO, 0x704));
+    printf("NV_PVIDEO_BUFFER (0x700) 0x%x\n",VID_RD32(info->chip.PVIDEO, 0x700));
+  }
+
+  nv_destroy();
+  return 0;
+}
+
+#endif
+