mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Swapnil Jakhade <sjakhade@cadence.com>, <airlied@linux.ie>,
	<daniel@ffwll.ch>, <Laurent.pinchart@ideasonboard.com>,
	<robh+dt@kernel.org>, <a.hajda@samsung.com>,
	<narmstrong@baylibre.com>, <jonas@kwiboo.se>,
	<jernej.skrabec@siol.net>, <dri-devel@lists.freedesktop.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <mparab@cadence.com>, <yamonkar@cadence.com>, <jsarha@ti.com>,
	<nsekhar@ti.com>, <praneeth@ti.com>, <nikhil.nd@ti.com>
Subject: Re: [PATCH v9 2/3] drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge
Date: Tue, 1 Sep 2020 11:34:45 +0300	[thread overview]
Message-ID: <e53e87b0-7e0a-763f-8b8b-0dc278e1f225@ti.com> (raw)
In-Reply-To: <1598862215-10222-3-git-send-email-sjakhade@cadence.com>

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

  parent reply	other threads:[~2020-09-01  8:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31  8:23 [PATCH v9 0/3] drm: Add support for Cadence MHDP8546 DPI/DP bridge and J721E wrapper Swapnil Jakhade
2020-08-31  8:23 ` [PATCH v9 1/3] dt-bindings: drm/bridge: Document Cadence MHDP8546 bridge bindings Swapnil Jakhade
2020-08-31  8:23 ` [PATCH v9 2/3] drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge Swapnil Jakhade
2020-08-31 20:17   ` Laurent Pinchart
2020-09-01  7:46   ` Tomi Valkeinen
2020-09-01  8:03     ` Tomi Valkeinen
2020-09-04  2:29     ` Laurent Pinchart
2020-09-04  5:53       ` Tomi Valkeinen
2020-09-01  8:34   ` Tomi Valkeinen [this message]
2020-09-03  6:22     ` Milind Parab
2020-09-03  7:23       ` Tomi Valkeinen
2020-09-03  7:32         ` Milind Parab
2020-08-31  8:23 ` [PATCH v9 3/3] drm: bridge: cdns-mhdp8546: Add TI J721E wrapper Swapnil Jakhade

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=e53e87b0-7e0a-763f-8b8b-0dc278e1f225@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=jsarha@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mparab@cadence.com \
    --cc=narmstrong@baylibre.com \
    --cc=nikhil.nd@ti.com \
    --cc=nsekhar@ti.com \
    --cc=praneeth@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=sjakhade@cadence.com \
    --cc=yamonkar@cadence.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

all inboxes | Powered by JetHome®