diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-11-22 05:03:27 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-11-22 05:03:27 +0000 |
commit | b0be1f36e4b1cd5d1197426971fb6ce73ada554c (patch) | |
tree | 9c265535240e3f0da8618722610eb0450bfa222a /sys/dev/pci | |
parent | 4d03db53bf9cac1ae0dd6aade1bf2d3e738086e9 (diff) |
Slightly fix up previous
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/i915_dma.c | 16 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_drv.h | 32 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_irq.c | 2 |
3 files changed, 25 insertions, 25 deletions
diff --git a/sys/dev/pci/drm/i915_dma.c b/sys/dev/pci/drm/i915_dma.c index 2de42ae5f3b..01852eb901a 100644 --- a/sys/dev/pci/drm/i915_dma.c +++ b/sys/dev/pci/drm/i915_dma.c @@ -43,7 +43,7 @@ int i915_wait_ring(struct drm_device * dev, int n, const char *caller) { drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_ring_buffer_t *ring = &(dev_priv->ring); - u_int32_t acthd_reg = IS_I965G(dev) ? ACTHD_I965 : ACTHD; + u_int32_t acthd_reg = IS_I965G(dev_priv) ? ACTHD_I965 : ACTHD; u_int32_t last_acthd = I915_READ(acthd_reg); u_int32_t acthd; u_int32_t last_head = I915_READ(PRB0_HEAD) & HEAD_ADDR; @@ -148,7 +148,7 @@ static int i915_dma_cleanup(struct drm_device * dev) } /* Clear the HWS virtual address at teardown */ - if (I915_NEED_GFX_HWS(dev)) + if (I915_NEED_GFX_HWS(dev_priv)) i915_free_hws(dev); return 0; @@ -399,7 +399,7 @@ static int i915_emit_box(struct drm_device * dev, return EINVAL; } - if (IS_I965G(dev)) { + if (IS_I965G(dev_priv)) { BEGIN_LP_RING(4); OUT_RING(GFX_OP_DRAWRECT_INFO_I965); OUT_RING((box.x1 & 0xffff) | (box.y1 << 16)); @@ -525,9 +525,9 @@ int i915_dispatch_batchbuffer(struct drm_device * dev, return ret; } - if (!IS_I830(dev) && !IS_845G(dev)) { + if (!IS_I830(dev_priv) && !IS_845G(dev_priv)) { BEGIN_LP_RING(2); - if (IS_I965G(dev)) { + if (IS_I965G(dev_priv)) { OUT_RING(MI_BATCH_BUFFER_START | (2 << 6) | MI_BATCH_NON_SECURE_I965); OUT_RING(batch->start); } else { @@ -766,7 +766,7 @@ int i915_set_status_page(struct drm_device *dev, void *data, drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_hws_addr_t *hws = data; - if (!I915_NEED_GFX_HWS(dev)) + if (!I915_NEED_GFX_HWS(dev_priv)) return EINVAL; if (!dev_priv) { @@ -816,7 +816,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) dev_priv->flags = flags; /* Add register map (needed for suspend/resume) */ - bar = vga_pci_bar_info(dev->vga_softc, (IS_I9XX(dev) ? 0 : 1)); + bar = vga_pci_bar_info(dev->vga_softc, (IS_I9XX(dev_priv) ? 0 : 1)); if (bar == NULL) { printf(": can't get BAR info\n"); return (EINVAL); @@ -830,7 +830,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) } /* Init HWS */ - if (!I915_NEED_GFX_HWS(dev)) { + if (!I915_NEED_GFX_HWS(dev_priv)) { ret = i915_init_phys_hws(dev); if (ret != 0) return ret; diff --git a/sys/dev/pci/drm/i915_drv.h b/sys/dev/pci/drm/i915_drv.h index 8a864f4a79b..0d2ebcdef4b 100644 --- a/sys/dev/pci/drm/i915_drv.h +++ b/sys/dev/pci/drm/i915_drv.h @@ -1718,28 +1718,28 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); /* Chipset type macros */ -#define IS_I830(dev) ((dev_priv)->flags & CHIP_I830) -#define IS_845G(dev) ((dev_priv)->flags & CHIP_I845G) -#define IS_I85X(dev) ((dev_priv)->flags & CHIP_I85X) -#define IS_I865G(dev) ((dev_priv)->flags & CHIP_I865G) +#define IS_I830(dev_priv) ((dev_priv)->flags & CHIP_I830) +#define IS_845G(dev_priv) ((dev_priv)->flags & CHIP_I845G) +#define IS_I85X(dev_priv) ((dev_priv)->flags & CHIP_I85X) +#define IS_I865G(dev_priv) ((dev_priv)->flags & CHIP_I865G) -#define IS_I915G(dev) ((dev_priv)->flags & CHIP_I915G) -#define IS_I915GM(dev) ((dev_priv)->flags & CHIP_I915GM) -#define IS_I945G(dev) ((dev)->flags & CHIP_I945G) -#define IS_I945GM(dev) ((dev_priv)->flags & CHIP_I945GM) -#define IS_I965G(dev) ((dev_priv)->flags & CHIP_I965) -#define IS_I965GM(dev) ((dev_priv)->flags & CHIP_I965GM) +#define IS_I915G(dev_priv) ((dev_priv)->flags & CHIP_I915G) +#define IS_I915GM(dev_priv) ((dev_priv)->flags & CHIP_I915GM) +#define IS_I945G(dev_priv) ((dev)->flags & CHIP_I945G) +#define IS_I945GM(dev_priv) ((dev_priv)->flags & CHIP_I945GM) +#define IS_I965G(dev_priv) ((dev_priv)->flags & CHIP_I965) +#define IS_I965GM(dev_priv) ((dev_priv)->flags & CHIP_I965GM) -#define IS_GM45(dev) ((dev_priv)->flags & CHIP_GM45) -#define IS_G4X(dev) ((dev_priv)->flags & CHIP_G4X) +#define IS_GM45(dev_priv) ((dev_priv)->flags & CHIP_GM45) +#define IS_G4X(dev_priv) ((dev_priv)->flags & CHIP_G4X) -#define IS_G33(dev) ((dev_priv)->flags & CHIP_G33) +#define IS_G33(dev_priv) ((dev_priv)->flags & CHIP_G33) -#define IS_I9XX(dev) ((dev_priv)->flags & CHIP_I9XX) +#define IS_I9XX(dev_priv) ((dev_priv)->flags & CHIP_I9XX) -#define IS_MOBILE(dev) (dev_priv->flags & CHIP_M) +#define IS_MOBILE(dev_priv) (dev_priv->flags & CHIP_M) -#define I915_NEED_GFX_HWS(dev) (dev_priv->flags & CHIP_HWS) +#define I915_NEED_GFX_HWS(dev_priv) (dev_priv->flags & CHIP_HWS) #define PRIMARY_RINGBUFFER_SIZE (128*1024) diff --git a/sys/dev/pci/drm/i915_irq.c b/sys/dev/pci/drm/i915_irq.c index e1f4d5119c9..34efc2de3b1 100644 --- a/sys/dev/pci/drm/i915_irq.c +++ b/sys/dev/pci/drm/i915_irq.c @@ -364,7 +364,7 @@ int i915_enable_vblank(struct drm_device *dev, int plane) int pipe = i915_get_pipe(dev, plane); mtx_enter(&dev_priv->user_irq_lock); - i915_enable_pipestat(dev_priv, pipe, (IS_I965G(dev) ? + i915_enable_pipestat(dev_priv, pipe, (IS_I965G(dev_priv) ? PIPE_START_VBLANK_INTERRUPT_ENABLE : PIPE_VBLANK_INTERRUPT_ENABLE)); mtx_leave(&dev_priv->user_irq_lock); |