aboutsummaryrefslogtreecommitdiff
path: root/linux-core/radeon_drv.c
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2005-07-03 17:16:12 +0000
committerJon Smirl <jonsmirl@yahoo.com>2005-07-03 17:16:12 +0000
commitd41af11ee30413f90064cfffb5687be92a28021c (patch)
tree2faf7181d9a653f6549ea4bb2ef2fb93aacdf9ad /linux-core/radeon_drv.c
parente2ba08d28335b43515ccbefcc21052ed0d5a7e47 (diff)
Add sysfs attribute dri_library_name on Linux. code in share-core/via_drv.c
is ok to be shared, it will be passive on BSD.
Diffstat (limited to 'linux-core/radeon_drv.c')
-rw-r--r--linux-core/radeon_drv.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/linux-core/radeon_drv.c b/linux-core/radeon_drv.c
index c26d887d..a79bdf38 100644
--- a/linux-core/radeon_drv.c
+++ b/linux-core/radeon_drv.c
@@ -62,6 +62,17 @@ static int version(drm_version_t * version)
return 0;
}
+static int dri_library_name(struct drm_device * dev, char * buf)
+{
+ drm_radeon_private_t *dev_priv = dev->dev_private;
+ int family = dev_priv->flags & CHIP_FAMILY_MASK;
+
+ return snprintf(buf, PAGE_SIZE, "%s\n",
+ (family < CHIP_R200) ? "radeon" :
+ ((family < CHIP_R300) ? "r200" :
+ "r300"));
+}
+
static struct pci_device_id pciidlist[] = {
radeon_PCI_IDS
};
@@ -83,6 +94,7 @@ static struct drm_driver driver = {
.pretakedown = radeon_driver_pretakedown,
.open_helper = radeon_driver_open_helper,
.vblank_wait = radeon_driver_vblank_wait,
+ .dri_library_name = dri_library_name,
.irq_preinstall = radeon_driver_irq_preinstall,
.irq_postinstall = radeon_driver_irq_postinstall,
.irq_uninstall = radeon_driver_irq_uninstall,