diff options
| author | Jerome Glisse <jglisse@redhat.com> | 2009-10-01 12:02:15 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2009-10-01 19:34:14 -0400 |
| commit | e7d40b9a0a7c857383ef50db9766354bd3be1bf3 (patch) | |
| tree | 0073eec70abef565221967567dbfc6592096aa2c | |
| parent | 75c8129893d78fd0cbe5c26580cadd6001d904fc (diff) | |
drm/radeon/kms: R600/RV770 remove dead code and print message for wrong BIOS
R600 & RV770 family are all using atombios so remove dead code and
print an error message if we fail to find a valid atombios.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
| -rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 15 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/rv770.c | 16 |
2 files changed, 10 insertions, 21 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index e74e7a748b31..9f7eb08b30aa 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
| @@ -1476,11 +1476,7 @@ int r600_resume(struct radeon_device *rdev) | |||
| 1476 | /* FIXME: what do we want to do here ? */ | 1476 | /* FIXME: what do we want to do here ? */ |
| 1477 | } | 1477 | } |
| 1478 | /* post card */ | 1478 | /* post card */ |
| 1479 | if (rdev->is_atom_bios) { | 1479 | atom_asic_init(rdev->mode_info.atom_context); |
| 1480 | atom_asic_init(rdev->mode_info.atom_context); | ||
| 1481 | } else { | ||
| 1482 | radeon_combios_asic_init(rdev->ddev); | ||
| 1483 | } | ||
| 1484 | /* Initialize clocks */ | 1480 | /* Initialize clocks */ |
| 1485 | r = radeon_clocks_init(rdev); | 1481 | r = radeon_clocks_init(rdev); |
| 1486 | if (r) { | 1482 | if (r) { |
| @@ -1539,8 +1535,10 @@ int r600_init(struct radeon_device *rdev) | |||
| 1539 | return -EINVAL; | 1535 | return -EINVAL; |
| 1540 | } | 1536 | } |
| 1541 | /* Must be an ATOMBIOS */ | 1537 | /* Must be an ATOMBIOS */ |
| 1542 | if (!rdev->is_atom_bios) | 1538 | if (!rdev->is_atom_bios) { |
| 1539 | dev_err(rdev->dev, "Expecting atombios for R600 GPU\n"); | ||
| 1543 | return -EINVAL; | 1540 | return -EINVAL; |
| 1541 | } | ||
| 1544 | r = radeon_atombios_init(rdev); | 1542 | r = radeon_atombios_init(rdev); |
| 1545 | if (r) | 1543 | if (r) |
| 1546 | return r; | 1544 | return r; |
| @@ -1644,10 +1642,7 @@ void r600_fini(struct radeon_device *rdev) | |||
| 1644 | radeon_agp_fini(rdev); | 1642 | radeon_agp_fini(rdev); |
| 1645 | #endif | 1643 | #endif |
| 1646 | radeon_object_fini(rdev); | 1644 | radeon_object_fini(rdev); |
| 1647 | if (rdev->is_atom_bios) | 1645 | radeon_atombios_fini(rdev); |
| 1648 | radeon_atombios_fini(rdev); | ||
| 1649 | else | ||
| 1650 | radeon_combios_fini(rdev); | ||
| 1651 | kfree(rdev->bios); | 1646 | kfree(rdev->bios); |
| 1652 | rdev->bios = NULL; | 1647 | rdev->bios = NULL; |
| 1653 | radeon_dummy_page_fini(rdev); | 1648 | radeon_dummy_page_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index a04e6ee45947..295cf14e3c53 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
| @@ -841,11 +841,7 @@ int rv770_resume(struct radeon_device *rdev) | |||
| 841 | /* FIXME: what do we want to do here ? */ | 841 | /* FIXME: what do we want to do here ? */ |
| 842 | } | 842 | } |
| 843 | /* post card */ | 843 | /* post card */ |
| 844 | if (rdev->is_atom_bios) { | 844 | atom_asic_init(rdev->mode_info.atom_context); |
| 845 | atom_asic_init(rdev->mode_info.atom_context); | ||
| 846 | } else { | ||
| 847 | radeon_combios_asic_init(rdev->ddev); | ||
| 848 | } | ||
| 849 | /* Initialize clocks */ | 845 | /* Initialize clocks */ |
| 850 | r = radeon_clocks_init(rdev); | 846 | r = radeon_clocks_init(rdev); |
| 851 | if (r) { | 847 | if (r) { |
| @@ -902,8 +898,10 @@ int rv770_init(struct radeon_device *rdev) | |||
| 902 | return -EINVAL; | 898 | return -EINVAL; |
| 903 | } | 899 | } |
| 904 | /* Must be an ATOMBIOS */ | 900 | /* Must be an ATOMBIOS */ |
| 905 | if (!rdev->is_atom_bios) | 901 | if (!rdev->is_atom_bios) { |
| 902 | dev_err(rdev->dev, "Expecting atombios for R600 GPU\n"); | ||
| 906 | return -EINVAL; | 903 | return -EINVAL; |
| 904 | } | ||
| 907 | r = radeon_atombios_init(rdev); | 905 | r = radeon_atombios_init(rdev); |
| 908 | if (r) | 906 | if (r) |
| 909 | return r; | 907 | return r; |
| @@ -1006,11 +1004,7 @@ void rv770_fini(struct radeon_device *rdev) | |||
| 1006 | radeon_agp_fini(rdev); | 1004 | radeon_agp_fini(rdev); |
| 1007 | #endif | 1005 | #endif |
| 1008 | radeon_object_fini(rdev); | 1006 | radeon_object_fini(rdev); |
| 1009 | if (rdev->is_atom_bios) { | 1007 | radeon_atombios_fini(rdev); |
| 1010 | radeon_atombios_fini(rdev); | ||
| 1011 | } else { | ||
| 1012 | radeon_combios_fini(rdev); | ||
| 1013 | } | ||
| 1014 | kfree(rdev->bios); | 1008 | kfree(rdev->bios); |
| 1015 | rdev->bios = NULL; | 1009 | rdev->bios = NULL; |
| 1016 | radeon_dummy_page_fini(rdev); | 1010 | radeon_dummy_page_fini(rdev); |
