From patchwork Fri Jul 8 09:40:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying Liu X-Patchwork-Id: 9220333 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 2538D60572 for ; Fri, 8 Jul 2016 09:41:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1624128638 for ; Fri, 8 Jul 2016 09:41:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B1512863B; Fri, 8 Jul 2016 09:41:36 +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 99F6428638 for ; Fri, 8 Jul 2016 09:41:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1EBC96E03B; Fri, 8 Jul 2016 09:41:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0053.outbound.protection.outlook.com [104.47.40.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5934C6E0FF for ; Fri, 8 Jul 2016 09:41:30 +0000 (UTC) Received: from BLUPR0301CA0002.namprd03.prod.outlook.com (10.162.113.140) by BLUPR0301MB2019.namprd03.prod.outlook.com (10.164.22.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16; Fri, 8 Jul 2016 09:41:28 +0000 Received: from BN1AFFO11FD050.protection.gbl (2a01:111:f400:7c10::167) by BLUPR0301CA0002.outlook.office365.com (2a01:111:e400:5259::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.534.14 via Frontend Transport; Fri, 8 Jul 2016 09:41:28 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) 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.168.50 as permitted sender) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD050.mail.protection.outlook.com (10.58.53.65) with Microsoft SMTP Server (TLS) id 15.1.534.7 via Frontend Transport; Fri, 8 Jul 2016 09:41:28 +0000 Received: from victor.ap.freescale.net (victor.ap.freescale.net [10.192.241.62]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u689fBMr003192; Fri, 8 Jul 2016 02:41:26 -0700 From: Liu Ying To: Subject: [PATCH v4 05/10] drm/imx: atomic phase 2 step 2: Track plane_state->fb correctly in ->page_flip Date: Fri, 8 Jul 2016 17:40:57 +0800 Message-ID: <1467970862-28012-6-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1467970862-28012-1-git-send-email-gnuiyl@gmail.com> References: <1467970862-28012-1-git-send-email-gnuiyl@gmail.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131124444887737307; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(189002)(199003)(87572001)(61266001)(47776003)(2906002)(8676002)(2351001)(92566002)(33646002)(50226002)(4326007)(50986999)(11100500001)(86362001)(575784001)(76176999)(50466002)(229853001)(83322999)(8936002)(586003)(73972006)(104016004)(6806005)(82202001)(55446002)(73392002)(2950100001)(36756003)(105596002)(305945005)(356003)(106466001)(6260500002)(76482005)(77096005)(97736004)(19580395003)(189998001)(48376002)(110136002)(68736007)(19580405001)(81156014)(81166006)(81442002)(7846002)(87936001)(5003940100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB2019; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD050; 1:FrOouc6eV2sqwfmQPWy84t1WWJ1wEysQFZAdcqRKtAZVF4r9jE9szJZbSjiRfr6iu/aN+r3BTuPQkTi0DCIPcbTCzyOqrjKHPhtGsn8LXAWoUy2L5qbmwTeDrdl3abuO+HkAMKm9Y7gQix6wopOgtnWv+HYBZ8/Mn2cNRIiiVtn9h6TkL/BwXpDJtMNskZEZiI6K+PxDVdzIFM0ZH42tAeC/DIJkhW9vKgobTJyBiEtcRr4XVT6XAyO1+fpMTmNADJpwJI2bswP5A8YGFHWS/34BPzFacturbr8XYx/Qc6daq0v9z/SW+2ZJih+nogti/VCEJh6RKjgYinN9YY8wwzriso9GACJAh1zDfEY934Zc3c3Wlyy/j+8p8J1OBqbzWWn6jBZaroxWgLUqEcrTP63vkBwDQYbLZHfbHGvnsEQxE+r5g5HsKEz5m0NDoP/L6BMN0bHAeBa+EachnNUO0iUMEF4CCBgUUwnt7VcnuOgSJkKzCNsAUycg9NP27cRzP3zvZJmqxwgzcUpirRJk+h5xFBT2S2NKwbrMp6Fc0hf2riAlDFwWB7bN+WNRRIiwaazNldWPvD618ZN5Grxy8Q== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: d9b042e3-7c07-4406-63db-08d3a714095e X-Microsoft-Ex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S52B81J52IC/3BlFU9JWjkRIAbT2O8KhD0VWMHaeqcozQUo54z8y595moeNIswWWgAZ+eOXElgnvpJAk2hVlj8tmWL47xOrCdr/ogRIVcx6fcHDZ5hJUoepVV2VqZrkEHGvmPEA==; 4:1koMkDXu5m1RUayL0y/5IRzJNXQreMDLeX4HkjXBFoDsg7MxAi3ENJkll0SaZ/ZQ2qXC7yNpyJfMALGCp0dmkoeYr8VsEOUQIP+FrOaIVBVSKEzs4bh2Klf5Y63081bdqBiXucLBe9N8WYaJw9NMVF9mYvPJTKJ21mfVRjBDoe3YC8EEj2AZ2BeXlIpNIAR7BQ0eQYzZ/L5wiFUmB3Ohti/cJjhCOnT8NxjE/0OT5pKoL3ePIB8Hkt/ozJVzVqpi6NsWL5O+HkVSctH5qhh5izL1oa0SPlyAkPj96RWC4HHyGzJEnkym3rLYLdlMCUKWk9zPKEdUnC/QMN5rPYQYayvTdDKw75kY+/UKDk8Y8jEdS0uaWC5CvtMPvaMIqzNOUioZP0gwflWlmJ6u1oLPYj7wvU9ZtPrR4muK81CVxhkuGgUOfhr26WJBelDmdypQ6imP3wFgM6qJtwSwxNkPrruJXKPwvPV+wyjqNZ21TVo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13023025)(13018025)(13024025)(13015025)(13017025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:BLUPR0301MB2019; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR0301MB2019; X-Forefront-PRVS: 0997523C40 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0301MB2019; 23:dqnliepRaO6nS/XpHMmZRbovfO7h1gFAnbNahRo?= =?us-ascii?Q?EblAARNOeMETSG94inFnlYG4e2HlGkF9MXC1EkiFROD3LwKgMFSv81aRk2Xq?= =?us-ascii?Q?xHsRmepjBCEiGt+9FK3t3g2F1HPCKOne0GcQr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N/GAeSQVqqnvHpr5UNkaR1Q5HzLqHq/Yxn/KgBNIGdBEIXXj1wJlTjgaj1fBq9tJtDbAoCS5M4I+7hg3LzOOIhtvRGF2A5n1d36U3syZ1JsnMf0U6ctYGR2VyrFEXdEDGEXSSm8AzQIqJ38zdFWKpGBt SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2016 09:41:28.6021 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB2019 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 --- v3->v4: * None. v2->v3: * None. 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: