All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] drm/i915/audio: rename function prefixes from i915 to intel
Date: Mon, 13 Jan 2025 12:01:20 -0500	[thread overview]
Message-ID: <Z4VG4PKpxi9Xxcg-@intel.com> (raw)
In-Reply-To: <5e67f6fc5a441a9512d7855d86ce7868cc992212.1736345025.git.jani.nikula@intel.com>

On Wed, Jan 08, 2025 at 04:04:15PM +0200, Jani Nikula wrote:
> The intel prefix is more accurate for display stuff. Rename.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_audio.c | 82 +++++++++++-----------
>  1 file changed, 41 insertions(+), 41 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
> index 241e5d3904dc..4b1f46815ad5 100644
> --- a/drivers/gpu/drm/i915/display/intel_audio.c
> +++ b/drivers/gpu/drm/i915/display/intel_audio.c
> @@ -1035,7 +1035,7 @@ int intel_audio_min_cdclk(const struct intel_crtc_state *crtc_state)
>  	return min_cdclk;
>  }
>  
> -static unsigned long i915_audio_component_get_power(struct device *kdev)
> +static unsigned long intel_audio_component_get_power(struct device *kdev)
>  {
>  	struct intel_display *display = to_intel_display(kdev);
>  	struct drm_i915_private *i915 = to_i915(display->drm);
> @@ -1067,8 +1067,8 @@ static unsigned long i915_audio_component_get_power(struct device *kdev)
>  	return (unsigned long)wakeref;
>  }
>  
> -static void i915_audio_component_put_power(struct device *kdev,
> -					   unsigned long cookie)
> +static void intel_audio_component_put_power(struct device *kdev,
> +					    unsigned long cookie)
>  {
>  	struct intel_display *display = to_intel_display(kdev);
>  	struct drm_i915_private *i915 = to_i915(display->drm);
> @@ -1082,8 +1082,8 @@ static void i915_audio_component_put_power(struct device *kdev,
>  	intel_display_power_put(i915, POWER_DOMAIN_AUDIO_PLAYBACK, wakeref);
>  }
>  
> -static void i915_audio_component_codec_wake_override(struct device *kdev,
> -						     bool enable)
> +static void intel_audio_component_codec_wake_override(struct device *kdev,
> +						      bool enable)
>  {
>  	struct intel_display *display = to_intel_display(kdev);
>  	unsigned long cookie;
> @@ -1091,7 +1091,7 @@ static void i915_audio_component_codec_wake_override(struct device *kdev,
>  	if (DISPLAY_VER(display) < 9)
>  		return;
>  
> -	cookie = i915_audio_component_get_power(kdev);
> +	cookie = intel_audio_component_get_power(kdev);
>  
>  	/*
>  	 * Enable/disable generating the codec wake signal, overriding the
> @@ -1107,11 +1107,11 @@ static void i915_audio_component_codec_wake_override(struct device *kdev,
>  		usleep_range(1000, 1500);
>  	}
>  
> -	i915_audio_component_put_power(kdev, cookie);
> +	intel_audio_component_put_power(kdev, cookie);
>  }
>  
>  /* Get CDCLK in kHz  */
> -static int i915_audio_component_get_cdclk_freq(struct device *kdev)
> +static int intel_audio_component_get_cdclk_freq(struct device *kdev)
>  {
>  	struct intel_display *display = to_intel_display(kdev);
>  
> @@ -1169,8 +1169,8 @@ static struct intel_audio_state *find_audio_state(struct intel_display *display,
>  	return NULL;
>  }
>  
> -static int i915_audio_component_sync_audio_rate(struct device *kdev, int port,
> -						int cpu_transcoder, int rate)
> +static int intel_audio_component_sync_audio_rate(struct device *kdev, int port,
> +						 int cpu_transcoder, int rate)
>  {
>  	struct intel_display *display = to_intel_display(kdev);
>  	struct i915_audio_component *acomp = display->audio.component;
> @@ -1183,7 +1183,7 @@ static int i915_audio_component_sync_audio_rate(struct device *kdev, int port,
>  	if (!HAS_DDI(display))
>  		return 0;
>  
> -	cookie = i915_audio_component_get_power(kdev);
> +	cookie = intel_audio_component_get_power(kdev);
>  	mutex_lock(&display->audio.mutex);
>  
>  	audio_state = find_audio_state(display, port, cpu_transcoder);
> @@ -1207,13 +1207,13 @@ static int i915_audio_component_sync_audio_rate(struct device *kdev, int port,
>  
>   unlock:
>  	mutex_unlock(&display->audio.mutex);
> -	i915_audio_component_put_power(kdev, cookie);
> +	intel_audio_component_put_power(kdev, cookie);
>  	return err;
>  }
>  
> -static int i915_audio_component_get_eld(struct device *kdev, int port,
> -					int cpu_transcoder, bool *enabled,
> -					unsigned char *buf, int max_bytes)
> +static int intel_audio_component_get_eld(struct device *kdev, int port,
> +					 int cpu_transcoder, bool *enabled,
> +					 unsigned char *buf, int max_bytes)
>  {
>  	struct intel_display *display = to_intel_display(kdev);
>  	const struct intel_audio_state *audio_state;
> @@ -1241,18 +1241,18 @@ static int i915_audio_component_get_eld(struct device *kdev, int port,
>  	return ret;
>  }
>  
> -static const struct drm_audio_component_ops i915_audio_component_ops = {
> -	.owner		= THIS_MODULE,
> -	.get_power	= i915_audio_component_get_power,
> -	.put_power	= i915_audio_component_put_power,
> -	.codec_wake_override = i915_audio_component_codec_wake_override,
> -	.get_cdclk_freq	= i915_audio_component_get_cdclk_freq,
> -	.sync_audio_rate = i915_audio_component_sync_audio_rate,
> -	.get_eld	= i915_audio_component_get_eld,
> +static const struct drm_audio_component_ops intel_audio_component_ops = {
> +	.owner = THIS_MODULE,
> +	.get_power = intel_audio_component_get_power,
> +	.put_power = intel_audio_component_put_power,
> +	.codec_wake_override = intel_audio_component_codec_wake_override,
> +	.get_cdclk_freq = intel_audio_component_get_cdclk_freq,
> +	.sync_audio_rate = intel_audio_component_sync_audio_rate,
> +	.get_eld = intel_audio_component_get_eld,
>  };
>  
> -static int i915_audio_component_bind(struct device *drv_kdev,
> -				     struct device *hda_kdev, void *data)
> +static int intel_audio_component_bind(struct device *drv_kdev,
> +				      struct device *hda_kdev, void *data)
>  {
>  	struct intel_display *display = to_intel_display(drv_kdev);
>  	struct i915_audio_component *acomp = data;
> @@ -1267,7 +1267,7 @@ static int i915_audio_component_bind(struct device *drv_kdev,
>  		return -ENOMEM;
>  
>  	drm_modeset_lock_all(display->drm);
> -	acomp->base.ops = &i915_audio_component_ops;
> +	acomp->base.ops = &intel_audio_component_ops;
>  	acomp->base.dev = drv_kdev;
>  	BUILD_BUG_ON(MAX_PORTS != I915_MAX_PORTS);
>  	for (i = 0; i < ARRAY_SIZE(acomp->aud_sample_rate); i++)
> @@ -1278,8 +1278,8 @@ static int i915_audio_component_bind(struct device *drv_kdev,
>  	return 0;
>  }
>  
> -static void i915_audio_component_unbind(struct device *drv_kdev,
> -					struct device *hda_kdev, void *data)
> +static void intel_audio_component_unbind(struct device *drv_kdev,
> +					 struct device *hda_kdev, void *data)
>  {
>  	struct intel_display *display = to_intel_display(drv_kdev);
>  	struct i915_audio_component *acomp = data;
> @@ -1298,9 +1298,9 @@ static void i915_audio_component_unbind(struct device *drv_kdev,
>  			display->audio.power_refcount);
>  }
>  
> -static const struct component_ops i915_audio_component_bind_ops = {
> -	.bind	= i915_audio_component_bind,
> -	.unbind	= i915_audio_component_unbind,
> +static const struct component_ops intel_audio_component_bind_ops = {
> +	.bind = intel_audio_component_bind,
> +	.unbind = intel_audio_component_unbind,
>  };
>  
>  #define AUD_FREQ_TMODE_SHIFT	14
> @@ -1313,7 +1313,7 @@ static const struct component_ops i915_audio_component_bind_ops = {
>  #define AUD_FREQ_TGL_BROKEN     (AUD_FREQ_8T | AUD_FREQ_PULLCLKS(2) | AUD_FREQ_BCLK_96M)
>  
>  /**
> - * i915_audio_component_init - initialize and register the audio component
> + * intel_audio_component_init - initialize and register the audio component
>   * @display: display device
>   *
>   * This will register with the component framework a child component which
> @@ -1328,7 +1328,7 @@ static const struct component_ops i915_audio_component_bind_ops = {
>   * We ignore any error during registration and continue with reduced
>   * functionality (i.e. without HDMI audio).
>   */
> -static void i915_audio_component_init(struct intel_display *display)
> +static void intel_audio_component_init(struct intel_display *display)
>  {
>  	u32 aud_freq, aud_freq_init;
>  
> @@ -1356,12 +1356,12 @@ static void i915_audio_component_init(struct intel_display *display)
>  	intel_audio_cdclk_change_post(display);
>  }
>  
> -static void i915_audio_component_register(struct intel_display *display)
> +static void intel_audio_component_register(struct intel_display *display)
>  {
>  	int ret;
>  
>  	ret = component_add_typed(display->drm->dev,
> -				  &i915_audio_component_bind_ops,
> +				  &intel_audio_component_bind_ops,
>  				  I915_COMPONENT_AUDIO);
>  	if (ret < 0) {
>  		drm_err(display->drm,
> @@ -1374,18 +1374,18 @@ static void i915_audio_component_register(struct intel_display *display)
>  }
>  
>  /**
> - * i915_audio_component_cleanup - deregister the audio component
> + * intel_audio_component_cleanup - deregister the audio component
>   * @display: display device
>   *
>   * Deregisters the audio component, breaking any existing binding to the
>   * corresponding snd_hda_intel driver's master component.
>   */
> -static void i915_audio_component_cleanup(struct intel_display *display)
> +static void intel_audio_component_cleanup(struct intel_display *display)
>  {
>  	if (!display->audio.component_registered)
>  		return;
>  
> -	component_del(display->drm->dev, &i915_audio_component_bind_ops);
> +	component_del(display->drm->dev, &intel_audio_component_bind_ops);
>  	display->audio.component_registered = false;
>  }
>  
> @@ -1398,13 +1398,13 @@ static void i915_audio_component_cleanup(struct intel_display *display)
>  void intel_audio_init(struct intel_display *display)
>  {
>  	if (intel_lpe_audio_init(display) < 0)
> -		i915_audio_component_init(display);
> +		intel_audio_component_init(display);
>  }
>  
>  void intel_audio_register(struct intel_display *display)
>  {
>  	if (!display->audio.lpe.platdev)
> -		i915_audio_component_register(display);
> +		intel_audio_component_register(display);
>  }
>  
>  /**
> @@ -1416,5 +1416,5 @@ void intel_audio_deinit(struct intel_display *display)
>  	if (display->audio.lpe.platdev)
>  		intel_lpe_audio_teardown(display);
>  	else
> -		i915_audio_component_cleanup(display);
> +		intel_audio_component_cleanup(display);
>  }
> -- 
> 2.39.5
> 

  reply	other threads:[~2025-01-13 17:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 14:04 [PATCH 0/3] drm/i915/audio: convert to struct intel_display Jani Nikula
2025-01-08 14:04 ` [PATCH 1/3] " Jani Nikula
2025-01-13 16:54   ` Rodrigo Vivi
2025-01-08 14:04 ` [PATCH 2/3] drm/i915/audio: convert LPE audio " Jani Nikula
2025-01-13 16:57   ` Rodrigo Vivi
2025-01-08 14:04 ` [PATCH 3/3] drm/i915/audio: rename function prefixes from i915 to intel Jani Nikula
2025-01-13 17:01   ` Rodrigo Vivi [this message]
2025-01-08 15:13 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/audio: convert to struct intel_display Patchwork
2025-01-08 15:13 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-01-08 15:42 ` ✓ i915.CI.BAT: success " Patchwork
2025-01-08 15:52 ` ✓ CI.Patch_applied: " Patchwork
2025-01-08 15:52 ` ✗ CI.checkpatch: warning " Patchwork
2025-01-08 15:54 ` ✓ CI.KUnit: success " Patchwork
2025-01-08 16:12 ` ✓ CI.Build: " Patchwork
2025-01-08 16:14 ` ✓ CI.Hooks: " Patchwork
2025-01-08 16:16 ` ✗ CI.checksparse: warning " Patchwork
2025-01-08 16:43 ` ✓ Xe.CI.BAT: success " Patchwork
2025-01-09 15:28 ` ✗ i915.CI.Full: failure " Patchwork
2025-01-10 15:29 ` ✗ Xe.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z4VG4PKpxi9Xxcg-@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.