From patchwork Fri Aug 19 09:36:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying Liu X-Patchwork-Id: 9289985 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 39C28600CB for ; Fri, 19 Aug 2016 10:10:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27F5F29328 for ; Fri, 19 Aug 2016 10:10:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1976E29349; Fri, 19 Aug 2016 10:10:09 +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 6A27929328 for ; Fri, 19 Aug 2016 10:10:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C4B3F6EBCE; Fri, 19 Aug 2016 10:10:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0056.outbound.protection.outlook.com [104.47.33.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id C7DAE6EBCE for ; Fri, 19 Aug 2016 10:10:06 +0000 (UTC) Received: from BY2PR03CA052.namprd03.prod.outlook.com (10.141.249.25) by DM2PR0301MB0845.namprd03.prod.outlook.com (10.160.215.143) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21; Fri, 19 Aug 2016 09:37:31 +0000 Received: from BY2FFO11FD031.protection.gbl (2a01:111:f400:7c0c::188) by BY2PR03CA052.outlook.office365.com (2a01:111:e400:2c5d::25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21 via Frontend Transport; Fri, 19 Aug 2016 09:37:31 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) smtp.mailfrom=gmail.com; pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; 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 BY2FFO11FD031.mail.protection.outlook.com (10.1.14.196) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.577.8 via Frontend Transport; Fri, 19 Aug 2016 09:37:30 +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 u7J9bIS6021936; Fri, 19 Aug 2016 02:37:27 -0700 From: Liu Ying To: Subject: [PATCH v3 3/3] drm/imx: Add active plane reconfiguration support Date: Fri, 19 Aug 2016 17:36:59 +0800 Message-ID: <1471599419-29009-4-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471599419-29009-1-git-send-email-gnuiyl@gmail.com> References: <1471599419-29009-1-git-send-email-gnuiyl@gmail.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131160730503066444; (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)(87572001)(105596002)(626004)(81442002)(4326007)(55446002)(6260500002)(48376002)(68736007)(356003)(86362001)(33646002)(61266001)(7846002)(2351001)(47776003)(19580395003)(189998001)(83322999)(11100500001)(104016004)(2906002)(50466002)(77096005)(73972006)(8936002)(229853001)(73392002)(87936001)(76482005)(2950100001)(76176999)(81156014)(305945005)(106466001)(81166006)(50986999)(8676002)(36756003)(5003940100001)(586003)(19580405001)(50226002)(82202001)(110136002)(97736004)(92566002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0845; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD031; 1:uNZpgNMfMNeXXYjCpu5JV74og2oKJ0wgjWZ3lFSYynJBQ7dmR8SpaARH0qu2XCFx5v2oUZG0seWdQkmNBF80D9/7BvtruZelWLO97XODMe6dJta/lVWmC9sol/Zwru/idASr5rVJBM353tiQPAB1lW7fgxmzNqzgGKhd7xeSraOOfpwshUWFq0QGLCaCd7/ZFN4UwgxsqNMwDvFQByiAFSAxQdPwGlDoOT/tPBq01+VktCGHBU6UZpHo3CK+L8M2Os0TtYbEvMr5sEX1I+zs1HFKmA/azTKelfthBQXqm/kYOteUV//Ot5+0c1MG4vYcdiYLMr5FnK2uxj/GeZIpljoA99jgcI8b7AtOHeDqxMX5yX7BitDoBhM3Vqcplc7MUdrABBBS5FAvOnF6Et6k78IVlqXcHnmB5yw4XqC33WmQDcuYE4jnksGTuR/DNsOQVdNnUf93amnYRVn6u3gXjf4+T73iU+NAkPGYw4AEjllrhEVtR1JcZgJJ0XoRa/+5qDqtKGkmnFbH1U8un+2kHc8VqX4ZuBHUZMKaOYlzbDant4077aF/I69sCyKohDorrMLcUuHc8rXSbzNnoyq2zw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: d9b83f3b-74df-419d-b34c-08d3c8147094 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0845; 2:4bsML0N2a/0oabxSvPZmtBvD4ZPRVciTbC7MpMkio6+EqaJ+JeoaMi8vG88ZQGtDRjQGWEj2Ej8BRaZpPG5sVyi+MASatNtWisAUfSbDfkSi+ZsvazSBcSqhcVBQa/EofqIKFvoczMLni2lxcAVbebo38F429gTJ+QBDK/sfS+f3RPk1jaLnQPRfrObkc2Bv; 3:WSv3NFEnnuYkUKACGyLP8MNfHCjfWgIfVrYOsyVljOUcjebY+beeV/pJNET4W53TdWXnAJ0AQABy8mq6lrV0Z90NJXB1Yv/jV/PorgDGlrXQ3k52W1cDebqA9DmJI5Ge/rCcEaI9eNr77Cq6nP5rLz5RBtIRAfuz6dU2HRzWNe6TvkYOYZk7QGWQzr5t5KF4FUdM0TNscRAG+aEU4qwPeRxsi2YDrxFpwmdWIpwoyJE=; 25:vHiE+XFiY9NIA+YZGyxHFYsSvMhHTv1vK30NDa/WqcIC9qwFMx/NJVeLNj9eBff/iBP3rt0N18eMUJWNKx2qJLNTlBLWLcfkue00CBdVAohMAHa9jUkXdx4lH4ifqUZJ0ivA8HBdMmrm57Yrp2mFTG1GPEMevhUBkTDs+LNDfAbNPFWXe5N7h1rk0sxpNuABOvzNGbn06Nx8rneBkH9/wQwyyYYCRdP77uctwJfIXM5f7IFpLRyIM2R/2WSSvnaWXFoI3KxBU6of01PNeorI1V3v1CANJYxXzgYNTrJETQlBZwyUdmmQKfrVOV6+iIJ8NZfW88gsX0aSxw5U9XV/Gqn3veiNYLAKodEg99Lw2YkfYumwQEkFmtAh9lRhGAOZdqerC5H3WkqgQEQnbeKuVC1yHqy7+UDLT+xpyZSQd44= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0845; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0845; 31:8uwWPrzjobuvfXPzf+feRQtzDmw3OS5EVAlG+cNX6bZL+vvBueBFbmMFzczPRayg9LEm/jIAKIpb4wGQvtgTDfyMdXISFsttwshoShfA2yF3InK9FRvIw0TnSMWqXj916bHvPJFkap2+PHVld3Rbpb2NoH4HnnMuMcRU85noaCGcl0vv85BM62JSdM6iBXQePidCc6/H385/lIsWqz0K7AHGEInHDBIP1P0hdthckGk=; 4:1ZP9rqzFXW3oVUx0XIYot9YjGGKWUTZ+FrsYao/SbEAOaPmWnum37h5mqQET4C+r0d3Ou2aEOKeQ51DIqcrXYqBWg8l3lkqfIrCqOs57DcPo7Zd1+fE+15DtRqkZLF73OjGTB8shMuk065Wuca9Ut9xA1qVG4xSjaLeuwbVIb9Mi7jzjaN2cpBv917m4kHcJ6Le3/ed5vcsg3aouXXwpMipH+hUxfcMdbhMAbuNEX4eNHsZTIaIDcDWFsoP6wJv7iiQeEXVoIpZnpEkpxOEpHS7o+a1+rbeAomQmxSADuVcpkL0uZeqMsDDagz1Pz9K5kWCAUwKbI1BXfVXZmAweYBNMcDqnOtQHUfq/pB5C8fh+mo4OwjM9CQDqqQ1KFMZbzsidGiMbHW9vGPtjX13ZnAwfhbstBn9NNlTM4P6dyoCW9D911ECMssDpmm6B5OYP4qN+VaSC20x/ktSIg7eRaTfvFwXtR6S8S4TjZT3FFeCIXfhhSe7MURSd63PQg4tN X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13018025)(13023025)(13015025)(13024025)(13017025)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:DM2PR0301MB0845; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB0845; X-Forefront-PRVS: 0039C6E5C5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0845; 23:R6TBUig/Vr0hSU0vFIVhJB0AhV+yBqZHPT2n3yH?= =?us-ascii?Q?9zTbX+12UYGBRo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AdE+mcUx6ty7B7DPDX7mC+rtj4md9WZ2P4hYOOraIiB40Wcp3Tw6dKL1xgNkn4AHnFbZewwyJHbPIEoyCcLbXwIXIoorJvFn38yIFpjbMGrlYb9ucOKUnWbBRxqSQ/o0leZ9FGNLMNVIqdJBm67Koc1umkzbDqY+VGHX7a0C8cOsOPNm8lf0vrDI5nldC0Eb5//5Yg+Q73VmnuWglfuVP0ql97QvyB96ryW9RJpc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2016 09:37:30.0726 (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: DM2PR0301MB0845 Cc: Daniel Vetter , Peter Senna Tschudin , Russell King 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 We don't support configuring active plane on-the-fly for imx-drm. The relevant CRTC should be disabled before the plane configuration. Of course, the plane itself should be disabled as well. This patch adds active plane reconfiguration support by forcing CRTC mode change in plane's ->atomic_check callback and adding disable operation for all appropriate active planes(when necessary) in CRTC's ->atomic_disable callback. The atomic core would reenabled the affected CRTC and planes at atomic commit stage. Suggested-by: Daniel Vetter Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Daniel Vetter Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying --- v2->v3: * Disable all appropriate affected planes(when necessary) in CRTC's ->atomic_disable callback, but not in each plane's ->atomic_update callback, as suggested by Daniel Vetter. * +Cc Lucas Stach, as he tested the patch v2. v1->v2: * Do not reject reconfiguring an active overlay plane. drivers/gpu/drm/imx/imx-drm-core.c | 26 +++++++++++++++++++++++++- drivers/gpu/drm/imx/ipuv3-crtc.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/imx/ipuv3-plane.c | 21 ++++++++++++++------- 3 files changed, 65 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index 438bac8..d61b048 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -146,10 +146,34 @@ static void imx_drm_output_poll_changed(struct drm_device *drm) drm_fbdev_cma_hotplug_event(imxdrm->fbhelper); } +static int imx_drm_atomic_check(struct drm_device *dev, + struct drm_atomic_state *state) +{ + int ret; + + ret = drm_atomic_helper_check_modeset(dev, state); + if (ret) + return ret; + + ret = drm_atomic_helper_check_planes(dev, state); + if (ret) + return ret; + + /* + * Check modeset again in case crtc_state->mode_changed is + * updated in plane's ->atomic_check callback. + */ + ret = drm_atomic_helper_check_modeset(dev, state); + if (ret) + return ret; + + return ret; +} + static const struct drm_mode_config_funcs imx_drm_mode_config_funcs = { .fb_create = drm_fb_cma_create, .output_poll_changed = imx_drm_output_poll_changed, - .atomic_check = drm_atomic_helper_check, + .atomic_check = imx_drm_atomic_check, .atomic_commit = drm_atomic_helper_commit, }; diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c index 83c46bd..0779eed 100644 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c @@ -76,6 +76,32 @@ static void ipu_crtc_atomic_disable(struct drm_crtc *crtc, crtc->state->event = NULL; } spin_unlock_irq(&crtc->dev->event_lock); + + /* + * The relevant plane's ->atomic_check callback may set + * crtc_state->mode_changed to be true when the active + * plane needs to be reconfigured. In this case and only + * this case, active_changed is false - we disable all the + * appropriate active planes here. + */ + if (!crtc->state->active_changed) { + struct drm_plane *plane; + + drm_atomic_crtc_state_for_each_plane(plane, old_crtc_state) { + const struct drm_plane_helper_funcs *plane_funcs = + plane->helper_private; + + /* + * Filter out the plane which is explicitly required + * to be disabled by the user via atomic commit + * so that it won't be accidentally disabled twice. + */ + if (!plane->state->crtc) + continue; + + plane_funcs->atomic_disable(plane, NULL); + } + } } static void imx_drm_crtc_reset(struct drm_crtc *crtc) diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 4ad67d0..6063ebe 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c @@ -319,13 +319,16 @@ static int ipu_plane_atomic_check(struct drm_plane *plane, return -EINVAL; /* - * since we cannot touch active IDMAC channels, we do not support - * resizing the enabled plane or changing its format + * We support resizing active plane or changing its format by + * forcing CRTC mode change in plane's ->atomic_check callback + * and disabling all appropriate active planes in CRTC's + * ->atomic_disable callback. The planes will be reenabled in + * plane's ->atomic_update callback. */ if (old_fb && (state->src_w != old_state->src_w || state->src_h != old_state->src_h || fb->pixel_format != old_fb->pixel_format)) - return -EINVAL; + crtc_state->mode_changed = true; eba = drm_plane_state_to_eba(state); @@ -336,7 +339,7 @@ static int ipu_plane_atomic_check(struct drm_plane *plane, return -EINVAL; if (old_fb && fb->pitches[0] != old_fb->pitches[0]) - return -EINVAL; + crtc_state->mode_changed = true; switch (fb->pixel_format) { case DRM_FORMAT_YUV420: @@ -372,7 +375,7 @@ static int ipu_plane_atomic_check(struct drm_plane *plane, return -EINVAL; if (old_fb && old_fb->pitches[1] != fb->pitches[1]) - return -EINVAL; + crtc_state->mode_changed = true; } return 0; @@ -392,8 +395,12 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, enum ipu_color_space ics; if (old_state->fb) { - ipu_plane_atomic_set_base(ipu_plane, old_state); - return; + struct drm_crtc_state *crtc_state = state->crtc->state; + + if (!crtc_state->mode_changed) { + ipu_plane_atomic_set_base(ipu_plane, old_state); + return; + } } switch (ipu_plane->dp_flow) {