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:
"I didn't want these to wait for stable cycle.

The nouveau and radeon ones are the same problem, where the runtime pm
stuff broke non-runtime pm managed secondary GPUs.

The udl fix is for an oops on unplug, and the i915 fix is for a
regression on Sandybridge even though it may break haswell (regression
wins)"

Daniel Vetter comments:
"My apologies for the i915 regression fumble, that thing somehow fell
through the cracks here for almost half a year :( Imo that's more than
enough flailing to just go ahead with the revert, and the re-broken
hsw should get peoples attention ..."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/i915: Undo gtt scratch pte unmapping again
drm/radeon: fix runtime suspend breaking secondary GPUs
drm/nouveau: fail runtime pm properly.
drm/udl: take reference to device struct for dma-bufs

+31 -13
+1 -1
drivers/gpu/drm/i915/i915_gem_gtt.c
··· 842 842 dev_priv->gtt.base.clear_range(&dev_priv->gtt.base, 843 843 dev_priv->gtt.base.start / PAGE_SIZE, 844 844 dev_priv->gtt.base.total / PAGE_SIZE, 845 - false); 845 + true); 846 846 } 847 847 848 848 void i915_gem_restore_gtt_mappings(struct drm_device *dev)
+10 -4
drivers/gpu/drm/nouveau/nouveau_drm.c
··· 866 866 struct drm_device *drm_dev = pci_get_drvdata(pdev); 867 867 int ret; 868 868 869 - if (nouveau_runtime_pm == 0) 870 - return -EINVAL; 869 + if (nouveau_runtime_pm == 0) { 870 + pm_runtime_forbid(dev); 871 + return -EBUSY; 872 + } 871 873 872 874 /* are we optimus enabled? */ 873 875 if (nouveau_runtime_pm == -1 && !nouveau_is_optimus() && !nouveau_is_v1_dsm()) { 874 876 DRM_DEBUG_DRIVER("failing to power off - not optimus\n"); 875 - return -EINVAL; 877 + pm_runtime_forbid(dev); 878 + return -EBUSY; 876 879 } 877 880 878 881 nv_debug_level(SILENT); ··· 926 923 struct nouveau_drm *drm = nouveau_drm(drm_dev); 927 924 struct drm_crtc *crtc; 928 925 929 - if (nouveau_runtime_pm == 0) 926 + if (nouveau_runtime_pm == 0) { 927 + pm_runtime_forbid(dev); 930 928 return -EBUSY; 929 + } 931 930 932 931 /* are we optimus enabled? */ 933 932 if (nouveau_runtime_pm == -1 && !nouveau_is_optimus() && !nouveau_is_v1_dsm()) { 934 933 DRM_DEBUG_DRIVER("failing to power off - not optimus\n"); 934 + pm_runtime_forbid(dev); 935 935 return -EBUSY; 936 936 } 937 937
+12 -5
drivers/gpu/drm/radeon/radeon_drv.c
··· 403 403 struct drm_device *drm_dev = pci_get_drvdata(pdev); 404 404 int ret; 405 405 406 - if (radeon_runtime_pm == 0) 407 - return -EINVAL; 406 + if (radeon_runtime_pm == 0) { 407 + pm_runtime_forbid(dev); 408 + return -EBUSY; 409 + } 408 410 409 - if (radeon_runtime_pm == -1 && !radeon_is_px()) 410 - return -EINVAL; 411 + if (radeon_runtime_pm == -1 && !radeon_is_px()) { 412 + pm_runtime_forbid(dev); 413 + return -EBUSY; 414 + } 411 415 412 416 drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; 413 417 drm_kms_helper_poll_disable(drm_dev); ··· 460 456 struct drm_device *drm_dev = pci_get_drvdata(pdev); 461 457 struct drm_crtc *crtc; 462 458 463 - if (radeon_runtime_pm == 0) 459 + if (radeon_runtime_pm == 0) { 460 + pm_runtime_forbid(dev); 464 461 return -EBUSY; 462 + } 465 463 466 464 /* are we PX enabled? */ 467 465 if (radeon_runtime_pm == -1 && !radeon_is_px()) { 468 466 DRM_DEBUG_DRIVER("failing to power off - not px\n"); 467 + pm_runtime_forbid(dev); 469 468 return -EBUSY; 470 469 } 471 470
+8 -3
drivers/gpu/drm/udl/udl_gem.c
··· 177 177 if (obj->vmapping) 178 178 udl_gem_vunmap(obj); 179 179 180 - if (gem_obj->import_attach) 180 + if (gem_obj->import_attach) { 181 181 drm_prime_gem_destroy(gem_obj, obj->sg); 182 + put_device(gem_obj->dev->dev); 183 + } 182 184 183 185 if (obj->pages) 184 186 udl_gem_put_pages(obj); ··· 258 256 int ret; 259 257 260 258 /* need to attach */ 259 + get_device(dev->dev); 261 260 attach = dma_buf_attach(dma_buf, dev->dev); 262 - if (IS_ERR(attach)) 261 + if (IS_ERR(attach)) { 262 + put_device(dev->dev); 263 263 return ERR_CAST(attach); 264 + } 264 265 265 266 get_dma_buf(dma_buf); 266 267 ··· 287 282 fail_detach: 288 283 dma_buf_detach(dma_buf, attach); 289 284 dma_buf_put(dma_buf); 290 - 285 + put_device(dev->dev); 291 286 return ERR_PTR(ret); 292 287 }