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

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

drm/radeon/kms: don't apply 7xx HDP flush workaround on AGP

It should be required for all 7xx asics, but seems to cause
problems on some AGP 7xx chips.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=19002



Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Reported-and-Tested-by: default avatarDuncan <1i5t5.duncan@cox.net>
Cc: stable@kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 6f331623
Loading
Loading
Loading
Loading
+8 −3
Original line number Original line Diff line number Diff line
@@ -878,12 +878,15 @@ void r600_pcie_gart_tlb_flush(struct radeon_device *rdev)
	u32 tmp;
	u32 tmp;


	/* flush hdp cache so updates hit vram */
	/* flush hdp cache so updates hit vram */
	if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740)) {
	if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) &&
	    !(rdev->flags & RADEON_IS_AGP)) {
		void __iomem *ptr = (void *)rdev->gart.table.vram.ptr;
		void __iomem *ptr = (void *)rdev->gart.table.vram.ptr;
		u32 tmp;
		u32 tmp;


		/* r7xx hw bug.  write to HDP_DEBUG1 followed by fb read
		/* r7xx hw bug.  write to HDP_DEBUG1 followed by fb read
		 * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL
		 * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL
		 * This seems to cause problems on some AGP cards. Just use the old
		 * method for them.
		 */
		 */
		WREG32(HDP_DEBUG1, 0);
		WREG32(HDP_DEBUG1, 0);
		tmp = readl((void __iomem *)ptr);
		tmp = readl((void __iomem *)ptr);
@@ -3485,10 +3488,12 @@ int r600_debugfs_mc_info_init(struct radeon_device *rdev)
void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo)
void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo)
{
{
	/* r7xx hw bug.  write to HDP_DEBUG1 followed by fb read
	/* r7xx hw bug.  write to HDP_DEBUG1 followed by fb read
	 * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL
	 * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL.
	 * This seems to cause problems on some AGP cards. Just use the old
	 * method for them.
	 */
	 */
	if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) &&
	if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) &&
	    rdev->vram_scratch.ptr) {
	    rdev->vram_scratch.ptr && !(rdev->flags & RADEON_IS_AGP)) {
		void __iomem *ptr = (void *)rdev->vram_scratch.ptr;
		void __iomem *ptr = (void *)rdev->vram_scratch.ptr;
		u32 tmp;
		u32 tmp;