[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e53e87b0-7e0a-763f-8b8b-0dc278e1f225@ti.com>
Date: Tue, 1 Sep 2020 11:34:45 +0300
From: Tomi Valkeinen <tomi.valkeinen@...com>
To: Swapnil Jakhade <sjakhade@...ence.com>, <airlied@...ux.ie>,
<daniel@...ll.ch>, <Laurent.pinchart@...asonboard.com>,
<robh+dt@...nel.org>, <a.hajda@...sung.com>,
<narmstrong@...libre.com>, <jonas@...boo.se>,
<jernej.skrabec@...l.net>, <dri-devel@...ts.freedesktop.org>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <mparab@...ence.com>, <yamonkar@...ence.com>, <jsarha@...com>,
<nsekhar@...com>, <praneeth@...com>, <nikhil.nd@...com>
Subject: Re: [PATCH v9 2/3] drm: bridge: Add support for Cadence MHDP8546
DPI/DP bridge
Hi Swapnil,
On 31/08/2020 11:23, Swapnil Jakhade wrote:
> + line_thresh1 = ((vs + 1) << 5) * 8 / bpp;
> + line_thresh2 = (pxlclock << 5) / 1000 / rate * (vs + 1) - (1 << 5);
> + line_thresh = line_thresh1 - line_thresh2 / mhdp->link.num_lanes;
> + line_thresh = (line_thresh >> 5) + 2;
These calculations do not seem to go correctly. There's no comment what's the logic here, but e.g.
for 640x480 (pxlclock 31500) with 1.62Gbps link, I get vs=4, and then the second line above comes to:
(31500 << 5) / 1000 / 162 * (4+1) - (1<<5) = -0.8888888888888893
The result is line_thresh of 100663299.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Powered by blists - more mailing lists