[alsa-devel] [PATCH 0/2] Update v4 -> v5 for i915 -> HDA patch set
Takashi mistakenly merged v4 instead of v5 of the patch set. This updates the code changes. (Not the docbook, I'm still fighting to get that to look right)
David Henningsson (2): drm/i915: Drop port_mst_index parameter from pin/eld callback drm/i915: Add locks around audio component bind/unbind
drivers/gpu/drm/i915/intel_audio.c | 8 ++++++-- include/drm/i915_component.h | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-)
The port_mst_index parameter was reserved for future use, but maintainers prefer to add it later when it is actually used.
Signed-off-by: David Henningsson david.henningsson@canonical.com --- drivers/gpu/drm/i915/intel_audio.c | 4 ++-- include/drm/i915_component.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index 969835d..2d52d96 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -424,7 +424,7 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder) dev_priv->display.audio_codec_enable(connector, intel_encoder, mode);
if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify) - acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port, 0); + acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port); }
/** @@ -447,7 +447,7 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder) dev_priv->display.audio_codec_disable(intel_encoder);
if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify) - acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port, 0); + acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port); }
/** diff --git a/include/drm/i915_component.h b/include/drm/i915_component.h index ab5bde37..b2d56dd 100644 --- a/include/drm/i915_component.h +++ b/include/drm/i915_component.h @@ -42,9 +42,8 @@ struct i915_audio_component { * pin sense and/or ELD information has changed. * @audio_ptr: HDA driver object * @port: Which port has changed (PORTA / PORTB / PORTC etc) - * @port_mst_index: Index within that port, for DisplayPort multistreaming */ - void (*pin_eld_notify)(void *audio_ptr, int port, int port_mst_index); + void (*pin_eld_notify)(void *audio_ptr, int port); } *audio_ops; };
On Thu, 03 Sep 2015 11:51:34 +0200, David Henningsson wrote:
The port_mst_index parameter was reserved for future use, but maintainers prefer to add it later when it is actually used.
Signed-off-by: David Henningsson david.henningsson@canonical.com
Applied, but also with the corresponding change in patch_hdmi.c (otherwise it breaks the build).
thanks,
Takashi
drivers/gpu/drm/i915/intel_audio.c | 4 ++-- include/drm/i915_component.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index 969835d..2d52d96 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -424,7 +424,7 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder) dev_priv->display.audio_codec_enable(connector, intel_encoder, mode);
if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify)
acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port, 0);
acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port);
}
/** @@ -447,7 +447,7 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder) dev_priv->display.audio_codec_disable(intel_encoder);
if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify)
acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port, 0);
acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port);
}
/** diff --git a/include/drm/i915_component.h b/include/drm/i915_component.h index ab5bde37..b2d56dd 100644 --- a/include/drm/i915_component.h +++ b/include/drm/i915_component.h @@ -42,9 +42,8 @@ struct i915_audio_component { * pin sense and/or ELD information has changed. * @audio_ptr: HDA driver object * @port: Which port has changed (PORTA / PORTB / PORTC etc)
*/* @port_mst_index: Index within that port, for DisplayPort multistreaming
void (*pin_eld_notify)(void *audio_ptr, int port, int port_mst_index);
} *audio_ops;void (*pin_eld_notify)(void *audio_ptr, int port);
};
-- 1.9.1
On 2015-09-03 12:07, Takashi Iwai wrote:
On Thu, 03 Sep 2015 11:51:34 +0200, David Henningsson wrote:
The port_mst_index parameter was reserved for future use, but maintainers prefer to add it later when it is actually used.
Signed-off-by: David Henningsson david.henningsson@canonical.com
Applied, but also with the corresponding change in patch_hdmi.c (otherwise it breaks the build).
Of course. Thanks for fixing that up.
thanks,
Takashi
drivers/gpu/drm/i915/intel_audio.c | 4 ++-- include/drm/i915_component.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index 969835d..2d52d96 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -424,7 +424,7 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder) dev_priv->display.audio_codec_enable(connector, intel_encoder, mode);
if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify)
acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port, 0);
acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port);
}
/**
@@ -447,7 +447,7 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder) dev_priv->display.audio_codec_disable(intel_encoder);
if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify)
acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port, 0);
acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port);
}
/**
diff --git a/include/drm/i915_component.h b/include/drm/i915_component.h index ab5bde37..b2d56dd 100644 --- a/include/drm/i915_component.h +++ b/include/drm/i915_component.h @@ -42,9 +42,8 @@ struct i915_audio_component { * pin sense and/or ELD information has changed. * @audio_ptr: HDA driver object * @port: Which port has changed (PORTA / PORTB / PORTC etc)
*/* @port_mst_index: Index within that port, for DisplayPort multistreaming
void (*pin_eld_notify)(void *audio_ptr, int port, int port_mst_index);
} *audio_ops; };void (*pin_eld_notify)(void *audio_ptr, int port);
-- 1.9.1
This will make sure that audio callbacks do not race with component bind/unbind.
Signed-off-by: David Henningsson david.henningsson@canonical.com --- drivers/gpu/drm/i915/intel_audio.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index 2d52d96..678a34f 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -543,9 +543,11 @@ static int i915_audio_component_bind(struct device *i915_dev, if (WARN_ON(acomp->ops || acomp->dev)) return -EEXIST;
+ drm_modeset_lock_all(dev_priv->dev); acomp->ops = &i915_audio_component_ops; acomp->dev = i915_dev; dev_priv->audio_component = acomp; + drm_modeset_unlock_all(dev_priv->dev);
return 0; } @@ -556,9 +558,11 @@ static void i915_audio_component_unbind(struct device *i915_dev, struct i915_audio_component *acomp = data; struct drm_i915_private *dev_priv = dev_to_i915(i915_dev);
+ drm_modeset_lock_all(dev_priv->dev); acomp->ops = NULL; acomp->dev = NULL; dev_priv->audio_component = NULL; + drm_modeset_unlock_all(dev_priv->dev); }
static const struct component_ops i915_audio_component_bind_ops = {
On Thu, 03 Sep 2015 11:51:35 +0200, David Henningsson wrote:
This will make sure that audio callbacks do not race with component bind/unbind.
Signed-off-by: David Henningsson david.henningsson@canonical.com
Applied, thanks.
Takashi
drivers/gpu/drm/i915/intel_audio.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index 2d52d96..678a34f 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -543,9 +543,11 @@ static int i915_audio_component_bind(struct device *i915_dev, if (WARN_ON(acomp->ops || acomp->dev)) return -EEXIST;
drm_modeset_lock_all(dev_priv->dev); acomp->ops = &i915_audio_component_ops; acomp->dev = i915_dev; dev_priv->audio_component = acomp;
drm_modeset_unlock_all(dev_priv->dev);
return 0;
} @@ -556,9 +558,11 @@ static void i915_audio_component_unbind(struct device *i915_dev, struct i915_audio_component *acomp = data; struct drm_i915_private *dev_priv = dev_to_i915(i915_dev);
- drm_modeset_lock_all(dev_priv->dev); acomp->ops = NULL; acomp->dev = NULL; dev_priv->audio_component = NULL;
- drm_modeset_unlock_all(dev_priv->dev);
}
static const struct component_ops i915_audio_component_bind_ops = {
1.9.1
participants (2)
-
David Henningsson
-
Takashi Iwai