Skip to contentSkip to conversation

drm/radeon: Print out gart initialization details for r600

PATCH In review Tormod Volden 2 participants 4 messages May 4, 2011 – May 9, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon: Print out gart initialization details for r600

From: Tormod Volden <[email protected]>

Similar to what is being done for other chip families.

Also fix typos in gart messages.

---

Just noticed there is no gart initialization message on r600 like there is for other chips, while studying a log with "unitialized" errors.

Note that I do not have the hardware, so this has only been compile-tested by me.

Tormod

 drivers/gpu/drm/radeon/r600.c        |    2 ++
 drivers/gpu/drm/radeon/radeon_gart.c |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/r600.c +2 -0
index 6f27593..3ca448f 100644
@@ -986,6 +986,8 @@ int r600_pcie_gart_enable(struct radeon_device *rdev)
 		WREG32(VM_CONTEXT0_CNTL + (i * 4), 0);
 
 	r600_pcie_gart_tlb_flush(rdev);
+	DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+		 (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
 	rdev->gart.ready = true;
 	return 0;
 }
drivers/gpu/drm/radeon/radeon_gart.c +2 -2
index 8a955bb..674a6ca 100644
@@ -142,7 +142,7 @@ void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
 	u64 page_base;
 
 	if (!rdev->gart.ready) {
-		WARN(1, "trying to unbind memory to unitialized GART !\n");
+		WARN(1, "trying to unbind memory to uninitialized GART !\n");
 		return;
 	}
 	t = offset / RADEON_GPU_PAGE_SIZE;
@@ -174,7 +174,7 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
 	int i, j;
 
 	if (!rdev->gart.ready) {
-		WARN(1, "trying to bind memory to unitialized GART !\n");
+		WARN(1, "trying to bind memory to uninitialized GART !\n");
 		return -EINVAL;
 	}
 	t = offset / RADEON_GPU_PAGE_SIZE;
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 3 lines · Tormod Volden

From: Tormod Volden <[email protected]>

Similar to what is being done for other chip families.

While you are at it, you might want to update rv770, evergreen, and cayman.

Alex

Quoted 62 lines

Also fix typos in gart messages.

---

Just noticed there is no gart initialization message on r600 like there is for other chips, while studying a log with "unitialized" errors.

Note that I do not have the hardware, so this has only been compile-tested by me.

Tormod

 drivers/gpu/drm/radeon/r600.c        |    2 ++
 drivers/gpu/drm/radeon/radeon_gart.c |    4 ++--

 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/r600.c +2 -0
index 6f27593..3ca448f 100644
@@ -986,6 +986,8 @@ int r600_pcie_gart_enable(struct radeon_device *rdev)
                WREG32(VM_CONTEXT0_CNTL + (i * 4), 0);
 
        r600_pcie_gart_tlb_flush(rdev);
+       DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+                (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
        rdev->gart.ready = true;
        return 0;
  }
drivers/gpu/drm/radeon/radeon_gart.c +2 -3
index 8a955bb..674a6ca 100644
@@ -142,7 +142,7 @@ void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
        u64 page_base;
 
        if (!rdev->gart.ready) {
-               WARN(1, "trying to unbind memory to unitialized GART !\n");
+               WARN(1, "trying to unbind memory to uninitialized GART !\n");
                return;
        }
        t = offset / RADEON_GPU_PAGE_SIZE;
@@ -174,7 +174,7 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
        int i, j;
 
        if (!rdev->gart.ready) {
-               WARN(1, "trying to bind memory to unitialized GART !\n");
+               WARN(1, "trying to bind memory to uninitialized GART !\n");
                return -EINVAL;
        }
        t = offset / RADEON_GPU_PAGE_SIZE;
--

1.7.0.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

PATCH 1/1 drm/radeon: Print gart initialization details on all chipsets

From: Tormod Volden <[email protected]>

The same way it was already done for r300.

Also fix typo in gart warning messages.

---

Quoted 3 lines

While you are at it, you might want to update rv770, evergreen, and cayman.

Alex

And all the others as well...

Tormod

PS. Why can't you keep the relatively logic r* naming? ni.c?

 drivers/gpu/drm/radeon/evergreen.c   |    2 ++
 drivers/gpu/drm/radeon/ni.c          |    2 ++
 drivers/gpu/drm/radeon/r100.c        |    2 ++
 drivers/gpu/drm/radeon/r600.c        |    2 ++
 drivers/gpu/drm/radeon/radeon_gart.c |    4 ++--
 drivers/gpu/drm/radeon/rs400.c       |    2 ++
 drivers/gpu/drm/radeon/rs600.c       |    2 ++
 drivers/gpu/drm/radeon/rv770.c       |    2 ++
 8 files changed, 16 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/evergreen.c +2 -0
