/* Authors: Dave Airlie Alex Deucher Jerome Glisse BIOS.  */
static bool igp_read_bios_from_vram(struct radeon_device *rdev)
/* Authors: Dave Airlie Alex Deucher Jerome Glisse BIOS.  */
static bool igp_read_bios_from_vram(struct radeon_device *rdev)
{
	uint8_t __iomem *bios;
	resource_size_t vram_base;
	resource_size_t size = 256 * 1024;
	rdev->bios = NULL;
	vram_base = drm_get_resource_start(rdev->ddev, 0);
	bios = ioremap(vram_base, size);
	if (!bios) {
		return false;
	}
	if (size == 0 || bios[0] != 0x55 || bios[1] != 0xaa) {
		iounmap(bios);
		return false;
	}
	rdev->bios = kmalloc(size, GFP_KERNEL);
	if (rdev->bios == NULL) {
		iounmap(bios);
		return false;
	}
	memcpy(rdev->bios, bios, size);
	iounmap(bios);
	return true;
}