[Intel-gfx] [PATCH 2/4] drm/i915/audio: name the audio sub-struct in drm_i915_private
Jani Nikula
jani.nikula at intel.com
Fri Oct 22 16:58:16 UTC 2021
On Fri, 22 Oct 2021, Ville Syrjälä <ville.syrjala at linux.intel.com> wrote:
> On Fri, Oct 22, 2021 at 07:27:56PM +0300, Jani Nikula wrote:
>> Add name to the audio sub-struct in drm_i915_private, and remove the
>> tautologies and other inconsistencies in the member names.
>>
>> Cc: Dave Airlie <airlied at redhat.com>
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>> ---
>> drivers/gpu/drm/i915/display/intel_audio.c | 90 +++++++++----------
>> .../gpu/drm/i915/display/intel_lpe_audio.c | 42 ++++-----
>> drivers/gpu/drm/i915/i915_drv.c | 2 +-
>> drivers/gpu/drm/i915/i915_drv.h | 22 +++--
>> 4 files changed, 77 insertions(+), 79 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
>> index 03e8c05a74f6..b46f6539b9ab 100644
>> --- a/drivers/gpu/drm/i915/display/intel_audio.c
>> +++ b/drivers/gpu/drm/i915/display/intel_audio.c
>> @@ -388,7 +388,7 @@ hsw_dp_audio_config_update(struct intel_encoder *encoder,
>> const struct intel_crtc_state *crtc_state)
>> {
>> struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>> - struct i915_audio_component *acomp = dev_priv->audio_component;
>> + struct i915_audio_component *acomp = dev_priv->audio.component;
>> enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
>> enum port port = encoder->port;
>> const struct dp_aud_n_m *nm;
>> @@ -436,7 +436,7 @@ hsw_hdmi_audio_config_update(struct intel_encoder *encoder,
>> const struct intel_crtc_state *crtc_state)
>> {
>> struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>> - struct i915_audio_component *acomp = dev_priv->audio_component;
>> + struct i915_audio_component *acomp = dev_priv->audio.component;
>> enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
>> enum port port = encoder->port;
>> int n, rate;
>> @@ -494,7 +494,7 @@ static void hsw_audio_codec_disable(struct intel_encoder *encoder,
>> drm_dbg_kms(&dev_priv->drm, "Disable audio codec on transcoder %s\n",
>> transcoder_name(cpu_transcoder));
>>
>> - mutex_lock(&dev_priv->av_mutex);
>> + mutex_lock(&dev_priv->audio.lock);
>
> Maybe we should try to be consistent in our lock names and
> call mutexes 'mutex' and spinlocks 'lock'?
Works for me.
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list