From patchwork Tue Dec 13 23:08:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9473341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1A35E60476 for ; Tue, 13 Dec 2016 23:09:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D07A28285 for ; Tue, 13 Dec 2016 23:09:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01DBD28403; Tue, 13 Dec 2016 23:09:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 50FC228285 for ; Tue, 13 Dec 2016 23:09:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 25A1F6E6D3; Tue, 13 Dec 2016 23:09:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wj0-x243.google.com (mail-wj0-x243.google.com [IPv6:2a00:1450:400c:c01::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 147B96E6BA for ; Tue, 13 Dec 2016 23:08:28 +0000 (UTC) Received: by mail-wj0-x243.google.com with SMTP id xy5so507639wjc.1 for ; Tue, 13 Dec 2016 15:08:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=y2zGr2VZEvB63JQd6p7+JPSINrHVr1PcPcxRlhqRBqA=; b=C1R8Eb/YhY/YuLJIbKI8xbqxfcsnwUCKjUXwlEZxsk2IbokE7zrPOc2lVwNwTO3jie rarn14n66xJ//AAFFQPi915wiGIeZIRJjOCv18mNFZaq/i+b+HEsudeC+HZRDICir/Li nwozC5T+FGcmGtrsrUq7I+cGZ9CbyZ2F2/xAU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=y2zGr2VZEvB63JQd6p7+JPSINrHVr1PcPcxRlhqRBqA=; b=bGWEcHea2mg1xhwCRkaqxYLUk3j6EZscJEjjJXfRZyLRXXkD1IAaqcSbARle2NcZUR k0aT6QvCFdBcjS9J8cwq0yCw1bVN7sSFQOJlHepwq25pF5ZS5q6leKOi52fMSFp1tmwb ULC27IOdE3uIvmtGEdQM9o9PG5u2ys5B2fyfvevbNW6A7XFvhcbO0uuw5m5QbzmRJwHN 0jsL2lyoAa0Dlf5/9Blzgpe/WBmDR+mHAwDHQlb8TYI2Nsg3gYV0kc7ncmUKtjDGyLsK YQ1V3l0zzEeDmeM9Ml6Nk7Fk2Fyat1qZDtEnsWJanjBHVJ/QWhbpGepMNI1A4MaSwyzB ZATQ== X-Gm-Message-State: AKaTC008SipnMTTItCIGBfy0xPULwjNQYDicIwYsaAa2kH5z2IG/3ufFqtwhu5ZhmwDA6A== X-Received: by 10.28.73.135 with SMTP id w129mr4362808wma.42.1481670506044; Tue, 13 Dec 2016 15:08:26 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:56b5:0:ac27:b86c:7764:9429]) by smtp.gmail.com with ESMTPSA id ke6sm64350375wjb.21.2016.12.13.15.08.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Dec 2016 15:08:25 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 04/13] drm: Drop locking cargo-cult from drm_mode_config_init Date: Wed, 14 Dec 2016 00:08:05 +0100 Message-Id: <20161213230814.19598-5-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161213230814.19598-1-daniel.vetter@ffwll.ch> References: <20161213230814.19598-1-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , Intel Graphics Development , Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Daniel Stone Reviewed-by: Sean Paul --- 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;