From: Dave Airlie Date: Fri, 30 Sep 2005 06:41:10 +0000 (+0000) Subject: Add support to turn writeback off via radeon module option X-Git-Tag: submit/1.0/20121108.012404~1608 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f42cdc8dcb4ae85c15580dd0bc2a07495d8f049e;p=profile%2Fivi%2Flibdrm.git Add support to turn writeback off via radeon module option --- diff --git a/bsd-core/radeon_drv.c b/bsd-core/radeon_drv.c index bd59db6..470b6d3 100644 --- a/bsd-core/radeon_drv.c +++ b/bsd-core/radeon_drv.c @@ -35,6 +35,8 @@ #include "radeon_drv.h" #include "drm_pciids.h" +int radeon_no_wb; + /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t radeon_pciidlist[] = { radeon_PCI_IDS diff --git a/linux-core/radeon_drv.c b/linux-core/radeon_drv.c index 41ca7ac..52e5017 100644 --- a/linux-core/radeon_drv.c +++ b/linux-core/radeon_drv.c @@ -37,6 +37,10 @@ #include "drm_pciids.h" +int radeon_no_wb; + +MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers\n"); +module_param_named(no_wb, radeon_no_wb, int, 0444); static int dri_library_name(struct drm_device * dev, char * buf) { diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c index f3c5ecf..9b5c9a8 100644 --- a/shared-core/radeon_cp.c +++ b/shared-core/radeon_cp.c @@ -1206,6 +1206,10 @@ static void radeon_cp_init_ring_buffer(drm_device_t * dev, dev_priv->writeback_works = 0; DRM_DEBUG("writeback test failed\n"); } + if (radeon_no_wb == 1) { + dev_priv->writeback_works = 0; + DRM_DEBUG("writeback forced off\n"); + } dev_priv->sarea_priv->last_frame = dev_priv->scratch[0] = 0; RADEON_WRITE(RADEON_LAST_FRAME_REG, dev_priv->sarea_priv->last_frame); diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h index 265697c..8455d59 100644 --- a/shared-core/radeon_drv.h +++ b/shared-core/radeon_drv.h @@ -275,6 +275,7 @@ typedef struct drm_radeon_buf_priv { u32 age; } drm_radeon_buf_priv_t; +extern int radeon_no_wb; /* radeon_cp.c */ extern int radeon_cp_init(DRM_IOCTL_ARGS); extern int radeon_cp_start(DRM_IOCTL_ARGS);