All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: jani.nikula@intel.com, intel-gfx@lists.freedesktop.org
Subject: [CI RESEND 10/10] drm/edid: take HF-EEODB extension count into account
Date: Wed, 29 Jun 2022 12:27:55 +0300	[thread overview]
Message-ID: <c31b5796feb05c3ebac067600be2e88e098d7592.1656494768.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1656494768.git.jani.nikula@intel.com>

Take the HF-EEODB extension count override into account.

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 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index fa3a3e294560..bbc25e3b7220 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1629,6 +1629,19 @@ static int drm_edid_block_count(const struct drm_edid *drm_edid)
 	/* Starting point */
 	num_blocks = edid_block_count(drm_edid->edid);
 
+	/* HF-EEODB override */
+	if (drm_edid->size >= edid_size_by_blocks(2)) {
+		int eeodb;
+
+		/*
+		 * Note: HF-EEODB may specify a smaller extension count than the
+		 * regular one. Unlike in buffer allocation, here we can use it.
+		 */
+		eeodb = edid_hfeeodb_block_count(drm_edid->edid);
+		if (eeodb)
+			num_blocks = eeodb;
+	}
+
 	/* Limit by allocated size */
 	num_blocks = min(num_blocks, (int)drm_edid->size / EDID_LENGTH);
 
-- 
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: jani.nikula@intel.com, intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [CI RESEND 10/10] drm/edid: take HF-EEODB extension count into account
Date: Wed, 29 Jun 2022 12:27:55 +0300	[thread overview]
Message-ID: <c31b5796feb05c3ebac067600be2e88e098d7592.1656494768.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1656494768.git.jani.nikula@intel.com>

Take the HF-EEODB extension count override into account.

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 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index fa3a3e294560..bbc25e3b7220 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1629,6 +1629,19 @@ static int drm_edid_block_count(const struct drm_edid *drm_edid)
 	/* Starting point */
 	num_blocks = edid_block_count(drm_edid->edid);
 
+	/* HF-EEODB override */
+	if (drm_edid->size >= edid_size_by_blocks(2)) {
+		int eeodb;
+
+		/*
+		 * Note: HF-EEODB may specify a smaller extension count than the
+		 * regular one. Unlike in buffer allocation, here we can use it.
+		 */
+		eeodb = edid_hfeeodb_block_count(drm_edid->edid);
+		if (eeodb)
+			num_blocks = eeodb;
+	}
+
 	/* Limit by allocated size */
 	num_blocks = min(num_blocks, (int)drm_edid->size / EDID_LENGTH);
 
-- 
2.30.2


  parent reply	other threads:[~2022-06-29  9:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29  9:27 [CI RESEND 00/10] drm/edid: expand on struct drm_edid usage Jani Nikula
2022-06-29  9:27 ` [Intel-gfx] " Jani Nikula
2022-06-29  9:27 ` [CI RESEND 01/10] drm/edid: move drm_connector_update_edid_property() to drm_edid.c Jani Nikula
2022-06-29  9:27   ` [Intel-gfx] " Jani Nikula
2022-06-29  9:27 ` [CI RESEND 02/10] drm/edid: convert drm_connector_update_edid_property() to struct drm_edid Jani Nikula
2022-06-29  9:27   ` [Intel-gfx] " Jani Nikula
2022-06-29  9:27 ` [CI RESEND 03/10] drm/edid: clean up connector update error handling and debug logging Jani Nikula
2022-06-29  9:27   ` [Intel-gfx] " Jani Nikula
2022-06-29  9:27 ` [CI RESEND 04/10] drm/edid: abstract debugfs override EDID set/reset Jani Nikula
2022-06-29  9:27   ` [Intel-gfx] " Jani Nikula
2022-06-29  9:27 ` [CI RESEND 05/10] drm/edid: add drm_edid_connector_update() Jani Nikula
2022-06-29  9:27   ` [Intel-gfx] " Jani Nikula
2022-06-29  9:27 ` [CI RESEND 06/10] drm/probe-helper: add drm_connector_helper_get_modes() Jani Nikula
2022-06-29  9:27   ` [Intel-gfx] " Jani Nikula
2022-06-29  9:27 ` [CI RESEND 07/10] drm/edid: add drm_edid_raw() to access the raw EDID data Jani Nikula
2022-06-29  9:27   ` [Intel-gfx] " Jani Nikula
2022-06-29  9:27 ` [CI RESEND 08/10] drm/edid: do invalid block filtering in-place Jani Nikula
2022-06-29  9:27   ` [Intel-gfx] " Jani Nikula
2022-06-29  9:27 ` [CI RESEND 09/10] drm/edid: add HF-EEODB support to EDID read and allocation Jani Nikula
2022-06-29  9:27   ` [Intel-gfx] " Jani Nikula
2022-06-29  9:27 ` Jani Nikula [this message]
2022-06-29  9:27   ` [Intel-gfx] [CI RESEND 10/10] drm/edid: take HF-EEODB extension count into account Jani Nikula
2022-06-29 11:27 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/edid: expand on struct drm_edid usage (rev8) Patchwork
2022-06-29 11:55 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-06-30  3:55 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-06-30  9:55 ` [CI RESEND 00/10] drm/edid: expand on struct drm_edid usage Jani Nikula
2022-06-30  9:55   ` [Intel-gfx] " Jani Nikula

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=c31b5796feb05c3ebac067600be2e88e098d7592.1656494768.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@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 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.