From patchwork Tue May 31 09:24:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying Liu X-Patchwork-Id: 9144031 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 D013360761 for ; Tue, 31 May 2016 09:25:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC2A925D97 for ; Tue, 31 May 2016 09:25:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B10772796F; Tue, 31 May 2016 09:25:05 +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=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 661AA25D97 for ; Tue, 31 May 2016 09:25:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 45C266E368; Tue, 31 May 2016 09:25:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0072.outbound.protection.outlook.com [157.56.110.72]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5AFE86E359 for ; Tue, 31 May 2016 09:24:59 +0000 (UTC) Received: from BLUPR0301CA0020.namprd03.prod.outlook.com (10.162.113.158) by BL2PR03MB195.namprd03.prod.outlook.com (10.255.230.153) with Microsoft SMTP Server (TLS) id 15.1.497.12; Tue, 31 May 2016 09:24:57 +0000 Received: from BL2FFO11FD044.protection.gbl (2a01:111:f400:7c09::130) by BLUPR0301CA0020.outlook.office365.com (2a01:111:e400:5259::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.506.9 via Frontend Transport; Tue, 31 May 2016 09:24:56 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.158.2) smtp.mailfrom=gmail.com; ffwll.ch; dkim=none (message not signed) header.d=none; ffwll.ch; dmarc=fail action=none header.from=gmail.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 192.88.158.2 as permitted sender) Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD044.mail.protection.outlook.com (10.173.161.140) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Tue, 31 May 2016 09:24:55 +0000 Received: from victor.ap.freescale.net (victor.ap.freescale.net [10.192.241.62]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u4V9OfRP013844; Tue, 31 May 2016 02:24:53 -0700 From: Liu Ying To: Subject: [PATCH v2 05/10] drm/imx: atomic phase 2 step 2: Track plane_state->fb correctly in ->page_flip Date: Tue, 31 May 2016 17:24:26 +0800 Message-ID: <1464686671-20299-6-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464686671-20299-1-git-send-email-gnuiyl@gmail.com> References: <1464686671-20299-1-git-send-email-gnuiyl@gmail.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131091602962584542; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(199003)(189002)(9170700003)(48376002)(6260500002)(104016004)(586003)(189998001)(92566002)(5003940100001)(8936002)(19580405001)(36756003)(19580395003)(87936001)(106466001)(50986999)(82202001)(105596002)(2351001)(110136002)(76176999)(8676002)(229853001)(81166006)(6806005)(77096005)(2950100001)(33646002)(76482005)(86362001)(575784001)(55446002)(2906002)(83322999)(73972006)(87572001)(4326007)(81442002)(50226002)(61266001)(47776003)(5008740100001)(73392002)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR03MB195; H:az84smr01.freescale.net; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD044; 1:ADk8cnC3JlRnlNvedNQH60iAU66cj/37Mn/PkYqOIhEiqu3yHh9MECeYqn5txaByv9AUQFVd1NmupEy/NSR9XziPvXVLq3K+/5twHvmP9c0RIRcU3dZrK8RpJfqjyF06ayaMIyCrfdMmHtHZcmay/fZ95h0NUHun7dI+WORpHvVWNdWyRvriBo7w27SAaWue3byMd6oRdjz+r1lEu0eURV4DSthCBcgmWDp9rtEVut4KjjEs1+xeod9DLVqd0uxBOFbn10AHwlmmjXrzIaATxRHUAJS7bR5ewo0kpyMiNgaImGn6DZoPDTRAMc3SwjX5FbTiD9FTaZYFk1fgaMZgb8NxkeWu7SzQ6lR67J83K1BnH4yzqL6vJeeeCB4WV6iiqgxqgHQnM/XsTFVrbNHOx/ecKFke+XtfomXAnyMwDh5gRokcs60ypC7Vu8D9waOu9/BRfNjU8JpM6IXd9gpa/fc1O+9PlToaMAU5PPx+qDIOjqIyovh6l3N4k3VFH4yuRqSnBtUmo7jEphGI4NPBTnz9PhrnHB5bDVnkArM28pOugKwoOcMe50OwmDCeOAOt MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 91b25b9e-1292-4e81-13de-08d389356e16 X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB195; 2:FLSe9PBfui6mAotPZfV+8HrKe0+Qm+meyLYM3MvyKC1+XnqZmwd9kIOI+hCB1IWxazqIFRk7LnnW+NBuLrM22HW6q6wwqXLhZJkg6Ro3sGcznfxUOrmSS9fXQbuTH6XrTIVPmXs/dfXLeoMAF/vJgBdqiuoJGwGeKd+GbGnWAJQ8SyED1KDfoQYUo3flme99; 3:oxeKs9vjE1MEPVVwFSbnQ1A2YnfXZ6N0Kmj84Q/MEZGA0j9l1F6G/zy5rvcZ+PwUCU9KcHOz721Un8Xy122JYEkE/135pYTAT4v53oOhm1tP0I3uSlivVyFnkXIFFnROKprRfMb3YLNqAu8za8eQF1qH8OBYU1MzdS+jNeOlddKP+6DcltCpdQlXHP6bR9zUOf+njIT70pbQyUJSm2ymu/oWTKMI7cQNwtWCIYd5B1Y=; 25:Lpyb/dIdxAh7ujqVQVrU2HRJHIMmlszNswq+nqsDF99KVFjcLQDiwaU2lib3f+7M14yVvSTlMZEDJJCNh48opZbUyatEUOG6+ZrSLGn0wt1YxkxOM90ocRB3MZ1LY8Fb05s8CYa79qIoFkU6QOGhnsdcJRhcO50SU+r3Dem3eUuxf2B/F2GIyVfXLFROZzWE4wo5R4Ihg3e87l+fyzJ7+XRes9yuBkFNCckEeohwaSC+rjASeMs9BI9WDjdI/1Y0QRDPv0HFHLU6upb2Wj7hfpUm8LZWkkl/1Z0G3lEDZsfvleicKIsomUHyc2JM+0qFHDdtla/K4Ane82SkomqVwtfK0w1muxAg2Seqf6l7CsN4MyopOhybYSTvqvP36Tb9NCP87EYd806h3jzyjjIZzBxwtBKMhy555BJAHmrkBe8= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB195; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(13015025)(5005006)(13024025)(13023025)(13018025)(13017025)(10201501046)(3002001)(6055026); SRVR:BL2PR03MB195; BCL:0; PCL:0; RULEID:(400006); SRVR:BL2PR03MB195; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB195; 4:4/XmS/WbNODmh8R4AVJ0ppV/jz3dAvMx97VzZqk+7Hdj2dZvpRmBXP1Gc4VVECMJGhbRYIA+6TYvL1Js/A0OIq6pRGL+wqNwTKjYZ89Tq83ZWFvMVda8NfdILSapEofoBpwv9vpo7yOs0g29UhHBj4aG+JAJ+JRcXvLW+pBGYaJbjVixtiu/DrrADNU1fCppY+PkasZoAYDICW1UvZLjJ553BVM7a0nWQ+qHpe9PlwIQyj0jcdUF5clhNpfkhLRc/DQXC6Ph/oQB/GZCFdVcFg0i0PFW8ZjgyXgPFdy7lWbg9/QipCnh+rxvQR8DPAGnQUVzttZ1yy4sNTurPF2sDqfPniPCo6tRD5up6SVBd+Z51PB7bsosnIU2KytKWRMx9njkBCoq3my4jRpNQ30gFbq70/iH8qiZrmro4TGR3iPjwuXpb9x8nInBCICYogoRZ7Qh+QnepxbZ7Y3dIbt147R31+kJrIh399u85LK83nA= X-Forefront-PRVS: 095972DF2F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR03MB195; 23:tNeBRKsI+u7j2MoJBXuaSw0xukX3nivOkNsePJ7v4E?= =?us-ascii?Q?eVhpejAT2HGQIwwE2U2b6olAeIgwEjoIFjTMK0lvvR9klHg22oCdV2PUJ5r3?= =?us-ascii?Q?5uaqnagu0540DPOwb7y32HLTHqHUhZQI42huJm3RTpqa0C1cm02SwFWlg2LJ?= =?us-ascii?Q?JpXFplZp/4pW97Mb6fi9W/LYFYfEyTUjGWhjtAfUvGd9alvtCE4Y4eeYQR4A?= =?us-ascii?Q?1WxCIA777oldqjbdWV8UPjXoLQnUEtqsmzTCgvuY02p2d4Pk3vlzKkVrjnMl?= =?us-ascii?Q?u01ZetfL0bUTPEpyXBvyX7NilQugKPfwwwZ45jJKsGTozUzxlW8a0Mpcr15J?= =?us-ascii?Q?CCEiTCGT670DgJg+wfKtW7QCuizDkaVy/G2d5DsCg4YrFN8SE3rV837jLsAl?= =?us-ascii?Q?+33OaO05QHmO2ZFlwtSUi0e0VqPNwZcZbCymanTW/YdcE+tFysQWsMg7eqAV?= =?us-ascii?Q?WCP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40tFglvGl8SVb18AAzVnXHUQ0MK9sid6JAvqecil5fn67x4rb7nau/g=; 24:D1ICzROIvCH5/NECNHfnPR0+Phs2AVfQ4EViuXvmYC3tz5P1R0dfjyDL3EzFOIFxT+caSy6OEaIgRbUpUH2gkQvXy6zqAMhd8W78CEO9VsM=; 7:VSF7zDFJZh7YRZ23qd6BOf5i2sGZiCZzYAnHApip9pL9mc41uqBfEVprOv8EEa1qXiVQRQq0bw+hTrXd37ZIXSBBp8S77vGnHvHHlmwfgsPW2ULps70kNzGab72ttop6dunUG5H5eOsBm7Kuvp2X9uvbreNqf1fkF536/gv+mjopIzvfEfOyPJRKi1jXYG+A SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2016 09:24:55.8216 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB195 Cc: Russell King , Daniel Vetter 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-Virus-Scanned: ClamAV using ClamSMTP Use drm_atomic_set_fb_for_plane() in the legacy ->page_flip path to track the pointer plane_state->fb correctly. Signed-off-by: Liu Ying --- v1->v2: * None. drivers/gpu/drm/imx/ipuv3-crtc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c index 8a0ef13..7df51e8 100644 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -217,6 +218,9 @@ static int ipu_page_flip(struct drm_crtc *crtc, ipu_crtc->flip_state = IPU_FLIP_SUBMITTED; } + if (crtc->primary->state) + drm_atomic_set_fb_for_plane(crtc->primary->state, fb); + return 0; free_flip_work: