Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6005167pxb; Tue, 16 Feb 2021 13:20:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAlnpTN20Ry8QCEqkT+Fmw75yEJL3Mm8eCFahBt02r5gEQzvYYxbhaFDfdBsKiA6to7jb8 X-Received: by 2002:a17:906:4b02:: with SMTP id y2mr4497478eju.475.1613510420791; Tue, 16 Feb 2021 13:20:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613510420; cv=none; d=google.com; s=arc-20160816; b=uJbGZtY7HV3/4t13Wj+GfCOZ+IMisPDfGCFCiu4IVBc5wU5Vujz67dMJfzNQ99iZVU zZwDKNCeMYv2nZUQfuIPs+CJW/BXLPmy8rVmXGmrEHDw77x3coPxRpEygYNoVwObJW+4 H86JY036EyAjYw2duTLvb/VeLsPf/CT6zMGwtdIOxNjHXlQq2ejJKflVO/VSn5dV1ZD9 ytB+1hWsLuBlY/UFCeXqU9lRpO8LMZOOy02YfTTz2+snJ0hXrFwgVc5S2G84t8+kMU8P w+oood2mIcR+us8RnkKpNEnpv84eexPv16UrJjTCdeCqigcizYDP0jYtVZyzdfTgeMp8 dZVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4rk2wwMnoEYPma2xWk6NuZcb3jVPhgKDLBkofVU2y60=; b=UND7ugA07qjQXBw9D1Touzc9/ZpzvR2X9z73oE4dcJ4v7/33/ks7gqKEFLmbSFiISQ UzIOwFRR0ajO3Vl5NMnWj9/1qQkCoslfVZgY2obyg5IYKk3qkW9rGac0/9aRnl8/sUfy i3DQUds3JBT1huGSL9US3ljoeug2obBGuauzAICe90b6e5MZEgVz/ZKhkXdtTsDvfNqS E9HTjP9g1zbTeP7rQGsJlWXM2d8GHu4u1drjftSafW+Lbbzgl2uHmcscDSPaHnfkGCAi 3MQmlHU8j5kYfrKXwjDbKpgIEQHo+8JjIOaYHesEqvz/x44orLOQQ1AmikJXiKTXkpp+ yTkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R+8pOfYF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si15614224edw.35.2021.02.16.13.19.56; Tue, 16 Feb 2021 13:20:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R+8pOfYF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230270AbhBPVQ5 (ORCPT + 99 others); Tue, 16 Feb 2021 16:16:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbhBPVQv (ORCPT ); Tue, 16 Feb 2021 16:16:51 -0500 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B2ECC06174A for ; Tue, 16 Feb 2021 13:16:11 -0800 (PST) Received: by mail-qk1-x735.google.com with SMTP id r77so10823566qka.12 for ; Tue, 16 Feb 2021 13:16:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4rk2wwMnoEYPma2xWk6NuZcb3jVPhgKDLBkofVU2y60=; b=R+8pOfYFLSejFXP4jPbZWyn2LCtTqjsa107yazeTQYzIiH+LeuXV8YusgV1w2LW7Gj IWuN/sQJoxWt9kjU2m1A0IEY/6wlvACZVnyqcaPH2km5k9LUt8ts3M4OHj1XvYTTZZkW rjW38aeg7HxP9QhTVv54x2qt3u/WscEX2iM4yrYjSBhupKyYIaqkdMFpaqnoJFYmXprV I1zgweu48q+ye18tY0/BN4DBJsh6ih3x8VrOP9uPC0i1KXV2RJOFuixu9mdTmoQ7YBIn GrOIyR0KjHr0uLL9E/aZBqPOXAQgTx/K0/q/9ZXIgZ1bQe7IAfzyHzIn4DlXmhcrZm82 xH+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4rk2wwMnoEYPma2xWk6NuZcb3jVPhgKDLBkofVU2y60=; b=L5M4MUxmv9Pfa7F2yQ03SG0ZTr1U8iP2UblMUd2m4f92xbVE4ukGELf8CXWHAYeZ7W 1Wt8chk6zk7Ue1mtMDysuIpvY17nNzTh/46q+yxUYWyWvmoumN5EV9aHbe+u0pGaI7DJ m9Jk6D3rmu04t3gzVC56QGjIieKe7c6TXL3kdIDFd0PRZBJh6htnbHC6EhiF+Kmghr2h C5C3E2kozwWk9CBLEWHcycwnoPmIjC7AAbFDNFXQcd/RYcHAT2LZ8Z57iDWSl10wEIhl box89M3SKeYaALWt/7hTbxaK/6q9sRI6gfGH6sTl5WFOCWrBQIiU8nM9q+/ViEC1vE7B vBrA== X-Gm-Message-State: AOAM530Gll5wAxXx/QiMRdH4JlBNxYq0e/z/CXLBFguOHq18v2+Z5hCx jdZfp3Iy8NvB9mBAAKK7GV+pyLTA0md3N8PSPE6Nig== X-Received: by 2002:a37:a9d6:: with SMTP id s205mr22217992qke.162.1613510170667; Tue, 16 Feb 2021 13:16:10 -0800 (PST) MIME-Version: 1.0 References: <20210215161537.14696-1-jonathan@marek.ca> <20210215161537.14696-2-jonathan@marek.ca> <29231c68-0cc4-9d8a-8cb1-791511780bcd@marek.ca> In-Reply-To: <29231c68-0cc4-9d8a-8cb1-791511780bcd@marek.ca> From: Dmitry Baryshkov Date: Wed, 17 Feb 2021 00:15:59 +0300 Message-ID: Subject: Re: [PATCH v2 1/2] drm/msm: add compatibles for sm8150/sm8250 display To: Jonathan Marek Cc: "open list:DRM DRIVER FOR MSM ADRENO GPU" , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Jordan Crouse , Kalyan Thota , Eric Anholt , Tanmay Shah , Drew Davenport , Jeykumar Sankaran , Rajendra Nayak , tongtiangen , Qinglang Miao , "open list:DRM DRIVER FOR MSM ADRENO GPU" , "open list:DRM DRIVER FOR MSM ADRENO GPU" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Feb 2021 at 21:06, Jonathan Marek wrote: > > On 2/16/21 11:54 AM, Dmitry Baryshkov wrote: > > On Mon, 15 Feb 2021 at 19:25, Jonathan Marek wrote: > >> > >> 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" > > > > These two chunks should probably go to the separate patch 'dt-bindings:...'. > > > > In this case I think its better to have this change in the same patch, > but maybe one of the Robs will disagree. > > > Also, could you please pinpoint the reason for adding more > > compatibility strings, while they map to the same internal data? > > I think we might want instead to use some generic name for the dpu > > block, like "qcom,dpu" or "qcom,mdp-dpu" instead of specifying the > > platform name. > > > > sdm845 and sc7180 aren't using generic compatibles, this is just being > consistent with that. Well, I suppose the common case is to use the 'first compatible' entry if the entities are compatible. The generic compatibles is a proposal, not an affirmation. Please excuse me if it sounded in a different way. > > > > >> 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); > >> -- > >> 2.26.1 > >> > > > > -- With best wishes Dmitry