mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-07 15:49:02 +02:00
drm/ttm: make sure dev_mapping is set-up for the first opener of the drm
This was causing an oops in my miniglx code to try and use a TTM-only setup.
This commit is contained in:
parent
674cefd4fe
commit
72a1190f6d
1 changed files with 4 additions and 1 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue