From e089de33e8efd87b30d59c571b9ab9aa302b23e1 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Mon, 21 Aug 2006 21:36:00 +0200 Subject: i915 fence object driver implementing 2 fence object types: 0x00 EXE fence. Signals when command stream interpreter has reached the point where the fence was emitted. 0x01 FLUSH fence. Signals when command stream interpreter has reached the point where the fence was emitted, and all previous drawing operations have been completed and flushed. Implements busy wait (for fastest response time / high CPU) and lazy wait (User interrupt or timer driven). --- linux-core/i915_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index c6e25f9b..d1b8d2d2 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -38,6 +38,16 @@ static struct pci_device_id pciidlist[] = { i915_PCI_IDS }; +static drm_fence_driver_t i915_fence_driver = { + .no_types = 2, + .wrap_diff = (1 << 30), + .flush_diff = 200, + .sequence_mask = 0xffffffffU, + .lazy_capable = 1, + .emit = i915_fence_emit_sequence, + .poke_flush = i915_poke_flush, +}; + static int probe(struct pci_dev *pdev, const struct pci_device_id *ent); static struct drm_driver driver = { /* don't use mtrr's here, the Xserver or user space app should @@ -78,6 +88,7 @@ static struct drm_driver driver = { .remove = __devexit_p(drm_cleanup_pci), }, + .fence_driver = &i915_fence_driver, .name = DRIVER_NAME, .desc = DRIVER_DESC, .date = DRIVER_DATE, -- cgit v1.2.3 From 8d5b7c77f9b31aa9bcf81536d39769f4f3feeb63 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Mon, 21 Aug 2006 21:37:43 +0200 Subject: Allow longer sequence lifetimes. --- linux-core/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index d1b8d2d2..56ac5fc7 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -41,7 +41,7 @@ static struct pci_device_id pciidlist[] = { static drm_fence_driver_t i915_fence_driver = { .no_types = 2, .wrap_diff = (1 << 30), - .flush_diff = 200, + .flush_diff = (1 << 29), .sequence_mask = 0xffffffffU, .lazy_capable = 1, .emit = i915_fence_emit_sequence, -- cgit v1.2.3 From 7058d06317e17253d874bf4df7b09d0d52a5fd74 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Tue, 22 Aug 2006 10:24:48 +0200 Subject: Initial i915 buffer object driver --- linux-core/i915_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index 56ac5fc7..64ab3f50 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -48,6 +48,12 @@ static drm_fence_driver_t i915_fence_driver = { .poke_flush = i915_poke_flush, }; +static drm_bo_driver_t i915_bo_driver = { + .cached_pages = 1, + .create_ttm_backend_entry = i915_create_ttm_backend_entry +}; + + static int probe(struct pci_dev *pdev, const struct pci_device_id *ent); static struct drm_driver driver = { /* don't use mtrr's here, the Xserver or user space app should @@ -89,6 +95,8 @@ static struct drm_driver driver = { }, .fence_driver = &i915_fence_driver, + .bo_driver = &i915_bo_driver, + .name = DRIVER_NAME, .desc = DRIVER_DESC, .date = DRIVER_DATE, -- cgit v1.2.3 From 23f01c9fe8e6170459fe46ad5fc9757bbe967d96 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Tue, 29 Aug 2006 18:40:08 +0200 Subject: Checkpoint commit. Buffer object flags and IOCTL argument list. --- linux-core/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index 64ab3f50..bc78dc2e 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -49,7 +49,8 @@ static drm_fence_driver_t i915_fence_driver = { }; static drm_bo_driver_t i915_bo_driver = { - .cached_pages = 1, + .cached_vram = 0, + .cached_tt = 1, .create_ttm_backend_entry = i915_create_ttm_backend_entry }; -- cgit v1.2.3 From 44f6d08988a77a640bea40d09cb61eec7566a5ce Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Thu, 31 Aug 2006 21:42:29 +0200 Subject: Validation and fencing. --- linux-core/i915_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index bc78dc2e..fb4754d8 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -51,7 +51,9 @@ static drm_fence_driver_t i915_fence_driver = { static drm_bo_driver_t i915_bo_driver = { .cached_vram = 0, .cached_tt = 1, - .create_ttm_backend_entry = i915_create_ttm_backend_entry + .create_ttm_backend_entry = i915_create_ttm_backend_entry, + .fence_type = i915_fence_types, + .invalidate_caches = i915_invalidate_caches }; -- cgit v1.2.3 From 49fbeb339c232804866cd548d6023fe559597353 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Fri, 15 Sep 2006 11:18:35 +0200 Subject: Some bugfixes. Change the fence object interface somewhat to allow some more flexibility. Make list IOCTLS really restartable. Try to avoid busy-waits in the kernel using immediate return to user-space with an -EAGAIN. --- linux-core/i915_drv.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index fb4754d8..1718bb31 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -49,6 +49,7 @@ static drm_fence_driver_t i915_fence_driver = { }; static drm_bo_driver_t i915_bo_driver = { + .vram_map = NULL, .cached_vram = 0, .cached_tt = 1, .create_ttm_backend_entry = i915_create_ttm_backend_entry, -- cgit v1.2.3 From c52fafa6288b4e6ecfce27151969749113a41f0b Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Thu, 28 Sep 2006 11:33:03 +0200 Subject: Don't enable fence / buffer objects on non-linux systems. Bump driver minor and date. --- linux-core/i915_drv.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index 1718bb31..0a0e5f99 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -38,6 +38,7 @@ static struct pci_device_id pciidlist[] = { i915_PCI_IDS }; +#ifdef I915_HAVE_FENCE static drm_fence_driver_t i915_fence_driver = { .no_types = 2, .wrap_diff = (1 << 30), @@ -47,7 +48,8 @@ static drm_fence_driver_t i915_fence_driver = { .emit = i915_fence_emit_sequence, .poke_flush = i915_poke_flush, }; - +#endif +#ifdef I915_HAVE_BUFFER static drm_bo_driver_t i915_bo_driver = { .vram_map = NULL, .cached_vram = 0, @@ -56,7 +58,7 @@ static drm_bo_driver_t i915_bo_driver = { .fence_type = i915_fence_types, .invalidate_caches = i915_invalidate_caches }; - +#endif static int probe(struct pci_dev *pdev, const struct pci_device_id *ent); static struct drm_driver driver = { @@ -97,10 +99,12 @@ static struct drm_driver driver = { .probe = probe, .remove = __devexit_p(drm_cleanup_pci), }, - +#ifdef I915_HAVE_FENCE .fence_driver = &i915_fence_driver, +#endif +#ifdef I915_HAVE_BUFFER .bo_driver = &i915_bo_driver, - +#endif .name = DRIVER_NAME, .desc = DRIVER_DESC, .date = DRIVER_DATE, -- cgit v1.2.3 From 596d7e998403f565a796c431dbbcaf9e0c49908b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 11 Aug 2006 18:06:46 +0200 Subject: Add support for secondary vertical blank interrupt to i915 driver. When the vertical blank interrupt is enabled for both pipes, pipe A is considered primary and pipe B secondary. When it's only enabled for one pipe, it's always considered primary for backwards compatibility. (cherry picked from 0c7d7f43610f705e8536a949cf2407efaa5ec217 commit) --- linux-core/i915_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index 0a0e5f99..1263bcab 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -67,12 +67,14 @@ static struct drm_driver driver = { */ .driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR | */ - DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL, + DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL | + DRIVER_IRQ_VBL2, .load = i915_driver_load, .lastclose = i915_driver_lastclose, .preclose = i915_driver_preclose, .device_is_agp = i915_driver_device_is_agp, .vblank_wait = i915_driver_vblank_wait, + .vblank_wait2 = i915_driver_vblank_wait2, .irq_preinstall = i915_driver_irq_preinstall, .irq_postinstall = i915_driver_irq_postinstall, .irq_uninstall = i915_driver_irq_uninstall, -- cgit v1.2.3 From 5881ce1b91034fbdf81dda37a23215cfc1310cdf Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Tue, 17 Oct 2006 11:05:37 +0200 Subject: Extend generality for more memory types. Fix up init and destruction code. --- linux-core/i915_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index 1263bcab..2c5b43d0 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -51,9 +51,8 @@ static drm_fence_driver_t i915_fence_driver = { #endif #ifdef I915_HAVE_BUFFER static drm_bo_driver_t i915_bo_driver = { - .vram_map = NULL, - .cached_vram = 0, - .cached_tt = 1, + .iomap = {NULL, NULL}, + .cached = {1, 1}, .create_ttm_backend_entry = i915_create_ttm_backend_entry, .fence_type = i915_fence_types, .invalidate_caches = i915_invalidate_caches -- cgit v1.2.3