From: Jerome Glisse Date: Sat, 9 Feb 2008 17:23:35 +0000 (+0100) Subject: radeon_ms: bring radeon_ms up to date with lastest changes X-Git-Tag: libdrm-2.4.3~16^2~269 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04257f1a5a28550dc430d8051bb58fd0ac34e77d;p=platform%2Fupstream%2Flibdrm.git radeon_ms: bring radeon_ms up to date with lastest changes --- diff --git a/shared-core/radeon_ms.h b/shared-core/radeon_ms.h index 6653383..903de97 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 d50c9fb..ed8fb21 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 24182c7..2f94118 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)