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

Commit e57415d8 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie
Browse files

drm/radeon/kms: fix agp mode setup on cards that use pcie bridges



Asics that use an AGP to PCIE bridge don't have the AGP_STATUS
register so just use whatever mode the host side setup.

Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Cc: Jerome Glisse <glisse@freedesktop.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 09f0c489
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -156,7 +156,13 @@ int radeon_agp_init(struct radeon_device *rdev)
	}
	}


	mode.mode = info.mode;
	mode.mode = info.mode;
	/* chips with the agp to pcie bridge don't have the AGP_STATUS register
	 * Just use the whatever mode the host sets up.
	 */
	if (rdev->family <= CHIP_RV350)
		agp_status = (RREG32(RADEON_AGP_STATUS) | RADEON_AGPv3_MODE) & mode.mode;
		agp_status = (RREG32(RADEON_AGP_STATUS) | RADEON_AGPv3_MODE) & mode.mode;
	else
		agp_status = mode.mode;
	is_v3 = !!(agp_status & RADEON_AGPv3_MODE);
	is_v3 = !!(agp_status & RADEON_AGPv3_MODE);


	if (is_v3) {
	if (is_v3) {