From patchwork Mon May 30 10:02:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying Liu X-Patchwork-Id: 9140865 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 13DE860759 for ; Mon, 30 May 2016 10:18:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06EDF281C2 for ; Mon, 30 May 2016 10:18:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFB792821E; Mon, 30 May 2016 10:18:53 +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 6FD23281C2 for ; Mon, 30 May 2016 10:18:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 98A9E6E79B; Mon, 30 May 2016 10:18:51 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0088.outbound.protection.outlook.com [65.55.169.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 16AB36E76E for ; Mon, 30 May 2016 10:18:49 +0000 (UTC) Received: from BLUPR0301CA0010.namprd03.prod.outlook.com (10.162.113.148) by BN1PR03MB203.namprd03.prod.outlook.com (10.255.200.146) with Microsoft SMTP Server (TLS) id 15.1.497.12; Mon, 30 May 2016 10:03:43 +0000 Received: from BY2FFO11FD053.protection.gbl (2a01:111:f400:7c0c::124) by BLUPR0301CA0010.outlook.office365.com (2a01:111:e400:5259::20) 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; Mon, 30 May 2016 10:03:42 +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 BY2FFO11FD053.mail.protection.outlook.com (10.1.15.190) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Mon, 30 May 2016 10:03:42 +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 u4UA3ddO010007; Mon, 30 May 2016 03:03:40 -0700 From: Liu Ying To: Subject: [PATCH] drm: Improve kerneldoc for mode_fixup callbacks and encoder's ->atomic_check Date: Mon, 30 May 2016 18:02:00 +0800 Message-ID: <1464602520-12437-1-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131090762226361647; (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)(4326007)(83322999)(81442002)(110136002)(73972006)(76482005)(189998001)(82202001)(47776003)(36756003)(2906002)(61266001)(8936002)(81166006)(5003940100001)(8676002)(6260500002)(2351001)(104016004)(1220700001)(87936001)(87572001)(19580405001)(50226002)(50986999)(86362001)(77096005)(6806005)(50466002)(92566002)(55446002)(106466001)(11100500001)(19580395003)(5008740100001)(33646002)(73392002)(105596002)(586003)(229853001)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR03MB203; H:az84smr01.freescale.net; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD053; 1:44aqIXlUyyz6IORL7ZVtN/KsIICYXQc9ayYOCUL5hHpmpbdN+S4YcjyHeJFnYj74ytPmKLbRsDBR0PWYrMSF7pU3BfhB2vCP412xYJJ0cfNpi94UaT5o25ii824csmZ4lj1Py7wqtkRVstcJt4KCTtX7eghli8fZtyZbn0zSo7QJAOynwmSBHcVIjYzYvstQPN6cvweFCnqu28Fu9/wcZk3pRWb39/FQy2hconlLgp7RE5enZEosR6NJJN5PgK0G2UsvJSaAmo1twa9a2BgnhErLYrSFZSSMRPhtL7BfIlzyJ188c05asHmYXcRV7PohlOqE5ax/wGtmsW/5XU6eqBgq69VX3Hw5sSIdJYekrQIrUZ4Lhg1xQdqVZ8o0Vmg7jmWr8mRaKSqs2LA18jjZFmAt1UT67LUTpevK0HlxjjUhEsVIVqcmQAytTvtStwqMGbdr8izYZNp5JcEaIArjZn/RTktJ1vfaMKWXyvQeXa1RWwkK10Y8KHJimrO7QrTsvnXEmywSe6CAjjCKmtXJp1CsswfMAWeWfbnPnS7CDg+QcdX5tBZ5WrGjwgjR6/OZ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 4ca07f8e-0b41-4577-9779-08d38871ae35 X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB203; 2:KBXnP7n8bQ0hAzLyBRWeYZjFEVxNqnFYDy0ejPEjCoM4TwUflICavtBSmIKPwpf2+vfCmm1qSUKKIwEOyGheXpE8LRe5Gdv8Pl8B0DG9KWQht2t6V7YVgiN1eO0S9CAiD0qNbUf8UsB16wToXxpsy1qsEP5AIGAHGGDiMnyuH2lhrpgCrnxqY2qHNGi+Zc+K; 3:FEcOuV0bXs8EHvLw/PEyF1Pr2uguvkQEU29igwQGy29Gey4P4acqlMpzuG919jNPOXhzKvHuRzmXyAVqkNdpdIV5uYvrvnsnSeSceAJtPRq4I5Nqelb+m6ob7VrlIMY5rrNxjndm0mYR8+1PLriBtcPs0TpSU3vTjPaRHCMhXa7XULGo5BtiGX6ao7rEoZPhyA0ZT4wG2TzmIa57+ysxaa+dJMi4OuCnWgGAf/0n5Nk=; 25:c8ewE7EfIjMyXwQ6aYZGvyCZi9cmBe+gmDJyV/adUkUBWBqWzdrNnpTAfhunrV+g+oackCLF2T0IXaG7oKTFjH1pQqjmxvW8Cj2SNuEYb3/4TCKyyHUfWOb4mymEXI9G8deXGQsyojkCcqfyuc8CoLSEJfSzgBh2+ZSBIfEBOBPGvMZEZqe0d+3/p4I7zWVWupgfsjYz4wRbFR2OWOTVgj3M9yYO4FcP/DJ0NkU3thXxMatnsH36wuvfnXrTh+eWT+JaHKAAlT9G3JFFEPGCywJkdWOjDtTw5rllca9L+R+XWImJqzGPVahiBgn9uUyQXnX9iBJxWPEVlsB0DQLAG6c5NxXK29XBILfxp4PbzbZxh+a0C5cDb9UcsZ447EGUcQ9IKH40d5gwUomfjrmFwYQd50QjQn7NFpzwL5q6qRI= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB203; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13018025)(8121501046)(13023025)(13017025)(13024025)(5005006)(3002001)(10201501046)(6055026); SRVR:BN1PR03MB203; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR03MB203; X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB203; 4:v7bBvEkUgHTptAaYOvFNsRBuJGIoy3XAvC1uEMowtgfkqoCl6XDEzUq/fJDKn+OFaGtpQ5u/iBLrMhf1m9s1D54Aya/qw7K7t/OJKKQdcBI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=; 24:QTO2xzZ3rg6KYZTSZLpgU4Q4at4RdtknLPZ61/q2KH97tI86xhVaoduj3VgpFKQU9M1ON61C9KFBA8+5ysco9gwxYB/FruuE2aD1CaYr+P4=; 7:UqvAWogNpVGsldtfLBsAhV8eA+9Dsi9k5+85x3drwmHoquh89twCM71C+IBdkHxTC2yM2o5AndKDD+BP/dXM6MnsJG3Ob544YaM5t1L/0bJmBkpqlutfPV8v8X0E3PAqvkYo5p5AltUqzifRd4QJwxd6IR5z8l9bx7UB0YSK4UWzYldiH9HsTpS5d3VB+NQ3 SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2016 10:03:42.3709 (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: BN1PR03MB203 Cc: 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 To match with the atomic context, this patch updates kerneldoc to clarify that all mode_fixup callbacks and encoder's ->atomic_check callback are called only when enabling a display mode on the relevant CRTC. Suggested-by: Daniel Vetter Signed-off-by: Liu Ying --- include/drm/drm_crtc.h | 11 ++++++----- include/drm/drm_modeset_helper_vtables.h | 29 ++++++++++++++++------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index d1559cd..6e7ea36 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -1571,11 +1571,12 @@ struct drm_bridge_funcs { * * NOTE: * - * This function is called in the check phase of atomic modesets, which - * can be aborted for any reason (including on userspace's request to - * just check whether a configuration would be possible). Drivers MUST - * NOT touch any persistent state (hardware or software) or data - * structures except the passed in @state parameter. + * This function is called in the check phase of atomic modesets only + * when enabling a display mode on the relevant CRTC, which can be + * aborted for any reason (including on userspace's request to just + * check whether a configuration would be possible). Drivers MUST NOT + * touch any persistent state (hardware or software) or data structures + * except the passed in @state parameter. * * RETURNS: * diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index d4619dc..269adfb 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -119,11 +119,12 @@ struct drm_crtc_helper_funcs { * * NOTE: * - * This function is called in the check phase of atomic modesets, which - * can be aborted for any reason (including on userspace's request to - * just check whether a configuration would be possible). Atomic drivers - * MUST NOT touch any persistent state (hardware or software) or data - * structures except the passed in adjusted_mode parameter. + * This function is called in the check phase of atomic modesets only + * when enabling a display mode, which can be aborted for any reason + * (including on userspace's request to just check whether a + * configuration would be possible). Atomic drivers MUST NOT touch any + * persistent state (hardware or software) or data structures except the + * passed in adjusted_mode parameter. * * This is in contrast to the legacy CRTC helpers where this was * allowed. @@ -443,10 +444,11 @@ struct drm_encoder_helper_funcs { * * NOTE: * - * This function is called in the check phase of atomic modesets, which - * can be aborted for any reason (including on userspace's request to - * just check whether a configuration would be possible). Atomic drivers - * MUST NOT touch any persistent state (hardware or software) or data + * This function is called in the check phase of atomic modesets only + * when enabling a display mode on the relevant CRTC, which can be + * aborted for any reason (including on userspace's request to just + * check whether a configuration would be possible). Atomic drivers MUST + * NOT touch any persistent state (hardware or software) or data * structures except the passed in adjusted_mode parameter. * * This is in contrast to the legacy CRTC helpers where this was @@ -623,10 +625,11 @@ struct drm_encoder_helper_funcs { * * NOTE: * - * This function is called in the check phase of an atomic update. The - * driver is not allowed to change anything outside of the free-standing - * state objects passed-in or assembled in the overall &drm_atomic_state - * update tracking structure. + * This function is called in the check phase of an atomic update only + * when enabling a display mode on the relevant CRTC. The driver is not + * allowed to change anything outside of the free-standing state objects + * passed-in or assembled in the overall &drm_atomic_state update + * tracking structure. * * RETURNS: *