summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-07-05 07:20:28 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-07-05 07:20:28 +0000
commit9d0828b86504405f58688b455c9a3d085b5f5626 (patch)
tree60da239a6ee0914e0b10bb85bc4bddaf108ee785 /sys/dev
parent2b4e7d165f98aab065ff44e5ff0927ce3307fd96 (diff)
make use of the drm_i915_private macro to reduce the diff to linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/i915/dvo_ns2501.c6
-rw-r--r--sys/dev/pci/drm/i915/i915_dma.c4
-rw-r--r--sys/dev/pci/drm/i915/i915_drv.c12
-rw-r--r--sys/dev/pci/drm/i915/i915_drv.h6
-rw-r--r--sys/dev/pci/drm/i915/i915_gem.c10
-rw-r--r--sys/dev/pci/drm/i915/i915_irq.c45
-rw-r--r--sys/dev/pci/drm/i915/i915_suspend.c32
-rw-r--r--sys/dev/pci/drm/i915/intel_bios.c42
-rw-r--r--sys/dev/pci/drm/i915/intel_crt.c24
-rw-r--r--sys/dev/pci/drm/i915/intel_ddi.c50
-rw-r--r--sys/dev/pci/drm/i915/intel_display.c358
-rw-r--r--sys/dev/pci/drm/i915/intel_dp.c58
-rw-r--r--sys/dev/pci/drm/i915/intel_drv.h22
-rw-r--r--sys/dev/pci/drm/i915/intel_dvo.c16
-rw-r--r--sys/dev/pci/drm/i915/intel_fb.c12
-rw-r--r--sys/dev/pci/drm/i915/intel_hdmi.c44
-rw-r--r--sys/dev/pci/drm/i915/intel_lvds.c18
-rw-r--r--sys/dev/pci/drm/i915/intel_modes.c6
-rw-r--r--sys/dev/pci/drm/i915/intel_opregion.c20
-rw-r--r--sys/dev/pci/drm/i915/intel_overlay.c8
-rw-r--r--sys/dev/pci/drm/i915/intel_panel.c32
-rw-r--r--sys/dev/pci/drm/i915/intel_pm.c234
-rw-r--r--sys/dev/pci/drm/i915/intel_ringbuffer.c14
-rw-r--r--sys/dev/pci/drm/i915/intel_sdvo.c30
-rw-r--r--sys/dev/pci/drm/i915/intel_sprite.c24
-rw-r--r--sys/dev/pci/drm/i915/intel_tv.c16
26 files changed, 571 insertions, 572 deletions
diff --git a/sys/dev/pci/drm/i915/dvo_ns2501.c b/sys/dev/pci/drm/i915/dvo_ns2501.c
index 24b0a2d7d58..a1f27ebf4fc 100644
--- a/sys/dev/pci/drm/i915/dvo_ns2501.c
+++ b/sys/dev/pci/drm/i915/dvo_ns2501.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dvo_ns2501.c,v 1.3 2013/03/31 11:43:23 kettenis Exp $ */
+/* $OpenBSD: dvo_ns2501.c,v 1.4 2013/07/05 07:20:27 jsg Exp $ */
/*
*
* Copyright (c) 2012 Gilles Dartiguelongue, Thomas Richter
@@ -111,7 +111,7 @@ enable_dvo(struct intel_dvo_device *dvo)
struct intel_gmbus *bus = container_of(adapter,
struct intel_gmbus,
controller);
- drm_i915_private_t *dev_priv = bus->dev_priv;
+ struct drm_i915_private *dev_priv = bus->dev_priv;
DRM_DEBUG_KMS("%s: Trying to re-enable the DVO\n", __FUNCTION__);
@@ -139,7 +139,7 @@ restore_dvo(struct intel_dvo_device *dvo)
struct intel_gmbus *bus = container_of(adapter,
struct intel_gmbus,
controller);
- drm_i915_private_t *dev_priv = bus->dev_priv;
+ struct drm_i915_private *dev_priv = bus->dev_priv;
struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
I915_WRITE(DVOC, ns->dvoc);
diff --git a/sys/dev/pci/drm/i915/i915_dma.c b/sys/dev/pci/drm/i915/i915_dma.c
index 21407ed502c..d596c0764e8 100644
--- a/sys/dev/pci/drm/i915/i915_dma.c
+++ b/sys/dev/pci/drm/i915/i915_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_dma.c,v 1.7 2013/04/17 20:04:04 kettenis Exp $ */
+/* $OpenBSD: i915_dma.c,v 1.8 2013/07/05 07:20:27 jsg Exp $ */
/* i915_dma.c -- DMA support for the I915 -*- linux-c -*-
*/
/*
@@ -286,7 +286,7 @@ intel_teardown_mchbar(struct inteldrm_softc *dev_priv,
int
i915_load_modeset_init(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int ret;
ret = intel_parse_bios(dev);
diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c
index cacc44a94f1..f3d23578ee9 100644
--- a/sys/dev/pci/drm/i915/i915_drv.c
+++ b/sys/dev/pci/drm/i915/i915_drv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_drv.c,v 1.34 2013/07/01 20:16:58 kettenis Exp $ */
+/* $OpenBSD: i915_drv.c,v 1.35 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org>
*
@@ -705,7 +705,7 @@ i915_semaphore_is_enabled(struct drm_device *dev)
int
i915_drm_freeze(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
drm_kms_helper_poll_disable(dev);
@@ -741,7 +741,7 @@ i915_drm_freeze(struct drm_device *dev)
int
__i915_drm_thaw(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int error = 0;
i915_restore_state(dev);
@@ -1859,7 +1859,7 @@ i965_do_reset(struct drm_device *dev)
int
ironlake_do_reset(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 gdrst;
int retries;
@@ -1896,7 +1896,7 @@ ironlake_do_reset(struct drm_device *dev)
int
gen6_do_reset(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int ret = 0;
int retries;
@@ -1940,7 +1940,7 @@ gen6_do_reset(struct drm_device *dev)
int
intel_gpu_reset(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int ret = -ENODEV;
switch (INTEL_INFO(dev)->gen) {
diff --git a/sys/dev/pci/drm/i915/i915_drv.h b/sys/dev/pci/drm/i915/i915_drv.h
index 6b94dcff27f..a47ae71d308 100644
--- a/sys/dev/pci/drm/i915/i915_drv.h
+++ b/sys/dev/pci/drm/i915/i915_drv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_drv.h,v 1.23 2013/07/04 09:52:29 jsg Exp $ */
+/* $OpenBSD: i915_drv.h,v 1.24 2013/07/05 07:20:27 jsg Exp $ */
/* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-
*/
/*
@@ -1565,7 +1565,7 @@ static inline bool
i915_gem_object_pin_fence(struct drm_i915_gem_object *obj)
{
if (obj->fence_reg != I915_FENCE_REG_NONE) {
- drm_i915_private_t *dev_priv = obj->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = obj->base.dev->dev_private;
dev_priv->fence_regs[obj->fence_reg].pin_count++;
return true;
} else
@@ -1576,7 +1576,7 @@ static inline void
i915_gem_object_unpin_fence(struct drm_i915_gem_object *obj)
{
if (obj->fence_reg != I915_FENCE_REG_NONE) {
- drm_i915_private_t *dev_priv = obj->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = obj->base.dev->dev_private;
dev_priv->fence_regs[obj->fence_reg].pin_count--;
}
}
diff --git a/sys/dev/pci/drm/i915/i915_gem.c b/sys/dev/pci/drm/i915/i915_gem.c
index 6c15b56f2d8..be3ca63e7f4 100644
--- a/sys/dev/pci/drm/i915/i915_gem.c
+++ b/sys/dev/pci/drm/i915/i915_gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_gem.c,v 1.26 2013/07/04 09:49:00 jsg Exp $ */
+/* $OpenBSD: i915_gem.c,v 1.27 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org>
*
@@ -70,7 +70,7 @@ void i915_gem_object_update_fence(struct drm_i915_gem_object *,
struct drm_i915_fence_reg *, bool);
int i915_gem_object_flush_fence(struct drm_i915_gem_object *);
struct drm_i915_fence_reg *i915_find_fence_reg(struct drm_device *);
-void i915_gem_reset_ring_lists(drm_i915_private_t *,
+void i915_gem_reset_ring_lists(struct drm_i915_private *,
struct intel_ring_buffer *);
void i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *);
void i915_gem_request_remove_from_client(struct drm_i915_gem_request *);
@@ -1414,7 +1414,7 @@ i915_gem_request_remove_from_client(struct drm_i915_gem_request *request)
}
void
-i915_gem_reset_ring_lists(drm_i915_private_t *dev_priv,
+i915_gem_reset_ring_lists(struct drm_i915_private *dev_priv,
struct intel_ring_buffer *ring)
{
while (!list_empty(&ring->request_list)) {
@@ -1919,7 +1919,7 @@ i915_gem_write_fence(struct drm_device *dev, int reg,
}
static inline int
-fence_number(drm_i915_private_t *dev_priv,
+fence_number(struct drm_i915_private *dev_priv,
struct drm_i915_fence_reg *fence)
{
return fence - dev_priv->fence_regs;
@@ -3152,7 +3152,7 @@ cleanup_render_ring:
int
i915_gem_init(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint64_t gtt_start, gtt_end;
struct agp_softc *asc;
int ret;
diff --git a/sys/dev/pci/drm/i915/i915_irq.c b/sys/dev/pci/drm/i915/i915_irq.c
index 467888c344c..1071dd3fab5 100644
--- a/sys/dev/pci/drm/i915/i915_irq.c
+++ b/sys/dev/pci/drm/i915/i915_irq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_irq.c,v 1.5 2013/04/17 20:04:04 kettenis Exp $ */
+/* $OpenBSD: i915_irq.c,v 1.6 2013/07/05 07:20:27 jsg Exp $ */
/* i915_irq.c -- IRQ support for the I915 -*- linux-c -*-
*/
/*
@@ -44,14 +44,14 @@ int i915_get_vblank_timestamp(struct drm_device *, int, int *,
void ironlake_handle_rps_change(struct drm_device *);
void notify_ring(struct drm_device *, struct intel_ring_buffer *);
void ivybridge_handle_parity_error(struct drm_device *);
-void snb_gt_irq_handler(struct drm_device *, struct inteldrm_softc *, u32);
-void snb_gt_irq_handler(struct drm_device *, struct inteldrm_softc *, u32);
-void gen6_queue_rps_work(struct inteldrm_softc *, u32);
+void snb_gt_irq_handler(struct drm_device *, struct drm_i915_private *, u32);
+void snb_gt_irq_handler(struct drm_device *, struct drm_i915_private *, u32);
+void gen6_queue_rps_work(struct drm_i915_private *, u32);
int valleyview_intr(void *);
void ibx_irq_handler(struct drm_device *, u32);
void cpt_irq_handler(struct drm_device *, u32);
int ivybridge_intr(void *);
-void ilk_gt_irq_handler(struct drm_device *, struct inteldrm_softc *, u32);
+void ilk_gt_irq_handler(struct drm_device *, struct drm_i915_private *, u32);
int ironlake_intr(void *);
void i915_get_extra_instdone(struct drm_device *, uint32_t *);
void i915_report_and_clear_eir(struct drm_device *);
@@ -311,7 +311,7 @@ i915_get_vblank_timestamp(struct drm_device *dev, int pipe,
struct timeval *vblank_time,
unsigned flags)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc;
if (pipe < 0 || pipe >= dev_priv->num_pipe) {
@@ -408,7 +408,7 @@ void
notify_ring(struct drm_device *dev,
struct intel_ring_buffer *ring)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (ring->obj == NULL)
return;
@@ -548,7 +548,7 @@ ivybridge_handle_parity_error(struct drm_device *dev)
void
snb_gt_irq_handler(struct drm_device *dev,
- struct inteldrm_softc *dev_priv,
+ struct drm_i915_private *dev_priv,
u32 gt_iir)
{
@@ -572,7 +572,7 @@ snb_gt_irq_handler(struct drm_device *dev,
}
void
-gen6_queue_rps_work(struct inteldrm_softc *dev_priv,
+gen6_queue_rps_work(struct drm_i915_private *dev_priv,
u32 pm_iir)
{
/*
@@ -821,7 +821,7 @@ ivybridge_intr(void *arg)
void
ilk_gt_irq_handler(struct drm_device *dev,
- struct inteldrm_softc *dev_priv,
+ struct drm_i915_private *dev_priv,
u32 gt_iir)
{
if (gt_iir & (GT_USER_INTERRUPT | GT_PIPE_NOTIFY))
@@ -946,7 +946,7 @@ void
i915_get_extra_instdone(struct drm_device *dev,
uint32_t *instdone)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
memset(instdone, 0, sizeof(*instdone) * I915_NUM_INSTDONE_REG);
switch(INTEL_INFO(dev)->gen) {
@@ -973,7 +973,7 @@ i915_get_extra_instdone(struct drm_device *dev,
#ifdef CONFIG_DEBUG_FS
struct drm_i915_error_object *
-i915_error_object_create(struct inteldrm_softc *dev_priv,
+i915_error_object_create(struct drm_i915_private *dev_priv,
struct drm_i915_gem_object *src)
{
struct drm_i915_error_object *dst;
@@ -1139,7 +1139,7 @@ void
i915_gem_record_fences(struct drm_device *dev,
struct drm_i915_error_state *error)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int i;
/* Fences */
@@ -1167,7 +1167,7 @@ i915_gem_record_fences(struct drm_device *dev,
}
struct drm_i915_error_object *
-i915_error_first_batchbuffer(struct inteldrm_softc *dev_priv,
+i915_error_first_batchbuffer(struct drm_i915_private *dev_priv,
struct intel_ring_buffer *ring)
{
struct drm_i915_gem_object *obj;
@@ -1213,7 +1213,7 @@ i915_record_ring_state(struct drm_device *dev,
struct drm_i915_error_state *error,
struct intel_ring_buffer *ring)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (INTEL_INFO(dev)->gen >= 6) {
error->rc_psmi[ring->id] = I915_READ(ring->mmio_base + 0x50);
@@ -1257,7 +1257,7 @@ void
i915_gem_record_rings(struct drm_device *dev,
struct drm_i915_error_state *error)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_ring_buffer *ring;
struct drm_i915_gem_request *request;
int i, count;
@@ -1308,7 +1308,7 @@ i915_gem_record_rings(struct drm_device *dev,
void
i915_capture_error_state(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_gem_object *obj;
struct drm_i915_error_state *error;
unsigned long flags;
@@ -1424,7 +1424,7 @@ i915_capture_error_state(struct drm_device *dev)
void
i915_destroy_error_state(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_error_state *error;
unsigned long flags;
@@ -1443,7 +1443,7 @@ i915_destroy_error_state(struct drm_device *dev)
void
i915_report_and_clear_eir(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t instdone[I915_NUM_INSTDONE_REG];
u32 eir = I915_READ(EIR);
int pipe, i;
@@ -1546,7 +1546,7 @@ i915_report_and_clear_eir(struct drm_device *dev)
void
i915_handle_error(struct drm_device *dev, bool wedged)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_ring_buffer *ring;
int i;
@@ -1786,7 +1786,7 @@ bool
kick_ring(struct intel_ring_buffer *ring)
{
struct drm_device *dev = ring->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 tmp = I915_READ_CTL(ring);
if (tmp & RING_WAIT) {
DRM_ERROR("Kicking stuck wait on %s\n",
@@ -1836,7 +1836,7 @@ i915_hangcheck_hung(struct drm_device *dev)
void
i915_hangcheck_elapsed(void *arg)
{
- struct inteldrm_softc *dev_priv = arg;
+ drm_i915_private_t *dev_priv = arg;
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
uint32_t acthd[I915_NUM_RINGS], instdone[I915_NUM_INSTDONE_REG];
struct intel_ring_buffer *ring;
@@ -2823,7 +2823,6 @@ i965_irq_uninstall(struct drm_device * dev)
void
intel_irq_init(struct drm_device *dev)
{
-// struct inteldrm_softc *dev_priv = dev->dev_private;
dev->driver->get_vblank_counter = i915_get_vblank_counter;
dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
diff --git a/sys/dev/pci/drm/i915/i915_suspend.c b/sys/dev/pci/drm/i915/i915_suspend.c
index 6ac4ea0e397..68ad2972288 100644
--- a/sys/dev/pci/drm/i915/i915_suspend.c
+++ b/sys/dev/pci/drm/i915/i915_suspend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_suspend.c,v 1.1 2013/03/18 12:36:52 jsg Exp $ */
+/* $OpenBSD: i915_suspend.c,v 1.2 2013/07/05 07:20:27 jsg Exp $ */
/*
*
* Copyright 2008 (c) Intel Corporation
@@ -50,7 +50,7 @@ void i915_restore_modeset_reg(struct drm_device *);
bool
i915_pipe_enabled(struct drm_device *dev, enum pipe pipe)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 dpll_reg;
/* On IVB, 3rd pipe shares PLL with another one */
@@ -68,7 +68,7 @@ i915_pipe_enabled(struct drm_device *dev, enum pipe pipe)
void
i915_save_palette(struct drm_device *dev, enum pipe pipe)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long reg = (pipe == PIPE_A ? _PALETTE_A : _PALETTE_B);
u32 *array;
int i;
@@ -91,7 +91,7 @@ i915_save_palette(struct drm_device *dev, enum pipe pipe)
void
i915_restore_palette(struct drm_device *dev, enum pipe pipe)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long reg = (pipe == PIPE_A ? _PALETTE_A : _PALETTE_B);
u32 *array;
int i;
@@ -115,7 +115,7 @@ u_int8_t
i915_read_indexed(struct drm_device *dev, u_int16_t index_port,
u_int16_t data_port, u_int8_t reg)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE8(index_port, reg);
return I915_READ8(data_port);
@@ -125,7 +125,7 @@ u_int8_t
i915_read_ar(struct drm_device *dev, u_int16_t st01,
u_int8_t reg, u_int16_t palette_enable)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_READ8(st01);
I915_WRITE8(VGA_AR_INDEX, palette_enable | reg);
@@ -136,7 +136,7 @@ void
i915_write_ar(struct drm_device *dev, u_int16_t st01, u_int8_t reg,
u_int8_t val, u_int16_t palette_enable)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_READ8(st01);
I915_WRITE8(VGA_AR_INDEX, palette_enable | reg);
@@ -147,7 +147,7 @@ void
i915_write_indexed(struct drm_device *dev, u_int16_t index_port,
u_int16_t data_port, u_int8_t reg, u_int8_t val)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE8(index_port, reg);
I915_WRITE8(data_port, val);
@@ -156,7 +156,7 @@ i915_write_indexed(struct drm_device *dev, u_int16_t index_port,
void
i915_save_vga(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int i;
u16 cr_index, cr_data, st01;
@@ -215,7 +215,7 @@ i915_save_vga(struct drm_device *dev)
void
i915_restore_vga(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int i;
u16 cr_index, cr_data, st01;
@@ -269,7 +269,7 @@ i915_restore_vga(struct drm_device *dev)
void
i915_save_modeset_reg(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int i;
if (drm_core_check_feature(dev, DRIVER_MODESET))
@@ -438,7 +438,7 @@ i915_save_modeset_reg(struct drm_device *dev)
void
i915_restore_modeset_reg(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int dpll_a_reg, fpa0_reg, fpa1_reg;
int dpll_b_reg, fpb0_reg, fpb1_reg;
int i;
@@ -651,7 +651,7 @@ i915_restore_modeset_reg(struct drm_device *dev)
void
i915_save_display(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
/* Display arbitration control */
dev_priv->regfile.saveDSPARB = I915_READ(DSPARB);
@@ -739,7 +739,7 @@ i915_save_display(struct drm_device *dev)
void
i915_restore_display(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
/* Display arbitration */
I915_WRITE(DSPARB, dev_priv->regfile.saveDSPARB);
@@ -840,7 +840,7 @@ i915_restore_display(struct drm_device *dev)
int
i915_save_state(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int i;
dev_priv->regfile.saveLBB = pci_conf_read(dev_priv->pc, dev_priv->tag, LBB);
@@ -891,7 +891,7 @@ i915_save_state(struct drm_device *dev)
int
i915_restore_state(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int i;
pci_conf_write(dev_priv->pc, dev_priv->tag, LBB, dev_priv->regfile.saveLBB);
diff --git a/sys/dev/pci/drm/i915/intel_bios.c b/sys/dev/pci/drm/i915/intel_bios.c
index b994f4cb543..9bf44736f91 100644
--- a/sys/dev/pci/drm/i915/intel_bios.c
+++ b/sys/dev/pci/drm/i915/intel_bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_bios.c,v 1.3 2013/07/04 09:52:29 jsg Exp $ */
+/* $OpenBSD: intel_bios.c,v 1.4 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2006 Intel Corporation
*
@@ -45,18 +45,18 @@ bool lvds_dvo_timing_equal_size(const struct lvds_dvo_timing *,
const struct lvds_dvo_timing *
get_lvds_dvo_timing(const struct bdb_lvds_lfp_data *,
const struct bdb_lvds_lfp_data_ptrs *, int);
-void parse_lfp_panel_data(struct inteldrm_softc *, struct bdb_header *);
-void parse_sdvo_panel_data(struct inteldrm_softc *, struct bdb_header *);
+void parse_lfp_panel_data(struct drm_i915_private *, struct bdb_header *);
+void parse_sdvo_panel_data(struct drm_i915_private *, struct bdb_header *);
int intel_bios_ssc_frequency(struct drm_device *, bool);
-void parse_general_features(struct inteldrm_softc *, struct bdb_header *);
-void parse_general_definitions(struct inteldrm_softc *,
+void parse_general_features(struct drm_i915_private *, struct bdb_header *);
+void parse_general_definitions(struct drm_i915_private *,
struct bdb_header *);
-void parse_sdvo_device_mapping(struct inteldrm_softc *,
+void parse_sdvo_device_mapping(struct drm_i915_private *,
struct bdb_header *);
-void parse_driver_features(struct inteldrm_softc *, struct bdb_header *);
-void parse_edp(struct inteldrm_softc *, struct bdb_header *);
-void parse_device_mapping(struct inteldrm_softc *, struct bdb_header *);
-void init_vbt_defaults(struct inteldrm_softc *);
+void parse_driver_features(struct drm_i915_private *, struct bdb_header *);
+void parse_edp(struct drm_i915_private *, struct bdb_header *);
+void parse_device_mapping(struct drm_i915_private *, struct bdb_header *);
+void init_vbt_defaults(struct drm_i915_private *);
int intel_no_opregion_vbt_callback(const struct dmi_system_id *);
const struct lvds_fp_timing *
get_lvds_fp_timing(const struct bdb_header *,
@@ -227,7 +227,7 @@ get_lvds_fp_timing(const struct bdb_header *bdb,
/* Try to find integrated panel data */
void
-parse_lfp_panel_data(struct inteldrm_softc *dev_priv,
+parse_lfp_panel_data(struct drm_i915_private *dev_priv,
struct bdb_header *bdb)
{
const struct bdb_lvds_options *lvds_options;
@@ -314,7 +314,7 @@ parse_lfp_panel_data(struct inteldrm_softc *dev_priv,
/* Try to find sdvo panel data */
void
-parse_sdvo_panel_data(struct inteldrm_softc *dev_priv,
+parse_sdvo_panel_data(struct drm_i915_private *dev_priv,
struct bdb_header *bdb)
{
struct lvds_dvo_timing *dvo_timing;
@@ -370,7 +370,7 @@ intel_bios_ssc_frequency(struct drm_device *dev,
}
void
-parse_general_features(struct inteldrm_softc *dev_priv,
+parse_general_features(struct drm_i915_private *dev_priv,
struct bdb_header *bdb)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -396,7 +396,7 @@ parse_general_features(struct inteldrm_softc *dev_priv,
}
void
-parse_general_definitions(struct inteldrm_softc *dev_priv,
+parse_general_definitions(struct drm_i915_private *dev_priv,
struct bdb_header *bdb)
{
struct bdb_general_definitions *general;
@@ -417,7 +417,7 @@ parse_general_definitions(struct inteldrm_softc *dev_priv,
}
void
-parse_sdvo_device_mapping(struct inteldrm_softc *dev_priv,
+parse_sdvo_device_mapping(struct drm_i915_private *dev_priv,
struct bdb_header *bdb)
{
struct sdvo_device_mapping *p_mapping;
@@ -507,7 +507,7 @@ parse_sdvo_device_mapping(struct inteldrm_softc *dev_priv,
}
void
-parse_driver_features(struct inteldrm_softc *dev_priv,
+parse_driver_features(struct drm_i915_private *dev_priv,
struct bdb_header *bdb)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -526,7 +526,7 @@ parse_driver_features(struct inteldrm_softc *dev_priv,
}
void
-parse_edp(struct inteldrm_softc *dev_priv, struct bdb_header *bdb)
+parse_edp(struct drm_i915_private *dev_priv, struct bdb_header *bdb)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
struct bdb_edp *edp;
@@ -603,7 +603,7 @@ parse_edp(struct inteldrm_softc *dev_priv, struct bdb_header *bdb)
}
void
-parse_device_mapping(struct inteldrm_softc *dev_priv,
+parse_device_mapping(struct drm_i915_private *dev_priv,
struct bdb_header *bdb)
{
struct bdb_general_definitions *p_defs;
@@ -669,7 +669,7 @@ parse_device_mapping(struct inteldrm_softc *dev_priv,
}
void
-init_vbt_defaults(struct inteldrm_softc *dev_priv)
+init_vbt_defaults(struct drm_i915_private *dev_priv)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -778,7 +778,7 @@ dmi_check_system(const struct dmi_system_id *sysid)
int
intel_parse_bios(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct bdb_header *bdb = NULL;
u8 *bios = NULL;
@@ -840,7 +840,7 @@ intel_parse_bios(struct drm_device *dev)
void
intel_setup_bios(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
/* Set the Panel Power On/Off timings if uninitialized. */
if (!HAS_PCH_SPLIT(dev) &&
diff --git a/sys/dev/pci/drm/i915/intel_crt.c b/sys/dev/pci/drm/i915/intel_crt.c
index ec7f4734e9d..6088af5ff3d 100644
--- a/sys/dev/pci/drm/i915/intel_crt.c
+++ b/sys/dev/pci/drm/i915/intel_crt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_crt.c,v 1.3 2013/04/14 05:38:36 jsg Exp $ */
+/* $OpenBSD: intel_crt.c,v 1.4 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2006-2007 Intel Corporation
*
@@ -99,7 +99,7 @@ intel_crt_get_hw_state(struct intel_encoder *encoder,
enum pipe *pipe)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crt *crt = intel_encoder_to_crt(encoder);
u32 tmp;
@@ -122,7 +122,7 @@ void
intel_crt_set_dpms(struct intel_encoder *encoder, int mode)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crt *crt = intel_encoder_to_crt(encoder);
u32 temp;
@@ -254,7 +254,7 @@ intel_crt_mode_set(struct drm_encoder *encoder,
struct intel_crt *crt =
intel_encoder_to_crt(to_intel_encoder(encoder));
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 adpa;
if (HAS_PCH_SPLIT(dev))
@@ -288,7 +288,7 @@ intel_ironlake_crt_detect_hotplug(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
struct intel_crt *crt = intel_attached_crt(connector);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 adpa;
bool ret;
int retries;
@@ -339,7 +339,7 @@ bool
valleyview_crt_detect_hotplug(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 adpa;
bool ret;
u32 save_adpa;
@@ -391,7 +391,7 @@ bool
intel_crt_detect_hotplug(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 hotplug_en, orig, stat;
bool ret = false;
int i, tries = 0, retries;
@@ -481,7 +481,7 @@ bool
intel_crt_detect_ddc(struct drm_connector *connector)
{
struct intel_crt *crt = intel_attached_crt(connector);
- struct inteldrm_softc *dev_priv = crt->base.base.dev->dev_private;
+ struct drm_i915_private *dev_priv = crt->base.base.dev->dev_private;
struct i2c_controller *i2c;
struct edid *edid;
@@ -516,7 +516,7 @@ enum drm_connector_status
intel_crt_load_detect(struct intel_crt *crt)
{
struct drm_device *dev = crt->base.base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t pipe = to_intel_crtc(crt->base.base.crtc)->pipe;
uint32_t save_bclrpat;
uint32_t save_vtotal;
@@ -692,7 +692,7 @@ int
intel_crt_get_modes(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int ret;
struct i2c_controller *i2c;
@@ -718,7 +718,7 @@ void
intel_crt_reset(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crt *crt = intel_attached_crt(connector);
if (HAS_PCH_SPLIT(dev)) {
@@ -790,7 +790,7 @@ intel_crt_init(struct drm_device *dev)
struct drm_connector *connector;
struct intel_crt *crt;
struct intel_connector *intel_connector;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
/* Skip machines without VGA that falsely report hotplug events */
if (dmi_check_system(intel_no_crt))
diff --git a/sys/dev/pci/drm/i915/intel_ddi.c b/sys/dev/pci/drm/i915/intel_ddi.c
index f8053cd8a80..8682b1d9415 100644
--- a/sys/dev/pci/drm/i915/intel_ddi.c
+++ b/sys/dev/pci/drm/i915/intel_ddi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_ddi.c,v 1.2 2013/05/08 04:00:51 jsg Exp $ */
+/* $OpenBSD: intel_ddi.c,v 1.3 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2012 Intel Corporation
*
@@ -62,13 +62,13 @@ static const u32 hsw_ddi_translations_fdi[] = {
enum port
intel_ddi_get_encoder_port(struct intel_encoder *);
void intel_prepare_ddi_buffers(struct drm_device *, enum port, bool);
-void intel_wait_ddi_buf_idle(struct inteldrm_softc *, enum port);
+void intel_wait_ddi_buf_idle(struct drm_i915_private *, enum port);
void intel_ddi_mode_set(struct drm_encoder *, struct drm_display_mode *,
struct drm_display_mode *);
struct intel_encoder *
intel_ddi_get_crtc_encoder(struct drm_crtc *);
void intel_ddi_calculate_wrpll(int, int *, int *, int *);
-uint32_t intel_ddi_get_crtc_pll(struct inteldrm_softc *, enum pipe);
+uint32_t intel_ddi_get_crtc_pll(struct drm_i915_private *, enum pipe);
void intel_ddi_pre_enable(struct intel_encoder *);
void intel_ddi_post_disable(struct intel_encoder *);
void intel_enable_ddi(struct intel_encoder *);
@@ -107,7 +107,7 @@ intel_ddi_get_encoder_port(struct intel_encoder *intel_encoder)
void
intel_prepare_ddi_buffers(struct drm_device *dev, enum port port, bool use_fdi_mode)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 reg;
int i;
const u32 *ddi_translations = ((use_fdi_mode) ?
@@ -161,7 +161,7 @@ static const long hsw_ddi_buf_ctl_values[] = {
};
void
-intel_wait_ddi_buf_idle(struct inteldrm_softc *dev_priv,
+intel_wait_ddi_buf_idle(struct drm_i915_private *dev_priv,
enum port port)
{
uint32_t reg = DDI_BUF_CTL(port);
@@ -188,7 +188,7 @@ void
hsw_fdi_link_train(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
u32 temp, i, rx_ctl_val;
@@ -782,7 +782,7 @@ intel_ddi_get_crtc_encoder(struct drm_crtc *crtc)
void
intel_ddi_put_crtc_pll(struct drm_crtc *crtc)
{
- struct inteldrm_softc *dev_priv = crtc->dev->dev_private;
+ struct drm_i915_private *dev_priv = crtc->dev->dev_private;
struct intel_ddi_plls *plls = &dev_priv->ddi_plls;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
uint32_t val;
@@ -857,7 +857,7 @@ intel_ddi_pll_mode_set(struct drm_crtc *crtc, int clock)
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *intel_encoder = intel_ddi_get_crtc_encoder(crtc);
struct drm_encoder *encoder = &intel_encoder->base;
- struct inteldrm_softc *dev_priv = crtc->dev->dev_private;
+ struct drm_i915_private *dev_priv = crtc->dev->dev_private;
struct intel_ddi_plls *plls = &dev_priv->ddi_plls;
int type = intel_encoder->type;
#ifdef DRMDEBUG
@@ -948,7 +948,7 @@ intel_ddi_pll_mode_set(struct drm_crtc *crtc, int clock)
void
intel_ddi_set_pipe_settings(struct drm_crtc *crtc)
{
- struct inteldrm_softc *dev_priv = crtc->dev->dev_private;
+ struct drm_i915_private *dev_priv = crtc->dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *intel_encoder = intel_ddi_get_crtc_encoder(crtc);
enum transcoder cpu_transcoder = intel_crtc->cpu_transcoder;
@@ -986,7 +986,7 @@ intel_ddi_enable_pipe_func(struct drm_crtc *crtc)
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *intel_encoder = intel_ddi_get_crtc_encoder(crtc);
struct drm_encoder *encoder = &intel_encoder->base;
- struct inteldrm_softc *dev_priv = crtc->dev->dev_private;
+ struct drm_i915_private *dev_priv = crtc->dev->dev_private;
enum pipe pipe = intel_crtc->pipe;
enum transcoder cpu_transcoder = intel_crtc->cpu_transcoder;
enum port port = intel_ddi_get_encoder_port(intel_encoder);
@@ -1080,7 +1080,7 @@ intel_ddi_enable_pipe_func(struct drm_crtc *crtc)
}
void
-intel_ddi_disable_transcoder_func(struct inteldrm_softc *dev_priv,
+intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
enum transcoder cpu_transcoder)
{
uint32_t reg = TRANS_DDI_FUNC_CTL(cpu_transcoder);
@@ -1095,7 +1095,7 @@ bool
intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector)
{
struct drm_device *dev = intel_connector->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_encoder *intel_encoder = intel_connector->encoder;
int type = intel_connector->base.connector_type;
enum port port = intel_ddi_get_encoder_port(intel_encoder);
@@ -1137,7 +1137,7 @@ intel_ddi_get_hw_state(struct intel_encoder *encoder,
enum pipe *pipe)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
enum port port = intel_ddi_get_encoder_port(encoder);
u32 tmp;
int i;
@@ -1182,7 +1182,7 @@ intel_ddi_get_hw_state(struct intel_encoder *encoder,
}
uint32_t
-intel_ddi_get_crtc_pll(struct inteldrm_softc *dev_priv,
+intel_ddi_get_crtc_pll(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
uint32_t temp, ret;
@@ -1213,7 +1213,7 @@ intel_ddi_get_crtc_pll(struct inteldrm_softc *dev_priv,
void
intel_ddi_setup_hw_pll_state(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
enum pipe pipe;
struct intel_crtc *intel_crtc;
@@ -1245,7 +1245,7 @@ void
intel_ddi_enable_pipe_clock(struct intel_crtc *intel_crtc)
{
struct drm_crtc *crtc = &intel_crtc->base;
- struct inteldrm_softc *dev_priv = crtc->dev->dev_private;
+ struct drm_i915_private *dev_priv = crtc->dev->dev_private;
struct intel_encoder *intel_encoder = intel_ddi_get_crtc_encoder(crtc);
enum port port = intel_ddi_get_encoder_port(intel_encoder);
enum transcoder cpu_transcoder = intel_crtc->cpu_transcoder;
@@ -1258,7 +1258,7 @@ intel_ddi_enable_pipe_clock(struct intel_crtc *intel_crtc)
void
intel_ddi_disable_pipe_clock(struct intel_crtc *intel_crtc)
{
- struct inteldrm_softc *dev_priv = intel_crtc->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = intel_crtc->base.dev->dev_private;
enum transcoder cpu_transcoder = intel_crtc->cpu_transcoder;
if (cpu_transcoder != TRANSCODER_EDP)
@@ -1271,7 +1271,7 @@ intel_ddi_pre_enable(struct intel_encoder *intel_encoder)
{
struct drm_encoder *encoder = &intel_encoder->base;
struct drm_crtc *crtc = encoder->crtc;
- struct inteldrm_softc *dev_priv = encoder->dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
enum port port = intel_ddi_get_encoder_port(intel_encoder);
int type = intel_encoder->type;
@@ -1299,7 +1299,7 @@ void
intel_ddi_post_disable(struct intel_encoder *intel_encoder)
{
struct drm_encoder *encoder = &intel_encoder->base;
- struct inteldrm_softc *dev_priv = encoder->dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->dev->dev_private;
enum port port = intel_ddi_get_encoder_port(intel_encoder);
int type = intel_encoder->type;
uint32_t val;
@@ -1334,7 +1334,7 @@ intel_enable_ddi(struct intel_encoder *intel_encoder)
{
struct drm_encoder *encoder = &intel_encoder->base;
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
enum port port = intel_ddi_get_encoder_port(intel_encoder);
int type = intel_encoder->type;
@@ -1369,7 +1369,7 @@ intel_disable_ddi(struct intel_encoder *intel_encoder)
}
int
-intel_ddi_get_cdclk_freq(struct inteldrm_softc *dev_priv)
+intel_ddi_get_cdclk_freq(struct drm_i915_private *dev_priv)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1387,7 +1387,7 @@ intel_ddi_get_cdclk_freq(struct inteldrm_softc *dev_priv)
void
intel_ddi_pll_init(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t val = I915_READ(LCPLL_CTL);
/* The LCPLL register should be turned on by the BIOS. For now let's
@@ -1410,7 +1410,7 @@ intel_ddi_prepare_link_retrain(struct drm_encoder *encoder)
{
struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
struct intel_dp *intel_dp = &intel_dig_port->dp;
- struct inteldrm_softc *dev_priv = encoder->dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->dev->dev_private;
enum port port = intel_dig_port->port;
uint32_t val;
bool wait = false;
@@ -1450,7 +1450,7 @@ intel_ddi_prepare_link_retrain(struct drm_encoder *encoder)
void
intel_ddi_fdi_disable(struct drm_crtc *crtc)
{
- struct inteldrm_softc *dev_priv = crtc->dev->dev_private;
+ struct drm_i915_private *dev_priv = crtc->dev->dev_private;
struct intel_encoder *intel_encoder = intel_ddi_get_crtc_encoder(crtc);
uint32_t val;
@@ -1520,7 +1520,7 @@ static const struct drm_encoder_helper_funcs intel_ddi_helper_funcs = {
void
intel_ddi_init(struct drm_device *dev, enum port port)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_digital_port *intel_dig_port;
struct intel_encoder *intel_encoder;
struct drm_encoder *encoder;
diff --git a/sys/dev/pci/drm/i915/intel_display.c b/sys/dev/pci/drm/i915/intel_display.c
index bb77636d64b..6d9aa322117 100644
--- a/sys/dev/pci/drm/i915/intel_display.c
+++ b/sys/dev/pci/drm/i915/intel_display.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_display.c,v 1.7 2013/07/04 09:57:23 jsg Exp $ */
+/* $OpenBSD: intel_display.c,v 1.8 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2006-2007 Intel Corporation
*
@@ -86,39 +86,39 @@ void pineview_clock(int, intel_clock_t *);
void intel_clock(struct drm_device *, int, intel_clock_t *clock);
bool intel_PLL_is_valid(struct drm_device *, const intel_limit_t *,
const intel_clock_t *);
-void assert_pll(struct inteldrm_softc *, enum pipe, bool);
-void assert_pch_pll(struct inteldrm_softc *, struct intel_pch_pll *,
+void assert_pll(struct drm_i915_private *, enum pipe, bool);
+void assert_pch_pll(struct drm_i915_private *, struct intel_pch_pll *,
struct intel_crtc *, bool);
-void assert_fdi_tx(struct inteldrm_softc *, enum pipe, bool);
-void assert_fdi_rx(struct inteldrm_softc *, enum pipe, bool);
-void assert_fdi_tx_pll_enabled(struct inteldrm_softc *, enum pipe);
-void assert_fdi_rx_pll_enabled(struct inteldrm_softc *, enum pipe);
-void assert_panel_unlocked(struct inteldrm_softc *, enum pipe);
-void assert_plane(struct inteldrm_softc *, enum plane, bool);
-void assert_planes_disabled(struct inteldrm_softc *, enum pipe);
-void assert_pch_refclk_enabled(struct inteldrm_softc *);
-void assert_transcoder_disabled(struct inteldrm_softc *, enum pipe);
-bool hdmi_pipe_enabled(struct inteldrm_softc *, enum pipe, u32);
-bool lvds_pipe_enabled(struct inteldrm_softc *, enum pipe, u32);
-bool adpa_pipe_enabled(struct inteldrm_softc *, enum pipe, u32);
-bool dp_pipe_enabled(struct inteldrm_softc *, enum pipe, u32, u32);
-void assert_pch_dp_disabled(struct inteldrm_softc *, enum pipe, int, u32);
-void assert_pch_hdmi_disabled(struct inteldrm_softc *, enum pipe, int);
-void assert_pch_ports_disabled(struct inteldrm_softc *, enum pipe);
-void intel_enable_pll(struct inteldrm_softc *, enum pipe);
-void intel_disable_pll(struct inteldrm_softc *, enum pipe);
-void intel_enable_pch_pll(struct inteldrm_softc *, enum pipe);
+void assert_fdi_tx(struct drm_i915_private *, enum pipe, bool);
+void assert_fdi_rx(struct drm_i915_private *, enum pipe, bool);
+void assert_fdi_tx_pll_enabled(struct drm_i915_private *, enum pipe);
+void assert_fdi_rx_pll_enabled(struct drm_i915_private *, enum pipe);
+void assert_panel_unlocked(struct drm_i915_private *, enum pipe);
+void assert_plane(struct drm_i915_private *, enum plane, bool);
+void assert_planes_disabled(struct drm_i915_private *, enum pipe);
+void assert_pch_refclk_enabled(struct drm_i915_private *);
+void assert_transcoder_disabled(struct drm_i915_private *, enum pipe);
+bool hdmi_pipe_enabled(struct drm_i915_private *, enum pipe, u32);
+bool lvds_pipe_enabled(struct drm_i915_private *, enum pipe, u32);
+bool adpa_pipe_enabled(struct drm_i915_private *, enum pipe, u32);
+bool dp_pipe_enabled(struct drm_i915_private *, enum pipe, u32, u32);
+void assert_pch_dp_disabled(struct drm_i915_private *, enum pipe, int, u32);
+void assert_pch_hdmi_disabled(struct drm_i915_private *, enum pipe, int);
+void assert_pch_ports_disabled(struct drm_i915_private *, enum pipe);
+void intel_enable_pll(struct drm_i915_private *, enum pipe);
+void intel_disable_pll(struct drm_i915_private *, enum pipe);
+void intel_enable_pch_pll(struct drm_i915_private *, enum pipe);
void intel_disable_pch_pll(struct intel_crtc *);
-void intel_enable_transcoder(struct inteldrm_softc *, enum pipe);
-void intel_disable_transcoder(struct inteldrm_softc *, enum pipe);
-void intel_enable_pipe(struct inteldrm_softc *, enum pipe, bool);
-void intel_disable_pipe(struct inteldrm_softc *, enum pipe);
-void intel_flush_display_plane(struct inteldrm_softc *, enum plane);
-void intel_enable_plane(struct inteldrm_softc *, enum plane, enum pipe);
-void intel_disable_plane(struct inteldrm_softc *, enum plane, enum pipe);
-void disable_pch_dp(struct inteldrm_softc *, enum pipe, int, u32);
-void disable_pch_hdmi(struct inteldrm_softc *, enum pipe, int);
-void intel_disable_pch_ports(struct inteldrm_softc *, enum pipe);
+void intel_enable_transcoder(struct drm_i915_private *, enum pipe);
+void intel_disable_transcoder(struct drm_i915_private *, enum pipe);
+void intel_enable_pipe(struct drm_i915_private *, enum pipe, bool);
+void intel_disable_pipe(struct drm_i915_private *, enum pipe);
+void intel_flush_display_plane(struct drm_i915_private *, enum plane);
+void intel_enable_plane(struct drm_i915_private *, enum plane, enum pipe);
+void intel_disable_plane(struct drm_i915_private *, enum plane, enum pipe);
+void disable_pch_dp(struct drm_i915_private *, enum pipe, int, u32);
+void disable_pch_hdmi(struct drm_i915_private *, enum pipe, int);
+void intel_disable_pch_ports(struct drm_i915_private *, enum pipe);
void i8xx_disable_fbc(struct drm_device *);
void i8xx_enable_fbc(struct drm_crtc *, unsigned long);
bool i8xx_fbc_enabled(struct drm_device *);
@@ -130,7 +130,7 @@ void ironlake_enable_fbc(struct drm_crtc *, unsigned long);
void ironlake_disable_fbc(struct drm_device *);
bool ironlake_fbc_enabled(struct drm_device *);
void intel_fbc_work_fn(void *, int);
-void intel_cancel_fbc_work(struct inteldrm_softc *);
+void intel_cancel_fbc_work(struct drm_i915_private *);
void intel_enable_fbc(struct drm_crtc *, unsigned long);
void intel_update_fbc(struct drm_device *);
int i9xx_update_plane(struct drm_crtc *, struct drm_framebuffer *, int,
@@ -304,21 +304,21 @@ int intel_gen6_queue_flip(struct drm_device *, struct drm_crtc *,
int intel_gen7_queue_flip(struct drm_device *, struct drm_crtc *,
struct drm_framebuffer *, struct drm_i915_gem_object *);
void intel_unpin_work_fn(void *, void *);
-void intel_dpio_write(struct inteldrm_softc *, int, u32);
+void intel_dpio_write(struct drm_i915_private *, int, u32);
void vlv_init_dpio(struct drm_device *);
int intel_dual_link_lvds_callback(const struct dmi_system_id *);
-bool is_dual_link_lvds(struct inteldrm_softc *, unsigned int);
+bool is_dual_link_lvds(struct drm_i915_private *, unsigned int);
void ironlake_wait_for_vblank(struct drm_device *, int);
const char *state_string(bool);
-void intel_sbi_write(struct inteldrm_softc *, u16, u32,
+void intel_sbi_write(struct drm_i915_private *, u16, u32,
enum intel_sbi_destination);
-u32 intel_sbi_read(struct inteldrm_softc *, u16,
+u32 intel_sbi_read(struct drm_i915_private *, u16,
enum intel_sbi_destination);
void ironlake_enable_pch_pll(struct intel_crtc *);
-void ironlake_enable_pch_transcoder(struct inteldrm_softc *, enum pipe);
-void lpt_enable_pch_transcoder(struct inteldrm_softc *, enum transcoder);
-void ironlake_disable_pch_transcoder(struct inteldrm_softc *, enum pipe);
-void lpt_disable_pch_transcoder(struct inteldrm_softc *);
+void ironlake_enable_pch_transcoder(struct drm_i915_private *, enum pipe);
+void lpt_enable_pch_transcoder(struct drm_i915_private *, enum transcoder);
+void ironlake_disable_pch_transcoder(struct drm_i915_private *, enum pipe);
+void lpt_disable_pch_transcoder(struct drm_i915_private *);
void intel_crtc_update_sarea_pos(struct drm_crtc *, int, int);
void ivb_modeset_global_resources(struct drm_device *);
void ironlake_fdi_pll_disable(struct intel_crtc *);
@@ -399,7 +399,7 @@ void intel_sanitize_encoder(struct intel_encoder *);
int
intel_pch_rawclk(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
WARN_ON(!HAS_PCH_SPLIT(dev));
@@ -433,7 +433,7 @@ static inline u32 /* units of 100MHz */
intel_fdi_link_freq(struct drm_device *dev)
{
if (IS_GEN5(dev)) {
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
return (I915_READ(FDI_PLL_BIOS_0) & FDI_PLL_FB_CLOCK_MASK) + 2;
} else
return 27;
@@ -733,7 +733,7 @@ static const intel_limit_t intel_limits_vlv_dp = {
};
u32
-intel_dpio_read(struct inteldrm_softc *dev_priv, int reg)
+intel_dpio_read(struct drm_i915_private *dev_priv, int reg)
{
u32 val = 0;
int retries;
@@ -769,7 +769,7 @@ out_unlock:
}
void
-intel_dpio_write(struct inteldrm_softc *dev_priv, int reg,
+intel_dpio_write(struct drm_i915_private *dev_priv, int reg,
u32 val)
{
int retries;
@@ -804,7 +804,7 @@ out_unlock:
void
vlv_init_dpio(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
/* Reset the DPIO config */
I915_WRITE(DPIO_CTL, 0);
@@ -833,7 +833,7 @@ static const struct dmi_system_id intel_dual_link_lvds[] = {
};
bool
-is_dual_link_lvds(struct inteldrm_softc *dev_priv,
+is_dual_link_lvds(struct drm_i915_private *dev_priv,
unsigned int reg)
{
unsigned int val;
@@ -866,7 +866,7 @@ intel_ironlake_limit(struct drm_crtc *crtc,
int refclk)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
const intel_limit_t *limit;
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
@@ -895,7 +895,7 @@ const intel_limit_t *
intel_g4x_limit(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
const intel_limit_t *limit;
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
@@ -1036,7 +1036,7 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
intel_clock_t clock;
int err = target;
@@ -1101,7 +1101,7 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
intel_clock_t *best_clock)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
intel_clock_t clock;
int max_n;
bool found;
@@ -1287,7 +1287,7 @@ intel_vlv_find_best_pll(const intel_limit_t *limit, struct drm_crtc *crtc,
}
enum transcoder
-intel_pipe_to_cpu_transcoder(struct inteldrm_softc *dev_priv,
+intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe];
@@ -1299,7 +1299,7 @@ intel_pipe_to_cpu_transcoder(struct inteldrm_softc *dev_priv,
void
ironlake_wait_for_vblank(struct drm_device *dev, int pipe)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 frame, frame_reg = PIPEFRAME(pipe);
int retries;
@@ -1325,7 +1325,7 @@ ironlake_wait_for_vblank(struct drm_device *dev, int pipe)
void
intel_wait_for_vblank(struct drm_device *dev, int pipe)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int pipestat_reg = PIPESTAT(pipe);
int retries;
@@ -1380,7 +1380,7 @@ intel_wait_for_vblank(struct drm_device *dev, int pipe)
void
intel_wait_for_pipe_off(struct drm_device *dev, int pipe)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
enum transcoder cpu_transcoder = intel_pipe_to_cpu_transcoder(dev_priv,
pipe);
int retries;
@@ -1425,7 +1425,7 @@ state_string(bool enabled)
/* Only for pre-ILK configs */
void
-assert_pll(struct inteldrm_softc *dev_priv,
+assert_pll(struct drm_i915_private *dev_priv,
enum pipe pipe, bool state)
{
int reg;
@@ -1444,7 +1444,7 @@ assert_pll(struct inteldrm_softc *dev_priv,
/* For ILK+ */
void
-assert_pch_pll(struct inteldrm_softc *dev_priv,
+assert_pch_pll(struct drm_i915_private *dev_priv,
struct intel_pch_pll *pll,
struct intel_crtc *crtc,
bool state)
@@ -1491,7 +1491,7 @@ assert_pch_pll(struct inteldrm_softc *dev_priv,
#define assert_pch_pll_disabled(d, p, c) assert_pch_pll(d, p, c, false)
void
-assert_fdi_tx(struct inteldrm_softc *dev_priv,
+assert_fdi_tx(struct drm_i915_private *dev_priv,
enum pipe pipe, bool state)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1519,7 +1519,7 @@ assert_fdi_tx(struct inteldrm_softc *dev_priv,
#define assert_fdi_tx_disabled(d, p) assert_fdi_tx(d, p, false)
void
-assert_fdi_rx(struct inteldrm_softc *dev_priv,
+assert_fdi_rx(struct drm_i915_private *dev_priv,
enum pipe pipe, bool state)
{
int reg;
@@ -1537,7 +1537,7 @@ assert_fdi_rx(struct inteldrm_softc *dev_priv,
#define assert_fdi_rx_disabled(d, p) assert_fdi_rx(d, p, false)
void
-assert_fdi_tx_pll_enabled(struct inteldrm_softc *dev_priv,
+assert_fdi_tx_pll_enabled(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1558,7 +1558,7 @@ assert_fdi_tx_pll_enabled(struct inteldrm_softc *dev_priv,
}
void
-assert_fdi_rx_pll_enabled(struct inteldrm_softc *dev_priv,
+assert_fdi_rx_pll_enabled(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
int reg;
@@ -1570,7 +1570,7 @@ assert_fdi_rx_pll_enabled(struct inteldrm_softc *dev_priv,
}
void
-assert_panel_unlocked(struct inteldrm_softc *dev_priv,
+assert_panel_unlocked(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1601,7 +1601,7 @@ assert_panel_unlocked(struct inteldrm_softc *dev_priv,
}
void
-assert_pipe(struct inteldrm_softc *dev_priv,
+assert_pipe(struct drm_i915_private *dev_priv,
enum pipe pipe, bool state)
{
int reg;
@@ -1623,7 +1623,7 @@ assert_pipe(struct inteldrm_softc *dev_priv,
}
void
-assert_plane(struct inteldrm_softc *dev_priv,
+assert_plane(struct drm_i915_private *dev_priv,
enum plane plane, bool state)
{
int reg;
@@ -1642,7 +1642,7 @@ assert_plane(struct inteldrm_softc *dev_priv,
#define assert_plane_disabled(d, p) assert_plane(d, p, false)
void
-assert_planes_disabled(struct inteldrm_softc *dev_priv,
+assert_planes_disabled(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1673,7 +1673,7 @@ assert_planes_disabled(struct inteldrm_softc *dev_priv,
}
void
-assert_pch_refclk_enabled(struct inteldrm_softc *dev_priv)
+assert_pch_refclk_enabled(struct drm_i915_private *dev_priv)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
u32 val;
@@ -1691,7 +1691,7 @@ assert_pch_refclk_enabled(struct inteldrm_softc *dev_priv)
}
void
-assert_transcoder_disabled(struct inteldrm_softc *dev_priv,
+assert_transcoder_disabled(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
int reg;
@@ -1707,7 +1707,7 @@ assert_transcoder_disabled(struct inteldrm_softc *dev_priv,
}
bool
-dp_pipe_enabled(struct inteldrm_softc *dev_priv,
+dp_pipe_enabled(struct drm_i915_private *dev_priv,
enum pipe pipe, u32 port_sel, u32 val)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1728,7 +1728,7 @@ dp_pipe_enabled(struct inteldrm_softc *dev_priv,
}
bool
-hdmi_pipe_enabled(struct inteldrm_softc *dev_priv,
+hdmi_pipe_enabled(struct drm_i915_private *dev_priv,
enum pipe pipe, u32 val)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1747,7 +1747,7 @@ hdmi_pipe_enabled(struct inteldrm_softc *dev_priv,
}
bool
-lvds_pipe_enabled(struct inteldrm_softc *dev_priv,
+lvds_pipe_enabled(struct drm_i915_private *dev_priv,
enum pipe pipe, u32 val)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1766,7 +1766,7 @@ lvds_pipe_enabled(struct inteldrm_softc *dev_priv,
}
bool
-adpa_pipe_enabled(struct inteldrm_softc *dev_priv,
+adpa_pipe_enabled(struct drm_i915_private *dev_priv,
enum pipe pipe, u32 val)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1784,7 +1784,7 @@ adpa_pipe_enabled(struct inteldrm_softc *dev_priv,
}
void
-assert_pch_dp_disabled(struct inteldrm_softc *dev_priv,
+assert_pch_dp_disabled(struct drm_i915_private *dev_priv,
enum pipe pipe, int reg, u32 port_sel)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1799,7 +1799,7 @@ assert_pch_dp_disabled(struct inteldrm_softc *dev_priv,
}
void
-assert_pch_hdmi_disabled(struct inteldrm_softc *dev_priv,
+assert_pch_hdmi_disabled(struct drm_i915_private *dev_priv,
enum pipe pipe, int reg)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -1814,7 +1814,7 @@ assert_pch_hdmi_disabled(struct inteldrm_softc *dev_priv,
}
void
-assert_pch_ports_disabled(struct inteldrm_softc *dev_priv,
+assert_pch_ports_disabled(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
int reg;
@@ -1855,7 +1855,7 @@ assert_pch_ports_disabled(struct inteldrm_softc *dev_priv,
* Unfortunately needed by dvo_ns2501 since the dvo depends on it running.
*/
void
-intel_enable_pll(struct inteldrm_softc *dev_priv, enum pipe pipe)
+intel_enable_pll(struct drm_i915_private *dev_priv, enum pipe pipe)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
int reg;
@@ -1894,7 +1894,7 @@ intel_enable_pll(struct inteldrm_softc *dev_priv, enum pipe pipe)
* Note! This is for pre-ILK only.
*/
void
-intel_disable_pll(struct inteldrm_softc *dev_priv, enum pipe pipe)
+intel_disable_pll(struct drm_i915_private *dev_priv, enum pipe pipe)
{
int reg;
u32 val;
@@ -1915,7 +1915,7 @@ intel_disable_pll(struct inteldrm_softc *dev_priv, enum pipe pipe)
/* SBI access */
void
-intel_sbi_write(struct inteldrm_softc *dev_priv, u16 reg, u32 value,
+intel_sbi_write(struct drm_i915_private *dev_priv, u16 reg, u32 value,
enum intel_sbi_destination destination)
{
u32 tmp;
@@ -1956,7 +1956,7 @@ out_unlock:
}
u32
-intel_sbi_read(struct inteldrm_softc *dev_priv, u16 reg,
+intel_sbi_read(struct drm_i915_private *dev_priv, u16 reg,
enum intel_sbi_destination destination)
{
u32 value = 0;
@@ -2009,7 +2009,7 @@ out_unlock:
void
ironlake_enable_pch_pll(struct intel_crtc *intel_crtc)
{
- struct inteldrm_softc *dev_priv = intel_crtc->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = intel_crtc->base.dev->dev_private;
struct intel_pch_pll *pll;
int reg;
u32 val;
@@ -2050,7 +2050,7 @@ ironlake_enable_pch_pll(struct intel_crtc *intel_crtc)
void
intel_disable_pch_pll(struct intel_crtc *intel_crtc)
{
- struct inteldrm_softc *dev_priv = intel_crtc->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = intel_crtc->base.dev->dev_private;
struct intel_pch_pll *pll = intel_crtc->pch_pll;
int reg;
u32 val;
@@ -2093,7 +2093,7 @@ intel_disable_pch_pll(struct intel_crtc *intel_crtc)
}
void
-ironlake_enable_pch_transcoder(struct inteldrm_softc *dev_priv,
+ironlake_enable_pch_transcoder(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -2156,7 +2156,7 @@ ironlake_enable_pch_transcoder(struct inteldrm_softc *dev_priv,
}
void
-lpt_enable_pch_transcoder(struct inteldrm_softc *dev_priv,
+lpt_enable_pch_transcoder(struct drm_i915_private *dev_priv,
enum transcoder cpu_transcoder)
{
u32 val, pipeconf_val;
@@ -2194,7 +2194,7 @@ lpt_enable_pch_transcoder(struct inteldrm_softc *dev_priv,
}
void
-ironlake_disable_pch_transcoder(struct inteldrm_softc *dev_priv,
+ironlake_disable_pch_transcoder(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -2231,7 +2231,7 @@ ironlake_disable_pch_transcoder(struct inteldrm_softc *dev_priv,
}
void
-lpt_disable_pch_transcoder(struct inteldrm_softc *dev_priv)
+lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv)
{
u32 val;
int retries;
@@ -2269,7 +2269,7 @@ lpt_disable_pch_transcoder(struct inteldrm_softc *dev_priv)
* returning.
*/
void
-intel_enable_pipe(struct inteldrm_softc *dev_priv, enum pipe pipe,
+intel_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe,
bool pch_port)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -2322,7 +2322,7 @@ intel_enable_pipe(struct inteldrm_softc *dev_priv, enum pipe pipe,
* Will wait until the pipe has shut down before returning.
*/
void
-intel_disable_pipe(struct inteldrm_softc *dev_priv,
+intel_disable_pipe(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -2355,7 +2355,7 @@ intel_disable_pipe(struct inteldrm_softc *dev_priv,
* trigger in order to latch. The display address reg provides this.
*/
void
-intel_flush_display_plane(struct inteldrm_softc *dev_priv,
+intel_flush_display_plane(struct drm_i915_private *dev_priv,
enum plane plane)
{
if (dev_priv->info->gen >= 4)
@@ -2373,7 +2373,7 @@ intel_flush_display_plane(struct inteldrm_softc *dev_priv,
* Enable @plane on @pipe, making sure that @pipe is running first.
*/
void
-intel_enable_plane(struct inteldrm_softc *dev_priv,
+intel_enable_plane(struct drm_i915_private *dev_priv,
enum plane plane, enum pipe pipe)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -2402,7 +2402,7 @@ intel_enable_plane(struct inteldrm_softc *dev_priv,
* Disable @plane; should be an independent operation.
*/
void
-intel_disable_plane(struct inteldrm_softc *dev_priv,
+intel_disable_plane(struct drm_i915_private *dev_priv,
enum plane plane, enum pipe pipe)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
@@ -2424,7 +2424,7 @@ intel_pin_and_fence_fb_obj(struct drm_device *dev,
struct drm_i915_gem_object *obj,
struct intel_ring_buffer *pipelined)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 alignment;
int ret;
@@ -2520,7 +2520,7 @@ i9xx_update_plane(struct drm_crtc *crtc, struct drm_framebuffer *fb,
int x, int y)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_framebuffer *intel_fb;
struct drm_i915_gem_object *obj;
@@ -2618,7 +2618,7 @@ ironlake_update_plane(struct drm_crtc *crtc,
struct drm_framebuffer *fb, int x, int y)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_framebuffer *intel_fb;
struct drm_i915_gem_object *obj;
@@ -2711,7 +2711,7 @@ intel_pipe_set_base_atomic(struct drm_crtc *crtc, struct drm_framebuffer *fb,
int x, int y, enum mode_set_atomic state)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (dev_priv->display.disable_fbc)
dev_priv->display.disable_fbc(dev);
@@ -2724,7 +2724,7 @@ int
intel_finish_fb(struct drm_framebuffer *old_fb)
{
struct drm_i915_gem_object *obj = to_intel_framebuffer(old_fb)->obj;
- struct inteldrm_softc *dev_priv = obj->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = obj->base.dev->dev_private;
bool was_interruptible = dev_priv->mm.interruptible;
int ret;
@@ -2783,7 +2783,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
struct drm_framebuffer *fb)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct drm_framebuffer *old_fb;
int ret;
@@ -2844,7 +2844,7 @@ void
ironlake_set_pll_edp(struct drm_crtc *crtc, int clock)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 dpa_ctl;
DRM_DEBUG_KMS("eDP PLL enable for clock %d\n", clock);
@@ -2882,7 +2882,7 @@ void
intel_fdi_normal_train(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 reg, temp;
@@ -2923,7 +2923,7 @@ intel_fdi_normal_train(struct drm_crtc *crtc)
void
ivb_modeset_global_resources(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *pipe_B_crtc =
to_intel_crtc(dev_priv->pipe_to_crtc_mapping[PIPE_B]);
struct intel_crtc *pipe_C_crtc =
@@ -2949,7 +2949,7 @@ void
ironlake_fdi_link_train(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
int plane = intel_crtc->plane;
@@ -3052,7 +3052,7 @@ void
gen6_fdi_link_train(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 reg, temp, i, retry;
@@ -3185,7 +3185,7 @@ void
ivb_manual_fdi_link_train(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 reg, temp, i;
@@ -3302,7 +3302,7 @@ void
ironlake_fdi_pll_enable(struct intel_crtc *intel_crtc)
{
struct drm_device *dev = intel_crtc->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int pipe = intel_crtc->pipe;
u32 reg, temp;
@@ -3344,7 +3344,7 @@ void
ironlake_fdi_pll_disable(struct intel_crtc *intel_crtc)
{
struct drm_device *dev = intel_crtc->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int pipe = intel_crtc->pipe;
u32 reg, temp;
@@ -3374,7 +3374,7 @@ void
ironlake_fdi_disable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 reg, temp;
@@ -3428,7 +3428,7 @@ bool
intel_crtc_has_pending_flip(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
bool pending;
if (atomic_read(&dev_priv->mm.wedged))
@@ -3445,7 +3445,7 @@ void
intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (crtc->fb == NULL)
return;
@@ -3491,7 +3491,7 @@ void
lpt_program_iclkip(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 divsel, phaseinc, auxdiv, phasedir = 0;
u32 temp;
@@ -3583,7 +3583,7 @@ void
ironlake_pch_enable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 reg, temp;
@@ -3689,7 +3689,7 @@ void
lpt_pch_enable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
enum transcoder cpu_transcoder = intel_crtc->cpu_transcoder;
@@ -3730,7 +3730,7 @@ intel_put_pch_pll(struct intel_crtc *intel_crtc)
static struct intel_pch_pll *
intel_get_pch_pll(struct intel_crtc *intel_crtc, u32 dpll, u32 fp)
{
- struct inteldrm_softc *dev_priv = intel_crtc->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = intel_crtc->base.dev->dev_private;
struct drm_device *dev = intel_crtc->base.dev;
struct intel_pch_pll *pll;
int i;
@@ -3803,7 +3803,7 @@ prepare: /* separate function? */
void
intel_cpt_verify_modeset(struct drm_device *dev, int pipe)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int dslreg = PIPEDSL(pipe);
u32 temp;
int retries;
@@ -3824,7 +3824,7 @@ void
ironlake_crtc_enable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *encoder;
int pipe = intel_crtc->pipe;
@@ -3918,7 +3918,7 @@ void
haswell_crtc_enable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *encoder;
int pipe = intel_crtc->pipe;
@@ -3996,7 +3996,7 @@ void
ironlake_crtc_disable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *encoder;
int pipe = intel_crtc->pipe;
@@ -4077,7 +4077,7 @@ void
haswell_crtc_disable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *encoder;
int pipe = intel_crtc->pipe;
@@ -4153,7 +4153,7 @@ intel_crtc_dpms_overlay(struct intel_crtc *intel_crtc, bool enable)
{
if (!enable && intel_crtc->overlay) {
struct drm_device *dev = intel_crtc->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
DRM_LOCK();
dev_priv->mm.interruptible = false;
@@ -4171,7 +4171,7 @@ void
i9xx_crtc_enable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *encoder;
int pipe = intel_crtc->pipe;
@@ -4204,7 +4204,7 @@ void
i9xx_crtc_disable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *encoder;
int pipe = intel_crtc->pipe;
@@ -4288,7 +4288,7 @@ void
intel_crtc_update_dpms(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_encoder *intel_encoder;
bool enable = false;
@@ -4313,7 +4313,7 @@ intel_crtc_disable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
struct drm_connector *connector;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
/* crtc should still be enabled when we disable it. */
WARN_ON(!crtc->enabled);
@@ -4516,7 +4516,7 @@ i9xx_misc_get_display_clock_speed(struct drm_device *dev)
int
i915gm_get_display_clock_speed(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u16 gcfgc = 0;
gcfgc = pci_conf_read(dev_priv->pc, dev_priv->tag, GCFGC) >> 16;
@@ -4593,7 +4593,7 @@ ironlake_compute_m_n(int bits_per_pixel, int nlanes, int pixel_clock,
}
static inline bool
-intel_panel_use_ssc(struct inteldrm_softc *dev_priv)
+intel_panel_use_ssc(struct drm_i915_private *dev_priv)
{
if (i915_panel_use_ssc >= 0)
return i915_panel_use_ssc != 0;
@@ -4629,7 +4629,7 @@ intel_choose_pipe_bpp_dither(struct drm_crtc *crtc,
struct drm_display_mode *mode)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_connector *connector;
struct intel_encoder *intel_encoder;
unsigned int display_bpc = UINT_MAX, bpc;
@@ -4742,7 +4742,7 @@ int
vlv_get_refclk(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int refclk = 27000; /* for DP & HDMI */
return 100000; /* only one validated so far */
@@ -4765,7 +4765,7 @@ int
i9xx_get_refclk(struct drm_crtc *crtc, int num_connectors)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int refclk;
if (IS_VALLEYVIEW(dev)) {
@@ -4813,7 +4813,7 @@ i9xx_update_pll_dividers(struct drm_crtc *crtc,
intel_clock_t *reduced_clock)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 fp, fp2 = 0;
@@ -4847,7 +4847,7 @@ intel_update_lvds(struct drm_crtc *crtc, intel_clock_t *clock,
struct drm_display_mode *adjusted_mode)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 temp;
@@ -4896,7 +4896,7 @@ vlv_update_pll(struct drm_crtc *crtc,
int num_connectors)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 dpll, mdiv, pdiv;
@@ -5003,7 +5003,7 @@ i9xx_update_pll(struct drm_crtc *crtc,
int num_connectors)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 dpll;
@@ -5116,7 +5116,7 @@ i8xx_update_pll(struct drm_crtc *crtc,
int num_connectors)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 dpll;
@@ -5178,7 +5178,7 @@ intel_set_pipe_timings(struct intel_crtc *intel_crtc,
struct drm_display_mode *adjusted_mode)
{
struct drm_device *dev = intel_crtc->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
enum pipe pipe = intel_crtc->pipe;
enum transcoder cpu_transcoder = intel_crtc->cpu_transcoder;
uint32_t vsyncshift;
@@ -5239,7 +5239,7 @@ i9xx_crtc_mode_set(struct drm_crtc *crtc,
struct drm_framebuffer *fb)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
int plane = intel_crtc->plane;
@@ -5414,7 +5414,7 @@ i9xx_crtc_mode_set(struct drm_crtc *crtc,
void
ironlake_init_pch_refclk(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_mode_config *mode_config = &dev->mode_config;
struct intel_encoder *encoder;
u32 temp;
@@ -5530,7 +5530,7 @@ ironlake_init_pch_refclk(struct drm_device *dev)
void
lpt_init_pch_refclk(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_mode_config *mode_config = &dev->mode_config;
struct intel_encoder *encoder;
bool has_vga = false;
@@ -5716,7 +5716,7 @@ int
ironlake_get_refclk(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_encoder *encoder;
struct intel_encoder *edp_encoder = NULL;
int num_connectors = 0;
@@ -5748,7 +5748,7 @@ ironlake_set_pipeconf(struct drm_crtc *crtc,
struct drm_display_mode *adjusted_mode,
bool dither)
{
- struct inteldrm_softc *dev_priv = crtc->dev->dev_private;
+ struct drm_i915_private *dev_priv = crtc->dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
uint32_t val;
@@ -5793,7 +5793,7 @@ haswell_set_pipeconf(struct drm_crtc *crtc,
struct drm_display_mode *adjusted_mode,
bool dither)
{
- struct inteldrm_softc *dev_priv = crtc->dev->dev_private;
+ struct drm_i915_private *dev_priv = crtc->dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
enum transcoder cpu_transcoder = intel_crtc->cpu_transcoder;
uint32_t val;
@@ -5822,7 +5822,7 @@ ironlake_compute_clocks(struct drm_crtc *crtc,
intel_clock_t *reduced_clock)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_encoder *intel_encoder;
int refclk;
const intel_limit_t *limit;
@@ -5881,7 +5881,7 @@ ironlake_compute_clocks(struct drm_crtc *crtc,
void
cpt_enable_fdi_bc_bifurcation(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t temp;
temp = I915_READ(SOUTH_CHICKEN1);
@@ -5901,7 +5901,7 @@ bool
ironlake_check_fdi_lanes(struct intel_crtc *intel_crtc)
{
struct drm_device *dev = intel_crtc->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *pipe_B_crtc =
to_intel_crtc(dev_priv->pipe_to_crtc_mapping[PIPE_B]);
@@ -5980,7 +5980,7 @@ ironlake_set_m_n(struct drm_crtc *crtc,
struct drm_display_mode *adjusted_mode)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
enum transcoder cpu_transcoder = intel_crtc->cpu_transcoder;
struct intel_encoder *intel_encoder, *edp_encoder = NULL;
@@ -6052,7 +6052,7 @@ ironlake_compute_dpll(struct intel_crtc *intel_crtc,
{
struct drm_crtc *crtc = &intel_crtc->base;
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_encoder *intel_encoder;
uint32_t dpll;
int factor, pixel_multiplier, num_connectors = 0;
@@ -6157,7 +6157,7 @@ ironlake_crtc_mode_set(struct drm_crtc *crtc,
struct drm_framebuffer *fb)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
int plane = intel_crtc->plane;
@@ -6341,7 +6341,7 @@ haswell_crtc_mode_set(struct drm_crtc *crtc,
struct drm_framebuffer *fb)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
int plane = intel_crtc->plane;
@@ -6553,7 +6553,7 @@ intel_crtc_mode_set(struct drm_crtc *crtc,
struct drm_framebuffer *fb)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_encoder_helper_funcs *encoder_funcs;
struct intel_encoder *encoder;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -6587,7 +6587,7 @@ intel_eld_uptodate(struct drm_connector *connector,
int reg_elda, uint32_t bits_elda,
int reg_edid)
{
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
uint8_t *eld = connector->eld;
uint32_t i;
@@ -6615,7 +6615,7 @@ void
g4x_write_eld(struct drm_connector *connector,
struct drm_crtc *crtc)
{
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
uint8_t *eld = connector->eld;
uint32_t eldv;
uint32_t len;
@@ -6657,7 +6657,7 @@ void
haswell_write_eld(struct drm_connector *connector,
struct drm_crtc *crtc)
{
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
uint8_t *eld = connector->eld;
struct drm_device *dev = crtc->dev;
uint32_t eldv;
@@ -6743,7 +6743,7 @@ void
ironlake_write_eld(struct drm_connector *connector,
struct drm_crtc *crtc)
{
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
uint8_t *eld = connector->eld;
uint32_t eldv;
uint32_t i;
@@ -6822,7 +6822,7 @@ intel_write_eld(struct drm_encoder *encoder,
struct drm_crtc *crtc = encoder->crtc;
struct drm_connector *connector;
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
connector = drm_select_eld(encoder, mode);
if (!connector)
@@ -6845,7 +6845,7 @@ void
intel_crtc_load_lut(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int palreg = PALETTE(intel_crtc->pipe);
int i;
@@ -6870,7 +6870,7 @@ void
i845_update_cursor(struct drm_crtc *crtc, u32 base)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
bool visible = base != 0;
u32 cntl;
@@ -6901,7 +6901,7 @@ void
i9xx_update_cursor(struct drm_crtc *crtc, u32 base)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
bool visible = base != 0;
@@ -6928,7 +6928,7 @@ void
ivb_update_cursor(struct drm_crtc *crtc, u32 base)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
bool visible = base != 0;
@@ -6956,7 +6956,7 @@ intel_crtc_update_cursor(struct drm_crtc *crtc,
bool on)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
int x = intel_crtc->cursor_x;
@@ -7017,7 +7017,7 @@ intel_crtc_cursor_set(struct drm_crtc *crtc,
uint32_t width, uint32_t height)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct drm_i915_gem_object *obj;
uint32_t addr;
@@ -7250,7 +7250,7 @@ struct drm_framebuffer *
mode_fits_in_fbdev(struct drm_device *dev,
struct drm_display_mode *mode)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_gem_object *obj;
struct drm_framebuffer *fb;
@@ -7410,7 +7410,7 @@ intel_release_load_detect_pipe(struct drm_connector *connector,
int
intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 dpll = I915_READ(DPLL(pipe));
@@ -7499,7 +7499,7 @@ struct drm_display_mode *
intel_crtc_mode_get(struct drm_device *dev,
struct drm_crtc *crtc)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
enum transcoder cpu_transcoder = intel_crtc->cpu_transcoder;
struct drm_display_mode *mode;
@@ -7775,7 +7775,7 @@ intel_gen2_queue_flip(struct drm_device *dev,
struct drm_framebuffer *fb,
struct drm_i915_gem_object *obj)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
u32 flip_mask;
struct intel_ring_buffer *ring = &dev_priv->ring[RCS];
@@ -7820,7 +7820,7 @@ intel_gen3_queue_flip(struct drm_device *dev,
struct drm_framebuffer *fb,
struct drm_i915_gem_object *obj)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
u32 flip_mask;
struct intel_ring_buffer *ring = &dev_priv->ring[RCS];
@@ -7862,7 +7862,7 @@ intel_gen4_queue_flip(struct drm_device *dev,
struct drm_framebuffer *fb,
struct drm_i915_gem_object *obj)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
uint32_t pf, pipesrc;
struct intel_ring_buffer *ring = &dev_priv->ring[RCS];
@@ -7911,7 +7911,7 @@ intel_gen6_queue_flip(struct drm_device *dev,
struct drm_framebuffer *fb,
struct drm_i915_gem_object *obj)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_ring_buffer *ring = &dev_priv->ring[RCS];
uint32_t pf, pipesrc;
@@ -7962,7 +7962,7 @@ intel_gen7_queue_flip(struct drm_device *dev,
struct drm_framebuffer *fb,
struct drm_i915_gem_object *obj)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_ring_buffer *ring = &dev_priv->ring[BCS];
uint32_t plane_bit = 0;
@@ -8024,7 +8024,7 @@ intel_crtc_page_flip(struct drm_crtc *crtc,
struct drm_pending_vblank_event *event)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_framebuffer *old_fb = crtc->fb;
struct drm_i915_gem_object *obj = to_intel_framebuffer(fb)->obj;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -9047,7 +9047,7 @@ intel_encoder_clones(struct intel_encoder *encoder)
bool
has_edp_a(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (!IS_MOBILE(dev))
return false;
@@ -9065,7 +9065,7 @@ has_edp_a(struct drm_device *dev)
void
intel_setup_outputs(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_encoder *encoder;
bool dpd_is_edp = false;
bool has_lvds;
@@ -9342,7 +9342,7 @@ static const struct drm_mode_config_funcs intel_mode_funcs = {
void
intel_init_display(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
/* We always want a DPMS function */
if (IS_HASWELL(dev)) {
@@ -9447,7 +9447,7 @@ intel_init_display(struct drm_device *dev)
void
quirk_pipea_force(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
dev_priv->quirks |= QUIRK_PIPEA_FORCE;
DRM_INFO("applying pipe a force quirk\n");
@@ -9459,7 +9459,7 @@ quirk_pipea_force(struct drm_device *dev)
void
quirk_ssc_force_disable(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
dev_priv->quirks |= QUIRK_LVDS_SSC_DISABLE;
DRM_INFO("applying lvds SSC disable quirk\n");
}
@@ -9471,7 +9471,7 @@ quirk_ssc_force_disable(struct drm_device *dev)
void
quirk_invert_brightness(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
dev_priv->quirks |= QUIRK_INVERT_BRIGHTNESS;
DRM_INFO("applying inverted panel brightness quirk\n");
}
@@ -9555,7 +9555,7 @@ intel_init_quirks(struct drm_device *dev)
void
i915_disable_vga(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u8 sr1;
u32 vga_reg;
@@ -9599,7 +9599,7 @@ intel_modeset_init_hw(struct drm_device *dev)
void
intel_modeset_init(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int i, ret;
drm_mode_config_init(dev);
@@ -9692,7 +9692,7 @@ intel_enable_pipe_a(struct drm_device *dev)
bool
intel_check_plane_mapping(struct intel_crtc *crtc)
{
- struct inteldrm_softc *dev_priv = crtc->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;
u32 reg, val;
if (dev_priv->num_pipe == 1)
@@ -9712,7 +9712,7 @@ void
intel_sanitize_crtc(struct intel_crtc *crtc)
{
struct drm_device *dev = crtc->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 reg;
/* Clear any frame start delays used for debugging left by the BIOS */
@@ -9837,7 +9837,7 @@ intel_sanitize_encoder(struct intel_encoder *encoder)
void
i915_redisable_vga(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 vga_reg;
if (HAS_PCH_SPLIT(dev))
@@ -9858,7 +9858,7 @@ void
intel_modeset_setup_hw_state(struct drm_device *dev,
bool force_restore)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
enum pipe pipe;
u32 tmp;
struct intel_crtc *crtc;
@@ -9985,7 +9985,7 @@ intel_modeset_gem_init(struct drm_device *dev)
void
intel_modeset_cleanup(struct drm_device *dev)
{
-// struct inteldrm_softc *dev_priv = dev->dev_private;
+// struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc;
struct intel_crtc *intel_crtc;
@@ -10063,7 +10063,7 @@ intel_modeset_vga_set_state(struct drm_device *dev, bool state)
printf("%s stub\n", __func__);
return EINVAL;
#ifdef notyet
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u16 gmch_ctrl;
pci_read_config_word(dev_priv->bridge_dev, INTEL_GMCH_CTRL, &gmch_ctrl);
diff --git a/sys/dev/pci/drm/i915/intel_dp.c b/sys/dev/pci/drm/i915/intel_dp.c
index 3b3ab3bf108..60e6306aea2 100644
--- a/sys/dev/pci/drm/i915/intel_dp.c
+++ b/sys/dev/pci/drm/i915/intel_dp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_dp.c,v 1.5 2013/07/04 09:55:01 jsg Exp $ */
+/* $OpenBSD: intel_dp.c,v 1.6 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2008 Intel Corporation
*
@@ -82,7 +82,7 @@ void ironlake_wait_panel_status(struct intel_dp *, u32, u32);
void ironlake_wait_panel_on(struct intel_dp *);
void ironlake_wait_panel_off(struct intel_dp *);
void ironlake_wait_panel_power_cycle(struct intel_dp *);
-u32 ironlake_get_pp_control(struct inteldrm_softc *);
+u32 ironlake_get_pp_control(struct drm_i915_private *);
void ironlake_edp_panel_vdd_on(struct intel_dp *);
void ironlake_panel_vdd_off_sync(struct intel_dp *);
void ironlake_edp_panel_vdd_off(struct intel_dp *, bool);
@@ -390,7 +390,7 @@ unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes)
int
intel_hrawclk(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t clkcfg;
/* There is no CLKCFG reg in Valleyview. VLV hrawclk is 200 MHz */
@@ -424,7 +424,7 @@ bool
ironlake_edp_have_panel_power(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
return (I915_READ(PCH_PP_STATUS) & PP_ON) != 0;
}
@@ -433,7 +433,7 @@ bool
ironlake_edp_have_panel_vdd(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
return (I915_READ(PCH_PP_CONTROL) & EDP_FORCE_VDD) != 0;
}
@@ -443,7 +443,7 @@ intel_dp_check_edp(struct intel_dp *intel_dp)
{
#ifdef DRMDEBUG
struct drm_device *dev = intel_dp_to_dev(intel_dp);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
#endif
if (!is_edp(intel_dp))
@@ -464,7 +464,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
uint32_t output_reg = intel_dp->output_reg;
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t ch_ctl = output_reg + 0x10;
uint32_t ch_data = ch_ctl + 4;
int i;
@@ -905,7 +905,7 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode,
struct drm_device *dev = crtc->dev;
struct intel_encoder *intel_encoder;
struct intel_dp *intel_dp;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int lane_count = 4;
struct intel_dp_m_n m_n;
@@ -990,7 +990,7 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
struct drm_crtc *crtc = encoder->crtc;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -1101,7 +1101,7 @@ ironlake_wait_panel_status(struct intel_dp *intel_dp,
u32 value)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int retries;
DRM_DEBUG_KMS("mask %08x value %08x status %08x control %08x\n",
@@ -1147,7 +1147,7 @@ ironlake_wait_panel_power_cycle(struct intel_dp *intel_dp)
*/
u32
-ironlake_get_pp_control(struct inteldrm_softc *dev_priv)
+ironlake_get_pp_control(struct drm_i915_private *dev_priv)
{
u32 control = I915_READ(PCH_PP_CONTROL);
@@ -1160,7 +1160,7 @@ void
ironlake_edp_panel_vdd_on(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 pp;
if (!is_edp(intel_dp))
@@ -1200,7 +1200,7 @@ void
ironlake_panel_vdd_off_sync(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 pp;
if (!intel_dp->want_panel_vdd && ironlake_edp_have_panel_vdd(intel_dp)) {
@@ -1264,7 +1264,7 @@ void
ironlake_edp_panel_on(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 pp;
if (!is_edp(intel_dp))
@@ -1307,7 +1307,7 @@ void
ironlake_edp_panel_off(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 pp;
if (!is_edp(intel_dp))
@@ -1334,7 +1334,7 @@ ironlake_edp_backlight_on(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int pipe = to_intel_crtc(intel_dig_port->base.base.crtc)->pipe;
u32 pp;
@@ -1361,7 +1361,7 @@ void
ironlake_edp_backlight_off(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 pp;
if (!is_edp(intel_dp))
@@ -1383,7 +1383,7 @@ ironlake_edp_pll_on(struct intel_dp *intel_dp)
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 dpa_ctl;
assert_pipe_disabled(dev_priv,
@@ -1410,7 +1410,7 @@ ironlake_edp_pll_off(struct intel_dp *intel_dp)
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 dpa_ctl;
assert_pipe_disabled(dev_priv,
@@ -1467,7 +1467,7 @@ intel_dp_get_hw_state(struct intel_encoder *encoder,
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 tmp = I915_READ(intel_dp->output_reg);
if (!(tmp & DP_PORT_EN))
@@ -1544,7 +1544,7 @@ intel_enable_dp(struct intel_encoder *encoder)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t dp_reg = I915_READ(intel_dp->output_reg);
if (WARN_ON(dp_reg & DP_PORT_EN))
@@ -1847,7 +1847,7 @@ intel_dp_set_link_train(struct intel_dp *intel_dp,
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
enum port port = intel_dig_port->port;
int ret;
uint32_t temp;
@@ -2136,7 +2136,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t DP = intel_dp->DP;
/*
@@ -2396,7 +2396,7 @@ enum drm_connector_status
g4x_dp_detect(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t bit;
switch (intel_dp->output_reg) {
@@ -2565,7 +2565,7 @@ intel_dp_set_property(struct drm_connector *connector,
struct drm_property *property,
uint64_t val)
{
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
struct intel_connector *intel_connector = to_intel_connector(connector);
struct intel_encoder *intel_encoder = intel_attached_encoder(connector);
struct intel_dp *intel_dp = enc_to_intel_dp(&intel_encoder->base);
@@ -2723,7 +2723,7 @@ intel_trans_dp_port_sel(struct drm_crtc *crtc)
bool
intel_dpd_is_edp(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct child_device_config *p_child;
int i;
@@ -2763,7 +2763,7 @@ intel_dp_init_panel_power_sequencer(struct drm_device *dev,
struct intel_dp *intel_dp,
struct edp_power_seq *out)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct edp_power_seq cur, vbt, spec, final;
u32 pp_on, pp_off, pp_div, pp;
@@ -2848,7 +2848,7 @@ intel_dp_init_panel_power_sequencer_registers(struct drm_device *dev,
struct intel_dp *intel_dp,
struct edp_power_seq *seq)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 pp_on, pp_off, pp_div;
/* And finally store the new values in the power sequencer. */
@@ -2890,7 +2890,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
struct intel_dp *intel_dp = &intel_dig_port->dp;
struct intel_encoder *intel_encoder = &intel_dig_port->base;
struct drm_device *dev = intel_encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_display_mode *fixed_mode = NULL;
struct edp_power_seq power_seq = { 0 };
enum port port = intel_dig_port->port;
diff --git a/sys/dev/pci/drm/i915/intel_drv.h b/sys/dev/pci/drm/i915/intel_drv.h
index 5b2b7b4b5fe..a547a831eec 100644
--- a/sys/dev/pci/drm/i915/intel_drv.h
+++ b/sys/dev/pci/drm/i915/intel_drv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_drv.h,v 1.1 2013/03/18 12:36:52 jsg Exp $ */
+/* $OpenBSD: intel_drv.h,v 1.2 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright (c) 2006 Dave Airlie <airlied@linux.ie>
* Copyright (c) 2007-2008 Intel Corporation
@@ -354,14 +354,14 @@ struct intel_digital_port {
static inline struct drm_crtc *
intel_get_crtc_for_pipe(struct drm_device *dev, int pipe)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
return dev_priv->pipe_to_crtc_mapping[pipe];
}
static inline struct drm_crtc *
intel_get_crtc_for_plane(struct drm_device *dev, int plane)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
return dev_priv->plane_to_crtc_mapping[plane];
}
@@ -441,7 +441,7 @@ extern int intel_edp_target_clock(struct intel_encoder *,
struct drm_display_mode *mode);
extern bool intel_encoder_is_pch_edp(struct drm_encoder *encoder);
extern int intel_plane_init(struct drm_device *dev, enum pipe pipe);
-extern void intel_flush_display_plane(drm_i915_private_t *dev_priv,
+extern void intel_flush_display_plane(struct drm_i915_private *dev_priv,
enum plane plane);
/* intel_panel.c */
@@ -525,7 +525,7 @@ extern struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev,
int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern enum transcoder
-intel_pipe_to_cpu_transcoder(drm_i915_private_t *dev_priv,
+intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv,
enum pipe pipe);
extern void intel_wait_for_vblank(struct drm_device *dev, int pipe);
extern void intel_wait_for_pipe_off(struct drm_device *dev, int pipe);
@@ -576,7 +576,7 @@ extern int intel_overlay_attrs(struct drm_device *dev, void *data,
extern void intel_fb_output_poll_changed(struct drm_device *dev);
extern void intel_fb_restore_mode(struct drm_device *dev);
-extern void assert_pipe(drm_i915_private_t *dev_priv, enum pipe pipe,
+extern void assert_pipe(struct drm_i915_private *dev_priv, enum pipe pipe,
bool state);
#define assert_pipe_enabled(d, p) assert_pipe(d, p, true)
#define assert_pipe_disabled(d, p) assert_pipe(d, p, false)
@@ -607,7 +607,7 @@ extern int intel_sprite_set_colorkey(struct drm_device *dev, void *data,
extern int intel_sprite_get_colorkey(struct drm_device *dev, void *data,
struct drm_file *file_priv);
-extern u32 intel_dpio_read(drm_i915_private_t *dev_priv, int reg);
+extern u32 intel_dpio_read(struct drm_i915_private *dev_priv, int reg);
/* Power-related functions, located in intel_pm.c */
extern void intel_init_pm(struct drm_device *dev);
@@ -616,21 +616,21 @@ extern bool intel_fbc_enabled(struct drm_device *dev);
extern void intel_enable_fbc(struct drm_crtc *crtc, unsigned long interval);
extern void intel_update_fbc(struct drm_device *dev);
/* IPS */
-extern void intel_gpu_ips_init(drm_i915_private_t *dev_priv);
+extern void intel_gpu_ips_init(struct drm_i915_private *dev_priv);
extern void intel_gpu_ips_teardown(void);
extern void intel_init_power_wells(struct drm_device *dev);
extern void intel_enable_gt_powersave(struct drm_device *dev);
extern void intel_disable_gt_powersave(struct drm_device *dev);
-extern void gen6_gt_check_fifodbg(drm_i915_private_t *dev_priv);
+extern void gen6_gt_check_fifodbg(struct drm_i915_private *dev_priv);
extern void ironlake_teardown_rc6(struct drm_device *dev);
extern bool intel_ddi_get_hw_state(struct intel_encoder *encoder,
enum pipe *pipe);
-extern int intel_ddi_get_cdclk_freq(drm_i915_private_t *dev_priv);
+extern int intel_ddi_get_cdclk_freq(struct drm_i915_private *dev_priv);
extern void intel_ddi_pll_init(struct drm_device *dev);
extern void intel_ddi_enable_pipe_func(struct drm_crtc *crtc);
-extern void intel_ddi_disable_transcoder_func(drm_i915_private_t *dev_priv,
+extern void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
enum transcoder cpu_transcoder);
extern void intel_ddi_enable_pipe_clock(struct intel_crtc *intel_crtc);
extern void intel_ddi_disable_pipe_clock(struct intel_crtc *intel_crtc);
diff --git a/sys/dev/pci/drm/i915/intel_dvo.c b/sys/dev/pci/drm/i915/intel_dvo.c
index 7d3d9431513..16c5395e62e 100644
--- a/sys/dev/pci/drm/i915/intel_dvo.c
+++ b/sys/dev/pci/drm/i915/intel_dvo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_dvo.c,v 1.2 2013/07/04 09:59:07 jsg Exp $ */
+/* $OpenBSD: intel_dvo.c,v 1.3 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright 2006 Dave Airlie <airlied@linux.ie>
* Copyright © 2006-2007 Intel Corporation
@@ -136,7 +136,7 @@ intel_dvo_get_hw_state(struct intel_encoder *encoder,
enum pipe *pipe)
{
struct drm_device *dev = encoder->base.dev;
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_dvo *intel_dvo = enc_to_intel_dvo(&encoder->base);
u32 tmp;
@@ -153,7 +153,7 @@ intel_dvo_get_hw_state(struct intel_encoder *encoder,
void
intel_disable_dvo(struct intel_encoder *encoder)
{
- drm_i915_private_t *dev_priv = encoder->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
struct intel_dvo *intel_dvo = enc_to_intel_dvo(&encoder->base);
u32 dvo_reg = intel_dvo->dev.dvo_reg;
u32 temp = I915_READ(dvo_reg);
@@ -166,7 +166,7 @@ intel_disable_dvo(struct intel_encoder *encoder)
void
intel_enable_dvo(struct intel_encoder *encoder)
{
- drm_i915_private_t *dev_priv = encoder->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
struct intel_dvo *intel_dvo = enc_to_intel_dvo(&encoder->base);
u32 dvo_reg = intel_dvo->dev.dvo_reg;
u32 temp = I915_READ(dvo_reg);
@@ -274,7 +274,7 @@ intel_dvo_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode)
{
struct drm_device *dev = encoder->dev;
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
struct intel_dvo *intel_dvo = enc_to_intel_dvo(encoder);
int pipe = intel_crtc->pipe;
@@ -339,7 +339,7 @@ int
intel_dvo_get_modes(struct drm_connector *connector)
{
struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
- drm_i915_private_t *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
/* We should probably have an i2c driver get_modes function for those
* devices which will have a fixed set of modes determined by the chip
@@ -419,7 +419,7 @@ struct drm_display_mode *
intel_dvo_get_current_mode(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
uint32_t dvo_val = I915_READ(intel_dvo->dev.dvo_reg);
struct drm_display_mode *mode = NULL;
@@ -450,7 +450,7 @@ intel_dvo_get_current_mode(struct drm_connector *connector)
void
intel_dvo_init(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_encoder *intel_encoder;
struct intel_dvo *intel_dvo;
struct intel_connector *intel_connector;
diff --git a/sys/dev/pci/drm/i915/intel_fb.c b/sys/dev/pci/drm/i915/intel_fb.c
index efb56630b9c..da855015c42 100644
--- a/sys/dev/pci/drm/i915/intel_fb.c
+++ b/sys/dev/pci/drm/i915/intel_fb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_fb.c,v 1.4 2013/04/17 20:15:14 kettenis Exp $ */
+/* $OpenBSD: intel_fb.c,v 1.5 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2007 David Airlie
*
@@ -44,7 +44,7 @@ intelfb_create(struct intel_fbdev *ifbdev,
struct drm_fb_helper_surface_size *sizes)
{
struct drm_device *dev = ifbdev->helper.dev;
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
#if 0
struct fb_info *info;
#endif
@@ -255,7 +255,7 @@ int
intel_fbdev_init(struct drm_device *dev)
{
struct intel_fbdev *ifbdev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ drm_i915_private_t *dev_priv = dev->dev_private;
int ret;
ifbdev = malloc(sizeof(struct intel_fbdev), M_DRM,
@@ -280,7 +280,7 @@ intel_fbdev_init(struct drm_device *dev)
void
intel_fbdev_fini(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ drm_i915_private_t *dev_priv = dev->dev_private;
if (!dev_priv->fbdev)
return;
@@ -292,7 +292,7 @@ intel_fbdev_fini(struct drm_device *dev)
void
intel_fb_output_poll_changed(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ drm_i915_private_t *dev_priv = dev->dev_private;
drm_fb_helper_hotplug_event(&dev_priv->fbdev->helper);
}
@@ -300,7 +300,7 @@ void
intel_fb_restore_mode(struct drm_device *dev)
{
int ret;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ drm_i915_private_t *dev_priv = dev->dev_private;
struct drm_mode_config *config = &dev->mode_config;
struct drm_plane *plane;
diff --git a/sys/dev/pci/drm/i915/intel_hdmi.c b/sys/dev/pci/drm/i915/intel_hdmi.c
index ef9ae4f08d8..71e5bbfdbf5 100644
--- a/sys/dev/pci/drm/i915/intel_hdmi.c
+++ b/sys/dev/pci/drm/i915/intel_hdmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_hdmi.c,v 1.1 2013/03/18 12:36:52 jsg Exp $ */
+/* $OpenBSD: intel_hdmi.c,v 1.2 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright 2006 Dave Airlie <airlied@linux.ie>
* Copyright © 2006-2009 Intel Corporation
@@ -91,7 +91,7 @@ void
assert_hdmi_port_disabled(struct intel_hdmi *intel_hdmi)
{
struct drm_device *dev = intel_hdmi_to_dev(intel_hdmi);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t enabled_bits;
enabled_bits = IS_HASWELL(dev) ? DDI_BUF_CTL_ENABLE : SDVO_ENABLE;
@@ -192,7 +192,7 @@ g4x_write_infoframe(struct drm_encoder *encoder,
{
uint32_t *data = (uint32_t *)frame;
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 val = I915_READ(VIDEO_DIP_CTL);
unsigned i, len = DIP_HEADER_SIZE + frame->len;
@@ -229,7 +229,7 @@ ibx_write_infoframe(struct drm_encoder *encoder,
{
uint32_t *data = (uint32_t *)frame;
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
int reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
unsigned i, len = DIP_HEADER_SIZE + frame->len;
@@ -268,7 +268,7 @@ cpt_write_infoframe(struct drm_encoder *encoder,
{
uint32_t *data = (uint32_t *)frame;
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
int reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
unsigned i, len = DIP_HEADER_SIZE + frame->len;
@@ -310,7 +310,7 @@ vlv_write_infoframe(struct drm_encoder *encoder,
{
uint32_t *data = (uint32_t *)frame;
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
int reg = VLV_TVIDEO_DIP_CTL(intel_crtc->pipe);
unsigned i, len = DIP_HEADER_SIZE + frame->len;
@@ -349,7 +349,7 @@ hsw_write_infoframe(struct drm_encoder *encoder,
{
uint32_t *data = (uint32_t *)frame;
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
u32 ctl_reg = HSW_TVIDEO_DIP_CTL(intel_crtc->pipe);
u32 data_reg = hsw_infoframe_data_reg(frame, intel_crtc->pipe);
@@ -425,7 +425,7 @@ void
g4x_set_infoframes(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode)
{
- struct inteldrm_softc *dev_priv = encoder->dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->dev->dev_private;
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
u32 reg = VIDEO_DIP_CTL;
u32 val = I915_READ(reg);
@@ -489,7 +489,7 @@ void
ibx_set_infoframes(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode)
{
- struct inteldrm_softc *dev_priv = encoder->dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
u32 reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
@@ -550,7 +550,7 @@ void
cpt_set_infoframes(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode)
{
- struct inteldrm_softc *dev_priv = encoder->dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
u32 reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
@@ -586,7 +586,7 @@ void
vlv_set_infoframes(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode)
{
- struct inteldrm_softc *dev_priv = encoder->dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
u32 reg = VLV_TVIDEO_DIP_CTL(intel_crtc->pipe);
@@ -621,7 +621,7 @@ void
hsw_set_infoframes(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode)
{
- struct inteldrm_softc *dev_priv = encoder->dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
u32 reg = HSW_TVIDEO_DIP_CTL(intel_crtc->pipe);
@@ -651,7 +651,7 @@ intel_hdmi_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode)
{
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
u32 sdvox;
@@ -697,7 +697,7 @@ intel_hdmi_get_hw_state(struct intel_encoder *encoder,
enum pipe *pipe)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
u32 tmp;
@@ -718,7 +718,7 @@ void
intel_enable_hdmi(struct intel_encoder *encoder)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
u32 temp;
u32 enable_bits = SDVO_ENABLE;
@@ -765,7 +765,7 @@ void
intel_disable_hdmi(struct intel_encoder *encoder)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
u32 temp;
u32 enable_bits = SDVO_ENABLE | SDVO_AUDIO_ENABLE;
@@ -845,7 +845,7 @@ bool
g4x_hdmi_connected(struct intel_hdmi *intel_hdmi)
{
struct drm_device *dev = intel_hdmi_to_dev(intel_hdmi);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t bit;
switch (intel_hdmi->sdvox_reg) {
@@ -870,7 +870,7 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
struct intel_digital_port *intel_dig_port =
hdmi_to_dig_port(intel_hdmi);
struct intel_encoder *intel_encoder = &intel_dig_port->base;
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
struct edid *edid;
enum drm_connector_status status = connector_status_disconnected;
@@ -908,7 +908,7 @@ int
intel_hdmi_get_modes(struct drm_connector *connector)
{
struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
/* We should parse the EDID data and find out if it's an HDMI sink so
* we can send audio to it.
@@ -923,7 +923,7 @@ bool
intel_hdmi_detect_audio(struct drm_connector *connector)
{
struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
struct edid *edid;
bool has_audio = false;
@@ -947,7 +947,7 @@ intel_hdmi_set_property(struct drm_connector *connector,
struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
struct intel_digital_port *intel_dig_port =
hdmi_to_dig_port(intel_hdmi);
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
int ret;
ret = drm_object_property_set_value(&connector->base, property, val);
@@ -1044,7 +1044,7 @@ intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
struct intel_hdmi *intel_hdmi = &intel_dig_port->hdmi;
struct intel_encoder *intel_encoder = &intel_dig_port->base;
struct drm_device *dev = intel_encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
enum port port = intel_dig_port->port;
drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
diff --git a/sys/dev/pci/drm/i915/intel_lvds.c b/sys/dev/pci/drm/i915/intel_lvds.c
index 90e642208db..435b2d30d88 100644
--- a/sys/dev/pci/drm/i915/intel_lvds.c
+++ b/sys/dev/pci/drm/i915/intel_lvds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_lvds.c,v 1.3 2013/07/04 09:55:01 jsg Exp $ */
+/* $OpenBSD: intel_lvds.c,v 1.4 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2006-2007 Intel Corporation
* Copyright (c) 2006 Dave Airlie <airlied@linux.ie>
@@ -103,7 +103,7 @@ intel_lvds_get_hw_state(struct intel_encoder *encoder,
enum pipe *pipe)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 lvds_reg, tmp;
if (HAS_PCH_SPLIT(dev)) {
@@ -134,7 +134,7 @@ intel_enable_lvds(struct intel_encoder *encoder)
struct drm_device *dev = encoder->base.dev;
struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(&encoder->base);
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 ctl_reg, lvds_reg, stat_reg;
int retries;
@@ -184,7 +184,7 @@ intel_disable_lvds(struct intel_encoder *encoder)
{
struct drm_device *dev = encoder->base.dev;
struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(&encoder->base);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 ctl_reg, lvds_reg, stat_reg;
int retries;
@@ -300,7 +300,7 @@ intel_lvds_mode_fixup(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode)
{
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(encoder);
struct intel_connector *intel_connector =
&lvds_encoder->attached_connector->base;
@@ -562,7 +562,7 @@ intel_lid_notify(struct notifier_block *nb, unsigned long val,
container_of(nb, struct intel_lvds_connector, lid_notifier);
struct drm_connector *connector = &lvds_connector->base.base;
struct drm_device *dev = connector->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (dev->switch_power_state != DRM_SWITCH_POWER_ON)
return NOTIFY_OK;
@@ -876,7 +876,7 @@ intel_find_lvds_downclock(struct drm_device *dev,
struct drm_display_mode *fixed_mode,
struct drm_connector *connector)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_display_mode *scan;
int temp_downclock;
@@ -927,7 +927,7 @@ bool
lvds_is_present_in_vbt(struct drm_device *dev,
u8 *i2c_pin)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int i;
if (!dev_priv->child_dev_num)
@@ -990,7 +990,7 @@ intel_lvds_supported(struct drm_device *dev)
bool
intel_lvds_init(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_lvds_encoder *lvds_encoder;
struct intel_encoder *intel_encoder;
struct intel_lvds_connector *lvds_connector;
diff --git a/sys/dev/pci/drm/i915/intel_modes.c b/sys/dev/pci/drm/i915/intel_modes.c
index ea6121c019f..179c95a63ee 100644
--- a/sys/dev/pci/drm/i915/intel_modes.c
+++ b/sys/dev/pci/drm/i915/intel_modes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_modes.c,v 1.1 2013/03/18 12:36:52 jsg Exp $ */
+/* $OpenBSD: intel_modes.c,v 1.2 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
* Copyright (c) 2007, 2010 Intel Corporation
@@ -83,7 +83,7 @@ void
intel_attach_force_audio_property(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_property *prop;
prop = dev_priv->force_audio_property;
@@ -109,7 +109,7 @@ void
intel_attach_broadcast_rgb_property(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_property *prop;
prop = dev_priv->broadcast_rgb_property;
diff --git a/sys/dev/pci/drm/i915/intel_opregion.c b/sys/dev/pci/drm/i915/intel_opregion.c
index 075a5cd1b08..81c8ec8e480 100644
--- a/sys/dev/pci/drm/i915/intel_opregion.c
+++ b/sys/dev/pci/drm/i915/intel_opregion.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_opregion.c,v 1.2 2013/03/21 08:27:32 jsg Exp $ */
+/* $OpenBSD: intel_opregion.c,v 1.3 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright 2008 Intel Corporation <hong.liu@intel.com>
* Copyright 2008 Red Hat <mjg@redhat.com>
@@ -160,7 +160,7 @@ void intel_didl_outputs(struct drm_device *);
u32
asle_set_backlight(struct drm_device *dev, u32 bclp)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct opregion_asle *asle = dev_priv->opregion.asle;
u32 max;
@@ -189,7 +189,7 @@ asle_set_als_illum(struct drm_device *dev, u32 alsi)
u32
asle_set_pwm_freq(struct drm_device *dev, u32 pfmb)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (pfmb & ASLE_PFMB_PWM_VALID) {
u32 blc_pwm_ctl = I915_READ(BLC_PWM_CTL);
u32 pwm = pfmb & ASLE_PFMB_PWM_MASK;
@@ -213,7 +213,7 @@ asle_set_pfit(struct drm_device *dev, u32 pfit)
void
intel_opregion_asle_intr(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct opregion_asle *asle = dev_priv->opregion.asle;
u32 asle_stat = 0;
u32 asle_req;
@@ -246,7 +246,7 @@ intel_opregion_asle_intr(struct drm_device *dev)
void
intel_opregion_gse_intr(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct opregion_asle *asle = dev_priv->opregion.asle;
u32 asle_stat = 0;
u32 asle_req;
@@ -290,7 +290,7 @@ intel_opregion_gse_intr(struct drm_device *dev)
void
intel_opregion_enable_asle(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct opregion_asle *asle = dev_priv->opregion.asle;
if (asle) {
@@ -353,7 +353,7 @@ void
intel_didl_outputs(struct drm_device *dev)
{
#ifdef notyet
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_opregion *opregion = &dev_priv->opregion;
struct drm_connector *connector;
acpi_handle handle;
@@ -446,7 +446,7 @@ blind_set:
void
intel_opregion_init(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_opregion *opregion = &dev_priv->opregion;
if (!opregion->header)
@@ -475,7 +475,7 @@ intel_opregion_init(struct drm_device *dev)
void
intel_opregion_fini(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_opregion *opregion = &dev_priv->opregion;
if (!opregion->header)
@@ -503,7 +503,7 @@ intel_opregion_fini(struct drm_device *dev)
int
intel_opregion_setup(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_opregion *opregion = &dev_priv->opregion;
void *base;
u32 asls, mboxes;
diff --git a/sys/dev/pci/drm/i915/intel_overlay.c b/sys/dev/pci/drm/i915/intel_overlay.c
index 6b916482537..21e4647217a 100644
--- a/sys/dev/pci/drm/i915/intel_overlay.c
+++ b/sys/dev/pci/drm/i915/intel_overlay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_overlay.c,v 1.4 2013/05/05 13:55:36 kettenis Exp $ */
+/* $OpenBSD: intel_overlay.c,v 1.5 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2009
*
@@ -308,7 +308,7 @@ int
intel_overlay_on(struct intel_overlay *overlay)
{
struct drm_device *dev = overlay->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_ring_buffer *ring = &dev_priv->ring[RCS];
int ret;
@@ -396,7 +396,7 @@ int
intel_overlay_off(struct intel_overlay *overlay)
{
struct drm_device *dev = overlay->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_ring_buffer *ring = &dev_priv->ring[RCS];
u32 flip_addr = overlay->flip_addr;
int ret;
@@ -1087,7 +1087,7 @@ check_overlay_src(struct drm_device *dev,
int
intel_panel_fitter_pipe(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 pfit_control;
/* i830 doesn't have a panel fitter */
diff --git a/sys/dev/pci/drm/i915/intel_panel.c b/sys/dev/pci/drm/i915/intel_panel.c
index b386c817a5e..7474162436b 100644
--- a/sys/dev/pci/drm/i915/intel_panel.c
+++ b/sys/dev/pci/drm/i915/intel_panel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_panel.c,v 1.2 2013/07/04 09:55:01 jsg Exp $ */
+/* $OpenBSD: intel_panel.c,v 1.3 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2006-2010 Intel Corporation
* Copyright (c) 2006 Dave Airlie <airlied@linux.ie>
@@ -69,7 +69,7 @@ intel_pch_panel_fitting(struct drm_device *dev,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int x, y, width, height;
x = y = width = height = 0;
@@ -130,7 +130,7 @@ done:
int
is_backlight_combination_mode(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (INTEL_INFO(dev)->gen >= 4)
return I915_READ(BLC_PWM_CTL2) & BLM_COMBINATION_MODE;
@@ -144,7 +144,7 @@ is_backlight_combination_mode(struct drm_device *dev)
u32
i915_read_blc_pwm_ctl(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 val;
/* Restore the CTL value if it lost, e.g. GPU reset */
@@ -228,7 +228,7 @@ static int i915_panel_invert_brightness;
u32
intel_panel_compute_brightness(struct drm_device *dev, u32 val)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (i915_panel_invert_brightness < 0)
return val;
@@ -243,7 +243,7 @@ intel_panel_compute_brightness(struct drm_device *dev, u32 val)
u32
intel_panel_get_backlight(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 val;
if (HAS_PCH_SPLIT(dev)) {
@@ -270,7 +270,7 @@ intel_panel_get_backlight(struct drm_device *dev)
void
intel_pch_panel_set_backlight(struct drm_device *dev, u32 level)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 val = I915_READ(BLC_PWM_CPU_CTL) & ~BACKLIGHT_DUTY_CYCLE_MASK;
I915_WRITE(BLC_PWM_CPU_CTL, val | level);
}
@@ -278,7 +278,7 @@ intel_pch_panel_set_backlight(struct drm_device *dev, u32 level)
void
intel_panel_actually_set_backlight(struct drm_device *dev, u32 level)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 tmp;
DRM_DEBUG_DRIVER("set backlight PWM = %d\n", level);
@@ -306,7 +306,7 @@ intel_panel_actually_set_backlight(struct drm_device *dev, u32 level)
void
intel_panel_set_backlight(struct drm_device *dev, u32 level)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
dev_priv->backlight_level = level;
if (dev_priv->backlight_enabled)
@@ -316,7 +316,7 @@ intel_panel_set_backlight(struct drm_device *dev, u32 level)
void
intel_panel_disable_backlight(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
dev_priv->backlight_enabled = false;
intel_panel_actually_set_backlight(dev, 0);
@@ -340,7 +340,7 @@ void
intel_panel_enable_backlight(struct drm_device *dev,
enum pipe pipe)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (dev_priv->backlight_level == 0)
dev_priv->backlight_level = intel_panel_get_max_backlight(dev);
@@ -391,7 +391,7 @@ set_level:
void
intel_panel_init_backlight(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
dev_priv->backlight_level = intel_panel_get_backlight(dev);
dev_priv->backlight_enabled = dev_priv->backlight_level != 0;
@@ -400,7 +400,7 @@ intel_panel_init_backlight(struct drm_device *dev)
enum drm_connector_status
intel_panel_detect(struct drm_device *dev)
{
-// struct inteldrm_softc *dev_priv = dev->dev_private;
+// struct drm_i915_private *dev_priv = dev->dev_private;
#if 0
/* Assume that the BIOS does not lie through the OpRegion... */
@@ -434,7 +434,7 @@ int
intel_panel_get_brightness(struct backlight_device *bd)
{
struct drm_device *dev = bl_get_data(bd);
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
return dev_priv->backlight_level;
}
@@ -447,7 +447,7 @@ int
intel_panel_setup_backlight(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct backlight_properties props;
intel_panel_init_backlight(dev);
@@ -480,7 +480,7 @@ intel_panel_setup_backlight(struct drm_connector *connector)
void
intel_panel_destroy_backlight(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (dev_priv->backlight) {
backlight_device_unregister(dev_priv->backlight);
dev_priv->backlight = NULL;
diff --git a/sys/dev/pci/drm/i915/intel_pm.c b/sys/dev/pci/drm/i915/intel_pm.c
index fb3d21cdac3..cd454eee93d 100644
--- a/sys/dev/pci/drm/i915/intel_pm.c
+++ b/sys/dev/pci/drm/i915/intel_pm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_pm.c,v 1.7 2013/07/04 09:52:29 jsg Exp $ */
+/* $OpenBSD: intel_pm.c,v 1.8 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2012 Intel Corporation
*
@@ -54,7 +54,7 @@ void ironlake_enable_fbc(struct drm_crtc *, unsigned long);
void ironlake_disable_fbc(struct drm_device *);
bool ironlake_fbc_enabled(struct drm_device *);
bool intel_fbc_enabled(struct drm_device *);
-void intel_cancel_fbc_work(struct inteldrm_softc *);
+void intel_cancel_fbc_work(struct drm_i915_private *);
void i915_pineview_get_mem_freq(struct drm_device *);
void i915_ironlake_get_mem_freq(struct drm_device *);
const struct cxsr_latency *
@@ -107,7 +107,7 @@ struct drm_i915_gem_object *
intel_alloc_context_page(struct drm_device *);
void ironlake_enable_drps(struct drm_device *);
void ironlake_disable_drps(struct drm_device *);
-u32 gen6_rps_limits(struct inteldrm_softc *, u8 *);
+u32 gen6_rps_limits(struct drm_i915_private *, u8 *);
void gen6_disable_rps(struct drm_device *);
void gen6_enable_rps(struct drm_device *);
void gen6_update_ring_freq(struct drm_device *);
@@ -115,10 +115,10 @@ void ironlake_disable_rc6(struct drm_device *);
int ironlake_setup_rc6(struct drm_device *);
void ironlake_enable_rc6(struct drm_device *);
unsigned long intel_pxfreq(u32);
-unsigned long __i915_chipset_val(struct inteldrm_softc *);
-u16 pvid_to_extvid(struct inteldrm_softc *, u8);
-void __i915_update_gfx_val(struct inteldrm_softc *);
-unsigned long __i915_gfx_val(struct inteldrm_softc *);
+unsigned long __i915_chipset_val(struct drm_i915_private *);
+u16 pvid_to_extvid(struct drm_i915_private *, u8);
+void __i915_update_gfx_val(struct drm_i915_private *);
+unsigned long __i915_gfx_val(struct drm_i915_private *);
unsigned long i915_read_mch_val(void);
bool i915_gpu_raise(void);
bool i915_gpu_lower(void);
@@ -129,7 +129,7 @@ void ibx_init_clock_gating(struct drm_device *);
void ironlake_init_clock_gating(struct drm_device *);
void cpt_init_clock_gating(struct drm_device *);
void gen6_init_clock_gating(struct drm_device *);
-void gen7_setup_fixed_func_scheduler(struct inteldrm_softc *);
+void gen7_setup_fixed_func_scheduler(struct drm_i915_private *);
void lpt_init_clock_gating(struct drm_device *);
void haswell_init_clock_gating(struct drm_device *);
void ivybridge_init_clock_gating(struct drm_device *);
@@ -140,12 +140,12 @@ void broadwater_init_clock_gating(struct drm_device *);
void gen3_init_clock_gating(struct drm_device *);
void i85x_init_clock_gating(struct drm_device *);
void i830_init_clock_gating(struct drm_device *);
-void __gen6_gt_wait_for_thread_c0(struct inteldrm_softc *);
-void __gen6_gt_force_wake_reset(struct inteldrm_softc *);
-void __gen6_gt_force_wake_mt_reset(struct inteldrm_softc *);
-void vlv_force_wake_reset(struct inteldrm_softc *);
-void vlv_force_wake_get(struct inteldrm_softc *);
-void vlv_force_wake_put(struct inteldrm_softc *);
+void __gen6_gt_wait_for_thread_c0(struct drm_i915_private *);
+void __gen6_gt_force_wake_reset(struct drm_i915_private *);
+void __gen6_gt_force_wake_mt_reset(struct drm_i915_private *);
+void vlv_force_wake_reset(struct drm_i915_private *);
+void vlv_force_wake_get(struct drm_i915_private *);
+void vlv_force_wake_put(struct drm_i915_private *);
void intel_gt_reset(struct drm_device *);
void intel_gt_init(struct drm_device *);
void intel_fbc_work_tick(void *);
@@ -167,7 +167,7 @@ intel_crtc_active(struct drm_crtc *crtc)
void
i8xx_disable_fbc(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 fbc_ctl;
int retries;
@@ -197,7 +197,7 @@ void
i8xx_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_framebuffer *fb = crtc->fb;
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
struct drm_i915_gem_object *obj = intel_fb->obj;
@@ -240,7 +240,7 @@ i8xx_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
bool
i8xx_fbc_enabled(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
return I915_READ(FBC_CONTROL) & FBC_CTL_EN;
}
@@ -249,7 +249,7 @@ void
g4x_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_framebuffer *fb = crtc->fb;
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
struct drm_i915_gem_object *obj = intel_fb->obj;
@@ -276,7 +276,7 @@ g4x_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
void
g4x_disable_fbc(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 dpfc_ctl;
/* Disable compression */
@@ -292,7 +292,7 @@ g4x_disable_fbc(struct drm_device *dev)
bool
g4x_fbc_enabled(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
return I915_READ(DPFC_CONTROL) & DPFC_CTL_EN;
}
@@ -300,7 +300,7 @@ g4x_fbc_enabled(struct drm_device *dev)
void
sandybridge_blit_fbc_update(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 blt_ecoskpd;
/* Make sure blitter notifies FBC of writes */
@@ -322,7 +322,7 @@ void
ironlake_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_framebuffer *fb = crtc->fb;
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
struct drm_i915_gem_object *obj = intel_fb->obj;
@@ -360,7 +360,7 @@ ironlake_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
void
ironlake_disable_fbc(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 dpfc_ctl;
/* Disable compression */
@@ -376,7 +376,7 @@ ironlake_disable_fbc(struct drm_device *dev)
bool
ironlake_fbc_enabled(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
return I915_READ(ILK_DPFC_CONTROL) & DPFC_CTL_EN;
}
@@ -384,7 +384,7 @@ ironlake_fbc_enabled(struct drm_device *dev)
bool
intel_fbc_enabled(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (!dev_priv->display.fbc_enabled)
return false;
@@ -406,7 +406,7 @@ intel_fbc_work_fn(void *arg1, void *arg2)
{
struct intel_fbc_work *work = arg1;
struct drm_device *dev = work->crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
DRM_LOCK();
if (work == dev_priv->fbc_work) {
@@ -430,7 +430,7 @@ intel_fbc_work_fn(void *arg1, void *arg2)
}
void
-intel_cancel_fbc_work(struct inteldrm_softc *dev_priv)
+intel_cancel_fbc_work(struct drm_i915_private *dev_priv)
{
if (dev_priv->fbc_work == NULL)
return;
@@ -458,7 +458,7 @@ intel_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
{
struct intel_fbc_work *work;
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (!dev_priv->display.enable_fbc)
return;
@@ -497,7 +497,7 @@ intel_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
void
intel_disable_fbc(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
intel_cancel_fbc_work(dev_priv);
@@ -530,7 +530,7 @@ intel_disable_fbc(struct drm_device *dev)
void
intel_update_fbc(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc = NULL, *tmp_crtc;
struct intel_crtc *intel_crtc;
struct drm_framebuffer *fb;
@@ -853,7 +853,7 @@ intel_get_cxsr_latency(int is_desktop,
void
pineview_disable_cxsr(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
/* deactivate cxsr */
I915_WRITE(DSPFW3, I915_READ(DSPFW3) & ~PINEVIEW_SELF_REFRESH_EN);
@@ -878,7 +878,7 @@ static const int latency_ns = 5000;
int
i9xx_get_fifo_size(struct drm_device *dev, int plane)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t dsparb = I915_READ(DSPARB);
int size;
@@ -895,7 +895,7 @@ i9xx_get_fifo_size(struct drm_device *dev, int plane)
int
i85x_get_fifo_size(struct drm_device *dev, int plane)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t dsparb = I915_READ(DSPARB);
int size;
@@ -913,7 +913,7 @@ i85x_get_fifo_size(struct drm_device *dev, int plane)
int
i845_get_fifo_size(struct drm_device *dev, int plane)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t dsparb = I915_READ(DSPARB);
int size;
@@ -930,7 +930,7 @@ i845_get_fifo_size(struct drm_device *dev, int plane)
int
i830_get_fifo_size(struct drm_device *dev, int plane)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t dsparb = I915_READ(DSPARB);
int size;
@@ -1165,7 +1165,7 @@ single_enabled_crtc(struct drm_device *dev)
void
pineview_update_wm(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc;
const struct cxsr_latency *latency;
u32 reg;
@@ -1411,7 +1411,7 @@ vlv_compute_drain_latency(struct drm_device *dev,
void
vlv_update_drain_latency(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int planea_prec, planea_dl, planeb_prec, planeb_dl;
int cursora_prec, cursora_dl, cursorb_prec, cursorb_dl;
int plane_prec_mult, cursor_prec_mult; /* Precision multiplier is
@@ -1450,7 +1450,7 @@ void
valleyview_update_wm(struct drm_device *dev)
{
static const int sr_latency_ns = 12000;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int planea_wm, planeb_wm, cursora_wm, cursorb_wm;
int plane_sr, cursor_sr;
int ignore_plane_sr, ignore_cursor_sr;
@@ -1510,7 +1510,7 @@ void
g4x_update_wm(struct drm_device *dev)
{
static const int sr_latency_ns = 12000;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int planea_wm, planeb_wm, cursora_wm, cursorb_wm;
int plane_sr, cursor_sr;
unsigned int enabled = 0;
@@ -1562,7 +1562,7 @@ g4x_update_wm(struct drm_device *dev)
void
i965_update_wm(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc;
int srwm = 1;
int cursor_sr = 16;
@@ -1628,7 +1628,7 @@ i965_update_wm(struct drm_device *dev)
void
i9xx_update_wm(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
const struct intel_watermark_params *wm_info;
uint32_t fwater_lo;
uint32_t fwater_hi;
@@ -1746,7 +1746,7 @@ i9xx_update_wm(struct drm_device *dev)
void
i830_update_wm(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc;
uint32_t fwater_lo;
int planea_wm;
@@ -1782,7 +1782,7 @@ ironlake_check_srwm(struct drm_device *dev, int level,
const struct intel_watermark_params *display,
const struct intel_watermark_params *cursor)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
DRM_DEBUG_KMS("watermark %d: display plane %d, fbc lines %d,"
" cursor %d\n", level, display_wm, fbc_wm, cursor_wm);
@@ -1875,7 +1875,7 @@ ironlake_compute_srwm(struct drm_device *dev, int level, int plane,
void
ironlake_update_wm(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int fbc_wm, plane_wm, cursor_wm;
unsigned int enabled;
@@ -1959,7 +1959,7 @@ ironlake_update_wm(struct drm_device *dev)
void
sandybridge_update_wm(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int latency = SNB_READ_WM0_LATENCY() * 100; /* In unit 0.1us */
u32 val;
int fbc_wm, plane_wm, cursor_wm;
@@ -2062,7 +2062,7 @@ sandybridge_update_wm(struct drm_device *dev)
void
ivybridge_update_wm(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int latency = SNB_READ_WM0_LATENCY() * 100; /* In unit 0.1us */
u32 val;
int fbc_wm, plane_wm, cursor_wm;
@@ -2186,7 +2186,7 @@ void
haswell_update_linetime_wm(struct drm_device *dev, int pipe,
struct drm_display_mode *mode)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 temp;
temp = I915_READ(PIPE_WM_LINETIME(pipe));
@@ -2289,7 +2289,7 @@ void
sandybridge_update_sprite_wm(struct drm_device *dev, int pipe,
uint32_t sprite_width, int pixel_size)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int latency = SNB_READ_WM0_LATENCY() * 100; /* In unit 0.1us */
u32 val;
int sprite_wm, reg;
@@ -2400,7 +2400,7 @@ sandybridge_update_sprite_wm(struct drm_device *dev, int pipe,
void
intel_update_watermarks(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (dev_priv->display.update_wm)
dev_priv->display.update_wm(dev);
@@ -2410,7 +2410,7 @@ void
intel_update_linetime_watermarks(struct drm_device *dev,
int pipe, struct drm_display_mode *mode)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (dev_priv->display.update_linetime_wm)
dev_priv->display.update_linetime_wm(dev, pipe, mode);
@@ -2420,7 +2420,7 @@ void
intel_update_sprite_watermarks(struct drm_device *dev, int pipe,
uint32_t sprite_width, int pixel_size)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (dev_priv->display.update_sprite_wm)
dev_priv->display.update_sprite_wm(dev, pipe, sprite_width,
@@ -2466,12 +2466,12 @@ err_unref:
}
struct mutex mchdev_lock;
-static struct inteldrm_softc *i915_mch_dev;
+static struct drm_i915_private *i915_mch_dev;
bool
ironlake_set_drps(struct drm_device *dev, u8 val)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u16 rgvswctl;
MUTEX_ASSERT_LOCKED(&mchdev_lock);
@@ -2496,7 +2496,7 @@ ironlake_set_drps(struct drm_device *dev, u8 val)
void
ironlake_enable_drps(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 rgvmodectl = I915_READ(MEMMODECTL);
u8 fmax, fmin, fstart, vstart;
int retries;
@@ -2571,7 +2571,7 @@ ironlake_enable_drps(struct drm_device *dev)
void
ironlake_disable_drps(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u16 rgvswctl;
mtx_enter(&mchdev_lock);
@@ -2601,7 +2601,7 @@ ironlake_disable_drps(struct drm_device *dev)
* all limits and the gpu stuck at whatever frequency it is at atm).
*/
u32
-gen6_rps_limits(struct inteldrm_softc *dev_priv, u8 *val)
+gen6_rps_limits(struct drm_i915_private *dev_priv, u8 *val)
{
u32 limits;
@@ -2628,7 +2628,7 @@ gen6_rps_limits(struct inteldrm_softc *dev_priv, u8 *val)
void
gen6_set_rps(struct drm_device *dev, u8 val)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 limits = gen6_rps_limits(dev_priv, &val);
rw_assert_wrlock(&dev_priv->rps.hw_lock);
@@ -2658,7 +2658,7 @@ gen6_set_rps(struct drm_device *dev, u8 val)
void
gen6_disable_rps(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(GEN6_RC_CONTROL, 0);
I915_WRITE(GEN6_RPNSWREQ, 1 << 31);
@@ -2705,7 +2705,7 @@ intel_enable_rc6(const struct drm_device *dev)
void
gen6_enable_rps(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_ring_buffer *ring;
u32 rp_state_cap;
u32 gt_perf_status;
@@ -2851,7 +2851,7 @@ gen6_enable_rps(struct drm_device *dev)
void
gen6_update_ring_freq(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int min_freq = 15;
int gpu_freq;
unsigned int ia_freq, max_ia_freq;
@@ -2906,7 +2906,7 @@ gen6_update_ring_freq(struct drm_device *dev)
void
ironlake_teardown_rc6(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (dev_priv->ips.renderctx) {
i915_gem_object_unpin(dev_priv->ips.renderctx);
@@ -2924,7 +2924,7 @@ ironlake_teardown_rc6(struct drm_device *dev)
void
ironlake_disable_rc6(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int retries;
if (I915_READ(PWRCTXA)) {
@@ -2947,7 +2947,7 @@ ironlake_disable_rc6(struct drm_device *dev)
int
ironlake_setup_rc6(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (dev_priv->ips.renderctx == NULL)
dev_priv->ips.renderctx = intel_alloc_context_page(dev);
@@ -2967,7 +2967,7 @@ ironlake_setup_rc6(struct drm_device *dev)
void
ironlake_enable_rc6(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_ring_buffer *ring = &dev_priv->ring[RCS];
bool was_interruptible;
int ret;
@@ -3060,7 +3060,7 @@ static const struct cparams {
};
unsigned long
-__i915_chipset_val(struct inteldrm_softc *dev_priv)
+__i915_chipset_val(struct drm_i915_private *dev_priv)
{
u64 total_count, diff, ret;
u32 count1, count2, count3, m = 0, c = 0;
@@ -3115,7 +3115,7 @@ __i915_chipset_val(struct inteldrm_softc *dev_priv)
}
unsigned long
-i915_chipset_val(struct inteldrm_softc *dev_priv)
+i915_chipset_val(struct drm_i915_private *dev_priv)
{
unsigned long val;
@@ -3132,7 +3132,7 @@ i915_chipset_val(struct inteldrm_softc *dev_priv)
}
unsigned long
-i915_mch_val(struct inteldrm_softc *dev_priv)
+i915_mch_val(struct drm_i915_private *dev_priv)
{
unsigned long m, x, b;
u32 tsfs;
@@ -3148,7 +3148,7 @@ i915_mch_val(struct inteldrm_softc *dev_priv)
}
u16
-pvid_to_extvid(struct inteldrm_softc *dev_priv, u8 pxvid)
+pvid_to_extvid(struct drm_i915_private *dev_priv, u8 pxvid)
{
static const struct v_table {
u16 vd; /* in .1 mil */
@@ -3290,7 +3290,7 @@ pvid_to_extvid(struct inteldrm_softc *dev_priv, u8 pxvid)
}
void
-__i915_update_gfx_val(struct inteldrm_softc *dev_priv)
+__i915_update_gfx_val(struct drm_i915_private *dev_priv)
{
struct timespec now, diff1;
u64 diff;
@@ -3326,7 +3326,7 @@ __i915_update_gfx_val(struct inteldrm_softc *dev_priv)
}
void
-i915_update_gfx_val(struct inteldrm_softc *dev_priv)
+i915_update_gfx_val(struct drm_i915_private *dev_priv)
{
if (dev_priv->info->gen != 5)
return;
@@ -3339,7 +3339,7 @@ i915_update_gfx_val(struct inteldrm_softc *dev_priv)
}
unsigned long
-__i915_gfx_val(struct inteldrm_softc *dev_priv)
+__i915_gfx_val(struct drm_i915_private *dev_priv)
{
unsigned long t, corr, state1, corr2, state2;
u32 pxvid, ext_v;
@@ -3377,7 +3377,7 @@ __i915_gfx_val(struct inteldrm_softc *dev_priv)
}
unsigned long
-i915_gfx_val(struct inteldrm_softc *dev_priv)
+i915_gfx_val(struct drm_i915_private *dev_priv)
{
unsigned long val;
@@ -3402,7 +3402,7 @@ i915_gfx_val(struct inteldrm_softc *dev_priv)
unsigned long
i915_read_mch_val(void)
{
- struct inteldrm_softc *dev_priv;
+ struct drm_i915_private *dev_priv;
unsigned long chipset_val, graphics_val, ret = 0;
mtx_enter(&mchdev_lock);
@@ -3429,7 +3429,7 @@ out_unlock:
bool
i915_gpu_raise(void)
{
- struct inteldrm_softc *dev_priv;
+ struct drm_i915_private *dev_priv;
bool ret = true;
mtx_enter(&mchdev_lock);
@@ -3457,7 +3457,7 @@ out_unlock:
bool
i915_gpu_lower(void)
{
- struct inteldrm_softc *dev_priv;
+ struct drm_i915_private *dev_priv;
bool ret = true;
mtx_enter(&mchdev_lock);
@@ -3484,7 +3484,7 @@ out_unlock:
bool
i915_gpu_busy(void)
{
- struct inteldrm_softc *dev_priv;
+ struct drm_i915_private *dev_priv;
struct intel_ring_buffer *ring;
bool ret = false;
int i;
@@ -3512,7 +3512,7 @@ out_unlock:
bool
i915_gpu_turbo_disable(void)
{
- struct inteldrm_softc *dev_priv;
+ struct drm_i915_private *dev_priv;
struct drm_device *dev;
bool ret = true;
@@ -3557,7 +3557,7 @@ ips_ping_for_i915_load(void)
#endif
void
-intel_gpu_ips_init(struct inteldrm_softc *dev_priv)
+intel_gpu_ips_init(struct drm_i915_private *dev_priv)
{
/* We only register the i915 ips part with intel-ips once everything is
* set up, to avoid intel-ips sneaking in and reading bogus values. */
@@ -3579,7 +3579,7 @@ intel_gpu_ips_teardown(void)
void
intel_init_emon(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 lcfuse;
u8 pxw[16];
int i;
@@ -3651,7 +3651,7 @@ intel_init_emon(struct drm_device *dev)
void
intel_disable_gt_powersave(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (IS_IRONLAKE_M(dev)) {
ironlake_disable_drps(dev);
@@ -3688,7 +3688,7 @@ intel_gen6_powersave_work(void *arg1, void *arg2)
void
intel_enable_gt_powersave(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (IS_IRONLAKE_M(dev)) {
ironlake_enable_drps(dev);
@@ -3707,7 +3707,7 @@ intel_enable_gt_powersave(struct drm_device *dev)
void
ibx_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
/*
* On Ibex Peak and Cougar Point, we need to disable clock
@@ -3720,7 +3720,7 @@ ibx_init_clock_gating(struct drm_device *dev)
void
ironlake_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
/* Required for FBC */
@@ -3787,7 +3787,7 @@ ironlake_init_clock_gating(struct drm_device *dev)
void
cpt_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int pipe;
uint32_t val;
@@ -3818,7 +3818,7 @@ cpt_init_clock_gating(struct drm_device *dev)
void
gen6_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int pipe;
uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
@@ -3911,7 +3911,7 @@ gen6_init_clock_gating(struct drm_device *dev)
}
void
-gen7_setup_fixed_func_scheduler(struct inteldrm_softc *dev_priv)
+gen7_setup_fixed_func_scheduler(struct drm_i915_private *dev_priv)
{
uint32_t reg = I915_READ(GEN7_FF_THREAD_MODE);
@@ -3926,7 +3926,7 @@ gen7_setup_fixed_func_scheduler(struct inteldrm_softc *dev_priv)
void
lpt_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
/*
* TODO: this bit should only be enabled when really needed, then
@@ -3941,7 +3941,7 @@ lpt_init_clock_gating(struct drm_device *dev)
void
haswell_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int pipe;
I915_WRITE(WM3_LP_ILK, 0);
@@ -4000,7 +4000,7 @@ haswell_init_clock_gating(struct drm_device *dev)
void
ivybridge_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int pipe;
uint32_t snpcr;
@@ -4098,7 +4098,7 @@ ivybridge_init_clock_gating(struct drm_device *dev)
void
valleyview_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int pipe;
I915_WRITE(WM3_LP_ILK, 0);
@@ -4208,7 +4208,7 @@ valleyview_init_clock_gating(struct drm_device *dev)
void
g4x_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t dspclk_gate;
I915_WRITE(RENCLK_GATE_D1, 0);
@@ -4231,7 +4231,7 @@ g4x_init_clock_gating(struct drm_device *dev)
void
crestline_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(RENCLK_GATE_D1, I965_RCC_CLOCK_GATE_DISABLE);
I915_WRITE(RENCLK_GATE_D2, 0);
@@ -4243,7 +4243,7 @@ crestline_init_clock_gating(struct drm_device *dev)
void
broadwater_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(RENCLK_GATE_D1, I965_RCZ_CLOCK_GATE_DISABLE |
I965_RCC_CLOCK_GATE_DISABLE |
@@ -4256,7 +4256,7 @@ broadwater_init_clock_gating(struct drm_device *dev)
void
gen3_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 dstate = I915_READ(D_STATE);
dstate |= DSTATE_PLL_D3_OFF | DSTATE_GFX_CLOCK_GATING |
@@ -4273,7 +4273,7 @@ gen3_init_clock_gating(struct drm_device *dev)
void
i85x_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(RENCLK_GATE_D1, SV_CLOCK_GATE_DISABLE);
}
@@ -4281,7 +4281,7 @@ i85x_init_clock_gating(struct drm_device *dev)
void
i830_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(DSPCLK_GATE_D, OVRUNIT_CLOCK_GATE_DISABLE);
}
@@ -4289,7 +4289,7 @@ i830_init_clock_gating(struct drm_device *dev)
void
intel_init_clock_gating(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
dev_priv->display.init_clock_gating(dev);
}
@@ -4300,7 +4300,7 @@ intel_init_clock_gating(struct drm_device *dev)
void
intel_init_power_wells(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long power_wells[] = {
HSW_PWR_WELL_CTL1,
HSW_PWR_WELL_CTL2,
@@ -4335,7 +4335,7 @@ intel_init_power_wells(struct drm_device *dev)
void
intel_init_pm(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (I915_HAS_FBC(dev)) {
if (HAS_PCH_SPLIT(dev)) {
@@ -4457,7 +4457,7 @@ intel_init_pm(struct drm_device *dev)
}
void
-__gen6_gt_wait_for_thread_c0(struct inteldrm_softc *dev_priv)
+__gen6_gt_wait_for_thread_c0(struct drm_i915_private *dev_priv)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
u32 gt_thread_status_mask;
@@ -4482,14 +4482,14 @@ __gen6_gt_wait_for_thread_c0(struct inteldrm_softc *dev_priv)
}
void
-__gen6_gt_force_wake_reset(struct inteldrm_softc *dev_priv)
+__gen6_gt_force_wake_reset(struct drm_i915_private *dev_priv)
{
I915_WRITE_NOTRACE(FORCEWAKE, 0);
POSTING_READ(ECOBUS); /* something from same cacheline, but !FORCEWAKE */
}
void
-__gen6_gt_force_wake_get(struct inteldrm_softc *dev_priv)
+__gen6_gt_force_wake_get(struct drm_i915_private *dev_priv)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
u32 forcewake_ack;
@@ -4515,7 +4515,7 @@ __gen6_gt_force_wake_get(struct inteldrm_softc *dev_priv)
}
void
-__gen6_gt_force_wake_mt_reset(struct inteldrm_softc *dev_priv)
+__gen6_gt_force_wake_mt_reset(struct drm_i915_private *dev_priv)
{
I915_WRITE_NOTRACE(FORCEWAKE_MT, _MASKED_BIT_DISABLE(0xffff));
/* something from same cacheline, but !FORCEWAKE_MT */
@@ -4523,7 +4523,7 @@ __gen6_gt_force_wake_mt_reset(struct inteldrm_softc *dev_priv)
}
void
-__gen6_gt_force_wake_mt_get(struct inteldrm_softc *dev_priv)
+__gen6_gt_force_wake_mt_get(struct drm_i915_private *dev_priv)
{
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
u32 forcewake_ack;
@@ -4556,7 +4556,7 @@ __gen6_gt_force_wake_mt_get(struct inteldrm_softc *dev_priv)
* gen6_gt_force_wake_put() at the end of the sequence.
*/
void
-gen6_gt_force_wake_get(struct inteldrm_softc *dev_priv)
+gen6_gt_force_wake_get(struct drm_i915_private *dev_priv)
{
mtx_enter(&dev_priv->gt_lock);
if (dev_priv->forcewake_count++ == 0)
@@ -4565,7 +4565,7 @@ gen6_gt_force_wake_get(struct inteldrm_softc *dev_priv)
}
void
-gen6_gt_check_fifodbg(struct inteldrm_softc *dev_priv)
+gen6_gt_check_fifodbg(struct drm_i915_private *dev_priv)
{
u32 gtfifodbg;
gtfifodbg = I915_READ_NOTRACE(GTFIFODBG);
@@ -4575,7 +4575,7 @@ gen6_gt_check_fifodbg(struct inteldrm_softc *dev_priv)
}
void
-__gen6_gt_force_wake_put(struct inteldrm_softc *dev_priv)
+__gen6_gt_force_wake_put(struct drm_i915_private *dev_priv)
{
I915_WRITE_NOTRACE(FORCEWAKE, 0);
/* something from same cacheline, but !FORCEWAKE */
@@ -4584,7 +4584,7 @@ __gen6_gt_force_wake_put(struct inteldrm_softc *dev_priv)
}
void
-__gen6_gt_force_wake_mt_put(struct inteldrm_softc *dev_priv)
+__gen6_gt_force_wake_mt_put(struct drm_i915_private *dev_priv)
{
I915_WRITE_NOTRACE(FORCEWAKE_MT, _MASKED_BIT_DISABLE(FORCEWAKE_KERNEL));
/* something from same cacheline, but !FORCEWAKE_MT */
@@ -4596,7 +4596,7 @@ __gen6_gt_force_wake_mt_put(struct inteldrm_softc *dev_priv)
* see gen6_gt_force_wake_get()
*/
void
-gen6_gt_force_wake_put(struct inteldrm_softc *dev_priv)
+gen6_gt_force_wake_put(struct drm_i915_private *dev_priv)
{
mtx_enter(&dev_priv->gt_lock);
if (--dev_priv->forcewake_count == 0)
@@ -4605,7 +4605,7 @@ gen6_gt_force_wake_put(struct inteldrm_softc *dev_priv)
}
int
-__gen6_gt_wait_for_fifo(struct inteldrm_softc *dev_priv)
+__gen6_gt_wait_for_fifo(struct drm_i915_private *dev_priv)
{
int ret = 0;
@@ -4626,7 +4626,7 @@ __gen6_gt_wait_for_fifo(struct inteldrm_softc *dev_priv)
}
void
-vlv_force_wake_reset(struct inteldrm_softc *dev_priv)
+vlv_force_wake_reset(struct drm_i915_private *dev_priv)
{
I915_WRITE_NOTRACE(FORCEWAKE_VLV, _MASKED_BIT_DISABLE(0xffff));
/* something from same cacheline, but !FORCEWAKE_VLV */
@@ -4634,7 +4634,7 @@ vlv_force_wake_reset(struct inteldrm_softc *dev_priv)
}
void
-vlv_force_wake_get(struct inteldrm_softc *dev_priv)
+vlv_force_wake_get(struct drm_i915_private *dev_priv)
{
int count;
@@ -4652,7 +4652,7 @@ vlv_force_wake_get(struct inteldrm_softc *dev_priv)
}
void
-vlv_force_wake_put(struct inteldrm_softc *dev_priv)
+vlv_force_wake_put(struct drm_i915_private *dev_priv)
{
I915_WRITE_NOTRACE(FORCEWAKE_VLV, _MASKED_BIT_DISABLE(FORCEWAKE_KERNEL));
/* something from same cacheline, but !FORCEWAKE_VLV */
@@ -4663,7 +4663,7 @@ vlv_force_wake_put(struct inteldrm_softc *dev_priv)
void
intel_gt_reset(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (IS_VALLEYVIEW(dev)) {
vlv_force_wake_reset(dev_priv);
@@ -4677,7 +4677,7 @@ intel_gt_reset(struct drm_device *dev)
void
intel_gt_init(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
mtx_init(&dev_priv->gt_lock, IPL_TTY);
@@ -4698,7 +4698,7 @@ intel_gt_init(struct drm_device *dev)
}
int
-sandybridge_pcode_read(struct inteldrm_softc *dev_priv, u8 mbox, u32 *val)
+sandybridge_pcode_read(struct drm_i915_private *dev_priv, u8 mbox, u32 *val)
{
int retries;
rw_assert_wrlock(&dev_priv->rps.hw_lock);
@@ -4728,7 +4728,7 @@ sandybridge_pcode_read(struct inteldrm_softc *dev_priv, u8 mbox, u32 *val)
}
int
-sandybridge_pcode_write(struct inteldrm_softc *dev_priv, u8 mbox, u32 val)
+sandybridge_pcode_write(struct drm_i915_private *dev_priv, u8 mbox, u32 val)
{
int retries;
rw_assert_wrlock(&dev_priv->rps.hw_lock);
diff --git a/sys/dev/pci/drm/i915/intel_ringbuffer.c b/sys/dev/pci/drm/i915/intel_ringbuffer.c
index b57048535fc..aedb3c2ee6f 100644
--- a/sys/dev/pci/drm/i915/intel_ringbuffer.c
+++ b/sys/dev/pci/drm/i915/intel_ringbuffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_ringbuffer.c,v 1.3 2013/05/05 13:55:36 kettenis Exp $ */
+/* $OpenBSD: intel_ringbuffer.c,v 1.4 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2008-2010 Intel Corporation
*
@@ -582,7 +582,7 @@ int
init_render_ring(struct intel_ring_buffer *ring)
{
struct drm_device *dev = ring->dev;
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int ret = init_ring_common(ring);
if (INTEL_INFO(dev)->gen > 3)
@@ -1209,7 +1209,7 @@ err:
int
init_phys_hws_pga(struct intel_ring_buffer *ring)
{
- drm_i915_private_t *dev_priv = ring->dev->dev_private;
+ struct drm_i915_private *dev_priv = ring->dev->dev_private;
u32 addr;
if (!dev_priv->status_page_dmah) {
@@ -1263,7 +1263,7 @@ intel_init_ring_buffer(struct drm_device *dev,
struct intel_ring_buffer *ring)
{
struct drm_i915_gem_object *obj;
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
int ret;
ring->dev = dev;
@@ -1338,7 +1338,7 @@ err_hws:
void
intel_cleanup_ring_buffer(struct intel_ring_buffer *ring)
{
- drm_i915_private_t *dev_priv;
+ struct drm_i915_private *dev_priv;
int ret;
if (ring->obj == NULL)
@@ -1451,7 +1451,7 @@ int
ring_wait_for_space(struct intel_ring_buffer *ring, int n)
{
struct drm_device *dev = ring->dev;
- drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long end;
int ret;
@@ -1581,7 +1581,7 @@ intel_ring_begin(struct intel_ring_buffer *ring, int num_dwords)
void
intel_ring_advance(struct intel_ring_buffer *ring)
{
- drm_i915_private_t *dev_priv = ring->dev->dev_private;
+ struct drm_i915_private *dev_priv = ring->dev->dev_private;
ring->tail &= ring->size - 1;
if (dev_priv->stop_rings & intel_ring_flag(ring))
diff --git a/sys/dev/pci/drm/i915/intel_sdvo.c b/sys/dev/pci/drm/i915/intel_sdvo.c
index 5e12657fd3f..a8431aaa3e7 100644
--- a/sys/dev/pci/drm/i915/intel_sdvo.c
+++ b/sys/dev/pci/drm/i915/intel_sdvo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_sdvo.c,v 1.8 2013/07/04 09:45:05 jsg Exp $ */
+/* $OpenBSD: intel_sdvo.c,v 1.9 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright 2006 Dave Airlie <airlied@linux.ie>
* Copyright © 2006-2007 Intel Corporation
@@ -277,9 +277,9 @@ int intel_sdvo_set_property(struct drm_connector *,
struct drm_property *, uint64_t);
void intel_sdvo_enc_destroy(struct drm_encoder *);
void intel_sdvo_guess_ddc_bus(struct intel_sdvo *);
-void intel_sdvo_select_ddc_bus(struct inteldrm_softc *,
+void intel_sdvo_select_ddc_bus(struct drm_i915_private *,
struct intel_sdvo *, u32);
-void intel_sdvo_select_i2c_bus(struct inteldrm_softc *,
+void intel_sdvo_select_i2c_bus(struct drm_i915_private *,
struct intel_sdvo *, u32);
bool intel_sdvo_is_hdmi_connector(struct intel_sdvo *, int);
void intel_sdvo_connector_init(struct intel_sdvo_connector *,
@@ -360,7 +360,7 @@ void
intel_sdvo_write_sdvox(struct intel_sdvo *intel_sdvo, u32 val)
{
struct drm_device *dev = intel_sdvo->base.base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 bval = val, cval = val;
int i;
@@ -1244,7 +1244,7 @@ intel_sdvo_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode)
{
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc = encoder->crtc;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_sdvo *intel_sdvo = to_intel_sdvo(encoder);
@@ -1385,7 +1385,7 @@ intel_sdvo_get_hw_state(struct intel_encoder *encoder,
enum pipe *pipe)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_sdvo *intel_sdvo = to_intel_sdvo(&encoder->base);
u16 active_outputs;
u32 tmp;
@@ -1407,7 +1407,7 @@ intel_sdvo_get_hw_state(struct intel_encoder *encoder,
void
intel_disable_sdvo(struct intel_encoder *encoder)
{
- struct inteldrm_softc *dev_priv = encoder->base.dev->dev_private;
+ struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
struct intel_sdvo *intel_sdvo = to_intel_sdvo(&encoder->base);
u32 temp;
@@ -1450,7 +1450,7 @@ void
intel_enable_sdvo(struct intel_encoder *encoder)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_sdvo *intel_sdvo = to_intel_sdvo(&encoder->base);
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
u32 temp;
@@ -1646,7 +1646,7 @@ intel_sdvo_get_edid(struct drm_connector *connector)
struct edid *
intel_sdvo_get_analog_edid(struct drm_connector *connector)
{
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
return drm_get_edid(connector,
intel_gmbus_get_adapter(dev_priv,
@@ -1925,7 +1925,7 @@ void
intel_sdvo_get_lvds_modes(struct drm_connector *connector)
{
struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
struct drm_display_mode *newmode;
/*
@@ -2061,7 +2061,7 @@ intel_sdvo_set_property(struct drm_connector *connector,
{
struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector);
- struct inteldrm_softc *dev_priv = connector->dev->dev_private;
+ struct drm_i915_private *dev_priv = connector->dev->dev_private;
uint16_t temp_value;
uint8_t cmd;
int ret;
@@ -2285,7 +2285,7 @@ intel_sdvo_guess_ddc_bus(struct intel_sdvo *sdvo)
* outputs, then LVDS outputs.
*/
void
-intel_sdvo_select_ddc_bus(struct inteldrm_softc *dev_priv,
+intel_sdvo_select_ddc_bus(struct drm_i915_private *dev_priv,
struct intel_sdvo *sdvo, u32 reg)
{
struct sdvo_device_mapping *mapping;
@@ -2302,7 +2302,7 @@ intel_sdvo_select_ddc_bus(struct inteldrm_softc *dev_priv,
}
void
-intel_sdvo_select_i2c_bus(struct inteldrm_softc *dev_priv,
+intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
struct intel_sdvo *sdvo, u32 reg)
{
struct sdvo_device_mapping *mapping;
@@ -2342,7 +2342,7 @@ intel_sdvo_is_hdmi_connector(struct intel_sdvo *intel_sdvo, int device)
u8
intel_sdvo_get_slave_addr(struct drm_device *dev, struct intel_sdvo *sdvo)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct sdvo_device_mapping *my_mapping, *other_mapping;
if (sdvo->is_sdvob) {
@@ -2928,7 +2928,7 @@ intel_sdvo_init_ddc_proxy(struct intel_sdvo *sdvo,
bool
intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_encoder *intel_encoder;
struct intel_sdvo *intel_sdvo;
u32 hotplug_mask;
diff --git a/sys/dev/pci/drm/i915/intel_sprite.c b/sys/dev/pci/drm/i915/intel_sprite.c
index a097fb57d9b..e352973f798 100644
--- a/sys/dev/pci/drm/i915/intel_sprite.c
+++ b/sys/dev/pci/drm/i915/intel_sprite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_sprite.c,v 1.1 2013/03/18 12:36:52 jsg Exp $ */
+/* $OpenBSD: intel_sprite.c,v 1.2 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2011 Intel Corporation
*
@@ -77,7 +77,7 @@ ivb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
uint32_t src_w, uint32_t src_h)
{
struct drm_device *dev = plane->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_plane *intel_plane = to_intel_plane(plane);
int pipe = intel_plane->pipe;
u32 sprctl, sprscale = 0;
@@ -180,7 +180,7 @@ void
ivb_disable_plane(struct drm_plane *plane)
{
struct drm_device *dev = plane->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_plane *intel_plane = to_intel_plane(plane);
int pipe = intel_plane->pipe;
@@ -201,7 +201,7 @@ ivb_update_colorkey(struct drm_plane *plane,
struct drm_intel_sprite_colorkey *key)
{
struct drm_device *dev = plane->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_plane *intel_plane;
u32 sprctl;
int ret = 0;
@@ -229,7 +229,7 @@ void
ivb_get_colorkey(struct drm_plane *plane, struct drm_intel_sprite_colorkey *key)
{
struct drm_device *dev = plane->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_plane *intel_plane;
u32 sprctl;
@@ -258,7 +258,7 @@ ilk_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
uint32_t src_w, uint32_t src_h)
{
struct drm_device *dev = plane->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_plane *intel_plane = to_intel_plane(plane);
int pipe = intel_plane->pipe;
unsigned long dvssurf_offset, linear_offset;
@@ -340,7 +340,7 @@ void
ilk_disable_plane(struct drm_plane *plane)
{
struct drm_device *dev = plane->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_plane *intel_plane = to_intel_plane(plane);
int pipe = intel_plane->pipe;
@@ -356,7 +356,7 @@ void
intel_enable_primary(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int reg = DSPCNTR(intel_crtc->plane);
@@ -373,7 +373,7 @@ void
intel_disable_primary(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int reg = DSPCNTR(intel_crtc->plane);
@@ -391,7 +391,7 @@ ilk_update_colorkey(struct drm_plane *plane,
struct drm_intel_sprite_colorkey *key)
{
struct drm_device *dev = plane->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_plane *intel_plane;
u32 dvscntr;
int ret = 0;
@@ -419,7 +419,7 @@ void
ilk_get_colorkey(struct drm_plane *plane, struct drm_intel_sprite_colorkey *key)
{
struct drm_device *dev = plane->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_plane *intel_plane;
u32 dvscntr;
@@ -448,7 +448,7 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
uint32_t src_w, uint32_t src_h)
{
struct drm_device *dev = plane->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_plane *intel_plane = to_intel_plane(plane);
struct intel_framebuffer *intel_fb;
diff --git a/sys/dev/pci/drm/i915/intel_tv.c b/sys/dev/pci/drm/i915/intel_tv.c
index 339f298b498..0872e659a4b 100644
--- a/sys/dev/pci/drm/i915/intel_tv.c
+++ b/sys/dev/pci/drm/i915/intel_tv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_tv.c,v 1.1 2013/03/18 12:36:52 jsg Exp $ */
+/* $OpenBSD: intel_tv.c,v 1.2 2013/07/05 07:20:27 jsg Exp $ */
/*
* Copyright © 2006-2008 Intel Corporation
* Jesse Barnes <jesse.barnes@intel.com>
@@ -867,7 +867,7 @@ bool
intel_tv_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 tmp = I915_READ(TV_CTL);
if (!(tmp & TV_ENC_ENABLE))
@@ -882,7 +882,7 @@ void
intel_enable_tv(struct intel_encoder *encoder)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(TV_CTL, I915_READ(TV_CTL) | TV_ENC_ENABLE);
}
@@ -891,7 +891,7 @@ void
intel_disable_tv(struct intel_encoder *encoder)
{
struct drm_device *dev = encoder->base.dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(TV_CTL, I915_READ(TV_CTL) & ~TV_ENC_ENABLE);
}
@@ -955,7 +955,7 @@ intel_tv_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc = encoder->crtc;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_tv *intel_tv = enc_to_intel_tv(encoder);
@@ -1198,7 +1198,7 @@ intel_tv_detect_type(struct intel_tv *intel_tv,
struct drm_crtc *crtc = encoder->crtc;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct drm_device *dev = encoder->dev;
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
u32 tv_ctl, save_tv_ctl;
u32 tv_dac, save_tv_dac;
int type;
@@ -1549,7 +1549,7 @@ static const struct drm_encoder_funcs intel_tv_enc_funcs = {
int
tv_is_present_in_vbt(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct child_device_config *p_child;
int i, ret;
@@ -1579,7 +1579,7 @@ tv_is_present_in_vbt(struct drm_device *dev)
void
intel_tv_init(struct drm_device *dev)
{
- struct inteldrm_softc *dev_priv = dev->dev_private;
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_connector *connector;
struct intel_tv *intel_tv;
struct intel_encoder *intel_encoder;