···6677Originally ported to FreeBSD by "emmex" of the FreeBSD forums.
8899-Build:
99+FreeBSD Build:
1010 pkg install libpciaccess libdrm
1111+ make
1212+ make install
1313+1414+OpenBSD Build:
1115 make
1216 make install
1317···40444145Usage:
4246 ./isl_backlight.sh &
4747+4848+4949+OpenBSD Notes:
5050+Requires a kernel capable of concurrent opening of /dev/xf86, if this is to be
5151+run while X is running. The following patch implements machdep.allowaperture=3
5252+to support this.
5353+5454+Index: arch/amd64/amd64/mem.c
5555+===================================================================
5656+RCS file: /cvs/src/sys/arch/amd64/amd64/mem.c,v
5757+retrieving revision 1.23
5858+diff -u -p -u -p -r1.23 mem.c
5959+--- arch/amd64/amd64/mem.c 14 Mar 2015 03:38:46 -0000 1.23
6060++++ arch/amd64/amd64/mem.c 26 May 2015 02:52:31 -0000
6161+@@ -93,8 +93,9 @@ mmopen(dev_t dev, int flag, int mode, st
6262+ if (suser(p, 0) != 0 || !allowaperture)
6363+ return (EPERM);
6464+6565+- /* authorize only one simultaneous open() */
6666+- if (ap_open_count > 0)
6767++ /* authorize only one simultaneous open() unless
6868++ * allowaperture=3 */
6969++ if (ap_open_count > 0 && allowaperture < 3)
7070+ return(EPERM);
7171+ ap_open_count++;
7272+ break;
7373+@@ -213,6 +214,7 @@ mmmmap(dev_t dev, off_t off, int prot)
7474+ else
7575+ return -1;
7676+ case 2:
7777++ case 3:
7878+ /* Allow mapping of the whole 1st megabyte
7979+ for x86emu */
8080+ if (off <= BIOS_END || !amd64_pa_used(off))