From patchwork Mon Jul 16 10:07:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru-Cosmin Gheorghe X-Patchwork-Id: 10526359 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CC5A5601D2 for ; Mon, 16 Jul 2018 10:07:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD227289EB for ; Mon, 16 Jul 2018 10:07:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0DB228A0B; Mon, 16 Jul 2018 10:07:59 +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=BAD_ENC_HEADER,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 76116289EB for ; Mon, 16 Jul 2018 10:07:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0CDFF6E206; Mon, 16 Jul 2018 10:07:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00065.outbound.protection.outlook.com [40.107.0.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id B67866E206 for ; Mon, 16 Jul 2018 10:07:56 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.96.140) by HE1PR0802MB2553.eurprd08.prod.outlook.com (2603:10a6:3:e1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.20; Mon, 16 Jul 2018 10:07:52 +0000 From: Alexandru Gheorghe To: airlied@linux.ie, dri-devel@lists.freedesktop.org, liviu.dudau@arm.com, brian.starkey@arm.com, malidp@foss.arm.com Subject: [PATCH] drm: mali-dp: Call drm_crtc_vblank_reset on device init Date: Mon, 16 Jul 2018 11:07:07 +0100 Message-Id: <1531735627-14500-1-git-send-email-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: HE1PR05CA0279.eurprd05.prod.outlook.com (2603:10a6:3:fc::31) To HE1PR0802MB2553.eurprd08.prod.outlook.com (2603:10a6:3:e1::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34c4484d-5e48-4d27-05ae-08d5eb03feb1 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(48565401081)(2017052603328)(7153060)(7193020); SRVR:HE1PR0802MB2553; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2553; 3:iLwwe4C0Oc5qJWRsAvvi8i1Kyee5XOFtehLTvQqduhMSi3pzzLpWcA81D8YUaDM3P4fStmDeupZlGf266imGvnWhwgClignTX7FQFMcgcI8hvr7fMgYMb3Q65i3+DVt/WPupVI3ChL1VDBDU3EIhyezxg7KjMQTezptkA+tP8XU5Q92duJb/qICrUzBnvr73OLwkO03katTaOE8W3iZiG2PCpD4u4dNXnXwVESSYlAd5BqOTNdkpFYSjkkxJgMmD; 25:6uwhrktSUShpS8wkSERDadcIhNRhkVLLXHmlXyJR8W2nbf9JBepl05hWzwbASJDEclaIrJWyJ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+H+cFIalcwkimYYb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:HE1PR0802MB2553; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0802MB2553; X-Forefront-PRVS: 073515755F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(376002)(136003)(366004)(346002)(199004)(189003)(2906002)(3846002)(6116002)(316002)(48376002)(478600001)(81166006)(16586007)(50466002)(66066001)(72206003)(386003)(81156014)(26005)(52116002)(7696005)(51416003)(106356001)(105586002)(8676002)(53936002)(47776003)(8936002)(4326008)(25786009)(68736007)(6666003)(86362001)(97736004)(16526019)(186003)(50226002)(476003)(2616005)(956004)(486006)(36756003)(7736002)(5660300001)(6486002)(1857600001)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0802MB2553; H:e114479-lin.cambridge.arm.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-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0802MB2553; 23:xwFRZactTX/dcxIcvOcLV6A+4DYUB2UXORzvpZU?= =?us-ascii?Q?f2mkgM4BK6leOsfd4sRpAzvYrBwiuOFhaUeh8oax+Y1K6+90FImo/2GijH36?= =?us-ascii?Q?R51EoYA7Njb3rRf2g4+xf3xvE4tXWe5l1y8zLWC8gyK+fiXcN49IpQAKifEy?= =?us-ascii?Q?vtAniHgWmRD5pY1McUxfnPryjsWh4DmJz/0Gu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gCc3/TbPIw3c4oy39jhYGhisfuB8kcDJV0aHITVPBCYxE6v8Dg9LoIgQz5D6rPAFu4FD879KOk=; 24:x76ishqquTFnCXjzsyZy4RTTpXIx2CQIgvo+2aEwnGvqzPnF87ktoIzXaK2b0FWVQbMZwnCOk8OjtZ+Ovtn9luGM5EsDtb1PV8JUkHP7zi0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2553; 7:Af1FAZ0x1i7arbNcp5VxLMUXeQLBcPEaK5AoiaeYk8E/TRWjBIOacLDjIjQWCGUy04UTq01VS6BZX4Ii7TQxFJODOK4tV1myHZIrP4L73XUiyw4NgNez7lKHE4THr4t5ikHnoL0fvu9E5FQGdLKTTrMr/SjpuwoIqOKz+TlVkf8P3uTy82gXz/B0XLue5u0x7kRwjttC5expmFLzUipLreoJDhMfYjgKUkO8wrtsripgcaUuS8CsPusZFkyxCcTj X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2018 10:07:52.8973 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34c4484d-5e48-4d27-05ae-08d5eb03feb1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2553 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@arm.com, Alexandru Gheorghe Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Currently, if userspace calls drm_wait_vblank before the crtc is activated the crtc vblank_enable hook is called, which in case of malidp driver triggers some warninngs. This happens because on device init we don't inform the drm core about the vblank state by calling drm_crtc_vblank_on/off/reset which together with drm_vblank_get have some magic that prevents calling drm_vblank_enable when crtc is off. Signed-off-by: Alexandru Gheorghe Acked-by: Liviu Dudau --- drivers/gpu/drm/arm/malidp_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 4169a72..641d743 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -755,6 +755,7 @@ static int malidp_bind(struct device *dev) drm->irq_enabled = true; ret = drm_vblank_init(drm, drm->mode_config.num_crtc); + drm_crtc_vblank_reset(&malidp->crtc); if (ret < 0) { DRM_ERROR("failed to initialise vblank\n"); goto vblank_fail;