History

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

A few more radeon fixes. * 'drm-fixes-3.14' of git://people.freedesktop.org/~agd5f/linux: drm/radeon/cik: properly set compute ring status on disable drm/radeon/cik: stop the sdma engines in the enable() function drm/radeon/cik: properly set sdma ring status on disable drm/radeon: fix runpm disabling on non-PX harder

Dave Airlie committed 12 years ago

Commit bf21d602 parents 7aa4a06 b2b3d8d3 files · +20 −9Browse files

Unified · Split

3 files
  1. drivers/gpu/drm/radeon/cik.c +4 −1
  2. drivers/gpu/drm/radeon/cik_sdma.c +7 −7
  3. drivers/gpu/drm/radeon/radeon_kms.c +9 −1
drivers/gpu/drm/radeon/cik.c+4−1
@@ -4134,8 +4134,11 @@ static void cik_cp_compute_enable(struct radeon_device *rdev, bool enable) · 4133 unmodified lines
4134{4134{
4135 if (enable)4135 if (enable)
4136 WREG32(CP_MEC_CNTL, 0);4136 WREG32(CP_MEC_CNTL, 0);
4137 else4137 else {
4138 WREG32(CP_MEC_CNTL, (MEC_ME1_HALT | MEC_ME2_HALT));4138 WREG32(CP_MEC_CNTL, (MEC_ME1_HALT | MEC_ME2_HALT));
4139 rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX].ready = false;
4140 rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX].ready = false;
4141 }
4139 udelay(50);4142 udelay(50);
4140}4143}
4141 4144
drivers/gpu/drm/radeon/cik_sdma.c+7−7
@@ -264,6 +264,8 @@ static void cik_sdma_gfx_stop(struct radeon_device *rdev) · 263 unmodified lines
264 WREG32(SDMA0_GFX_RB_CNTL + reg_offset, rb_cntl);264 WREG32(SDMA0_GFX_RB_CNTL + reg_offset, rb_cntl);
265 WREG32(SDMA0_GFX_IB_CNTL + reg_offset, 0);265 WREG32(SDMA0_GFX_IB_CNTL + reg_offset, 0);
266 }266 }
267 rdev->ring[R600_RING_TYPE_DMA_INDEX].ready = false;
268 rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX].ready = false;
267}269}
268 270
269/**271/**
@@ -291,6 +293,11 @@ void cik_sdma_enable(struct radeon_device *rdev, bool enable) · 21 unmodified lines
291 u32 me_cntl, reg_offset;293 u32 me_cntl, reg_offset;
292 int i;294 int i;
293 295
296 if (enable == false) {
297 cik_sdma_gfx_stop(rdev);
298 cik_sdma_rlc_stop(rdev);
299 }
300
294 for (i = 0; i < 2; i++) {301 for (i = 0; i < 2; i++) {
295 if (i == 0)302 if (i == 0)
296 reg_offset = SDMA0_REGISTER_OFFSET;303 reg_offset = SDMA0_REGISTER_OFFSET;
@@ -420,10 +427,6 @@ static int cik_sdma_load_microcode(struct radeon_device *rdev) · 123 unmodified lines
420 if (!rdev->sdma_fw)427 if (!rdev->sdma_fw)
421 return -EINVAL;428 return -EINVAL;
422 429
423 /* stop the gfx rings and rlc compute queues */
424 cik_sdma_gfx_stop(rdev);
425 cik_sdma_rlc_stop(rdev);
426
427 /* halt the MEs */430 /* halt the MEs */
428 cik_sdma_enable(rdev, false);431 cik_sdma_enable(rdev, false);
429 432
@@ -492,9 +495,6 @@ int cik_sdma_resume(struct radeon_device *rdev) · 62 unmodified lines
492 */495 */
493void cik_sdma_fini(struct radeon_device *rdev)496void cik_sdma_fini(struct radeon_device *rdev)
494{497{
495 /* stop the gfx rings and rlc compute queues */
496 cik_sdma_gfx_stop(rdev);
497 cik_sdma_rlc_stop(rdev);
498 /* halt the MEs */498 /* halt the MEs */
499 cik_sdma_enable(rdev, false);499 cik_sdma_enable(rdev, false);
500 radeon_ring_fini(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX]);500 radeon_ring_fini(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX]);
drivers/gpu/drm/radeon/radeon_kms.c+9−1
@@ -33,6 +33,13 @@ · 32 unmodified lines
33#include <linux/vga_switcheroo.h>33#include <linux/vga_switcheroo.h>
34#include <linux/slab.h>34#include <linux/slab.h>
35#include <linux/pm_runtime.h>35#include <linux/pm_runtime.h>
36
37#if defined(CONFIG_VGA_SWITCHEROO)
38bool radeon_is_px(void);
39#else
40static inline bool radeon_is_px(void) { return false; }
41#endif
42
36/**43/**
37 * radeon_driver_unload_kms - Main unload function for KMS.44 * radeon_driver_unload_kms - Main unload function for KMS.
38 *45 *
@@ -130,7 +137,8 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags) · 91 unmodified lines
130 "Error during ACPI methods call\n");137 "Error during ACPI methods call\n");
131 }138 }
132 139
133 if (radeon_runtime_pm != 0) {140 if ((radeon_runtime_pm == 1) ||
141 ((radeon_runtime_pm == -1) && radeon_is_px())) {
134 pm_runtime_use_autosuspend(dev->dev);142 pm_runtime_use_autosuspend(dev->dev);
135 pm_runtime_set_autosuspend_delay(dev->dev, 5000);143 pm_runtime_set_autosuspend_delay(dev->dev, 5000);
136 pm_runtime_set_active(dev->dev);144 pm_runtime_set_active(dev->dev);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t