From patchwork Thu May 21 11:09:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 11562715 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0449D912 for ; Thu, 21 May 2020 11:09:51 +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 D6E68207FB for ; Thu, 21 May 2020 11:09:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=emersion.fr header.i=@emersion.fr header.b="ITn00Kbg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6E68207FB 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 BA9036E1BC; Thu, 21 May 2020 11:09:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch [185.70.40.134]) by gabe.freedesktop.org (Postfix) with ESMTPS id D6BC16E1BC for ; Thu, 21 May 2020 11:09:44 +0000 (UTC) Date: Thu, 21 May 2020 11:09:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail; t=1590059381; bh=7UxTF0StdNKNPyigzBwdRbtmq/EY5zqTjxghb9y//pw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=ITn00KbgGOVA4aqUXVBUktGlP3qnQbjr7dl7u7OM2m+T/T66tQV4RTYa7uKM738Re TzFa6zhN92ggfVPwdl/VCyMIlsKy9vg8gWLnOJcKgzul2N2vaf17C8GBMUIDc7uSBQ QTtG6Ud4rcW2mixJUcdLt6RXMuAmbQV4BrrhdXcI= To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH v2] drm: add docs for standard CRTC properties Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch 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 Vetter , =?utf-8?q?Michel_D=C3=A4nzer?= , Pekka Paalanen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch adds docs for the ACTIVE and MODE_ID CRTC properties. Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Ville Syrjala Cc: Pekka Paalanen Cc: Michel Dänzer Cc: Daniel Stone Reviewed-by: Pekka Paalanen --- Thanks for the review Daniel! I rejiggered your suggestions a little to move some ACTIVE bits into the ACTIVE description. Documentation/gpu/drm-kms.rst | 6 ++++++ drivers/gpu/drm/drm_crtc.c | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst index 397314d08f77..975cfeb8a353 100644 --- a/Documentation/gpu/drm-kms.rst +++ b/Documentation/gpu/drm-kms.rst @@ -460,6 +460,12 @@ HDMI Specific Connector Properties .. kernel-doc:: drivers/gpu/drm/drm_connector.c :doc: HDMI connector properties +Standard CRTC Properties +------------------------ + +.. kernel-doc:: drivers/gpu/drm/drm_crtc.c + :doc: standard CRTC properties + Plane Composition Properties ---------------------------- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 4936e1080e41..fafb8d3c3235 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -204,6 +204,33 @@ struct dma_fence *drm_crtc_create_fence(struct drm_crtc *crtc) return fence; } +/** + * DOC: standard CRTC properties + * + * DRM CRTCs have a few standardized properties: + * + * ACTIVE: + * Atomic property for setting the power state of the CRTC. When set to 1 the + * CRTC will actively display content. When set to 0 the CRTC will be powered + * off. There is no expectation that user-space will reset CRTC resources like + * the mode and planes when setting ACTIVE to 0. + * + * User-space can rely on an ACTIVE change to 1 to never fail an atomic test + * as long as no other property has changed. If a change to ACTIVE fails an + * atomic test, this is a driver bug. For this reason setting ACTIVE to 0 must + * not release internal resources (like reserved memory bandwidth or clock + * generators). + * + * Note that the legacy DPMS property on connectors is internally routed to + * control this property for atomic drivers. + * MODE_ID: + * Atomic property for setting the CRTC display timings. The value is the ID + * of a blob containing the DRM mode info. To disable the CRTC, user-space + * must set this property to 0. + * + * Setting MODE_ID to 0 will release reserved resources for the CRTC. + */ + /** * drm_crtc_init_with_planes - Initialise a new CRTC object with * specified primary and cursor planes.