From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Jani Nikula <jani.nikula@intel.com>, <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 02/13] drm/display/dp_mst: drop has_audio from struct drm_dp_mst_port
Date: Mon, 29 May 2023 10:40:14 +0530 [thread overview]
Message-ID: <375326f4-88c6-09a1-3b47-c468bb76a6d5@intel.com> (raw)
In-Reply-To: <3d7838d0be7c4639037cecd532b577bbfd262cf9.1682077472.git.jani.nikula@intel.com>
LGTM.
Only minor difference I can see, is an extra message log for CEA audio
formats, while using drm_detect_monitor_audio.
I am wondering, whether drm_detect_monitor_audio can be removed.
Anyways the change looks good to me.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
On 4/21/2023 5:17 PM, Jani Nikula wrote:
> Caching the has_audio in struct drm_dp_mst_port seems odd, and oddly
> placed. Defer audio handling to drivers, and use the info from the
> connector display info. i915 was the only one using it anyway.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +-
> drivers/gpu/drm/i915/display/intel_display_debugfs.c | 4 ++--
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
> include/drm/display/drm_dp_mst_helper.h | 5 -----
> 4 files changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index 38dab76ae69e..a2b8732db0c8 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -4170,7 +4170,7 @@ struct edid *drm_dp_mst_get_edid(struct drm_connector *connector, struct drm_dp_
> else {
> edid = drm_get_edid(connector, &port->aux.ddc);
> }
> - port->has_audio = drm_detect_monitor_audio(edid);
> +
> drm_dp_mst_topology_put_port(port);
> return edid;
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index e72288662f02..77caed2552d0 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -244,9 +244,9 @@ static void intel_dp_info(struct seq_file *m,
> }
>
> static void intel_dp_mst_info(struct seq_file *m,
> - struct intel_connector *intel_connector)
> + struct intel_connector *connector)
> {
> - bool has_audio = intel_connector->port->has_audio;
> + bool has_audio = connector->base.display_info.has_audio;
>
> seq_printf(m, "\taudio support: %s\n", str_yes_no(has_audio));
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 2c49d9ab86a2..506118a13866 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -298,7 +298,7 @@ static bool intel_dp_mst_has_audio(const struct drm_connector_state *conn_state)
> to_intel_connector(conn_state->connector);
>
> if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
> - return connector->port->has_audio;
> + return connector->base.display_info.has_audio;
> else
> return intel_conn_state->force_audio == HDMI_AUDIO_ON;
> }
> diff --git a/include/drm/display/drm_dp_mst_helper.h b/include/drm/display/drm_dp_mst_helper.h
> index 32c764fb9cb5..5be96a158ab2 100644
> --- a/include/drm/display/drm_dp_mst_helper.h
> +++ b/include/drm/display/drm_dp_mst_helper.h
> @@ -139,11 +139,6 @@ struct drm_dp_mst_port {
> * that the EDID for all connectors is read immediately.
> */
> struct edid *cached_edid;
> - /**
> - * @has_audio: Tracks whether the sink connector to this port is
> - * audio-capable.
> - */
> - bool has_audio;
>
> /**
> * @fec_capable: bool indicating if FEC can be supported up to that
next prev parent reply other threads:[~2023-05-29 5:10 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 11:47 [Intel-gfx] [PATCH 00/13] drm/display & drm/i915: more struct drm_edid conversions Jani Nikula
2023-04-21 11:47 ` [Intel-gfx] [PATCH 01/13] drm/edid: parse display info has_audio similar to is_hdmi Jani Nikula
2023-05-29 4:56 ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 02/13] drm/display/dp_mst: drop has_audio from struct drm_dp_mst_port Jani Nikula
2023-05-29 5:10 ` Nautiyal, Ankit K [this message]
2023-04-21 11:47 ` [Intel-gfx] [PATCH 03/13] drm/i915/dp: stop caching has_audio in struct intel_dp Jani Nikula
2023-05-29 5:15 ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 04/13] drm/i915/dp: stop caching has_hdmi_sink " Jani Nikula
2023-05-29 5:22 ` Nautiyal, Ankit K
2023-05-29 5:32 ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 05/13] drm/i915/hdmi: stop caching has_audio in struct intel_hdmi Jani Nikula
2023-05-29 5:43 ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 06/13] drm/i915/hdmi: stop caching has_hdmi_sink " Jani Nikula
2023-05-29 5:49 ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 07/13] drm/i915/sdvo: stop caching has_hdmi_monitor in struct intel_sdvo Jani Nikula
2023-05-29 6:05 ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 08/13] drm/i915/sdvo: stop caching has_hdmi_audio " Jani Nikula
2023-05-29 6:06 ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 09/13] drm/edid: add drm_edid_read_switcheroo() Jani Nikula
2023-05-30 4:09 ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 10/13] drm/i915/lvds: switch to drm_edid_read_switcheroo() Jani Nikula
2023-04-23 8:10 ` Lukas Wunner
2023-04-21 11:47 ` [Intel-gfx] [PATCH 11/13] drm/edid: make drm_edid_duplicate() safe to call with NULL parameter Jani Nikula
2023-05-29 13:11 ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 12/13] drm/display/dp_mst: convert to struct drm_edid Jani Nikula
2023-05-29 13:08 ` Nautiyal, Ankit K
2023-04-21 11:47 ` [Intel-gfx] [PATCH 13/13] drm/i915/display: switch the rest of the connectors " Jani Nikula
2023-05-30 4:38 ` Nautiyal, Ankit K
2023-04-21 14:11 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/display & drm/i915: more struct drm_edid conversions Patchwork
2023-04-21 14:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-21 22:34 ` [Intel-gfx] ✗ 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=375326f4-88c6-09a1-3b47-c468bb76a6d5@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox