From: Alex Deucher Date: Sat, 27 Aug 2016 18:53:08 +0000 (-0400) Subject: drm/amdgpu: set runtime pm state to active on resume X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=85e154c22e3c29d4db52ccc1c1cc58a2cadc103b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: set runtime pm state to active on resume The sbios always powers up the dGPU on resume. Acked-by: Michel Dänzer Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 28c3dcc170cc..94d013526e8e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -482,6 +482,14 @@ static int amdgpu_pmops_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct drm_device *drm_dev = pci_get_drvdata(pdev); + + /* GPU comes up enabled by the bios on resume */ + if (amdgpu_device_is_px(drm_dev)) { + pm_runtime_disable(dev); + pm_runtime_set_active(dev); + pm_runtime_enable(dev); + } + return amdgpu_device_resume(drm_dev, true, true); }