From: Marek Vasut <marex@denx.de>
To: Adam Ford <aford173@gmail.com>
Cc: Alexander Stein <Alexander.Stein@ew.tq-group.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Fancy Fang <chen.fang@nxp.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
Joonyoung Shim <jy0922.shim@samsung.com>,
Neil Armstrong <narmstrong@linaro.org>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
Tommaso Merciai <tommaso.merciai@amarulasolutions.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
NXP Linux Team <linux-imx@nxp.com>,
Matteo Lisi <matteo.lisi@engicam.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Robert Foss <robert.foss@linaro.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
linux-amarula <linux-amarula@amarulasolutions.com>
Subject: Re: [PATCH v10 00/18] drm: Add Samsung MIPI DSIM bridge
Date: Sun, 18 Dec 2022 23:28:20 +0100 [thread overview]
Message-ID: <449d03be-226f-9a90-aff3-8afee68c346d@denx.de> (raw)
In-Reply-To: <CAHCN7xL1qqhFkroBUswpSyTGUFo6B26rmp0zRL2K8ATT4HtUGg@mail.gmail.com>
On 12/18/22 23:24, Adam Ford wrote:
> On Sat, Dec 17, 2022 at 10:33 PM Marek Vasut <marex@denx.de> wrote:
>>
>> On 12/18/22 05:23, Adam Ford wrote:
>>> On Sat, Dec 17, 2022 at 5:56 PM Marek Vasut <marex@denx.de> wrote:
>>>>
>>>> On 12/16/22 14:25, Alexander Stein wrote:
>>>> Hi,
>>>>
>>>> [...]
>>>>
>>>>> Oh, nice, thanks for the pointer. When setting
>>>>>> samsung,burst-clock-frequency = <668250000>;
>>>>> in imx8mm.dtsi
>>>>> I get a non-flickering display using 4 lanes. Although admittedly this is just
>>>>> random guessing. I'm not sure which clock exactly has to be in the range
>>>>> CHA_DSI_CLK_RANGE is configured to. With 4 lanes SN65DSI84 is configured for
>>>>> 205-210 MHz (0x29), while I get these PLL PMS settings on DSIM:
>>>>>> samsung-dsim 32e10000.dsi: PLL freq 668250000, (p 4, m 99, s 0)
>>>>>> samsung-dsim 32e10000.dsi: hs_clk = 668250000, byte_clk = 83531250, esc_clk
>>>>> = 16706250
>>>>
>>>> If I recall it right, minimum PLL frequency is:
>>>>
>>>> fPMS=1.2*width*height*bpp*fps=1.2*800*480*24*60=663.5 MHz
>>>>
>>>> the link frequency is then
>>>>
>>>> fHS=fPMS/lanes/2=82.9 MHz (on the DDR clock lane)
>>>>
>>>> So DSI83 should be in the range of 80..85 MHz input clock if I calculate
>>>> this right. Can you check what is the value of mode->clock, the
>>>> mipi_dsi_panel_format_to_bpp() return value, ctx->dsi->lanes in dsi83
>>>> sm65dsi83_get_dsi_range() ?
>>>>
>>>>> AFAICS DSIM bridge is configurung hs_clk, byte_clk and esc_clk just from DT
>>>>> properties, while SN65DSI84 is using display mode and number of lanes.
>>>>>
>>>>> Is it expected that the DSIM PLL frequencies are set in DT for a specific
>>>>> bridge/display setup?
>>>>
>>>> No, there should be negotiation between the host and bridge/panel, I
>>>> tried to propose two variants, but they were all rejected.
>>>
>>> For one of Jagan's previous revisions, I added some code to let the
>>> PHY auto adjust the frequencies instead of being fixed. NXP had this
>>> in their downstream kernel, but with this patch and another, I was
>>> able to set a variety of pixel clocks from my HDMI monitor and my
>>> DSI83. I haven't had time to re-base my work on Jagan's latest work,
>>> but you can link to the patch I did for the older stuff here:
>>>
>>> https://github.com/aford173/linux/commit/e845274b0f22ba3b24813ffd6bb3cb88ab4b67e4
>>> and
>>> https://github.com/aford173/linux/commit/3f90057eb608f96d106029ef639813475241936f
>>>
>>> I've been traveling a lot lately, so I haven't had time to evaluate
>>> his series, but I hope to get something like those re-based once the
>>> DSI stuff has been accepted.
>>
>> I have these two attempts, both rejected:
>>
>> https://patchwork.freedesktop.org/patch/475207/
>> https://patchwork.freedesktop.org/patch/496049/
>
> I have some patches re-based to Jagan's latest branch. It doesn't
> impact any drivers other than the new samsung-dsim driver, and it
> doesn't touch any of the drm helper functions either. It adjusts hs
> clock based on the connected device. I am not sure what the impact
> will have on the attached Exynos devices, so I am expecting some
> iterations. Right now it's working with my DSI83 chip, but I need to
> get it working with my adv7535 part as well. On the older branch, I
> was able to sync the ad7535 with a variety of resolutions using
> different pixel clock rates.
>
> Once I get it working again with my adv7535 and cleaned up, I'll
> submit the patches to the drm group, and I'll CC you, Jagan and Marek
> Szyprowski with a reference to Jagan's series so people wanting to try
> it can apply it to his branch.
The negotiation has to happen between the host and the bridge/panel,
otherwise you won't be able to support bridge/panel devices which
require specific clock rate on the DSI. Only the bridge/panel driver
knows about such requirement.
next prev parent reply other threads:[~2022-12-18 22:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 13:25 [PATCH v10 00/18] drm: Add Samsung MIPI DSIM bridge Alexander Stein
2022-12-17 23:55 ` Marek Vasut
2022-12-18 4:23 ` Adam Ford
2022-12-18 4:33 ` Marek Vasut
2022-12-18 22:24 ` Adam Ford
2022-12-18 22:28 ` Marek Vasut [this message]
2023-01-03 10:59 ` Alexander Stein
2023-01-04 15:08 ` Marek Vasut
2023-01-20 19:10 ` Maxime Ripard
2023-01-03 9:51 ` Alexander Stein
2023-01-04 15:07 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2022-12-16 12:41 Alexander Stein
2022-12-16 12:58 ` Marek Vasut
2022-12-14 12:58 Jagan Teki
2023-01-05 10:24 ` Jagan Teki
2023-01-06 14:34 ` Adam Ford
2023-01-06 14:42 ` Fabio Estevam
2023-01-19 17:27 ` Fabio Estevam
2023-01-19 17:58 ` Jagan Teki
2023-01-20 12:06 ` Fabio Estevam
2023-01-20 14:41 ` Jagan Teki
2023-01-20 15:06 ` Marek Vasut
2023-01-20 18:54 ` Jagan Teki
2023-01-20 19:08 ` Marek Vasut
2023-01-20 18:59 ` Dave Stevenson
2023-01-23 12:22 ` Jagan Teki
2023-01-23 15:48 ` Jagan Teki
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=449d03be-226f-9a90-aff3-8afee68c346d@denx.de \
--to=marex@denx.de \
--cc=Alexander.Stein@ew.tq-group.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=aford173@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=chen.fang@nxp.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frieder.schrempf@kontron.de \
--cc=jagan@amarulasolutions.com \
--cc=jy0922.shim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=matteo.lisi@engicam.com \
--cc=michael@amarulasolutions.com \
--cc=narmstrong@linaro.org \
--cc=robert.foss@linaro.org \
--cc=sw0312.kim@samsung.com \
--cc=tommaso.merciai@amarulasolutions.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