diff options
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/i915_dma.c | 2 | ||||
-rw-r--r-- | shared-core/i915_drv.h | 9 | ||||
-rw-r--r-- | shared-core/i915_init.c | 11 |
3 files changed, 19 insertions, 3 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 25172c1b..f4761da9 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -130,7 +130,7 @@ static int i915_dma_resume(drm_device_t * dev) DRM_DEBUG("%s\n", __FUNCTION__); - I915_WRITE(0x02080, dev_priv->dma_status_page); + I915_WRITE(I915REG_HWS_PGA, dev_priv->dma_status_page); DRM_DEBUG("Enabled hardware status page\n"); return 0; diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h index 946e464f..a99beaa9 100644 --- a/shared-core/i915_drv.h +++ b/shared-core/i915_drv.h @@ -317,6 +317,8 @@ extern void intel_modeset_cleanup(drm_device_t *dev); I915_WRITE(LP_RING + RING_TAIL, outring); \ } while(0) +#define MI_NOOP (0x00 << 23) + extern int i915_wait_ring(drm_device_t * dev, int n, const char *caller); /* @@ -356,6 +358,7 @@ extern int i915_wait_ring(drm_device_t * dev, int n, const char *caller); #define BB1_UNPROTECTED (0<<0) #define BB2_END_ADDR_MASK (~0x7) +#define I915REG_HWS_PGA 0x02080 #define I915REG_HWSTAM 0x02098 #define I915REG_INT_IDENTITY_R 0x020a4 #define I915REG_INT_MASK_R 0x020a8 @@ -460,8 +463,14 @@ extern int i915_wait_ring(drm_device_t * dev, int n, const char *caller); #define SRC_COPY_BLT_CMD ((2<<29)|(0x43<<22)|4) #define XY_SRC_COPY_BLT_CMD ((2<<29)|(0x53<<22)|6) +#define XY_MONO_SRC_COPY_IMM_BLT ((2<<29)|(0x71<<22)|5) #define XY_SRC_COPY_BLT_WRITE_ALPHA (1<<21) #define XY_SRC_COPY_BLT_WRITE_RGB (1<<20) +#define BLT_DEPTH_8 (0<<24) +#define BLT_DEPTH_16_565 (1<<24) +#define BLT_DEPTH_16_1555 (2<<24) +#define BLT_DEPTH_32 (3<<24) +#define BLT_ROP_GXCOPY (0xcc<<16) #define MI_BATCH_BUFFER ((0x30<<23)|1) #define MI_BATCH_BUFFER_START (0x31<<23) diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c index 0c9ef4d4..510e853b 100644 --- a/shared-core/i915_init.c +++ b/shared-core/i915_init.c @@ -211,6 +211,13 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags) dev_priv->sarea_priv->pf_current_page = 0; + memset((void *)(dev_priv->ring.virtual_start), 0, dev_priv->ring.Size); + + I915_WRITE(LP_RING + RING_START, dev_priv->ring.Start); + I915_WRITE(LP_RING + RING_LEN, + ((dev_priv->ring.Size - 4096) & RING_NR_PAGES) | + (RING_NO_REPORT | RING_VALID)); + /* We are using separate values as placeholders for mechanisms for * private backbuffer/depthbuffer usage. */ @@ -236,7 +243,7 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags) memset(dev_priv->hw_status_page, 0, PAGE_SIZE); DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page); - I915_WRITE(0x02080, dev_priv->dma_status_page); + I915_WRITE(I915REG_HWS_PGA, dev_priv->dma_status_page); DRM_DEBUG("Enabled hardware status page\n"); intel_modeset_init(dev); @@ -255,7 +262,7 @@ int i915_driver_unload(drm_device_t *dev) dev_priv->hw_status_page = NULL; dev_priv->dma_status_page = 0; /* Need to rewrite hardware status page */ - I915_WRITE(0x02080, 0x1ffff000); + I915_WRITE(I915REG_HWS_PGA, 0x1ffff000); } I915_WRITE(LP_RING + RING_LEN, 0); |