diff options
author | Robert Noland <rnoland@2hip.net> | 2008-05-23 14:36:05 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-05-27 14:25:20 -0700 |
commit | 8cd045079e21093437b99cb150b97403e945d2c2 (patch) | |
tree | 065f9d4d50a14335e9afa5af0f3c7ed0054de717 /shared-core | |
parent | ad8eb0ed01d96cc16cdafd3b48c0f0cd73d315b4 (diff) |
[FreeBSD] Add vblank-rework support and get drivers building.
The i915 driver now works again.
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/i915_dma.c | 17 | ||||
-rw-r--r-- | shared-core/i915_drv.h | 4 | ||||
-rw-r--r-- | shared-core/i915_irq.c | 3 | ||||
-rw-r--r-- | shared-core/radeon_drv.h | 1 |
4 files changed, 12 insertions, 13 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 7ccd185c..60b405d4 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -106,7 +106,7 @@ static int i915_dma_cleanup(struct drm_device * dev) return 0; } - +#if defined(I915_HAVE_BUFFER) #define DRI2_SAREA_BLOCK_TYPE(b) ((b) >> 16) #define DRI2_SAREA_BLOCK_SIZE(b) ((b) & 0xffff) #define DRI2_SAREA_BLOCK_NEXT(p) \ @@ -165,15 +165,16 @@ setup_dri2_sarea(struct drm_device * dev, return 0; } - +#endif static int i915_initialize(struct drm_device * dev, struct drm_file *file_priv, drm_i915_init_t * init) { drm_i915_private_t *dev_priv = dev->dev_private; +#if defined(I915_HAVE_BUFFER) int ret; - +#endif dev_priv->sarea = drm_getsarea(dev); if (!dev_priv->sarea) { DRM_ERROR("can not find sarea!\n"); @@ -265,7 +266,7 @@ static int i915_initialize(struct drm_device * dev, #ifdef I915_HAVE_BUFFER mutex_init(&dev_priv->cmdbuf_mutex); #endif - +#if defined(I915_HAVE_BUFFER) if (init->func == I915_INIT_DMA2) { ret = setup_dri2_sarea(dev, file_priv, init); if (ret) { @@ -274,7 +275,7 @@ static int i915_initialize(struct drm_device * dev, return ret; } } - +#endif return 0; } @@ -790,7 +791,7 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data, return 0; } -#if DRM_DEBUG_CODE +#if defined(DRM_DEBUG_CODE) #define DRM_DEBUG_RELOCATION (drm_debug != 0) #else #define DRM_DEBUG_RELOCATION 0 @@ -1078,7 +1079,7 @@ void i915_driver_lastclose(struct drm_device * dev) i915_do_cleanup_pageflip(dev); if (dev_priv->agp_heap) i915_mem_takedown(&(dev_priv->agp_heap)); - +#if defined(I915_HAVE_BUFFER) if (dev_priv->sarea_kmap.virtual) { drm_bo_kunmap(&dev_priv->sarea_kmap); dev_priv->sarea_kmap.virtual = NULL; @@ -1092,7 +1093,7 @@ void i915_driver_lastclose(struct drm_device * dev) mutex_unlock(&dev->struct_mutex); dev_priv->sarea_bo = NULL; } - +#endif i915_dma_cleanup(dev); } diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h index aad74b1c..b216c814 100644 --- a/shared-core/i915_drv.h +++ b/shared-core/i915_drv.h @@ -148,11 +148,11 @@ typedef struct drm_i915_private { DRM_SPINTYPE swaps_lock; drm_i915_vbl_swap_t vbl_swaps; unsigned int swaps_pending; - +#if defined(DRI2) /* DRI2 sarea */ struct drm_buffer_object *sarea_bo; struct drm_bo_kmap_obj sarea_kmap; - +#endif /* Register state */ u8 saveLBB; u32 saveDSPACNTR; diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c index 785008d4..2287cd0c 100644 --- a/shared-core/i915_irq.c +++ b/shared-core/i915_irq.c @@ -396,8 +396,7 @@ u32 i915_get_vblank_counter(struct drm_device *dev, int plane) low_frame = pipe ? PIPEBFRAMEPIXEL : PIPEAFRAMEPIXEL; if (!i915_pipe_enabled(dev, pipe)) { - printk(KERN_ERR "trying to get vblank count for disabled " - "pipe %d\n", pipe); + DRM_ERROR("trying to get vblank count for disabled pipe %d\n", pipe); return 0; } diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h index 4f04f30f..c478f542 100644 --- a/shared-core/radeon_drv.h +++ b/shared-core/radeon_drv.h @@ -380,7 +380,6 @@ extern void radeon_do_release(struct drm_device * dev); extern u32 radeon_get_vblank_counter(struct drm_device *dev, int crtc); extern int radeon_enable_vblank(struct drm_device *dev, int crtc); extern void radeon_disable_vblank(struct drm_device *dev, int crtc); -extern void radeon_do_release(struct drm_device * dev); extern irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS); extern void radeon_driver_irq_preinstall(struct drm_device * dev); extern int radeon_driver_irq_postinstall(struct drm_device * dev); |