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
41344134 {
41354135 if (enable)
41364136 WREG32(CP_MEC_CNTL, 0);
4137− else
4137+ else {
41384138 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+ }
41394142 udelay(50);
41404143 }
41414144
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
264264 WREG32(SDMA0_GFX_RB_CNTL + reg_offset, rb_cntl);
265265 WREG32(SDMA0_GFX_IB_CNTL + reg_offset, 0);
266266 }
267+ rdev->ring[R600_RING_TYPE_DMA_INDEX].ready = false;
268+ rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX].ready = false;
267269 }
268270
269271 /**
@@ -291,6 +293,11 @@ void cik_sdma_enable(struct radeon_device *rdev, bool enable) · 21 unmodified lines
291293 u32 me_cntl, reg_offset;
292294 int i;
293295
296+ if (enable == false) {
297+ cik_sdma_gfx_stop(rdev);
298+ cik_sdma_rlc_stop(rdev);
299+ }
300+
294301 for (i = 0; i < 2; i++) {
295302 if (i == 0)
296303 reg_offset = SDMA0_REGISTER_OFFSET;
@@ -420,10 +427,6 @@ static int cik_sdma_load_microcode(struct radeon_device *rdev) · 123 unmodified lines
420427 if (!rdev->sdma_fw)
421428 return -EINVAL;
422429
423− /* stop the gfx rings and rlc compute queues */
424− cik_sdma_gfx_stop(rdev);
425− cik_sdma_rlc_stop(rdev);
426−
427430 /* halt the MEs */
428431 cik_sdma_enable(rdev, false);
429432
@@ -492,9 +495,6 @@ int cik_sdma_resume(struct radeon_device *rdev) · 62 unmodified lines
492495 */
493496 void cik_sdma_fini(struct radeon_device *rdev)
494497 {
495− /* stop the gfx rings and rlc compute queues */
496− cik_sdma_gfx_stop(rdev);
497− cik_sdma_rlc_stop(rdev);
498498 /* halt the MEs */
499499 cik_sdma_enable(rdev, false);
500500 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
3333 #include <linux/vga_switcheroo.h>
3434 #include <linux/slab.h>
3535 #include <linux/pm_runtime.h>
36+
37+#if defined(CONFIG_VGA_SWITCHEROO)
38+bool radeon_is_px(void);
39+#else
40+static inline bool radeon_is_px(void) { return false; }
41+#endif
42+
3643 /**
3744 * radeon_driver_unload_kms - Main unload function for KMS.
3845 *
@@ -130,7 +137,8 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags) · 91 unmodified lines
130137 "Error during ACPI methods call\n");
131138 }
132139
133− if (radeon_runtime_pm != 0) {
140+ if ((radeon_runtime_pm == 1) ||
141+ ((radeon_runtime_pm == -1) && radeon_is_px())) {
134142 pm_runtime_use_autosuspend(dev->dev);
135143 pm_runtime_set_autosuspend_delay(dev->dev, 5000);
136144 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