Sync with Linux 2.4.0-test4 kernel
parent
7b888f87fa
commit
aed8549e91
|
@ -9,9 +9,8 @@
|
||||||
# Note 2! The CFLAGS definitions are now inherited from the
|
# Note 2! The CFLAGS definitions are now inherited from the
|
||||||
# parent makes..
|
# parent makes..
|
||||||
#
|
#
|
||||||
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.6 2000/06/17 00:03:34 martin Exp $
|
|
||||||
|
|
||||||
L_TARGET := libdrm.a
|
O_TARGET := drm.o
|
||||||
|
|
||||||
L_OBJS := init.o memory.o proc.o auth.o context.o drawable.o bufs.o \
|
L_OBJS := init.o memory.o proc.o auth.o context.o drawable.o bufs.o \
|
||||||
lists.o lock.o ioctl.o fops.o vm.o dma.o ctxbitmap.o \
|
lists.o lock.o ioctl.o fops.o vm.o dma.o ctxbitmap.o \
|
||||||
|
@ -19,35 +18,92 @@ L_OBJS := init.o memory.o proc.o auth.o context.o drawable.o bufs.o \
|
||||||
|
|
||||||
M_OBJS :=
|
M_OBJS :=
|
||||||
|
|
||||||
ifdef CONFIG_DRM_GAMMA
|
ifeq ($(CONFIG_DRM_GAMMA),y)
|
||||||
M_OBJS += gamma.o
|
OX_OBJS += gamma_drv.o
|
||||||
|
O_OBJS += gamma_dma.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_GAMMA),m)
|
||||||
|
MIX_OBJS += gamma_drv.o
|
||||||
|
MI_OBJS += gamma_dma.o
|
||||||
|
M_OBJS += gamma.o
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DRM_TDFX
|
ifeq ($(CONFIG_DRM_TDFX),y)
|
||||||
M_OBJS += tdfx.o
|
OX_OBJS += tdfx_drv.o
|
||||||
|
O_OBJS += tdfx_context.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_TDFX),m)
|
||||||
|
MIX_OBJS += tdfx_drv.o
|
||||||
|
MI_OBJS += tdfx_context.o
|
||||||
|
M_OBJS += tdfx.o
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DRM_MGA
|
ifeq ($(CONFIG_DRM_MGA),y)
|
||||||
M_OBJS += mga.o
|
OX_OBJS += mga_drv.o
|
||||||
|
O_OBJS += mga_context.o mga_dma.o mga_bufs.o mga_state.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_MGA),m)
|
||||||
|
MIX_OBJS += mga_drv.o
|
||||||
|
MI_OBJS += mga_context.o mga_dma.o mga_bufs.o mga_state.o
|
||||||
|
M_OBJS += mga.o
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DRM_R128
|
ifeq ($(CONFIG_DRM_I810),y)
|
||||||
M_OBJS += r128.o
|
OX_OBJS += i810_drv.o
|
||||||
|
O_OBJS += i810_context.o i810_bufs.o i810_dma.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_I810),m)
|
||||||
|
MIX_OBJS += i810_drv.o
|
||||||
|
MI_OBJS += i810_context.o i810_bufs.o i810_dma.o
|
||||||
|
M_OBJS += i810.o
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DRM_R128),y)
|
||||||
|
OX_OBJS += r128_drv.o
|
||||||
|
O_OBJS += r128_context.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_I810),m)
|
||||||
|
MIX_OBJS += r128_drv.o
|
||||||
|
MI_OBJS += r128_context.o
|
||||||
|
M_OBJS += r128.o
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DRM_FFB),y)
|
||||||
|
OX_OBJS += ffb_drv.o
|
||||||
|
O_OBJS += ffb_context.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_FFB),m)
|
||||||
|
MIX_OBJC += ffb_drv.o
|
||||||
|
MI_OBJS += ffb_context.o
|
||||||
|
M_OBJS += ffb.o
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
O_OBJS += $(L_OBJS)
|
||||||
|
|
||||||
include $(TOPDIR)/Rules.make
|
include $(TOPDIR)/Rules.make
|
||||||
|
|
||||||
gamma.o: gamma_drv.o gamma_dma.o $(L_TARGET)
|
gamma.o : gamma_drv.o gamma_dma.o $(L_OBJS)
|
||||||
$(LD) $(LD_RFLAG) -r -o $@ gamma_drv.o gamma_dma.o -L. -ldrm
|
$(LD) $(LD_RFLAG) -r -o $@ gamma_drv.o gamma_dma.o $(L_OBJS)
|
||||||
|
|
||||||
tdfx.o: tdfx_drv.o tdfx_context.o $(L_TARGET)
|
tdfx.o: tdfx_drv.o tdfx_context.o $(L_OBJS)
|
||||||
$(LD) $(LD_RFLAG) -r -o $@ tdfx_drv.o tdfx_context.o -L. -ldrm
|
$(LD) $(LD_RFLAG) -r -o $@ tdfx_drv.o tdfx_context.o $(L_OBJS)
|
||||||
|
|
||||||
i810.o: i810_drv.o i810_context.o $(L_TARGET)
|
mga.o: mga_drv.o mga_context.o mga_dma.o mga_bufs.o mga_state.o $(L_OBJS)
|
||||||
$(LD) $(LD_RFLAG) -r -o $@ i810_drv.o i810_bufs.o i810_dma.o i810_context.o -L. -ldrm
|
$(LD) $(LD_RFLAG) -r -o $@ mga_drv.o mga_bufs.o mga_dma.o \
|
||||||
|
mga_context.o mga_state.o $(L_OBJS)
|
||||||
|
|
||||||
mga.o: mga_drv.o mga_context.o mga_dma.o mga_bufs.o $(L_TARGET)
|
i810.o: i810_drv.o i810_context.o i810_bufs.o i810_dma.o $(L_TARGET)
|
||||||
$(LD) $(LD_RFLAG) -r -o $@ mga_drv.o mga_bufs.o mga_dma.o mga_context.o mga_state.o -L. -ldrm
|
$(LD) $(LD_RFLAG) -r -o $@ i810_drv.o i810_bufs.o i810_dma.o \
|
||||||
|
i810_context.o $(L_OBJS)
|
||||||
|
|
||||||
r128.o: r128_drv.o r128_context.o $(L_TARGET)
|
r128.o: r128_drv.o r128_context.o $(L_TARGET)
|
||||||
$(LD) $(LD_RFLAG) -r -o $@ r128_drv.o r128_context.o -L. -ldrm
|
$(LD) $(LD_RFLAG) -r -o $@ r128_drv.o r128_context.o $(L_OBJS)
|
||||||
|
|
||||||
|
ffb.o: ffb_drv.o ffb_context.o $(L_OBJS)
|
||||||
|
$(LD) $(LD_RFLAG) -r -o $@ ffb_drv.o ffb_context.o $(L_OBJS)
|
||||||
|
|
|
@ -49,6 +49,10 @@ static drm_device_t i810_device;
|
||||||
drm_ctx_t i810_res_ctx;
|
drm_ctx_t i810_res_ctx;
|
||||||
|
|
||||||
static struct file_operations i810_fops = {
|
static struct file_operations i810_fops = {
|
||||||
|
#if LINUX_VERSION_CODE >= 0x020322
|
||||||
|
/* This started being used approx. 2.3.34 */
|
||||||
|
owner: THIS_MODULE,
|
||||||
|
#endif
|
||||||
open: i810_open,
|
open: i810_open,
|
||||||
flush: drm_flush,
|
flush: drm_flush,
|
||||||
release: i810_release,
|
release: i810_release,
|
||||||
|
|
|
@ -48,6 +48,10 @@ static drm_device_t mga_device;
|
||||||
drm_ctx_t mga_res_ctx;
|
drm_ctx_t mga_res_ctx;
|
||||||
|
|
||||||
static struct file_operations mga_fops = {
|
static struct file_operations mga_fops = {
|
||||||
|
#if LINUX_VERSION_CODE >= 0x020322
|
||||||
|
/* This started being used approx. 2.3.34 */
|
||||||
|
owner: THIS_MODULE,
|
||||||
|
#endif
|
||||||
open: mga_open,
|
open: mga_open,
|
||||||
flush: drm_flush,
|
flush: drm_flush,
|
||||||
release: mga_release,
|
release: mga_release,
|
||||||
|
|
|
@ -47,6 +47,10 @@ static drm_device_t r128_device;
|
||||||
drm_ctx_t r128_res_ctx;
|
drm_ctx_t r128_res_ctx;
|
||||||
|
|
||||||
static struct file_operations r128_fops = {
|
static struct file_operations r128_fops = {
|
||||||
|
#if LINUX_VERSION_CODE >= 0x020322
|
||||||
|
/* This started being used approx. 2.3.34 */
|
||||||
|
owner: THIS_MODULE,
|
||||||
|
#endif
|
||||||
open: r128_open,
|
open: r128_open,
|
||||||
flush: drm_flush,
|
flush: drm_flush,
|
||||||
release: r128_release,
|
release: r128_release,
|
||||||
|
@ -369,6 +373,13 @@ int r128_init(void)
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef DRM_AGP
|
||||||
dev->agp = drm_agp_init();
|
dev->agp = drm_agp_init();
|
||||||
|
if (dev->agp == NULL) {
|
||||||
|
DRM_ERROR("Cannot initialize agpgart module.\n");
|
||||||
|
drm_proc_cleanup();
|
||||||
|
misc_deregister(&r128_misc);
|
||||||
|
r128_takedown(dev);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_MTRR
|
#ifdef CONFIG_MTRR
|
||||||
dev->agp->agp_mtrr = mtrr_add(dev->agp->agp_info.aper_base,
|
dev->agp->agp_mtrr = mtrr_add(dev->agp->agp_info.aper_base,
|
||||||
|
@ -664,19 +675,11 @@ int r128_lock(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
DRM_ERROR("pid = %5d, old counter = %5ld\n",
|
|
||||||
current->pid, current->counter);
|
|
||||||
#endif
|
|
||||||
if (lock.context != r128_res_ctx.handle) {
|
if (lock.context != r128_res_ctx.handle) {
|
||||||
current->counter = 5;
|
current->counter = 5;
|
||||||
current->priority = DEF_PRIORITY/4;
|
current->priority = DEF_PRIORITY/4;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
while (current->counter > 25)
|
|
||||||
current->counter >>= 1; /* decrease time slice */
|
|
||||||
DRM_ERROR("pid = %5d, new counter = %5ld\n",
|
|
||||||
current->pid, current->counter);
|
|
||||||
#endif
|
#endif
|
||||||
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
||||||
|
|
||||||
|
@ -718,19 +721,11 @@ int r128_unlock(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
current->policy |= SCHED_YIELD;
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
|
||||||
schedule_timeout(1000);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (lock.context != r128_res_ctx.handle) {
|
if (lock.context != r128_res_ctx.handle) {
|
||||||
current->counter = 5;
|
current->counter = 5;
|
||||||
current->priority = DEF_PRIORITY;
|
current->priority = DEF_PRIORITY;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
|
||||||
schedule_timeout(10);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -48,6 +48,10 @@ static drm_device_t tdfx_device;
|
||||||
drm_ctx_t tdfx_res_ctx;
|
drm_ctx_t tdfx_res_ctx;
|
||||||
|
|
||||||
static struct file_operations tdfx_fops = {
|
static struct file_operations tdfx_fops = {
|
||||||
|
#if LINUX_VERSION_CODE >= 0x020322
|
||||||
|
/* This started being used approx. 2.3.34 */
|
||||||
|
owner: THIS_MODULE,
|
||||||
|
#endif
|
||||||
open: tdfx_open,
|
open: tdfx_open,
|
||||||
flush: drm_flush,
|
flush: drm_flush,
|
||||||
release: tdfx_release,
|
release: tdfx_release,
|
||||||
|
@ -625,19 +629,11 @@ int tdfx_lock(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
DRM_ERROR("pid = %5d, old counter = %5ld\n",
|
|
||||||
current->pid, current->counter);
|
|
||||||
#endif
|
|
||||||
if (lock.context != tdfx_res_ctx.handle) {
|
if (lock.context != tdfx_res_ctx.handle) {
|
||||||
current->counter = 5;
|
current->counter = 5;
|
||||||
current->priority = DEF_PRIORITY/4;
|
current->priority = DEF_PRIORITY/4;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
while (current->counter > 25)
|
|
||||||
current->counter >>= 1; /* decrease time slice */
|
|
||||||
DRM_ERROR("pid = %5d, new counter = %5ld\n",
|
|
||||||
current->pid, current->counter);
|
|
||||||
#endif
|
#endif
|
||||||
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
||||||
|
|
||||||
|
@ -679,19 +675,11 @@ int tdfx_unlock(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
current->policy |= SCHED_YIELD;
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
|
||||||
schedule_timeout(1000);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (lock.context != tdfx_res_ctx.handle) {
|
if (lock.context != tdfx_res_ctx.handle) {
|
||||||
current->counter = 5;
|
current->counter = 5;
|
||||||
current->priority = DEF_PRIORITY;
|
current->priority = DEF_PRIORITY;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
|
||||||
schedule_timeout(10);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -9,9 +9,8 @@
|
||||||
# Note 2! The CFLAGS definitions are now inherited from the
|
# Note 2! The CFLAGS definitions are now inherited from the
|
||||||
# parent makes..
|
# parent makes..
|
||||||
#
|
#
|
||||||
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.6 2000/06/17 00:03:34 martin Exp $
|
|
||||||
|
|
||||||
L_TARGET := libdrm.a
|
O_TARGET := drm.o
|
||||||
|
|
||||||
L_OBJS := init.o memory.o proc.o auth.o context.o drawable.o bufs.o \
|
L_OBJS := init.o memory.o proc.o auth.o context.o drawable.o bufs.o \
|
||||||
lists.o lock.o ioctl.o fops.o vm.o dma.o ctxbitmap.o \
|
lists.o lock.o ioctl.o fops.o vm.o dma.o ctxbitmap.o \
|
||||||
|
@ -19,35 +18,92 @@ L_OBJS := init.o memory.o proc.o auth.o context.o drawable.o bufs.o \
|
||||||
|
|
||||||
M_OBJS :=
|
M_OBJS :=
|
||||||
|
|
||||||
ifdef CONFIG_DRM_GAMMA
|
ifeq ($(CONFIG_DRM_GAMMA),y)
|
||||||
M_OBJS += gamma.o
|
OX_OBJS += gamma_drv.o
|
||||||
|
O_OBJS += gamma_dma.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_GAMMA),m)
|
||||||
|
MIX_OBJS += gamma_drv.o
|
||||||
|
MI_OBJS += gamma_dma.o
|
||||||
|
M_OBJS += gamma.o
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DRM_TDFX
|
ifeq ($(CONFIG_DRM_TDFX),y)
|
||||||
M_OBJS += tdfx.o
|
OX_OBJS += tdfx_drv.o
|
||||||
|
O_OBJS += tdfx_context.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_TDFX),m)
|
||||||
|
MIX_OBJS += tdfx_drv.o
|
||||||
|
MI_OBJS += tdfx_context.o
|
||||||
|
M_OBJS += tdfx.o
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DRM_MGA
|
ifeq ($(CONFIG_DRM_MGA),y)
|
||||||
M_OBJS += mga.o
|
OX_OBJS += mga_drv.o
|
||||||
|
O_OBJS += mga_context.o mga_dma.o mga_bufs.o mga_state.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_MGA),m)
|
||||||
|
MIX_OBJS += mga_drv.o
|
||||||
|
MI_OBJS += mga_context.o mga_dma.o mga_bufs.o mga_state.o
|
||||||
|
M_OBJS += mga.o
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DRM_R128
|
ifeq ($(CONFIG_DRM_I810),y)
|
||||||
M_OBJS += r128.o
|
OX_OBJS += i810_drv.o
|
||||||
|
O_OBJS += i810_context.o i810_bufs.o i810_dma.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_I810),m)
|
||||||
|
MIX_OBJS += i810_drv.o
|
||||||
|
MI_OBJS += i810_context.o i810_bufs.o i810_dma.o
|
||||||
|
M_OBJS += i810.o
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DRM_R128),y)
|
||||||
|
OX_OBJS += r128_drv.o
|
||||||
|
O_OBJS += r128_context.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_I810),m)
|
||||||
|
MIX_OBJS += r128_drv.o
|
||||||
|
MI_OBJS += r128_context.o
|
||||||
|
M_OBJS += r128.o
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DRM_FFB),y)
|
||||||
|
OX_OBJS += ffb_drv.o
|
||||||
|
O_OBJS += ffb_context.o
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_DRM_FFB),m)
|
||||||
|
MIX_OBJC += ffb_drv.o
|
||||||
|
MI_OBJS += ffb_context.o
|
||||||
|
M_OBJS += ffb.o
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
O_OBJS += $(L_OBJS)
|
||||||
|
|
||||||
include $(TOPDIR)/Rules.make
|
include $(TOPDIR)/Rules.make
|
||||||
|
|
||||||
gamma.o: gamma_drv.o gamma_dma.o $(L_TARGET)
|
gamma.o : gamma_drv.o gamma_dma.o $(L_OBJS)
|
||||||
$(LD) $(LD_RFLAG) -r -o $@ gamma_drv.o gamma_dma.o -L. -ldrm
|
$(LD) $(LD_RFLAG) -r -o $@ gamma_drv.o gamma_dma.o $(L_OBJS)
|
||||||
|
|
||||||
tdfx.o: tdfx_drv.o tdfx_context.o $(L_TARGET)
|
tdfx.o: tdfx_drv.o tdfx_context.o $(L_OBJS)
|
||||||
$(LD) $(LD_RFLAG) -r -o $@ tdfx_drv.o tdfx_context.o -L. -ldrm
|
$(LD) $(LD_RFLAG) -r -o $@ tdfx_drv.o tdfx_context.o $(L_OBJS)
|
||||||
|
|
||||||
i810.o: i810_drv.o i810_context.o $(L_TARGET)
|
mga.o: mga_drv.o mga_context.o mga_dma.o mga_bufs.o mga_state.o $(L_OBJS)
|
||||||
$(LD) $(LD_RFLAG) -r -o $@ i810_drv.o i810_bufs.o i810_dma.o i810_context.o -L. -ldrm
|
$(LD) $(LD_RFLAG) -r -o $@ mga_drv.o mga_bufs.o mga_dma.o \
|
||||||
|
mga_context.o mga_state.o $(L_OBJS)
|
||||||
|
|
||||||
mga.o: mga_drv.o mga_context.o mga_dma.o mga_bufs.o $(L_TARGET)
|
i810.o: i810_drv.o i810_context.o i810_bufs.o i810_dma.o $(L_TARGET)
|
||||||
$(LD) $(LD_RFLAG) -r -o $@ mga_drv.o mga_bufs.o mga_dma.o mga_context.o mga_state.o -L. -ldrm
|
$(LD) $(LD_RFLAG) -r -o $@ i810_drv.o i810_bufs.o i810_dma.o \
|
||||||
|
i810_context.o $(L_OBJS)
|
||||||
|
|
||||||
r128.o: r128_drv.o r128_context.o $(L_TARGET)
|
r128.o: r128_drv.o r128_context.o $(L_TARGET)
|
||||||
$(LD) $(LD_RFLAG) -r -o $@ r128_drv.o r128_context.o -L. -ldrm
|
$(LD) $(LD_RFLAG) -r -o $@ r128_drv.o r128_context.o $(L_OBJS)
|
||||||
|
|
||||||
|
ffb.o: ffb_drv.o ffb_context.o $(L_OBJS)
|
||||||
|
$(LD) $(LD_RFLAG) -r -o $@ ffb_drv.o ffb_context.o $(L_OBJS)
|
||||||
|
|
|
@ -188,7 +188,9 @@ drmstat: $(PROGOBJS)
|
||||||
ChangeLog:
|
ChangeLog:
|
||||||
@rm -f Changelog
|
@rm -f Changelog
|
||||||
@rcs2log -i 2 -r -l \
|
@rcs2log -i 2 -r -l \
|
||||||
| sed 's,@.*alephnull.com,@precisioninsight.com,' > ChangeLog
|
| sed 's,@.*light,,' \
|
||||||
|
| sed 's,/cvsroot/.*/drm/kernel/,,g' \
|
||||||
|
> ChangeLog
|
||||||
|
|
||||||
|
|
||||||
# .o files are used for modules
|
# .o files are used for modules
|
||||||
|
|
|
@ -72,12 +72,14 @@ int drm_addmap(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
|
|
||||||
switch (map->type) {
|
switch (map->type) {
|
||||||
case _DRM_REGISTERS:
|
case _DRM_REGISTERS:
|
||||||
case _DRM_FRAME_BUFFER:
|
case _DRM_FRAME_BUFFER:
|
||||||
|
#ifndef __sparc__
|
||||||
if (map->offset + map->size < map->offset
|
if (map->offset + map->size < map->offset
|
||||||
|| map->offset < virt_to_phys(high_memory)) {
|
|| map->offset < virt_to_phys(high_memory)) {
|
||||||
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
|
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_MTRR
|
#ifdef CONFIG_MTRR
|
||||||
if (map->type == _DRM_FRAME_BUFFER
|
if (map->type == _DRM_FRAME_BUFFER
|
||||||
|| (map->flags & _DRM_WRITE_COMBINING)) {
|
|| (map->flags & _DRM_WRITE_COMBINING)) {
|
||||||
|
@ -484,8 +486,10 @@ int drm_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
-EFAULT);
|
-EFAULT);
|
||||||
|
|
||||||
if (request.count >= dma->buf_count) {
|
if (request.count >= dma->buf_count) {
|
||||||
|
down(¤t->mm->mmap_sem);
|
||||||
virtual = do_mmap(filp, 0, dma->byte_count,
|
virtual = do_mmap(filp, 0, dma->byte_count,
|
||||||
PROT_READ|PROT_WRITE, MAP_SHARED, 0);
|
PROT_READ|PROT_WRITE, MAP_SHARED, 0);
|
||||||
|
up(¤t->mm->mmap_sem);
|
||||||
if (virtual > -1024UL) {
|
if (virtual > -1024UL) {
|
||||||
/* Real error */
|
/* Real error */
|
||||||
retcode = (signed long)virtual;
|
retcode = (signed long)virtual;
|
||||||
|
|
12
linux/fops.c
12
linux/fops.c
|
@ -94,7 +94,8 @@ int drm_release(struct inode *inode, struct file *filp)
|
||||||
DRM_DEBUG("pid = %d, device = 0x%x, open_count = %d\n",
|
DRM_DEBUG("pid = %d, device = 0x%x, open_count = %d\n",
|
||||||
current->pid, dev->device, dev->open_count);
|
current->pid, dev->device, dev->open_count);
|
||||||
|
|
||||||
if (_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)
|
if (dev->lock.hw_lock
|
||||||
|
&& _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)
|
||||||
&& dev->lock.pid == current->pid) {
|
&& dev->lock.pid == current->pid) {
|
||||||
DRM_ERROR("Process %d dead, freeing lock for context %d\n",
|
DRM_ERROR("Process %d dead, freeing lock for context %d\n",
|
||||||
current->pid,
|
current->pid,
|
||||||
|
@ -222,8 +223,15 @@ int drm_write_string(drm_device_t *dev, const char *s)
|
||||||
KILLFASYNCHASTHREEPARAMETERS if three parameters are found. */
|
KILLFASYNCHASTHREEPARAMETERS if three parameters are found. */
|
||||||
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO);
|
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO);
|
||||||
#else
|
#else
|
||||||
/* Parameter added in 2.3.21 */
|
|
||||||
|
/* Parameter added in 2.3.21. */
|
||||||
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO, POLL_IN);
|
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO, POLL_IN);
|
||||||
|
#else
|
||||||
|
/* Type of first parameter changed in
|
||||||
|
Linux 2.4.0-test2... */
|
||||||
|
if (dev->buf_async) kill_fasync(&dev->buf_async, SIGIO, POLL_IN);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
DRM_DEBUG("waking\n");
|
DRM_DEBUG("waking\n");
|
||||||
wake_up_interruptible(&dev->buf_readers);
|
wake_up_interruptible(&dev->buf_readers);
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "drmP.h"
|
#include "drmP.h"
|
||||||
#include "gamma_drv.h"
|
#include "gamma_drv.h"
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
|
#include <linux/smp_lock.h> /* For (un)lock_kernel */
|
||||||
EXPORT_SYMBOL(gamma_init);
|
EXPORT_SYMBOL(gamma_init);
|
||||||
EXPORT_SYMBOL(gamma_cleanup);
|
EXPORT_SYMBOL(gamma_cleanup);
|
||||||
|
|
||||||
|
@ -54,6 +55,10 @@ EXPORT_SYMBOL(gamma_cleanup);
|
||||||
static drm_device_t gamma_device;
|
static drm_device_t gamma_device;
|
||||||
|
|
||||||
static struct file_operations gamma_fops = {
|
static struct file_operations gamma_fops = {
|
||||||
|
#if LINUX_VERSION_CODE >= 0x020322
|
||||||
|
/* This started being used approx. 2.3.34 */
|
||||||
|
owner: THIS_MODULE,
|
||||||
|
#endif
|
||||||
open: gamma_open,
|
open: gamma_open,
|
||||||
flush: drm_flush,
|
flush: drm_flush,
|
||||||
release: gamma_release,
|
release: gamma_release,
|
||||||
|
@ -284,12 +289,12 @@ static int gamma_takedown(drm_device_t *dev)
|
||||||
- PAGE_SHIFT,
|
- PAGE_SHIFT,
|
||||||
DRM_MEM_SAREA);
|
DRM_MEM_SAREA);
|
||||||
break;
|
break;
|
||||||
#ifdef DRM_AGP
|
|
||||||
case _DRM_AGP:
|
case _DRM_AGP:
|
||||||
|
#ifdef DRM_AGP
|
||||||
/* Do nothing here, because this is all
|
/* Do nothing here, because this is all
|
||||||
handled in the AGP/GART driver. */
|
handled in the AGP/GART driver. */
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
|
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
|
||||||
}
|
}
|
||||||
|
@ -476,6 +481,7 @@ int gamma_release(struct inode *inode, struct file *filp)
|
||||||
int retcode = 0;
|
int retcode = 0;
|
||||||
|
|
||||||
DRM_DEBUG("open_count = %d\n", dev->open_count);
|
DRM_DEBUG("open_count = %d\n", dev->open_count);
|
||||||
|
lock_kernel();
|
||||||
if (!(retcode = drm_release(inode, filp))) {
|
if (!(retcode = drm_release(inode, filp))) {
|
||||||
MOD_DEC_USE_COUNT;
|
MOD_DEC_USE_COUNT;
|
||||||
atomic_inc(&dev->total_close);
|
atomic_inc(&dev->total_close);
|
||||||
|
@ -486,13 +492,17 @@ int gamma_release(struct inode *inode, struct file *filp)
|
||||||
atomic_read(&dev->ioctl_count),
|
atomic_read(&dev->ioctl_count),
|
||||||
dev->blocked);
|
dev->blocked);
|
||||||
spin_unlock(&dev->count_lock);
|
spin_unlock(&dev->count_lock);
|
||||||
|
unlock_kernel();
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
spin_unlock(&dev->count_lock);
|
spin_unlock(&dev->count_lock);
|
||||||
return gamma_takedown(dev);
|
retcode = gamma_takedown(dev);
|
||||||
|
unlock_kernel();
|
||||||
|
return retcode;
|
||||||
}
|
}
|
||||||
spin_unlock(&dev->count_lock);
|
spin_unlock(&dev->count_lock);
|
||||||
}
|
}
|
||||||
|
unlock_kernel();
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Rickard E. (Rik) Faith <faith@precisioninsight.com>
|
* Rickard E. (Rik) Faith <faith@valinux.com>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,10 @@ static drm_device_t i810_device;
|
||||||
drm_ctx_t i810_res_ctx;
|
drm_ctx_t i810_res_ctx;
|
||||||
|
|
||||||
static struct file_operations i810_fops = {
|
static struct file_operations i810_fops = {
|
||||||
|
#if LINUX_VERSION_CODE >= 0x020322
|
||||||
|
/* This started being used approx. 2.3.34 */
|
||||||
|
owner: THIS_MODULE,
|
||||||
|
#endif
|
||||||
open: i810_open,
|
open: i810_open,
|
||||||
flush: drm_flush,
|
flush: drm_flush,
|
||||||
release: i810_release,
|
release: i810_release,
|
||||||
|
|
|
@ -97,10 +97,17 @@ void drm_parse_options(char *s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* drm_cpu_valid returns non-zero if the DRI will run on this CPU, and 0
|
||||||
|
* otherwise. */
|
||||||
|
|
||||||
int drm_cpu_valid(void)
|
int drm_cpu_valid(void)
|
||||||
{
|
{
|
||||||
#if defined(__i386__)
|
#if defined(__i386__)
|
||||||
if (boot_cpu_data.x86 == 3) return 0; /* No cmpxchg on a 386 */
|
if (boot_cpu_data.x86 == 3) return 0; /* No cmpxchg on a 386 */
|
||||||
|
#endif
|
||||||
|
#if defined(__sparc__) && !defined(__sparc_v9__)
|
||||||
|
if (1)
|
||||||
|
return 0; /* No cmpxchg before v9 sparc. */
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,10 @@ static drm_device_t mga_device;
|
||||||
drm_ctx_t mga_res_ctx;
|
drm_ctx_t mga_res_ctx;
|
||||||
|
|
||||||
static struct file_operations mga_fops = {
|
static struct file_operations mga_fops = {
|
||||||
|
#if LINUX_VERSION_CODE >= 0x020322
|
||||||
|
/* This started being used approx. 2.3.34 */
|
||||||
|
owner: THIS_MODULE,
|
||||||
|
#endif
|
||||||
open: mga_open,
|
open: mga_open,
|
||||||
flush: drm_flush,
|
flush: drm_flush,
|
||||||
release: mga_release,
|
release: mga_release,
|
||||||
|
|
12
linux/proc.c
12
linux/proc.c
|
@ -228,7 +228,7 @@ static int _drm_queues_info(char *buf, char **start, off_t offset, int len,
|
||||||
atomic_inc(&q->use_count);
|
atomic_inc(&q->use_count);
|
||||||
DRM_PROC_PRINT_RET(atomic_dec(&q->use_count),
|
DRM_PROC_PRINT_RET(atomic_dec(&q->use_count),
|
||||||
"%5d/0x%03x %5d %5d"
|
"%5d/0x%03x %5d %5d"
|
||||||
" %5d/%c%c/%c%c%c %5d %10d %10d %10d\n",
|
" %5d/%c%c/%c%c%c %5Zd %10d %10d %10d\n",
|
||||||
i,
|
i,
|
||||||
q->flags,
|
q->flags,
|
||||||
atomic_read(&q->use_count),
|
atomic_read(&q->use_count),
|
||||||
|
@ -351,17 +351,21 @@ static int drm_clients_info(char *buf, char **start, off_t offset, int len,
|
||||||
|
|
||||||
#if DRM_DEBUG_CODE
|
#if DRM_DEBUG_CODE
|
||||||
|
|
||||||
|
#define DRM_VMA_VERBOSE 0
|
||||||
|
|
||||||
static int _drm_vma_info(char *buf, char **start, off_t offset, int len,
|
static int _drm_vma_info(char *buf, char **start, off_t offset, int len,
|
||||||
int *eof, void *data)
|
int *eof, void *data)
|
||||||
{
|
{
|
||||||
drm_device_t *dev = (drm_device_t *)data;
|
drm_device_t *dev = (drm_device_t *)data;
|
||||||
drm_vma_entry_t *pt;
|
drm_vma_entry_t *pt;
|
||||||
|
struct vm_area_struct *vma;
|
||||||
|
#if DRM_VMA_VERBOSE
|
||||||
|
unsigned long i;
|
||||||
|
unsigned long address;
|
||||||
pgd_t *pgd;
|
pgd_t *pgd;
|
||||||
pmd_t *pmd;
|
pmd_t *pmd;
|
||||||
pte_t *pte;
|
pte_t *pte;
|
||||||
unsigned long i;
|
#endif
|
||||||
struct vm_area_struct *vma;
|
|
||||||
unsigned long address;
|
|
||||||
#if defined(__i386__)
|
#if defined(__i386__)
|
||||||
unsigned int pgprot;
|
unsigned int pgprot;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,6 +47,10 @@ static drm_device_t r128_device;
|
||||||
drm_ctx_t r128_res_ctx;
|
drm_ctx_t r128_res_ctx;
|
||||||
|
|
||||||
static struct file_operations r128_fops = {
|
static struct file_operations r128_fops = {
|
||||||
|
#if LINUX_VERSION_CODE >= 0x020322
|
||||||
|
/* This started being used approx. 2.3.34 */
|
||||||
|
owner: THIS_MODULE,
|
||||||
|
#endif
|
||||||
open: r128_open,
|
open: r128_open,
|
||||||
flush: drm_flush,
|
flush: drm_flush,
|
||||||
release: r128_release,
|
release: r128_release,
|
||||||
|
@ -369,6 +373,13 @@ int r128_init(void)
|
||||||
|
|
||||||
#ifdef DRM_AGP
|
#ifdef DRM_AGP
|
||||||
dev->agp = drm_agp_init();
|
dev->agp = drm_agp_init();
|
||||||
|
if (dev->agp == NULL) {
|
||||||
|
DRM_ERROR("Cannot initialize agpgart module.\n");
|
||||||
|
drm_proc_cleanup();
|
||||||
|
misc_deregister(&r128_misc);
|
||||||
|
r128_takedown(dev);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_MTRR
|
#ifdef CONFIG_MTRR
|
||||||
dev->agp->agp_mtrr = mtrr_add(dev->agp->agp_info.aper_base,
|
dev->agp->agp_mtrr = mtrr_add(dev->agp->agp_info.aper_base,
|
||||||
|
@ -664,19 +675,11 @@ int r128_lock(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
DRM_ERROR("pid = %5d, old counter = %5ld\n",
|
|
||||||
current->pid, current->counter);
|
|
||||||
#endif
|
|
||||||
if (lock.context != r128_res_ctx.handle) {
|
if (lock.context != r128_res_ctx.handle) {
|
||||||
current->counter = 5;
|
current->counter = 5;
|
||||||
current->priority = DEF_PRIORITY/4;
|
current->priority = DEF_PRIORITY/4;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
while (current->counter > 25)
|
|
||||||
current->counter >>= 1; /* decrease time slice */
|
|
||||||
DRM_ERROR("pid = %5d, new counter = %5ld\n",
|
|
||||||
current->pid, current->counter);
|
|
||||||
#endif
|
#endif
|
||||||
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
||||||
|
|
||||||
|
@ -718,19 +721,11 @@ int r128_unlock(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
current->policy |= SCHED_YIELD;
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
|
||||||
schedule_timeout(1000);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (lock.context != r128_res_ctx.handle) {
|
if (lock.context != r128_res_ctx.handle) {
|
||||||
current->counter = 5;
|
current->counter = 5;
|
||||||
current->priority = DEF_PRIORITY;
|
current->priority = DEF_PRIORITY;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
|
||||||
schedule_timeout(10);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -48,6 +48,10 @@ static drm_device_t tdfx_device;
|
||||||
drm_ctx_t tdfx_res_ctx;
|
drm_ctx_t tdfx_res_ctx;
|
||||||
|
|
||||||
static struct file_operations tdfx_fops = {
|
static struct file_operations tdfx_fops = {
|
||||||
|
#if LINUX_VERSION_CODE >= 0x020322
|
||||||
|
/* This started being used approx. 2.3.34 */
|
||||||
|
owner: THIS_MODULE,
|
||||||
|
#endif
|
||||||
open: tdfx_open,
|
open: tdfx_open,
|
||||||
flush: drm_flush,
|
flush: drm_flush,
|
||||||
release: tdfx_release,
|
release: tdfx_release,
|
||||||
|
@ -625,19 +629,11 @@ int tdfx_lock(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
DRM_ERROR("pid = %5d, old counter = %5ld\n",
|
|
||||||
current->pid, current->counter);
|
|
||||||
#endif
|
|
||||||
if (lock.context != tdfx_res_ctx.handle) {
|
if (lock.context != tdfx_res_ctx.handle) {
|
||||||
current->counter = 5;
|
current->counter = 5;
|
||||||
current->priority = DEF_PRIORITY/4;
|
current->priority = DEF_PRIORITY/4;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
while (current->counter > 25)
|
|
||||||
current->counter >>= 1; /* decrease time slice */
|
|
||||||
DRM_ERROR("pid = %5d, new counter = %5ld\n",
|
|
||||||
current->pid, current->counter);
|
|
||||||
#endif
|
#endif
|
||||||
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
||||||
|
|
||||||
|
@ -679,19 +675,11 @@ int tdfx_unlock(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if LINUX_VERSION_CODE < 0x020400
|
||||||
current->policy |= SCHED_YIELD;
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
|
||||||
schedule_timeout(1000);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (lock.context != tdfx_res_ctx.handle) {
|
if (lock.context != tdfx_res_ctx.handle) {
|
||||||
current->counter = 5;
|
current->counter = 5;
|
||||||
current->priority = DEF_PRIORITY;
|
current->priority = DEF_PRIORITY;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
|
||||||
schedule_timeout(10);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Rickard E. (Rik) Faith <faith@precisioninsight.com>
|
* Rickard E. (Rik) Faith <faith@valinux.com>
|
||||||
* Daryll Strauss <daryll@precisioninsight.com>
|
* Daryll Strauss <daryll@valinux.com>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue