Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72542d77 authored by Dave Airlie's avatar Dave Airlie
Browse files

drm/radeon/kms: ignore unposted GPUs with no BIOS.



If we find a GPU but we can't find its BIOS and it isn't posted,
then ignore it.

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 4b30b870
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -3257,10 +3257,8 @@ int r100_init(struct radeon_device *rdev)
			RREG32(R_0007C0_CP_STAT));
	}
	/* check if cards are posted or not */
	if (!radeon_card_posted(rdev) && rdev->bios) {
		DRM_INFO("GPU not posted. posting now...\n");
		radeon_combios_asic_init(rdev->ddev);
	}
	if (radeon_boot_test_post_card(rdev) == false)
		return -EINVAL;
	/* Set asic errata */
	r100_errata(rdev);
	/* Initialize clocks */
+2 −4
Original line number Diff line number Diff line
@@ -1309,10 +1309,8 @@ int r300_init(struct radeon_device *rdev)
			RREG32(R_0007C0_CP_STAT));
	}
	/* check if cards are posted or not */
	if (!radeon_card_posted(rdev) && rdev->bios) {
		DRM_INFO("GPU not posted. posting now...\n");
		radeon_combios_asic_init(rdev->ddev);
	}
	if (radeon_boot_test_post_card(rdev) == false)
		return -EINVAL;
	/* Set asic errata */
	r300_errata(rdev);
	/* Initialize clocks */
+3 −8
Original line number Diff line number Diff line
@@ -301,14 +301,9 @@ int r420_init(struct radeon_device *rdev)
			RREG32(R_0007C0_CP_STAT));
	}
	/* check if cards are posted or not */
	if (!radeon_card_posted(rdev) && rdev->bios) {
		DRM_INFO("GPU not posted. posting now...\n");
		if (rdev->is_atom_bios) {
			atom_asic_init(rdev->mode_info.atom_context);
		} else {
			radeon_combios_asic_init(rdev->ddev);
		}
	}
	if (radeon_boot_test_post_card(rdev) == false)
		return -EINVAL;

	/* Initialize clocks */
	radeon_get_clock_info(rdev->ddev);
	/* Initialize power management */
+3 −0
Original line number Diff line number Diff line
@@ -254,6 +254,9 @@ int r520_init(struct radeon_device *rdev)
			RREG32(R_0007C0_CP_STAT));
	}
	/* check if cards are posted or not */
	if (radeon_boot_test_post_card(rdev) == false)
		return -EINVAL;

	if (!radeon_card_posted(rdev) && rdev->bios) {
		DRM_INFO("GPU not posted. posting now...\n");
		atom_asic_init(rdev->mode_info.atom_context);
+5 −1
Original line number Diff line number Diff line
@@ -1631,7 +1631,11 @@ int r600_init(struct radeon_device *rdev)
	if (r)
		return r;
	/* Post card if necessary */
	if (!r600_card_posted(rdev) && rdev->bios) {
	if (!r600_card_posted(rdev)) {
		if (!rdev->bios) {
			dev_err(rdev->dev, "Card not posted and no BIOS - ignoring\n");
			return -EINVAL;
		}
		DRM_INFO("GPU not posted. posting now...\n");
		atom_asic_init(rdev->mode_info.atom_context);
	}
Loading