index e9bc135..e91d708 100644
@@ -879,6 +879,8 @@ int evergreen_pcie_gart_enable(struct radeon_device *rdev)
 	WREG32(VM_CONTEXT1_CNTL, 0);
 
 	evergreen_pcie_gart_tlb_flush(rdev);
+	DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+		 (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
 	rdev->gart.ready = true;
 	return 0;
 }
drivers/gpu/drm/radeon/ni.c +2 -0
index 7aade20..05b34f9 100644
@@ -991,6 +991,8 @@ int cayman_pcie_gart_enable(struct radeon_device *rdev)
 	WREG32(VM_CONTEXT1_CNTL, 0);
 
 	cayman_pcie_gart_tlb_flush(rdev);
+	DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+		 (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
 	rdev->gart.ready = true;
 	return 0;
 }
drivers/gpu/drm/radeon/r100.c +2 -0
index f2204cb..b67719c 100644
@@ -513,6 +513,8 @@ int r100_pci_gart_enable(struct radeon_device *rdev)
 	tmp = RREG32(RADEON_AIC_CNTL) | RADEON_PCIGART_TRANSLATE_EN;
 	WREG32(RADEON_AIC_CNTL, tmp);
 	r100_pci_gart_tlb_flush(rdev);
+	DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+		 (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
 	rdev->gart.ready = true;
 	return 0;
 }
drivers/gpu/drm/radeon/r600.c +2 -0
index 6f27593..3ca448f 100644
@@ -986,6 +986,8 @@ int r600_pcie_gart_enable(struct radeon_device *rdev)
 		WREG32(VM_CONTEXT0_CNTL + (i * 4), 0);
 
 	r600_pcie_gart_tlb_flush(rdev);
+	DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+		 (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
 	rdev->gart.ready = true;
 	return 0;
 }
drivers/gpu/drm/radeon/radeon_gart.c +2 -2
index 8a955bb..674a6ca 100644
@@ -142,7 +142,7 @@ void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
 	u64 page_base;
 
 	if (!rdev->gart.ready) {
-		WARN(1, "trying to unbind memory to unitialized GART !\n");
+		WARN(1, "trying to unbind memory to uninitialized GART !\n");
 		return;
 	}
 	t = offset / RADEON_GPU_PAGE_SIZE;
@@ -174,7 +174,7 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
 	int i, j;
 
 	if (!rdev->gart.ready) {
-		WARN(1, "trying to bind memory to unitialized GART !\n");
+		WARN(1, "trying to bind memory to uninitialized GART !\n");
 		return -EINVAL;
 	}
 	t = offset / RADEON_GPU_PAGE_SIZE;
drivers/gpu/drm/radeon/rs400.c +2 -0
index aa6a66e..d9dc25e 100644
@@ -182,6 +182,8 @@ int rs400_gart_enable(struct radeon_device *rdev)
 	/* Enable gart */
 	WREG32_MC(RS480_AGP_ADDRESS_SPACE_SIZE, (RS480_GART_EN | size_reg));
 	rs400_gart_tlb_flush(rdev);
+	DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+		 (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
 	rdev->gart.ready = true;
 	return 0;
 }
drivers/gpu/drm/radeon/rs600.c +2 -0
index 6e3b11e..3b6dce4 100644
@@ -484,6 +484,8 @@ int rs600_gart_enable(struct radeon_device *rdev)
 	tmp = RREG32_MC(R_000009_MC_CNTL1);
 	WREG32_MC(R_000009_MC_CNTL1, (tmp | S_000009_ENABLE_PAGE_TABLES(1)));
 	rs600_gart_tlb_flush(rdev);
+	DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+		 (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
 	rdev->gart.ready = true;
 	return 0;
 }
drivers/gpu/drm/radeon/rv770.c +2 -0
index ef8a5ba..89b53ad 100644
@@ -158,6 +158,8 @@ int rv770_pcie_gart_enable(struct radeon_device *rdev)
 		WREG32(VM_CONTEXT0_CNTL + (i * 4), 0);
 
 	r600_pcie_gart_tlb_flush(rdev);
+	DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+		 (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
 	rdev->gart.ready = true;
 	return 0;
 }
Signature · 1 line
1.7.0.4
Reviewed-by on v1 1/1
#3 lore raw

Re: [PATCH] drm/radeon: Print gart initialization details on all chipsets

Quoted 11 lines · Tormod Volden

From: Tormod Volden <[email protected]>

The same way it was already done for r300.

Also fix typo in gart warning messages.

---

Quoted 1 line

While you are at it, you might want to update rv770, evergreen, and cayman.

Quoted 7 lines
Quoted 1 line

Alex

And all the others as well...

Tormod

PS. Why can't you keep the relatively logic r* naming? ni.c?

There aren't any after r7xx. We stopped using Rxxx code names internally after r7xx, so we use the same codenames in the open source driver. Evergreen was the series after r7xx, and Northern Islands (NI) followed evergreen.

