[PATCH] drm/exynos: resolve infinite loop issue on non multi-platform

Sjoerd Simons sjoerd.simons at collabora.co.uk
Thu Nov 6 09:08:40 PST 2014


On Thu, 2014-11-06 at 23:10 +0900, Inki Dae wrote:
> This patch resovles the infinite loop issue incurred
> when Exyno drm driver is enabled but all kms drivers
> are disabled on Exynos board by returning -EPROBE_DEFER
> only in case that there is kms device registered.

It would be nice if you could explain in the commit message/comment why
returning -EPROBE_DEFER causes an infinite loop and why it's the wrong
thing to do in this case? 

Even if you know this probe will never succeed in the future (so
deferring is actually pointless), deferring really shouldn't trigger
infinte loops in calling code

> 
> Signed-off-by: Inki Dae <inki.dae at samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_drv.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> index ecc86aa..14c6af7 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> @@ -488,6 +488,12 @@ static struct component_match *exynos_drm_match_add(struct device *dev)
>  
>  	mutex_lock(&drm_component_lock);
>  
> +	/* Do not retry to probe if there is no any kms driver regitered. */
> +	if (list_empty(&drm_component_list)) {
> +		mutex_unlock(&drm_component_lock);
> +		return ERR_PTR(-ENODEV);
> +	}
> +
>  	list_for_each_entry(cdev, &drm_component_list, list) {
>  		/*
>  		 * Add components to master only in case that crtc and


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6170 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141106/78b63f14/attachment.bin>


More information about the dri-devel mailing list