lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <58CA57C5.2040009@rock-chips.com>
Date:   Thu, 16 Mar 2017 17:15:49 +0800
From:   jeffy <jeffy.chen@...k-chips.com>
To:     Heiko Stuebner <heiko@...ech.de>
CC:     Mark Yao <mark.yao@...k-chips.com>,
        Andrzej Hajda <a.hajda@...sung.com>,
        Guenter Roeck <groeck@...omium.org>,
        Brian Norris <briannorris@...omium.org>,
        Tomasz Figa <tfiga@...omium.org>,
        Douglas Anderson <dianders@...omium.org>,
        Sean Paul <seanpaul@...omium.org>,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linux-rockchip@...ts.infradead.org,
        David Airlie <airlied@...ux.ie>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v4] drm/rockchip: Refactor the component match logic.

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@...k-chips.com>
>> Reviewed-by: Andrzej Hajda <a.hajda@...sung.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).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