All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 4/9] common: edid: Search for valid timing in extension block
Date: Mon, 3 May 2021 15:00:09 +0200	[thread overview]
Message-ID: <a84b3ca4-cc13-d20f-dfde-a8d21f69d1c7@baylibre.com> (raw)
In-Reply-To: <20210422001434.11367-5-andre.przywara@arm.com>

Hi,

On 22/04/2021 02:14, Andre Przywara wrote:
> From: Jernej Skrabec <jernej.skrabec@siol.net>
> 
> One of my monitors have only 4k at 60 timing in base EDID block which is
> out of range for devices with HDMI 1.4. It turns out that it has
> additional detailed timings in CTA-861 Extension Block and two of them
> are appropriate for HDMI 1.4.
> 
> Add additional search for valid detailed timing in extension block.
> 
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> Acked-by: Andre Przywara <andre.przywara@arm.com>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  common/edid.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/common/edid.c b/common/edid.c
> index a6c875d9c8e..14d8836c360 100644
> --- a/common/edid.c
> +++ b/common/edid.c
> @@ -220,6 +220,24 @@ int edid_get_timing_validate(u8 *buf, int buf_size,
>  	/* Look for detailed timing in base EDID */
>  	found = edid_find_valid_timing(edid->monitor_details.descriptor, 4,
>  				       timing, mode_valid, mode_valid_priv);
> +
> +	/* Look for detailed timing in CTA-861 Extension Block */
> +	if (!found && edid->extension_flag && buf_size >= EDID_EXT_SIZE) {
> +		struct edid_cea861_info *info =
> +			(struct edid_cea861_info *)(buf + sizeof(*edid));
> +
> +		if (info->extension_tag == EDID_CEA861_EXTENSION_TAG) {
> +			int count = EDID_CEA861_DTD_COUNT(*info);
> +			int offset = info->dtd_offset;
> +			int size = count * sizeof(struct edid_detailed_timing);
> +
> +			if (offset >= 4 && offset + size < EDID_SIZE)
> +				found = edid_find_valid_timing(
> +					(u8*)info + offset, count, timing,
> +					mode_valid, mode_valid_priv);
> +		}
> +	}
> +
>  	if (!found)
>  		return -EINVAL;
>  
> 

Thanks for doing that, we had the same issue on Amlogic SoCs !

Neil

  reply	other threads:[~2021-05-03 13:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22  0:14 [PATCH v3 0/9] video: sunxi: rework DE2 driver Andre Przywara
2021-04-22  0:14 ` [PATCH v3 1/9] video: sunxi: Add mode_valid callback to sunxi_dw_hdmi Andre Przywara
2021-04-22  0:14 ` [PATCH v3 2/9] common: edid: check for digital display earlier Andre Przywara
2021-04-22  0:14 ` [PATCH v3 3/9] common: edid: extract code for detailed timing search Andre Przywara
2021-04-22  0:14 ` [PATCH v3 4/9] common: edid: Search for valid timing in extension block Andre Przywara
2021-05-03 13:00   ` Neil Armstrong [this message]
2021-04-22  0:14 ` [PATCH v3 5/9] video: sunxi: Use DW-HDMI hpd function Andre Przywara
2021-04-22  0:14 ` [PATCH v3 6/9] video: sunxi: Remove check for ddc-i2c-bus property Andre Przywara
2021-04-22  0:14 ` [PATCH v3 7/9] video: sunxi: Remove TV probe from DE2 Andre Przywara
2021-04-22  0:14 ` [PATCH v3 8/9] video: sunxi: dw-hdmi: read source_id later Andre Przywara
2021-04-22  0:14 ` [PATCH v3 9/9] video: sunxi: de2: switch to public uclass functions Andre Przywara
2021-04-24 14:39 ` [PATCH v3 0/9] video: sunxi: rework DE2 driver Anatolij Gustschin

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=a84b3ca4-cc13-d20f-dfde-a8d21f69d1c7@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=u-boot@lists.denx.de \
    /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.