From patchwork Sun Sep 3 21:41:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 719895 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 591EECA0FE3 for ; Sun, 3 Sep 2023 21:42:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349056AbjICVmE (ORCPT ); Sun, 3 Sep 2023 17:42:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348932AbjICVl6 (ORCPT ); Sun, 3 Sep 2023 17:41:58 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26765D9 for ; Sun, 3 Sep 2023 14:41:55 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-5008d16cc36so1418782e87.2 for ; Sun, 03 Sep 2023 14:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693777313; x=1694382113; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=f4CGlwIh3CaiNYfDE8T4/N3NKVw9L1KuLHleXxMGA8k=; b=sL37z1nSxapwX1ACyQwJD5J17vIMjGOlYzI20UASAIey8kqRxI4mjpOLunNTr0u6KK jvpNqVkjoqjPTMONMwLwlzQKkafFdk3xRAB7v7F2C71kjfWv3RZAq0uwdXFBRgW5Ablu 5qEtusCHwgTRJX0jw35/YtTrrnm483NhEudimhX/Y9mY6b1ypxLsOGIV2NXg1locgBn2 GT8LylBHFPlCJAw9wBeuHQ564qtXwoDgreruE+BCcep2hASO7HKsC8zNooFIvAMa6b7z 9wXUeRsY+cFjE1kA3IgrV4pnlZhjm+i9W7t1RIK5ziozF2te0A0ydoVmTyp2VCrfh/M7 rszA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693777313; x=1694382113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f4CGlwIh3CaiNYfDE8T4/N3NKVw9L1KuLHleXxMGA8k=; b=G3og09Eh7OCq5jqBRwTfOwGikP/FH+h91cN07fVz4OzEVaYqEwAgFX1AnrxZGJffJw lsh1nqbv7dvO20/sbt60yAn/f655IpwqLdveMronvH4OH0QajKJoWt9FIoATpfSxrTUu jiyGYHKxpRtiAuqtyAzAsoLImqU3hsUR03Ie8wHCMPuLP3lmVTlAmz+sDCBQ97+hDaMP 8HMDdF5ESaP84wVUmwNzJKlFyGOByhISmwEQ0mK7hKPto9D4ZL1e28okn9Q2VWvJi/Gt 26XXFubjzY1XQIKMR1BZDFjSSxGFV4ZS6jGBZQDy0p0n3tl9nFplE6/7bBsscixMwBDZ u7lw== X-Gm-Message-State: AOJu0YwNPTpJ4S3/F/55c1BCJR+dMHjKG4hslxdWQyunH2CKyr9NmQEc nBnNcLLL/rNoSKKRE80X+6dwow== X-Google-Smtp-Source: AGHT+IHZcZHwPmZz/G9GJYrJdaFt/yh7kFkMispc1XECmMNIp6Mo7eyJQIJfgGNG8gZdXS8BoslEpA== X-Received: by 2002:a05:6512:3444:b0:4fb:911b:4e19 with SMTP id j4-20020a056512344400b004fb911b4e19mr3890157lfr.35.1693777313473; Sun, 03 Sep 2023 14:41:53 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id x17-20020ac25dd1000000b004f8555f7aa1sm1422506lfq.52.2023.09.03.14.41.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Sep 2023 14:41:53 -0700 (PDT) From: Dmitry Baryshkov To: David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , "Bryan O'Donoghue" , Guenter Roeck , Heikki Krogerus , Janne Grunau , Simon Ser , Andy Gross , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, freedreno@lists.freedesktop.org Subject: [RFC PATCH v1 03/12] drm/connector: extend PATH property to covert Type-C case Date: Mon, 4 Sep 2023 00:41:41 +0300 Message-Id: <20230903214150.2877023-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230903214150.2877023-1-dmitry.baryshkov@linaro.org> References: <20230903214150.2877023-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Userspace needs to identify whether the DisplayPort connector is a native one or it is wrapped into the USB-C port. Moreover the userspace might need to point user to the exact location of this Type-C port on the laptop case. Existing USB-C altmode implementations (i915, amdgpu) have used the DRM_MODE_CONNECTOR_DisplayPort even for such ports. To keep backwards compatibility we can not change this to DRM_MODE_CONNECTOR_USB. Therefore the kernel needs some other way to represent this information. To facilitate this, reuse the 'PATH' property, which was used to describe the DP port in the DP MST configuration. Use either 'typec:portN' to point out to the Type-C port class device, or just 'typec:' if the corresponding port can not be identified. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_connector.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 05fc29a54801..a326782e936e 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -1185,10 +1185,14 @@ static const u32 dp_colorspaces = * never read back the value of "DPMS" because it can be incorrect. * PATH: * Connector path property to identify how this sink is physically - * connected. Used by DP MST. This should be set by calling - * drm_connector_set_path_property(), in the case of DP MST with the - * path property the MST manager created. Userspace cannot change this + * connected. This should be set by calling + * drm_connector_set_path_property(). Userspace cannot change this * property. + * In the case of DP MST this is equal to the path property the MST + * manager created. It is equal to 'mst:baseID-port-port...'. + * In the case of DP USB-C connector this is equal to the 'typec:portN', + * pointing to the corresponding Type-C port device or just 'typec' if the + * corresponding Type-C port can not be identified. * 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