diff mbox

[04/13] drm: Drop locking cargo-cult from drm_mode_config_init

Message ID 20161213230814.19598-5-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter Dec. 13, 2016, 11:08 p.m. UTC
This is single-threaded setup code, no need for locks. And anyway,
all properties need to be set up before the driver is registered
anyway, they can't be hot-added.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_mode_config.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Daniel Stone Dec. 14, 2016, 9:23 a.m. UTC | #1
On 13 December 2016 at 23:08, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> This is single-threaded setup code, no need for locks. And anyway,
> all properties need to be set up before the driver is registered
> anyway, they can't be hot-added.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Daniel Stone <daniels@collabora.com>
Sean Paul Dec. 16, 2016, 3:03 p.m. UTC | #2
On Tue, Dec 13, 2016 at 6:08 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> This is single-threaded setup code, no need for locks. And anyway,
> all properties need to be set up before the driver is registered
> anyway, they can't be hot-added.
>


Reviewed-by: Sean Paul <seanpaul@chromium.org>

> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/drm_mode_config.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
> index b1e8bbceaf39..85a25fd9eff8 100644
> --- a/drivers/gpu/drm/drm_mode_config.c
> +++ b/drivers/gpu/drm/drm_mode_config.c
> @@ -374,9 +374,7 @@ void drm_mode_config_init(struct drm_device *dev)
>         idr_init(&dev->mode_config.tile_idr);
>         ida_init(&dev->mode_config.connector_ida);
>
> -       drm_modeset_lock_all(dev);
>         drm_mode_create_standard_properties(dev);
> -       drm_modeset_unlock_all(dev);
>
>         /* Just to be sure */
>         dev->mode_config.num_fb = 0;
> --
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index b1e8bbceaf39..85a25fd9eff8 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -374,9 +374,7 @@  void drm_mode_config_init(struct drm_device *dev)
 	idr_init(&dev->mode_config.tile_idr);
 	ida_init(&dev->mode_config.connector_ida);
 
-	drm_modeset_lock_all(dev);
 	drm_mode_create_standard_properties(dev);
-	drm_modeset_unlock_all(dev);
 
 	/* Just to be sure */
 	dev->mode_config.num_fb = 0;