drm/i915: Use symbolic irqreturn for ->hpd_pulse
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 23 Jan 2015 05:00:31 +0000 (06:00 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Jan 2015 08:51:14 +0000 (09:51 +0100)
Self-explanatory code is better code.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h

index 25b2299bc534e3f9158e4511e78b2a207cff6c1b..2399eaed2ca370f6cc276ce28f50adefb59f9f7d 100644 (file)
@@ -879,7 +879,7 @@ static void i915_digport_work_func(struct work_struct *work)
                container_of(work, struct drm_i915_private, dig_port_work);
        u32 long_port_mask, short_port_mask;
        struct intel_digital_port *intel_dig_port;
-       int i, ret;
+       int i;
        u32 old_bits = 0;
 
        spin_lock_irq(&dev_priv->irq_lock);
@@ -903,9 +903,11 @@ static void i915_digport_work_func(struct work_struct *work)
                        valid = true;
 
                if (valid) {
+                       enum irqreturn ret;
+
                        ret = intel_dig_port->hpd_pulse(intel_dig_port, long_hpd);
-                       if (ret == true) {
-                               /* if we get true fallback to old school hpd */
+                       if (ret == IRQ_NONE) {
+                               /* fall back to old school hpd */
                                old_bits |= (1 << intel_dig_port->base.hpd_pin);
                        }
                }
index b38d737b66181523f5e127f16d60fbe06e79abab..081eb36871907110f33eacb023e8e9990ae31960 100644 (file)
@@ -4421,7 +4421,7 @@ intel_dp_hot_plug(struct intel_encoder *intel_encoder)
        return;
 }
 
-bool
+enum irqreturn
 intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
 {
        struct intel_dp *intel_dp = &intel_dig_port->dp;
@@ -4429,7 +4429,7 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
        struct drm_device *dev = intel_dig_port->base.base.dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
        enum intel_display_power_domain power_domain;
-       bool ret = true;
+       enum irqreturn ret = IRQ_NONE;
 
        if (intel_dig_port->base.type != INTEL_OUTPUT_EDP)
                intel_dig_port->base.type = INTEL_OUTPUT_DISPLAYPORT;
@@ -4488,7 +4488,9 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
                        drm_modeset_unlock(&dev->mode_config.connection_mutex);
                }
        }
-       ret = false;
+
+       ret = IRQ_HANDLED;
+
        goto put_power;
 mst_fail:
        /* if we were in MST mode, and device is not there get out of MST mode */
index e957d4d938e7f05f11bbd5bc50a7268d5abd233a..04182ddc0927c63497e607318b1fcdd81fc0d15a 100644 (file)
@@ -650,7 +650,7 @@ struct intel_digital_port {
        u32 saved_port_bits;
        struct intel_dp dp;
        struct intel_hdmi hdmi;
-       bool (*hpd_pulse)(struct intel_digital_port *, bool);
+       enum irqreturn (*hpd_pulse)(struct intel_digital_port *, bool);
 };
 
 struct intel_dp_mst_encoder {
@@ -1008,8 +1008,8 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
 bool intel_dp_compute_config(struct intel_encoder *encoder,
                             struct intel_crtc_state *pipe_config);
 bool intel_dp_is_edp(struct drm_device *dev, enum port port);
-bool intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
-                       bool long_hpd);
+enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
+                                 bool long_hpd);
 void intel_edp_backlight_on(struct intel_dp *intel_dp);
 void intel_edp_backlight_off(struct intel_dp *intel_dp);
 void intel_edp_panel_vdd_on(struct intel_dp *intel_dp);