All of lore.kernel.org
 help / color / mirror / Atom feed
From: joevt <joevt@shaw.ca>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org
Subject: [PATCH 3/5] edid-decode: more back/front porch switching
Date: Wed,  4 Dec 2019 23:34:12 -0800	[thread overview]
Message-ID: <20191205073414.53672-3-joevt@shaw.ca> (raw)
In-Reply-To: <20191205073414.53672-1-joevt@shaw.ca>

Fix more instances where back porch is actually front porch (problem started when "so = sync offset" was mistaken for "bp = back porch" instead of "fp = front porch").

Signed-off-by: Joe van Tunen <joevt@shaw.ca>
---
 parse-base-block.cpp      | 12 ++++++------
 parse-displayid-block.cpp |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/parse-base-block.cpp b/parse-base-block.cpp
index 2d384e8..0b6e3d0 100644
--- a/parse-base-block.cpp
+++ b/parse-base-block.cpp
@@ -1302,13 +1302,13 @@ void edid_state::detailed_timings(const char *prefix, const unsigned char *x)
 
 	bool ok = true;
 
-	if (!t.w || !hbl || !t.hbp || !t.hsync || !t.h || !vbl || !t.vbp || !t.vsync) {
+	if (!t.w || !hbl || !t.hfp || !t.hsync || !t.h || !vbl || !t.vfp || !t.vsync) {
 		fail("0 values in the detailed timings:\n"
 		     "    Horizontal Active/Blanking %u/%u\n"
-		     "    Horizontal Backporch/Sync Width %u/%u\n"
+		     "    Horizontal Frontporch/Sync Width %u/%u\n"
 		     "    Vertical Active/Blanking %u/%u\n"
-		     "    Vertical Backporch/Sync Width %u/%u\n",
-		     t.w, hbl, t.hbp, t.hsync, t.h, vbl, t.vbp, t.vsync);
+		     "    Vertical Frontporch/Sync Width %u/%u\n",
+		     t.w, hbl, t.hfp, t.hsync, t.h, vbl, t.vfp, t.vsync);
 		ok = false;
 	}
 
@@ -1324,10 +1324,10 @@ void edid_state::detailed_timings(const char *prefix, const unsigned char *x)
 	       t.pixclk_khz / 1000.0,
 	       t.hor_mm, t.vert_mm,
 	       prefix,
-	       t.w, t.w + t.hbp, t.w + t.hbp + t.hsync, t.w + hbl, t.hfp, t.hsync, t.hbp,
+	       t.w, t.w + t.hfp, t.w + t.hfp + t.hsync, t.w + hbl, t.hfp, t.hsync, t.hbp,
 	       t.hborder ? (std::string(" hborder ") + std::to_string(t.hborder)).c_str() : "",
 	       prefix,
-	       t.h, t.h + t.vbp, t.h + t.vbp + t.vsync, t.h + vbl, t.vfp, t.vsync, t.vbp,
+	       t.h, t.h + t.vfp, t.h + t.vfp + t.vsync, t.h + vbl, t.vfp, t.vsync, t.vbp,
 	       t.vborder ? (std::string(" vborder ") + std::to_string(t.vborder)).c_str() : "",
 	       prefix,
 	       s_sync.c_str(), s_flags.c_str(),
diff --git a/parse-displayid-block.cpp b/parse-displayid-block.cpp
index 403ae7b..3ac3d92 100644
--- a/parse-displayid-block.cpp
+++ b/parse-displayid-block.cpp
@@ -176,8 +176,8 @@ static void parse_displayid_detailed_timing(const unsigned char *x)
 	       "                   %chsync %cvsync\n"
 	       "                   VertFreq: %.3f Hz, HorFreq: %.3f kHz\n",
 	       (double)t.pixclk_khz/1000.0, s.c_str(),
-	       t.w, t.w + t.hbp, t.w + t.hbp + t.hsync, t.w + hbl, t.hfp, t.hsync, t.hbp,
-	       t.h, t.h + t.vbp, t.h + t.vbp + t.vsync, t.h + vbl, t.vfp, t.vsync, t.vbp,
+	       t.w, t.w + t.hfp, t.w + t.hfp + t.hsync, t.w + hbl, t.hfp, t.hsync, t.hbp,
+	       t.h, t.h + t.vfp, t.h + t.vfp + t.vsync, t.h + vbl, t.vfp, t.vsync, t.vbp,
 	       t.pos_pol_hsync ? '+' : '-', t.pos_pol_vsync ? '+' : '-',
 	       (t.pixclk_khz * 1000.0) / ((t.w + hbl) * (t.h + vbl)),
 	       (double)(t.pixclk_khz) / (t.w + hbl)
-- 
2.21.0 (Apple Git-122.2)


  parent reply	other threads:[~2019-12-05  7:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05  7:34 [PATCH 1/5] edid-decode: DisplayID additions joevt
2019-12-05  7:34 ` [PATCH 2/5] edid-decode: Change horizontal frequency to kHz joevt
2019-12-05  7:34 ` joevt [this message]
2019-12-05  7:34 ` [PATCH 4/5] edid-decode: CTA extension block cleanup joevt
2019-12-05  9:38   ` Hans Verkuil
2019-12-05 13:52     ` Joe van Tunen
2020-01-15 11:52       ` Hans Verkuil
2019-12-05  7:34 ` [PATCH 5/5] edid-decode: add missing space joevt

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=20191205073414.53672-3-joevt@shaw.ca \
    --to=joevt@shaw.ca \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.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.