diff options
| -rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 27 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 20 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/rv770.c | 2 |
3 files changed, 3 insertions, 46 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index e201a88caf59..a8973acb3987 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
| @@ -3002,31 +3002,6 @@ int evergreen_copy_blit(struct radeon_device *rdev, | |||
| 3002 | return 0; | 3002 | return 0; |
| 3003 | } | 3003 | } |
| 3004 | 3004 | ||
| 3005 | static bool evergreen_card_posted(struct radeon_device *rdev) | ||
| 3006 | { | ||
| 3007 | u32 reg; | ||
| 3008 | |||
| 3009 | /* first check CRTCs */ | ||
| 3010 | if (rdev->flags & RADEON_IS_IGP) | ||
| 3011 | reg = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET) | | ||
| 3012 | RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET); | ||
| 3013 | else | ||
| 3014 | reg = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET) | | ||
| 3015 | RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET) | | ||
| 3016 | RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET) | | ||
| 3017 | RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET) | | ||
| 3018 | RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET) | | ||
| 3019 | RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET); | ||
| 3020 | if (reg & EVERGREEN_CRTC_MASTER_EN) | ||
| 3021 | return true; | ||
| 3022 | |||
| 3023 | /* then check MEM_SIZE, in case the crtcs are off */ | ||
| 3024 | if (RREG32(CONFIG_MEMSIZE)) | ||
| 3025 | return true; | ||
| 3026 | |||
| 3027 | return false; | ||
| 3028 | } | ||
| 3029 | |||
| 3030 | /* Plan is to move initialization in that function and use | 3005 | /* Plan is to move initialization in that function and use |
| 3031 | * helper function so that radeon_device_init pretty much | 3006 | * helper function so that radeon_device_init pretty much |
| 3032 | * do nothing more than calling asic specific function. This | 3007 | * do nothing more than calling asic specific function. This |
| @@ -3063,7 +3038,7 @@ int evergreen_init(struct radeon_device *rdev) | |||
| 3063 | if (radeon_asic_reset(rdev)) | 3038 | if (radeon_asic_reset(rdev)) |
| 3064 | dev_warn(rdev->dev, "GPU reset failed !\n"); | 3039 | dev_warn(rdev->dev, "GPU reset failed !\n"); |
| 3065 | /* Post card if necessary */ | 3040 | /* Post card if necessary */ |
| 3066 | if (!evergreen_card_posted(rdev)) { | 3041 | if (!radeon_card_posted(rdev)) { |
| 3067 | if (!rdev->bios) { | 3042 | if (!rdev->bios) { |
| 3068 | dev_err(rdev->dev, "Card not posted and no BIOS - ignoring\n"); | 3043 | dev_err(rdev->dev, "Card not posted and no BIOS - ignoring\n"); |
| 3069 | return -EINVAL; | 3044 | return -EINVAL; |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 9fe86253cfcd..aca2236268fa 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
| @@ -2358,24 +2358,6 @@ void r600_clear_surface_reg(struct radeon_device *rdev, int reg) | |||
| 2358 | /* FIXME: implement */ | 2358 | /* FIXME: implement */ |
| 2359 | } | 2359 | } |
| 2360 | 2360 | ||
| 2361 | |||
| 2362 | bool r600_card_posted(struct radeon_device *rdev) | ||
| 2363 | { | ||
| 2364 | uint32_t reg; | ||
| 2365 | |||
| 2366 | /* first check CRTCs */ | ||
| 2367 | reg = RREG32(D1CRTC_CONTROL) | | ||
| 2368 | RREG32(D2CRTC_CONTROL); | ||
| 2369 | if (reg & CRTC_EN) | ||
| 2370 | return true; | ||
| 2371 | |||
| 2372 | /* then check MEM_SIZE, in case the crtcs are off */ | ||
| 2373 | if (RREG32(CONFIG_MEMSIZE)) | ||
| 2374 | return true; | ||
| 2375 | |||
| 2376 | return false; | ||
| 2377 | } | ||
| 2378 | |||
| 2379 | int r600_startup(struct radeon_device *rdev) | 2361 | int r600_startup(struct radeon_device *rdev) |
| 2380 | { | 2362 | { |
| 2381 | int r; | 2363 | int r; |
| @@ -2536,7 +2518,7 @@ int r600_init(struct radeon_device *rdev) | |||
| 2536 | if (r) | 2518 | if (r) |
| 2537 | return r; | 2519 | return r; |
| 2538 | /* Post card if necessary */ | 2520 | /* Post card if necessary */ |
| 2539 | if (!r600_card_posted(rdev)) { | 2521 | if (!radeon_card_posted(rdev)) { |
| 2540 | if (!rdev->bios) { | 2522 | if (!rdev->bios) { |
| 2541 | dev_err(rdev->dev, "Card not posted and no BIOS - ignoring\n"); | 2523 | dev_err(rdev->dev, "Card not posted and no BIOS - ignoring\n"); |
| 2542 | return -EINVAL; | 2524 | return -EINVAL; |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index bd9ee90421e4..491dc9000655 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
| @@ -1268,7 +1268,7 @@ int rv770_init(struct radeon_device *rdev) | |||
| 1268 | if (r) | 1268 | if (r) |
| 1269 | return r; | 1269 | return r; |
| 1270 | /* Post card if necessary */ | 1270 | /* Post card if necessary */ |
| 1271 | if (!r600_card_posted(rdev)) { | 1271 | if (!radeon_card_posted(rdev)) { |
| 1272 | if (!rdev->bios) { | 1272 | if (!rdev->bios) { |
| 1273 | dev_err(rdev->dev, "Card not posted and no BIOS - ignoring\n"); | 1273 | dev_err(rdev->dev, "Card not posted and no BIOS - ignoring\n"); |
| 1274 | return -EINVAL; | 1274 | return -EINVAL; |
