From patchwork Thu Nov 17 08:56:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9433633 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 E3EC460471 for ; Thu, 17 Nov 2016 08:56:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D57902936D for ; Thu, 17 Nov 2016 08:56:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA3FC29374; Thu, 17 Nov 2016 08:56:59 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 3F7F82936D for ; Thu, 17 Nov 2016 08:56:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 469AF6E271; Thu, 17 Nov 2016 08:56:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id BE5706E271 for ; Thu, 17 Nov 2016 08:56:55 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id m203so19000123wma.3 for ; Thu, 17 Nov 2016 00:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R3bU9uJcknMEHrG5Nf/tezxY7RDSLFegzSVplXpI+Qk=; b=XD8VUMslM+s/Vy8DXJ+jmSknBymvTX8NgFzjZo2Z7XYBgBsVG+E5IFE+cm5XyoduNe GWPmgIjH4cinzlbamnkPKb6Ab5DcGgWZCFACVYZ7TstyW0nbSlUOW7wnwV8Rmw6ndYxf B7AnV8+6kpu8Tu2tPc0xUvIxNMEhPWeWGnvIw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R3bU9uJcknMEHrG5Nf/tezxY7RDSLFegzSVplXpI+Qk=; b=mZLqYG9yPnd9POdGPYkjk0WAUV+drfUJ+W2nKZEO4G0cIAMP7nbsYRwLxisqENPfod PudfypugICsECxR7DqN18fs188oNjX9QJMYq0tx4AVFJnJvXefqSVFPcI5NceaUOaAbB 2ybdF+RWy2pMe7Vn8ITpAakq8zui9k568EZ1EZbjeN21lMmbgZC+JagBvnarGs6cKzWQ Aua8q16bzEjvuOpnSLfOUHvTtgaoXVK3o2VmvM16zssbW7zuKz593Jz6BHSQPuu1jA05 x1vJ+5jQVOBj0VTmxyNM74zjAKSvCYds2TIgTy6gODGDJqsdijrIUsSpK88OLHfiuEFG 7uYw== X-Gm-Message-State: ABUngve1FqsYljwAAEaxqQ6IeufqSJSXo8Xks3KHXAjXhV3EzcyA+Qll8TVZvH/p8c7N8A== X-Received: by 10.28.126.11 with SMTP id z11mr16207747wmc.87.1479373014339; Thu, 17 Nov 2016 00:56:54 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:56b5:0:ac27:b86c:7764:9429]) by smtp.gmail.com with ESMTPSA id l67sm14528826wmf.0.2016.11.17.00.56.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2016 00:56:53 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH] drm: document standard connector properties Date: Thu, 17 Nov 2016 09:56:48 +0100 Message-Id: <20161117085648.26646-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161117073823.32567-1-daniel.vetter@ffwll.ch> References: <20161117073823.32567-1-daniel.vetter@ffwll.ch> Cc: Manasi Navare , Daniel Vetter , 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP There's a really big pile of additional connector properties, a lot of them standardized. But they're all for specific outputs (panels, TV, scaling, ...) so I left them out for now since this is enough for a start. I typed this to give Manasi a place to add her new link status property documentation. v2: forgot to git add all the bits (Manasi). v3: Be more epxlicit about integrated tiled panels (Archit) Cc: Manasi Navare Cc: Archit Taneja Signed-off-by: Daniel Vetter Reviewed-by: Archit Taneja --- Documentation/gpu/drm-kms.rst | 6 ++++++ drivers/gpu/drm/drm_connector.c | 44 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst index 568f3c2b6e46..f19757b1736a 100644 --- a/Documentation/gpu/drm-kms.rst +++ b/Documentation/gpu/drm-kms.rst @@ -260,6 +260,12 @@ Property Types and Blob Property Support .. kernel-doc:: drivers/gpu/drm/drm_property.c :export: +Standard Connector Properties +----------------------------- + +.. kernel-doc:: drivers/gpu/drm/drm_connector.c + :doc: standard connector properties + Plane Composition Properties ---------------------------- diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index b5c6a8ee831e..5a4526289392 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -588,6 +588,50 @@ static const struct drm_prop_enum_list drm_tv_subconnector_enum_list[] = { DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name, drm_tv_subconnector_enum_list) +/** + * DOC: standard connector properties + * + * DRM connectors have a few standardized properties: + * + * EDID: + * Blob property which contains the current EDID read from the sink. This + * is useful to parse sink identification information like vendor, model + * and serial. Drivers should update this property by calling + * drm_mode_connector_update_edid_property(), usually after having parsed + * the EDID using drm_add_edid_modes(). Userspace cannot change this + * property. + * DPMS: + * Legacy property for setting the power state of the connector. For atomic + * drivers this is only provided for backwards compatibility with existing + * drivers, it remaps to controlling the "ACTIVE" property on the CRTC the + * connector is linked to. Drivers should never set this property directly, + * it is handled by the DRM core by calling the ->dpms() callback in + * &drm_connector_funcs. Atomic drivers should implement this hook using + * drm_atomic_helper_connector_dpms(). This is the only property standard + * connector property that userspace can change. + * PATH: + * Connector path property to identify how this sink is physically + * connected. Used by DP MST. This should be set by calling + * drm_mode_connector_set_path_property(), in the case of DP MST with the + * path property the MST manager created. Userspace cannot change this + * property. + * TILE: + * Connector tile group property to indicate how a set of DRM connector + * compose together into one logical screen. This is used by both high-res + * external screens (often only using a single cable, but exposing multiple + * DP MST sinks), or high-res integrated panels (like dual-link DSI) which + * are not gen-locked. Note that for tiled panels which are genlocked, like + * dual-link LVDS or dual-link DSI, the driver should try to not expose the + * tiling and virtualize both &drm_crtc and &drm_plane if needed. Drivers + * should update this value using drm_mode_connector_set_tile_property(). + * Userspace cannot change this property. + * + * Connectors also have one standardized atomic property: + * + * CRTC_ID: + * Mode object ID of the &drm_crtc this connector should be connected to. + */ + int drm_connector_create_standard_properties(struct drm_device *dev) { struct drm_property *prop;