From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
robh+dt@kernel.org, kernel@collabora.com,
devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org, jason@lakedaemon.net
Subject: Re: [RFC PATCH] dt-bindings: display: ti,tfp410.txt: convert to yaml
Date: Wed, 13 May 2020 17:08:32 +0300 [thread overview]
Message-ID: <20200513140832.GI5945@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20200513110957.dgb3axle24pmqp3a@rcn-XPS-13-9360>
Hi Ricardo,
On Wed, May 13, 2020 at 01:09:57PM +0200, Ricardo Cañuelo wrote:
> On mié 06-05-2020 18:53:20, Laurent Pinchart wrote:
> > I didn't if I remember correctly, I just mapped it to the hardware
> > features. The hardware register indeed takes a value between 0 and 7,
> > and that is mapped to [-4,3] x t(STEP). I don't mind either option.
>
> I was taking a look at the ti-tfp410.c driver to see if it needs any
> changes to support the updated deskew property ranges [0-7], but I don't
> fully understand what this does (line 276):
>
> /* Get the setup and hold time from vendor-specific properties. */
> of_property_read_u32(dvi->dev->of_node, "ti,deskew", (u32 *)&deskew);
> if (deskew < -4 || deskew > 3)
> return -EINVAL;
>
> timings->setup_time_ps = min(0, 1200 - 350 * deskew);
> timings->hold_time_ps = min(0, 1300 + 350 * deskew);
>
> It looks like that the driver doesn't really apply the deskew settings
> to the device and that this has not been really tested, so it's probably
> not a big deal.
The driver doesn't apply any setting to the device :-) The ti,deskew
property is meant to report the deskew settings selected by the chip's
configuration pins, not to set a value to be programmed to the device.
> I guess what you wanted to do was to adjust the setup and hold times
> around 1200 and 1300 ps respectively in increments/decrements of 350 ps
> depending on the deskew value, as the datasheet describes. But this code
> would set timings->setup_time_ps to 0 regardless of the deskew value,
> and timings->hold_time_ps would be either 0 or a very big integer value
> if deskew is -4 (both setup_time_ps and hold_time_ps are u32).
>
> Am I missing something? Was this intentional?
Oops. That's embarassing... It should clearly be a max(), not a min().
And only for hold_time_ps is this required.
Would you like to send a patch, or should I do so ?
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2020-05-13 14:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 9:20 [RFC PATCH] dt-bindings: display: ti,tfp410.txt: convert to yaml Ricardo Cañuelo
2020-04-28 9:49 ` Tomi Valkeinen
2020-05-06 7:21 ` Ricardo Cañuelo
2020-05-06 8:01 ` Tomi Valkeinen
2020-05-06 8:28 ` Ricardo Cañuelo
2020-05-06 8:33 ` Tomi Valkeinen
2020-05-06 15:53 ` Laurent Pinchart
2020-05-11 14:59 ` Ricardo Cañuelo
2020-05-11 16:26 ` Sam Ravnborg
2020-05-12 2:09 ` Rob Herring
2020-05-13 11:09 ` Ricardo Cañuelo
2020-05-13 14:08 ` Laurent Pinchart [this message]
2020-05-13 14:20 ` Ricardo Cañuelo
2020-04-28 19:21 ` Sam Ravnborg
2020-04-29 8:54 ` Ricardo Cañuelo
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=20200513140832.GI5945@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--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=ricardo.canuelo@collabora.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).