2016년 12월 18일 07:12에 Laurent Pinchart 이(가) 쓴 글:
Hello Inki,
On Saturday 17 Dec 2016 09:33:31 Inki Dae wrote:
HI,
Thanks for patch. Reasonable to me and go to misc excepting below one thing. Please check my comment.
2016-12-14 4:34 GMT+09:00 Laurent Pinchart:
From: Laurent Pinchart laurent.pinchart@ideasonboard.com
The drm driver .load() operation is prone to race conditions as it initializes the driver after registering the device nodes. Its usage is deprecated, inline it in the probe function and call drm_dev_alloc() and drm_dev_register() explicitly.
For consistency inline the .unload() handler in the remove function as well.
Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
drivers/gpu/drm/exynos/exynos_dp.c | 1 - drivers/gpu/drm/exynos/exynos_drm_dpi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_drv.c | 245 ++++++++++++------------- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_vidi.c | 1 - drivers/gpu/drm/exynos/exynos_hdmi.c | 1 - 6 files changed, 127 insertions(+), 123 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c index 528229faffe4..b839f065f4b3 100644 --- a/drivers/gpu/drm/exynos/exynos_dp.c +++ b/drivers/gpu/drm/exynos/exynos_dp.c @@ -102,7 +102,6 @@ static int exynos_dp_bridge_attach(struct analogix_dp_plat_data *plat_data,> struct drm_encoder *encoder = &dp->encoder; int ret;
drm_connector_register(connector);
You removed above function from encoder and connector drivers.Is removing this required? And is this related to this patch? If not so, it seems this change should go to another patch with the reason to remove this function call.
When using the .load() callback, driver initialization is performed from drm_dev_register() after the DRM device gets registered with sysfs. With this patch driver initialization is moved before drm_dev_register(), and registering connectors manually would then trigger a WARN due to the sysfs parent not being registered yet.
The connectors are registered by the DRM core (drm_modeset_register_all() called from drm_dev_register()), so there's no need to register them manually after drm_dev_register(), we can just drop that code.
Acked-by: Inki Dae inki.dae@samsung.com
Thanks, Inki Dae