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>
This commit is contained in:
parent
75c8129893
commit
e7d40b9a0a
|
@ -1476,11 +1476,7 @@ int r600_resume(struct radeon_device *rdev)
|
||||||
/* FIXME: what do we want to do here ? */
|
/* FIXME: what do we want to do here ? */
|
||||||
}
|
}
|
||||||
/* post card */
|
/* post card */
|
||||||
if (rdev->is_atom_bios) {
|
atom_asic_init(rdev->mode_info.atom_context);
|
||||||
atom_asic_init(rdev->mode_info.atom_context);
|
|
||||||
} else {
|
|
||||||
radeon_combios_asic_init(rdev->ddev);
|
|
||||||
}
|
|
||||||
/* Initialize clocks */
|
/* Initialize clocks */
|
||||||
r = radeon_clocks_init(rdev);
|
r = radeon_clocks_init(rdev);
|
||||||
if (r) {
|
if (r) {
|
||||||
|
@ -1539,8 +1535,10 @@ int r600_init(struct radeon_device *rdev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
/* Must be an ATOMBIOS */
|
/* Must be an ATOMBIOS */
|
||||||
if (!rdev->is_atom_bios)
|
if (!rdev->is_atom_bios) {
|
||||||
|
dev_err(rdev->dev, "Expecting atombios for R600 GPU\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
r = radeon_atombios_init(rdev);
|
r = radeon_atombios_init(rdev);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
@ -1644,10 +1642,7 @@ void r600_fini(struct radeon_device *rdev)
|
||||||
radeon_agp_fini(rdev);
|
radeon_agp_fini(rdev);
|
||||||
#endif
|
#endif
|
||||||
radeon_object_fini(rdev);
|
radeon_object_fini(rdev);
|
||||||
if (rdev->is_atom_bios)
|
radeon_atombios_fini(rdev);
|
||||||
radeon_atombios_fini(rdev);
|
|
||||||
else
|
|
||||||
radeon_combios_fini(rdev);
|
|
||||||
kfree(rdev->bios);
|
kfree(rdev->bios);
|
||||||
rdev->bios = NULL;
|
rdev->bios = NULL;
|
||||||
radeon_dummy_page_fini(rdev);
|
radeon_dummy_page_fini(rdev);
|
||||||
|
|
|
@ -841,11 +841,7 @@ int rv770_resume(struct radeon_device *rdev)
|
||||||
/* FIXME: what do we want to do here ? */
|
/* FIXME: what do we want to do here ? */
|
||||||
}
|
}
|
||||||
/* post card */
|
/* post card */
|
||||||
if (rdev->is_atom_bios) {
|
atom_asic_init(rdev->mode_info.atom_context);
|
||||||
atom_asic_init(rdev->mode_info.atom_context);
|
|
||||||
} else {
|
|
||||||
radeon_combios_asic_init(rdev->ddev);
|
|
||||||
}
|
|
||||||
/* Initialize clocks */
|
/* Initialize clocks */
|
||||||
r = radeon_clocks_init(rdev);
|
r = radeon_clocks_init(rdev);
|
||||||
if (r) {
|
if (r) {
|
||||||
|
@ -902,8 +898,10 @@ int rv770_init(struct radeon_device *rdev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
/* Must be an ATOMBIOS */
|
/* Must be an ATOMBIOS */
|
||||||
if (!rdev->is_atom_bios)
|
if (!rdev->is_atom_bios) {
|
||||||
|
dev_err(rdev->dev, "Expecting atombios for R600 GPU\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
r = radeon_atombios_init(rdev);
|
r = radeon_atombios_init(rdev);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
@ -1006,11 +1004,7 @@ void rv770_fini(struct radeon_device *rdev)
|
||||||
radeon_agp_fini(rdev);
|
radeon_agp_fini(rdev);
|
||||||
#endif
|
#endif
|
||||||
radeon_object_fini(rdev);
|
radeon_object_fini(rdev);
|
||||||
if (rdev->is_atom_bios) {
|
radeon_atombios_fini(rdev);
|
||||||
radeon_atombios_fini(rdev);
|
|
||||||
} else {
|
|
||||||
radeon_combios_fini(rdev);
|
|
||||||
}
|
|
||||||
kfree(rdev->bios);
|
kfree(rdev->bios);
|
||||||
rdev->bios = NULL;
|
rdev->bios = NULL;
|
||||||
radeon_dummy_page_fini(rdev);
|
radeon_dummy_page_fini(rdev);
|
||||||
|
|
Loading…
Reference in New Issue