From patchwork Tue Nov 6 20:24:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Kazlauskas, Nicholas" X-Patchwork-Id: 10671363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B12E13AD for ; Tue, 6 Nov 2018 20:25:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2ADB02AA29 for ; Tue, 6 Nov 2018 20:25:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EA742AAAC; Tue, 6 Nov 2018 20:25: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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 BC75B2AA62 for ; Tue, 6 Nov 2018 20:24:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AAC96E41C; Tue, 6 Nov 2018 20:24:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-eopbgr810083.outbound.protection.outlook.com [40.107.81.83]) by gabe.freedesktop.org (Postfix) with ESMTPS id 89EC26E41B; Tue, 6 Nov 2018 20:24:45 +0000 (UTC) Received: from CY4PR1201CA0007.namprd12.prod.outlook.com (2603:10b6:910:16::17) by CY1PR12MB0742.namprd12.prod.outlook.com (2a01:111:e400:59d1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Tue, 6 Nov 2018 20:24:43 +0000 Received: from DM3NAM03FT037.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::208) by CY4PR1201CA0007.outlook.office365.com (2603:10b6:910:16::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1294.21 via Frontend Transport; Tue, 6 Nov 2018 20:24:43 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by DM3NAM03FT037.mail.protection.outlook.com (10.152.83.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1294.14 via Frontend Transport; Tue, 6 Nov 2018 20:24:42 +0000 Received: from kazbox.amd.com (10.180.168.240) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.389.1; Tue, 6 Nov 2018 14:24:40 -0600 From: Nicholas Kazlauskas To: , Subject: [PATCH v6 3/5] drm: Document variable refresh properties Date: Tue, 6 Nov 2018 15:24:33 -0500 Message-ID: <20181106202435.23556-4-nicholas.kazlauskas@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181106202435.23556-1-nicholas.kazlauskas@amd.com> References: <20181106202435.23556-1-nicholas.kazlauskas@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(136003)(376002)(39860400002)(346002)(396003)(2980300002)(428003)(3190300001)(189003)(199004)(476003)(50466002)(126002)(23676004)(356004)(7696005)(11346002)(305945005)(486006)(446003)(2616005)(1076002)(76176011)(66574009)(81166006)(104016004)(81156014)(47776003)(336012)(39060400002)(2906002)(14444005)(5660300001)(426003)(5820100001)(53416004)(8676002)(53936002)(5024004)(6666004)(97736004)(2870700001)(44832011)(72206003)(4326008)(50226002)(68736007)(54906003)(106466001)(110136005)(186003)(478600001)(36756003)(105586002)(86362001)(316002)(26005)(77096007)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0742; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT037; 1:D2GQ45YoYum8hvE6gnshS2T5SC2TmOq7OM0DByffH7F9FRdLPxz0WT9B6Iis2oac8w+N0kYHY5HJDG322s3BdqWSUlQxPSRmTfDT3aj+AdL9iXvuFbHDdka3Hv56lKpN X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cf967a41-3254-453f-37d2-08d64425e30a X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060); SRVR:CY1PR12MB0742; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0742; 3:ZIeVEK+Jkfs2FWTLhtifXTpozG7tVEaYtQpgJU3Id/Gr9hE/8EBCUdFGGhw94N5e7fXqNvi8mPsct3VzFQNdsTdYEW/7SGmkYAPxWOdXZIZ/U39do6Vv9a7Ky2lN2UqAq8zu7PctdQMjd6i4Gb6VO0yr0vbwsccWM1d+IvcOlMnbPruFirSJN8V6xvTl0kHZLknaO7QZ2j2LCiiNebigl7YE01JghTnTWaMPfmSRoq1gQknSC9i1xCfUrzwAgVKjjUjmrBoucJIRKx8wx/c/HxCpjSqauDQPp6BvfkqZqTBjqW9bLNYO3kunfbRBJvPWd9FayaTEyXQ2jLQdjfeCMKobjl23+MUBb+gZQYrSzoQ=; 25:OGMtcaKzbq4n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EXcc7vmpPwwxInriJMCVAKpTnrEu0FzGZIYFBZMRJHANLGAMVpZzV9+lN1HMG06eeK1+6FCT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699)(85827821059158); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93003095)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:CY1PR12MB0742; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0742; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0742; 4:NZgGyzKKZGfB6g3WRHXKzTTBkBqnFqRYvXnJthr4Uo14pOuXfpfrSdFhOkaDbjvyeyWjxloVkCIioWWzZHIFK4AhSqITKwjha/wT5hlTiW8wPUqEc0SxykIgOeprBXIRJ0/tQ5MbANLciFUIVxv6u5Np5aeEzteJ3V4JdGex5OwpGEPAvV2hXC5QQ1EWa7XEwip9dbzUudJi4TtHf+voL8u0zk9uuDyzgo6SRIaG5f6gt8uMrt7p1K323b9rggQpD8nfJUK5Rz2iyN8KTrAQN/p0h8hWqnafG0i6YE04uEmBhbDrOtzqQU4NqxsM7pKCeh3AOd3PifKKd3zOuww9cXOCUc5T/fALs0EAjqZ1HtuUpiOQu4Uz4QF7W1vl/pvu X-Forefront-PRVS: 0848C1A6AA X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BCY1PR12MB0742=3B23=3ASJsBRO2?= =?utf-8?q?H5iEXgCVLjZbn/9p2bfWeOnmKB6XO62etY39NPsmlkyDn+YyPD1MABmEOb/4DQIvi?= =?utf-8?q?aVDd2ncSFkJJvYE8x1sG9/GekJVkGqkmv0XeLGWIkcqnjx6uLuG/YC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QftHH0NP6GPxGyyW9r31YTU+FYZVuIAkKmqrFp5jKQnL40MUrW7UcrPX1trYzEWaMtFbwkf5nT/kE0hZ+5fCyxG8AL85n33Vd5W2FoB6D0Sqw5ORvuZ3bc1Q28SX6RQXXdRpOAxWc123XDxLhDA==; 5:dZt+VxyhZZoDxUsKQ1RTgM3PGTVJyokPgwlqCZDDKtRYQYlSuh37UG023huMlJfWWpyo1wbbNOcJ4erpDlbummTDiqfbX+1Mj8zznoy31NWleAEKxfrE+Dm9y2ia67m5lrZ8waeZDN89lraerpaSswZ53zLTRLLQ8pBwt7zKEic=; 7:ldQUe9dLc/DPu4euX3WuHQeGtMg8yOK+4YO+3zqSV9cimJ5RktGgcAc30k5rywaIqQWjXa8WKbBzW3Bc5RLD2/8h3HYjZhoJc+TZEVDDs+uqyyNnZaCZlyBb08srOBnosYHnsSWBQBWjcwvpp4F8+A== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0742; 20:ZwEWuJUjIU6iYwQeBgWuzKOajstHKfFQXLHkwuvPMs9YbXXFnccyPn7Nm74W9bG5dr8WZW/8F0UXI5O70BOcoG92jAI/a3ZR9s0G7f5Nu+Wc/HYZYWqRW0dZW4YsDC0IO33swu8o8OCipYUqPEgSTomfViTpcNMjNhgYEXDUv7A4AeF8EQEp5tOr7gklfJXwmrEWhVLcrJZBRyXiQI3euK/KSLoMvFZpHKJEa8abVSnY79Di+XFBI6f+2n5HF6ne X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2018 20:24:42.9174 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cf967a41-3254-453f-37d2-08d64425e30a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0742 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: michel@daenzer.net, Manasi Navare , Nicholas Kazlauskas Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP These include the drm_connector 'vrr_capable' and the drm_crtc 'vrr_enabled' properties. Signed-off-by: Nicholas Kazlauskas Cc: Harry Wentland Cc: Manasi Navare Cc: Pekka Paalanen Cc: Ville Syrjälä Cc: Michel Dänzer Acked-by: Pekka Paalanen --- Documentation/gpu/drm-kms.rst | 7 ++++ drivers/gpu/drm/drm_connector.c | 61 +++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst index 4b1501b4835b..8da2a178cf85 100644 --- a/Documentation/gpu/drm-kms.rst +++ b/Documentation/gpu/drm-kms.rst @@ -575,6 +575,13 @@ Explicit Fencing Properties .. kernel-doc:: drivers/gpu/drm/drm_atomic_uapi.c :doc: explicit fencing properties + +Variable Refresh Properties +--------------------------- + +.. kernel-doc:: drivers/gpu/drm/drm_connector.c + :doc: Variable refresh properties + Existing KMS Properties ----------------------- diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 49290060ab7b..a6adf5450db3 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -1255,6 +1255,67 @@ int drm_mode_create_scaling_mode_property(struct drm_device *dev) } EXPORT_SYMBOL(drm_mode_create_scaling_mode_property); +/** + * DOC: Variable refresh properties + * + * Variable refresh rate capable displays can dynamically adjust their + * refresh rate by extending the duration of their vertical porch until + * page flip or timeout occurs. This can reduce or remove stuttering + * and latency in scenarios where the page flip does not align with the + * vblank interval. + * + * An example scenario would be an application flipping at a constant rate + * of 48Hz on a 60Hz display. The page flip will frequently miss the vblank + * interval and the same contents will be displayed twice. This can be + * observed as stuttering for content with motion. + * + * If variable refresh rate was active on a display that supported a + * variable refresh range from 35Hz to 60Hz no stuttering would be observable + * for the example scenario. The minimum supported variable refresh rate of + * 35Hz is below the page flip frequency and the vertical front porch can + * be extended until the page flip occurs. The vblank interval will be + * directly aligned to the page flip rate. + * + * Userspace control for variable refresh rate is supported via properties + * on the &drm_connector and &drm_crtc objects. + * + * "vrr_capable": + * Optional &drm_connector boolean property that drivers should attach + * with drm_connector_attach_vrr_capable_property() on connectors that + * could support variable refresh rates. Drivers should update the + * property value by calling drm_connector_set_vrr_capable_property(). + * + * Absence of the property should indicate absence of support. + * + * "vrr_enabled": + * Default &drm_crtc boolean property that notifies the driver that the + * content on the CRTC is suitable for variable refresh rate presentation. + * The driver will take this property as a hint to enable variable + * refresh rate support if the receiver supports it, ie. if the + * "vrr_capable" property is true on the &drm_connector object. The + * veritcal front porch duration will be extended until page-flip or + * timeout when enabled. + * + * The minimum vertical front porch duration is defined as the vertical + * front porch duration for the current mode. + * + * The maximum vertical front porch duration is greater than or equal to + * the minimum vertical front porch duration. The duration is derived + * from the minimum supported variable refresh rate for the connector. + * + * The driver may place further restrictions within these minimum + * and maximum bounds. + * + * Some displays may exhibit noticeable differences in brightness when + * varying vertical front porch duration. + * + * The semantics for the vertical blank timestamp differ when + * variable refresh rate is active. The vertical blank timestamp + * is defined to be an estimate using the current mode's fixed + * refresh rate timings. The semantics for the page-flip event + * timestamp remain the same. + */ + /** * drm_connector_attach_vrr_capable_property - creates the * vrr_capable property