Sync with Linux 2.4.0-prerelease

main
Rik Faith 2001-01-04 18:41:41 +00:00
parent c7c6156aec
commit 833af23c5d
14 changed files with 131 additions and 91 deletions

View File

@ -6,6 +6,7 @@
# drm.o is a fake target -- it is never built
# The real targets are in the module-list
O_TARGET := drm.o
module-list := gamma.o tdfx.o r128.o ffb.o mga.o i810.o
export-objs := $(patsubst %.o,%_drv.o,$(module-list))
@ -25,6 +26,11 @@ export-objs := $(patsubst %.o,%_drv.o,$(module-list))
# memory waste (in the dual-head case) for greatly improved long-term
# maintainability.
#
# NOTE: lib-objs will be eliminated in future versions, thereby
# eliminating the need to compile the .o files into every module, but
# for now we still need them.
#
lib-objs := init.o memory.o proc.o auth.o context.o drawable.o bufs.o
lib-objs += lists.o lock.o ioctl.o fops.o vm.o dma.o ctxbitmap.o
@ -36,54 +42,59 @@ else
endif
endif
gamma-objs := $(lib-objs) gamma_drv.o gamma_dma.o
tdfx-objs := $(lib-objs) tdfx_drv.o tdfx_context.o
r128-objs := $(lib-objs) r128_drv.o r128_cce.o r128_context.o r128_bufs.o\
r128_state.o
ffb-objs := $(lib-objs) ffb_drv.o ffb_context.o
mga-objs := $(lib-objs) mga_drv.o mga_dma.o mga_context.o mga_bufs.o \
mga_state.o
i810-objs := $(lib-objs) i810_drv.o i810_dma.o i810_context.o i810_bufs.o
gamma-objs := gamma_drv.o gamma_dma.o
tdfx-objs := tdfx_drv.o tdfx_context.o
r128-objs := r128_drv.o r128_cce.o r128_context.o r128_bufs.o r128_state.o
ffb-objs := ffb_drv.o ffb_context.o
mga-objs := mga_drv.o mga_dma.o mga_context.o mga_bufs.o mga_state.o
i810-objs := i810_drv.o i810_dma.o i810_context.o i810_bufs.o
obj-$(CONFIG_DRM_GAMMA) += gamma.o $(gamma-objs)
obj-$(CONFIG_DRM_TDFX) += tdfx.o $(tdfx-objs)
obj-$(CONFIG_DRM_R128) += r128.o $(r128-objs)
obj-$(CONFIG_DRM_FFB) += ffb.o $(ffb-objs)
obj-$(CONFIG_DRM_GAMMA) += gamma.o
obj-$(CONFIG_DRM_TDFX) += tdfx.o
obj-$(CONFIG_DRM_R128) += r128.o
obj-$(CONFIG_DRM_FFB) += ffb.o
obj-$(CONFIG_DRM_MGA) += mga.o
obj-$(CONFIG_DRM_I810) += i810.o
ifneq ($CONFIG_AGP),)
obj-$(CONFIG_DRM_MGA) += mga.o $(mga-objs)
obj-$(CONFIG_DRM_I810) += i810.o $(i810-objs)
# When linking into the kernel, link the library just once.
# If making modules, we include the library into each module
lib-objs-mod := $(patsubst %.o,%-mod.o,$(lib-objs))
ifdef MAKING_MODULES
lib = drmlib-mod.a
else
obj-y += drmlib.a
endif
# Take module names out of obj-y and int-m
obj-y := $(filter-out $(module-list), $(obj-y))
int-m := $(filter-out $(module-list), $(obj-m))
# Translate to Rules.make lists.
O_OBJS := $(filter-out $(export-objs), $(obj-y))
OX_OBJS := $(filter $(export-objs), $(obj-y))
M_OBJS := $(sort $(filter $(module-list), $(obj-m)))
MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m)))
MIX_OBJS := $(sort $(filter $(export-objs), $(int-m)))
include $(TOPDIR)/Rules.make
gamma.o: $(gamma-objs)
$(LD) -r -o $@ $(gamma-objs)
$(patsubst %.o,%.c,$(lib-objs-mod)):
@ln -sf $(subst -mod,,$@) $@
tdfx.o: $(tdfx-objs)
$(LD) -r -o $@ $(tdfx-objs)
drmlib-mod.a: $(lib-objs-mod)
rm -f $@
$(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-objs-mod)
mga.o: $(mga-objs)
$(LD) -r -o $@ $(mga-objs)
drmlib.a: $(lib-objs)
rm -f $@
$(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-objs)
i810.o: $(i810-objs)
$(LD) -r -o $@ $(i810-objs)
gamma.o: $(gamma-objs) $(lib)
$(LD) -r -o $@ $(gamma-objs) $(lib)
r128.o: $(r128-objs)
$(LD) -r -o $@ $(r128-objs)
tdfx.o: $(tdfx-objs) $(lib)
$(LD) -r -o $@ $(tdfx-objs) $(lib)
ffb.o: $(ffb-objs)
$(LD) -r -o $@ $(ffb-objs)
mga.o: $(mga-objs) $(lib)
$(LD) -r -o $@ $(mga-objs) $(lib)
i810.o: $(i810-objs) $(lib)
$(LD) -r -o $@ $(i810-objs) $(lib)
r128.o: $(r128-objs) $(lib)
$(LD) -r -o $@ $(r128-objs) $(lib)
ffb.o: $(ffb-objs) $(lib)
$(LD) -r -o $@ $(ffb-objs) $(lib)

