Commit 2d1013dd authored by Jani Nikula's avatar Jani Nikula Committed by Daniel Vetter

drm/i915/irq: prefer struct drm_i915_private to drm_i915_private_t

Also drop any unnecessary casts. No functional changes.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 3e31c6c0
...@@ -82,7 +82,7 @@ static const u32 hpd_status_i915[] = { /* i915 and valleyview are the same */ ...@@ -82,7 +82,7 @@ static const u32 hpd_status_i915[] = { /* i915 and valleyview are the same */
/* For display hotplug interrupt */ /* For display hotplug interrupt */
static void static void
ironlake_enable_display_irq(drm_i915_private_t *dev_priv, u32 mask) ironlake_enable_display_irq(struct drm_i915_private *dev_priv, u32 mask)
{ {
assert_spin_locked(&dev_priv->irq_lock); assert_spin_locked(&dev_priv->irq_lock);
...@@ -100,7 +100,7 @@ ironlake_enable_display_irq(drm_i915_private_t *dev_priv, u32 mask) ...@@ -100,7 +100,7 @@ ironlake_enable_display_irq(drm_i915_private_t *dev_priv, u32 mask)
} }
static void static void
ironlake_disable_display_irq(drm_i915_private_t *dev_priv, u32 mask) ironlake_disable_display_irq(struct drm_i915_private *dev_priv, u32 mask)
{ {
assert_spin_locked(&dev_priv->irq_lock); assert_spin_locked(&dev_priv->irq_lock);
...@@ -596,7 +596,7 @@ i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe, ...@@ -596,7 +596,7 @@ i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,
*/ */
static void i915_enable_asle_pipestat(struct drm_device *dev) static void i915_enable_asle_pipestat(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
if (!dev_priv->opregion.asle || !IS_MOBILE(dev)) if (!dev_priv->opregion.asle || !IS_MOBILE(dev))
...@@ -624,7 +624,7 @@ static void i915_enable_asle_pipestat(struct drm_device *dev) ...@@ -624,7 +624,7 @@ static void i915_enable_asle_pipestat(struct drm_device *dev)
static int static int
i915_pipe_enabled(struct drm_device *dev, int pipe) i915_pipe_enabled(struct drm_device *dev, int pipe)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
if (drm_core_check_feature(dev, DRIVER_MODESET)) { if (drm_core_check_feature(dev, DRIVER_MODESET)) {
/* Locking is horribly broken here, but whatever. */ /* Locking is horribly broken here, but whatever. */
...@@ -648,7 +648,7 @@ static u32 i8xx_get_vblank_counter(struct drm_device *dev, int pipe) ...@@ -648,7 +648,7 @@ static u32 i8xx_get_vblank_counter(struct drm_device *dev, int pipe)
*/ */
static u32 i915_get_vblank_counter(struct drm_device *dev, int pipe) static u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long high_frame; unsigned long high_frame;
unsigned long low_frame; unsigned long low_frame;
u32 high1, high2, low, pixel, vbl_start; u32 high1, high2, low, pixel, vbl_start;
...@@ -704,7 +704,7 @@ static u32 i915_get_vblank_counter(struct drm_device *dev, int pipe) ...@@ -704,7 +704,7 @@ static u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)
static u32 gm45_get_vblank_counter(struct drm_device *dev, int pipe) static u32 gm45_get_vblank_counter(struct drm_device *dev, int pipe)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int reg = PIPE_FRMCOUNT_GM45(pipe); int reg = PIPE_FRMCOUNT_GM45(pipe);
if (!i915_pipe_enabled(dev, pipe)) { if (!i915_pipe_enabled(dev, pipe)) {
...@@ -959,8 +959,8 @@ static bool intel_hpd_irq_event(struct drm_device *dev, ...@@ -959,8 +959,8 @@ static bool intel_hpd_irq_event(struct drm_device *dev,
static void i915_hotplug_work_func(struct work_struct *work) static void i915_hotplug_work_func(struct work_struct *work)
{ {
drm_i915_private_t *dev_priv = container_of(work, drm_i915_private_t, struct drm_i915_private *dev_priv =
hotplug_work); container_of(work, struct drm_i915_private, hotplug_work);
struct drm_device *dev = dev_priv->dev; struct drm_device *dev = dev_priv->dev;
struct drm_mode_config *mode_config = &dev->mode_config; struct drm_mode_config *mode_config = &dev->mode_config;
struct intel_connector *intel_connector; struct intel_connector *intel_connector;
...@@ -1035,7 +1035,7 @@ static void intel_hpd_irq_uninstall(struct drm_i915_private *dev_priv) ...@@ -1035,7 +1035,7 @@ static void intel_hpd_irq_uninstall(struct drm_i915_private *dev_priv)
static void ironlake_rps_change_irq_handler(struct drm_device *dev) static void ironlake_rps_change_irq_handler(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 busy_up, busy_down, max_avg, min_avg; u32 busy_up, busy_down, max_avg, min_avg;
u8 new_delay; u8 new_delay;
...@@ -1086,8 +1086,8 @@ static void notify_ring(struct drm_device *dev, ...@@ -1086,8 +1086,8 @@ static void notify_ring(struct drm_device *dev,
static void gen6_pm_rps_work(struct work_struct *work) static void gen6_pm_rps_work(struct work_struct *work)
{ {
drm_i915_private_t *dev_priv = container_of(work, drm_i915_private_t, struct drm_i915_private *dev_priv =
rps.work); container_of(work, struct drm_i915_private, rps.work);
u32 pm_iir; u32 pm_iir;
int new_delay, adj; int new_delay, adj;
...@@ -1165,8 +1165,8 @@ static void gen6_pm_rps_work(struct work_struct *work) ...@@ -1165,8 +1165,8 @@ static void gen6_pm_rps_work(struct work_struct *work)
*/ */
static void ivybridge_parity_work(struct work_struct *work) static void ivybridge_parity_work(struct work_struct *work)
{ {
drm_i915_private_t *dev_priv = container_of(work, drm_i915_private_t, struct drm_i915_private *dev_priv =
l3_parity.error_work); container_of(work, struct drm_i915_private, l3_parity.error_work);
u32 error_status, row, bank, subbank; u32 error_status, row, bank, subbank;
char *parity_event[6]; char *parity_event[6];
uint32_t misccpctl; uint32_t misccpctl;
...@@ -1238,7 +1238,7 @@ static void ivybridge_parity_work(struct work_struct *work) ...@@ -1238,7 +1238,7 @@ static void ivybridge_parity_work(struct work_struct *work)
static void ivybridge_parity_error_irq_handler(struct drm_device *dev, u32 iir) static void ivybridge_parity_error_irq_handler(struct drm_device *dev, u32 iir)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
if (!HAS_L3_DPF(dev)) if (!HAS_L3_DPF(dev))
return; return;
...@@ -1349,7 +1349,7 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev, ...@@ -1349,7 +1349,7 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev,
u32 hotplug_trigger, u32 hotplug_trigger,
const u32 *hpd) const u32 *hpd)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int i; int i;
bool storm_detected = false; bool storm_detected = false;
...@@ -1405,14 +1405,14 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev, ...@@ -1405,14 +1405,14 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev,
static void gmbus_irq_handler(struct drm_device *dev) static void gmbus_irq_handler(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
wake_up_all(&dev_priv->gmbus_wait_queue); wake_up_all(&dev_priv->gmbus_wait_queue);
} }
static void dp_aux_irq_handler(struct drm_device *dev) static void dp_aux_irq_handler(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
wake_up_all(&dev_priv->gmbus_wait_queue); wake_up_all(&dev_priv->gmbus_wait_queue);
} }
...@@ -1612,7 +1612,7 @@ static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir) ...@@ -1612,7 +1612,7 @@ static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir)
static irqreturn_t valleyview_irq_handler(int irq, void *arg) static irqreturn_t valleyview_irq_handler(int irq, void *arg)
{ {
struct drm_device *dev = (struct drm_device *) arg; struct drm_device *dev = (struct drm_device *) arg;
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 iir, gt_iir, pm_iir; u32 iir, gt_iir, pm_iir;
irqreturn_t ret = IRQ_NONE; irqreturn_t ret = IRQ_NONE;
...@@ -1659,7 +1659,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg) ...@@ -1659,7 +1659,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg)
static void ibx_irq_handler(struct drm_device *dev, u32 pch_iir) static void ibx_irq_handler(struct drm_device *dev, u32 pch_iir)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK; u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK;
...@@ -1766,7 +1766,7 @@ static void cpt_serr_int_handler(struct drm_device *dev) ...@@ -1766,7 +1766,7 @@ static void cpt_serr_int_handler(struct drm_device *dev)
static void cpt_irq_handler(struct drm_device *dev, u32 pch_iir) static void cpt_irq_handler(struct drm_device *dev, u32 pch_iir)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK_CPT; u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK_CPT;
...@@ -1890,7 +1890,7 @@ static void ivb_display_irq_handler(struct drm_device *dev, u32 de_iir) ...@@ -1890,7 +1890,7 @@ static void ivb_display_irq_handler(struct drm_device *dev, u32 de_iir)
static irqreturn_t ironlake_irq_handler(int irq, void *arg) static irqreturn_t ironlake_irq_handler(int irq, void *arg)
{ {
struct drm_device *dev = (struct drm_device *) arg; struct drm_device *dev = (struct drm_device *) arg;
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 de_iir, gt_iir, de_ier, sde_ier = 0; u32 de_iir, gt_iir, de_ier, sde_ier = 0;
irqreturn_t ret = IRQ_NONE; irqreturn_t ret = IRQ_NONE;
...@@ -2101,8 +2101,8 @@ static void i915_error_work_func(struct work_struct *work) ...@@ -2101,8 +2101,8 @@ static void i915_error_work_func(struct work_struct *work)
{ {
struct i915_gpu_error *error = container_of(work, struct i915_gpu_error, struct i915_gpu_error *error = container_of(work, struct i915_gpu_error,
work); work);
drm_i915_private_t *dev_priv = container_of(error, drm_i915_private_t, struct drm_i915_private *dev_priv =
gpu_error); container_of(error, struct drm_i915_private, gpu_error);
struct drm_device *dev = dev_priv->dev; struct drm_device *dev = dev_priv->dev;
char *error_event[] = { I915_ERROR_UEVENT "=1", NULL }; char *error_event[] = { I915_ERROR_UEVENT "=1", NULL };
char *reset_event[] = { I915_RESET_UEVENT "=1", NULL }; char *reset_event[] = { I915_RESET_UEVENT "=1", NULL };
...@@ -2311,7 +2311,7 @@ void i915_handle_error(struct drm_device *dev, bool wedged, ...@@ -2311,7 +2311,7 @@ void i915_handle_error(struct drm_device *dev, bool wedged,
static void __always_unused i915_pageflip_stall_check(struct drm_device *dev, int pipe) static void __always_unused i915_pageflip_stall_check(struct drm_device *dev, int pipe)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe]; struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe];
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct drm_i915_gem_object *obj; struct drm_i915_gem_object *obj;
...@@ -2360,7 +2360,7 @@ static void __always_unused i915_pageflip_stall_check(struct drm_device *dev, in ...@@ -2360,7 +2360,7 @@ static void __always_unused i915_pageflip_stall_check(struct drm_device *dev, in
*/ */
static int i915_enable_vblank(struct drm_device *dev, int pipe) static int i915_enable_vblank(struct drm_device *dev, int pipe)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
if (!i915_pipe_enabled(dev, pipe)) if (!i915_pipe_enabled(dev, pipe))
...@@ -2384,7 +2384,7 @@ static int i915_enable_vblank(struct drm_device *dev, int pipe) ...@@ -2384,7 +2384,7 @@ static int i915_enable_vblank(struct drm_device *dev, int pipe)
static int ironlake_enable_vblank(struct drm_device *dev, int pipe) static int ironlake_enable_vblank(struct drm_device *dev, int pipe)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
uint32_t bit = (INTEL_INFO(dev)->gen >= 7) ? DE_PIPE_VBLANK_IVB(pipe) : uint32_t bit = (INTEL_INFO(dev)->gen >= 7) ? DE_PIPE_VBLANK_IVB(pipe) :
DE_PIPE_VBLANK(pipe); DE_PIPE_VBLANK(pipe);
...@@ -2401,7 +2401,7 @@ static int ironlake_enable_vblank(struct drm_device *dev, int pipe) ...@@ -2401,7 +2401,7 @@ static int ironlake_enable_vblank(struct drm_device *dev, int pipe)
static int valleyview_enable_vblank(struct drm_device *dev, int pipe) static int valleyview_enable_vblank(struct drm_device *dev, int pipe)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
if (!i915_pipe_enabled(dev, pipe)) if (!i915_pipe_enabled(dev, pipe))
...@@ -2436,7 +2436,7 @@ static int gen8_enable_vblank(struct drm_device *dev, int pipe) ...@@ -2436,7 +2436,7 @@ static int gen8_enable_vblank(struct drm_device *dev, int pipe)
*/ */
static void i915_disable_vblank(struct drm_device *dev, int pipe) static void i915_disable_vblank(struct drm_device *dev, int pipe)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
spin_lock_irqsave(&dev_priv->irq_lock, irqflags); spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
...@@ -2451,7 +2451,7 @@ static void i915_disable_vblank(struct drm_device *dev, int pipe) ...@@ -2451,7 +2451,7 @@ static void i915_disable_vblank(struct drm_device *dev, int pipe)
static void ironlake_disable_vblank(struct drm_device *dev, int pipe) static void ironlake_disable_vblank(struct drm_device *dev, int pipe)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
uint32_t bit = (INTEL_INFO(dev)->gen >= 7) ? DE_PIPE_VBLANK_IVB(pipe) : uint32_t bit = (INTEL_INFO(dev)->gen >= 7) ? DE_PIPE_VBLANK_IVB(pipe) :
DE_PIPE_VBLANK(pipe); DE_PIPE_VBLANK(pipe);
...@@ -2463,7 +2463,7 @@ static void ironlake_disable_vblank(struct drm_device *dev, int pipe) ...@@ -2463,7 +2463,7 @@ static void ironlake_disable_vblank(struct drm_device *dev, int pipe)
static void valleyview_disable_vblank(struct drm_device *dev, int pipe) static void valleyview_disable_vblank(struct drm_device *dev, int pipe)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
spin_lock_irqsave(&dev_priv->irq_lock, irqflags); spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
...@@ -2630,7 +2630,7 @@ ring_stuck(struct intel_ring_buffer *ring, u64 acthd) ...@@ -2630,7 +2630,7 @@ ring_stuck(struct intel_ring_buffer *ring, u64 acthd)
static void i915_hangcheck_elapsed(unsigned long data) static void i915_hangcheck_elapsed(unsigned long data)
{ {
struct drm_device *dev = (struct drm_device *)data; struct drm_device *dev = (struct drm_device *)data;
drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_ring_buffer *ring; struct intel_ring_buffer *ring;
int i; int i;
int busy_count = 0, rings_hung = 0; int busy_count = 0, rings_hung = 0;
...@@ -2789,7 +2789,7 @@ static void gen5_gt_irq_preinstall(struct drm_device *dev) ...@@ -2789,7 +2789,7 @@ static void gen5_gt_irq_preinstall(struct drm_device *dev)
*/ */
static void ironlake_irq_preinstall(struct drm_device *dev) static void ironlake_irq_preinstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
I915_WRITE(HWSTAM, 0xeffe); I915_WRITE(HWSTAM, 0xeffe);
...@@ -2804,7 +2804,7 @@ static void ironlake_irq_preinstall(struct drm_device *dev) ...@@ -2804,7 +2804,7 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
static void valleyview_irq_preinstall(struct drm_device *dev) static void valleyview_irq_preinstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
/* VLV magic */ /* VLV magic */
...@@ -2880,7 +2880,7 @@ static void gen8_irq_preinstall(struct drm_device *dev) ...@@ -2880,7 +2880,7 @@ static void gen8_irq_preinstall(struct drm_device *dev)
static void ibx_hpd_irq_setup(struct drm_device *dev) static void ibx_hpd_irq_setup(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_mode_config *mode_config = &dev->mode_config; struct drm_mode_config *mode_config = &dev->mode_config;
struct intel_encoder *intel_encoder; struct intel_encoder *intel_encoder;
u32 hotplug_irqs, hotplug, enabled_irqs = 0; u32 hotplug_irqs, hotplug, enabled_irqs = 0;
...@@ -2915,7 +2915,7 @@ static void ibx_hpd_irq_setup(struct drm_device *dev) ...@@ -2915,7 +2915,7 @@ static void ibx_hpd_irq_setup(struct drm_device *dev)
static void ibx_irq_postinstall(struct drm_device *dev) static void ibx_irq_postinstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 mask; u32 mask;
if (HAS_PCH_NOP(dev)) if (HAS_PCH_NOP(dev))
...@@ -2977,7 +2977,7 @@ static void gen5_gt_irq_postinstall(struct drm_device *dev) ...@@ -2977,7 +2977,7 @@ static void gen5_gt_irq_postinstall(struct drm_device *dev)
static int ironlake_irq_postinstall(struct drm_device *dev) static int ironlake_irq_postinstall(struct drm_device *dev)
{ {
unsigned long irqflags; unsigned long irqflags;
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 display_mask, extra_mask; u32 display_mask, extra_mask;
if (INTEL_INFO(dev)->gen >= 7) { if (INTEL_INFO(dev)->gen >= 7) {
...@@ -3114,7 +3114,7 @@ void valleyview_disable_display_irqs(struct drm_i915_private *dev_priv) ...@@ -3114,7 +3114,7 @@ void valleyview_disable_display_irqs(struct drm_i915_private *dev_priv)
static int valleyview_irq_postinstall(struct drm_device *dev) static int valleyview_irq_postinstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
dev_priv->irq_mask = ~0; dev_priv->irq_mask = ~0;
...@@ -3261,7 +3261,7 @@ static void gen8_irq_uninstall(struct drm_device *dev) ...@@ -3261,7 +3261,7 @@ static void gen8_irq_uninstall(struct drm_device *dev)
static void valleyview_irq_uninstall(struct drm_device *dev) static void valleyview_irq_uninstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
int pipe; int pipe;
...@@ -3292,7 +3292,7 @@ static void valleyview_irq_uninstall(struct drm_device *dev) ...@@ -3292,7 +3292,7 @@ static void valleyview_irq_uninstall(struct drm_device *dev)
static void ironlake_irq_uninstall(struct drm_device *dev) static void ironlake_irq_uninstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
if (!dev_priv) if (!dev_priv)
return; return;
...@@ -3323,7 +3323,7 @@ static void ironlake_irq_uninstall(struct drm_device *dev) ...@@ -3323,7 +3323,7 @@ static void ironlake_irq_uninstall(struct drm_device *dev)
static void i8xx_irq_preinstall(struct drm_device * dev) static void i8xx_irq_preinstall(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
for_each_pipe(pipe) for_each_pipe(pipe)
...@@ -3335,7 +3335,7 @@ static void i8xx_irq_preinstall(struct drm_device * dev) ...@@ -3335,7 +3335,7 @@ static void i8xx_irq_preinstall(struct drm_device * dev)
static int i8xx_irq_postinstall(struct drm_device *dev) static int i8xx_irq_postinstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
I915_WRITE16(EMR, I915_WRITE16(EMR,
...@@ -3373,7 +3373,7 @@ static int i8xx_irq_postinstall(struct drm_device *dev) ...@@ -3373,7 +3373,7 @@ static int i8xx_irq_postinstall(struct drm_device *dev)
static bool i8xx_handle_vblank(struct drm_device *dev, static bool i8xx_handle_vblank(struct drm_device *dev,
int plane, int pipe, u32 iir) int plane, int pipe, u32 iir)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u16 flip_pending = DISPLAY_PLANE_FLIP_PENDING(plane); u16 flip_pending = DISPLAY_PLANE_FLIP_PENDING(plane);
if (!drm_handle_vblank(dev, pipe)) if (!drm_handle_vblank(dev, pipe))
...@@ -3401,7 +3401,7 @@ static bool i8xx_handle_vblank(struct drm_device *dev, ...@@ -3401,7 +3401,7 @@ static bool i8xx_handle_vblank(struct drm_device *dev,
static irqreturn_t i8xx_irq_handler(int irq, void *arg) static irqreturn_t i8xx_irq_handler(int irq, void *arg)
{ {
struct drm_device *dev = (struct drm_device *) arg; struct drm_device *dev = (struct drm_device *) arg;
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u16 iir, new_iir; u16 iir, new_iir;
u32 pipe_stats[2]; u32 pipe_stats[2];
unsigned long irqflags; unsigned long irqflags;
...@@ -3471,7 +3471,7 @@ static irqreturn_t i8xx_irq_handler(int irq, void *arg) ...@@ -3471,7 +3471,7 @@ static irqreturn_t i8xx_irq_handler(int irq, void *arg)
static void i8xx_irq_uninstall(struct drm_device * dev) static void i8xx_irq_uninstall(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
for_each_pipe(pipe) { for_each_pipe(pipe) {
...@@ -3486,7 +3486,7 @@ static void i8xx_irq_uninstall(struct drm_device * dev) ...@@ -3486,7 +3486,7 @@ static void i8xx_irq_uninstall(struct drm_device * dev)
static void i915_irq_preinstall(struct drm_device * dev) static void i915_irq_preinstall(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
if (I915_HAS_HOTPLUG(dev)) { if (I915_HAS_HOTPLUG(dev)) {
...@@ -3504,7 +3504,7 @@ static void i915_irq_preinstall(struct drm_device * dev) ...@@ -3504,7 +3504,7 @@ static void i915_irq_preinstall(struct drm_device * dev)
static int i915_irq_postinstall(struct drm_device *dev) static int i915_irq_postinstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 enable_mask; u32 enable_mask;
unsigned long irqflags; unsigned long irqflags;
...@@ -3558,7 +3558,7 @@ static int i915_irq_postinstall(struct drm_device *dev) ...@@ -3558,7 +3558,7 @@ static int i915_irq_postinstall(struct drm_device *dev)
static bool i915_handle_vblank(struct drm_device *dev, static bool i915_handle_vblank(struct drm_device *dev,
int plane, int pipe, u32 iir) int plane, int pipe, u32 iir)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 flip_pending = DISPLAY_PLANE_FLIP_PENDING(plane); u32 flip_pending = DISPLAY_PLANE_FLIP_PENDING(plane);
if (!drm_handle_vblank(dev, pipe)) if (!drm_handle_vblank(dev, pipe))
...@@ -3586,7 +3586,7 @@ static bool i915_handle_vblank(struct drm_device *dev, ...@@ -3586,7 +3586,7 @@ static bool i915_handle_vblank(struct drm_device *dev,
static irqreturn_t i915_irq_handler(int irq, void *arg) static irqreturn_t i915_irq_handler(int irq, void *arg)
{ {
struct drm_device *dev = (struct drm_device *) arg; struct drm_device *dev = (struct drm_device *) arg;
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 iir, new_iir, pipe_stats[I915_MAX_PIPES]; u32 iir, new_iir, pipe_stats[I915_MAX_PIPES];
unsigned long irqflags; unsigned long irqflags;
u32 flip_mask = u32 flip_mask =
...@@ -3692,7 +3692,7 @@ static irqreturn_t i915_irq_handler(int irq, void *arg) ...@@ -3692,7 +3692,7 @@ static irqreturn_t i915_irq_handler(int irq, void *arg)
static void i915_irq_uninstall(struct drm_device * dev) static void i915_irq_uninstall(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
intel_hpd_irq_uninstall(dev_priv); intel_hpd_irq_uninstall(dev_priv);
...@@ -3716,7 +3716,7 @@ static void i915_irq_uninstall(struct drm_device * dev) ...@@ -3716,7 +3716,7 @@ static void i915_irq_uninstall(struct drm_device * dev)
static void i965_irq_preinstall(struct drm_device * dev) static void i965_irq_preinstall(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
I915_WRITE(PORT_HOTPLUG_EN, 0); I915_WRITE(PORT_HOTPLUG_EN, 0);
...@@ -3732,7 +3732,7 @@ static void i965_irq_preinstall(struct drm_device * dev) ...@@ -3732,7 +3732,7 @@ static void i965_irq_preinstall(struct drm_device * dev)
static int i965_irq_postinstall(struct drm_device *dev) static int i965_irq_postinstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 enable_mask; u32 enable_mask;
u32 error_mask; u32 error_mask;
unsigned long irqflags; unsigned long irqflags;
...@@ -3791,7 +3791,7 @@ static int i965_irq_postinstall(struct drm_device *dev) ...@@ -3791,7 +3791,7 @@ static int i965_irq_postinstall(struct drm_device *dev)
static void i915_hpd_irq_setup(struct drm_device *dev) static void i915_hpd_irq_setup(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_mode_config *mode_config = &dev->mode_config; struct drm_mode_config *mode_config = &dev->mode_config;
struct intel_encoder *intel_encoder; struct intel_encoder *intel_encoder;
u32 hotplug_en; u32 hotplug_en;
...@@ -3823,7 +3823,7 @@ static void i915_hpd_irq_setup(struct drm_device *dev) ...@@ -3823,7 +3823,7 @@ static void i915_hpd_irq_setup(struct drm_device *dev)
static irqreturn_t i965_irq_handler(int irq, void *arg) static irqreturn_t i965_irq_handler(int irq, void *arg)
{ {
struct drm_device *dev = (struct drm_device *) arg; struct drm_device *dev = (struct drm_device *) arg;
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 iir, new_iir; u32 iir, new_iir;
u32 pipe_stats[I915_MAX_PIPES]; u32 pipe_stats[I915_MAX_PIPES];
unsigned long irqflags; unsigned long irqflags;
...@@ -3941,7 +3941,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) ...@@ -3941,7 +3941,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg)
static void i965_irq_uninstall(struct drm_device * dev) static void i965_irq_uninstall(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
if (!dev_priv) if (!dev_priv)
...@@ -3966,7 +3966,7 @@ static void i965_irq_uninstall(struct drm_device * dev) ...@@ -3966,7 +3966,7 @@ static void i965_irq_uninstall(struct drm_device * dev)
static void intel_hpd_irq_reenable(unsigned long data) static void intel_hpd_irq_reenable(unsigned long data)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *)data; struct drm_i915_private *dev_priv = (struct drm_i915_private *)data;
struct drm_device *dev = dev_priv->dev; struct drm_device *dev = dev_priv->dev;
struct drm_mode_config *mode_config = &dev->mode_config; struct drm_mode_config *mode_config = &dev->mode_config;
unsigned long irqflags; unsigned long irqflags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment