From patchwork Tue May 18 11:14:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 12264579 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31504C43461 for ; Tue, 18 May 2021 11:14:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E80FF61001 for ; Tue, 18 May 2021 11:14:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E80FF61001 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=emersion.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 853E96EB24; Tue, 18 May 2021 11:14:56 +0000 (UTC) Received: from mail-40133.protonmail.ch (mail-40133.protonmail.ch [185.70.40.133]) by gabe.freedesktop.org (Postfix) with ESMTPS id 165026EB24 for ; Tue, 18 May 2021 11:14:55 +0000 (UTC) Date: Tue, 18 May 2021 11:14:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1621336492; bh=8XMfq4CqtnBobSgQRyEyKjLE/6Nl9N9MeTSzZZ7pxNU=; h=Date:To:From:Cc:Reply-To:Subject:From; b=Af+HztBJdaSLbcWaCTlCKQsVNVofC+8wgN/UdxvXti8KDdHbSvNPI1AS2SN4h8thH M3aamc1j2ywFhhggQM6MWapAHVTEzTTOitQustkj7uam8yGXuKrqzSXvQr9gAI/yy0 9lq8AAeegRFTXhe+2HImXXT3rdGAln77E0tfwacbhqQ5nK7QzZvQJzVau/tivjD4ix myHZIiAcMz6zRjFSBAhZ8BFYPFkYL8T+oZkBaLZyCc6DKBVECUe8siUZ8hnDlRhTcp am0Q6Biyw8m/X6UDjwIScbrHT23KAi69HgtQhxAziwFaY8mpdDOluocG83yUyOjtEy DMPQSgP9pGhKA== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 1/3] drm: reference mode flags in DRM_CLIENT_CAP_* docs Message-ID: MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Simon Ser Cc: Daniel Stone Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" In the docs for DRM_CLIENT_CAP_STEREO_3D and DRM_CLIENT_CAP_ASPECT_RATIO, reference the DRM_MODE_FLAG_* defines that get set when the cap is enabled. Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Daniel Stone Cc: Pekka Paalanen Acked-by: Pekka Paalanen --- include/uapi/drm/drm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 67b94bc3c885..1c947227f72b 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -777,9 +777,9 @@ struct drm_get_cap { /** * DRM_CLIENT_CAP_STEREO_3D * - * if set to 1, the DRM core will expose the stereo 3D capabilities of the + * If set to 1, the DRM core will expose the stereo 3D capabilities of the * monitor by advertising the supported 3D layouts in the flags of struct - * drm_mode_modeinfo. + * drm_mode_modeinfo. See ``DRM_MODE_FLAG_3D_*``. */ #define DRM_CLIENT_CAP_STEREO_3D 1 @@ -804,6 +804,7 @@ struct drm_get_cap { * DRM_CLIENT_CAP_ASPECT_RATIO * * If set to 1, the DRM core will provide aspect ratio information in modes. + * See ``DRM_MODE_FLAG_PIC_AR_*``. */ #define DRM_CLIENT_CAP_ASPECT_RATIO 4 From patchwork Tue May 18 11:14:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 12264577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B3C8C433B4 for ; Tue, 18 May 2021 11:14:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E88161001 for ; Tue, 18 May 2021 11:14:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E88161001 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=emersion.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD7EC6E875; Tue, 18 May 2021 11:14:53 +0000 (UTC) Received: from mail2.protonmail.ch (mail2.protonmail.ch [185.70.40.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2F2916E875 for ; Tue, 18 May 2021 11:14:53 +0000 (UTC) Date: Tue, 18 May 2021 11:14:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1621336490; bh=tOjHNqhISJHLnpaE4iSUDCuUPsOA/RrC8c32xTKht4E=; h=Date:To:From:Cc:Reply-To:Subject:From; b=r/jdr0Hcd8iD8c5yNVu4qr5sOsvHFCK3BFQnkSuWJmApiF7+F+JL/wqcDLvEAQlZH 7QfOTncKImrgn+gimoMq5THm4x9I6bGWKZ42pjYJDKD1cGgWKk2vInqGhdXvjcBNBa 4cytyY72XCN/n66d2mHeNG9eEPLSUzlhTmskLhbtl5wvNzx+r04ilyIca+TPQQC48d MayrcpOvY6LZiQXvobnPORi4ogeM4+Zad3HtT1ugAT1gFgV10/xqthBTjED5EBBwBD YhUpSc/KYaomGuAihfgZ9EQgLCJwpABis0xoQxH3KdksFQTRcHOvd3YUXef7+bwaeM TYeAOsthp3LwA== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 2/3] drm: clarify and linkify DRM_CLIENT_CAP_WRITEBACK_CONNECTORS docs Message-ID: MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Simon Ser Cc: Daniel Stone Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Make it clear that the client is responsible for enabling ATOMIC prior to enabling WRITEBACK_CONNECTORS. Linkify the reference to ATOMIC. Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Daniel Stone Cc: Pekka Paalanen Acked-by: Pekka Paalanen --- include/uapi/drm/drm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 1c947227f72b..87878aea4526 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -812,8 +812,8 @@ struct drm_get_cap { * DRM_CLIENT_CAP_WRITEBACK_CONNECTORS * * If set to 1, the DRM core will expose special connectors to be used for - * writing back to memory the scene setup in the commit. Depends on client - * also supporting DRM_CLIENT_CAP_ATOMIC + * writing back to memory the scene setup in the commit. The client must enable + * &DRM_CLIENT_CAP_ATOMIC first. */ #define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5 From patchwork Tue May 18 11:14:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 12264581 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1DA1C433ED for ; Tue, 18 May 2021 11:15:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8DE0E6117A for ; Tue, 18 May 2021 11:15:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DE0E6117A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=emersion.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BFC806EB26; Tue, 18 May 2021 11:15:00 +0000 (UTC) Received: from mail2.protonmail.ch (mail2.protonmail.ch [185.70.40.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id D466B6EB26 for ; Tue, 18 May 2021 11:14:59 +0000 (UTC) Date: Tue, 18 May 2021 11:14:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1621336497; bh=mXGdD0JZTVfsHYcdUVEkOkMKXOXSW2rB/j0ZWxKuPKo=; h=Date:To:From:Cc:Reply-To:Subject:From; b=uOWf6QDSa+G31h6jSuWwWJqcr6Uap53lmpBl4CNZBChgvPv8Jbcts4lxJx1vTv/aK ceqcGOqc+Vn00UEx6jGJn6JMYsTnqUC2hBbr8japvjLbAGnmplPRDPbYWSWB1PcJH9 f4E6Sw5gVcwqGR5YEHudeJ5RJvr/7TVxHhAVOsoeeAm+z2F2tpgLRjVnWSb1bZLD4x HR3it3J7TH9cJCwljQXLw7wzq5KpaFxa45pRicUu8RaXFIIyPXYZ33ZmmKhpaP43z+ b9uiYoAGHR4GL/ZrcKE95ai8jFHcxhD4xzenlZWOdZ5P0SejnNOLZgkW0NtVVW6JyI GPnrd2woQMmWg== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 3/3] drm: document minimum kernel version for DRM_CLIENT_CAP_* Message-ID: <8tBryxsjXiKtYZP4whnTumr2AsWx9X1xPmwFAdp5Nc@cp4-web-037.plabs.ch> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Simon Ser Cc: Daniel Stone Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The kernel versions including the following commits are referenced: DRM_CLIENT_CAP_STEREO_3D 61d8e3282541 ("drm: Add a STEREO_3D capability to the SET_CLIENT_CAP ioctl") DRM_CLIENT_CAP_UNIVERSAL_PLANES 681e7ec73044 ("drm: Allow userspace to ask for universal plane list (v2)") c7dbc6c9ae5c ("drm: Remove command line guard for universal planes") DRM_CLIENT_CAP_ATOMIC 88a48e297b3a ("drm: add atomic properties") 8b72ce158cf0 ("drm: Always enable atomic API") DRM_CLIENT_CAP_ASPECT_RATIO 7595bda2fb43 ("drm: Add DRM client cap for aspect-ratio") DRM_CLIENT_CAP_WRITEBACK_CONNECTORS d67b6a206507 ("drm: writeback: Add client capability for exposing writeback connectors") Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Daniel Stone Cc: Pekka Paalanen Reviewed-by: Daniel Vetter Acked-by: Daniel Stone Acked-by: Pekka Paalanen --- include/uapi/drm/drm.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 87878aea4526..ec2b122cdcc5 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -780,6 +780,8 @@ struct drm_get_cap { * If set to 1, the DRM core will expose the stereo 3D capabilities of the * monitor by advertising the supported 3D layouts in the flags of struct * drm_mode_modeinfo. See ``DRM_MODE_FLAG_3D_*``. + * + * This capability is always supported starting from kernel version 3.13. */ #define DRM_CLIENT_CAP_STEREO_3D 1 @@ -788,6 +790,9 @@ struct drm_get_cap { * * If set to 1, the DRM core will expose all planes (overlay, primary, and * cursor) to userspace. + * + * This capability has been introduced in kernel version 3.15. Starting from + * kernel version 3.17, this capability is always supported. */ #define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 @@ -797,6 +802,13 @@ struct drm_get_cap { * If set to 1, the DRM core will expose atomic properties to userspace. This * implicitly enables &DRM_CLIENT_CAP_UNIVERSAL_PLANES and * &DRM_CLIENT_CAP_ASPECT_RATIO. + * + * If the driver doesn't support atomic mode-setting, enabling this capability + * will fail with -EOPNOTSUPP. + * + * This capability has been introduced in kernel version 4.0. Starting from + * kernel version 4.2, this capability is always supported for atomic-capable + * drivers. */ #define DRM_CLIENT_CAP_ATOMIC 3 @@ -805,6 +817,8 @@ struct drm_get_cap { * * If set to 1, the DRM core will provide aspect ratio information in modes. * See ``DRM_MODE_FLAG_PIC_AR_*``. + * + * This capability is always supported starting from kernel version 4.18. */ #define DRM_CLIENT_CAP_ASPECT_RATIO 4 @@ -814,6 +828,9 @@ struct drm_get_cap { * If set to 1, the DRM core will expose special connectors to be used for * writing back to memory the scene setup in the commit. The client must enable * &DRM_CLIENT_CAP_ATOMIC first. + * + * This capability is always supported for atomic-capable drivers starting from + * kernel version 4.19. */ #define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5