From: "sandy.huang" <hjc@rock-chips.com>
To: Maxime Ripard <maxime@cerno.tech>,
Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Heiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
linux-rockchip@lists.infradead.org,
Rob Herring <robh+dt@kernel.org>, Daniel Vetter <daniel@ffwll.ch>,
hjc@rock-chips.com, andy.yan@rock-chips.com,
tao.huang@rock-chips.com
Subject: Re: [PATCH 09/12] drm/rockchip: lvds: Add PX30 support
Date: Wed, 18 Dec 2019 14:26:59 +0800 [thread overview]
Message-ID: <cdf3ee27-b099-b119-483b-af4fe4a75de4@rock-chips.com> (raw)
In-Reply-To: <64f6c582-8ffd-1082-f161-1e8c1a8dda44@rock-chips.com>
Hi
some mistakes with last mail, so resend this mail.
在 2019/12/18 上午11:17, sandy.huang 写道:
> Hi Maxime & Miquel,
>
> 在 2019/12/16 下午7:14, Maxime Ripard 写道:
>> On Mon, Dec 16, 2019 at 12:03:12PM +0100, Miquel Raynal wrote:
>>> Maxime Ripard <maxime@cerno.tech> wrote on Mon, 16 Dec 2019 11:58:27
>>> +0100:
>>>> Hi,
>>>>
>>>> On Fri, Dec 13, 2019 at 07:10:48PM +0100, Miquel Raynal wrote:
>>>>> +static int px30_lvds_grf_config(struct drm_encoder *encoder,
>>>>> + struct drm_display_mode *mode)
>>>>> +{
>>>>> + struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
>>>>> + u8 nhsync = !(mode->flags & DRM_MODE_FLAG_PHSYNC);
>>>>> + u8 nvsync = !(mode->flags & DRM_MODE_FLAG_PVSYNC);
>>>>> + u8 ndclk = !(mode->flags & DRM_MODE_FLAG_PCSYNC);
>>>>> + int ret;
>>>>> +
>>>>> + if (lvds->output != DISPLAY_OUTPUT_LVDS) {
>>>>> + DRM_DEV_ERROR(lvds->dev, "Unsupported display output %d\n",
>>>>> + lvds->output);
>>>>> + return -EINVAL;
>>>>> + }
>>>>> +
>>>>> + if (nhsync ^ nvsync) {
>>>>> + DRM_DEV_ERROR(lvds->dev, "Unsupported Hsync/Vsync
>>>>> polarity\n");
>>>>> + return -EINVAL;
>>>>> + }
>>>>> +
>>>>> + /* Set format */
>>>>> + ret = regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
>>>>> + PX30_LVDS_FORMAT(lvds->format),
>>>>> + PX30_LVDS_FORMAT(lvds->format));
>>>>> + if (ret)
>>>>> + return ret;
>>>>> +
>>>>> + /* Control Hsync/Vsync polarity */
>>>>> + ret = regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON0,
>>>>> + PX30_LVDS_TIE_CLKS(1),
>>>>> + PX30_LVDS_TIE_CLKS(1));
>>>>> + if (ret)
>>>>> + return ret;
>>>>> +
>>>>> + /* Set Hsync/Vsync polarity */
>>>>> + ret = regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON0,
>>>>> + PX30_LVDS_INVERT_CLKS(1),
>>>>> + PX30_LVDS_INVERT_CLKS(nhsync));
>>>>> + if (ret)
>>>>> + return ret;
>>>> I don't know the hardware but it seems pretty weird to me. hsync and
>>>> vsync in LVDS are not clocks (or even signals), they're a bit in the
>>>> payload. Is there any explanation in the datasheet (or even a
>>>> datasheet in the first place)?
>>> There is no explanation about this in the PX30 TRM part 1 (public). But
>>> you are right the naming is weird. Could the "tie clocks" thing above
>>> mean something to you/people knowing the LVDS world?
>> I have no idea what that could mean :)
>
> This two bit(GRF_CON0[9,8]) is not for hsync/vsync polarity config,
> the polarity is done at vop_crtc_atomic_enable@rockchip_drm_vop.c.
>
> Before px30, all rockchip platform lvds output payload is include
> hsync,vsync and den clock signal. About years ago, we meet a lvds
> panel can't work normally at rk3288, from the panel spec we know the
> panel need lvds work den mode only, the hsync/vsync need to set 0 at
> blank time, so we add this two bit(GRF_CON0[9,8]) for this mode.
>
> but now we can't get in touch with the customer and get the panel to
> test this function, so we can't verify the panel work unnormally is
> because of the den mode only and the hsync vsync signal level at
> blank time.
>
> I recommend not including this part of configuration before we test
> this funcion at den mode only lvds panel,thanks.
>
>>
>> Maxime
>>
>> _______________________________________________
>> Linux-rockchip mailing list
>> Linux-rockchip@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
next prev parent reply other threads:[~2019-12-18 6:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 18:10 [PATCH 00/12] Add PX30 LVDS support Miquel Raynal
2019-12-13 18:10 ` [PATCH 01/12] dt-bindings: display: rockchip-lvds: Declare PX30 compatible Miquel Raynal
2019-12-19 23:47 ` Rob Herring
2019-12-13 18:10 ` [PATCH 02/12] dt-bindings: display: rockchip-lvds: Document PX30 PHY Miquel Raynal
2019-12-16 10:48 ` Maxime Ripard
2019-12-13 18:10 ` [PATCH 03/12] drm/rockchip: lvds: Fix indentation of a #define Miquel Raynal
2019-12-13 18:10 ` [PATCH 04/12] drm/rockchip: lvds: Harmonize function names Miquel Raynal
2019-12-13 18:10 ` [PATCH 05/12] drm/rockchip: lvds: Change platform data Miquel Raynal
2019-12-13 18:10 ` [PATCH 06/12] drm/rockchip: lvds: Create an RK3288 specific probe function Miquel Raynal
2019-12-13 18:10 ` [PATCH 07/12] drm/rockchip: lvds: Helpers should return decent values Miquel Raynal
2019-12-13 18:10 ` [PATCH 08/12] drm/rockchip: lvds: Pack functions together Miquel Raynal
2019-12-13 18:10 ` [PATCH 09/12] drm/rockchip: lvds: Add PX30 support Miquel Raynal
2019-12-16 10:58 ` Maxime Ripard
2019-12-16 11:03 ` Miquel Raynal
2019-12-16 11:14 ` Maxime Ripard
[not found] ` <64f6c582-8ffd-1082-f161-1e8c1a8dda44@rock-chips.com>
2019-12-18 6:26 ` sandy.huang [this message]
2019-12-16 12:00 ` [PATCH 09/12] drm/rockchip: lvds: Add PX30 support【请注意,邮件由linux-rockchip-bounces+andy.yan=rock-chips.com@lists.infradead.org代发】 Andy Yan
2019-12-16 12:10 ` Miquel Raynal
2019-12-13 18:10 ` [PATCH 10/12] arm64: dts: rockchip: Add PX30 CRTCs graph LVDS endpoints Miquel Raynal
2019-12-13 18:28 ` Heiko Stübner
2019-12-13 18:38 ` Miquel Raynal
2019-12-13 18:10 ` [PATCH 11/12] arm64: dts: rockchip: Add PX30 DSI DPHY Miquel Raynal
2019-12-13 18:10 ` [PATCH 12/12] arm64: dts: rockchip: Add PX30 LVDS Miquel Raynal
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=cdf3ee27-b099-b119-483b-af4fe4a75de4@rock-chips.com \
--to=hjc@rock-chips.com \
--cc=airlied@linux.ie \
--cc=andy.yan@rock-chips.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=maxime.chevallier@bootlin.com \
--cc=maxime@cerno.tech \
--cc=miquel.raynal@bootlin.com \
--cc=paul.kocialkowski@bootlin.com \
--cc=robh+dt@kernel.org \
--cc=tao.huang@rock-chips.com \
--cc=thomas.petazzoni@bootlin.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).