Received: by 10.192.165.148 with SMTP id m20csp3518331imm; Mon, 23 Apr 2018 07:55:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/DFbLyLLCddsT3P1V7PSyNzTg/uKdaMcun07tg1ZUo85dhlWLRevGTLfmwuK5g5cU9NQqo X-Received: by 10.99.63.6 with SMTP id m6mr12915187pga.340.1524495304463; Mon, 23 Apr 2018 07:55:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524495304; cv=none; d=google.com; s=arc-20160816; b=OHd5ZUc/yPyQis4InJwvQqMoqvqkNujdYm4cmXebhhtJ3TMWgsypzrTvVaHjZ5lhRX VLd32tHJOz/BY27zckSAEgvUbHKePFx8KOfpc7mIHddD/szUrRwCf+D6hCvX2i9GqdFA r+CdMdj0A7YOGC/Vg9ufEbMoEWXkXpl6/AkcidQ33azyOHwiB9JhssFyuiPZQa301pQ6 TvxV7MHRCEckiaYxfOBgVlnonLUjPazzVczUiy/FUo8pNQcOWZmfTfg5U/hSG9rO8uVb 2zc5Oux1J9R8EgoB9OO0EkaU7OkZTt1wwWZn9YF3E/+GRA4bbYkXs4KYDX3y9qy0iRdH eJbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:nodisclaimer:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=quMLFL23R+YspmTmkB9NGy8nVZQXLexlNEPSWFAsDRk=; b=rQp32j0VUL9bJ9+c8C8cpgAg7Gn/p0DCvi9Qta0KDeHwvM7Ffje1zGO63Bt1oLQ/7J hmoM4gbOmv0hEb9REzieidBUDlAJvM4Qn0VXa3PfLl8eqEFapw/AGQuDSdhky/s06szb ZryzmfHnQCy4o+t1DSqq2Fm4d9RVEgLmcMs/AUmddAqzeyYWMYz3KpSIDaxOy3OV1ZXg KcZMPs4lqK//Ny21nAqoeou7TrKphCJlZslvaRAAwcrst5Z/xy5N9p2oiC0W0CbC57ra vTeu736saVK2rkj1eVYjFbFLDR6fvJ6PRDn/iMTWQqngkANxoSoevIXCcajpcJZFhfLH ++9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=NBLO04lC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q137si7372683pfc.68.2018.04.23.07.54.20; Mon, 23 Apr 2018 07:55:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=NBLO04lC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755641AbeDWOvW (ORCPT + 99 others); Mon, 23 Apr 2018 10:51:22 -0400 Received: from mail-he1eur01on0056.outbound.protection.outlook.com ([104.47.0.56]:26568 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755580AbeDWOvN (ORCPT ); Mon, 23 Apr 2018 10:51:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=quMLFL23R+YspmTmkB9NGy8nVZQXLexlNEPSWFAsDRk=; b=NBLO04lCZvXZfTDfRrXNzrSc3rjLvfykPYg7qzCZ12F8LYXGU3e06YKHDsxTDN1jMc+KSGGCRRqJeQVDicHuKLZ1U/o4EpvAYVAFK5BuFNgsj/Uq0NlvxE64E/SRBMtql4ZnplisVNcUUsRFyav8zNV3T5ErdXa3Lp4D219WyhM= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from e113505-lin.cambridge.arm.com (217.140.96.140) by VI1PR08MB3039.eurprd08.prod.outlook.com (2603:10a6:803:45::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.12; Mon, 23 Apr 2018 14:51:07 +0000 From: Ayan Kumar Halder To: ayan.halder@arm.com, liviu.dudau@arm.com, brian.starkey@arm.com, malidp@foss.arm.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: nd@arm.com Subject: [PATCH v2 4/8] drm/arm/malidp: Split malidp_se_irq_init Date: Mon, 23 Apr 2018 15:50:47 +0100 Message-Id: <1524495051-3891-5-git-send-email-ayan.halder@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524495051-3891-1-git-send-email-ayan.halder@arm.com> References: <1524495051-3891-1-git-send-email-ayan.halder@arm.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: VI1PR0701CA0055.eurprd07.prod.outlook.com (2603:10a6:800:5f::17) To VI1PR08MB3039.eurprd08.prod.outlook.com (2603:10a6:803:45::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020);SRVR:VI1PR08MB3039; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3039;3:lWQWKSnNtmY5KBcz8bx/lw/nGrdWRu9WzrTnK7VaNPriG52j0DcQ2B+c9fi0kT3rz1P6e+nfmTrZHalb6HL8ZQXhmgR2Ys4bHXeooOmbKhz67XHRvCZKx7qzNjN52U9DujprcBo2/Yau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3U9LLvwDkukXpquqN7GH+5wwielxIvCM3FEt+aOfghQ0R3V3037/s59AWixR+OUaL430OsnncP53sNeuf0pmOA1L/oNGSHwyu//7HiHkVKDPAE5Owo5YfhYQgie+oaWWBJlxjS18rkd3VixkBABooEySIxPgPmEguJCBVfFLIkBrDiK2LUvxz+cnFlm6jcjoJJmZo4Z8YuMMvKnJQE+s1aQ+HDd/7ONb3uSCgK8e0WU3vB5g1TvQXLcoYZc6hfInCC3oOCgoLeJ7m7htj2GGylpL8iIxbDUxa X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231232)(944501410)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:VI1PR08MB3039;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB3039; X-Forefront-PRVS: 06515DA04B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39860400002)(346002)(376002)(39380400002)(396003)(366004)(36756003)(47776003)(50466002)(6116002)(26005)(81166006)(3846002)(8676002)(48376002)(5660300001)(7736002)(66066001)(305945005)(16526019)(446003)(478600001)(2616005)(956004)(476003)(16586007)(52116002)(76176011)(59450400001)(316002)(4326008)(386003)(25786009)(72206003)(86362001)(6666003)(7696005)(11346002)(6486002)(2906002)(8936002)(50226002)(53936002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR08MB3039;H:e113505-lin.cambridge.arm.com;FPR:;SPF:None;LANG:en;MLV:sfv; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR08MB3039;23:v4FW5WLt3ZCQxf14+n0Sa+HwotbwXPnCivxhQ5wxG?= =?us-ascii?Q?hkU9ILAuPv7qVkhs7gqSh/QyRv0G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En+6nHu8EpA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3039;7:VAYlWaxlqkxc+IqwrcDCtpSpCGZFEEoCFHdxsKpBW6+6CLtq1n3lOBlXRMUdEKEoAci4SVD2VonCcMBfUFsQutpL2Tk+yWWRI812BapbAABUSKVpNQnLmXyvoBISZSLFxvQxQY7C50AXz0AjLnCLneIZu5edMOMMwwJfNmx2XywQoILEKAyBP+cyDNpTVPUYjZO4aTpafMtJAgyHMYsrIVLwe3dOK1Nf+wsVUw+LXcWnuR8EYcvdARQSBw+E+1Gb X-MS-Office365-Filtering-Correlation-Id: c3eb8203-a14a-4551-9ab9-08d5a929a56d X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2018 14:51:07.3376 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3eb8203-a14a-4551-9ab9-08d5a929a56d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3039 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Extract the hardware initialisation part from malidp_se_irq_init() into the malidp_se_irq_hw_init() which will be later invoked from malidpxxx_enable_memwrite() when it needs to re-enable the interrupts. Signed-off-by: Ayan Kumar Halder --- Changes in v2:- - Removed the change id --- drivers/gpu/drm/arm/malidp_hw.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c index 3e73370..f5633bc 100644 --- a/drivers/gpu/drm/arm/malidp_hw.c +++ b/drivers/gpu/drm/arm/malidp_hw.c @@ -163,6 +163,7 @@ static const u16 dp500_se_scaling_coeffs[][SE_N_SCALING_COEFFS] = { }; #define MALIDP_DE_DEFAULT_PREFETCH_START 5 +static void malidp_se_irq_hw_init(struct malidp_hw_device *hwdev); static int malidp500_query_hw(struct malidp_hw_device *hwdev) { @@ -952,6 +953,16 @@ static irqreturn_t malidp_se_irq(int irq, void *arg) return IRQ_HANDLED; } +static void malidp_se_irq_hw_init(struct malidp_hw_device *hwdev) +{ + /* ensure interrupts are disabled */ + malidp_hw_disable_irq(hwdev, MALIDP_SE_BLOCK, 0xffffffff); + malidp_hw_clear_irq(hwdev, MALIDP_SE_BLOCK, 0xffffffff); + + malidp_hw_enable_irq(hwdev, MALIDP_SE_BLOCK, + hwdev->hw->map.se_irq_map.irq_mask); +} + static irqreturn_t malidp_se_irq_thread_handler(int irq, void *arg) { return IRQ_HANDLED; @@ -975,8 +986,7 @@ int malidp_se_irq_init(struct drm_device *drm, int irq) return ret; } - malidp_hw_enable_irq(hwdev, MALIDP_SE_BLOCK, - hwdev->hw->map.se_irq_map.irq_mask); + malidp_se_irq_hw_init(hwdev); return 0; } -- 2.7.4