r300 driver in extras?
David Woodhouse
dwmw2 at infradead.org
Fri Mar 31 17:32:44 UTC 2006
On Fri, 2006-03-31 at 15:47 +0300, Jonathan Dieter wrote:
> It seems that the only difference in Mesa when the r300 is enabled is
> that an extra file (r300_dri.so) is installed in /usr/lib64/dri, and
> that the only difference in the kernel is the drm module is patched to
> not recognize the r300 PCI ids. It seems that the Mesa problem could be
> easily fixed, but what is the easiest way to fix the kernel (aside from
> providing my own (un)patched kernel)?
We could make the crippling of R300 _optional_, by doing it with the
patch below instead of just by ripping the relevant PCI IDs out.
DaveJ?
--- linux-2.6.16.ppc/drivers/char/drm/radeon_cp.c~ 2006-03-20 05:53:29.000000000 +0000
+++ linux-2.6.16.ppc/drivers/char/drm/radeon_cp.c 2006-03-31 18:26:00.000000000 +0100
@@ -34,6 +34,11 @@
#include "radeon_drv.h"
#include "r300_reg.h"
+int radeon_allow_r300;
+
+MODULE_PARM_DESC(allow_r300, "Allow DRI on Radeon R300 and later cards");
+module_param_named(allow_r300, radeon_allow_r300, int, 0444);
+
#define RADEON_FIFO_DEBUG 0
static int radeon_do_cleanup_cp(drm_device_t * dev);
@@ -2104,6 +2109,11 @@ int radeon_driver_load(struct drm_device
drm_radeon_private_t *dev_priv;
int ret = 0;
+ if (!radeon_allow_r300 && (flags & CHIP_FAMILY_MASK) >= CHIP_R300) {
+ printk(KERN_NOTICE "Avoiding DRI on Radeon R300+. Use 'allow_r300=1' module option to override\n");
+ return DRM_ERR(ENXIO);
+ }
+
dev_priv = drm_alloc(sizeof(drm_radeon_private_t), DRM_MEM_DRIVER);
if (dev_priv == NULL)
return DRM_ERR(ENOMEM);
--
dwmw2
More information about the fedora-devel-list
mailing list