linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Andy Yan" <andyshrk@163.com>
To: "Keith Zhao" <keith.zhao@starfivetech.com>
Cc: "Maxime Ripard" <mripard@kernel.org>,
	 "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	 "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	 "linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	 "tzimmermann@suse.de" <tzimmermann@suse.de>,
	 "airlied@gmail.com" <airlied@gmail.com>,
	 "krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	 "William Qiu" <william.qiu@starfivetech.com>,
	 "Xingyu Wu" <xingyu.wu@starfivetech.com>,
	 "paul.walmsley@sifive.com" <paul.walmsley@sifive.com>,
	 "aou@eecs.berkeley.edu" <aou@eecs.berkeley.edu>,
	 "palmer@dabbelt.com" <palmer@dabbelt.com>,
	 "p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	 "Shengyang Chen" <shengyang.chen@starfivetech.com>,
	 "Jack Zhu" <jack.zhu@starfivetech.com>,
	 "Changhuang Liang" <changhuang.liang@starfivetech.com>,
	 "maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	 "suijingfeng@loongson.cn" <suijingfeng@loongson.cn>
Subject: Re:Re: [v3 5/6] drm/vs: Add hdmi driver
Date: Thu, 14 Dec 2023 10:51:17 +0800 (CST)	[thread overview]
Message-ID: <178ec98c.140b.18c663c4ca3.Coremail.andyshrk@163.com> (raw)
In-Reply-To: <10e2ab3c-950f-4a1c-8806-74e5bba2c24a@starfivetech.com>


Hi Keith:

在 2023-12-13 09:40:31,"Keith Zhao" <keith.zhao@starfivetech.com> 写道:
>
>
>On 2023/12/11 20:13, Andy Yan wrote:
>> Hi Keith:
>> 
>> 在 2023-12-11 18:24:35,"Keith Zhao" <keith.zhao@starfivetech.com> 写道:
>>>hi Maxime:
>>>hi Andy:
>>>
>>>On 2023/12/8 17:14, Maxime Ripard wrote:
>>>> Hi,
>>>> 
>>>> On Fri, Dec 08, 2023 at 11:23:37AM +0800, Andy Yan wrote:
>>>>> 在 2023-12-08 11:00:31,"Keith Zhao" <keith.zhao@starfivetech.com> 写道:
>>>>> >
>>>>> >
>>>>> >On 2023/12/8 8:37, Andy Yan wrote:
>>>>> >> Hi Keth:
>>>>> >> 
>>>>> >> 
>>>>> >> 
>>>>> >> 
>>>>> >> 
>>>>> >> 
>>>>> >> 在 2023-12-07 18:48:13,"Keith Zhao" <keith.zhao@starfivetech.com> 写道:
>>>>> >>>
>>>>> >>>
>>>>> >>>On 2023/12/7 17:02, Andy Yan wrote:
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> Hi Keith:
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> 
>>>>> >>>> At 2023-12-06 22:11:33, "Keith Zhao" <keith.zhao@starfivetech.com> wrote:
>>>>> >>>>>
>>>>> >>>>>
>>>>> >>>>>On 2023/12/6 20:56, Maxime Ripard wrote:
>>>>> >>>>>> On Wed, Dec 06, 2023 at 08:02:55PM +0800, Keith Zhao wrote:
>>>>> >>>>>>> >> +static const struct of_device_id starfive_hdmi_dt_ids[] = {
>>>>> >>>>>>> >> +	{ .compatible = "starfive,jh7110-inno-hdmi",},
>>>>> >>>>>>> > 
>>>>> >>>>>>> > So it's inno hdmi, just like Rockchip then?
>>>>> >>>>>>> > 
>>>>> >>>>>>> > This should be a common driver.
>>>>> >>>>>>>
>>>>> >>>>>>> Rockchip has a inno hdmi IP. and Starfive has a inno hdmi IP.
>>>>> >>>>>>> but the harewawre difference of them is big , it is not easy to use the common driver
>>>>> >>>>>>> maybe i need the inno hdmi version here to make a distinction
>>>>> >>>>>> 
>>>>> >>>>>> I just had a look at the rockchip header file: all the registers but the
>>>>> >>>>>> STARFIVE_* ones are identical.
>>>>> >>>>>> 
>>>>> >>>>>> There's no need to have two identical drivers then, please use the
>>>>> >>>>>> rockchip driver instead.
>>>>> >>>>>> 
>>>>> >>>>>> Maxime
>>>>> >>>>>
>>>>> >>>>>ok, have a simple test , edid can get . i will continue 
>>>>> >>>> 
>>>>> >>>> Maybe you can take drivers/gpu/drm/bridge/synopsys/dw-hdmi as a reference, this
>>>>> >>>> is also a hdmi ip used by rockchip/meson/sunxi/jz/imx。
>>>>> >>>> We finally make it share one driver。
>>>>> >>>>>
>>>>> >>>hi Andy:
>>>>> >>>
>>>>> >>>dw_hdmi seems a good choice , it can handle inno hdmi hardware by define its dw_hdmi_plat_data.
>>>>> >>>does it means i can write own driver files such as(dw_hdmi-starfive.c) based on dw_hdmi instead of add plat_data in inno_hdmi.c
>>>>> >>>
>>>>> >> 
>>>>> >> I think the process maybe like this:
>>>>> >> 
>>>>> >> 1. split the inno_hdmi.c under rockchip to  inno_hdmi.c(the common part), inno_hdmi-rockchip.c(the soc specific part)
>>>>> >> 2. move the common part inno_hdmi.c to drivers/gpu/drm/bridge/innosilicon/
>>>>> >> 3. add startfive specific part, inno_hdmi-startfive.c
>>>>> >> 
>>>>> >> bellow git log from kernel three show how we convert  dw_hdmi to a common driver: 
>>>>> >> 
>>>>> >> 
>>>>> >> 
>>>>> >> 12b9f204e804 drm: bridge/dw_hdmi: add rockchip rk3288 support
>>>>> >> 74af9e4d03b8 dt-bindings: Add documentation for rockchip dw hdmi
>>>>> >> d346c14eeea9 drm: bridge/dw_hdmi: add function dw_hdmi_phy_enable_spare
>>>>> >> a4d3b8b050d5 drm: bridge/dw_hdmi: clear i2cmphy_stat0 reg in hdmi_phy_wait_i2c_done
>>>>> >> 632d035bace2 drm: bridge/dw_hdmi: add mode_valid support
>>>>> >> 0cd9d1428322 drm: bridge/dw_hdmi: add support for multi-byte register width access
>>>>> >> cd152393967e dt-bindings: add document for dw_hdmi
>>>>> >> b21f4b658df8 drm: imx: imx-hdmi: move imx-hdmi to bridge/dw_hdmi
>>>>> >> aaa757a092c2 drm: imx: imx-hdmi: split phy configuration to platform driver
>>>>> >> 3d1b35a3d9f3 drm: imx: imx-hdmi: convert imx-hdmi to drm_bridge mode
>>>>> >> c2c3848851a7 drm: imx: imx-hdmi: return defer if can't get ddc i2c adapter
>>>>> >> b587833933de drm: imx: imx-hdmi: make checkpatch happy
>>>>> >> 
>>>>> >hi Andy:
>>>>> >I got you means, 
>>>>> >as I don't have a rockchip board on hand , to split the inno_hdmi.c can not be tested.
>>>>> >
>>>>> >how adout this idea:
>>>>> >1、split the starfive_hdmi.c under verisilicion to  inno_hdmi.c(the common part), inno_hdmi-starfive.c(the soc specific part)
>>>>> >2. move the common part inno_hdmi.c to drivers/gpu/drm/bridge/innosilicon/
>>>>> >3. In the future, inno hdmi.c under rockchip will reuse the public driver.
>>>>> 
>>>>> I am not sure if drm maintainers are happy with this。
>>>> 
>>>> Not really, no.
>>>> 
>>>> Because we would still have two drivers for the same controller, and a
>>>> common one that haven't really been tested on anything but a single
>>>> platform. So arguably a worse situation than what you were suggesting in
>>>> the first place.
>>>> 
>>>> The best solution would be to find someone with a Rockchip board to test
>>>> your changes, or to get one if it's doable so you can test yourself.
>>>
>>>ok I will also try to buy a Rockchip 3036 board for self-test.
>>>According to the commit log idea provided by Andy before, make the inno_hdmi driver common module.
>> 
>> I finally  make my rk3036 based kylin board bootup (use a linux 4.4 downstream bsp,I will find time to try boot
>> it with mainline)。 So I can help do the test for rockchip side。
>> 
>> It seems not that easy to buy a rk3036 based board from market now。
>en, The online store seems to have stopped selling rk3036 
>really not easy to buy one , I write the code first , need help testing rk3036 in the future.


I found A RK3128 based board XPI-3128 is for sale[0], which also has a inno-hdmi.
And Alx Bee is working on adding upstream support for it[1].

[0] https://www.geniatech.com/product/xpi-3128/

[1]https://patchwork.kernel.org/project/linux-arm-kernel/cover/20231213195125.212923-1-knaerzche@gmail.com/
>
>thanks
>> 
>>>
>>>would the steps be ok? (if I tested rockchip and starifve pass)
>>>1. split the inno_hdmi.c under rockchip to  inno_hdmi.c(the common part), inno_hdmi-rockchip.c(the soc specific part)
>>>2. move the common part inno_hdmi.c to drivers/gpu/drm/bridge/innosilicon/
>>>3. add startfive specific part, inno_hdmi-startfive.c
>>>
>>>Thanks
>>>> 
>>>> Maxime
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2023-12-14  2:52 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 12:33 [v3 0/6] DRM driver for verisilicon Keith Zhao
2023-12-04 12:33 ` [v3 1/6] dt-bindings: display: Add yamls for JH7110 display system Keith Zhao
2023-12-05  6:59   ` Krzysztof Kozlowski
2023-12-06 12:50   ` Sui Jingfeng
2023-12-08 16:33     ` Rob Herring
2023-12-08 16:31   ` Rob Herring
2023-12-04 12:33 ` [v3 2/6] riscv: dts: starfive: jh7110: display subsystem Keith Zhao
2023-12-04 12:33 ` [v3 3/6] drm/vs: Register DRM device Keith Zhao
2023-12-04 13:30   ` Philipp Zabel
2023-12-11  9:00     ` Keith Zhao
2023-12-11  9:17       ` mripard
2023-12-05 11:33   ` Dmitry Baryshkov
2023-12-04 12:33 ` [v3 4/6] drm/vs: Add KMS crtc&plane Keith Zhao
2023-12-05 12:48   ` Dmitry Baryshkov
2023-12-06  8:55   ` Maxime Ripard
2023-12-06 12:53     ` Keith Zhao
2024-01-31  9:33     ` Keith Zhao
2024-01-31 13:23       ` Maxime Ripard
     [not found]         ` <NTZPR01MB1050C500508E29152E845511EE43A@NTZPR01MB1050.CHNPR01.prod.partner.outlook.cn>
2024-02-09 15:37           ` Maxime Ripard
     [not found]     ` <NTZPR01MB1050AC99C38D2136D0354F3DEE7CA@NTZPR01MB1050.CHNPR01.prod.partner.outlook.cn>
2024-01-31 16:30       ` 回复: " Maxime Ripard
2023-12-07  8:41   ` Icenowy Zheng
2023-12-07 11:31     ` Keith Zhao
2023-12-07 15:29       ` Icenowy Zheng
2023-12-27  3:57       ` Icenowy Zheng
2023-12-04 12:33 ` [v3 5/6] drm/vs: Add hdmi driver Keith Zhao
2023-12-05 13:02   ` Dmitry Baryshkov
2023-12-06  9:04   ` Maxime Ripard
2023-12-06 12:02     ` Keith Zhao
2023-12-06 12:56       ` Maxime Ripard
2023-12-06 14:11         ` Keith Zhao
2023-12-07  9:02           ` Andy Yan
2023-12-07 10:48             ` Keith Zhao
2023-12-08  0:37               ` Andy Yan
2023-12-08  3:00                 ` Keith Zhao
2023-12-08  3:23                   ` Andy Yan
2023-12-08  9:14                     ` Maxime Ripard
2023-12-11 10:24                       ` Keith Zhao
2023-12-11 12:13                         ` Andy Yan
2023-12-13  1:40                           ` Keith Zhao
2023-12-14  2:51                             ` Andy Yan [this message]
2023-12-11 17:34   ` Rob Herring
2023-12-04 12:33 ` [v3 6/6] drm/vs: simple encoder Keith Zhao
2023-12-05 13:14   ` Dmitry Baryshkov
2023-12-05 13:18     ` Dmitry Baryshkov
2024-05-15 10:07       ` Keith Zhao
2024-05-15 15:17         ` Dmitry Baryshkov
2024-05-16  2:57           ` Keith Zhao
2023-12-05  6:55 ` [v3 0/6] DRM driver for verisilicon Krzysztof Kozlowski
2023-12-05 11:59 ` Sui Jingfeng

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=178ec98c.140b.18c663c4ca3.Coremail.andyshrk@163.com \
    --to=andyshrk@163.com \
    --cc=airlied@gmail.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=changhuang.liang@starfivetech.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jack.zhu@starfivetech.com \
    --cc=keith.zhao@starfivetech.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=shengyang.chen@starfivetech.com \
    --cc=suijingfeng@loongson.cn \
    --cc=tzimmermann@suse.de \
    --cc=william.qiu@starfivetech.com \
    --cc=xingyu.wu@starfivetech.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).