commit 49cbd59d64f21dad969b409c9309fa49328a630b Author: Lucas Kannebley Tavares Date: Thu Feb 21 10:16:34 2013 -0300 Hack for getting addresses diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index a2d478e..967e0d3 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -3514,6 +3514,25 @@ static int evergreen_startup(struct radeon_device *rdev) return r; } + /* HACK DUMP VARIOUS CRTC REGISTER BASE ADDRESS VALUE */ + { + unsigned i; + for (i = 0; i < rdev->num_crtc; i++) { + uint64_t addr; + + addr = ((uint64_t) RREG32(EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS_HIGH + crtc_offsets[i])) << 32ULL; + addr |= ((uint64_t) RREG32(EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS + crtc_offsets[i])); + DRM_INFO("GRPH_PRIMARY_SURFACE[%2d] 0x%016llx\n", i, addr); + addr = ((uint64_t) RREG32(EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS_HIGH + crtc_offsets[i])) << 32ULL; + addr |= ((uint64_t) RREG32(EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS + crtc_offsets[i])); + DRM_INFO("GRPH_SECONDARY_SURFACE[%2d] 0x%016llx\n", i, addr); + WREG32(EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS_HIGH + crtc_offsets[i], 0); + WREG32(EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS + crtc_offsets[i], 0); + WREG32(EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS_HIGH + crtc_offsets[i], 0); + WREG32(EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS + crtc_offsets[i], 0); + } + } + return 0; }