From patchwork Wed Aug 10 03:50:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 596541 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 3A8C2C19F2A for ; Wed, 10 Aug 2022 03:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230284AbiHJDrk (ORCPT ); Tue, 9 Aug 2022 23:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230261AbiHJDri (ORCPT ); Tue, 9 Aug 2022 23:47:38 -0400 Received: from mail-oa1-x30.google.com (mail-oa1-x30.google.com [IPv6:2001:4860:4864:20::30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B25B77FE6D for ; Tue, 9 Aug 2022 20:47:37 -0700 (PDT) Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-10d845dcf92so16357464fac.12 for ; Tue, 09 Aug 2022 20:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=rxO1yJUE3IlkLApY46vIfgmzfPEQ54X/NIOEVG3JrrQ=; b=wZnC4appiqNUEiQGmLWSwEltHJUt+9QDq46haOzM+ed0GT2SVOeWxlwCGYGOAAr9Ly u4WzjVgE6vTJI3VlWMbdo8iq5hE8Tsu4wUoWaO3m0PoSJoQ1EfYGIdUbtZIY02vB4t29 1z9Gs1IwzuzpKJ9jGqIXWKqCzFPLzu+wC1Nz+fdIAytGCkyyjWsQRZeBib7Ra95+sFac eyhw9vzbJmqEqy2hZ7XtmYSKxDvOcVlAVFs04yDetvqqnsX3YIJ1a63zAhb6/SzYah0F GexPGZ/Am0SsnZQ/OQTN/62QJgzI9BJ+KEtwl/pNKxM8cjzOY5pCXvVOOm3ExIjIhjL/ FBpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=rxO1yJUE3IlkLApY46vIfgmzfPEQ54X/NIOEVG3JrrQ=; b=XPBzIHs4Gx9NmAjh2iuCl8q7D+dmvjJBmFGGpRkgqD3PWM1LQRxesKtpkymZwriyX2 JXZdUbNbfQCta3JkBLEHAyy/CGAbqtuyMbtADtzE+n3jk7eiPcQn8tTFPwgPMYGiK7cK s7BXcTUFmKZsODifAiTED4rR42kBIqFqFUDafnBQie55QHmGbdeZEh6+7K74GQXSADN6 DC5BNyE9YeexGujr7OtOe1SImvNoKL5GJbVdhEc6CSIC5ydEfxtsPhgC1otMkHUPFBC2 PUXkbC5GyhL8gbeWO3QahE647Xglmqewr985QXmHG/2btrgt6Qy28yekgFsXms1XUDJm nPfw== X-Gm-Message-State: ACgBeo2j2wWPh5Qv3kwLqNnMATnJM5xYrd4taJxJOLQszrSyCGmWUmTc 61P6xU9tqvy5HX5q9WAr5RJlOg== X-Google-Smtp-Source: AA6agR5Fu2RRDv1UHVCEFfelP9y7yZj87HztXn4G3e065ctAs40MSp5H03fK49MziNwWhwN8ZkUhCg== X-Received: by 2002:a05:6870:89a9:b0:101:d81d:e970 with SMTP id f41-20020a05687089a900b00101d81de970mr651827oaq.43.1660103257025; Tue, 09 Aug 2022 20:47:37 -0700 (PDT) Received: from ripper.. (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id n2-20020a4ae742000000b00444f26822e5sm454337oov.10.2022.08.09.20.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 20:47:36 -0700 (PDT) From: Bjorn Andersson To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Rob Herring , Krzysztof Kozlowski , Stephen Boyd , Kuogee Hsieh , Sankeerth Billakanti Cc: Sean Paul , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] dt-bindings: msm/dp: Add SDM845 and SC8280XP compatibles Date: Tue, 9 Aug 2022 20:50:07 -0700 Message-Id: <20220810035013.3582848-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220810035013.3582848-1-bjorn.andersson@linaro.org> References: <20220810035013.3582848-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add compatibles for the DisplayPort and Embedded DisplayPort blocks in Qualcomm SDM845 and SC8280XP platforms. Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/display/msm/dp-controller.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml index 94bc6e1b6451..90f9302d1731 100644 --- a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml +++ b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml @@ -16,11 +16,14 @@ description: | properties: compatible: enum: + - qcom,sdm845-dp - qcom,sc7180-dp - qcom,sc7280-dp - qcom,sc7280-edp - qcom,sc8180x-dp - qcom,sc8180x-edp + - qcom,sc8280xp-dp + - qcom,sc8280xp-edp - qcom,sm8350-dp reg: From patchwork Wed Aug 10 03:50:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 596540 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 86DB7C25B0D for ; Wed, 10 Aug 2022 03:47:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230345AbiHJDrm (ORCPT ); Tue, 9 Aug 2022 23:47:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230311AbiHJDrl (ORCPT ); Tue, 9 Aug 2022 23:47:41 -0400 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A55A8048F for ; Tue, 9 Aug 2022 20:47:40 -0700 (PDT) Received: by mail-oi1-x236.google.com with SMTP id j5so10589928oih.6 for ; Tue, 09 Aug 2022 20:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=YFwrR3MMUAqfzQikQP3XEeQMTFs7soeKt3WpRi+SfIg=; b=WmldLYpvZ+KC3FxiJhV1pJ0FaGe1oyA7Uo9MV1NFHmpATqjeF7yJpXHp1fqJhZMRO8 0HrRmDEEtuQUCq4pICzWi/8B+i7V5UE5h/QPblmoo4OCV6+r/NoRgUCeimMbCHB1A4fo oaNxyiuAcim6ysscbmmZgoWgETkkvJ5TBpsRW7VfB/pdMM5DlTIuG/EmsxhWloX02Gr4 KvMFGzjc4bFDieQ3Yv4CGec871EouRhoA+tek4MNiQxGVO8YUhhsiNJy74MFxDcxLJQV rOh4qzyW2IIRKMIBZ1WJ+vpA51hyox9UTWU6hTSO14Q5wY1QNOxqf3hmVdYi1yGXdS7U qlmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=YFwrR3MMUAqfzQikQP3XEeQMTFs7soeKt3WpRi+SfIg=; b=POl3hkS+L60bNvl3KEgNLcDsOQv4s46Ow3AlnSFEbp2SL2zXKn6Yxo+o3cWbtLPOz8 ja0aCYrE97gQMnDdRQWUlih1L8mD5/GHKdVbfvV62IiGg2iqw3ShYGeJhZdosbZ9jCSU 6XilZ3fY6AXnEhrwb/dkWDYCB8HjW0NEWbAFiquT5knLo2qj6J+DyS3wnumtJeRCrRZD m4eqkmO3Hph1ZgcabjXJZa7GkQlKXWzIsDCwNL6bLga5/BtooQKpg/kJCofxS7fCtXbk 5iRDFyYRVNw6Wh+idJ70ubZWWqsyNkPTTS/l+leLIJkecjoWhKAxCREFk94VQAY6XfRG Rbxg== X-Gm-Message-State: ACgBeo3p0KeIICyVF6It+6TTilCxsjlXAr8+frrQMdqdYi/xtbbmhiWf 1a8VfkHFx9VUf3p8blSarWzKaA== X-Google-Smtp-Source: AA6agR65C9l72emAawI4jltXzXisVixzgqgpZwuhHwyvg8N9cV+oMnVY90M78bAL5MttFpFWh4zuFg== X-Received: by 2002:a05:6808:148f:b0:33a:d2ea:ace9 with SMTP id e15-20020a056808148f00b0033ad2eaace9mr661457oiw.186.1660103259426; Tue, 09 Aug 2022 20:47:39 -0700 (PDT) Received: from ripper.. (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id n2-20020a4ae742000000b00444f26822e5sm454337oov.10.2022.08.09.20.47.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 20:47:38 -0700 (PDT) From: Bjorn Andersson To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Stephen Boyd , Kuogee Hsieh , Sankeerth Billakanti Cc: Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] drm/msm/dp: Add DP and EDP compatibles for SC8280XP Date: Tue, 9 Aug 2022 20:50:09 -0700 Message-Id: <20220810035013.3582848-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220810035013.3582848-1-bjorn.andersson@linaro.org> References: <20220810035013.3582848-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The SC8280XP platform has four DisplayPort controllers, per MDSS instance, all with widebus support. The first two are defined to be DisplayPort only, while the latter pair (of each instance) can be either DisplayPort or Embedded DisplayPort. The two sets are tied to the possible compatibels. Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/msm/msm_drv.h | 1 + 2 files changed, 23 insertions(+) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 2d9bbc335786..e4a83c2cd972 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -145,6 +145,26 @@ static const struct msm_dp_desc sc8180x_dp_descs[] = { {} }; +static const struct msm_dp_desc sc8280xp_dp_descs[] = { + { .io_start = 0x0ae90000, .id = MSM_DP_CONTROLLER_0, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, + { .io_start = 0x0ae98000, .id = MSM_DP_CONTROLLER_1, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, + { .io_start = 0x0ae9a000, .id = MSM_DP_CONTROLLER_2, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, + { .io_start = 0x0aea0000, .id = MSM_DP_CONTROLLER_3, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, + { .io_start = 0x22090000, .id = MSM_DP_CONTROLLER_0, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, + { .io_start = 0x22098000, .id = MSM_DP_CONTROLLER_1, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, + { .io_start = 0x2209a000, .id = MSM_DP_CONTROLLER_2, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, + { .io_start = 0x220a0000, .id = MSM_DP_CONTROLLER_3, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, + {} +}; + +static const struct msm_dp_desc sc8280xp_edp_descs[] = { + { .io_start = 0x0ae9a000, .id = MSM_DP_CONTROLLER_2, .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, + { .io_start = 0x0aea0000, .id = MSM_DP_CONTROLLER_3, .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, + { .io_start = 0x2209a000, .id = MSM_DP_CONTROLLER_2, .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, + { .io_start = 0x220a0000, .id = MSM_DP_CONTROLLER_3, .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, + {} +}; + static const struct msm_dp_desc sm8350_dp_descs[] = { { .io_start = 0x0ae90000, .id = MSM_DP_CONTROLLER_0, .connector_type = DRM_MODE_CONNECTOR_DisplayPort }, {} @@ -156,6 +176,8 @@ static const struct of_device_id dp_dt_match[] = { { .compatible = "qcom,sc7280-edp", .data = &sc7280_dp_descs }, { .compatible = "qcom,sc8180x-dp", .data = &sc8180x_dp_descs }, { .compatible = "qcom,sc8180x-edp", .data = &sc8180x_dp_descs }, + { .compatible = "qcom,sc8280xp-dp", .data = &sc8280xp_dp_descs }, + { .compatible = "qcom,sc8280xp-edp", .data = &sc8280xp_edp_descs }, { .compatible = "qcom,sm8350-dp", .data = &sm8350_dp_descs }, {} }; diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index b3689a2d27d7..5978c6e26a1e 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -55,6 +55,7 @@ enum msm_dp_controller { MSM_DP_CONTROLLER_0, MSM_DP_CONTROLLER_1, MSM_DP_CONTROLLER_2, + MSM_DP_CONTROLLER_3, MSM_DP_CONTROLLER_COUNT, }; From patchwork Wed Aug 10 03:50:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 596539 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 46C55C19F2A for ; Wed, 10 Aug 2022 03:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230377AbiHJDr6 (ORCPT ); Tue, 9 Aug 2022 23:47:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230316AbiHJDrm (ORCPT ); Tue, 9 Aug 2022 23:47:42 -0400 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4564D804A8 for ; Tue, 9 Aug 2022 20:47:41 -0700 (PDT) Received: by mail-ot1-x336.google.com with SMTP id y10-20020a9d634a000000b006167f7ce0c5so9844973otk.0 for ; Tue, 09 Aug 2022 20:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=5D9+PsfZh11O34sosMXObQ3c3IZI2i4ZPZyxVLOQBa4=; b=T/g1XNcB5lKxH1br0VWmcAt4q0w4G5U2/SXerRfzVUQdnbwacvd35mjAfU/Bmi068Y +S/+czJWZ81cj1oHWKyNGzr2qBn4vPFMf7BQ2vzEV2vJVl+ZnSU8IZpGTfdY834jpdUL dEOxluqciPcFSTJyWSb+TcTP46ch6it0DnuhmmJigfikNF2mlqq9Zyi2YJlLH/PnqH8k Kb3F8lCkskepTG4Y+BNIgN9IUxch1FYnjSanyRnpKC6xcw7hpflnBIz/RQjphWMvocQ+ arI6zXPRzG/EQLKx4zwmJbN8NCDcjXZzRBtC0l/hZuUJv86DOWQMDP8mtq3Td1wWfqPO DqMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=5D9+PsfZh11O34sosMXObQ3c3IZI2i4ZPZyxVLOQBa4=; b=EQ6wS+bmgRxIMSVDrqHSY9v0dpoQSFA3Pdg0tUOzWedq0pKuFJmqvjk5RmGp3prctY bYoi6NWPLW0QieyrsRtQfaG8Fqe3+15jCxxVj7mrMU14KjqCjE4u59NaEKoPIVe7DCFv npbaF9fNmOJa0H1v1qfF/g1Bn5AZ+hxBv33sTfbHjXgz0ZDsblhk9YQEFEES6zw6sUCI T7UT1X3XuNc0/mRyq8fZVlAIZf3esgUmRunguujaj+xNZ5ILNfaFdkZoXjkTsQnYRKoH STHh2esmujNMHR7vkmLAYU/Yt4jpgHy/ZBhQyF6TR2wa0M1yEvis028qLXeraSsh1aGO CSGg== X-Gm-Message-State: ACgBeo1fZDEljofGOVEpINl5bvEiw4JGEE6D8pIBEnpxD1sMz/WuZKdH 5XdTutPWlu3Vp1pGlLf3ZObOrQ== X-Google-Smtp-Source: AA6agR69SJRWOU/4f5w8UNLQmEzoPDWv9YGDIFuD4FVXTNymk7j9PuepL3ouMkNnYCNx6VtsgGiBtA== X-Received: by 2002:a9d:7a55:0:b0:637:1874:a2cb with SMTP id z21-20020a9d7a55000000b006371874a2cbmr812155otm.318.1660103260506; Tue, 09 Aug 2022 20:47:40 -0700 (PDT) Received: from ripper.. (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id n2-20020a4ae742000000b00444f26822e5sm454337oov.10.2022.08.09.20.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 20:47:40 -0700 (PDT) From: Bjorn Andersson To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Stephen Boyd , Kuogee Hsieh , Sankeerth Billakanti Cc: Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] drm/msm/dp: Add SDM845 DisplayPort instance Date: Tue, 9 Aug 2022 20:50:10 -0700 Message-Id: <20220810035013.3582848-5-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220810035013.3582848-1-bjorn.andersson@linaro.org> References: <20220810035013.3582848-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Qualcomm SDM845 platform has a single DisplayPort controller, with the same design as SC7180, so add support for this by reusing the SC7180 definition. Signed-off-by: Bjorn Andersson --- drivers/gpu/drm/msm/dp/dp_display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index e4a83c2cd972..699f28f2251e 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -178,6 +178,7 @@ static const struct of_device_id dp_dt_match[] = { { .compatible = "qcom,sc8180x-edp", .data = &sc8180x_dp_descs }, { .compatible = "qcom,sc8280xp-dp", .data = &sc8280xp_dp_descs }, { .compatible = "qcom,sc8280xp-edp", .data = &sc8280xp_edp_descs }, + { .compatible = "qcom,sdm845-dp", .data = &sc7180_dp_descs }, { .compatible = "qcom,sm8350-dp", .data = &sm8350_dp_descs }, {} }; From patchwork Wed Aug 10 03:50:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 596538 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 9C71BC28B2B for ; Wed, 10 Aug 2022 03:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230383AbiHJDsC (ORCPT ); Tue, 9 Aug 2022 23:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230387AbiHJDrx (ORCPT ); Tue, 9 Aug 2022 23:47:53 -0400 Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 680EB80504 for ; Tue, 9 Aug 2022 20:47:44 -0700 (PDT) Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-1168e046c85so6602378fac.13 for ; Tue, 09 Aug 2022 20:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=uebmoneVYa9z0k/kynCu9/yCmrGe0dGNvEMVLmT1Zfk=; b=G3KpBWShMzBghOxqZeYhWej84Du0/RWKqUTbuNdk04/toga1JbTPeCJGeyMxIIceeZ ZOclunNeeFP94y86JAAe2/ordFnT4pXKQSepNjubsf2qrYyv+brT324b9n9fE1xSvIhL ODjNGVGX9n+i6nuphZ55kG8tUC0yv27uG+x/3hyPI2O7L51gUr8Fur6CclsrMQ8dhFjl QFzmFsNxAO9ONgc5EJsyLtaugjY4ALiCCqTEE+harD4BtjMh9y9YHZ4qwa6Lacvxt6mb cdeLq9UXayp4spdSc9wnRumr54zVxWWxxh8Nw8YbR4RZfGtuBCxL1RlPW4dzNIdJ9LsB dMMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=uebmoneVYa9z0k/kynCu9/yCmrGe0dGNvEMVLmT1Zfk=; b=nVpVzh2hqG3VlsSsJ14WcYhaJywOIaAXMLekLimODc4AQ7P59JueSXHbCfCiJOxDRq CKjT8Aq8mhAa2mKcZAjKjIxXPycc/YYp5vWCRXUirngf+tg+WddpnGpa1nMyRB+CKuwW Pq8rrPzPgkLxKaXLY/5W3926XaXS6qyifbsuk0AVk/AahBrnflQ5hMa/pec1ixY/9kel hzKe79VB9H34fEnSnFA95hEjJNueEn7BhZkuTgTQF1zCAE/hrmv9HekFdO6Qf2H1Ancv B/j9PffwdmxT/w3mxZhlWf8QXCi5kkEpdKgXlAzaykG/GFg006gbR057uCJezLMP9F2G hNZQ== X-Gm-Message-State: ACgBeo3JT1Ld3h8HBiA7USAwOixHDrD2xkl5otkP0etHVu0n7AEO6X53 K2psKBmeQ3xUNPFzX4HbZ8rYqQ== X-Google-Smtp-Source: AA6agR7SI0AvmwIlMO2J6EANOOTDmTDJ52FbWWKdY/n6F04P8Zi6DLT1LKtfBQIHjML93P3JUBeHKA== X-Received: by 2002:a05:6871:b10:b0:10e:d8aa:53fd with SMTP id fq16-20020a0568710b1000b0010ed8aa53fdmr695371oab.122.1660103263971; Tue, 09 Aug 2022 20:47:43 -0700 (PDT) Received: from ripper.. (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id n2-20020a4ae742000000b00444f26822e5sm454337oov.10.2022.08.09.20.47.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 20:47:43 -0700 (PDT) From: Bjorn Andersson To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Stephen Boyd , Kuogee Hsieh , Sankeerth Billakanti Cc: Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] drm/msm/dp: HPD handling relates to next_bridge Date: Tue, 9 Aug 2022 20:50:13 -0700 Message-Id: <20220810035013.3582848-8-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220810035013.3582848-1-bjorn.andersson@linaro.org> References: <20220810035013.3582848-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The DisplayPort controller's internal HPD interrupt handling is used for cases where the HPD signal is connected to a GPIO which is pinmuxed into the DisplayPort controller. Most of the logic for enabling and disabling the HPD-related interrupts is conditioned on the presence of an EDP panel, but more generically designs that has a downstream drm_bridge (next_bridge) could use this to handle the HPD interrupts, instead of the internal mechanism. So replace the current is_edp-based guards with a check for the presence of next_bridge. Signed-off-by: Bjorn Andersson --- drivers/gpu/drm/msm/dp/dp_display.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index bb4db9acaa4f..3e93918aa276 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -610,7 +610,7 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data) } /* enable HDP irq_hpd/replug interrupt */ - if (!dp->dp_display.is_edp) + if (!dp->dp_display.next_bridge) dp_catalog_hpd_config_intr(dp->catalog, DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, true); @@ -653,7 +653,7 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data) dp->dp_display.connector_type, state); /* disable irq_hpd/replug interrupts */ - if (!dp->dp_display.is_edp) + if (!dp->dp_display.next_bridge) dp_catalog_hpd_config_intr(dp->catalog, DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, false); @@ -682,7 +682,7 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data) } /* disable HPD plug interrupts */ - if (!dp->dp_display.is_edp) + if (!dp->dp_display.next_bridge) dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK, false); /* @@ -701,7 +701,7 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data) dp_display_handle_plugged_change(&dp->dp_display, false); /* enable HDP plug interrupt to prepare for next plugin */ - if (!dp->dp_display.is_edp) + if (!dp->dp_display.next_bridge) dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK, true); drm_dbg_dp(dp->drm_dev, "After, type=%d hpd_state=%d\n", @@ -1086,8 +1086,8 @@ static void dp_display_config_hpd(struct dp_display_private *dp) dp_display_host_init(dp); dp_catalog_ctrl_hpd_config(dp->catalog); - /* Enable plug and unplug interrupts only for external DisplayPort */ - if (!dp->dp_display.is_edp) + /* Enable plug and unplug interrupts only if not handled by next_bridge */ + if (!dp->dp_display.next_bridge) dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK | DP_DP_HPD_UNPLUG_INT_MASK, @@ -1380,8 +1380,7 @@ static int dp_pm_resume(struct device *dev) dp_catalog_ctrl_hpd_config(dp->catalog); - - if (!dp->dp_display.is_edp) + if (!dp->dp_display.next_bridge) dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK | DP_DP_HPD_UNPLUG_INT_MASK,