All of lore.kernel.org
 help / color / mirror / Atom feed
From: jeff chen <jeff.chen@rock-chips.com>
To: Rob Clark <robdclark@gmail.com>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	linux-doc@vger.kernel.org,
	"Kever Yang" <kever.yang@rock-chips.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Jianqun Xu" <xjq@rock-chips.com>,
	"Chris Zhong" <zyw@rock-chips.com>,
	linux-api@vger.kernel.org, "David Airlie" <airlied@gmail.com>,
	"Boris BREZILLON" <boris.brezillon@free-electrons.com>,
	"simon xue" <xxm@rock-chips.com>,
	linux-rockchip@lists.infradead.org, kfx@rock-chips.com,
	"Grant Likely" <grant.likely@linaro.org>,
	王晓腾 <wxt@rock-chips.com>, "Tao Huang" <huangtao@rock-chips.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	dbehr@chromium.org, yxj@rock-chips.com,
	"Eddie Cai" <cf@rock-chip>
Subject: Re: [PATCH v4 5/5] drm/rockchip: Add support for Rockchip Soc EDP
Date: Wed, 24 Sep 2014 18:30:33 +0800	[thread overview]
Message-ID: <54229D49.4070008@rock-chips.com> (raw)
In-Reply-To: <CAF6AEGtZGypyV4EnWZr4LziEnOriKZr1ggn+AtkuPnf2ud5gBw@mail.gmail.com>


On 2014/9/24 7:35, Rob Clark wrote:
> On Tue, Sep 23, 2014 at 9:56 AM, Rob Clark <robdclark@gmail.com> wrote:
>> On Tue, Sep 23, 2014 at 4:47 AM, cym <cym@rock-chips.com> wrote:
>>> On Tuesday, September 23, 2014 03:20 AM, Rob Clark wrote:
>>>> On Mon, Sep 22, 2014 at 7:02 AM, Mark yao <mark.yao@rock-chips.com> wrote:
>>>>> This adds support for Rockchip soc edp found on rk3288
>>>>>
>>>>> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
>>>>> Signed-off-by: Jeff Chen <jeff.chen@rock-chips.com>
>>>>> ---
>>>>> Changes in v2:
>>>>> - fix code sytle
>>>>> - use some define from drm_dp_helper.h
>>>>> - use panel-simple driver for primary display.
>>>>> - remove unnecessary clock clk_24m_parent.
>>>>>
>>>>> Changes in v3: None
>>>>>
>>>>> Changes in v4: None
>>>>>
>>>>>    drivers/gpu/drm/rockchip/Kconfig             |    9 +
>>>>>    drivers/gpu/drm/rockchip/Makefile            |    2 +
>>>>>    drivers/gpu/drm/rockchip/rockchip_edp_core.c |  853 ++++++++++++++++++
>>>>>    drivers/gpu/drm/rockchip/rockchip_edp_core.h |  309 +++++++
>>>>>    drivers/gpu/drm/rockchip/rockchip_edp_reg.c  | 1202
>>>>> ++++++++++++++++++++++++++
>>>>>    drivers/gpu/drm/rockchip/rockchip_edp_reg.h  |  345 ++++++++
>>>>>    6 files changed, 2720 insertions(+)
>>>>>    create mode 100644 drivers/gpu/drm/rockchip/rockchip_edp_core.c
>>>>>    create mode 100644 drivers/gpu/drm/rockchip/rockchip_edp_core.h
>>>>>    create mode 100644 drivers/gpu/drm/rockchip/rockchip_edp_reg.c
>>>>>    create mode 100644 drivers/gpu/drm/rockchip/rockchip_edp_reg.h
>>>>>
>>>>> diff --git a/drivers/gpu/drm/rockchip/Kconfig
>>>>> b/drivers/gpu/drm/rockchip/Kconfig
>>>>> index 7146c80..04b1f8c 100644
>>>>> --- a/drivers/gpu/drm/rockchip/Kconfig
>>>>> +++ b/drivers/gpu/drm/rockchip/Kconfig
>>>>> @@ -17,3 +17,12 @@ config DRM_ROCKCHIP
>>>>>             management to userspace. This driver does not provides
>>>>>             2D or 3D acceleration; acceleration is performed by other
>>>>>             IP found on the SoC.
>>>>> +
>>>>> +config ROCKCHIP_EDP
>>>>> +       bool "Rockchip edp support"
>>>>> +       depends on DRM_ROCKCHIP
>>>>> +       help
>>>>> +         Choose this option if you have a Rockchip eDP.
>>>>> +         Rockchip rk3288 SoC has eDP TX Controller can be used.
>>>>> +         If you have an Embedded DisplayPort Panel, say Y to enable its
>>>>> +         driver.
>>>>> diff --git a/drivers/gpu/drm/rockchip/Makefile
>>>>> b/drivers/gpu/drm/rockchip/Makefile
>>>>> index 6e6d468..a0fc3a1 100644
>>>>> --- a/drivers/gpu/drm/rockchip/Makefile
>>>>> +++ b/drivers/gpu/drm/rockchip/Makefile
>>>>> @@ -7,4 +7,6 @@ ccflags-y := -Iinclude/drm -Idrivers/gpu/drm/rockchip
>>>>>    rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o
>>>>> rockchip_drm_fbdev.o \
>>>>>                   rockchip_drm_gem.o rockchip_drm_vop.o
>>>>>
>>>>> +rockchipdrm-$(CONFIG_ROCKCHIP_EDP) += rockchip_edp_core.o
>>>>> rockchip_edp_reg.o
>>>>> +
>>>>>    obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o
>>>>> diff --git a/drivers/gpu/drm/rockchip/rockchip_edp_core.c
>>>>> b/drivers/gpu/drm/rockchip/rockchip_edp_core.c
>>>>> new file mode 100644
>>>>> index 0000000..5450d1fa
>>>>> --- /dev/null
>>>>> +++ b/drivers/gpu/drm/rockchip/rockchip_edp_core.c
>>>>> @@ -0,0 +1,853 @@
>>>>> +/*
>>>>> +* Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
>>>>> +* Author:
>>>>> +*      Andy yan <andy.yan@rock-chips.com>
>>>>> +*      Jeff chen <jeff.chen@rock-chips.com>
>>>>> +*
>>>>> +* based on exynos_dp_core.c
>>>>> +*
>>>> hmm, did you look at all at drm_dp_helpers?  The exynos code probably
>>>> pre-dates the helpers, so might not be the best example to work off
>>>> of..
>>>>
>>>> If there is actually a valid reason not to use the dp-helpers, then
>>>> you should mention the reasons, at least in the commit msg if not the
>>>> code
>>>>
>>>> BR,
>>>> -R
>>> Thanks Rob,Because RK3288 eDP controller IP design is similar to exynos.They
>>> from same IP vendors but have some difference.
>>> So we choosed exynos_dp as example to work off of.exynos_dp only used some
>>> defines from drm_dp_helper.h like DPCD.
>>>
>>
>> Hmm, it sounds like it perhaps should be refactored out into a
>> drm_bridge so more of it can be shared between rockchip and exynos.
>>
>> Either way, it should be using the drm_dp_helpers..  That "the code I
>> copied did it wrong" isn't a terribly good reason for new drivers to
>> do it wrong.
>>
>> So NAK for the eDP part until you use the helpers.
> and btw, if it wasn't clear, go ahead and at least repost the core
> part of the driver.. the first patch just needed a few small tweaks to
> get my r-b even if it takes longer to sort out something sane for the
> DP part..
>
> BR,
> -R
thanks,I will modify the core part of the driver.

BR,
-Jeff
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
>
>

WARNING: multiple messages have this Message-ID (diff)
From: jeff chen <jeff.chen@rock-chips.com>
To: Rob Clark <robdclark@gmail.com>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	linux-doc@vger.kernel.org,
	"Kever Yang" <kever.yang@rock-chips.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Jianqun Xu" <xjq@rock-chips.com>,
	"Chris Zhong" <zyw@rock-chips.com>,
	linux-api@vger.kernel.org, "David Airlie" <airlied@gmail.com>,
	"Boris BREZILLON" <boris.brezillon@free-electrons.com>,
	"simon xue" <xxm@rock-chips.com>,
	linux-rockchip@lists.infradead.org, kfx@rock-chips.com,
	"Grant Likely" <grant.likely@linaro.org>,
	王晓腾 <wxt@rock-chips.com>, "Tao Huang" <huangtao@rock-chips.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	dbehr@chromium.org, yxj@rock-chips.com,
	"Eddie Cai" <cf@rock-chips.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"John Stultz" <john.stultz@linaro.org>,
	"Daniel Kurtz" <djkurtz@chromium.org>,
	"Stéphane Marchesin" <marcheu@chromium.org>,
	"Mark yao" <mark.yao@rock-chips.com>,
	"Rom Lemarchand" <romlem@google.com>,
	xw@rock-chips.com,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Douglas Anderson" <dianders@chromium.org>,
	"Kumar Gala" <galak@codeaurora.org>,
	"Olof Johansson" <olof@lixom.net>
Subject: Re: [PATCH v4 5/5] drm/rockchip: Add support for Rockchip Soc EDP
Date: Wed, 24 Sep 2014 18:30:33 +0800	[thread overview]
Message-ID: <54229D49.4070008@rock-chips.com> (raw)
In-Reply-To: <CAF6AEGtZGypyV4EnWZr4LziEnOriKZr1ggn+AtkuPnf2ud5gBw@mail.gmail.com>


On 2014/9/24 7:35, Rob Clark wrote:
> On Tue, Sep 23, 2014 at 9:56 AM, Rob Clark <robdclark@gmail.com> wrote:
>> On Tue, Sep 23, 2014 at 4:47 AM, cym <cym@rock-chips.com> wrote:
>>> On Tuesday, September 23, 2014 03:20 AM, Rob Clark wrote:
>>>> On Mon, Sep 22, 2014 at 7:02 AM, Mark yao <mark.yao@rock-chips.com> wrote:
>>>>> This adds support for Rockchip soc edp found on rk3288
>>>>>
>>>>> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
>>>>> Signed-off-by: Jeff Chen <jeff.chen@rock-chips.com>
>>>>> ---
>>>>> Changes in v2:
>>>>> - fix code sytle
>>>>> - use some define from drm_dp_helper.h
>>>>> - use panel-simple driver for primary display.
>>>>> - remove unnecessary clock clk_24m_parent.
>>>>>
>>>>> Changes in v3: None
>>>>>
>>>>> Changes in v4: None
>>>>>
>>>>>    drivers/gpu/drm/rockchip/Kconfig             |    9 +
>>>>>    drivers/gpu/drm/rockchip/Makefile            |    2 +
>>>>>    drivers/gpu/drm/rockchip/rockchip_edp_core.c |  853 ++++++++++++++++++
>>>>>    drivers/gpu/drm/rockchip/rockchip_edp_core.h |  309 +++++++
>>>>>    drivers/gpu/drm/rockchip/rockchip_edp_reg.c  | 1202
>>>>> ++++++++++++++++++++++++++
>>>>>    drivers/gpu/drm/rockchip/rockchip_edp_reg.h  |  345 ++++++++
>>>>>    6 files changed, 2720 insertions(+)
>>>>>    create mode 100644 drivers/gpu/drm/rockchip/rockchip_edp_core.c
>>>>>    create mode 100644 drivers/gpu/drm/rockchip/rockchip_edp_core.h
>>>>>    create mode 100644 drivers/gpu/drm/rockchip/rockchip_edp_reg.c
>>>>>    create mode 100644 drivers/gpu/drm/rockchip/rockchip_edp_reg.h
>>>>>
>>>>> diff --git a/drivers/gpu/drm/rockchip/Kconfig
>>>>> b/drivers/gpu/drm/rockchip/Kconfig
>>>>> index 7146c80..04b1f8c 100644
>>>>> --- a/drivers/gpu/drm/rockchip/Kconfig
>>>>> +++ b/drivers/gpu/drm/rockchip/Kconfig
>>>>> @@ -17,3 +17,12 @@ config DRM_ROCKCHIP
>>>>>             management to userspace. This driver does not provides
>>>>>             2D or 3D acceleration; acceleration is performed by other
>>>>>             IP found on the SoC.
>>>>> +
>>>>> +config ROCKCHIP_EDP
>>>>> +       bool "Rockchip edp support"
>>>>> +       depends on DRM_ROCKCHIP
>>>>> +       help
>>>>> +         Choose this option if you have a Rockchip eDP.
>>>>> +         Rockchip rk3288 SoC has eDP TX Controller can be used.
>>>>> +         If you have an Embedded DisplayPort Panel, say Y to enable its
>>>>> +         driver.
>>>>> diff --git a/drivers/gpu/drm/rockchip/Makefile
>>>>> b/drivers/gpu/drm/rockchip/Makefile
>>>>> index 6e6d468..a0fc3a1 100644
>>>>> --- a/drivers/gpu/drm/rockchip/Makefile
>>>>> +++ b/drivers/gpu/drm/rockchip/Makefile
>>>>> @@ -7,4 +7,6 @@ ccflags-y := -Iinclude/drm -Idrivers/gpu/drm/rockchip
>>>>>    rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o
>>>>> rockchip_drm_fbdev.o \
>>>>>                   rockchip_drm_gem.o rockchip_drm_vop.o
>>>>>
>>>>> +rockchipdrm-$(CONFIG_ROCKCHIP_EDP) += rockchip_edp_core.o
>>>>> rockchip_edp_reg.o
>>>>> +
>>>>>    obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o
>>>>> diff --git a/drivers/gpu/drm/rockchip/rockchip_edp_core.c
>>>>> b/drivers/gpu/drm/rockchip/rockchip_edp_core.c
>>>>> new file mode 100644
>>>>> index 0000000..5450d1fa
>>>>> --- /dev/null
>>>>> +++ b/drivers/gpu/drm/rockchip/rockchip_edp_core.c
>>>>> @@ -0,0 +1,853 @@
>>>>> +/*
>>>>> +* Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
>>>>> +* Author:
>>>>> +*      Andy yan <andy.yan@rock-chips.com>
>>>>> +*      Jeff chen <jeff.chen@rock-chips.com>
>>>>> +*
>>>>> +* based on exynos_dp_core.c
>>>>> +*
>>>> hmm, did you look at all at drm_dp_helpers?  The exynos code probably
>>>> pre-dates the helpers, so might not be the best example to work off
>>>> of..
>>>>
>>>> If there is actually a valid reason not to use the dp-helpers, then
>>>> you should mention the reasons, at least in the commit msg if not the
>>>> code
>>>>
>>>> BR,
>>>> -R
>>> Thanks Rob,Because RK3288 eDP controller IP design is similar to exynos.They
>>> from same IP vendors but have some difference.
>>> So we choosed exynos_dp as example to work off of.exynos_dp only used some
>>> defines from drm_dp_helper.h like DPCD.
>>>
>>
>> Hmm, it sounds like it perhaps should be refactored out into a
>> drm_bridge so more of it can be shared between rockchip and exynos.
>>
>> Either way, it should be using the drm_dp_helpers..  That "the code I
>> copied did it wrong" isn't a terribly good reason for new drivers to
>> do it wrong.
>>
>> So NAK for the eDP part until you use the helpers.
> and btw, if it wasn't clear, go ahead and at least repost the core
> part of the driver.. the first patch just needed a few small tweaks to
> get my r-b even if it takes longer to sort out something sane for the
> DP part..
>
> BR,
> -R
thanks,I will modify the core part of the driver.

BR,
-Jeff
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
>
>



  reply	other threads:[~2014-09-24 10:30 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 10:47 [PATCH v4 0/5] Add drm driver for Rockchip Socs Mark yao
2014-09-22 10:47 ` Mark yao
2014-09-22 10:48 ` [PATCH v4 1/5] drm/rockchip: Add basic drm driver Mark yao
2014-09-22 14:43   ` Arnd Bergmann
2014-09-22 14:43     ` Arnd Bergmann
2014-09-22 15:15     ` Boris BREZILLON
2014-09-22 15:15       ` Boris BREZILLON
2014-09-22 15:54       ` Arnd Bergmann
2014-09-22 15:54         ` Arnd Bergmann
2014-09-23  7:09         ` Mark yao
2014-09-23  7:09           ` Mark yao
     [not found]           ` <54211CB1.6050002-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-09-23  8:11             ` Arnd Bergmann
2014-09-23  8:11               ` Arnd Bergmann
2014-09-23  7:05     ` Mark yao
2014-09-23  7:05       ` Mark yao
     [not found]   ` <1411382934-1763-1-git-send-email-mark.yao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-09-22 13:24     ` Boris BREZILLON
2014-09-22 13:24       ` Boris BREZILLON
2014-09-23  5:59       ` Mark yao
2014-09-23  5:59         ` Mark yao
2014-09-22 19:10     ` Rob Clark
2014-09-22 19:10       ` Rob Clark
     [not found]       ` <CAF6AEGtBVSqzxO7M+Tew1vHb9-moVame=K=_gDGji13113TgFw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-23  6:50         ` Mark yao
2014-09-23  6:50           ` Mark yao
2014-09-24  8:20   ` Daniel Vetter
2014-09-24  8:20     ` Daniel Vetter
     [not found]     ` <20140924082037.GJ15734-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2014-09-24  9:31       ` Mark yao
2014-09-24  9:31         ` Mark yao
2014-09-24 11:20         ` Daniel Vetter
2014-09-24 11:20           ` Daniel Vetter
2014-09-25  0:54           ` Mark yao
2014-09-25 19:30             ` Daniel Vetter
2014-09-25 19:30               ` Daniel Vetter
2014-09-22 10:50 ` [PATCH v4 2/5] dt-bindings: video: Add for rockchip display subsytem Mark yao
     [not found] ` <1411382820-1615-1-git-send-email-mark.yao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-09-22 10:57   ` [PATCH v4 3/5] dt-bindings: video: Add documentation for rockchip vop Mark yao
2014-09-22 10:57     ` Mark yao
2014-09-22 10:58   ` [PATCH v4 4/5] dt-bindings: video: Add documentation for rockchip edp Mark yao
2014-09-22 10:58     ` Mark yao
2014-09-22 11:02   ` [PATCH v4 5/5] drm/rockchip: Add support for Rockchip Soc EDP Mark yao
2014-09-22 11:02     ` Mark yao
     [not found]     ` <1411383728-2075-1-git-send-email-mark.yao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-09-22 19:20       ` Rob Clark
2014-09-22 19:20         ` Rob Clark
     [not found]         ` <CAF6AEGtxUGr2i+mK7dtfTXaf2SxHkokxw2sNCviwRR6Hn7RE2w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-23  8:47           ` cym
2014-09-23  8:47             ` cym
     [not found]             ` <5421338B.3020302-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-09-23 13:56               ` Rob Clark
2014-09-23 13:56                 ` Rob Clark
     [not found]                 ` <CAF6AEGuGKitXGE8S-fE-d+-MWDBxU-XqG_AH7q9FD0y5YkBFVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-23 23:35                   ` Rob Clark
2014-09-23 23:35                     ` Rob Clark
2014-09-24 10:30                     ` jeff chen [this message]
2014-09-24 10:30                       ` jeff chen

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=54229D49.4070008@rock-chips.com \
    --to=jeff.chen@rock-chips.com \
    --cc=airlied@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=cf@rock-chip \
    --cc=dbehr@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=grant.likely@linaro.org \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kever.yang@rock-chips.com \
    --cc=kfx@rock-chips.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robdclark@gmail.com \
    --cc=wxt@rock-chips.com \
    --cc=xjq@rock-chips.com \
    --cc=xxm@rock-chips.com \
    --cc=yxj@rock-chips.com \
    --cc=zyw@rock-chips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.