From: Jani Nikula <jani.nikula@intel.com>
To: Vinod Govindapillai <vinod.govindapillai@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: vinod.govindapillai@intel.com, ville.syrjala@intel.com,
kai.vehmanen@intel.com, jani.saarinen@intel.com
Subject: Re: [PATCH 7/9] drm/i915/display: update audio support based on the available frequencies
Date: Tue, 08 Oct 2024 15:24:58 +0300 [thread overview]
Message-ID: <87msjerdd1.fsf@intel.com> (raw)
In-Reply-To: <20241008082327.342020-8-vinod.govindapillai@intel.com>
On Tue, 08 Oct 2024, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote:
> After pruning the sad audio frequency list, if there are no
> supported audio frequencies left, audio cannot be supported.
> So mark has_audio accordingly.
>
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_audio.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
> index 14fabbcbf5da..bd135c1f2c07 100644
> --- a/drivers/gpu/drm/i915/display/intel_audio.c
> +++ b/drivers/gpu/drm/i915/display/intel_audio.c
> @@ -796,6 +796,7 @@ bool intel_audio_compute_eld_config(struct drm_connector_state *conn_state,
> {
> struct drm_connector *connector = conn_state->connector;
> struct drm_i915_private *i915 = to_i915(connector->dev);
> + bool audio_supported = false;
> u8 *eld;
>
> if (!intel_audio_eld_valid(conn_state))
> @@ -823,9 +824,13 @@ bool intel_audio_compute_eld_config(struct drm_connector_state *conn_state,
> "SAD updated. Freq: 0x%x(0x%x) Channels: %d(%d)\n",
> sad.freq, sad_freq, sad.channels, sad_channels);
> }
> +
> + /* If no supported freq in any sads, make audio support to false */
> + audio_supported |= sad.freq;
Please don't do bitwise operations on booleans.
> }
>
> - return true;
> + drm_dbg_kms(&i915->drm, "audio supported: %d\n", audio_supported);
Having the encoder here would be great for [ENCODER...] logging.
Please don't use %d for bools. Maybe str_yes_no().
> + return audio_supported;
> }
>
> bool intel_audio_compute_config(struct intel_crtc_state *crtc_state,
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-10-08 12:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 8:23 [PATCH 0/9] prunue audio frequencies based on bw limits for DP2 Vinod Govindapillai
2024-10-08 8:23 ` [PATCH 1/9] drm/i915/display: get rid of encoder param in intel_audio_compute_config Vinod Govindapillai
2024-10-08 12:19 ` Jani Nikula
2024-10-08 8:23 ` [PATCH 2/9] drm/i915/display: create a common function to check validity of ELD Vinod Govindapillai
2024-10-08 12:26 ` Jani Nikula
2024-11-11 12:29 ` Kai Vehmanen
2024-10-08 8:23 ` [PATCH 3/9] drm/i915/display: update call to intel_dp_audio_compute_config Vinod Govindapillai
2024-11-11 12:11 ` Kai Vehmanen
2024-10-08 8:23 ` [PATCH 4/9] drm/i915/display: update logic to determine crtcstate has audio support Vinod Govindapillai
2024-11-11 12:37 ` Kai Vehmanen
2024-10-08 8:23 ` [PATCH 5/9] drm/i915/display: check and prune audio frequencies based on bw limits Vinod Govindapillai
2024-11-11 11:52 ` Kai Vehmanen
2024-10-08 8:23 ` [PATCH 6/9] drm/i915/display: iterare through channels if no feasible frequencies Vinod Govindapillai
2024-10-09 13:32 ` Kai Vehmanen
2024-10-10 6:49 ` Dan Carpenter
2024-10-08 8:23 ` [PATCH 7/9] drm/i915/display: update audio support based on the available frequencies Vinod Govindapillai
2024-10-08 12:24 ` Jani Nikula [this message]
2024-10-09 13:38 ` Kai Vehmanen
2024-10-08 8:23 ` [PATCH 8/9] drm/i815/disaply: limit the audio bw check with DP2 config Vinod Govindapillai
2024-11-11 12:35 ` Kai Vehmanen
2024-10-08 8:23 ` [PATCH 9/9] drm/i915/display: update audio bw calculations for MTL Vinod Govindapillai
2024-10-09 13:33 ` Kai Vehmanen
2024-10-08 11:47 ` ✗ Fi.CI.CHECKPATCH: warning for prunue audio frequencies based on bw limits for DP2 Patchwork
2024-10-08 11:47 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-08 12:13 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-09 15:55 ` ✗ Fi.CI.IGT: failure " 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=87msjerdd1.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.saarinen@intel.com \
--cc=kai.vehmanen@intel.com \
--cc=ville.syrjala@intel.com \
--cc=vinod.govindapillai@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.