Commit 77913b39 authored by Jani Nikula's avatar Jani Nikula Committed by Daniel Vetter

drm/i915: move generic hotplug code into new intel_hotplug.c file

We have enough generic hotplug functions sprinkled all over i915_irq.c
to warrant moving them to a file of their own. This should further
underline the distinction between generic code in the new file and
platform specific hotplug and irq code that remains in i915_irq.c.

Add new intel_hpd_init_work to keep work functions static, and rename
get_port_from_pin to intel_hpd_pin_to_port while increasing its
visibility, but keep everything else the same.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 10b0e9e9
...@@ -34,6 +34,7 @@ i915-y += i915_cmd_parser.o \ ...@@ -34,6 +34,7 @@ i915-y += i915_cmd_parser.o \
i915_gpu_error.o \ i915_gpu_error.o \
i915_irq.o \ i915_irq.o \
i915_trace_points.o \ i915_trace_points.o \
intel_hotplug.o \
intel_lrc.o \ intel_lrc.o \
intel_ringbuffer.o \ intel_ringbuffer.o \
intel_uncore.o intel_uncore.o
......
...@@ -541,21 +541,6 @@ bool i915_semaphore_is_enabled(struct drm_device *dev) ...@@ -541,21 +541,6 @@ bool i915_semaphore_is_enabled(struct drm_device *dev)
return true; return true;
} }
void intel_hpd_cancel_work(struct drm_i915_private *dev_priv)
{
spin_lock_irq(&dev_priv->irq_lock);
dev_priv->hotplug.long_port_mask = 0;
dev_priv->hotplug.short_port_mask = 0;
dev_priv->hotplug.event_bits = 0;
spin_unlock_irq(&dev_priv->irq_lock);
cancel_work_sync(&dev_priv->hotplug.dig_port_work);
cancel_work_sync(&dev_priv->hotplug.hotplug_work);
cancel_delayed_work_sync(&dev_priv->hotplug.reenable_work);
}
void i915_firmware_load_error_print(const char *fw_path, int err) void i915_firmware_load_error_print(const char *fw_path, int err)
{ {
DRM_ERROR("failed to load firmware %s (%d)\n", fw_path, err); DRM_ERROR("failed to load firmware %s (%d)\n", fw_path, err);
......
...@@ -2601,9 +2601,15 @@ extern unsigned long i915_mch_val(struct drm_i915_private *dev_priv); ...@@ -2601,9 +2601,15 @@ extern unsigned long i915_mch_val(struct drm_i915_private *dev_priv);
extern unsigned long i915_gfx_val(struct drm_i915_private *dev_priv); extern unsigned long i915_gfx_val(struct drm_i915_private *dev_priv);
extern void i915_update_gfx_val(struct drm_i915_private *dev_priv); extern void i915_update_gfx_val(struct drm_i915_private *dev_priv);
int vlv_force_gfx_clock(struct drm_i915_private *dev_priv, bool on); int vlv_force_gfx_clock(struct drm_i915_private *dev_priv, bool on);
void intel_hpd_cancel_work(struct drm_i915_private *dev_priv);
void i915_firmware_load_error_print(const char *fw_path, int err); void i915_firmware_load_error_print(const char *fw_path, int err);
/* intel_hotplug.c */
void intel_hpd_irq_handler(struct drm_device *dev, u32 pin_mask, u32 long_mask);
void intel_hpd_init(struct drm_i915_private *dev_priv);
void intel_hpd_init_work(struct drm_i915_private *dev_priv);
void intel_hpd_cancel_work(struct drm_i915_private *dev_priv);
enum port intel_hpd_pin_to_port(enum hpd_pin pin);
/* i915_irq.c */ /* i915_irq.c */
void i915_queue_hangcheck(struct drm_device *dev); void i915_queue_hangcheck(struct drm_device *dev);
__printf(3, 4) __printf(3, 4)
...@@ -2611,7 +2617,6 @@ void i915_handle_error(struct drm_device *dev, bool wedged, ...@@ -2611,7 +2617,6 @@ void i915_handle_error(struct drm_device *dev, bool wedged,
const char *fmt, ...); const char *fmt, ...);
extern void intel_irq_init(struct drm_i915_private *dev_priv); extern void intel_irq_init(struct drm_i915_private *dev_priv);
extern void intel_hpd_init(struct drm_i915_private *dev_priv);
int intel_irq_install(struct drm_i915_private *dev_priv); int intel_irq_install(struct drm_i915_private *dev_priv);
void intel_irq_uninstall(struct drm_i915_private *dev_priv); void intel_irq_uninstall(struct drm_i915_private *dev_priv);
......
This diff is collapsed.
This diff is collapsed.
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