From patchwork Fri Jun 7 15:03:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayan Halder X-Patchwork-Id: 10982217 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 635BA6C5 for ; Fri, 7 Jun 2019 15:03:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50DE228807 for ; Fri, 7 Jun 2019 15:03:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43FFF28980; Fri, 7 Jun 2019 15:03:47 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham 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 EBEE628807 for ; Fri, 7 Jun 2019 15:03:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CBDE489D87; Fri, 7 Jun 2019 15:03:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0613.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::613]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8BDEC89D87 for ; Fri, 7 Jun 2019 15:03:42 +0000 (UTC) Received: from AM0PR08MB4226.eurprd08.prod.outlook.com (20.179.36.17) by AM0PR08MB3219.eurprd08.prod.outlook.com (52.134.95.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.14; Fri, 7 Jun 2019 15:03:39 +0000 Received: from AM0PR08MB4226.eurprd08.prod.outlook.com ([fe80::bc0c:5148:629e:1a31]) by AM0PR08MB4226.eurprd08.prod.outlook.com ([fe80::bc0c:5148:629e:1a31%6]) with mapi id 15.20.1965.011; Fri, 7 Jun 2019 15:03:39 +0000 From: Ayan Halder To: Ayan Halder , "james qian wang (Arm Technology China)" , Liviu Dudau , Brian Starkey , "daniel@ffwll.ch" , "airlied@linux.ie" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] drm/komeda: Enable/Disable vblank interrupts Thread-Topic: [PATCH] drm/komeda: Enable/Disable vblank interrupts Thread-Index: AQHVHUIw9rNeEORvRUuKBGT248hnNw== Date: Fri, 7 Jun 2019 15:03:39 +0000 Message-ID: <20190607150323.20395-1-ayan.halder@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0196.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::16) To AM0PR08MB4226.eurprd08.prod.outlook.com (2603:10a6:208:147::17) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.21.0 x-originating-ip: [217.140.106.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ef5dfeb2-ccbc-4f99-446b-08d6eb5952ef x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM0PR08MB3219; x-ms-traffictypediagnostic: AM0PR08MB3219: nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-forefront-prvs: 0061C35778 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39850400004)(346002)(396003)(366004)(376002)(199004)(189003)(2501003)(1076003)(81166006)(476003)(2616005)(66066001)(81156014)(99286004)(486006)(7736002)(2906002)(72206003)(305945005)(71190400001)(5660300002)(6506007)(66946007)(73956011)(386003)(66476007)(66446008)(64756008)(102836004)(66556008)(52116002)(26005)(6486002)(50226002)(256004)(6512007)(5024004)(316002)(2201001)(4326008)(25786009)(86362001)(110136005)(44832011)(6436002)(6116002)(8936002)(3846002)(478600001)(71200400001)(186003)(8676002)(68736007)(36756003)(53936002)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB3219; H:AM0PR08MB4226.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: jLVyfg2eUL2Y0L9YFIlrTlPZttAzf2mybJzb6mDUMBNtsTMT0qjbC2YW3Ec9m42Cfys9691+Ne4Qyja/dfxnasGqCvqqjFDnvcDtYfqYTiXbz5VO6HTIcP4BKkfxkcXNp++S1Ir6g/Hv1jXac+7qK5euPjHrPT7AApUa+0j8A9Up6zXtOQL9nJRjvCftXBynad3zT8lkS6EP5HrpypvTy6EIfYFmP1o9Yota0CFMGJljB6WO9Iy3AMVBAMX4c0Tf2YxjtvqrE68xmm9Wy4m3Y3hCWCV/HbOauuILQ6NkqZVRIMqk+0abZ0/3HZQ6xawkLSHZkHtbTKpzf6PJQrkBIoM6KfTX+OthDoZIhOPhBg24xNamZr00FSbhQvjRdNMJjpWiktkQMa/8EVLFYxVO4TG7uB7LV/pDnaWIFtvsXxU= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef5dfeb2-ccbc-4f99-446b-08d6eb5952ef X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2019 15:03:39.8131 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ayan.Halder@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3219 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FNkaq0/5Lf//tT41Zpi6esnwv21pP8q6+SwlpU6KhpU=; b=PUsM67q+3c24HWptTylJxHV+a2/aKHOWYQU2bjl3Pefwal+UXra3PEnm09PcDtlbgOmaU7rHCTiOnrGdWfcosJms8UCi1tztv0PKAYJdiYruUZCax2CGiS6lqhzPdKlWN5wR0DEJIavUIjm1RwuzhVnEWGU/U46Y1iPeEKohlJw= X-Mailman-Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ayan.Halder@arm.com; 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: nd Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP One needs to set "(struct drm_device *)->irq_enabled = true" to signal drm core to enable vblank interrupts after the hardware has been initialized. Correspondingly, one needs to disable vblank interrupts by setting "(struct drm_device *)->irq_enabled = false" at the beginning of the de-initializing routine. Signed-off-by: Ayan Kumar halder --- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c index 7b5cde14e3ba..b4fd8ee0d05f 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c @@ -204,6 +204,8 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev) if (err) goto uninstall_irq; + drm->irq_enabled = true; + err = drm_dev_register(drm, 0); if (err) goto uninstall_irq; @@ -211,6 +213,7 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev) return kms; uninstall_irq: + drm->irq_enabled = false; drm_irq_uninstall(drm); cleanup_mode_config: drm_mode_config_cleanup(drm); @@ -225,6 +228,7 @@ void komeda_kms_detach(struct komeda_kms_dev *kms) struct drm_device *drm = &kms->base; struct komeda_dev *mdev = drm->dev_private; + drm->irq_enabled = false; mdev->funcs->disable_irq(mdev); drm_dev_unregister(drm); drm_irq_uninstall(drm);