summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-01-27 23:14:17 +0100
committerMarek Olšák <[email protected]>2011-01-27 23:17:41 +0100
commit82e60236a950100bda7e00308c9b57861274608c (patch)
tree1df701a48f817d34435918cf3dcd1251fcd9b6aa /src/gallium/winsys
parent39f16e2aa72d96286296cc0242122a1c5e92897b (diff)
r300g: print driver info if RADEON_DEBUG=info
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_common.c27
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_r300.c18
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_winsys.h11
3 files changed, 21 insertions, 35 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_common.c b/src/gallium/winsys/radeon/drm/radeon_drm_common.c
index ba548c4db5b..2ecf1bb014c 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_common.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_common.c
@@ -106,19 +106,9 @@ static void do_ioctls(struct radeon_drm_winsys *winsys)
exit(1);
}
- winsys->drm_2_1_0 = version->version_major > 2 ||
- version->version_minor >= 1;
-
- winsys->drm_2_3_0 = version->version_major > 2 ||
- version->version_minor >= 3;
-
- winsys->drm_2_6_0 = version->version_major > 2 ||
- (version->version_major == 2 &&
- version->version_minor >= 6);
-
- winsys->drm_2_8_0 = version->version_major > 2 ||
- (version->version_major == 2 &&
- version->version_minor >= 8);
+ winsys->drm_major = version->version_major;
+ winsys->drm_minor = version->version_minor;
+ winsys->drm_patchlevel = version->version_patchlevel;
info.request = RADEON_INFO_DEVICE_ID;
retval = drmCommandWriteRead(winsys->fd, DRM_RADEON_INFO, &info, sizeof(info));
@@ -167,17 +157,6 @@ static void do_ioctls(struct radeon_drm_winsys *winsys)
winsys->gart_size = gem_info.gart_size;
winsys->vram_size = gem_info.vram_size;
- debug_printf("radeon: Successfully grabbed chipset info from kernel!\n"
- "radeon: DRM version: %d.%d.%d ID: 0x%04x GB: %d Z: %d\n"
- "radeon: GART size: %d MB VRAM size: %d MB\n"
- "radeon: HyperZ: %s\n",
- version->version_major, version->version_minor,
- version->version_patchlevel, winsys->pci_id,
- winsys->gb_pipes, winsys->z_pipes,
- winsys->gart_size / 1024 / 1024,
- winsys->vram_size / 1024 / 1024,
- winsys->hyperz ? "YES" : "NO");
-
drmFreeVersion(version);
}
diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c
index 91746bae8a9..aebe6a60791 100644
--- a/src/gallium/winsys/radeon/drm/radeon_r300.c
+++ b/src/gallium/winsys/radeon/drm/radeon_r300.c
@@ -145,14 +145,24 @@ static uint32_t radeon_get_value(struct r300_winsys_screen *rws,
return ws->gb_pipes;
case R300_VID_Z_PIPES:
return ws->z_pipes;
+ case R300_VID_GART_SIZE:
+ return ws->gart_size;
+ case R300_VID_VRAM_SIZE:
+ return ws->vram_size;
+ case R300_VID_DRM_MAJOR:
+ return ws->drm_major;
+ case R300_VID_DRM_MINOR:
+ return ws->drm_minor;
+ case R300_VID_DRM_PATCHLEVEL:
+ return ws->drm_patchlevel;
case R300_VID_DRM_2_1_0:
- return ws->drm_2_1_0;
+ return ws->drm_major*100 + ws->drm_minor >= 201;
case R300_VID_DRM_2_3_0:
- return ws->drm_2_3_0;
+ return ws->drm_major*100 + ws->drm_minor >= 203;
case R300_VID_DRM_2_6_0:
- return ws->drm_2_6_0;
+ return ws->drm_major*100 + ws->drm_minor >= 206;
case R300_VID_DRM_2_8_0:
- return ws->drm_2_8_0;
+ return ws->drm_major*100 + ws->drm_minor >= 208;
case R300_CAN_HYPERZ:
return ws->hyperz;
case R300_CAN_AACOMPRESS:
diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
index 59e12ff6e6d..743c4fbc4a9 100644
--- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
@@ -46,13 +46,10 @@ struct radeon_drm_winsys {
uint32_t z_pipes; /* Z pipe count (rv530 only) */
uint32_t gart_size; /* GART size. */
uint32_t vram_size; /* VRAM size. */
- boolean drm_2_1_0; /* Square tiling support. */
- /* DRM 2.3.0 (R500 VAP regs, MSPOS regs, fixed tex3D size checking) */
- boolean drm_2_3_0;
- /* DRM 2.6.0 (Hyper-Z, GB_Z_PEQ_CONFIG allowed on rv350->r4xx, FG_ALPHA_VALUE) */
- boolean drm_2_6_0;
- /* DRM 2.8.0 (US_FORMAT regs, ARGB2101010 colorbuffer) */
- boolean drm_2_8_0;
+
+ unsigned drm_major;
+ unsigned drm_minor;
+ unsigned drm_patchlevel;
/* Hyper-Z user */
boolean hyperz;