From patchwork Thu Feb 11 17:20:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harry Wentland X-Patchwork-Id: 8283291 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AF78B9F3CD for ; Thu, 11 Feb 2016 17:22:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AF98A2034C for ; Thu, 11 Feb 2016 17:22:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 27AE02035D for ; Thu, 11 Feb 2016 17:22:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 021BD7A0C3; Thu, 11 Feb 2016 09:21:10 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0056.outbound.protection.outlook.com [65.55.169.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id B7C397A0BD for ; Thu, 11 Feb 2016 09:21:08 -0800 (PST) Received: from CY1PR12CA0077.namprd12.prod.outlook.com (10.163.230.45) by DM3PR12MB0858.namprd12.prod.outlook.com (10.164.7.140) with Microsoft SMTP Server (TLS) id 15.1.403.16; Thu, 11 Feb 2016 17:21:06 +0000 Received: from BY2NAM03FT011.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::200) by CY1PR12CA0077.outlook.office365.com (2a01:111:e400:c42b::45) with Microsoft SMTP Server (TLS) id 15.1.409.15 via Frontend Transport; Thu, 11 Feb 2016 17:21:06 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp01.amd.com (165.204.84.221) by BY2NAM03FT011.mail.protection.outlook.com (10.152.84.233) with Microsoft SMTP Server id 15.1.415.6 via Frontend Transport; Thu, 11 Feb 2016 17:21:06 +0000 X-WSS-ID: 0O2E874-07-0X3-02 X-M-MSG: Received: from satlvexedge02.amd.com (satlvexedge02.amd.com [10.177.96.29]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2AC7C12C130F for ; Thu, 11 Feb 2016 12:21:03 -0500 (EST) Received: from SATLEXCHOV02.amd.com (10.181.40.72) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 11 Feb 2016 11:21:36 -0600 Received: from STOREXDAG03.amd.com (10.1.13.12) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server (TLS) id 14.3.266.1; Thu, 11 Feb 2016 11:21:04 -0600 Received: from cnhwentlanub.amd.com (172.29.225.36) by storexdag03.amd.com (10.1.13.12) with Microsoft SMTP Server id 14.3.266.1; Thu, 11 Feb 2016 12:21:02 -0500 From: Harry Wentland To: Subject: [PATCH 28/29] drm/amd/dal: fix flip clean-up state Date: Thu, 11 Feb 2016 12:20:08 -0500 Message-ID: <1455211209-26733-29-git-send-email-harry.wentland@amd.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455211209-26733-1-git-send-email-harry.wentland@amd.com> References: <1455211209-26733-1-git-send-email-harry.wentland@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.221; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(189002)(199003)(2906002)(50466002)(4326007)(36756003)(48376002)(2950100001)(77096005)(5008740100001)(189998001)(1220700001)(5003940100001)(19580405001)(5003600100002)(33646002)(92566002)(1096002)(586003)(19580395003)(11100500001)(105586002)(47776003)(86362001)(106466001)(53416004)(50986999)(229853001)(450100001)(87936001)(2351001)(50226001)(76176999)(101416001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR12MB0858; H:atltwp01.amd.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-MS-Office365-Filtering-Correlation-Id: 303b0dc4-1eab-41bf-efb2-08d33307b9ab X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0858; 2:TZi6sg0RIbIWL2MMRk4/Vm/257yRDGfxcQBHdubV7N20oJ9orwOHE6+Jn9BPygE8K3eYYru26keFcv4p42yaIV+GI9M0cEU4CyigylmAV11LZMWfbrZy8grIyzDH/A703N72Qmw1r1cWe2Sh+U+9QZzbifUhrUccp22Iha/zG4HbDHZ/z6RyfHsmFZutD3DF; 3:NPLTDSeUZVFew4MRG02lSi9VhBTnI6iGuX2Kem4+FwXvIL2UJwgAuNQYuZ0p5ClaHvmffSJNOybK3zPYPVZ84O+t1U256Lo5gQtfz6QpzdmN9o53cRP2/6v2r6Do03rxhBmsJj7BGC4FGNaHjXkUhefteE+IB0rlCA6XUqcdPW8PDRKm5NPu88rd23Tls+VZD28+GLZnE4uQrX+sJ+oo2aX6hC2cKco4oY8BlMtw67U=; 25:OoefKj6HownGiNfelr5Em9oJwX9anGIpiD4+Zy0UM0FAev92Xl7Ngq2i2qYayGqQayk+fCRJSMzmhbb/3FJyIfg2X1jW+/Mh8TRuZVuu5CxXXqjMIzBag9XiMuqEqoZ5fVIb7ts+XaebJWl7Zii52Yjq855MVvrMELhVc3v4Wmb497LvOSa3A8IpZcF2bMM4A9fh42P4+2m6g/zkdpHriDXqazo397gUr0FtN6DJUC6k5wtOawYLcuVCBpbc2nRtAxKOsaaI3gf2atqyhuPoLJukX9XYp6PsXKux5/Uc0N70SLOy4uZ89Nm1F0UXb1aF X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3PR12MB0858; X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0858; 20:/YR1CadEdrlMFAHmzsge/6nrUYlPth/msoIDlEHOE/9gzJjVP2EGiIycMrK9oNjj5/pVn01HNsj2u232IlgUT56VdIdYlub3qhTS4ijt7uD4RIs6asT9yUIqAueBt9PKMz1VPQtIKo5Bqy+F4zGXpT2BSbnQh31VIZnQPf3e+7d/80uh/34CvPsz9X5V0GE5lQ20g4p2vjBQ5LvBTCd17CSJRYNJO5BfK3HcgevCWKpOSD8/aa5T7VyDouHYM90aZC1B2O/IAtUmEkGT3sbWkIiz1V4LLxe0CPvMGPK2glsE2jOjAbhmwYX9KqOnNZW0nkcySLZ3IO8gA/u4fgIwy1f7XrYZbyqJIp5j4EV4ZAXYXRKxbX3lLDmPJTN6v2MNJEDbMW3/ZBMPBX3yaPBnIOgwR2reHGpUDe1KGf0YwN2g3dKCmhVv45lPu2SgOh3QJ5LIztA3fXLwDV5FPNveglMTdITZ4cnQyjXFQjLuCI3vs0etC7Cp8rxC0TT5tjIy X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(13017025)(13015025)(8121501046)(13024025)(13023025)(13018025)(10201501046)(3002001); SRVR:DM3PR12MB0858; BCL:0; PCL:0; RULEID:; SRVR:DM3PR12MB0858; X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0858; 4:COpZs+bXcGbBn4rkLmVFXD5zUDlvR5/YqkAY9zYbUeDjcceFwyyvFUvz1U+VL8uAaHqwKa29oMsfXTEKQ8k0Ij7rSVUQyRszV4NxyyEJ712uw2Y8vrdieS0KGPkFJaF66PCac3+i4NS0uAkbr+9Q0Sf2YW92g+PHcTuYFA5uG7NFkZsv3HmZbG2XSPNmRNzBBSFKNjyUa0V2VVvoU4+vkfPfC9238sRxc2Xllhemp1ku/Lbh8VzLue7r6cdiPuT1aMDZ/u/CMmBS72jC20h1Oyafy8kK4fnFuo9KPSQmR3XsRY5xFih8BybGXByrNwxDCUPCiwMYo8igk3vd539n3fIc2NPjtOx3xB13o8yN7UxgpW2QIe8TFjlJCEqTTWrZqiw77ZxIVjkfW51dsJ05XCvIOH6Gt6+kGHmx36hnH7dvH+xhe6pePgK5HTaaK1zxO9e1EXBZX3t/Z7C14WCmypdNFpnH4pzAc7vhp0+YJgNs3OpcsHvHu8jhlr2ghO9B X-Forefront-PRVS: 08497C3D99 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR12MB0858; 23:oGnI8/iRDTC05XE3YXJF1JtF3TjyPKLohTOmcI8MC?= =?us-ascii?Q?hrnV9t5TE54JGWH3s62iFkab/ly66U2inxey3Bv3KDNRgm7o5YJpMxdppuEB?= =?us-ascii?Q?5YFuDu0CjeqVQANSSj2RxyKPbyjWZTF/YgvmIC80Di/mCE7hHl94VyF3bql6?= =?us-ascii?Q?MupdQ2ljqrnWXiQ+02YqzZbxzBnamhS7mSYDgGaL3DG+c6+gDed2Ipc9wy9h?= =?us-ascii?Q?QIo/RP76dbDg46Q/+k9fvRGXETuK1FGQ2+zvcldbhs6hKZ/K0tU261EiXc2B?= =?us-ascii?Q?lwzpezU3F8X/20ZYFmBeSHpdUq3IDPZYats4f7SeAWmWg1G/lf9UATMwjGyD?= =?us-ascii?Q?CCSBZRKySefWY/ZLdk83ELFoP4qlOy2X+KjMMGCPsDkUaCZfxtESuIFyPjyW?= =?us-ascii?Q?YpCF/0OagIFEAOmlbrVvDrKZWlovMfstZdvxt0O+VZLNwbKqf/tnJOkCkvWM?= =?us-ascii?Q?YIT8zGl+O8Ngd86B5cWfx6yVUUGIVMxYVV03bnn+qMt6o7zEumI+XQkS9hED?= =?us-ascii?Q?eZD6zedC5XXViP6ZG9zi5m24hjrICqRTRAZSyKDkLaa3ao/a0NqJvqo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McHWUBMsRSQ7ssqVlTg8Cl50kzMn SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2016 17:21:06.0337 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.221]; Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB0858 Cc: Mykola Lysenko X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mykola Lysenko Get on par with buffer management changes made in base driver Signed-off-by: Mykola Lysenko Acked-by: Harry Wentland --- drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c | 10 ++++------ drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 17 +++++++++++------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c index aeb7887356cd..0ceb505355e8 100644 --- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c @@ -1329,7 +1329,7 @@ void amdgpu_dm_flip_cleanup( } else DRM_ERROR("failed to reserve buffer after flip\n"); - drm_gem_object_unreference_unlocked(&works->old_rbo->gem_base); + amdgpu_bo_unref(&works->old_rbo); kfree(works->shared); kfree(works); } @@ -1379,13 +1379,11 @@ static void dm_page_flip(struct amdgpu_device *adev, target = acrtc->target; /* - * Received a page flip call after the display has been reset. Make sure - * we return the buffers. + * Received a page flip call after the display has been reset. + * Just return in this case. Everything should be clean-up on reset. */ - if (!target) { - amdgpu_dm_flip_cleanup(adev, acrtc); + if (!target) return; - } addr.address.grph.addr.low_part = lower_32_bits(crtc_base); addr.address.grph.addr.high_part = upper_32_bits(crtc_base); diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c index da6c0116aa1a..7643f751fcc6 100644 --- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c +++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c @@ -1972,22 +1972,27 @@ static void manage_dm_interrupts( struct amdgpu_crtc *acrtc, bool enable) { + /* + * this is not correct translation but will work as soon as VBLANK + * constant is the same as PFLIP + */ + int irq_type = + amdgpu_crtc_idx_to_irq_type( + adev, + acrtc->crtc_id); + if (enable) { drm_crtc_vblank_on(&acrtc->base); amdgpu_irq_get( adev, &adev->pageflip_irq, - amdgpu_crtc_idx_to_irq_type( - adev, - acrtc->crtc_id)); + irq_type); } else { unsigned long flags; amdgpu_irq_put( adev, &adev->pageflip_irq, - amdgpu_crtc_idx_to_irq_type( - adev, - acrtc->crtc_id)); + irq_type); drm_crtc_vblank_off(&acrtc->base); /*