Message ID | 1476082208-14480-1-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 C20076048F for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 10 Oct 2016 07:22:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACCD428B88 for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 10 Oct 2016 07:22:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A01A528EA2; Mon, 10 Oct 2016 07:22:23 +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 392AC28B88 for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 10 Oct 2016 07:22:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC73C6E1F1; Mon, 10 Oct 2016 07:22:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1037 seconds by postgrey-1.35 at gabe; Mon, 10 Oct 2016 07:22:18 UTC Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0079.outbound.protection.outlook.com [104.47.38.79]) by gabe.freedesktop.org (Postfix) with ESMTPS id 599906E1EE for <dri-devel@lists.freedesktop.org>; Mon, 10 Oct 2016 07:22:18 +0000 (UTC) Received: from BN3PR0301CA0055.namprd03.prod.outlook.com (10.160.152.151) by BN6PR03MB2434.namprd03.prod.outlook.com (10.168.223.12) 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:49 +0000 Received: from BY2FFO11FD036.protection.gbl (2a01:111:f400:7c0c::152) by BN3PR0301CA0055.outlook.office365.com (2a01:111:e400:401e::23) 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:49 +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 BY2FFO11FD036.mail.protection.outlook.com (10.1.14.221) 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:48 +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 u9A6ojcv023730; Sun, 9 Oct 2016 23:50:45 -0700 From: Liu Ying <gnuiyl@gmail.com> To: <dri-devel@lists.freedesktop.org> Subject: [PATCH 1/3] drm/imx: ipuv3-plane: Switch EBA buffer only when we don't need modeset Date: Mon, 10 Oct 2016 14:50:06 +0800 Message-ID: <1476082208-14480-1-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131205558490988790; (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)(2906002)(8676002)(68736007)(33646002)(50226002)(87936001)(73392002)(5003940100001)(110136003)(81156014)(104016004)(6666003)(73972006)(81166006)(5660300001)(4326007)(92566002)(8936002)(81442002)(6916009)(586003)(356003)(626004)(11100500001)(189998001)(6260500002)(305945005)(50986999)(82202001)(7846002)(76482005)(77096005)(50466002)(97736004)(36756003)(61266001)(87572001)(48376002)(106466001)(83322999)(105596002)(86362001)(47776003)(229853001)(19580395003)(2351001)(55446002)(19580405001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2434; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD036; 1:qV3DftiHtndH26f5dT6yfwNSx5iKKvrkb3h/hTLt94dQ4F5TSDrDP2Dnr6Z1b9AdKtiDWKRXECiqo0ss1GxqQ99Miu4Bk9qYKlc2jEUXDgP1mIFOojniArwS/mCWFN2QWYTrx3neNl2mHbDPGnkNMophhfMTiVhxEeSBVIn0Hl+x6rIdlxGRpq9zxpnG9JQaV+TJcOxYp8qaGmaUDly/ohdgk+cuDWawLf7pqA/RRIhCADGq5ThVPCJwilR8dhK6jC8dq9ap6c+WevG+66lqjnQ5rR5nwfhx/BSUdQ55vFLW054XRB8PBOjuv+8oH//FsK2kRRUQ7aJcJsB/7UJE5QelUFq81fGEPETqqxpMKrZ2AOm0lTtsYHikzw4Zny436FBLxFU0KKZIGZep6xMf7TOTpln9maApb03HKWkomnxoVH/NlHyK8uH2q/4EyAdUs7uSaGFOmYmxr4YrMiBK8Kh8df/8OdncwrM0WMFwjx3e8nX4mHMYrjmP6q+JKgwlzXf6rZyyVz0GnLJx1TqdGrQzBedwJ4pk5T9JaoKma1ca2VO9aSV3MjZsUgiwDfLiP4pPGdzthvlXZZYcnuS7jw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: ffd0f27f-f190-46c4-1f97-08d3f0d9c4de X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2434; 2:yjq9lwzmPfQ1XNJ/4SFSedO+Q5nXx3pspEpWvX09DQicVuxFGlUwBX/asV4s22Fo+4cBEJMQ70wBkyO15qvL6+URa5lIht/fAGbQzoVIHi14IVERukS6qT/r8CERfNvtnuUguvD5BpgHfuPm2eRaOviz5vG4mQFdcysE7JdzyedHty6Fd5ytTlmr3l/HxjQxxqGRSlG+aNxlYD1ngtB0OA==; 3:lYYx7ZOb6BpxRoGKuxk3OF929SBswBK5tGdiEIx32CZPEUi49wDPAVnuU988nAzDuVfqMCpZETap6QD9c11MpIYvzwENuHJ46I6P0Gdb9ef8KPK6H2Nd49wjQwdC37ockzZA29vUT3Taj/WJ3rfxjVtuH4K04/G4mCKrg4EJFfXAajo4w5w2JCxZ+BTXmf2UU3EoRkeK04Ydt3SPfaXelywnov9FG6/mHUqLhjaVaJ1FCGV7X6uX8PQUGAc5/A4R X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN6PR03MB2434; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2434; 25:a2QI/T5q88iGyTK3xvHubuyz5OyFtvnQXJ99J3TAnBJP/2aNCnsxQc2tIXx0sfJiAVJ/nNcqfo2/uOZzzVSv3OE0J97ojxK4YIk840eRCIFlywM4l2a+Z+5Y3RdJXK5P3u6CoD8Zb7gPWYInk+QDolZ5WYIp0cDaIhZPhtjudd37kMeFLzHfyyHLAGuj3rpTVUCMzxJCBIemx2TKmQ6phPt+Q6YatibtDR5qeAnrH5WEzeD6e+mipF1PktbpxyDwRLd1IHblUHnWqTpwoU/a2FVhVMW2/O8mY6JSBTJmTZm+Cy5a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AvNv+5Lc2KkDenoHlS4KnrJZKO/+G4nS3wE7EXJ1uKycbw+sjpPy1PLAhp10s9kscjSNGYZGxSNis6y+96a2rRk/nQUboqh9j0vwqd05+QIpTY6rhWIiFGCQ0+fLe9jEYwFKH1UMFIPyNn4pgMr4HXEIUE9XmOUizZhS6TIbHQe3fxc2knCDgOCcPXeb6jn5Xv4CwD+QxGo03nWTz/Dgg7f63Y2TNouCY79hA1UUGf75qca059nt52Cj277mDZKYKj2GI4peXyhl+ngTeVxkH/nNj3+2 X-Microsoft-Antispam-PRVS: <BN6PR03MB2434104AFCEC9B042AAACEA7DBDB0@BN6PR03MB2434.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:BN6PR03MB2434; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2434; X-Forefront-PRVS: 0091C8F1EB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2434; 23:5UjKO9VnOLEM+DMeVDKp65GekseBlMPs+4ZrcrHD9?= =?us-ascii?Q?zZ8QPbPsfaPpW/D3lMSkgzhbcHrJO9GR+TAg2gHYaA/NLM4U1qUzF5BpnTwh?= =?us-ascii?Q?/fxWrE6Uy6EYeK3szUguvVMnqNOLm9aRc8ybueMKEzq7hI1Oj1dIeYtWCf9b?= =?us-ascii?Q?siBYq6oOPPnJs8FgiHab5U40TbnnyIFyOWK3MddkT5v7MSZbpPk5+3L2x6e4?= =?us-ascii?Q?Bcp7AEs/opLGzj5ZhcKs5giqc09hXhHBaR6vmxt3TBW25lexUSvLOeJICNPB?= =?us-ascii?Q?1OKIOxqcIf7SObtNEAuWhi263CApbPXVeLVW87xfRon8V2xZf0kcPdGNJSZ3?= =?us-ascii?Q?mJEihjgy3EXrwrIbpOFC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IgOBgkH+QZC3yt4znp6rYVrSo7Od1u6UqSQNVgcK4FvFTI1EQTb5c0TANO0xNUYtNMjWNnuw+5eKQZVM= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2016 06:50:48.8960 (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: BN6PR03MB2434 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 29423e75..9ca5739 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c @@ -108,6 +108,7 @@ 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; + struct drm_crtc_state *crtc_state = state->crtc->state; struct drm_framebuffer *fb = state->fb; unsigned long eba, ubo, vbo; int active; @@ -149,7 +150,7 @@ static void ipu_plane_atomic_set_base(struct ipu_plane *ipu_plane, break; } - if (old_state->fb) { + if (!drm_atomic_crtc_needs_modeset(crtc_state)) { active = ipu_idmac_get_current_buffer(ipu_plane->ipu_ch); ipu_cpmem_set_buffer(ipu_plane->ipu_ch, !active, eba); ipu_idmac_select_buffer(ipu_plane->ipu_ch, !active);
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 switch EBA buffer(for hardware double buffering) in ipu_plane_atomic_set_base() or not is no more correct. Instead, we should do that only when we don't need modeset, otherwise, we initialize the two EBA buffers with the buffer address. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)