Import of XFree86 3.9.17
parent
0371c290a1
commit
1c33c69095
|
@ -9,6 +9,7 @@
|
|||
# Note 2! The CFLAGS definitions are now inherited from the
|
||||
# parent makes..
|
||||
#
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.2 1999/09/27 14:59:24 dawes Exp $
|
||||
|
||||
L_TARGET := libdrm.a
|
||||
|
||||
|
@ -21,14 +22,7 @@ ifdef CONFIG_DRM_GAMMA
|
|||
M_OBJS += gamma.o
|
||||
endif
|
||||
|
||||
ifdef CONFIG_DRM_TDFX
|
||||
M_OBJS += tdfx.o
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/Rules.make
|
||||
|
||||
gamma.o: gamma_drv.o gamma_dma.o $(L_TARGET)
|
||||
$(LD) $(LD_RFLAG) -r -o $@ gamma_drv.o gamma_dma.o -L. -ldrm
|
||||
|
||||
tdfx.o: tdfx_drv.o tdfx_context.o $(L_TARGET)
|
||||
$(LD) $(LD_RFLAG) -r -o $@ tdfx_drv.o tdfx_context.o -L. -ldrm
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h,v 1.58 1999/08/30 13:05:00 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h,v 1.1 1999/09/25 14:37:59 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h,v 1.2 1999/12/14 01:33:56 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI$
|
||||
* $XFree86$
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.c,v 1.1 1999/12/14 01:49:22 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
# Note 2! The CFLAGS definitions are now inherited from the
|
||||
# parent makes..
|
||||
#
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.2 1999/09/27 14:59:24 dawes Exp $
|
||||
|
||||
L_TARGET := libdrm.a
|
||||
|
||||
|
@ -21,14 +22,7 @@ ifdef CONFIG_DRM_GAMMA
|
|||
M_OBJS += gamma.o
|
||||
endif
|
||||
|
||||
ifdef CONFIG_DRM_TDFX
|
||||
M_OBJS += tdfx.o
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/Rules.make
|
||||
|
||||
gamma.o: gamma_drv.o gamma_dma.o $(L_TARGET)
|
||||
$(LD) $(LD_RFLAG) -r -o $@ gamma_drv.o gamma_dma.o -L. -ldrm
|
||||
|
||||
tdfx.o: tdfx_drv.o tdfx_context.o $(L_TARGET)
|
||||
$(LD) $(LD_RFLAG) -r -o $@ tdfx_drv.o tdfx_context.o -L. -ldrm
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
# DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/generic/Makefile.linux,v 1.23 1999/07/02 17:46:30 faith Exp $
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/generic/Makefile.linux,v 1.3 1999/06/27 14:08:21 dawes Exp $
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux,v 1.2 1999/12/14 01:33:55 robin Exp $
|
||||
#
|
||||
|
||||
.SUFFIXES:
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/bufs.c,v 1.8 1999/08/30 13:05:00 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/bufs.c,v 1.1 1999/09/25 14:37:57 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/bufs.c,v 1.2 1999/12/14 01:33:55 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/dma.c,v 1.7 1999/09/16 16:56:18 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/dma.c,v 1.1 1999/09/25 14:37:58 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/dma.c,v 1.2 1999/12/14 01:33:55 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.46 1999/08/20 20:00:53 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.1 1999/09/25 14:37:58 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.2 1999/12/14 01:33:56 robin Exp $
|
||||
*
|
||||
* Acknowledgements:
|
||||
* Dec 1999, Richard Henderson <rth@twiddle.net>, move to generic cmpxchg.
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h,v 1.58 1999/08/30 13:05:00 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h,v 1.1 1999/09/25 14:37:59 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h,v 1.2 1999/12/14 01:33:56 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/fops.c,v 1.3 1999/08/20 15:36:45 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/fops.c,v 1.1 1999/09/25 14:37:59 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/fops.c,v 1.2 1999/12/14 01:33:56 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c,v 1.17 1999/08/30 13:05:00 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c,v 1.1 1999/09/25 14:38:00 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c,v 1.2 1999/12/14 01:33:57 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lists.c,v 1.3 1999/08/20 15:07:02 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lists.c,v 1.1 1999/09/25 14:38:01 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lists.c,v 1.2 1999/12/14 01:33:57 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lock.c,v 1.5 1999/08/30 13:05:00 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lock.c,v 1.1 1999/09/25 14:38:01 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lock.c,v 1.2 1999/12/14 01:33:57 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/memory.c,v 1.4 1999/08/20 20:00:53 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/memory.c,v 1.1 1999/09/25 14:38:02 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/memory.c,v 1.2 1999/12/14 01:33:57 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
18
linux/proc.c
18
linux/proc.c
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/proc.c,v 1.4 1999/08/20 15:36:46 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/proc.c,v 1.1 1999/09/25 14:38:02 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/proc.c,v 1.2 1999/12/14 01:33:58 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -79,26 +79,26 @@ int drm_proc_init(drm_device_t *dev)
|
|||
struct proc_dir_entry *ent;
|
||||
int i, j;
|
||||
|
||||
drm_root = create_proc_entry("dri", S_IFDIR, NULL);
|
||||
drm_root = create_proc_entry("graphics", S_IFDIR, NULL);
|
||||
if (!drm_root) {
|
||||
DRM_ERROR("Cannot create /proc/dri\n");
|
||||
DRM_ERROR("Cannot create /proc/graphics\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Instead of doing this search, we should
|
||||
add some global support for /proc/dri. */
|
||||
add some global support for /proc/graphics. */
|
||||
for (i = 0; i < 8; i++) {
|
||||
sprintf(drm_slot_name, "dri/%d", i);
|
||||
sprintf(drm_slot_name, "graphics/%d", i);
|
||||
drm_dev_root = create_proc_entry(drm_slot_name, S_IFDIR, NULL);
|
||||
if (!drm_dev_root) {
|
||||
DRM_ERROR("Cannot create /proc/%s\n", drm_slot_name);
|
||||
remove_proc_entry("dri", NULL);
|
||||
remove_proc_entry("graphics", NULL);
|
||||
}
|
||||
if (drm_dev_root->nlink == 2) break;
|
||||
drm_dev_root = NULL;
|
||||
}
|
||||
if (!drm_dev_root) {
|
||||
DRM_ERROR("Cannot find slot in /proc/dri\n");
|
||||
DRM_ERROR("Cannot find slot in /proc/graphics\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ int drm_proc_init(drm_device_t *dev)
|
|||
remove_proc_entry(drm_proc_list[i].name,
|
||||
drm_dev_root);
|
||||
remove_proc_entry(drm_slot_name, NULL);
|
||||
remove_proc_entry("dri", NULL);
|
||||
remove_proc_entry("graphics", NULL);
|
||||
return -1;
|
||||
}
|
||||
ent->read_proc = drm_proc_list[i].f;
|
||||
|
@ -135,7 +135,7 @@ int drm_proc_cleanup(void)
|
|||
}
|
||||
remove_proc_entry(drm_slot_name, NULL);
|
||||
}
|
||||
remove_proc_entry("dri", NULL);
|
||||
remove_proc_entry("graphics", NULL);
|
||||
remove_proc_entry(DRM_NAME, NULL);
|
||||
}
|
||||
drm_root = drm_dev_root = NULL;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI$
|
||||
* $XFree86$
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_context.c,v 1.1 1999/12/14 01:49:21 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI$
|
||||
* $XFree86$
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.c,v 1.1 1999/12/14 01:49:22 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI$
|
||||
* $XFree86$
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.h,v 1.1 1999/12/14 01:49:22 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c,v 1.7 1999/08/21 02:48:34 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c,v 1.1 1999/09/25 14:38:02 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c,v 1.2 1999/12/14 01:33:58 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.46 1999/08/20 20:00:53 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.1 1999/09/25 14:37:58 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.2 1999/12/14 01:33:56 robin Exp $
|
||||
*
|
||||
* Acknowledgements:
|
||||
* Dec 1999, Richard Henderson <rth@twiddle.net>, move to generic cmpxchg.
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.46 1999/08/20 20:00:53 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.1 1999/09/25 14:37:58 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.2 1999/12/14 01:33:56 robin Exp $
|
||||
*
|
||||
* Acknowledgements:
|
||||
* Dec 1999, Richard Henderson <rth@twiddle.net>, move to generic cmpxchg.
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $PI: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmstat.c,v 1.28 1999/08/04 18:12:11 faith Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmstat.c,v 1.1 1999/09/25 14:37:59 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmstat.c,v 1.2 1999/12/14 01:33:56 robin Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -218,8 +218,8 @@ int main(int argc, char **argv)
|
|||
info->list[i].low_mark,
|
||||
info->list[i].high_mark);
|
||||
}
|
||||
printf("===== /proc/dri/0/mem =====\n");
|
||||
sprintf(buf, "cat /proc/dri/0/mem");
|
||||
printf("===== /proc/graphics/0/mem =====\n");
|
||||
sprintf(buf, "cat /proc/graphics/0/mem");
|
||||
system(buf);
|
||||
#if 1
|
||||
if (!(bufs = drmMapBufs(fd))) {
|
||||
|
@ -234,8 +234,8 @@ int main(int argc, char **argv)
|
|||
bufs->list[i].total,
|
||||
bufs->list[i].address);
|
||||
}
|
||||
printf("===== /proc/dri/0/vma =====\n");
|
||||
sprintf(buf, "cat /proc/dri/0/vma");
|
||||
printf("===== /proc/graphics/0/vma =====\n");
|
||||
sprintf(buf, "cat /proc/graphics/0/vma");
|
||||
system(buf);
|
||||
#endif
|
||||
break;
|
||||
|
@ -249,8 +249,8 @@ int main(int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
printf("0x%08lx:0x%04lx added\n", offset, size);
|
||||
printf("===== /proc/dri/0/mem =====\n");
|
||||
sprintf(buf, "cat /proc/dri/0/mem");
|
||||
printf("===== /proc/graphics/0/mem =====\n");
|
||||
sprintf(buf, "cat /proc/graphics/0/mem");
|
||||
system(buf);
|
||||
break;
|
||||
case 'r':
|
||||
|
@ -266,8 +266,8 @@ int main(int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
printf("0x%08lx:0x%04lx added\n", offset, size);
|
||||
printf("===== /proc/dri/0/mem =====\n");
|
||||
sprintf(buf, "cat /proc/dri/0/mem");
|
||||
printf("===== /proc/graphics/0/mem =====\n");
|
||||
sprintf(buf, "cat /proc/graphics/0/mem");
|
||||
system(buf);
|
||||
break;
|
||||
case 's':
|
||||
|
@ -280,7 +280,7 @@ int main(int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
printf("0x%04lx byte shm added at 0x%08lx\n", size, handle);
|
||||
sprintf(buf, "cat /proc/dri/0/vm");
|
||||
sprintf(buf, "cat /proc/graphics/0/vm");
|
||||
system(buf);
|
||||
break;
|
||||
case 'P':
|
||||
|
@ -293,12 +293,12 @@ int main(int argc, char **argv)
|
|||
}
|
||||
printf("0x%08lx:0x%04lx mapped at %p for pid %d\n",
|
||||
offset, size, address, getpid());
|
||||
printf("===== /proc/dri/0/vma =====\n");
|
||||
sprintf(buf, "cat /proc/dri/0/vma");
|
||||
printf("===== /proc/graphics/0/vma =====\n");
|
||||
sprintf(buf, "cat /proc/graphics/0/vma");
|
||||
system(buf);
|
||||
mprotect((void *)offset, size, PROT_READ);
|
||||
printf("===== /proc/dri/0/vma =====\n");
|
||||
sprintf(buf, "cat /proc/dri/0/vma");
|
||||
printf("===== /proc/graphics/0/vma =====\n");
|
||||
sprintf(buf, "cat /proc/graphics/0/vma");
|
||||
system(buf);
|
||||
break;
|
||||
case 'w':
|
||||
|
@ -316,10 +316,10 @@ int main(int argc, char **argv)
|
|||
sprintf(buf, "cat /proc/%d/maps", getpid());
|
||||
system(buf);
|
||||
printf("===== /proc/grphics/0/mem =====\n");
|
||||
sprintf(buf, "cat /proc/dri/0/mem");
|
||||
sprintf(buf, "cat /proc/graphics/0/mem");
|
||||
system(buf);
|
||||
printf("===== /proc/dri/0/vma =====\n");
|
||||
sprintf(buf, "cat /proc/dri/0/vma");
|
||||
printf("===== /proc/graphics/0/vma =====\n");
|
||||
sprintf(buf, "cat /proc/graphics/0/vma");
|
||||
system(buf);
|
||||
printf("===== READING =====\n");
|
||||
for (i = 0; i < 0x10; i++)
|
||||
|
@ -336,8 +336,8 @@ int main(int argc, char **argv)
|
|||
for (i = 0; i < 0x10; i++)
|
||||
printf("%02x ", (unsigned int)((unsigned char *)address)[i]);
|
||||
printf("\n");
|
||||
printf("===== /proc/dri/0/vma =====\n");
|
||||
sprintf(buf, "cat /proc/dri/0/vma");
|
||||
printf("===== /proc/graphics/0/vma =====\n");
|
||||
sprintf(buf, "cat /proc/graphics/0/vma");
|
||||
system(buf);
|
||||
break;
|
||||
case 'L':
|
||||
|
|
Loading…
Reference in New Issue