Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Jani Nikula <jani.nikula@intel.com>, <dri-devel@lists.freedesktop.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 18/25] drm/edid: add drm_edid helper for drm_edid_to_speaker_allocation()
Date: Tue, 10 May 2022 15:38:06 +0530	[thread overview]
Message-ID: <6d42a5f9-c813-088d-1748-127e1b92a290@intel.com> (raw)
In-Reply-To: <770d095c93274969c4b86480e07044e16a7b5760.1652097712.git.jani.nikula@intel.com>

LGTM

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

Regards,

Ankit

On 5/9/2022 5:33 PM, Jani Nikula wrote:
> We'll need to propagate drm_edid everywhere.'
>
> v2: Handle NULL EDID pointer (Ville, CI)
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>   drivers/gpu/drm/drm_edid.c | 37 +++++++++++++++++++++++--------------
>   1 file changed, 23 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index dee09359bbc3..5cc851f6d3b3 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -5025,25 +5025,14 @@ int drm_edid_to_sad(const struct edid *edid, struct cea_sad **sads)
>   }
>   EXPORT_SYMBOL(drm_edid_to_sad);
>   
> -/**
> - * drm_edid_to_speaker_allocation - extracts Speaker Allocation Data Blocks from EDID
> - * @edid: EDID to parse
> - * @sadb: pointer to the speaker block
> - *
> - * Looks for CEA EDID block and extracts the Speaker Allocation Data Block from it.
> - *
> - * Note: The returned pointer needs to be freed using kfree().
> - *
> - * Return: The number of found Speaker Allocation Blocks or negative number on
> - * error.
> - */
> -int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb)
> +static int _drm_edid_to_speaker_allocation(const struct drm_edid *drm_edid,
> +					   u8 **sadb)
>   {
>   	const struct cea_db *db;
>   	struct cea_db_iter iter;
>   	int count = 0;
>   
> -	cea_db_iter_edid_begin(edid, &iter);
> +	cea_db_iter_edid_begin(drm_edid ? drm_edid->edid : NULL, &iter);
>   	cea_db_iter_for_each(db, &iter) {
>   		if (cea_db_tag(db) == CTA_DB_SPEAKER &&
>   		    cea_db_payload_len(db) == 3) {
> @@ -5061,6 +5050,26 @@ int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb)
>   
>   	return count;
>   }
> +
> +/**
> + * drm_edid_to_speaker_allocation - extracts Speaker Allocation Data Blocks from EDID
> + * @edid: EDID to parse
> + * @sadb: pointer to the speaker block
> + *
> + * Looks for CEA EDID block and extracts the Speaker Allocation Data Block from it.
> + *
> + * Note: The returned pointer needs to be freed using kfree().
> + *
> + * Return: The number of found Speaker Allocation Blocks or negative number on
> + * error.
> + */
> +int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb)
> +{
> +	struct drm_edid drm_edid;
> +
> +	return _drm_edid_to_speaker_allocation(drm_edid_legacy_init(&drm_edid, edid),
> +					       sadb);
> +}
>   EXPORT_SYMBOL(drm_edid_to_speaker_allocation);
>   
>   /**

  reply	other threads:[~2022-05-10 10:08 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 12:02 [Intel-gfx] [PATCH v2 00/25] drm/edid: introduce struct drm_edid Jani Nikula
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 01/25] drm/edid: use else-if in CTA extension parsing Jani Nikula
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 02/25] drm/edid: convert drm_for_each_detailed_block() to edid iter Jani Nikula
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 03/25] drm/edid: add struct drm_edid container Jani Nikula
2022-05-10  6:26   ` Nautiyal, Ankit K
2022-05-16  8:11     ` Jani Nikula
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 04/25] drm/edid: start propagating drm_edid to lower levels Jani Nikula
2022-05-10  6:23   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 05/25] drm/edid: keep propagating drm_edid to display info Jani Nikula
2022-05-10  6:15   ` Nautiyal, Ankit K
2022-05-11  9:21   ` [Intel-gfx] [PATCH v3] " Jani Nikula
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 06/25] drm/edid: propagate drm_edid to drm_edid_to_eld() Jani Nikula
2022-05-10  6:31   ` Nautiyal, Ankit K
2022-05-11  9:23   ` [Intel-gfx] [PATCH v3] " Jani Nikula
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 07/25] drm/edid: convert drm_edid_connector_update() to drm_edid fully Jani Nikula
2022-05-10  6:45   ` Nautiyal, Ankit K
2022-05-11  9:26   ` [Intel-gfx] [PATCH v3] " Jani Nikula
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 08/25] drm/edid: convert struct detailed_mode_closure to drm_edid Jani Nikula
2022-05-10  7:14   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 09/25] drm/edid: convert drm_mode_detailed() " Jani Nikula
2022-05-10  8:57   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 10/25] drm/edid: convert drm_dmt_modes_for_range() " Jani Nikula
2022-05-10  9:04   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 11/25] drm/edid: convert drm_gtf_modes_for_range() " Jani Nikula
2022-05-10  9:05   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 12/25] drm/edid: convert drm_cvt_modes_for_range() " Jani Nikula
2022-05-10  9:11   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 13/25] drm/edid: convert drm_mode_std() and children " Jani Nikula
2022-05-10  9:18   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 14/25] drm/edid: convert mode_in_range() and drm_monitor_supports_rb() " Jani Nikula
2022-05-10  9:22   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 15/25] drm/edid: convert get_monitor_name() " Jani Nikula
2022-05-10  9:29   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 16/25] drm/edid: convert drm_for_each_detailed_block() " Jani Nikula
2022-05-10  9:36   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 17/25] drm/edid: add drm_edid helper for drm_edid_to_sad() Jani Nikula
2022-05-10  9:55   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 18/25] drm/edid: add drm_edid helper for drm_edid_to_speaker_allocation() Jani Nikula
2022-05-10 10:08   ` Nautiyal, Ankit K [this message]
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 19/25] drm/edid: add drm_edid helper for drm_detect_hdmi_monitor() Jani Nikula
2022-05-10 10:15   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 20/25] drm/edid: add drm_edid helper for drm_detect_monitor_audio() Jani Nikula
2022-05-10 10:17   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 21/25] drm/edid: convert cea_db_iter_edid_begin() to drm_edid Jani Nikula
2022-05-10 10:21   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 22/25] drm/edid: convert drm_edid_iter_begin() " Jani Nikula
2022-05-10 10:25   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 23/25] drm/edid: add drm_edid helper for drm_update_tile_info() Jani Nikula
2022-05-10 10:28   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 24/25] drm/displayid: convert to drm_edid Jani Nikula
2022-05-10 12:04   ` Nautiyal, Ankit K
2022-05-09 12:03 ` [Intel-gfx] [PATCH v2 25/25] drm/edid: convert version_greater() " Jani Nikula
2022-05-10 12:07   ` Nautiyal, Ankit K
2022-05-09 19:16 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/edid: introduce struct drm_edid (rev3) Patchwork
2022-05-09 19:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-05-10  6:29 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-05-11 10:21 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/edid: introduce struct drm_edid (rev6) Patchwork
2022-05-11 10:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-05-11 14:29 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-05-11 17:35 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/edid: introduce struct drm_edid (rev7) Patchwork
2022-05-11 18:01 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-05-11 22:01 ` [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=6d42a5f9-c813-088d-1748-127e1b92a290@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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