From patchwork Mon Sep 30 10:38:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 174729 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6942932ill; Mon, 30 Sep 2019 03:38:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXXWmX7bfKsg3q0JF49yRuwrxkAdpUH2IV6q1iW9vRdTtyzxtyWrL5z2LbXqG2DHA9ULLV X-Received: by 2002:a63:ed12:: with SMTP id d18mr23712752pgi.211.1569839937848; Mon, 30 Sep 2019 03:38:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569839937; cv=none; d=google.com; s=arc-20160816; b=UKU/M1UHVXx7jgYBNG7Ae/G06stvdY2s/erPCspTiEwxCyiKxu5gRlf5LbGlPGvPSd sKRmyNzHXVC04VgQT5Q91J0YMiuUfEKPgIBR5QC4gPei5pLre3M2DB+RN34eLwOyljP1 P6DIN9im7hDc3EFH/y1KSlx8XhSc0wJgL2DcOXr5lXKBfiGjm+c1V3R3u7y7jl88fQiG RAHHspf/laigAv3pQ36ZS5xMd2j3U46hXygKGaO9ky1oA8hRMxD/WzLpnmPCmSL1Q3nS lKPP0fjcCKgsD8jBSJ+LZWM7pKJNfCJXwKWENXehAD0iHevbQG4j8zz0HPa2Oee345z3 Xqxw== 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:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=FML2zlpQGAMTfCDSXka1GiiMSaI3yig7Cu2l7zswaYI=; b=AjOC1TT6G3TS4wsNAH9r1tLS3c7BpxOUy0rpLw5B5EUP9j6n1dEOnw/Rnt7W/uptUf EYOK0bvofG5s1FsISIs6PIlwSPAVkkmP+jKZfYTABSVAnRevqXDJvOsKmN883mQFjGUK WO8mn3DXlcIQ812EHlbKYB8BKkQctgnp+End/VDNmMbysTSKpGItxeieoBFr9k8z5RPv OHDuBDzlAg90jr2NYOx+zMN4oAKlb0wQAQ8hwjvrujv1ntAdwss3CDL+hu2ixZYY1QPu 53IolCYt0nx3BTVOL1bAiCqtM6gAMrAAQaDf4AgNQSTgdG8hK1WtXf+XLiEz4/8setFR 22EQ== 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 r7si13075334pgl.261.2019.09.30.03.38.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Sep 2019 03:38:57 -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 9F1346E249; Mon, 30 Sep 2019 10:38:54 +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 20B1D6E249 for ; Mon, 30 Sep 2019 10:38:53 +0000 (UTC) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8UAcoGQ100893; Mon, 30 Sep 2019 05:38:50 -0500 Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8UAcoYW071803 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 30 Sep 2019 05:38:50 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 30 Sep 2019 05:38:50 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 30 Sep 2019 05:38:50 -0500 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8UAck1v011864; Mon, 30 Sep 2019 05:38:48 -0500 From: Tomi Valkeinen To: , Laurent Pinchart Subject: [PATCHv2 1/7] drm/omap: drop unneeded locking from mgr_fld_write() Date: Mon, 30 Sep 2019 13:38:34 +0300 Message-ID: <20190930103840.18970-2-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190930103840.18970-1-tomi.valkeinen@ti.com> References: <20190930103840.18970-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569839930; bh=z9Nx8hggaGT6yjBiZCp7WJTLUAWWUkid7h0rKpTd0sU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=quj+LqiXnhVpvXKfRGOKZ4Oa1Dtt8LW9wdnY48EyTlvBWdm7h3RGZvu3GBCswqtYf q2jPRemN94nUhc5fZ6H5Geanf9mrUSFKW1UuVDQOTt5IYYR/ws4b5pGvXzbrzXBzoS vuWni002Eza3GIstPUsPER5XqtOjh568TYBDfHXs= 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 , Jyri Sarha 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 Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dispc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index 785c5546067a..0dc0272569f6 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -184,9 +184,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 { @@ -377,16 +374,8 @@ 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) @@ -4769,8 +4758,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.