summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/Makefile.kernel6
-rw-r--r--linux-core/drm_bo.c3
-rw-r--r--linux-core/drm_fops.c5
-rw-r--r--linux-core/drm_vm.c14
-rw-r--r--linux-core/i915_drv.c1
l---------linux-core/nv04_fb.c1
l---------linux-core/nv04_mc.c1
l---------linux-core/nv04_timer.c1
l---------linux-core/nv10_fb.c1
l---------linux-core/nv40_fb.c1
l---------linux-core/nv40_mc.c1
11 files changed, 23 insertions, 12 deletions
diff --git a/linux-core/Makefile.kernel b/linux-core/Makefile.kernel
index 81a94331..6f5b021b 100644
--- a/linux-core/Makefile.kernel
+++ b/linux-core/Makefile.kernel
@@ -21,7 +21,11 @@ i810-objs := i810_drv.o i810_dma.o
i915-objs := i915_drv.o i915_dma.o i915_irq.o i915_mem.o i915_fence.o \
i915_buffer.o
nouveau-objs := nouveau_drv.o nouveau_state.o nouveau_fifo.o nouveau_mem.o \
- nouveau_object.o nouveau_irq.o nv04_graph.o nv10_graph.o nv20_graph.o nv30_graph.o \
+ nouveau_object.o nouveau_irq.o \
+ nv04_timer.o \
+ nv04_mc.o nv40_mc.o \
+ nv04_fb.o nv10_fb.o nv40_fb.o \
+ nv04_graph.o nv10_graph.o nv20_graph.o nv30_graph.o \
nv40_graph.o
radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o r300_cmdbuf.o
sis-objs := sis_drv.o sis_mm.o
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index d3e89af6..1bdc6fef 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -832,6 +832,9 @@ int drm_bo_mem_space(drm_buffer_object_t * bo,
mem_type = prios[i];
man = &bm->man[mem_type];
+ if (!man->has_type)
+ continue;
+
if (!drm_bo_mt_compatible(man, mem_type, mem->mask, &cur_flags))
continue;
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c
index 3521c092..d400a4d5 100644
--- a/linux-core/drm_fops.c
+++ b/linux-core/drm_fops.c
@@ -154,10 +154,13 @@ int drm_open(struct inode *inode, struct file *filp)
spin_lock(&dev->count_lock);
if (!dev->open_count++) {
spin_unlock(&dev->count_lock);
- return drm_setup(dev);
+ retcode = drm_setup(dev);
+ goto out;
}
spin_unlock(&dev->count_lock);
}
+
+ out:
mutex_lock(&dev->struct_mutex);
BUG_ON((dev->dev_mapping != NULL) &&
(dev->dev_mapping != inode->i_mapping));
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index 775ca878..54a0849f 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -596,13 +596,12 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
)
return drm_mmap_dma(filp, vma);
- if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff , &hash)) {
+ if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash)) {
DRM_ERROR("Could not find map\n");
return -EINVAL;
}
- map = drm_hash_entry(hash,drm_map_list_t, hash)->map;
-
+ map = drm_hash_entry(hash, drm_map_list_t, hash)->map;
if (!map || ((map->flags & _DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN)))
return -EPERM;
@@ -647,16 +646,11 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
vma->vm_page_prot = drm_io_prot(map->type, vma);
#ifdef __sparc__
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+#endif
if (io_remap_pfn_range(vma, vma->vm_start,
- (map->offset + offset) >>PAGE_SHIFT,
+ (map->offset + offset) >> PAGE_SHIFT,
vma->vm_end - vma->vm_start,
vma->vm_page_prot))
-#else
- if (remap_pfn_range(vma, vma->vm_start,
- (map->offset + offset) >> PAGE_SHIFT,
- vma->vm_end - vma->vm_start,
- vma->vm_page_prot))
-#endif
return -EAGAIN;
DRM_DEBUG(" Type = %d; start = 0x%lx, end = 0x%lx,"
" offset = 0x%lx\n",
diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c
index 56e5998f..7fdb0839 100644
--- a/linux-core/i915_drv.c
+++ b/linux-core/i915_drv.c
@@ -79,6 +79,7 @@ static struct drm_driver driver = {
DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL |
DRIVER_IRQ_VBL2,
.load = i915_driver_load,
+ .firstopen = i915_driver_firstopen,
.lastclose = i915_driver_lastclose,
.preclose = i915_driver_preclose,
.device_is_agp = i915_driver_device_is_agp,
diff --git a/linux-core/nv04_fb.c b/linux-core/nv04_fb.c
new file mode 120000
index 00000000..867e2007
--- /dev/null
+++ b/linux-core/nv04_fb.c
@@ -0,0 +1 @@
+../shared-core/nv04_fb.c \ No newline at end of file
diff --git a/linux-core/nv04_mc.c b/linux-core/nv04_mc.c
new file mode 120000
index 00000000..32e91825
--- /dev/null
+++ b/linux-core/nv04_mc.c
@@ -0,0 +1 @@
+../shared-core/nv04_mc.c \ No newline at end of file
diff --git a/linux-core/nv04_timer.c b/linux-core/nv04_timer.c
new file mode 120000
index 00000000..11108b2b
--- /dev/null
+++ b/linux-core/nv04_timer.c
@@ -0,0 +1 @@
+../shared-core/nv04_timer.c \ No newline at end of file
diff --git a/linux-core/nv10_fb.c b/linux-core/nv10_fb.c
new file mode 120000
index 00000000..f858c7c6
--- /dev/null
+++ b/linux-core/nv10_fb.c
@@ -0,0 +1 @@
+../shared-core/nv10_fb.c \ No newline at end of file
diff --git a/linux-core/nv40_fb.c b/linux-core/nv40_fb.c
new file mode 120000
index 00000000..4a816b13
--- /dev/null
+++ b/linux-core/nv40_fb.c
@@ -0,0 +1 @@
+../shared-core/nv40_fb.c \ No newline at end of file
diff --git a/linux-core/nv40_mc.c b/linux-core/nv40_mc.c
new file mode 120000
index 00000000..fff26494
--- /dev/null
+++ b/linux-core/nv40_mc.c
@@ -0,0 +1 @@
+../shared-core/nv40_mc.c \ No newline at end of file