From: "Navare, Manasi" <manasi.d.navare@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [i-g-t 2/5] lib/igt_edid: Helper to read monitor range from EDID
Date: Thu, 3 Mar 2022 17:07:07 -0800 [thread overview]
Message-ID: <20220304010707.GA5029@labuser-Z97X-UD5H> (raw)
In-Reply-To: <20220224051648.91470-3-bhanuprakash.modem@intel.com>
On Thu, Feb 24, 2022 at 10:46:45AM +0530, Bhanuprakash Modem wrote:
> Add a helper function to read Monitor's range capability
> from EDID.
>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> lib/igt_edid.c | 24 ++++++++++++++++++++++++
> lib/igt_edid.h | 2 ++
> 2 files changed, 26 insertions(+)
>
> diff --git a/lib/igt_edid.c b/lib/igt_edid.c
> index df346c4c8c..bd677f49b8 100644
> --- a/lib/igt_edid.c
> +++ b/lib/igt_edid.c
> @@ -160,6 +160,30 @@ void detailed_timing_set_monitor_range_mode(struct detailed_timing *dt,
> sizeof(monitor_range_padding));
> }
>
> +struct detailed_data_monitor_range
> +detailed_timing_get_monitor_range(const struct edid *edid)
> +{
> + uint8_t i;
> + struct detailed_data_monitor_range mr = {0, 0};
> +
> + for (i = 0; i < DETAILED_TIMINGS_LEN; i++) {
> + struct detailed_non_pixel *other_data;
> + struct detailed_timing timings = edid->detailed_timings[i];
> +
> + if (timings.pixel_clock[0] != 0 &&
> + timings.pixel_clock[1] != 0)
> + continue;
What is this check checking?
> +
> + other_data = &timings.data.other_data;
> + if (other_data->type != EDID_DETAIL_MONITOR_RANGE)
> + continue;
> +
> + return other_data->data.range;
Did you mean to assign this range to mr here as that is what we return
Manasi
> + }
> +
> + return mr;
> +}
> +
> /**
> * detailed_timing_set_string: set a detailed timing to be a string
> */
> diff --git a/lib/igt_edid.h b/lib/igt_edid.h
> index aac2f4a208..e412479d84 100644
> --- a/lib/igt_edid.h
> +++ b/lib/igt_edid.h
> @@ -381,6 +381,8 @@ void detailed_timing_set_mode(struct detailed_timing *dt, drmModeModeInfo *mode,
> int width_mm, int height_mm);
> void detailed_timing_set_monitor_range_mode(struct detailed_timing *dt,
> drmModeModeInfo *mode);
> +struct detailed_data_monitor_range detailed_timing_get_monitor_range(
> + const struct edid *edid);
> void detailed_timing_set_string(struct detailed_timing *dt,
> enum detailed_non_pixel_type type,
> const char *str);
> --
> 2.35.0
>
next prev parent reply other threads:[~2022-03-04 1:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 5:16 [igt-dev] [i-g-t 0/5] Add Negative tests to VRR Bhanuprakash Modem
2022-02-24 5:16 ` [igt-dev] [i-g-t 1/5] tests/kms_vrr: Create dynamic subtests Bhanuprakash Modem
2022-03-04 1:01 ` Navare, Manasi
2022-02-24 5:16 ` [igt-dev] [i-g-t 2/5] lib/igt_edid: Helper to read monitor range from EDID Bhanuprakash Modem
2022-02-24 8:32 ` [igt-dev] [v2 i-g-t " Bhanuprakash Modem
2022-03-04 1:07 ` Navare, Manasi [this message]
2022-03-04 3:12 ` [igt-dev] [i-g-t " Modem, Bhanuprakash
2022-02-24 5:16 ` [igt-dev] [i-g-t 3/5] tests/kms_vrr: Add Negative tests to validate VRR Bhanuprakash Modem
2022-03-04 1:20 ` Navare, Manasi
2022-03-04 4:02 ` Modem, Bhanuprakash
2022-03-07 4:57 ` Modem, Bhanuprakash
2022-03-07 20:06 ` Navare, Manasi
2022-03-08 4:13 ` Modem, Bhanuprakash
2022-02-24 5:16 ` [igt-dev] [i-g-t 4/5] tests/kms_vrr: Add a test for VRR range capability Bhanuprakash Modem
2022-02-24 5:16 ` [igt-dev] [i-g-t 5/5] HAX: Add VRR negative tests to BAT Bhanuprakash Modem
2022-02-24 6:53 ` [igt-dev] ✓ Fi.CI.BAT: success for Add Negative tests to VRR (rev3) Patchwork
2022-02-24 8:59 ` [igt-dev] ✗ GitLab.Pipeline: warning for Add Negative tests to VRR (rev4) Patchwork
2022-02-24 9:27 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2022-02-24 18:53 ` [igt-dev] ✓ Fi.CI.IGT: success for Add Negative tests to VRR (rev3) Patchwork
2022-02-24 22:01 ` [igt-dev] ✗ Fi.CI.IGT: failure for Add Negative tests to VRR (rev4) 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=20220304010707.GA5029@labuser-Z97X-UD5H \
--to=manasi.d.navare@intel.com \
--cc=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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