Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
"A single radeon typo fix for a regressions and two fixes for a
regression in the open helper address space stuff."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/radeon: fix typo in evergreen_mc_resume()
drm: set dev_mapping before calling drm_open_helper
drm: restore open_count if drm_setup fails

+33 -17
+32 -16
drivers/gpu/drm/drm_fops.c
··· 121 121 int minor_id = iminor(inode); 122 122 struct drm_minor *minor; 123 123 int retcode = 0; 124 + int need_setup = 0; 125 + struct address_space *old_mapping; 124 126 125 127 minor = idr_find(&drm_minors_idr, minor_id); 126 128 if (!minor) ··· 134 132 if (drm_device_is_unplugged(dev)) 135 133 return -ENODEV; 136 134 137 - retcode = drm_open_helper(inode, filp, dev); 138 - if (!retcode) { 139 - atomic_inc(&dev->counts[_DRM_STAT_OPENS]); 140 - if (!dev->open_count++) 141 - retcode = drm_setup(dev); 142 - } 143 - if (!retcode) { 144 - mutex_lock(&dev->struct_mutex); 145 - if (dev->dev_mapping == NULL) 146 - dev->dev_mapping = &inode->i_data; 147 - /* ihold ensures nobody can remove inode with our i_data */ 148 - ihold(container_of(dev->dev_mapping, struct inode, i_data)); 149 - inode->i_mapping = dev->dev_mapping; 150 - filp->f_mapping = dev->dev_mapping; 151 - mutex_unlock(&dev->struct_mutex); 152 - } 135 + if (!dev->open_count++) 136 + need_setup = 1; 137 + mutex_lock(&dev->struct_mutex); 138 + old_mapping = dev->dev_mapping; 139 + if (old_mapping == NULL) 140 + dev->dev_mapping = &inode->i_data; 141 + /* ihold ensures nobody can remove inode with our i_data */ 142 + ihold(container_of(dev->dev_mapping, struct inode, i_data)); 143 + inode->i_mapping = dev->dev_mapping; 144 + filp->f_mapping = dev->dev_mapping; 145 + mutex_unlock(&dev->struct_mutex); 153 146 147 + retcode = drm_open_helper(inode, filp, dev); 148 + if (retcode) 149 + goto err_undo; 150 + atomic_inc(&dev->counts[_DRM_STAT_OPENS]); 151 + if (need_setup) { 152 + retcode = drm_setup(dev); 153 + if (retcode) 154 + goto err_undo; 155 + } 156 + return 0; 157 + 158 + err_undo: 159 + mutex_lock(&dev->struct_mutex); 160 + filp->f_mapping = old_mapping; 161 + inode->i_mapping = old_mapping; 162 + iput(container_of(dev->dev_mapping, struct inode, i_data)); 163 + dev->dev_mapping = old_mapping; 164 + mutex_unlock(&dev->struct_mutex); 165 + dev->open_count--; 154 166 return retcode; 155 167 } 156 168 EXPORT_SYMBOL(drm_open);
+1 -1
drivers/gpu/drm/radeon/evergreen.c
··· 1372 1372 WREG32(BIF_FB_EN, FB_READ_EN | FB_WRITE_EN); 1373 1373 1374 1374 for (i = 0; i < rdev->num_crtc; i++) { 1375 - if (save->crtc_enabled) { 1375 + if (save->crtc_enabled[i]) { 1376 1376 if (ASIC_IS_DCE6(rdev)) { 1377 1377 tmp = RREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i]); 1378 1378 tmp |= EVERGREEN_CRTC_BLANK_DATA_EN;