Commit 2f424200 authored by Daniel Vetter's avatar Daniel Vetter

drm/exynos: drop struct_mutex from fbdev setup

Doesn't protect anything at all, and probably just here because a long
time ago dev->struct_mutex was required to allocate gem objects.

With this patch exynos is completely struct_mutex free!

Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-10-git-send-email-daniel.vetter@ffwll.ch
parent 6c991a22
...@@ -138,8 +138,6 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, ...@@ -138,8 +138,6 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
sizes->surface_depth); sizes->surface_depth);
mutex_lock(&dev->struct_mutex);
size = mode_cmd.pitches[0] * mode_cmd.height; size = mode_cmd.pitches[0] * mode_cmd.height;
exynos_gem = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size); exynos_gem = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size);
...@@ -154,10 +152,8 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, ...@@ -154,10 +152,8 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
size); size);
} }
if (IS_ERR(exynos_gem)) { if (IS_ERR(exynos_gem))
ret = PTR_ERR(exynos_gem); return PTR_ERR(exynos_gem);
goto out;
}
exynos_fbdev->exynos_gem = exynos_gem; exynos_fbdev->exynos_gem = exynos_gem;
...@@ -173,7 +169,6 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, ...@@ -173,7 +169,6 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
if (ret < 0) if (ret < 0)
goto err_destroy_framebuffer; goto err_destroy_framebuffer;
mutex_unlock(&dev->struct_mutex);
return ret; return ret;
err_destroy_framebuffer: err_destroy_framebuffer:
...@@ -181,13 +176,12 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, ...@@ -181,13 +176,12 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
err_destroy_gem: err_destroy_gem:
exynos_drm_gem_destroy(exynos_gem); exynos_drm_gem_destroy(exynos_gem);
/* /*
* if failed, all resources allocated above would be released by * if failed, all resources allocated above would be released by
* drm_mode_config_cleanup() when drm_load() had been called prior * drm_mode_config_cleanup() when drm_load() had been called prior
* to any specific driver such as fimd or hdmi driver. * to any specific driver such as fimd or hdmi driver.
*/ */
out:
mutex_unlock(&dev->struct_mutex);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment