From patchwork Sat Jul 29 00:49:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13332861 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 76A72C001DE for ; Sat, 29 Jul 2023 00:49:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E69B610E7B5; Sat, 29 Jul 2023 00:49:17 +0000 (UTC) Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by gabe.freedesktop.org (Postfix) with ESMTPS id D76A810E6B9 for ; Sat, 29 Jul 2023 00:49:16 +0000 (UTC) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fb7dc16ff0so4649818e87.2 for ; Fri, 28 Jul 2023 17:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690591755; x=1691196555; 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=PMSy/K1CIsccW2sw1PgTe2FDAawI36xm/3iEipD6VMg=; b=oy3nXUj7xNj7CjIZly7ArdxVtmlQ1TkziV/9V//vqNUR5M1WSFNFgzlosb86fW13jm vp9kbDQgqW9KxX/VNfpSqZpTqhz9J9JGbQkn/htKPrfozoXhWUTrwOSS9YcmZg2AngQ1 Exe02UvHl+zKB1Eq+M1UxA30G7bg83R6pl8wjLqRw/i6yaxgkZf6oxtWSSiJIc1L4xnU Ndih1C5ATiTqC8b+Hrev//VhzaoOVlcEX/EC6SY6cMFK2mscNaimcAyI8T0VHKq3gokw tMvHaw9A5mvr2AuDyEeWvKpYC8CJsBdiIJ3EnICAx17dacWnesx7ewmXANr4tNd9jrrH FnlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690591755; x=1691196555; 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=PMSy/K1CIsccW2sw1PgTe2FDAawI36xm/3iEipD6VMg=; b=d1Hqr/IxJ7hGuwcL5NdMNtYpVuWnWVSRFZys0vnolYcU7zpvZzFpYpbfY+cI7mN4NO fAQBT2K84yX2O892ER/nfwYrmOcqYFEl8o4t56YQu8iCARv/AbEPkCcB9HxfRWlW0DPZ mSYPYBJe3VTS7nf+9dMvHAh/TSg+bHttT78FWbqHHvfwEAHWKmSQQSitQZBFTsxSqoWw qaQxM1lDXc/JpWGLArCAAy21BUVmzIhzGmHQ6sLdwUa5sdyKeFCu2kmHFGzkxfooQm0D 7isTMBoo0XfrMIOTJij1B+k6x3BTWWsqKof4h2++BekG0NshMnzhj5qUDqyXbd9/NCbL +JKg== X-Gm-Message-State: ABy/qLZ/4/tXzY9Zs4sQ/9uF3zOqzisTK1GB++SSyY4vaZAi65acMq8p a9BEcDMQSBUBYKn2VDyxJ4/RDA== X-Google-Smtp-Source: APBJJlEYW7RGCnj6FnPzMFWCvTODp5wo9062x4YixzDNvi5vN5iPyz2zoy8vdIFOOdnjfwmwCyDREQ== X-Received: by 2002:a05:6512:465:b0:4fb:9129:705b with SMTP id x5-20020a056512046500b004fb9129705bmr2550632lfd.6.1690591755108; Fri, 28 Jul 2023 17:49:15 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id a24-20020a19f818000000b004fe20d1b288sm500702lff.159.2023.07.28.17.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 17:49:14 -0700 (PDT) From: Dmitry Baryshkov To: David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Andy Gross , Bjorn Andersson , Konrad Dybcio , Simon Ser , Janne Grunau Date: Sat, 29 Jul 2023 03:49:10 +0300 Message-Id: <20230729004913.215872-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230729004913.215872-1-dmitry.baryshkov@linaro.org> References: <20230729004913.215872-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/4] drm: allow specifying default subtype for the DP subconnector property X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Leo Li , dri-devel@lists.freedesktop.org, "Pan, Xinhui" , Rodrigo Siqueira , linux-kernel@vger.kernel.org, Maxime Ripard , Thomas Zimmermann , Rodrigo Vivi , Alex Deucher , amd-gfx@lists.freedesktop.org, Harry Wentland , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" In the embedded usecases the default subtype depends on the bridge chain, so it is easier to specify the subtype at the proprety attachment type rather than specifying it later. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 3 ++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 ++- drivers/gpu/drm/drm_connector.c | 6 ++++-- drivers/gpu/drm/i915/display/intel_dp.c | 3 ++- include/drm/drm_connector.h | 3 ++- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c index d34037b85cf8..c18459ecd4be 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c @@ -2022,7 +2022,8 @@ amdgpu_connector_add(struct amdgpu_device *adev, if (connector_type == DRM_MODE_CONNECTOR_DisplayPort || connector_type == DRM_MODE_CONNECTOR_eDP) { - drm_connector_attach_dp_subconnector_property(&amdgpu_connector->base); + drm_connector_attach_dp_subconnector_property(&amdgpu_connector->base, + DRM_MODE_SUBCONNECTOR_Unknown); } return; diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index 943959012d04..297321f0199e 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -759,7 +759,8 @@ void amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm, drm_dp_mst_topology_mgr_init(&aconnector->mst_mgr, adev_to_drm(dm->adev), &aconnector->dm_dp_aux.aux, 16, 4, aconnector->connector_id); - drm_connector_attach_dp_subconnector_property(&aconnector->base); + drm_connector_attach_dp_subconnector_property(&aconnector->base, + DRM_MODE_SUBCONNECTOR_Unknown); } int dm_mst_get_pbn_divider(struct dc_link *link) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index a3d3e7dc08b2..a6066e4a5e9a 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -1577,10 +1577,12 @@ EXPORT_SYMBOL(drm_mode_create_dvi_i_properties); /** * drm_connector_attach_dp_subconnector_property - create subconnector property for DP * @connector: drm_connector to attach property + * @subtype: initial value for the subconnector type * * Called by a driver when DP connector is created. */ -void drm_connector_attach_dp_subconnector_property(struct drm_connector *connector) +void drm_connector_attach_dp_subconnector_property(struct drm_connector *connector, + enum drm_mode_subconnector subtype) { struct drm_mode_config *mode_config = &connector->dev->mode_config; @@ -1594,7 +1596,7 @@ void drm_connector_attach_dp_subconnector_property(struct drm_connector *connect drm_object_attach_property(&connector->base, mode_config->dp_subconnector_property, - DRM_MODE_SUBCONNECTOR_Unknown); + subtype); } EXPORT_SYMBOL(drm_connector_attach_dp_subconnector_property); diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 474785110662..5819105187f6 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -5391,7 +5391,8 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect enum port port = dp_to_dig_port(intel_dp)->base.port; if (!intel_dp_is_edp(intel_dp)) - drm_connector_attach_dp_subconnector_property(connector); + drm_connector_attach_dp_subconnector_property(connector, + DRM_MODE_SUBCONNECTOR_Unknown); if (!IS_G4X(dev_priv) && port != PORT_A) intel_attach_force_audio_property(connector); diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 5a8115dca359..a130a78f6e0f 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -1990,7 +1990,8 @@ const char *drm_get_hdcp_content_type_name(int val); int drm_get_tv_mode_from_name(const char *name, size_t len); int drm_mode_create_dvi_i_properties(struct drm_device *dev); -void drm_connector_attach_dp_subconnector_property(struct drm_connector *connector); +void drm_connector_attach_dp_subconnector_property(struct drm_connector *connector, + enum drm_mode_subconnector subtype); int drm_mode_create_tv_margin_properties(struct drm_device *dev); int drm_mode_create_tv_properties_legacy(struct drm_device *dev, From patchwork Sat Jul 29 00:49:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13332862 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3795EC001DF for ; Sat, 29 Jul 2023 00:49:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E2AA810E7B3; Sat, 29 Jul 2023 00:49:21 +0000 (UTC) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id C451110E7B3 for ; Sat, 29 Jul 2023 00:49:17 +0000 (UTC) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4fe1344b707so4619880e87.1 for ; Fri, 28 Jul 2023 17:49:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690591756; x=1691196556; 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=YW+vdrPDM+RdVg71eRxchKCcF3Il7t8mgNv0e+r+q2g=; b=xbQCDRAAiTnRqvox2bcIt4oxrXiYymd8UqsOCvmuKhvZOr8APVzW3956/nnW/arxhy 9bYPRQww95RD/53CrRVkzlmNVRikim+c5eGIk0E74b/aPgRCGC9qZyyGvEf8qhOCJwzC UiVueEM5x6nMqvWK6JLngSHi11HdNjD8rS7P9YFnWczDI5xZCiUM9ADDh1BeoM8hgWkX npjhO1DPncPj4dS76lDD3XD+9jhimJz4ylm8bKGISwM69fl8fmvBeYd7QHkyfkVNB9+L tUO267/J9Alg+Aoqk2+nCD3BpfSpqhvpf+uIJ0hpcBByBjgGc2snRfLTgjlEjgtlT+3r WCvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690591756; x=1691196556; 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=YW+vdrPDM+RdVg71eRxchKCcF3Il7t8mgNv0e+r+q2g=; b=a+BGM5EZQVMXt++q6z6HT+7H9FmanYni4cD9cb2dUevowJSWKs4uyEf8Knz/6TLTlk scjh1i2INeRHMN8xb4R4RwaQl0JAWgGZeN39AVbrf/dEpKsB2mqZp7JFGN45SmeAk9h5 i/7Tp+cdAB7gIwJxMl/JccNXqeU1M/52YRzss2N22ByhY5SZhhqVITiC7QsCGmd3rskp dwgA20BF/ahC3YHluhgxTSbF3DgCaa3abKwxu1UmfITwVpLSMvpjfTcs+nvdr2aKjH4X ccq2xVEprl3qo4ox8A1emyosFel4G6anO8YMXvwR2Gm+xoBATBSlgdIN4q6QogFHuuSA oC+Q== X-Gm-Message-State: ABy/qLarg7LZh7opAKsBmyLUE2ky19r9mSlHrxiieJkgJHMdj2HsWElK Y/ESDAtt8J5XOLNhovTOQjU9Aw== X-Google-Smtp-Source: APBJJlHxkNkwO/iPuYTiXx1h0xuPIgYhC0FuY/A0rwJ8a+n7wJCY6wfeH1lslHO85cVzE3F+Zwgqog== X-Received: by 2002:a19:915c:0:b0:4f8:711b:18b0 with SMTP id y28-20020a19915c000000b004f8711b18b0mr2325597lfj.3.1690591756020; Fri, 28 Jul 2023 17:49:16 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id a24-20020a19f818000000b004fe20d1b288sm500702lff.159.2023.07.28.17.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 17:49:15 -0700 (PDT) From: Dmitry Baryshkov To: David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Andy Gross , Bjorn Andersson , Konrad Dybcio , Simon Ser , Janne Grunau Date: Sat, 29 Jul 2023 03:49:11 +0300 Message-Id: <20230729004913.215872-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230729004913.215872-1-dmitry.baryshkov@linaro.org> References: <20230729004913.215872-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/4] drm/bridge-connector: handle subconnector types X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Leo Li , dri-devel@lists.freedesktop.org, "Pan, Xinhui" , Rodrigo Siqueira , linux-kernel@vger.kernel.org, Maxime Ripard , Thomas Zimmermann , Rodrigo Vivi , Alex Deucher , amd-gfx@lists.freedesktop.org, Harry Wentland , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" If the created connector type supports subconnector type property, create and attach corresponding it. The default subtype value is 0, which maps to the DRM_MODE_SUBCONNECTOR_Unknown type. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_bridge_connector.c | 33 +++++++++++++++++++++++++- include/drm/drm_bridge.h | 4 ++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/drm_bridge_connector.c index 07b5930b1282..a7b92f0d2430 100644 --- a/drivers/gpu/drm/drm_bridge_connector.c +++ b/drivers/gpu/drm/drm_bridge_connector.c @@ -329,7 +329,9 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm, struct drm_connector *connector; struct i2c_adapter *ddc = NULL; struct drm_bridge *bridge, *panel_bridge = NULL; + enum drm_mode_subconnector subconnector; int connector_type; + int ret; bridge_connector = kzalloc(sizeof(*bridge_connector), GFP_KERNEL); if (!bridge_connector) @@ -365,8 +367,10 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm, if (bridge->ops & DRM_BRIDGE_OP_MODES) bridge_connector->bridge_modes = bridge; - if (!drm_bridge_get_next_bridge(bridge)) + if (!drm_bridge_get_next_bridge(bridge)) { connector_type = bridge->type; + subconnector = bridge->subtype; + } #ifdef CONFIG_OF if (!drm_bridge_get_next_bridge(bridge) && @@ -399,6 +403,33 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm, if (panel_bridge) drm_panel_bridge_set_orientation(connector, panel_bridge); + if (connector_type == DRM_MODE_CONNECTOR_DisplayPort) { + drm_connector_attach_dp_subconnector_property(connector, subconnector); + } else if (connector_type == DRM_MODE_CONNECTOR_DVII) { + ret = drm_mode_create_dvi_i_properties(drm); + if (ret) + return ERR_PTR(ret); + + drm_object_attach_property(&connector->base, + drm->mode_config.dvi_i_subconnector_property, + subconnector); + } else if (connector_type == DRM_MODE_CONNECTOR_TV) { + ret = drm_mode_create_tv_properties(drm, + BIT(DRM_MODE_TV_MODE_NTSC) | + BIT(DRM_MODE_TV_MODE_NTSC_443) | + BIT(DRM_MODE_TV_MODE_NTSC_J) | + BIT(DRM_MODE_TV_MODE_PAL) | + BIT(DRM_MODE_TV_MODE_PAL_M) | + BIT(DRM_MODE_TV_MODE_PAL_N) | + BIT(DRM_MODE_TV_MODE_SECAM)); + if (ret) + return ERR_PTR(ret); + + drm_object_attach_property(&connector->base, + drm->mode_config.tv_subconnector_property, + subconnector); + } + return connector; } EXPORT_SYMBOL_GPL(drm_bridge_connector_init); diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index bf964cdfb330..68b14ac5ac0d 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -739,6 +739,10 @@ struct drm_bridge { * identifies the type of connected display. */ int type; + /** + * @subtype: the subtype of the connector for the DP/TV/DVI-I cases. + */ + enum drm_mode_subconnector subtype; /** * @interlace_allowed: Indicate that the bridge can handle interlaced * modes. From patchwork Sat Jul 29 00:49:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13332863 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5B8C0EB64DD for ; Sat, 29 Jul 2023 00:49:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 134C610E7BA; Sat, 29 Jul 2023 00:49:23 +0000 (UTC) Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8406310E7B4 for ; Sat, 29 Jul 2023 00:49:18 +0000 (UTC) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2b9b6e943ebso44679251fa.1 for ; Fri, 28 Jul 2023 17:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690591757; x=1691196557; 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=DeTSuwZPlptjGhIuO9GsGe/aAqJgvkK628OoK+PRdAE=; b=VsttY5+SOr9fF9DKFAkD1fpnsZIU2pLzIzH48JAnNTF5WLWlpLyduf34wSQbvaNWAb q0T98HLRjion0v+Y7GwNdbH2nO50r6azAiH0r5Frq1ZaCCH8lItorpS6m2+vQR62eH9A yCcuwR3l9OiBfirFtuZ7x38cXj0lPnJHQNKLKigfGi84TTJgUD4g3GhZP3EK0oE51Ey5 dYiVwpdI8VzxFLpdaBvu+EZApctr+dAKbxBXZzNoF5/W7MeqLK177oiDz4ESd7tEX8gi 2Otd6PUFptJhMXbFJrehHaYdH0YZ4JJ8iqOxiPYAmbgnXuoHCYlwShe9sd7G0vTI7HkK PLWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690591757; x=1691196557; 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=DeTSuwZPlptjGhIuO9GsGe/aAqJgvkK628OoK+PRdAE=; b=MH8IKpVT4o8Gm2HcOylLnBLs9e4Af6Ee6HeGBraJTXuw6NEbWY1PcLHYZyrJETm8IB h1IDEQbRHdeDKtmt5I2kuw4HGytCnI0M5L1Nr5rlqAI4q2n0H9DnEz28UHugWu9loKC2 G0MVTDAzu184lK0dtVEGeo0yk3CSMLB5JzzkIRREwoRxTw8/0BPhSu+vwdOglx5LKaeJ oFXG2zORxCWCM9WBBMwuaweIi7BwOL6pIm8sztnXPBe/iW1fNO/N/a1UI/2jPuiTuLhh 5JJqNGx+6Q+c1KPD02nHAU8Qnho7NDn7GDKu0Z7eeThzxC+Ca5ZXc57wxH5y64v/rdFS Rd7A== X-Gm-Message-State: ABy/qLZiX7iyH50cwszQRuY6VtRgVp13k+7pNmrIPFaix9H+hh3ldDlk ZRc4KYiO4wtOj36k8CAlBj9dgQ== X-Google-Smtp-Source: APBJJlGnkBGsncWn163VGZiB6FNproqXBRlBWlgFqMTpY6qxbaEinFwvcwwZIU85m+UD+VdKOfxU6g== X-Received: by 2002:a05:6512:2825:b0:4f8:6d9d:abe0 with SMTP id cf37-20020a056512282500b004f86d9dabe0mr1946529lfb.33.1690591756849; Fri, 28 Jul 2023 17:49:16 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id a24-20020a19f818000000b004fe20d1b288sm500702lff.159.2023.07.28.17.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 17:49:16 -0700 (PDT) From: Dmitry Baryshkov To: David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Andy Gross , Bjorn Andersson , Konrad Dybcio , Simon Ser , Janne Grunau Date: Sat, 29 Jul 2023 03:49:12 +0300 Message-Id: <20230729004913.215872-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230729004913.215872-1-dmitry.baryshkov@linaro.org> References: <20230729004913.215872-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 3/4] drm/uapi: document the USB subconnector type X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Leo Li , dri-devel@lists.freedesktop.org, "Pan, Xinhui" , Rodrigo Siqueira , linux-kernel@vger.kernel.org, Maxime Ripard , Thomas Zimmermann , Rodrigo Vivi , Alex Deucher , amd-gfx@lists.freedesktop.org, Harry Wentland , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To properly define the USB-C DP altmode connectors, add the USB subconnector type. Suggested-by: Simon Ser Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_connector.c | 1 + include/uapi/drm/drm_mode.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index a6066e4a5e9a..9e96b038f5d0 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -1050,6 +1050,7 @@ static const struct drm_prop_enum_list drm_dp_subconnector_enum_list[] = { { DRM_MODE_SUBCONNECTOR_DisplayPort, "DP" }, /* DP */ { DRM_MODE_SUBCONNECTOR_Wireless, "Wireless" }, /* DP */ { DRM_MODE_SUBCONNECTOR_Native, "Native" }, /* DP */ + { DRM_MODE_SUBCONNECTOR_USB, "USB" }, /* DP */ }; DRM_ENUM_NAME_FN(drm_get_dp_subconnector_name, diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 92d96a2b6763..0f74918b011c 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -398,6 +398,7 @@ enum drm_mode_subconnector { DRM_MODE_SUBCONNECTOR_HDMIA = 11, /* DP */ DRM_MODE_SUBCONNECTOR_Native = 15, /* DP */ DRM_MODE_SUBCONNECTOR_Wireless = 18, /* DP */ + DRM_MODE_SUBCONNECTOR_USB = 20, /* DP */ }; #define DRM_MODE_CONNECTOR_Unknown 0 From patchwork Sat Jul 29 00:49:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13332864 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8ABDAC001DE for ; Sat, 29 Jul 2023 00:49:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 88FE110E7B8; Sat, 29 Jul 2023 00:49:23 +0000 (UTC) Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9AA3E10E7B7 for ; Sat, 29 Jul 2023 00:49:19 +0000 (UTC) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4fe07f0636bso4643305e87.1 for ; Fri, 28 Jul 2023 17:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690591758; x=1691196558; 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=Z4eWv/RBKDrUWJz/NgxgnDtpmPraqNg6YmnPUdo6m2g=; b=N3mjaft3MQV1yRXyfPi2iqaPLWvhVHh4gqB42zE/W1dUgVEnfElR9yNSOnZbcLoE7Z 3Wqv8SHYL5qqtavRCDfrJLP12G4A++nHyh2t4tidt4i/Cub5ra/SxzItim7vO+fipwL9 VAqHEdlWQGd/rrzEj3jmyQNMJ/1UCGP+pja+sYoWicwVjaiOG9KXv1lWan8R6To0qbad ylVg1UlCZzLSYYzYMHYkiiGi90iOqcLgzpI2MXJmbbJUBWSp+DHxx2P/67aoVYo72dos wR70cBJD7SQVY6+6IHRVLM5PvYfemKGNxQjCXRqerEowaQGBpT0KLOCfMD97UwkOF4/R 93mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690591758; x=1691196558; 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=Z4eWv/RBKDrUWJz/NgxgnDtpmPraqNg6YmnPUdo6m2g=; b=f/VBBS4ut6RBx6ylsC8mL292CvGpAX3mtUSRc7L47F1HWgYVOXfh26XNxB2JDbAKMu VVtrFXn8fnYbdpydIa5o4l5TYRdFmvhqqX5QX6S+S1LRLrSlbAzG892bYIcjPhqiaW1V VzjKIbU3y/c61FQyaj/oBvt6KsWsVh1E9L9JVy6YIkAKUevN4rJ30G8vJTZT/J4q+7zA +fiM37a7erwfADeFJjL7IhXJ99iFOY3WSZeJYTYVnDDuMxnWSsDgUBc+UtAtg01g+IqY yzKXtWyuFwxzA2X6QLn3Jut5iC4osihx/G7Yd6MS6sLyj//yf4wT0yHnhBBXiQbotq5Z tACA== X-Gm-Message-State: ABy/qLZDTTgOPQiPL4cJClniyREWuBD1KYlgdOHWiOhnPTX/jg7RaWlU Tiyj0+PGwIpOk+1FVxfnkTFjmg== X-Google-Smtp-Source: APBJJlH3hanHEvBgr++jOJubmsB65dIQxl3i8dLk9WO0Yl8D2xONZbjmFiJz42HIJIcei2b4Pyrowg== X-Received: by 2002:a19:ca15:0:b0:4fe:ee7:a32a with SMTP id a21-20020a19ca15000000b004fe0ee7a32amr2516420lfg.16.1690591757890; Fri, 28 Jul 2023 17:49:17 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id a24-20020a19f818000000b004fe20d1b288sm500702lff.159.2023.07.28.17.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 17:49:17 -0700 (PDT) From: Dmitry Baryshkov To: David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Andy Gross , Bjorn Andersson , Konrad Dybcio , Simon Ser , Janne Grunau Date: Sat, 29 Jul 2023 03:49:13 +0300 Message-Id: <20230729004913.215872-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230729004913.215872-1-dmitry.baryshkov@linaro.org> References: <20230729004913.215872-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 4/4] soc: qcom: pmic_glink: properly describe the DP connector X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Leo Li , dri-devel@lists.freedesktop.org, "Pan, Xinhui" , Rodrigo Siqueira , linux-kernel@vger.kernel.org, Maxime Ripard , Thomas Zimmermann , Rodrigo Vivi , Alex Deucher , amd-gfx@lists.freedesktop.org, Harry Wentland , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" During the discussion of the DP connectors, it was suggested that USB-C DisplayPort connectors should have DRM_MODE_CONNECTOR_DisplayPort connector type. This follows the example provided by other drivers (AMDGPU, Intel). To distinguish them from native DP ports, they should have the freshly defined USB as a subconnector type. Suggested-by: Simon Ser Cc: Neil Armstrong Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/pmic_glink_altmode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/pmic_glink_altmode.c b/drivers/soc/qcom/pmic_glink_altmode.c index 1dedacc52aea..9094944c6cc0 100644 --- a/drivers/soc/qcom/pmic_glink_altmode.c +++ b/drivers/soc/qcom/pmic_glink_altmode.c @@ -417,7 +417,8 @@ static int pmic_glink_altmode_probe(struct auxiliary_device *adev, alt_port->bridge.funcs = &pmic_glink_altmode_bridge_funcs; alt_port->bridge.of_node = to_of_node(fwnode); alt_port->bridge.ops = DRM_BRIDGE_OP_HPD; - alt_port->bridge.type = DRM_MODE_CONNECTOR_USB; + alt_port->bridge.type = DRM_MODE_CONNECTOR_DisplayPort; + alt_port->bridge.subtype = DRM_MODE_SUBCONNECTOR_USB; ret = devm_drm_bridge_add(dev, &alt_port->bridge); if (ret)