From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 02/25] drm/edid: convert drm_for_each_detailed_block() to edid iter
Date: Fri, 6 May 2022 20:50:05 +0300 [thread overview]
Message-ID: <YnVfzUAAx0reZ4wX@intel.com> (raw)
In-Reply-To: <26e5a04f13803a151ff832e0bccde06e44768c38.1651830938.git.jani.nikula@intel.com>
On Fri, May 06, 2022 at 01:10:09PM +0300, Jani Nikula wrote:
> We have an iterator for this, use it. It does include the base block,
> but its tag is 0 and will be skipped.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/drm_edid.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index efc1999b9573..dcef92c8887a 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2574,6 +2574,8 @@ vtb_for_each_detailed_block(const u8 *ext, detailed_cb *cb, void *closure)
> static void
> drm_for_each_detailed_block(const struct edid *edid, detailed_cb *cb, void *closure)
> {
> + struct drm_edid_iter edid_iter;
> + const u8 *ext;
> int i;
>
> if (edid == NULL)
> @@ -2582,9 +2584,8 @@ drm_for_each_detailed_block(const struct edid *edid, detailed_cb *cb, void *clos
> for (i = 0; i < EDID_DETAILED_TIMINGS; i++)
> cb(&(edid->detailed_timings[i]), closure);
>
> - for (i = 0; i < edid_extension_block_count(edid); i++) {
> - const u8 *ext = edid_extension_block_data(edid, i);
> -
> + drm_edid_iter_begin(edid, &edid_iter);
> + drm_edid_iter_for_each(ext, &edid_iter) {
> switch (*ext) {
> case CEA_EXT:
> cea_for_each_detailed_block(ext, cb, closure);
> @@ -2596,6 +2597,7 @@ drm_for_each_detailed_block(const struct edid *edid, detailed_cb *cb, void *clos
> break;
> }
> }
> + drm_edid_iter_end(&edid_iter);
> }
>
> static void
> --
> 2.30.2
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-05-06 17:50 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-06 10:10 [PATCH 00/25] drm/edid: introduce struct drm_edid Jani Nikula
2022-05-06 10:10 ` [PATCH 01/25] drm/edid: use else-if in CTA extension parsing Jani Nikula
2022-05-06 17:47 ` Ville Syrjälä
2022-05-06 10:10 ` [PATCH 02/25] drm/edid: convert drm_for_each_detailed_block() to edid iter Jani Nikula
2022-05-06 17:50 ` Ville Syrjälä [this message]
2022-05-06 10:10 ` [PATCH 03/25] drm/edid: add struct drm_edid container Jani Nikula
2022-05-10 6:10 ` Nautiyal, Ankit K
2022-05-06 10:10 ` [PATCH 04/25] drm/edid: start propagating drm_edid to lower levels Jani Nikula
2022-05-06 10:10 ` [PATCH 05/25] drm/edid: keep propagating drm_edid to display info Jani Nikula
2022-05-06 10:16 ` Jani Nikula
2022-05-10 6:08 ` Nautiyal, Ankit K
2022-05-06 10:10 ` [PATCH 06/25] drm/edid: propagate drm_edid to drm_edid_to_eld() Jani Nikula
2022-05-06 10:10 ` [PATCH 07/25] drm/edid: convert drm_edid_connector_update() to drm_edid fully Jani Nikula
2022-05-06 10:10 ` [PATCH 08/25] drm/edid: convert struct detailed_mode_closure to drm_edid Jani Nikula
2022-05-06 10:10 ` [PATCH 09/25] drm/edid: convert drm_mode_detailed() " Jani Nikula
2022-05-06 10:10 ` [PATCH 10/25] drm/edid: convert drm_dmt_modes_for_range() " Jani Nikula
2022-05-06 10:10 ` [PATCH 11/25] drm/edid: convert drm_gtf_modes_for_range() " Jani Nikula
2022-05-06 10:10 ` [PATCH 12/25] drm/edid: convert drm_cvt_modes_for_range() " Jani Nikula
2022-05-06 10:10 ` [PATCH 13/25] drm/edid: convert drm_mode_std() and children " Jani Nikula
2022-05-06 10:10 ` [PATCH 14/25] drm/edid: convert mode_in_range() and drm_monitor_supports_rb() " Jani Nikula
2022-05-06 10:10 ` [PATCH 15/25] drm/edid: convert get_monitor_name() " Jani Nikula
2022-05-06 10:10 ` [PATCH 16/25] drm/edid: convert drm_for_each_detailed_block() " Jani Nikula
2022-05-06 10:10 ` [PATCH 17/25] drm/edid: add drm_edid helper for drm_edid_to_sad() Jani Nikula
2022-05-06 18:05 ` Ville Syrjälä
2022-05-07 10:21 ` Jani Nikula
2022-05-06 10:10 ` [PATCH 18/25] drm/edid: add drm_edid helper for drm_edid_to_speaker_allocation() Jani Nikula
2022-05-06 10:10 ` [PATCH 19/25] drm/edid: add drm_edid helper for drm_detect_hdmi_monitor() Jani Nikula
2022-05-06 10:10 ` [PATCH 20/25] drm/edid: add drm_edid helper for drm_detect_monitor_audio() Jani Nikula
2022-05-06 10:10 ` [PATCH 21/25] drm/edid: convert cea_db_iter_edid_begin() to drm_edid Jani Nikula
2022-05-06 10:10 ` [PATCH 22/25] drm/edid: convert drm_edid_iter_begin() " Jani Nikula
2022-05-06 10:10 ` [PATCH 23/25] drm/edid: add drm_edid helper for drm_update_tile_info() Jani Nikula
2022-05-06 10:10 ` [PATCH 24/25] drm/displayid: convert to drm_edid Jani Nikula
2022-05-06 10:10 ` [PATCH 25/25] drm/edid: convert version_greater() " Jani Nikula
[not found] ` <165183552881.18818.4314029635057951024@emeril.freedesktop.org>
2022-05-06 11:42 ` amdgpu sparse warnings (was: Re: ✗ Fi.CI.SPARSE: warning for drm/edid: introduce struct drm_edid) Jani Nikula
2022-05-06 14:15 ` Deucher, Alexander
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=YnVfzUAAx0reZ4wX@intel.com \
--to=ville.syrjala@linux.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