Received: by 10.192.165.148 with SMTP id m20csp3518250imm; Mon, 23 Apr 2018 07:54:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx48J6wIkpmsKss8oao84yeuvJ7JNa6B66bu16udXGQVvVkNmjo24qZci2YliBhe+WiGXIZDw X-Received: by 10.101.74.69 with SMTP id a5mr17731863pgu.32.1524495299736; Mon, 23 Apr 2018 07:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524495299; cv=none; d=google.com; s=arc-20160816; b=Yx+llyP2K7d1gKhYBuf5HVHyPscrtXxrul7nhWbcuwA7hkFwsmIa2UA5KNrngwOswn aJyk54cbewGnvm/cpR6e/0Cv1LdlHMA6r91YdnJEyE+fBFQUpv4DkHb1cLOwNVxBYiJF 4wmosOFetPoErt+fayQmAmhS+qqFYxnZZLS42eaApEFGou2oq8aN9KEIC+a6IokP3d4n qi7Qm5gKgUIdjgOGXUgrSW1UQfcDexH+Zyi8NvTGB8lfj+MiiSNb/po7Gokibwc2g6Mp WtToQzpdvrV9aQAOPfHjZu8Z6AF2IJ0lZt8ufGeQNURVllM0xbp7HjVGLNSjn3n8r0gX w46A== 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=FueK82wG0gwNNryNouJ2SC6R3eElUyDBGkVcvPckf8k=; b=SmxKWHOUtu0RpIsebsAr2+fQQWaPJsmpjLfMzIb5RlKpS2wseqEk4oY54U6ki1IMjL gA8WVSVQODF0A6clDiktbONiy/6asg2O5FVabeZVeIauMdjslAfUVZbNoErZ//NebsIh UPrlmlx/WAUTH7i60JuebNZcTHENnH/E7j2QuEe5qq3nukYui27dygvsybdNP7uJSoL3 BdHisDsmdIqYa8pnMZp0yaTMFP0E4e2SprpUvmKqe1PStJ4CdKWU1cqgXv0p52gTvT4r /ty718CGrq7ctyTEY0unc0K50jlaf1pABULdMz4fljaKQXWo+Za4pF35W8UrHli1Puo4 HuPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=PMUoGmQo; 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 g6si9708848pgq.321.2018.04.23.07.54.45; Mon, 23 Apr 2018 07:54:59 -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=PMUoGmQo; 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 S1755817AbeDWOwo (ORCPT + 99 others); Mon, 23 Apr 2018 10:52:44 -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 S1755198AbeDWOvJ (ORCPT ); Mon, 23 Apr 2018 10:51:09 -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=FueK82wG0gwNNryNouJ2SC6R3eElUyDBGkVcvPckf8k=; b=PMUoGmQoibJrnlEHJfZyygn1HaeRM3+eiY0PzlFvqb/IesMqBYdbp6cWxO6yKqILBIweUnp4q5J2WFafJW6AoPmAWzHcyyTzWHneGaX/2mycpTnDILrLjxXr9TiqUaJ6TK7kVRMJZuQmCogYvuveKnZXmAWIEM3OH5s3pPt6kz0= 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:06 +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 3/8] drm/arm/malidp: Split malidp_de_irq_init Date: Mon, 23 Apr 2018 15:50:46 +0100 Message-Id: <1524495051-3891-4-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:fjyP1O6Vmk2muQXtuG9rcwrxWzJOoUcIwXg5v9+U6jgffswJVOF8TqFty1vI6BzI7zY6xNP6rL7Pvgrdw46vYKt0jdwt2QBQdpzGhp/Qkt317QuhXVJDyXfXtT62TAo/W/UmuhiBw6ws6LfVsCLkg2HqwjePicIIAzNhL2rPqXtZK9dqzI6jRJu8fziVpQz08V5pjc0pqx62C6773IitCjG/jvdRdapwwUtfkJa2KEYp+43okMiBzCYH96L5Mb3Y;25:YkkGaLbBdYwvhdSm0+XO/XtaNcM0modpdS7KzqLU/u4tT8thGEPb5EvuSmHuUde57sTjopaQVGBhgbC1tjZZ1rLnkf9vvX3mPM8Lc5rpOE3GTdmZFUsOCHTNLUjx97jzrKZCvuLm0IPt7hAtm4Avzy5cIr/K9RfVIZ477Zk+xbCZCov359AZ0GxCg8PeMyTiQqPVyFoFBcmfc9AEeqBOoxHx46X43bK3WcsbjtrHcNEBRxyFYdkoyV84vXgzFU3c9x50SRtdPxA40NXtQ4XuOI0eKrgadOUPu25zQ3BWrVKt9c+Q9CPZrsz8DR/iuzYuXdXC2iZFHCfIDRbixfIMeA==;31:dgXi0G7oubIaxYl8DdPCgCseTn6vTHOKFQpNPlFMCYKwSoiULLJOL8kzgMZSkqC3YroGEPodDzzPHLNPYwt1ShpIBmtSYca2anwURaTMkPcpK8dx3NSASQ6ivYh/lymM/6ncjZoQIYcImSh2t3VUVgQFJOynYlHqG+9jx99aoebQFIALgktmjxn4w36mH99iUZeHvzkwMWJocMpmaDCWpT3iT9kqrDcK6bgTyGsPqP8= X-MS-TrafficTypeDiagnostic: VI1PR08MB3039: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3039;20:bELDfmG4BmAlXF51jfcYH9N4hRNnWblDuZIunwBlKcx/XRRtgOt9k7zbSafYqTFiD2/uy64abh+BmovhpPL7mPUTYEuTXziuXh+KNMG4nxn7eDDc8P8dB63skl4YNGRTCJX6L2FNauVQoQZgz33e+jVZg9ft6i5UAlU/YwNSYzHKDydrA6rtU8hlWFoXBF4yqJvmfzabmVg8nTczJhWmks9eQi0ZC0p1vuBP+EpkiiobZm1EoWM1RfBYdSpigH6R;4:s6M9gdFUsC39U8LXsn5IMdqYKts6S73MgMSVWqRD3oAu9NhLbddD2QhZQe7yMFbtUB5g+VcicHW7kF8vbMdGcGNiMyXXZycBge4TjPc0f9kliBE0vUI7JLzyEJLexXdi1oNcEDW3/4g5Tcb7vM1XNRt+0ksK4/JY/q6voBz2Gkkq6LpdruLsOhWCN6BruD8Lqxl7t11uh2GuPk4sCtm3fl8n8u/lmFnyIPUjz4t9ditQclSPHwQDNd8fctvMl5zZ37B1lPOYyg2paLOONNTS5pQGYiJVIV+9om7i+UI/MkoTZ/pnnbZFkJpqsGSjORtJ 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:lqydqzLkIaCsGZeZY/h7280rMRaUyKAAnNdV1b32m?= =?us-ascii?Q?iBxVrY8j7zakpY35tHBrsxx09MkIiUosLrInLX5Bw33W0K78hLI3v0a1o+EF?= =?us-ascii?Q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Output: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3039;7:otjoiruMetNMBUNf/r9m+BSeu2HyTCPQQGFjGaLkNx+6CChRfsuiuVDI/QBAp1+/DMgKmNltxLHIM+s6Rriffhm9Xrgsbdxbxi9bpqZuquscJ7LgAvSQt21NSY/HXwC9RZFBXnVi7RaFyWF4gPGyjYiXuVMFFWDoNORPYmhYN9VbUqrD5QhFAasvqisBPhDmy10G1fASbhT+vKxHc2UcyAev4CtFg6s33iF+u0G9yhPjeJL+iohBrUzfTOIlDf4G X-MS-Office365-Filtering-Correlation-Id: aefa5e08-86eb-43bc-c960-08d5a929a4ba X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2018 14:51:06.1813 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aefa5e08-86eb-43bc-c960-08d5a929a4ba 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_de_irq_init() into the malidp_de_irq_hw_init() which will be later invoked from runtime_pm_resume function 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 | 25 ++++++++++++++++++------- drivers/gpu/drm/arm/malidp_hw.h | 1 + 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c index 8fb02f3..3e73370 100644 --- a/drivers/gpu/drm/arm/malidp_hw.c +++ b/drivers/gpu/drm/arm/malidp_hw.c @@ -869,6 +869,23 @@ static irqreturn_t malidp_de_irq_thread_handler(int irq, void *arg) return IRQ_HANDLED; } +void malidp_de_irq_hw_init(struct malidp_hw_device *hwdev) +{ + /* ensure interrupts are disabled */ + malidp_hw_disable_irq(hwdev, MALIDP_DE_BLOCK, 0xffffffff); + malidp_hw_clear_irq(hwdev, MALIDP_DE_BLOCK, 0xffffffff); + malidp_hw_disable_irq(hwdev, MALIDP_DC_BLOCK, 0xffffffff); + malidp_hw_clear_irq(hwdev, MALIDP_DC_BLOCK, 0xffffffff); + + /* first enable the DC block IRQs */ + malidp_hw_enable_irq(hwdev, MALIDP_DC_BLOCK, + hwdev->hw->map.dc_irq_map.irq_mask); + + /* now enable the DE block IRQs */ + malidp_hw_enable_irq(hwdev, MALIDP_DE_BLOCK, + hwdev->hw->map.de_irq_map.irq_mask); +} + int malidp_de_irq_init(struct drm_device *drm, int irq) { struct malidp_drm *malidp = drm->dev_private; @@ -889,13 +906,7 @@ int malidp_de_irq_init(struct drm_device *drm, int irq) return ret; } - /* first enable the DC block IRQs */ - malidp_hw_enable_irq(hwdev, MALIDP_DC_BLOCK, - hwdev->hw->map.dc_irq_map.irq_mask); - - /* now enable the DE block IRQs */ - malidp_hw_enable_irq(hwdev, MALIDP_DE_BLOCK, - hwdev->hw->map.de_irq_map.irq_mask); + malidp_de_irq_hw_init(hwdev); return 0; } diff --git a/drivers/gpu/drm/arm/malidp_hw.h b/drivers/gpu/drm/arm/malidp_hw.h index 6607aba..3b049d0 100644 --- a/drivers/gpu/drm/arm/malidp_hw.h +++ b/drivers/gpu/drm/arm/malidp_hw.h @@ -297,6 +297,7 @@ static inline void malidp_hw_enable_irq(struct malidp_hw_device *hwdev, } int malidp_de_irq_init(struct drm_device *drm, int irq); +void malidp_de_irq_hw_init(struct malidp_hw_device *hwdev); void malidp_de_irq_fini(struct malidp_hw_device *hwdev); int malidp_se_irq_init(struct drm_device *drm, int irq); void malidp_se_irq_fini(struct malidp_hw_device *hwdev); -- 2.7.4