summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_bo.c3
-rw-r--r--linux-core/drm_fops.c5
-rw-r--r--linux-core/i915_drv.c1
3 files changed, 8 insertions, 1 deletions
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/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,