Message ID | 1476082208-14480-2-git-send-email-gnuiyl@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> 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 720566048F for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 10 Oct 2016 07:24:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6231F28B88 for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 10 Oct 2016 07:24:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5522828EA2; Mon, 10 Oct 2016 07:24:01 +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]) (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 5885A28B88 for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 10 Oct 2016 07:24:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C51EB6E211; Mon, 10 Oct 2016 07:23:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1042 seconds by postgrey-1.35 at gabe; Mon, 10 Oct 2016 07:23:58 UTC Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0061.outbound.protection.outlook.com [104.47.32.61]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1AD666E211 for <dri-devel@lists.freedesktop.org>; Mon, 10 Oct 2016 07:23:58 +0000 (UTC) Received: from DM2PR03CA0045.namprd03.prod.outlook.com (10.141.96.44) by DM5PR03MB2441.namprd03.prod.outlook.com (10.168.233.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11; Mon, 10 Oct 2016 06:50:51 +0000 Received: from BN1BFFO11FD055.protection.gbl (2a01:111:f400:7c10::1:103) by DM2PR03CA0045.outlook.office365.com (2a01:111:e400:2428::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11 via Frontend Transport; Mon, 10 Oct 2016 06:50:51 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) smtp.mailfrom=gmail.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; 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 BN1BFFO11FD055.mail.protection.outlook.com (10.58.145.10) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.629.5 via Frontend Transport; Mon, 10 Oct 2016 06:50:51 +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 u9A6ojcw023730; Sun, 9 Oct 2016 23:50:48 -0700 From: Liu Ying <gnuiyl@gmail.com> To: <dri-devel@lists.freedesktop.org> Subject: [PATCH 2/3] drm/imx: ipuv3-plane: Skip setting u/vbo only when we don't need modeset Date: Mon, 10 Oct 2016 14:50:07 +0800 Message-ID: <1476082208-14480-2-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476082208-14480-1-git-send-email-gnuiyl@gmail.com> References: <1476082208-14480-1-git-send-email-gnuiyl@gmail.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131205558513497850; (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)(199003)(189002)(110136003)(50226002)(104016004)(68736007)(86362001)(189998001)(7846002)(6916009)(6666003)(2950100002)(97736004)(76482005)(82202001)(48376002)(6260500002)(50466002)(73972006)(8936002)(81442002)(229853001)(55446002)(2351001)(73392002)(77096005)(5003940100001)(83322999)(36756003)(305945005)(105596002)(19580395003)(19580405001)(106466001)(4326007)(33646002)(11100500001)(2906002)(586003)(626004)(8676002)(81156014)(76176999)(87572001)(92566002)(5660300001)(81166006)(50986999)(47776003)(87936001)(61266001)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2441; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD055; 1:43eI45VGq29+kzLJN2XEJaEE34DiZp+7DuqCLjr66JATSiR5pmPzxXlX8DxD/mGnU9lgOlP1d8KgNAISZX8R54OX829kBznJHJJMqJu4AepKg8U5SefnW60blDYukj0mn8WZWA6RZIZZTqwsIUF3ZEtjvsZfQKdBPnvx6VFL1t9Ix4KMOhwQVBgKLLbPXi4ovAoZzsgzmAJf5/S8o3IUkYgEhic6hdsgaKIpxm5M33Uh6u5XfMnUZvvCQf1tBv0rqM1tMKAu5lIerUr+cTP5vprY8ENYhAsSgSeAD/gM+6MIFhvc5iESbM2/2UbeboHeQNHboqU6XODzcq8rC0XCucxurbx2VCWhUKWRgeXOHvUGa0cZt8nlOo2gdLRUBblj2XwJtCO5XGmRahzWJKDjUITFj4DqW4kW6Pw9XU9lxgcXON7KgKam7ENI2xjHVnN7x/62TRN2eToaZmDYDQQgFlrrWpX4mz2F9kuM425LwvSv6eYZeRDXcjDJzkvgD6v8EeiRn07nYl7gT9gXbZZZ2QXvfnrLy5rT8/6yVnwPGHhIm65ECTi2iC+AZQAHW4g0Yi3nDzVa9UHKU+Kra7JcIg== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 6f1f97f2-e98c-4cfd-959b-08d3f0d9c635 X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2441; 2:gChB7yJVNsqy43UrMWmlInBR2nk1htI4Ww+50Bd62LFUq46QWH1060grwogTvZeuQ7+k1G3/m3ufywO40gYtcSQqsvaLyZvmQ8iC6fR+/tInWOb5o721+DCS++sSKdvNV0AQF9XWNjGr30mO9TK7gUj3WDCTf0YbBISGDZ13GjBgt2H+hP913NZseeqdSw7XAQ19xFwK7iNAVihXnEYQ0g==; 3:FBBfosNY23e1gUkbdClIRPjTxt4LK4qsfe6SbgpFbZmuGFDeWXxH6FcT0LG0PSDup21/dYt9+zmPmVOGm0ADAPr4geScBnfzJyjla+IK1KlEoZpeGBPTn0ToSbsLWzcfdijbU65HPavwD5v0IQbvnjpdSkyOJG4/fEGag/CxyWO2a9hUwaYmlL+8V7FavoMR07DrIj+pXmDc1QAtOVijbKU55v1Np5HC9YacI7Ug8OG5/QR9S6ts+2KpuMQ7JZnJ; 25:GqmV3VRhMP1cqwhBSOlRVThtSytg/uQFSmrjvumacOZSgGw+d0uZ/5Wo28XOaXdwoJAPRDLiQD8kacgDmFvfO+IxtU/fqzBVBKZhnxelTLcGsGgiwXhWKUNTcYnyqVZxkh6wyxFz608stcrwMMVaX88a4F266qd57/tYuifKC0uQ0PZf5/rYyiy6i4M6gTMSx96Sior4rFP4nvJ9i4XncItTXdENskKIEOxlWwjgXUfhHmPGvA1I0wyj8qFTYBaYkmhF0BUTRP6eqNH83cDMPyuaqBR5ath3l2/TKSRhN2dCeF0THc4VTU4NYjn/LJ1Pe0si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VS: <DM5PR03MB24416D936A0642399A949EE3DBDB0@DM5PR03MB2441.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13015025)(13023025)(5005006)(8121501046)(13017025)(13024025)(13018025)(3002001)(10201501046)(6055026); SRVR:DM5PR03MB2441; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB2441; X-Forefront-PRVS: 0091C8F1EB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2441; 23:PZA5JwdWVTE4t+XNGApHqExdMt6o+OZ34NOM9DMFI?= =?us-ascii?Q?xg/uTBxQ1JLItb+ps7wTDoqOvHZDVRK3oHRhVoF8TsyqwB7Nyj5gTpZnBHtD?= =?us-ascii?Q?HCWtADFfQG5RFO+ZUzZVnyeq9EKkfK8PiCJk5kN/r0Wlla1LnG3h/VZvytnk?= =?us-ascii?Q?rAH3B41RkSE6sQV/ih4za7JAR1DotNUa2nAlWKUMKqBqfMJmNnVa00n+L9UC?= =?us-ascii?Q?x6uCL96Uo8A9yBDApRiAvrQfgJ2TzSlQ+ZnPQh5TsNrPQAfHaARJ2pv1Zpa1?= =?us-ascii?Q?q9MWhXCyFiM0SqgtuBiXFP3OqHTCVVkJBGPuouMeJrdO2zlz+tDRiVeMBSsI?= =?us-ascii?Q?kYPweblUHaNdIXgvdcy/W0dr2JB30pjNeeheeJcIfUPwRqxB5ZkZEPALL0ZD?= =?us-ascii?Q?oMA2cLR9YD9Y+sQu7rfYwWIut6qfQavP1NiM4Toul8CdsZtsLCM3vvlykiK8?= =?us-ascii?Q?Ne+a44OnUpe/96XASGDnkqCkWPhW2Qh9vlfm9e4R8qsPL7lv59xe9Eo52EDu?= =?us-ascii?Q?aNoH9NckU0Ti2+rKkpmJseBALyMKKacJr9v6KZtyZfERjKe0oreH8US18egA?= =?us-ascii?Q?2uCzFpX7w6WgjroHUTkBijr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ddPk5kOBcJxkTfuTsP5jmGJnvmjr5yqZQAsffopLueN8rbaoO1EiYLoV2l3DH4pwWkjj2X5ld/EHu97h0Y61dXwqlA8aQtjzfgJ3Nb78+xhSqO10deo6c6jJ844t36xvhaZsH2x9WqtARDgvMwToFQYmlYslj/jk8qELBsU8PZtuLjSmZGpL2; 5:XYvjoG+8tfmmVIBIgIS07WX8uJfSPLQ08BVGoQ8d4hMzQnjvFTzbi1HaCgjO5M4hRdRojV2ewnyYE/ZTpOZG3qpof3dAxcvbeYLmtg+7Ria7PblyzGn+5yQPOx/nDkiBBlcW9Z2o6i/PNgnM3Y5WoaPjs4ZViiXe9FFX1tIbPjVBlyylVT1WFWhY4/oN+j+O; 24:kMsga4PB+8mlOCRqrCMn2KavvQMAfDW8FAiHP0IiPQaHjhP5ej5TRGVXxxgHCfb2EHUfvS7Cq9sxBjGZFaLNimtNuNkQK0VATq1Nba+gBco= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2441; 7:Wkfqr0hQvvYQqEWo2BKkrUgUAYlh/bkSQGzJJXNiikZwr8e40DeyqNNoo8D3nbDAKdlmoc2beu4VYdgTg//hynhyz2KUwoXbL6s+7XhEtNiwe08ngDGElXhgpD2zPS+VAUgvkIv67zIIkHgE7obhiPSCwsDNU8Kg2+PoMKnUv4xMSkknRz6euo5L5C1DEvIg4d6joTzUSTBXuaVfUxIA8BX89znXe+ZiNMYXFPvES9/Tv8EINhWl57fIMUbb9UreOJrpn7NymB/DHwhEtgPYQwgNflqHI96XVc5qub0utKgdNzQnTD6VFqsZXCnNUIgw4oX1Xcs9V0glBnTlnnHVlCcqxvQFVUNpO3qsfPiU6s0= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2016 06:50:51.1469 (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: DM5PR03MB2441 Cc: stable@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 9ca5739..e33110e 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c @@ -103,8 +103,7 @@ drm_plane_state_to_vbo(struct drm_plane_state *state) (state->src_x >> 16) / 2 - eba; } -static void ipu_plane_atomic_set_base(struct ipu_plane *ipu_plane, - struct drm_plane_state *old_state) +static void ipu_plane_atomic_set_base(struct ipu_plane *ipu_plane) { struct drm_plane *plane = &ipu_plane->base; struct drm_plane_state *state = plane->state; @@ -118,7 +117,7 @@ static void ipu_plane_atomic_set_base(struct ipu_plane *ipu_plane, switch (fb->pixel_format) { case DRM_FORMAT_YUV420: case DRM_FORMAT_YVU420: - if (old_state->fb) + if (!drm_atomic_crtc_needs_modeset(crtc_state)) break; /* @@ -397,7 +396,7 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, struct drm_crtc_state *crtc_state = state->crtc->state; if (!crtc_state->mode_changed) { - ipu_plane_atomic_set_base(ipu_plane, old_state); + ipu_plane_atomic_set_base(ipu_plane); return; } @@ -444,7 +443,7 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, ipu_cpmem_set_high_priority(ipu_plane->ipu_ch); ipu_idmac_set_double_buffer(ipu_plane->ipu_ch, 1); ipu_cpmem_set_stride(ipu_plane->ipu_ch, state->fb->pitches[0]); - ipu_plane_atomic_set_base(ipu_plane, old_state); + ipu_plane_atomic_set_base(ipu_plane); ipu_plane_enable(ipu_plane); }
We added active plane reconfiguration support by forcing a full modeset operation. So, looking at old_plane_state->fb to determine whether we need to set u/v offset(aka, u/vbo for IPUv3) in ipu_plane_atomic_set_base() or not is no more correct. Instead, we should do that only when we don't need modeset. Fixes: c6c1f9bc798b ("drm/imx: Add active plane reconfiguration support") Cc: stable@vger.kernel.org # 4.8 Signed-off-by: Liu Ying <gnuiyl@gmail.com> --- drivers/gpu/drm/imx/ipuv3-plane.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)