View File

@ -924,7 +924,7 @@ int i810_irq_install(drm_device_t *dev, int irq)
dev->dma->next_queue = NULL;
dev->dma->this_buffer = NULL;
dev->tq.next = NULL;
INIT_LIST_HEAD(&dev->tq.list);
dev->tq.sync = 0;
dev->tq.routine = i810_dma_task_queue;
dev->tq.data = dev;

View File

@ -503,7 +503,7 @@ int mga_release(struct inode *inode, struct file *filp)
if (dev->lock.hw_lock && _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)
&& dev->lock.pid == current->pid) {
mga_reclaim_buffers(dev, priv->pid);
DRM_INFO("Process %d dead (ctx %d, d_s = 0x%02x)\n",
DRM_INFO("Process %d dead (ctx %d, d_s = 0x%02lx)\n",
current->pid,
_DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock),
dev->dev_private ?

View File

@ -6,6 +6,7 @@
# drm.o is a fake target -- it is never built
# The real targets are in the module-list
O_TARGET := drm.o
module-list := gamma.o tdfx.o r128.o ffb.o mga.o i810.o
export-objs := $(patsubst %.o,%_drv.o,$(module-list))
@ -25,6 +26,11 @@ export-objs := $(patsubst %.o,%_drv.o,$(module-list))
# memory waste (in the dual-head case) for greatly improved long-term
# maintainability.
#
# NOTE: lib-objs will be eliminated in future versions, thereby
# eliminating the need to compile the .o files into every module, but
# for now we still need them.
#
lib-objs := init.o memory.o proc.o auth.o context.o drawable.o bufs.o
lib-objs += lists.o lock.o ioctl.o fops.o vm.o dma.o ctxbitmap.o
@ -36,54 +42,59 @@ else
endif
endif
gamma-objs := $(lib-objs) gamma_drv.o gamma_dma.o
tdfx-objs := $(lib-objs) tdfx_drv.o tdfx_context.o
r128-objs := $(lib-objs) r128_drv.o r128_cce.o r128_context.o r128_bufs.o\
r128_state.o
ffb-objs := $(lib-objs) ffb_drv.o ffb_context.o
mga-objs := $(lib-objs) mga_drv.o mga_dma.o mga_context.o mga_bufs.o \
mga_state.o
i810-objs := $(lib-objs) i810_drv.o i810_dma.o i810_context.o i810_bufs.o
gamma-objs := gamma_drv.o gamma_dma.o
tdfx-objs := tdfx_drv.o tdfx_context.o
r128-objs := r128_drv.o r128_cce.o r128_context.o r128_bufs.o r128_state.o
ffb-objs := ffb_drv.o ffb_context.o
mga-objs := mga_drv.o mga_dma.o mga_context.o mga_bufs.o mga_state.o
i810-objs := i810_drv.o i810_dma.o i810_context.o i810_bufs.o
obj-$(CONFIG_DRM_GAMMA) += gamma.o $(gamma-objs)
obj-$(CONFIG_DRM_TDFX) += tdfx.o $(tdfx-objs)
obj-$(CONFIG_DRM_R128) += r128.o $(r128-objs)
obj-$(CONFIG_DRM_FFB) += ffb.o $(ffb-objs)
obj-$(CONFIG_DRM_GAMMA) += gamma.o
obj-$(CONFIG_DRM_TDFX) += tdfx.o
obj-$(CONFIG_DRM_R128) += r128.o
obj-$(CONFIG_DRM_FFB) += ffb.o
obj-$(CONFIG_DRM_MGA) += mga.o
obj-$(CONFIG_DRM_I810) += i810.o
ifneq ($CONFIG_AGP),)
obj-$(CONFIG_DRM_MGA) += mga.o $(mga-objs)
obj-$(CONFIG_DRM_I810) += i810.o $(i810-objs)
# When linking into the kernel, link the library just once.
# If making modules, we include the library into each module
lib-objs-mod := $(patsubst %.o,%-mod.o,$(lib-objs))
ifdef MAKING_MODULES
lib = drmlib-mod.a
else
obj-y += drmlib.a
endif
# Take module names out of obj-y and int-m
obj-y := $(filter-out $(module-list), $(obj-y))
int-m := $(filter-out $(module-list), $(obj-m))
# Translate to Rules.make lists.
O_OBJS := $(filter-out $(export-objs), $(obj-y))
OX_OBJS := $(filter $(export-objs), $(obj-y))
M_OBJS := $(sort $(filter $(module-list), $(obj-m)))
MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m)))
MIX_OBJS := $(sort $(filter $(export-objs), $(int-m)))
include $(TOPDIR)/Rules.make
gamma.o: $(gamma-objs)
$(LD) -r -o $@ $(gamma-objs)
$(patsubst %.o,%.c,$(lib-objs-mod)):
@ln -sf $(subst -mod,,$@) $@
tdfx.o: $(tdfx-objs)
$(LD) -r -o $@ $(tdfx-objs)
drmlib-mod.a: $(lib-objs-mod)
rm -f $@
$(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-objs-mod)
mga.o: $(mga-objs)
$(LD) -r -o $@ $(mga-objs)
drmlib.a: $(lib-objs)
rm -f $@
$(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-objs)
i810.o: $(i810-objs)
$(LD) -r -o $@ $(i810-objs)
gamma.o: $(gamma-objs) $(lib)
$(LD) -r -o $@ $(gamma-objs) $(lib)
r128.o: $(r128-objs)
$(LD) -r -o $@ $(r128-objs)
tdfx.o: $(tdfx-objs) $(lib)
$(LD) -r -o $@ $(tdfx-objs) $(lib)
ffb.o: $(ffb-objs)
$(LD) -r -o $@ $(ffb-objs)
mga.o: $(mga-objs) $(lib)
$(LD) -r -o $@ $(mga-objs) $(lib)
i810.o: $(i810-objs) $(lib)
$(LD) -r -o $@ $(i810-objs) $(lib)
r128.o: $(r128-objs) $(lib)
$(LD) -r -o $@ $(r128-objs) $(lib)
ffb.o: $(ffb-objs) $(lib)
$(LD) -r -o $@ $(ffb-objs) $(lib)

View File

@ -156,6 +156,7 @@ MODS += sis.o
SISOBJS= sis_drv.o sis_context.o sis_ds.o sis_mm.o
SISHEADERS= sis_drv.h sis_ds.h sis_drm.h $(DRMHEADERS)
MODCFLAGS += -DCONFIG_DRM_SIS
endif
all::;@echo === KERNEL HEADERS IN $(TREE)

View File

@ -42,4 +42,9 @@
#define __exit
#endif
/* This is a hack that only works for
this code base -- because we always
call this with dev->tq.* */
#define INIT_LIST_HEAD(pointer) dev->tq.next = NULL
#endif

View File

@ -82,7 +82,9 @@ typedef struct drm_clip_rect {
#include "mga_drm.h"
#include "i810_drm.h"
#include "r128_drm.h"
#ifdef CONFIG_DRM_SIS
#include "sis_drm.h"
#endif
typedef struct drm_version {
int version_major; /* Major version */
@ -379,6 +381,7 @@ typedef struct drm_agp_info {
#define DRM_IOCTL_R128_STIPPLE DRM_IOW( 0x4d, drm_r128_stipple_t)
#define DRM_IOCTL_R128_PACKET DRM_IOWR(0x4e, drm_r128_packet_t)
#ifdef CONFIG_DRM_SIS
/* SiS specific ioctls */
#define SIS_IOCTL_FB_ALLOC DRM_IOWR( 0x44, drm_sis_mem_t)
#define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t)
@ -388,5 +391,6 @@ typedef struct drm_agp_info {
#define SIS_IOCTL_FLIP DRM_IOW( 0x48, drm_sis_flip_t)
#define SIS_IOCTL_FLIP_INIT DRM_IO( 0x49)
#define SIS_IOCTL_FLIP_FINAL DRM_IO( 0x50)
#endif
#endif

View File

@ -651,7 +651,7 @@ int gamma_irq_install(drm_device_t *dev, int irq)
dev->dma->next_queue = NULL;
dev->dma->this_buffer = NULL;
dev->tq.next = NULL;
INIT_LIST_HEAD(&dev->tq.list);
dev->tq.sync = 0;
dev->tq.routine = gamma_dma_schedule_tq_wrapper;
dev->tq.data = dev;

View File

@ -924,7 +924,7 @@ int i810_irq_install(drm_device_t *dev, int irq)
dev->dma->next_queue = NULL;
dev->dma->this_buffer = NULL;
dev->tq.next = NULL;
INIT_LIST_HEAD(&dev->tq.list);
dev->tq.sync = 0;
dev->tq.routine = i810_dma_task_queue;
dev->tq.data = dev;

View File

@ -143,7 +143,7 @@ static inline void mga_dma_quiescent(drm_device_t *dev)
unsigned long end;
int i;
DRM_DEBUG("dispatch_status = 0x%02x\n", dev_priv->dispatch_status);
DRM_DEBUG("dispatch_status = 0x%02lx\n", dev_priv->dispatch_status);
end = jiffies + (HZ*3);
while(1) {
if(!test_and_set_bit(MGA_IN_DISPATCH,
@ -154,7 +154,7 @@ static inline void mga_dma_quiescent(drm_device_t *dev)
DRM_ERROR("irqs: %d wanted %d\n",
atomic_read(&dev->total_irq),
atomic_read(&dma->total_lost));
DRM_ERROR("lockup: dispatch_status = 0x%02x,"
DRM_ERROR("lockup: dispatch_status = 0x%02lx,"
" jiffies = %lu, end = %lu\n",
dev_priv->dispatch_status, jiffies, end);
return;
@ -177,7 +177,7 @@ static inline void mga_dma_quiescent(drm_device_t *dev)
sarea_priv->dirty |= MGA_DMA_FLUSH;
clear_bit(MGA_IN_DISPATCH, &dev_priv->dispatch_status);
DRM_DEBUG("exit, dispatch_status = 0x%02x\n",
DRM_DEBUG("exit, dispatch_status = 0x%02lx\n",
dev_priv->dispatch_status);
}
@ -818,7 +818,7 @@ int mga_irq_install(drm_device_t *dev, int irq)
dev->dma->next_buffer = NULL;
dev->dma->next_queue = NULL;
dev->dma->this_buffer = NULL;
dev->tq.next = NULL;
INIT_LIST_HEAD(&dev->tq.list);
dev->tq.sync = 0;
dev->tq.routine = mga_dma_task_queue;
dev->tq.data = dev;

View File

@ -503,7 +503,7 @@ int mga_release(struct inode *inode, struct file *filp)
if (dev->lock.hw_lock && _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)
&& dev->lock.pid == current->pid) {
mga_reclaim_buffers(dev, priv->pid);
DRM_INFO("Process %d dead (ctx %d, d_s = 0x%02x)\n",
DRM_INFO("Process %d dead (ctx %d, d_s = 0x%02lx)\n",
current->pid,
_DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock),
dev->dev_private ?

View File

@ -38,7 +38,7 @@
#define MGA_BUF_NEEDS_OVERFLOW 3
typedef struct {
u32 buffer_status;
long buffer_status; /* long req'd for set_bit() --RR */
int num_dwords;
int max_dwords;
u32 *current_dma_ptr;
@ -62,7 +62,7 @@ typedef struct _drm_mga_freelist {
#define MGA_IN_GETBUF 3
typedef struct _drm_mga_private {
u32 dispatch_status;
long dispatch_status; /* long req'd for set_bit() --RR */
unsigned int next_prim_age;
__volatile__ unsigned int last_prim_age;
int reserved_map_idx;

View File

@ -82,7 +82,9 @@ typedef struct drm_clip_rect {
#include "mga_drm.h"
#include "i810_drm.h"
#include "r128_drm.h"
#ifdef CONFIG_DRM_SIS
#include "sis_drm.h"
#endif
typedef struct drm_version {
int version_major; /* Major version */
@ -379,6 +381,7 @@ typedef struct drm_agp_info {
#define DRM_IOCTL_R128_STIPPLE DRM_IOW( 0x4d, drm_r128_stipple_t)
#define DRM_IOCTL_R128_PACKET DRM_IOWR(0x4e, drm_r128_packet_t)
#ifdef CONFIG_DRM_SIS
/* SiS specific ioctls */
#define SIS_IOCTL_FB_ALLOC DRM_IOWR( 0x44, drm_sis_mem_t)
#define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t)
@ -388,5 +391,6 @@ typedef struct drm_agp_info {
#define SIS_IOCTL_FLIP DRM_IOW( 0x48, drm_sis_flip_t)
#define SIS_IOCTL_FLIP_INIT DRM_IO( 0x49)
#define SIS_IOCTL_FLIP_FINAL DRM_IO( 0x50)
#endif
#endif

View File

@ -82,7 +82,9 @@ typedef struct drm_clip_rect {
#include "mga_drm.h"
#include "i810_drm.h"
#include "r128_drm.h"
#ifdef CONFIG_DRM_SIS
#include "sis_drm.h"
#endif
typedef struct drm_version {
int version_major; /* Major version */
@ -379,6 +381,7 @@ typedef struct drm_agp_info {
#define DRM_IOCTL_R128_STIPPLE DRM_IOW( 0x4d, drm_r128_stipple_t)
#define DRM_IOCTL_R128_PACKET DRM_IOWR(0x4e, drm_r128_packet_t)
#ifdef CONFIG_DRM_SIS
/* SiS specific ioctls */
#define SIS_IOCTL_FB_ALLOC DRM_IOWR( 0x44, drm_sis_mem_t)
#define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t)
@ -388,5 +391,6 @@ typedef struct drm_agp_info {
#define SIS_IOCTL_FLIP DRM_IOW( 0x48, drm_sis_flip_t)
#define SIS_IOCTL_FLIP_INIT DRM_IO( 0x49)
#define SIS_IOCTL_FLIP_FINAL DRM_IO( 0x50)
#endif
#endif