summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2008-02-09 18:23:35 +0100
committerJohn Doe <glisse@freedesktop.org>2008-02-09 18:23:35 +0100
commit04257f1a5a28550dc430d8051bb58fd0ac34e77d (patch)
tree58406f811baf73c430a19b82ef60dca767dab285 /shared-core
parentdb2a1a223b94a5da9c5483b7963660c70052f025 (diff)
radeon_ms: bring radeon_ms up to date with lastest changes
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/radeon_ms.h2
-rw-r--r--shared-core/radeon_ms_bus.c11
-rw-r--r--shared-core/radeon_ms_irq.c3
3 files changed, 12 insertions, 4 deletions
diff --git a/shared-core/radeon_ms.h b/shared-core/radeon_ms.h
index 66533837..903de97d 100644
--- a/shared-core/radeon_ms.h
+++ b/shared-core/radeon_ms.h
@@ -457,7 +457,7 @@ struct radeon_ms_i2c *radeon_ms_i2c_create(struct drm_device *dev,
void radeon_ms_irq_emit(struct drm_device *dev);
irqreturn_t radeon_ms_irq_handler(DRM_IRQ_ARGS);
void radeon_ms_irq_preinstall(struct drm_device * dev);
-void radeon_ms_irq_postinstall(struct drm_device * dev);
+int radeon_ms_irq_postinstall(struct drm_device * dev);
int radeon_ms_irq_init(struct drm_device *dev);
void radeon_ms_irq_restore(struct drm_device *dev, struct radeon_state *state);
void radeon_ms_irq_save(struct drm_device *dev, struct radeon_state *state);
diff --git a/shared-core/radeon_ms_bus.c b/shared-core/radeon_ms_bus.c
index d50c9fb8..ed8fb211 100644
--- a/shared-core/radeon_ms_bus.c
+++ b/shared-core/radeon_ms_bus.c
@@ -46,6 +46,7 @@ struct radeon_pcie_gart {
struct radeon_pcie *pcie;
unsigned long page_first;
struct page **pages;
+ struct page *dummy_read_page;
unsigned long num_pages;
int populated;
int bound;
@@ -57,7 +58,8 @@ static void pcie_ttm_clear(struct drm_ttm_backend *backend);
static void pcie_ttm_destroy(struct drm_ttm_backend *backend);
static int pcie_ttm_needs_ub_cache_adjust(struct drm_ttm_backend *backend);
static int pcie_ttm_populate(struct drm_ttm_backend *backend,
- unsigned long num_pages, struct page **pages);
+ unsigned long num_pages, struct page **pages,
+ struct page *dummy_read_page);
static int pcie_ttm_unbind(struct drm_ttm_backend *backend);
static struct drm_ttm_backend_func radeon_pcie_gart_ttm_backend =
@@ -130,6 +132,10 @@ static int pcie_ttm_bind(struct drm_ttm_backend *backend,
for (i = 0, page = page_first; i < pcie_gart->num_pages; i++, page++) {
struct page *cur_page = pcie_gart->pages[i];
+
+ if (!page) {
+ cur_page = pcie_gart->dummy_read_page;
+ }
/* write value */
page_base = page_to_phys(cur_page);
pcie_gart_set_page_base(pcie_gart->pcie, page, page_base);
@@ -173,7 +179,8 @@ static int pcie_ttm_needs_ub_cache_adjust(struct drm_ttm_backend *backend)
}
static int pcie_ttm_populate(struct drm_ttm_backend *backend,
- unsigned long num_pages, struct page **pages)
+ unsigned long num_pages, struct page **pages,
+ struct page *dummy_read_page)
{
struct radeon_pcie_gart *pcie_gart;
diff --git a/shared-core/radeon_ms_irq.c b/shared-core/radeon_ms_irq.c
index 24182c75..2f94118f 100644
--- a/shared-core/radeon_ms_irq.c
+++ b/shared-core/radeon_ms_irq.c
@@ -115,9 +115,10 @@ void radeon_ms_irq_preinstall(struct drm_device * dev)
radeon_ack_irqs(dev_priv, mask);
}
-void radeon_ms_irq_postinstall(struct drm_device * dev)
+int radeon_ms_irq_postinstall(struct drm_device * dev)
{
radeon_ms_irq_enable(dev);
+ return 0;
}
int radeon_ms_irq_init(struct drm_device *dev)