From patchwork Mon Feb 15 16:15:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 12088819 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57A80C433DB for ; Mon, 15 Feb 2021 16:16:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1EF3764DEE for ; Mon, 15 Feb 2021 16:16:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EF3764DEE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 611EE6E8E1; Mon, 15 Feb 2021 16:16:45 +0000 (UTC) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6ED946E8DE for ; Mon, 15 Feb 2021 16:16:43 +0000 (UTC) Received: by mail-qk1-x72a.google.com with SMTP id h8so6825280qkk.6 for ; Mon, 15 Feb 2021 08:16:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VFjJmq0Au97vKEfgrOVE/VaVkFx8gpBh2nvbd9qF3qo=; b=tl4w+PPzBhdOn4ABfS5co/4PLj5I7a39ayMvxYtyAKY29aSkATAGmUnCbFEyoN+d9c BbInmUFjXKrcg8WajAeEK/RDzoiwQnW00blY6ZN+WVWgBNkZ6wJCdn6V3b4iqXal2ZzW VxF5HhjdhqCATOi4TxcO8Kpuq0TzaUfefL/vrTM5qBgdBnkmXCRJjiMRIzggxgcOis2P BRFYEfwKBY46LJXlVevZx8cN7MEJ5/UX+EoNTa5rugqGNPO3Rxthn1kXLPfXHsHqVnMb eSC7wO/b1sxjBMcjzNnkRxEzbKSOchDfWZuCUBX3/FBct5k7+iqKY67kHTDtcBIc9IMF /bBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VFjJmq0Au97vKEfgrOVE/VaVkFx8gpBh2nvbd9qF3qo=; b=jDjQekkB6Qx4CYb+EdULndwBGglQ2nFyZqXm969TYqJSjSrjCdfxX2hS/0P/OQxQA7 bRKfdA6q1MgpjpejLTVYGFUu3VZTSPmx46NbE4VcSvn2i6AdEUrIS/ousz444rfc1Ai7 og3WFIq9kOQ7JEu7i/I3/pZXhk3gVH6jzNeCeP5O5kr+JuapaevmVq/dgBCS5ofs3FI3 DcyV6unRTc0TcWpOxlfKwfmElMeAJMY/MiAGOPZO7q/iTqpb+MCxEqMYzJw5nvbbvXEe a/6dcOuwMgfzHt9LTtA8E0nO/lAOkdd+HudPWa8gISunxXgkTo/WghUfjAaZEVP+YWlI 0fpA== X-Gm-Message-State: AOAM531pm3O24IcddMe9k64xuICBZfOhuZV6Oo3XHdt70UTbUmC3rBVN T3LQnPqDgO9sfb314HC6VBrZqQ== X-Google-Smtp-Source: ABdhPJxyETNNT3979AkpXipAech5eZPrp9lur8P4ZhLUWsa6ZiqwiqWuwCh6/NsbKt1UY3V4t38Kvg== X-Received: by 2002:a05:620a:227:: with SMTP id u7mr15801746qkm.226.1613405802624; Mon, 15 Feb 2021 08:16:42 -0800 (PST) Received: from localhost.localdomain (modemcable068.184-131-66.mc.videotron.ca. [66.131.184.68]) by smtp.gmail.com with ESMTPSA id j124sm12225227qkf.113.2021.02.15.08.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 08:16:42 -0800 (PST) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Subject: [PATCH v2 1/2] drm/msm: add compatibles for sm8150/sm8250 display Date: Mon, 15 Feb 2021 11:15:33 -0500 Message-Id: <20210215161537.14696-2-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20210215161537.14696-1-jonathan@marek.ca> References: <20210215161537.14696-1-jonathan@marek.ca> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rajendra Nayak , David Airlie , "open list:DRM DRIVER FOR MSM ADRENO GPU" , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Tanmay Shah , open list , Rob Herring , tongtiangen , Qinglang Miao , Kalyan Thota , Drew Davenport , Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The driver already has support for sm8150/sm8250, but the compatibles were never added. Also inverse the non-mdp4 condition in add_display_components() to avoid having to check every new compatible in the condition. Signed-off-by: Jonathan Marek --- Documentation/devicetree/bindings/display/msm/dpu.txt | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 ++ drivers/gpu/drm/msm/msm_drv.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/display/msm/dpu.txt b/Documentation/devicetree/bindings/display/msm/dpu.txt index 551ae26f60da..5763f43200a0 100644 --- a/Documentation/devicetree/bindings/display/msm/dpu.txt +++ b/Documentation/devicetree/bindings/display/msm/dpu.txt @@ -8,7 +8,7 @@ The DPU display controller is found in SDM845 SoC. MDSS: Required properties: -- compatible: "qcom,sdm845-mdss", "qcom,sc7180-mdss" +- compatible: "qcom,sdm845-mdss", "qcom,sc7180-mdss", "qcom,sm8150-mdss", "qcom,sm8250-mdss" - reg: physical base address and length of contoller's registers. - reg-names: register region names. The following region is required: * "mdss" @@ -41,7 +41,7 @@ Optional properties: MDP: Required properties: -- compatible: "qcom,sdm845-dpu", "qcom,sc7180-dpu" +- compatible: "qcom,sdm845-dpu", "qcom,sc7180-dpu", "qcom,sm8150-dpu", "qcom,sm8250-dpu" - reg: physical base address and length of controller's registers. - reg-names : register region names. The following region is required: * "mdp" diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 5a8e3e1fc48c..fff12a4c8bfc 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -1219,6 +1219,8 @@ static const struct dev_pm_ops dpu_pm_ops = { static const struct of_device_id dpu_dt_match[] = { { .compatible = "qcom,sdm845-dpu", }, { .compatible = "qcom,sc7180-dpu", }, + { .compatible = "qcom,sm8150-dpu", }, + { .compatible = "qcom,sm8250-dpu", }, {} }; MODULE_DEVICE_TABLE(of, dpu_dt_match); diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 94525ac76d4e..928f13d4bfbc 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1185,9 +1185,7 @@ static int add_display_components(struct device *dev, * Populate the children devices, find the MDP5/DPU node, and then add * the interfaces to our components list. */ - if (of_device_is_compatible(dev->of_node, "qcom,mdss") || - of_device_is_compatible(dev->of_node, "qcom,sdm845-mdss") || - of_device_is_compatible(dev->of_node, "qcom,sc7180-mdss")) { + if (!of_device_is_compatible(dev->of_node, "qcom,mdp4")) { ret = of_platform_populate(dev->of_node, NULL, NULL, dev); if (ret) { DRM_DEV_ERROR(dev, "failed to populate children devices\n"); @@ -1320,6 +1318,8 @@ static const struct of_device_id dt_match[] = { { .compatible = "qcom,mdss", .data = (void *)KMS_MDP5 }, { .compatible = "qcom,sdm845-mdss", .data = (void *)KMS_DPU }, { .compatible = "qcom,sc7180-mdss", .data = (void *)KMS_DPU }, + { .compatible = "qcom,sm8150-mdss", .data = (void *)KMS_DPU }, + { .compatible = "qcom,sm8250-mdss", .data = (void *)KMS_DPU }, {} }; MODULE_DEVICE_TABLE(of, dt_match);