Quoted 134 lines

 drivers/gpu/drm/radeon/evergreen.c   |    2 ++
 drivers/gpu/drm/radeon/ni.c          |    2 ++
 drivers/gpu/drm/radeon/r100.c        |    2 ++
 drivers/gpu/drm/radeon/r600.c        |    2 ++
 drivers/gpu/drm/radeon/radeon_gart.c |    4 ++--

 drivers/gpu/drm/radeon/rs400.c       |    2 ++
 drivers/gpu/drm/radeon/rs600.c       |    2 ++
 drivers/gpu/drm/radeon/rv770.c       |    2 ++
 8 files changed, 16 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/evergreen.c +2 -0
index e9bc135..e91d708 100644
@@ -879,6 +879,8 @@ int evergreen_pcie_gart_enable(struct radeon_device *rdev)
        WREG32(VM_CONTEXT1_CNTL, 0);
 
        evergreen_pcie_gart_tlb_flush(rdev);
+       DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+                (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
        rdev->gart.ready = true;
        return 0;
  }
drivers/gpu/drm/radeon/ni.c +2 -0
index 7aade20..05b34f9 100644
@@ -991,6 +991,8 @@ int cayman_pcie_gart_enable(struct radeon_device *rdev)
        WREG32(VM_CONTEXT1_CNTL, 0);
 
        cayman_pcie_gart_tlb_flush(rdev);
+       DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+                (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
        rdev->gart.ready = true;
        return 0;
  }
drivers/gpu/drm/radeon/r100.c +2 -0
index f2204cb..b67719c 100644
@@ -513,6 +513,8 @@ int r100_pci_gart_enable(struct radeon_device *rdev)
        tmp = RREG32(RADEON_AIC_CNTL) | RADEON_PCIGART_TRANSLATE_EN;
        WREG32(RADEON_AIC_CNTL, tmp);
        r100_pci_gart_tlb_flush(rdev);
+       DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+                (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
        rdev->gart.ready = true;
        return 0;
  }
drivers/gpu/drm/radeon/r600.c +2 -0
index 6f27593..3ca448f 100644
@@ -986,6 +986,8 @@ int r600_pcie_gart_enable(struct radeon_device *rdev)
                WREG32(VM_CONTEXT0_CNTL + (i * 4), 0);
 
        r600_pcie_gart_tlb_flush(rdev);
+       DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+                (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
        rdev->gart.ready = true;
        return 0;
  }
drivers/gpu/drm/radeon/radeon_gart.c +2 -2
index 8a955bb..674a6ca 100644
@@ -142,7 +142,7 @@ void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
        u64 page_base;
 
        if (!rdev->gart.ready) {
-               WARN(1, "trying to unbind memory to unitialized GART !\n");
+               WARN(1, "trying to unbind memory to uninitialized GART !\n");
                return;
        }
        t = offset / RADEON_GPU_PAGE_SIZE;
@@ -174,7 +174,7 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
        int i, j;
 
        if (!rdev->gart.ready) {
-               WARN(1, "trying to bind memory to unitialized GART !\n");
+               WARN(1, "trying to bind memory to uninitialized GART !\n");
                return -EINVAL;
        }
        t = offset / RADEON_GPU_PAGE_SIZE;
drivers/gpu/drm/radeon/rs400.c +2 -0
index aa6a66e..d9dc25e 100644
@@ -182,6 +182,8 @@ int rs400_gart_enable(struct radeon_device *rdev)
        /* Enable gart */
        WREG32_MC(RS480_AGP_ADDRESS_SPACE_SIZE, (RS480_GART_EN | size_reg));
        rs400_gart_tlb_flush(rdev);
+       DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+                (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
        rdev->gart.ready = true;
        return 0;
  }
drivers/gpu/drm/radeon/rs600.c +2 -0
index 6e3b11e..3b6dce4 100644
@@ -484,6 +484,8 @@ int rs600_gart_enable(struct radeon_device *rdev)
        tmp = RREG32_MC(R_000009_MC_CNTL1);
        WREG32_MC(R_000009_MC_CNTL1, (tmp | S_000009_ENABLE_PAGE_TABLES(1)));
        rs600_gart_tlb_flush(rdev);
+       DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+                (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
        rdev->gart.ready = true;
        return 0;
  }
drivers/gpu/drm/radeon/rv770.c +2 -1
index ef8a5ba..89b53ad 100644
@@ -158,6 +158,8 @@ int rv770_pcie_gart_enable(struct radeon_device *rdev)
                WREG32(VM_CONTEXT0_CNTL + (i * 4), 0);
 
        r600_pcie_gart_tlb_flush(rdev);
+       DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n",
+                (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr);
        rdev->gart.ready = true;
        return 0;
  }
--

1.7.0.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel