From patchwork Wed Oct 25 09:23:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13435788 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 8D166C0032E for ; Wed, 25 Oct 2023 09:27:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231794AbjJYJ1S (ORCPT ); Wed, 25 Oct 2023 05:27:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233435AbjJYJ1R (ORCPT ); Wed, 25 Oct 2023 05:27:17 -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 5ED81DE for ; Wed, 25 Oct 2023 02:27:15 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-507d1cc0538so7848171e87.2 for ; Wed, 25 Oct 2023 02:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698226033; x=1698830833; 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=QtUxpS9LHBTz7P4AH4M/bkhlO9UpvXLDxTXKsW01TMA=; b=LsVeriTE1ON+evhd06QXYdRyxhdXLQirh7bMVMtM/X9KPTO5Wh2M522myMmVoFK9EU wxcYwz0FfbJ+HxFZuILxZBvZ8+G71NaERmp2H/MqdUTBxE3y0HFcQCUmYhM8XhlO3IaQ U7uQWlqwcpvYOYw4aHoT5zB40nXje4QMgCbi09221rtUYeGYVHD7B5mOzcY+QT+6LVS8 6TuhTpuGIpHDSPp3bvhIom+jhHSxnpYCjcAzjVSlwz3jM/LUgRWXLlst7P3mHiRi1i1b HPILDilNeG/O7Mjch/cjtleMK998a4IpKU3x1A1dk0lc5raIzL5I6D81VKtMkDGE++at c6LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698226033; x=1698830833; 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=QtUxpS9LHBTz7P4AH4M/bkhlO9UpvXLDxTXKsW01TMA=; b=sqdPtWGNAHekFIs783b8Z4jZUUVvU6TRbD1vTvN3T+eN/0jtm38Ht3kA6xzAA0IE9p JBVWaEBHl4FyG63LwcrUXHYstwMy3JZ4RclUFwPwSS+Xln4BRT2Ajsm2p9L0kz7UsccI 20/qlNmJdeFRXfwoZ259WQcTktZXnXX+8X42sr3UuHRkKbD1ATbA2bwwdKPPRki1gGWV Wbs2yLNy7mT5w+nI9tjudayJAQEVhOO6W4KMZsxHqCQmyMPkea2hL1+LQDfARBS0bN5/ jYBpFeG81YiiEu3GlLcPC/zn6bMxuYWNFGN/D2K63qwl3ILjk+FpmUWytAvH5eo4h2oo nt1Q== X-Gm-Message-State: AOJu0YwRwELn49s4qKo2mrh2mgkl9ogOyjATr4X8N7xMSruguFF8VQq3 rEQS8oh14SnuTw5c1BEcheaeMg== X-Google-Smtp-Source: AGHT+IF4JyODsy/R7n9MpWLVJ6X92eTxeIIQaPwvTPjpfhaAGvY2yEMuYrSSE8O5MrNacMcr1we5Ww== X-Received: by 2002:a05:6512:3b87:b0:507:974d:80f9 with SMTP id g7-20020a0565123b8700b00507974d80f9mr12978498lfv.34.1698226033609; Wed, 25 Oct 2023 02:27:13 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id eq25-20020a056512489900b005079fff83d2sm2470377lfb.3.2023.10.25.02.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 02:27:12 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Abel Vesa Subject: [PATCH v2 1/2] drm/msm/dp: don't touch DP subconnector property in eDP case Date: Wed, 25 Oct 2023 12:23:09 +0300 Message-ID: <20231025092711.851168-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231025092711.851168-1-dmitry.baryshkov@linaro.org> References: <20231025092711.851168-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Abel Vesa In case of the eDP connection there is no subconnetor and as such no subconnector property. Put drm_dp_set_subconnector_property() calls under the !is_edp condition. Fixes: bfcc3d8f94f4 ("drm/msm/dp: support setting the DP subconnector type") Signed-off-by: Abel Vesa Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Jessica Zhang # SC7280 Reviewed-by: Johan Hovold Tested-by: Johan Hovold --- drivers/gpu/drm/msm/dp/dp_display.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index e329e03e068d..1b88fb52726f 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -365,9 +365,11 @@ static int dp_display_send_hpd_notification(struct dp_display_private *dp, /* reset video pattern flag on disconnect */ if (!hpd) { dp->panel->video_test = false; - drm_dp_set_subconnector_property(dp->dp_display.connector, - connector_status_disconnected, - dp->panel->dpcd, dp->panel->downstream_ports); + if (!dp->dp_display.is_edp) + drm_dp_set_subconnector_property(dp->dp_display.connector, + connector_status_disconnected, + dp->panel->dpcd, + dp->panel->downstream_ports); } dp->dp_display.is_connected = hpd; @@ -396,8 +398,11 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp) dp_link_process_request(dp->link); - drm_dp_set_subconnector_property(dp->dp_display.connector, connector_status_connected, - dp->panel->dpcd, dp->panel->downstream_ports); + if (!dp->dp_display.is_edp) + drm_dp_set_subconnector_property(dp->dp_display.connector, + connector_status_connected, + dp->panel->dpcd, + dp->panel->downstream_ports); edid = dp->panel->edid; From patchwork Wed Oct 25 09:23: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: 13435789 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 E49C5C25B6E for ; Wed, 25 Oct 2023 09:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233435AbjJYJ1T (ORCPT ); Wed, 25 Oct 2023 05:27:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233761AbjJYJ1S (ORCPT ); Wed, 25 Oct 2023 05:27:18 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CEC38F for ; Wed, 25 Oct 2023 02:27:16 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-507adc3381cso7977574e87.3 for ; Wed, 25 Oct 2023 02:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698226034; x=1698830834; 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=UkpbSuCxl41j50LHtJ6p/pRvRPPyQRBDrCJQ5yXQI1A=; b=LqndCJQvMm7P9d+ObpoWcRemzY8ZNC3jshOo3wsYbjgBknhI3m6HH2fKznFZ/DvtdO S7HN0jm5sC5Qul6fLK6TXuKHzXhJp/XaVqhvyXH/FwZp3NVD5tvoL3x15rMa1hFefKF5 Fmv9eUPjqUGWPjMTj7O6OvkXCwzp/p42IYhkSKuDqrIGYkB/2gflGsHMY1qVOxzzDygu zNbWaMf/h4YepKr3/LlM60tkzYqEugQu4lHc/mVTLz4YHEYtMDzlGAUUSezYMfvKaajd W1hCGAGucYNzBPLgzR4j5mbi52zmEIXWAe6hSIEJknYX8S6Cs1lYhruSVsRU46/ujfrO gIyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698226034; x=1698830834; 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=UkpbSuCxl41j50LHtJ6p/pRvRPPyQRBDrCJQ5yXQI1A=; b=HvWoRlKjjgZaebd0FLORGuQAqA7cYGllKZWVB/l+m35UkAJGaE/ZdKKvhz5LGZFaBc L4+6bvUDgbY7mNwNVmUVs6bzzX/mdUxDNazZVNduySLmDar78FetDwUJwVmXQ2RMkl3o ugWHDSoSfccIyv36W/uMQhFKHfuC7hwFNLD+nCnCqN0+Y65pSy6UYpPUu0o65ae7LAIT GJonsMREyX3UwGIpLogvNDTKazH6RgxFVQhQuQGmmq+hXMAnnW55CfqftciwxMeikBor klJymwjsbPFXwER+vsVT+Al0QDU/Upe+7IjWfs8houXX5aOEFNMAJd46+DL9rIHkL6Am u/Wg== X-Gm-Message-State: AOJu0YzBT9m2yImUSSmgrAbOWn2ptJzfcc2UIsumQnS6lZRoYQ71NB+y u/RiwLDIqDpMSRNlGWBSLwD1Fg== X-Google-Smtp-Source: AGHT+IGkqKhZhFNNxxXtCNi2yE8kJvwqnPOVlHtkHTCLzLASuPo6tPElKpo0tbmLTxYuBhKJa0juGQ== X-Received: by 2002:a05:6512:214d:b0:507:99fe:3237 with SMTP id s13-20020a056512214d00b0050799fe3237mr9576663lfr.41.1698226034586; Wed, 25 Oct 2023 02:27:14 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id eq25-20020a056512489900b005079fff83d2sm2470377lfb.3.2023.10.25.02.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 02:27:14 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Abel Vesa Subject: [PATCH v2 2/2] drm/msm/dp: attach the DP subconnector property Date: Wed, 25 Oct 2023 12:23:10 +0300 Message-ID: <20231025092711.851168-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231025092711.851168-1-dmitry.baryshkov@linaro.org> References: <20231025092711.851168-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org While developing and testing the commit bfcc3d8f94f4 ("drm/msm/dp: support setting the DP subconnector type") I had the patch [1] in my tree. I haven't noticed that it was a dependency for the commit in question. Mea culpa. Since the patch has not landed yet (and even was not reviewed) and since one of the bridges erroneously uses USB connector type instead of DP, attach the property directly from the MSM DP driver. This fixes the following oops on DP HPD event: drm_object_property_set_value (drivers/gpu/drm/drm_mode_object.c:288) dp_display_process_hpd_high (drivers/gpu/drm/msm/dp/dp_display.c:402) dp_hpd_plug_handle.isra.0 (drivers/gpu/drm/msm/dp/dp_display.c:604) hpd_event_thread (drivers/gpu/drm/msm/dp/dp_display.c:1110) kthread (kernel/kthread.c:388) ret_from_fork (arch/arm64/kernel/entry.S:858) [1] https://patchwork.freedesktop.org/patch/555530/ Fixes: bfcc3d8f94f4 ("drm/msm/dp: support setting the DP subconnector type") Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Tested-by: Jessica Zhang # SC7280 Reviewed-by: Johan Hovold Tested-by: Johan Hovold --- drivers/gpu/drm/msm/dp/dp_drm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/msm/dp/dp_drm.c b/drivers/gpu/drm/msm/dp/dp_drm.c index 40e7344180e3..e3bdd7dd4cdc 100644 --- a/drivers/gpu/drm/msm/dp/dp_drm.c +++ b/drivers/gpu/drm/msm/dp/dp_drm.c @@ -345,6 +345,9 @@ struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct dr if (IS_ERR(connector)) return connector; + if (!dp_display->is_edp) + drm_connector_attach_dp_subconnector_property(connector); + drm_connector_attach_encoder(connector, encoder); return connector;