diff options
author | Dave Airlie <airlied@redhat.com> | 2013-03-07 17:28:22 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-03-07 17:28:22 -0500 |
commit | 9d6245263c16fd9374cc9693054255cbb7bdfd50 (patch) | |
tree | 9cdd689cf31af822bff13fb964049627051b9b52 | |
parent | 2cc79544bd0aabb4b3cf467ead5df526d9134c64 (diff) | |
parent | 774c389fae5e5a78a4aa75f927ab59fa0ff8a0d2 (diff) |
Merge branch 'drm-fixes-3.9' of git://people.freedesktop.org/~agd5f/linux into drm-next
Alex writes:
Radeon fixes pull. Not much to it.
- fix some splatter if the interrupt handler isn't registered
- Add a quirk for an old R200 board to fix washed out colors on the DAC
- Don't try and soft reset the MC when we reset the GPU. It usually doesn't
need it and doesn't always work reliably.
- A CS checker fix from Marek
* 'drm-fixes-3.9' of git://people.freedesktop.org/~agd5f/linux:
drm/radeon: don't check mipmap alignment if MIP_ADDRESS is FMASK
drm/radeon: skip MC reset as it's probably not hung
drm/radeon: add primary dac adj quirk for R200 board
drm/radeon: don't set hpd, afmt interrupts when interrupts are disabled
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen_cs.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/ni.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_combios.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_irq_kms.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/si.c | 6 |
8 files changed, 48 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 3c38ea46531c..305a657bf215 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -2438,6 +2438,12 @@ static u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev) | |||
2438 | if (tmp & L2_BUSY) | 2438 | if (tmp & L2_BUSY) |
2439 | reset_mask |= RADEON_RESET_VMC; | 2439 | reset_mask |= RADEON_RESET_VMC; |
2440 | 2440 | ||
2441 | /* Skip MC reset as it's mostly likely not hung, just busy */ | ||
2442 | if (reset_mask & RADEON_RESET_MC) { | ||
2443 | DRM_DEBUG("MC busy: 0x%08X, clearing.\n", reset_mask); | ||
2444 | reset_mask &= ~RADEON_RESET_MC; | ||
2445 | } | ||
2446 | |||
2441 | return reset_mask; | 2447 | return reset_mask; |
2442 | } | 2448 | } |
2443 | 2449 | ||
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index 99fb13286fd0..eb8ac315f92f 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c | |||
@@ -834,7 +834,7 @@ static int evergreen_cs_track_validate_texture(struct radeon_cs_parser *p, | |||
834 | __func__, __LINE__, toffset, surf.base_align); | 834 | __func__, __LINE__, toffset, surf.base_align); |
835 | return -EINVAL; | 835 | return -EINVAL; |
836 | } | 836 | } |
837 | if (moffset & (surf.base_align - 1)) { | 837 | if (surf.nsamples <= 1 && moffset & (surf.base_align - 1)) { |
838 | dev_warn(p->dev, "%s:%d mipmap bo base %ld not aligned with %ld\n", | 838 | dev_warn(p->dev, "%s:%d mipmap bo base %ld not aligned with %ld\n", |
839 | __func__, __LINE__, moffset, surf.base_align); | 839 | __func__, __LINE__, moffset, surf.base_align); |
840 | return -EINVAL; | 840 | return -EINVAL; |
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 7cead763be9e..d4c633e12863 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -1381,6 +1381,12 @@ static u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev) | |||
1381 | if (tmp & L2_BUSY) | 1381 | if (tmp & L2_BUSY) |
1382 | reset_mask |= RADEON_RESET_VMC; | 1382 | reset_mask |= RADEON_RESET_VMC; |
1383 | 1383 | ||
1384 | /* Skip MC reset as it's mostly likely not hung, just busy */ | ||
1385 | if (reset_mask & RADEON_RESET_MC) { | ||
1386 | DRM_DEBUG("MC busy: 0x%08X, clearing.\n", reset_mask); | ||
1387 | reset_mask &= ~RADEON_RESET_MC; | ||
1388 | } | ||
1389 | |||
1384 | return reset_mask; | 1390 | return reset_mask; |
1385 | } | 1391 | } |
1386 | 1392 | ||
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 6d4b5611daf4..0740db3fcd22 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -1394,6 +1394,12 @@ static u32 r600_gpu_check_soft_reset(struct radeon_device *rdev) | |||
1394 | if (r600_is_display_hung(rdev)) | 1394 | if (r600_is_display_hung(rdev)) |
1395 | reset_mask |= RADEON_RESET_DISPLAY; | 1395 | reset_mask |= RADEON_RESET_DISPLAY; |
1396 | 1396 | ||
1397 | /* Skip MC reset as it's mostly likely not hung, just busy */ | ||
1398 | if (reset_mask & RADEON_RESET_MC) { | ||
1399 | DRM_DEBUG("MC busy: 0x%08X, clearing.\n", reset_mask); | ||
1400 | reset_mask &= ~RADEON_RESET_MC; | ||
1401 | } | ||
1402 | |||
1397 | return reset_mask; | 1403 | return reset_mask; |
1398 | } | 1404 | } |
1399 | 1405 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index 3e403bdda58f..78edadc9e86b 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c | |||
@@ -970,6 +970,15 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct | |||
970 | found = 1; | 970 | found = 1; |
971 | } | 971 | } |
972 | 972 | ||
973 | /* quirks */ | ||
974 | /* Radeon 9100 (R200) */ | ||
975 | if ((dev->pdev->device == 0x514D) && | ||
976 | (dev->pdev->subsystem_vendor == 0x174B) && | ||
977 | (dev->pdev->subsystem_device == 0x7149)) { | ||
978 | /* vbios value is bad, use the default */ | ||
979 | found = 0; | ||
980 | } | ||
981 | |||
973 | if (!found) /* fallback to defaults */ | 982 | if (!found) /* fallback to defaults */ |
974 | radeon_legacy_get_primary_dac_info_from_table(rdev, p_dac); | 983 | radeon_legacy_get_primary_dac_info_from_table(rdev, p_dac); |
975 | 984 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 167758488ed6..66a7f0fd9620 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -70,9 +70,10 @@ | |||
70 | * 2.27.0 - r600-SI: Add CS ioctl support for async DMA | 70 | * 2.27.0 - r600-SI: Add CS ioctl support for async DMA |
71 | * 2.28.0 - r600-eg: Add MEM_WRITE packet support | 71 | * 2.28.0 - r600-eg: Add MEM_WRITE packet support |
72 | * 2.29.0 - R500 FP16 color clear registers | 72 | * 2.29.0 - R500 FP16 color clear registers |
73 | * 2.30.0 - fix for FMASK texturing | ||
73 | */ | 74 | */ |
74 | #define KMS_DRIVER_MAJOR 2 | 75 | #define KMS_DRIVER_MAJOR 2 |
75 | #define KMS_DRIVER_MINOR 29 | 76 | #define KMS_DRIVER_MINOR 30 |
76 | #define KMS_DRIVER_PATCHLEVEL 0 | 77 | #define KMS_DRIVER_PATCHLEVEL 0 |
77 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); | 78 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); |
78 | int radeon_driver_unload_kms(struct drm_device *dev); | 79 | int radeon_driver_unload_kms(struct drm_device *dev); |
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index 90374dd77960..48f80cd42d8f 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c | |||
@@ -400,6 +400,9 @@ void radeon_irq_kms_enable_afmt(struct radeon_device *rdev, int block) | |||
400 | { | 400 | { |
401 | unsigned long irqflags; | 401 | unsigned long irqflags; |
402 | 402 | ||
403 | if (!rdev->ddev->irq_enabled) | ||
404 | return; | ||
405 | |||
403 | spin_lock_irqsave(&rdev->irq.lock, irqflags); | 406 | spin_lock_irqsave(&rdev->irq.lock, irqflags); |
404 | rdev->irq.afmt[block] = true; | 407 | rdev->irq.afmt[block] = true; |
405 | radeon_irq_set(rdev); | 408 | radeon_irq_set(rdev); |
@@ -419,6 +422,9 @@ void radeon_irq_kms_disable_afmt(struct radeon_device *rdev, int block) | |||
419 | { | 422 | { |
420 | unsigned long irqflags; | 423 | unsigned long irqflags; |
421 | 424 | ||
425 | if (!rdev->ddev->irq_enabled) | ||
426 | return; | ||
427 | |||
422 | spin_lock_irqsave(&rdev->irq.lock, irqflags); | 428 | spin_lock_irqsave(&rdev->irq.lock, irqflags); |
423 | rdev->irq.afmt[block] = false; | 429 | rdev->irq.afmt[block] = false; |
424 | radeon_irq_set(rdev); | 430 | radeon_irq_set(rdev); |
@@ -438,6 +444,9 @@ void radeon_irq_kms_enable_hpd(struct radeon_device *rdev, unsigned hpd_mask) | |||
438 | unsigned long irqflags; | 444 | unsigned long irqflags; |
439 | int i; | 445 | int i; |
440 | 446 | ||
447 | if (!rdev->ddev->irq_enabled) | ||
448 | return; | ||
449 | |||
441 | spin_lock_irqsave(&rdev->irq.lock, irqflags); | 450 | spin_lock_irqsave(&rdev->irq.lock, irqflags); |
442 | for (i = 0; i < RADEON_MAX_HPD_PINS; ++i) | 451 | for (i = 0; i < RADEON_MAX_HPD_PINS; ++i) |
443 | rdev->irq.hpd[i] |= !!(hpd_mask & (1 << i)); | 452 | rdev->irq.hpd[i] |= !!(hpd_mask & (1 << i)); |
@@ -458,6 +467,9 @@ void radeon_irq_kms_disable_hpd(struct radeon_device *rdev, unsigned hpd_mask) | |||
458 | unsigned long irqflags; | 467 | unsigned long irqflags; |
459 | int i; | 468 | int i; |
460 | 469 | ||
470 | if (!rdev->ddev->irq_enabled) | ||
471 | return; | ||
472 | |||
461 | spin_lock_irqsave(&rdev->irq.lock, irqflags); | 473 | spin_lock_irqsave(&rdev->irq.lock, irqflags); |
462 | for (i = 0; i < RADEON_MAX_HPD_PINS; ++i) | 474 | for (i = 0; i < RADEON_MAX_HPD_PINS; ++i) |
463 | rdev->irq.hpd[i] &= !(hpd_mask & (1 << i)); | 475 | rdev->irq.hpd[i] &= !(hpd_mask & (1 << i)); |
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index 80979ed951eb..9128120da044 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -2284,6 +2284,12 @@ static u32 si_gpu_check_soft_reset(struct radeon_device *rdev) | |||
2284 | if (tmp & L2_BUSY) | 2284 | if (tmp & L2_BUSY) |
2285 | reset_mask |= RADEON_RESET_VMC; | 2285 | reset_mask |= RADEON_RESET_VMC; |
2286 | 2286 | ||
2287 | /* Skip MC reset as it's mostly likely not hung, just busy */ | ||
2288 | if (reset_mask & RADEON_RESET_MC) { | ||
2289 | DRM_DEBUG("MC busy: 0x%08X, clearing.\n", reset_mask); | ||
2290 | reset_mask &= ~RADEON_RESET_MC; | ||
2291 | } | ||
2292 | |||
2287 | return reset_mask; | 2293 | return reset_mask; |
2288 | } | 2294 | } |
2289 | 2295 | ||