mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
drm/i915: Relocate intel_hpd_{enabled,hotplug}_irqs()
Move intel_hpd_{enabled,hotplug}_irqs() closes to the beginning of the file so we can use them in more places. No functional changes. Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-13-ville.syrjala@linux.intel.com
This commit is contained in:
parent
9701135950
commit
a0e066b8de
1 changed files with 25 additions and 25 deletions
|
@ -1205,6 +1205,31 @@ static void intel_get_hpd_pins(struct drm_i915_private *dev_priv,
|
|||
|
||||
}
|
||||
|
||||
static u32 intel_hpd_enabled_irqs(struct drm_i915_private *dev_priv,
|
||||
const u32 hpd[HPD_NUM_PINS])
|
||||
{
|
||||
struct intel_encoder *encoder;
|
||||
u32 enabled_irqs = 0;
|
||||
|
||||
for_each_intel_encoder(&dev_priv->drm, encoder)
|
||||
if (dev_priv->hotplug.stats[encoder->hpd_pin].state == HPD_ENABLED)
|
||||
enabled_irqs |= hpd[encoder->hpd_pin];
|
||||
|
||||
return enabled_irqs;
|
||||
}
|
||||
|
||||
static u32 intel_hpd_hotplug_irqs(struct drm_i915_private *dev_priv,
|
||||
const u32 hpd[HPD_NUM_PINS])
|
||||
{
|
||||
struct intel_encoder *encoder;
|
||||
u32 hotplug_irqs = 0;
|
||||
|
||||
for_each_intel_encoder(&dev_priv->drm, encoder)
|
||||
hotplug_irqs |= hpd[encoder->hpd_pin];
|
||||
|
||||
return hotplug_irqs;
|
||||
}
|
||||
|
||||
static void gmbus_irq_handler(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
wake_up_all(&dev_priv->gmbus_wait_queue);
|
||||
|
@ -3145,31 +3170,6 @@ static void cherryview_irq_reset(struct drm_i915_private *dev_priv)
|
|||
spin_unlock_irq(&dev_priv->irq_lock);
|
||||
}
|
||||
|
||||
static u32 intel_hpd_enabled_irqs(struct drm_i915_private *dev_priv,
|
||||
const u32 hpd[HPD_NUM_PINS])
|
||||
{
|
||||
struct intel_encoder *encoder;
|
||||
u32 enabled_irqs = 0;
|
||||
|
||||
for_each_intel_encoder(&dev_priv->drm, encoder)
|
||||
if (dev_priv->hotplug.stats[encoder->hpd_pin].state == HPD_ENABLED)
|
||||
enabled_irqs |= hpd[encoder->hpd_pin];
|
||||
|
||||
return enabled_irqs;
|
||||
}
|
||||
|
||||
static u32 intel_hpd_hotplug_irqs(struct drm_i915_private *dev_priv,
|
||||
const u32 hpd[HPD_NUM_PINS])
|
||||
{
|
||||
struct intel_encoder *encoder;
|
||||
u32 hotplug_irqs = 0;
|
||||
|
||||
for_each_intel_encoder(&dev_priv->drm, encoder)
|
||||
hotplug_irqs |= hpd[encoder->hpd_pin];
|
||||
|
||||
return hotplug_irqs;
|
||||
}
|
||||
|
||||
static void ibx_hpd_detection_setup(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
u32 hotplug;
|
||||
|
|
Loading…
Add table
Reference in a new issue