From patchwork Tue Oct 9 09:06:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 148488 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4647920lji; Tue, 9 Oct 2018 02:07:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV62srnfDJbbqaA1SRnwtbp3Fs0I1X7ga2XevNsbj4qd8wh3+xYNGzUUNtTzqXrRrPcUltf3b X-Received: by 2002:a62:b286:: with SMTP id z6-v6mr29521819pfl.79.1539076025278; Tue, 09 Oct 2018 02:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539076025; cv=none; d=google.com; s=arc-20160816; b=tg479Xw6IOzJPpkD4tE3PpGbydP0U6Ik/EosarXTK8Ci8mowWmxFzZX412IMgjXD8h v5bL+B0xVPn0T1LexY98lhkKMw6n5HY8voBBl1J7FM8S4TpNhzBVmOyq+fPY9i0rVUGU AReK/wTVPuR0aKDoiJySQ+GN/lDU7QSs5ng0+g/scrpuEUVeCbJd8LcI4OdZUFAthi6m HdZ1KPlbqLck98wwIx94oqH9E+fW0gANNdUrSKNV/njM/x0B8jw4VpsKKOL9myQjsE/X uUPKZwuXsppuN5i5ZEW/YPC6PMl+cV/nCocLu4KzF6e95Yo83OJSpZ+CFeyNCokA1EOw aQAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=7ZIX/Sp5gaSUiVfMu41vSM4x86bRxeirkza4neZT5BI=; b=mLkGk4sH9vV2iZipk3hwzOp5I3xgCZc66kgB8j6Hcdgp2W531B5KM060ImcgAdQriF 9nAq46rEztFyHGRX8oYFgzN7HlOwyEAbYDLlr7iNb1wphNZqPTfcVPjtbF4EzL4B0jAn aFDRHqyX5ECVgTkNXYUYodIeY5fLjOQRLvLimRsTp1Bqn8TiaEp4MVNXIyGTdoWKHwqv Iqcu7kL2VZ8uzxEWj0uNQmr1vjlQpmR47+BjnDHxv0hAd5BahsSXb7vBOUMJ5zbGS1F+ vZhHHFqpGul8H+1j/pzlIBr+GmV16vRLugLU/dtiYA0Q2ZPJkXo5xUvMw8FcbruhatpT MuNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j13-v6si19131906pfn.288.2018.10.09.02.07.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Oct 2018 02:07:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A8DB6E24C; Tue, 9 Oct 2018 09:06:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4F34B6E24C for ; Tue, 9 Oct 2018 09:06:31 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id w9996RRD050632; Tue, 9 Oct 2018 04:06:27 -0500 Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9996RPR006073; Tue, 9 Oct 2018 04:06:27 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 9 Oct 2018 04:06:25 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 9 Oct 2018 04:06:25 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9996OeV001706; Tue, 9 Oct 2018 04:06:24 -0500 From: Tomi Valkeinen To: , Laurent Pinchart Subject: [PATCH] drm/omap: drop unneeded locking from mgr_fld_write() Date: Tue, 9 Oct 2018 12:06:21 +0300 Message-ID: <20181009090621.12555-1-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Commit d49cd15550d9d4495f6187425318c245d58cb63f ("OMAPDSS: DISPC: lock access to DISPC_CONTROL & DISPC_CONFIG") added locking to mgr_fld_write(). This was needed in omapfb times due to lack of good locking, especially in the case of both V4L2 and fbdev layers using the DSS driver. This is not needed for omapdrm, so we can remove the locking. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dispc.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index 84f274c4a4cb..a4e4076dbcf8 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -195,9 +195,6 @@ struct dispc_device { struct regmap *syscon_pol; u32 syscon_pol_offset; - - /* DISPC_CONTROL & DISPC_CONFIG lock*/ - spinlock_t control_lock; }; enum omap_color_component { @@ -388,16 +385,7 @@ static void mgr_fld_write(struct dispc_device *dispc, enum omap_channel channel, enum mgr_reg_fields regfld, int val) { const struct dispc_reg_field rfld = mgr_desc[channel].reg_desc[regfld]; - const bool need_lock = rfld.reg == DISPC_CONTROL || rfld.reg == DISPC_CONFIG; - unsigned long flags; - - if (need_lock) { - spin_lock_irqsave(&dispc->control_lock, flags); - REG_FLD_MOD(dispc, rfld.reg, val, rfld.high, rfld.low); - spin_unlock_irqrestore(&dispc->control_lock, flags); - } else { - REG_FLD_MOD(dispc, rfld.reg, val, rfld.high, rfld.low); - } + REG_FLD_MOD(dispc, rfld.reg, val, rfld.high, rfld.low); } static int dispc_get_num_ovls(struct dispc_device *dispc) @@ -4795,8 +4783,6 @@ static int dispc_bind(struct device *dev, struct device *master, void *data) platform_set_drvdata(pdev, dispc); dispc->dss = dss; - spin_lock_init(&dispc->control_lock); - /* * The OMAP3-based models can't be told apart using the compatible * string, use SoC device matching.