Skip to contentSkip to conversation

implement BSD ring buffer V1

PATCH In review Zou Nan hai 1 participant 1 message May 19, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 implement BSD ring buffer V1

implement BSD (bit stream decoder) ring buffer
for H.264/VC1 VLD decoding on G45+

---
 drivers/gpu/drm/i915/i915_dma.c         |    2 +
 drivers/gpu/drm/i915/i915_drv.h         |    2 +
 drivers/gpu/drm/i915/i915_gem.c         |  103 ++++++++++++++++++--
 drivers/gpu/drm/i915/i915_irq.c         |   90 ++++++++-----------
 drivers/gpu/drm/i915/i915_reg.h         |   14 +++
 drivers/gpu/drm/i915/intel_ringbuffer.c |  154 +++++++++++++++++++++++++++++++
 6 files changed, 301 insertions(+), 64 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +2 -0
index 1e52693..0ee65ea 100644
@@ -128,6 +128,8 @@ static int i915_dma_cleanup(struct drm_device * dev)
 		drm_irq_uninstall(dev);
 
 	intel_cleanup_ring_buffer(dev, &dev_priv->render_ring);
+	if (HAS_BSD(dev))
+		intel_cleanup_ring_buffer(dev, &dev_priv->bsd_ring);
 
 	/* Clear the HWS virtual address at teardown */
 	if (I915_NEED_GFX_HWS(dev))
drivers/gpu/drm/i915/i915_drv.h +2 -0
index 258b4d3..ec1e148 100644
@@ -233,6 +233,7 @@ typedef struct drm_i915_private {
 
 	struct pci_dev *bridge_dev;
 	struct intel_ring_buffer render_ring;
+	struct intel_ring_buffer bsd_ring;
 
 	drm_dma_handle_t *status_page_dmah;
 	void *hw_status_page;
@@ -1123,6 +1124,7 @@ extern int intel_trans_dp_port_sel (struct drm_crtc *crtc);
 			 (dev)->pci_device == 0x2A42 ||		\
 			 (dev)->pci_device == 0x2E42)
 
+#define HAS_BSD(dev)            (IS_IRONLAKE(dev) || IS_G4X(dev))
 #define I915_NEED_GFX_HWS(dev)	(INTEL_INFO(dev)->need_gfx_hws)
 
 /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte
drivers/gpu/drm/i915/i915_gem.c +92 -11

232 lines not on this page · raw message

drivers/gpu/drm/i915/i915_irq.c +37 -53

202 lines not on this page · raw message

drivers/gpu/drm/i915/i915_reg.h +14 -0
index f3e39cc..784cf3c 100644
@@ -334,6 +334,7 @@
 #define   I915_DEBUG_INTERRUPT				(1<<2)
 #define   I915_USER_INTERRUPT				(1<<1)
 #define   I915_ASLE_INTERRUPT				(1<<0)
+#define   I915_BSD_USER_INTERRUPT                      (1<<25)
 #define EIR		0x020b0
 #define EMR		0x020b4
 #define ESR		0x020b8
@@ -368,6 +369,17 @@
 #define BB_ADDR		0x02140 /* 8 bytes */
 #define GFX_FLSH_CNTL	0x02170 /* 915+ only */
 
+/*
+ * BSD (bit stream decoder instruction and interrupt control register defines
+ * (G4X and Ironlake only)
+ */
+
+#define BSD_RING_TAIL          0x04030
+#define BSD_RING_HEAD          0x04034
+#define BSD_RING_START         0x04038
+#define BSD_RING_CTL           0x0403c
+#define BSD_RING_ACTHD         0x04074
+#define BSD_HWS_PGA            0x04080
 
 /*
  * Framebuffer compression (915+ only)
@@ -2355,6 +2367,8 @@
 #define GT_PIPE_NOTIFY		(1 << 4)
 #define GT_SYNC_STATUS          (1 << 2)
 #define GT_USER_INTERRUPT       (1 << 0)
+#define GT_BSD_USER_INTERRUPT   (1 << 5)
+
 
 #define GTISR   0x44010
 #define GTIMR   0x44014
drivers/gpu/drm/i915/intel_ringbuffer.c +154 -0

175 lines not on this page · raw message

Signature · 1 line
1.7.1