summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2013-07-29 13:20:23 +1000
committerJonathan Gray <jsg@jsg.id.au>2013-08-12 10:46:50 +1000
commit604781339b1dfdc0924c650d4c8c18dd7042d859 (patch)
treefa038a38e23ff8ec0b01302efb64f495c9b878c3 /sys
parent63ed33abc31c675ad3dec2ae086326c4b3509691 (diff)
reduce dmesg spam
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/radeon/atom.c4
-rw-r--r--sys/dev/pci/drm/radeon/ni.c2
-rw-r--r--sys/dev/pci/drm/radeon/r100.c22
-rw-r--r--sys/dev/pci/drm/radeon/r300.c2
-rw-r--r--sys/dev/pci/drm/radeon/r420.c2
-rw-r--r--sys/dev/pci/drm/radeon/r600.c10
-rw-r--r--sys/dev/pci/drm/radeon/radeon_device.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_fence.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_gart.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_irq_kms.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_object.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_pm.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_ttm.c4
-rw-r--r--sys/dev/pci/drm/radeon/si.c2
-rw-r--r--sys/dev/pci/drm/ttm/ttm_memory.c4
15 files changed, 63 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/radeon/atom.c b/sys/dev/pci/drm/radeon/atom.c
index 290d47c8c7f..4e334e36486 100644
--- a/sys/dev/pci/drm/radeon/atom.c
+++ b/sys/dev/pci/drm/radeon/atom.c
@@ -1253,9 +1253,11 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
int base;
struct atom_context *ctx =
malloc(sizeof(struct atom_context), M_DRM, M_WAITOK | M_ZERO);
+#ifdef DRMDEBUG
char *str;
char name[512];
int i;
+#endif
if (!ctx)
return NULL;
@@ -1289,6 +1291,7 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
ctx->data_table = CU16(base + ATOM_ROM_DATA_PTR);
atom_index_iio(ctx, CU16(ctx->data_table + ATOM_DATA_IIO_PTR) + 4);
+#ifdef DRMDEBUG
str = CSTR(CU16(base + ATOM_ROM_MSG_PTR));
while (*str && ((*str == '\n') || (*str == '\r')))
str++;
@@ -1301,6 +1304,7 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
}
}
DRM_INFO( "ATOM BIOS: %s\n", name);
+#endif
return ctx;
}
diff --git a/sys/dev/pci/drm/radeon/ni.c b/sys/dev/pci/drm/radeon/ni.c
index 6517606e9d2..cebaf8a5413 100644
--- a/sys/dev/pci/drm/radeon/ni.c
+++ b/sys/dev/pci/drm/radeon/ni.c
@@ -334,7 +334,9 @@ int ni_init_microcode(struct radeon_device *rdev)
default: BUG();
}
+#ifdef DRMDEBUG
DRM_INFO("Loading %s Microcode\n", chip_name);
+#endif
snprintf(fw_name, sizeof(fw_name), "radeon-%s_pfp", chip_name);
err = loadfirmware(fw_name, &rdev->pfp_fw, &rdev->pfp_fw_size);
diff --git a/sys/dev/pci/drm/radeon/r100.c b/sys/dev/pci/drm/radeon/r100.c
index a2be07c00f9..65f1c38ee2b 100644
--- a/sys/dev/pci/drm/radeon/r100.c
+++ b/sys/dev/pci/drm/radeon/r100.c
@@ -994,13 +994,17 @@ static int r100_cp_init_microcode(struct radeon_device *rdev)
if ((rdev->family == CHIP_R100) || (rdev->family == CHIP_RV100) ||
(rdev->family == CHIP_RV200) || (rdev->family == CHIP_RS100) ||
(rdev->family == CHIP_RS200)) {
+#ifdef DRMDEBUG
DRM_INFO("Loading R100 Microcode\n");
+#endif
fw_name = FIRMWARE_R100;
} else if ((rdev->family == CHIP_R200) ||
(rdev->family == CHIP_RV250) ||
(rdev->family == CHIP_RV280) ||
(rdev->family == CHIP_RS300)) {
+#ifdef DRMDEBUG
DRM_INFO("Loading R200 Microcode\n");
+#endif
fw_name = FIRMWARE_R200;
} else if ((rdev->family == CHIP_R300) ||
(rdev->family == CHIP_R350) ||
@@ -1008,19 +1012,27 @@ static int r100_cp_init_microcode(struct radeon_device *rdev)
(rdev->family == CHIP_RV380) ||
(rdev->family == CHIP_RS400) ||
(rdev->family == CHIP_RS480)) {
+#ifdef DRMDEBUG
DRM_INFO("Loading R300 Microcode\n");
+#endif
fw_name = FIRMWARE_R300;
} else if ((rdev->family == CHIP_R420) ||
(rdev->family == CHIP_R423) ||
(rdev->family == CHIP_RV410)) {
+#ifdef DRMDEBUG
DRM_INFO("Loading R400 Microcode\n");
+#endif
fw_name = FIRMWARE_R420;
} else if ((rdev->family == CHIP_RS690) ||
(rdev->family == CHIP_RS740)) {
+#ifdef DRMDEBUG
DRM_INFO("Loading RS690/RS740 Microcode\n");
+#endif
fw_name = FIRMWARE_RS690;
} else if (rdev->family == CHIP_RS600) {
+#ifdef DRMDEBUG
DRM_INFO("Loading RS600 Microcode\n");
+#endif
fw_name = FIRMWARE_RS600;
} else if ((rdev->family == CHIP_RV515) ||
(rdev->family == CHIP_R520) ||
@@ -1028,7 +1040,9 @@ static int r100_cp_init_microcode(struct radeon_device *rdev)
(rdev->family == CHIP_R580) ||
(rdev->family == CHIP_RV560) ||
(rdev->family == CHIP_RV570)) {
+#ifdef DRMDEBUG
DRM_INFO("Loading R500 Microcode\n");
+#endif
fw_name = FIRMWARE_R520;
}
@@ -1142,7 +1156,9 @@ int r100_cp_init(struct radeon_device *rdev, unsigned ring_size)
WREG32(RADEON_CP_RB_CNTL, tmp | RADEON_RB_NO_UPDATE);
/* Set ring address */
+#ifdef DRMDEBUG
DRM_INFO("radeon: ring at 0x%016lX\n", (unsigned long)ring->gpu_addr);
+#endif
WREG32(RADEON_CP_RB_BASE, ring->gpu_addr);
/* Force read & write ptr to 0 */
WREG32(RADEON_CP_RB_CNTL, tmp | RADEON_RB_RPTR_WR_ENA | RADEON_RB_NO_UPDATE);
@@ -2839,7 +2855,9 @@ r100_get_accessible_vram(struct radeon_device *rdev)
rdev->family >= CHIP_RV350) {
WREG32_P(RADEON_HOST_PATH_CNTL, RADEON_HDP_APER_CNTL,
~RADEON_HDP_APER_CNTL);
+#ifdef DRMDEBUG
DRM_INFO("Generation 2 PCI interface, using max accessible memory\n");
+#endif
return aper_size * 2;
}
@@ -3743,7 +3761,9 @@ int r100_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
udelay(1);
}
if (i < rdev->usec_timeout) {
+#ifdef DRMDEBUG
DRM_INFO("ring test succeeded in %d usecs\n", i);
+#endif
} else {
DRM_ERROR("radeon: ring test failed (scratch(0x%04X)=0x%08X)\n",
scratch, tmp);
@@ -3814,7 +3834,9 @@ int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
udelay(1);
}
if (i < rdev->usec_timeout) {
+#ifdef DRMDEBUG
DRM_INFO("ib test succeeded in %u usecs\n", i);
+#endif
} else {
DRM_ERROR("radeon: ib test failed (scratch(0x%04X)=0x%08X)\n",
scratch, tmp);
diff --git a/sys/dev/pci/drm/radeon/r300.c b/sys/dev/pci/drm/radeon/r300.c
index 97619ca2a08..e80857dd748 100644
--- a/sys/dev/pci/drm/radeon/r300.c
+++ b/sys/dev/pci/drm/radeon/r300.c
@@ -373,8 +373,10 @@ static void r300_gpu_init(struct radeon_device *rdev)
DRM_ERROR("Failed to wait MC idle while "
"programming pipes. Bad things might happen.\n");
}
+#ifdef DRMDEBUG
DRM_INFO("radeon: %d quad pipes, %d Z pipes initialized.\n",
rdev->num_gb_pipes, rdev->num_z_pipes);
+#endif
}
int r300_asic_reset(struct radeon_device *rdev)
diff --git a/sys/dev/pci/drm/radeon/r420.c b/sys/dev/pci/drm/radeon/r420.c
index 91b671e7377..74a23892b99 100644
--- a/sys/dev/pci/drm/radeon/r420.c
+++ b/sys/dev/pci/drm/radeon/r420.c
@@ -152,8 +152,10 @@ void r420_pipes_init(struct radeon_device *rdev)
} else
rdev->num_z_pipes = 1;
+#ifdef DRMDEBUG
DRM_INFO("radeon: %d quad pipes, %d z pipes initialized.\n",
rdev->num_gb_pipes, rdev->num_z_pipes);
+#endif
}
u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg)
diff --git a/sys/dev/pci/drm/radeon/r600.c b/sys/dev/pci/drm/radeon/r600.c
index d38fb15bb6c..948fb2a7784 100644
--- a/sys/dev/pci/drm/radeon/r600.c
+++ b/sys/dev/pci/drm/radeon/r600.c
@@ -2070,7 +2070,9 @@ int r600_init_microcode(struct radeon_device *rdev)
rlc_req_size = RLC_UCODE_SIZE * 4;
}
+#ifdef DRMDEBUG
DRM_INFO("Loading %s Microcode\n", chip_name);
+#endif
snprintf(fw_name, sizeof(fw_name), "radeon-%s_pfp", chip_name);
err = loadfirmware(fw_name, &rdev->pfp_fw, &rdev->pfp_fw_size);
@@ -2462,7 +2464,9 @@ int r600_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
udelay(1);
}
if (i < rdev->usec_timeout) {
+#ifdef DRMDEBUG
DRM_INFO("ring test on %d succeeded in %d usecs\n", ring->idx, i);
+#endif
} else {
DRM_ERROR("radeon: ring %d test failed (scratch(0x%04X)=0x%08X)\n",
ring->idx, scratch, tmp);
@@ -2517,7 +2521,9 @@ int r600_dma_ring_test(struct radeon_device *rdev,
}
if (i < rdev->usec_timeout) {
+#ifdef DRMDEBUG
DRM_INFO("ring test on %d succeeded in %d usecs\n", ring->idx, i);
+#endif
} else {
DRM_ERROR("radeon: ring %d test failed (0x%08X)\n",
ring->idx, tmp);
@@ -3090,7 +3096,9 @@ int r600_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
udelay(1);
}
if (i < rdev->usec_timeout) {
+#ifdef DRMDEBUG
DRM_INFO("ib test on ring %d succeeded in %u usecs\n", ib.fence->ring, i);
+#endif
} else {
DRM_ERROR("radeon: ib test failed (scratch(0x%04X)=0x%08X)\n",
scratch, tmp);
@@ -3158,7 +3166,9 @@ int r600_dma_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
udelay(1);
}
if (i < rdev->usec_timeout) {
+#ifdef DRMDEBUG
DRM_INFO("ib test on ring %d succeeded in %u usecs\n", ib.fence->ring, i);
+#endif
} else {
DRM_ERROR("radeon: ib test failed (0x%08X)\n", tmp);
r = -EINVAL;
diff --git a/sys/dev/pci/drm/radeon/radeon_device.c b/sys/dev/pci/drm/radeon/radeon_device.c
index 29fa64fecc1..b5f3339af12 100644
--- a/sys/dev/pci/drm/radeon/radeon_device.c
+++ b/sys/dev/pci/drm/radeon/radeon_device.c
@@ -314,7 +314,9 @@ int radeon_wb_init(struct radeon_device *rdev)
rdev->wb.use_event = true;
}
+#ifdef DRMDEBUG
dev_info(rdev->dev, "WB %sabled\n", rdev->wb.enabled ? "en" : "dis");
+#endif
return 0;
}
diff --git a/sys/dev/pci/drm/radeon/radeon_fence.c b/sys/dev/pci/drm/radeon/radeon_fence.c
index 283455e98e3..e7d2c67c99f 100644
--- a/sys/dev/pci/drm/radeon/radeon_fence.c
+++ b/sys/dev/pci/drm/radeon/radeon_fence.c
@@ -804,8 +804,10 @@ int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring)
rdev->fence_drv[ring].gpu_addr = rdev->wb.gpu_addr + index;
radeon_fence_write(rdev, atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
rdev->fence_drv[ring].initialized = true;
+#ifdef DRMDEBUG
dev_info(rdev->dev, "fence driver on ring %d use gpu addr 0x%016llx and cpu addr 0x%p\n",
ring, rdev->fence_drv[ring].gpu_addr, rdev->fence_drv[ring].cpu_addr);
+#endif
return 0;
}
diff --git a/sys/dev/pci/drm/radeon/radeon_gart.c b/sys/dev/pci/drm/radeon/radeon_gart.c
index 7f4dc7bcbe5..9b2dd1420fe 100644
--- a/sys/dev/pci/drm/radeon/radeon_gart.c
+++ b/sys/dev/pci/drm/radeon/radeon_gart.c
@@ -346,8 +346,10 @@ int radeon_gart_init(struct radeon_device *rdev)
/* Compute table size */
rdev->gart.num_cpu_pages = rdev->mc.gtt_size / PAGE_SIZE;
rdev->gart.num_gpu_pages = rdev->mc.gtt_size / RADEON_GPU_PAGE_SIZE;
+#ifdef DRMDEBUG
DRM_INFO("GART: num cpu pages %u, num gpu pages %u\n",
rdev->gart.num_cpu_pages, rdev->gart.num_gpu_pages);
+#endif
/* Allocate pages table */
rdev->gart.pages = malloc(sizeof(void *) * rdev->gart.num_cpu_pages,
M_DRM, M_ZERO | M_WAITOK);
diff --git a/sys/dev/pci/drm/radeon/radeon_irq_kms.c b/sys/dev/pci/drm/radeon/radeon_irq_kms.c
index 05f06006061..94a6665763d 100644
--- a/sys/dev/pci/drm/radeon/radeon_irq_kms.c
+++ b/sys/dev/pci/drm/radeon/radeon_irq_kms.c
@@ -273,7 +273,7 @@ int radeon_irq_kms_init(struct radeon_device *rdev)
rdev->irq.installed = false;
return r;
}
- DRM_INFO("radeon: irq initialized.\n");
+ DRM_DEBUG("radeon: irq initialized.\n");
return 0;
}
diff --git a/sys/dev/pci/drm/radeon/radeon_object.c b/sys/dev/pci/drm/radeon/radeon_object.c
index 260eefac924..91b986bfc8a 100644
--- a/sys/dev/pci/drm/radeon/radeon_object.c
+++ b/sys/dev/pci/drm/radeon/radeon_object.c
@@ -342,11 +342,13 @@ int radeon_bo_init(struct radeon_device *rdev)
end = start + atop(rdev->mc.aper_size);
uvm_page_physload(start, end, start, end, PHYSLOAD_DEVICE);
+#ifdef DRMDEBUG
DRM_INFO("Detected VRAM RAM=%lluM, BAR=%lluM\n",
rdev->mc.mc_vram_size >> 20,
(unsigned long long)rdev->mc.aper_size >> 20);
DRM_INFO("RAM width %dbits %cDR\n",
rdev->mc.vram_width, rdev->mc.vram_is_ddr ? 'D' : 'S');
+#endif
return radeon_ttm_init(rdev);
}
diff --git a/sys/dev/pci/drm/radeon/radeon_pm.c b/sys/dev/pci/drm/radeon/radeon_pm.c
index 4f3c6606974..02c0a55a21b 100644
--- a/sys/dev/pci/drm/radeon/radeon_pm.c
+++ b/sys/dev/pci/drm/radeon/radeon_pm.c
@@ -672,7 +672,9 @@ int radeon_pm_init(struct radeon_device *rdev)
}
#endif
+#ifdef DRMDEBUG
DRM_INFO("radeon: power management initialized\n");
+#endif
}
return 0;
diff --git a/sys/dev/pci/drm/radeon/radeon_ttm.c b/sys/dev/pci/drm/radeon/radeon_ttm.c
index 9e7a6096ca9..cba64172d54 100644
--- a/sys/dev/pci/drm/radeon/radeon_ttm.c
+++ b/sys/dev/pci/drm/radeon/radeon_ttm.c
@@ -813,16 +813,20 @@ int radeon_ttm_init(struct radeon_device *rdev)
radeon_bo_unref(&rdev->stollen_vga_memory);
return r;
}
+#ifdef DRMDEBUG
DRM_INFO("radeon: %uM of VRAM memory ready\n",
(unsigned)rdev->mc.real_vram_size / (1024 * 1024));
+#endif
r = ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_TT,
rdev->mc.gtt_size >> PAGE_SHIFT);
if (r) {
DRM_ERROR("Failed initializing GTT heap.\n");
return r;
}
+#ifdef DRMDEBUG
DRM_INFO("radeon: %uM of GTT memory ready.\n",
(unsigned)(rdev->mc.gtt_size / (1024 * 1024)));
+#endif
#ifdef notyet
rdev->mman.bdev.dev_mapping = rdev->ddev->dev_mapping;
#endif
diff --git a/sys/dev/pci/drm/radeon/si.c b/sys/dev/pci/drm/radeon/si.c
index cb2e08c9b6e..5204bfc3d97 100644
--- a/sys/dev/pci/drm/radeon/si.c
+++ b/sys/dev/pci/drm/radeon/si.c
@@ -318,7 +318,9 @@ static int si_init_microcode(struct radeon_device *rdev)
default: BUG();
}
+#ifdef DRMDEBUG
DRM_INFO("Loading %s Microcode\n", chip_name);
+#endif
snprintf(fw_name, sizeof(fw_name), "radeon-%s_pfp", chip_name);
err = loadfirmware(fw_name, &rdev->pfp_fw, &rdev->pfp_fw_size);
diff --git a/sys/dev/pci/drm/ttm/ttm_memory.c b/sys/dev/pci/drm/ttm/ttm_memory.c
index 774691729b3..d66472ebe5e 100644
--- a/sys/dev/pci/drm/ttm/ttm_memory.c
+++ b/sys/dev/pci/drm/ttm/ttm_memory.c
@@ -356,8 +356,10 @@ ttm_mem_global_init(struct ttm_mem_global *glob)
{
uint64_t mem;
int ret;
+#ifdef DRMDEBUG
int i;
struct ttm_mem_zone *zone;
+#endif
mtx_init(&glob->lock, IPL_NONE);
#ifdef notyet
@@ -381,11 +383,13 @@ ttm_mem_global_init(struct ttm_mem_global *glob)
if (unlikely(ret != 0))
goto out_no_zone;
#endif
+#ifdef DRMDEBUG
for (i = 0; i < glob->num_zones; ++i) {
zone = glob->zones[i];
DRM_INFO("Zone %7s: Available graphics memory: %llu kiB\n",
zone->name, (unsigned long long)zone->max_mem >> 10);
}
+#endif
ttm_page_alloc_init(glob, glob->zone_kernel->max_mem/(2*PAGE_SIZE));
ttm_dma_page_alloc_init(glob, glob->zone_kernel->max_mem/(2*PAGE_SIZE));
return 0;