From: jeffy <jeffy.chen@rock-chips.com>
To: Heiko Stuebner <heiko@sntech.de>
Cc: Mark Yao <mark.yao@rock-chips.com>,
Andrzej Hajda <a.hajda@samsung.com>,
Guenter Roeck <groeck@chromium.org>,
Brian Norris <briannorris@chromium.org>,
Tomasz Figa <tfiga@chromium.org>,
Douglas Anderson <dianders@chromium.org>,
Sean Paul <seanpaul@chromium.org>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
David Airlie <airlied@linux.ie>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4] drm/rockchip: Refactor the component match logic.
Date: Thu, 16 Mar 2017 17:15:49 +0800 [thread overview]
Message-ID: <58CA57C5.2040009@rock-chips.com> (raw)
In-Reply-To: <4477033.icEzZGFJNF@phil>
Hi Heiko,
On 03/16/2017 04:20 PM, Heiko Stuebner wrote:
> Hi Jeffy,
>
> Am Donnerstag, 16. März 2017, 10:05:56 CET schrieb Jeffy Chen:
>> Currently we are adding all components from the dts, if one of their
>> drivers been disabled, we would not be able to bring up others.
>>
>> Refactor component match logic, follow exynos drm.
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
>
> [...]
>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index b360e62..51433da 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> @@ -356,34 +356,42 @@ static const struct dev_pm_ops rockchip_drm_pm_ops = {
>> rockchip_drm_sys_resume)
>> };
>>
>> -static int compare_of(struct device *dev, void *data)
>> -{
>> - struct device_node *np = data;
>> +#define MAX_ROCKCHIP_DRM_DRVS 16
>> +static struct platform_driver *rockchip_drm_drvs[MAX_ROCKCHIP_DRM_DRVS];
>> +static int rockchip_drm_drvs_cnt;
>>
>> - return dev->of_node == np;
>> +#define ROCKCHIP_DRM_DRV(drv, cond) { \
>> + if (IS_ENABLED(cond)) \
>> + rockchip_drm_drvs[rockchip_drm_drvs_cnt++] = &drv; \
>> }
>
> [...]
>
>> +static int __init rockchip_drm_init(void)
>> +{
>> + int ret;
>> +
>> + rockchip_drm_drvs_cnt = 0;
>> + ROCKCHIP_DRM_DRV(vop_platform_driver, CONFIG_DRM_ROCKCHIP);
>> + ROCKCHIP_DRM_DRV(rockchip_dp_driver, CONFIG_ROCKCHIP_ANALOGIX_DP);
>> + ROCKCHIP_DRM_DRV(cdn_dp_driver, CONFIG_ROCKCHIP_CDN_DP);
>> + ROCKCHIP_DRM_DRV(dw_hdmi_rockchip_pltfm_driver,
>> + CONFIG_ROCKCHIP_DW_HDMI);
>> + ROCKCHIP_DRM_DRV(dw_mipi_dsi_driver, CONFIG_ROCKCHIP_DW_MIPI_DSI);
>> + ROCKCHIP_DRM_DRV(inno_hdmi_driver, CONFIG_ROCKCHIP_INNO_HDMI);
>> +
>> + ret = platform_register_drivers(rockchip_drm_drvs,
>> + rockchip_drm_drvs_cnt);
>> + if (ret)
>> + return ret;
>
> With the following config snippet
>
> CONFIG_DRM_ROCKCHIP=m
> CONFIG_ROCKCHIP_ANALOGIX_DP=y
> # CONFIG_ROCKCHIP_CDN_DP is not set
> CONFIG_ROCKCHIP_DW_HDMI=y
> CONFIG_ROCKCHIP_DW_MIPI_DSI=y
> CONFIG_ROCKCHIP_INNO_HDMI=y
>
> I get these faults on arm32 (1 warning, 1 linker error):
>
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_drv.o
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_fb.o
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_gem.o
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_psr.o
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_vop.o
> CC [M] drivers/gpu/drm/rockchip/rockchip_vop_reg.o
> ../drivers/gpu/drm/rockchip/rockchip_vop_reg.c:407:31: warning: ‘vop_platform_driver’ defined but not used [-Wunused-variable]
> static struct platform_driver vop_platform_driver = {
> ^~~~~~~~~~~~~~~~~~~
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_fbdev.o
> CC [M] drivers/gpu/drm/rockchip/analogix_dp-rockchip.o
> CC [M] drivers/gpu/drm/rockchip/dw_hdmi-rockchip.o
> CC [M] drivers/gpu/drm/rockchip/dw-mipi-dsi.o
> CC [M] drivers/gpu/drm/rockchip/inno_hdmi.o
> LD [M] drivers/gpu/drm/rockchip/rockchipdrm.o
> Building modules, stage 2.
> MODPOST 352 modules
> ERROR: "vop_platform_driver" [drivers/gpu/drm/rockchip/rockchipdrm.ko] undefined!
>
>
>
>
>
oops, sorry again...thanx for testing it, i should be more
careful(porting it from my local 4.4 kernel).
WARNING: multiple messages have this Message-ID (diff)
From: jeffy.chen@rock-chips.com (jeffy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] drm/rockchip: Refactor the component match logic.
Date: Thu, 16 Mar 2017 17:15:49 +0800 [thread overview]
Message-ID: <58CA57C5.2040009@rock-chips.com> (raw)
In-Reply-To: <4477033.icEzZGFJNF@phil>
Hi Heiko,
On 03/16/2017 04:20 PM, Heiko Stuebner wrote:
> Hi Jeffy,
>
> Am Donnerstag, 16. M?rz 2017, 10:05:56 CET schrieb Jeffy Chen:
>> Currently we are adding all components from the dts, if one of their
>> drivers been disabled, we would not be able to bring up others.
>>
>> Refactor component match logic, follow exynos drm.
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
>
> [...]
>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index b360e62..51433da 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>> @@ -356,34 +356,42 @@ static const struct dev_pm_ops rockchip_drm_pm_ops = {
>> rockchip_drm_sys_resume)
>> };
>>
>> -static int compare_of(struct device *dev, void *data)
>> -{
>> - struct device_node *np = data;
>> +#define MAX_ROCKCHIP_DRM_DRVS 16
>> +static struct platform_driver *rockchip_drm_drvs[MAX_ROCKCHIP_DRM_DRVS];
>> +static int rockchip_drm_drvs_cnt;
>>
>> - return dev->of_node == np;
>> +#define ROCKCHIP_DRM_DRV(drv, cond) { \
>> + if (IS_ENABLED(cond)) \
>> + rockchip_drm_drvs[rockchip_drm_drvs_cnt++] = &drv; \
>> }
>
> [...]
>
>> +static int __init rockchip_drm_init(void)
>> +{
>> + int ret;
>> +
>> + rockchip_drm_drvs_cnt = 0;
>> + ROCKCHIP_DRM_DRV(vop_platform_driver, CONFIG_DRM_ROCKCHIP);
>> + ROCKCHIP_DRM_DRV(rockchip_dp_driver, CONFIG_ROCKCHIP_ANALOGIX_DP);
>> + ROCKCHIP_DRM_DRV(cdn_dp_driver, CONFIG_ROCKCHIP_CDN_DP);
>> + ROCKCHIP_DRM_DRV(dw_hdmi_rockchip_pltfm_driver,
>> + CONFIG_ROCKCHIP_DW_HDMI);
>> + ROCKCHIP_DRM_DRV(dw_mipi_dsi_driver, CONFIG_ROCKCHIP_DW_MIPI_DSI);
>> + ROCKCHIP_DRM_DRV(inno_hdmi_driver, CONFIG_ROCKCHIP_INNO_HDMI);
>> +
>> + ret = platform_register_drivers(rockchip_drm_drvs,
>> + rockchip_drm_drvs_cnt);
>> + if (ret)
>> + return ret;
>
> With the following config snippet
>
> CONFIG_DRM_ROCKCHIP=m
> CONFIG_ROCKCHIP_ANALOGIX_DP=y
> # CONFIG_ROCKCHIP_CDN_DP is not set
> CONFIG_ROCKCHIP_DW_HDMI=y
> CONFIG_ROCKCHIP_DW_MIPI_DSI=y
> CONFIG_ROCKCHIP_INNO_HDMI=y
>
> I get these faults on arm32 (1 warning, 1 linker error):
>
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_drv.o
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_fb.o
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_gem.o
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_psr.o
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_vop.o
> CC [M] drivers/gpu/drm/rockchip/rockchip_vop_reg.o
> ../drivers/gpu/drm/rockchip/rockchip_vop_reg.c:407:31: warning: ?vop_platform_driver? defined but not used [-Wunused-variable]
> static struct platform_driver vop_platform_driver = {
> ^~~~~~~~~~~~~~~~~~~
> CC [M] drivers/gpu/drm/rockchip/rockchip_drm_fbdev.o
> CC [M] drivers/gpu/drm/rockchip/analogix_dp-rockchip.o
> CC [M] drivers/gpu/drm/rockchip/dw_hdmi-rockchip.o
> CC [M] drivers/gpu/drm/rockchip/dw-mipi-dsi.o
> CC [M] drivers/gpu/drm/rockchip/inno_hdmi.o
> LD [M] drivers/gpu/drm/rockchip/rockchipdrm.o
> Building modules, stage 2.
> MODPOST 352 modules
> ERROR: "vop_platform_driver" [drivers/gpu/drm/rockchip/rockchipdrm.ko] undefined!
>
>
>
>
>
oops, sorry again...thanx for testing it, i should be more
careful(porting it from my local 4.4 kernel).
next prev parent reply other threads:[~2017-03-16 9:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 2:05 [PATCH v4] drm/rockchip: Refactor the component match logic Jeffy Chen
2017-03-16 2:05 ` Jeffy Chen
2017-03-16 2:05 ` Jeffy Chen
2017-03-16 8:20 ` Heiko Stuebner
2017-03-16 8:20 ` Heiko Stuebner
2017-03-16 8:20 ` Heiko Stuebner
2017-03-16 9:15 ` jeffy [this message]
2017-03-16 9:15 ` jeffy
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=58CA57C5.2040009@rock-chips.com \
--to=jeffy.chen@rock-chips.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=briannorris@chromium.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=groeck@chromium.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.yao@rock-chips.com \
--cc=seanpaul@chromium.org \
--cc=tfiga@chromium.org \
/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.