pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/radeontool



Module Name:    pkgsrc
Committed By:   tnn
Date:           Mon Aug 22 17:23:36 UTC 2022

Modified Files:
        pkgsrc/sysutils/radeontool: distinfo
        pkgsrc/sysutils/radeontool/patches: patch-aa

Log Message:
radeontool: use sysconf(3) instead of non-portable PAGE_SIZE macro


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/sysutils/radeontool/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/radeontool/patches/patch-aa

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/radeontool/distinfo
diff -u pkgsrc/sysutils/radeontool/distinfo:1.9 pkgsrc/sysutils/radeontool/distinfo:1.10
--- pkgsrc/sysutils/radeontool/distinfo:1.9     Tue Oct 26 11:20:06 2021
+++ pkgsrc/sysutils/radeontool/distinfo Mon Aug 22 17:23:36 2022
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.9 2021/10/26 11:20:06 nia Exp $
+$NetBSD: distinfo,v 1.10 2022/08/22 17:23:36 tnn Exp $
 
 BLAKE2s (radeontool-1.5.tar.gz) = c70fac965e396cedaabc4313f1b572dd0881b5099cd9b4f70dd7c5ca0df78145
 SHA512 (radeontool-1.5.tar.gz) = 985771cbaff3d6451563ac388b6b303410b7e1088c9a7404de63964c465f3708f9fede40fde7dfeaeb3779dff86a9007fcf982cced23cdc2f6bdd555494f78aa
 Size (radeontool-1.5.tar.gz) = 20869 bytes
-SHA1 (patch-aa) = b2b765131bfcb22eb0e5082d529fb0f01644a9a3
+SHA1 (patch-aa) = 827c065b171910640435bf722002c3b1034ec8da

Index: pkgsrc/sysutils/radeontool/patches/patch-aa
diff -u pkgsrc/sysutils/radeontool/patches/patch-aa:1.4 pkgsrc/sysutils/radeontool/patches/patch-aa:1.5
--- pkgsrc/sysutils/radeontool/patches/patch-aa:1.4     Tue Dec 30 20:25:54 2008
+++ pkgsrc/sysutils/radeontool/patches/patch-aa Mon Aug 22 17:23:36 2022
@@ -1,27 +1,36 @@
-$NetBSD: patch-aa,v 1.4 2008/12/30 20:25:54 hasso Exp $
---- radeontool.c.orig  2004-02-11 05:50:27 +0200
-+++ radeontool.c       2008-12-30 21:47:53 +0200
-@@ -21,7 +21,19 @@
+$NetBSD: patch-aa,v 1.5 2022/08/22 17:23:36 tnn Exp $
+--- radeontool.c.orig  2004-02-11 03:50:27.000000000 +0000
++++ radeontool.c
+@@ -21,12 +21,12 @@
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <sys/mman.h>
-+#ifdef __NetBSD__
-+#include <sys/param.h>
-+#if __NetBSD_Prereq__(4,99,32)
-+#include <sys/mutex.h>
-+#else
-+#include <sys/lock.h>
-+#endif
-+#include <machine/vmparam.h>
-+#elif defined(__DragonFly__)
-+#include <sys/param.h>
-+#else /* ! __NetBSD__ */
- #include <asm/page.h>
-+#endif
+-#include <asm/page.h>
  
  #include "radeon_reg.h"
  
-@@ -107,7 +119,7 @@ static unsigned char * map_devince_memor
+ int debug;
+ int skip;
++long page_size;
+ 
+ /* *radeon_cntl_mem is mapped to the actual device's memory mapped control area. */
+ /* Not the address but what it points to is volatile. */
+@@ -94,11 +94,11 @@ static unsigned char * map_devince_memor
+     }
+ 
+     /* mmap graphics memory */
+-    if ((device_mem = malloc(length + (PAGE_SIZE-1))) == NULL) {
++    if ((device_mem = malloc(length + (page_size-1))) == NULL) {
+         fatal("allocation error \n");
+     }
+-    if ((unsigned long)device_mem % PAGE_SIZE)
+-        device_mem += PAGE_SIZE - ((unsigned long)device_mem % PAGE_SIZE);
++    if ((unsigned long)device_mem % page_size)
++        device_mem += page_size - ((unsigned long)device_mem % page_size);
+     device_mem = (unsigned char *)mmap(
+         (caddr_t)device_mem, 
+         length,
+@@ -107,7 +107,7 @@ static unsigned char * map_devince_memor
          mem_fd, 
          base
      );
@@ -30,7 +39,7 @@ $NetBSD: patch-aa,v 1.4 2008/12/30 20:25
          if(debug)
              fprintf(stderr,"mmap returned %d\n",(int)device_mem);
          fatal("mmap error \n");
-@@ -251,7 +263,6 @@ static void map_radeon_cntl_mem(void)
+@@ -251,7 +251,6 @@ static void map_radeon_cntl_mem(void)
      } else if(forkrc == 0) { /* if child */
          close(pipefd[0]);
          dup2(pipefd[1],1);  /* stdout */
@@ -38,7 +47,7 @@ $NetBSD: patch-aa,v 1.4 2008/12/30 20:25
          execlp("lspci","lspci","-v",NULL);
          fatal("exec lspci failure\n");
      }
-@@ -307,7 +318,13 @@ We need to look through it to find the s
+@@ -307,7 +306,13 @@ We need to look through it to find the s
         }
         if(debug) 
            printf("%s",line);
@@ -53,3 +62,14 @@ $NetBSD: patch-aa,v 1.4 2008/12/30 20:25
            break;
         }
      };
+@@ -321,6 +326,10 @@ We need to look through it to find the s
+ 
+ int main(int argc,char *argv[]) 
+ {
++    if ((page_size = sysconf(_SC_PAGESIZE)) == -1) {
++        fatal("sysconf failed\n");
++    }
++    
+     if(argc == 1) {
+         map_radeon_cntl_mem();
+       usage();



Home | Main Index | Thread Index | Old Index