All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
To: Laurent.pinchart@ideasonboard.com
Cc: kernel@collabora.com, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org, jason@lakedaemon.net,
	tomi.valkeinen@ti.com, robh+dt@kernel.org, airlied@linux.ie
Subject: [PATCH v4 4/4] drm/bridge: tfp410: Fix setup and hold time calculation
Date: Wed, 17 Jun 2020 11:46:33 +0200	[thread overview]
Message-ID: <20200617094633.19663-5-ricardo.canuelo@collabora.com> (raw)
In-Reply-To: <20200617094633.19663-1-ricardo.canuelo@collabora.com>

This fixes a bug in the calculation of the setup and hold times based on
the deskew configuration.

Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/bridge/ti-tfp410.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
index dfde811f3411..21d99b4ea0c9 100644
--- a/drivers/gpu/drm/bridge/ti-tfp410.c
+++ b/drivers/gpu/drm/bridge/ti-tfp410.c
@@ -278,8 +278,8 @@ static int tfp410_parse_timings(struct tfp410 *dvi, bool i2c)
 	if (deskew > 7)
 		return -EINVAL;
 
-	timings->setup_time_ps = min(0, 1200 - 350 * ((s32)deskew - 4));
-	timings->hold_time_ps = min(0, 1300 + 350 * ((s32)deskew - 4));
+	timings->setup_time_ps = 1200 - 350 * ((s32)deskew - 4);
+	timings->hold_time_ps = max(0, 1300 + 350 * ((s32)deskew - 4));
 
 	return 0;
 }
-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
To: Laurent.pinchart@ideasonboard.com
Cc: devicetree@vger.kernel.org, jason@lakedaemon.net,
	airlied@linux.ie, dri-devel@lists.freedesktop.org,
	robh+dt@kernel.org, tomi.valkeinen@ti.com, kernel@collabora.com,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 4/4] drm/bridge: tfp410: Fix setup and hold time calculation
Date: Wed, 17 Jun 2020 11:46:33 +0200	[thread overview]
Message-ID: <20200617094633.19663-5-ricardo.canuelo@collabora.com> (raw)
In-Reply-To: <20200617094633.19663-1-ricardo.canuelo@collabora.com>

This fixes a bug in the calculation of the setup and hold times based on
the deskew configuration.

Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/bridge/ti-tfp410.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
index dfde811f3411..21d99b4ea0c9 100644
--- a/drivers/gpu/drm/bridge/ti-tfp410.c
+++ b/drivers/gpu/drm/bridge/ti-tfp410.c
@@ -278,8 +278,8 @@ static int tfp410_parse_timings(struct tfp410 *dvi, bool i2c)
 	if (deskew > 7)
 		return -EINVAL;
 
-	timings->setup_time_ps = min(0, 1200 - 350 * ((s32)deskew - 4));
-	timings->hold_time_ps = min(0, 1300 + 350 * ((s32)deskew - 4));
+	timings->setup_time_ps = 1200 - 350 * ((s32)deskew - 4);
+	timings->hold_time_ps = max(0, 1300 + 350 * ((s32)deskew - 4));
 
 	return 0;
 }
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
To: Laurent.pinchart@ideasonboard.com
Cc: devicetree@vger.kernel.org, jason@lakedaemon.net,
	airlied@linux.ie, dri-devel@lists.freedesktop.org,
	robh+dt@kernel.org, tomi.valkeinen@ti.com, kernel@collabora.com,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 4/4] drm/bridge: tfp410: Fix setup and hold time calculation
Date: Wed, 17 Jun 2020 11:46:33 +0200	[thread overview]
Message-ID: <20200617094633.19663-5-ricardo.canuelo@collabora.com> (raw)
In-Reply-To: <20200617094633.19663-1-ricardo.canuelo@collabora.com>

This fixes a bug in the calculation of the setup and hold times based on
the deskew configuration.

Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/bridge/ti-tfp410.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
index dfde811f3411..21d99b4ea0c9 100644
--- a/drivers/gpu/drm/bridge/ti-tfp410.c
+++ b/drivers/gpu/drm/bridge/ti-tfp410.c
@@ -278,8 +278,8 @@ static int tfp410_parse_timings(struct tfp410 *dvi, bool i2c)
 	if (deskew > 7)
 		return -EINVAL;
 
-	timings->setup_time_ps = min(0, 1200 - 350 * ((s32)deskew - 4));
-	timings->hold_time_ps = min(0, 1300 + 350 * ((s32)deskew - 4));
+	timings->setup_time_ps = 1200 - 350 * ((s32)deskew - 4);
+	timings->hold_time_ps = max(0, 1300 + 350 * ((s32)deskew - 4));
 
 	return 0;
 }
-- 
2.18.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-06-17  9:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17  9:46 [PATCH v4 0/4] dt-bindings: display: ti,tfp410.txt: convert to yaml Ricardo Cañuelo
2020-06-17  9:46 ` Ricardo Cañuelo
2020-06-17  9:46 ` Ricardo Cañuelo
2020-06-17  9:46 ` [PATCH v4 1/4] " Ricardo Cañuelo
2020-06-17  9:46   ` Ricardo Cañuelo
2020-06-17  9:46   ` Ricardo Cañuelo
2020-06-17  9:46 ` [PATCH v4 2/4] dt-bindings: display: ti,tfp410.yaml: Redefine ti,deskew property Ricardo Cañuelo
2020-06-17  9:46   ` [PATCH v4 2/4] dt-bindings: display: ti, tfp410.yaml: Redefine ti, deskew property Ricardo Cañuelo
2020-06-17  9:46   ` Ricardo Cañuelo
2020-06-17  9:46 ` [PATCH v4 3/4] drm/bridge: tfp410: fix de-skew value retrieval from DT Ricardo Cañuelo
2020-06-17  9:46   ` Ricardo Cañuelo
2020-06-17  9:46   ` Ricardo Cañuelo
2020-06-17  9:46 ` Ricardo Cañuelo [this message]
2020-06-17  9:46   ` [PATCH v4 4/4] drm/bridge: tfp410: Fix setup and hold time calculation Ricardo Cañuelo
2020-06-17  9:46   ` Ricardo Cañuelo
2020-06-20 19:10 ` [PATCH v4 0/4] dt-bindings: display: ti,tfp410.txt: convert to yaml Sam Ravnborg
2020-06-20 19:10   ` Sam Ravnborg
2020-06-20 19:10   ` Sam Ravnborg

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=20200617094633.19663-5-ricardo.canuelo@collabora.com \
    --to=ricardo.canuelo@collabora.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jason@lakedaemon.net \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=tomi.valkeinen@ti.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 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.