Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6093062pxb; Tue, 16 Feb 2021 16:16:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAQG3WzNVhg1jRLfE7GzOh1s29r12saKT1QAvC2MsVOq2TdB4BKQgv8ydiAgPx35ngjjpQ X-Received: by 2002:a50:ec0b:: with SMTP id g11mr9974255edr.154.1613520966343; Tue, 16 Feb 2021 16:16:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613520966; cv=none; d=google.com; s=arc-20160816; b=Vfnc8CIyTRrptdgsDMQsIBewqsL3beDUlefwGbqidtfvT/BdPw7QHhZnRoarkDahCr 2UljCvjaq4LN5zuyeK71hOqq/4GKsQ9gRJ/FWscL6IMa/uXMk0LBTtF/dFrTTTfV91rI wxbxGdWk/z8sgLYjVFrGDs/2n0q27evgezjOD8gMBssHDDsC+3rpxb00aBGOdWxenRkv lGE0PhH25bP0HLz/MB0iN3ybc+u9zDiSLb4cFkyJsswX/uM1UK451Ova+8tI1vAoZFDS 1/dCj0P8R895+s8QOw/6sHZ6MqvOikEDldjjOfsoSS4RKaI3k9MVmpTBPayfCnKCZAHn OEQw== 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=XQqpqg6jSzHG83op6n6dlIe74aKdQKtD9br7jGebjUw=; b=tTa6m5BtsnROZ/2QtV6Fr3CJfMPnMd0RwIQSDJxKMEYPf0vTjB26beD1JhDjjqHaP6 x8vOwywe7EsgCs489fhq0K4B/azZqEg8zXmmgXl0CoeJOMhqx2qlGRL3hxv7H+bifVvS NWbivgDtmmAzU4C7dm21umPmmrkY64tLRcVqGv/l82leLRDIxRi+WdOS8bk3Wgd4PbyS MSjMnTE97zILUEdfYazeI5B0OhtFW+5m+9mk6iAbLR7lAlsW2FcCNn3gVlYOmcqYNQrB KTpKS/HF7qnCp5pa697AlnVJwyy64p/b4cPpZdsCmoBx0KmqcztN8XUpq9xJ00bebeuG cZ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UNKYNkYO; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jw1si386985ejc.74.2021.02.16.16.15.40; Tue, 16 Feb 2021 16:16:06 -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=@gmail.com header.s=20161025 header.b=UNKYNkYO; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230071AbhBQAGs (ORCPT + 99 others); Tue, 16 Feb 2021 19:06:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbhBQAGp (ORCPT ); Tue, 16 Feb 2021 19:06:45 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BE22C061574; Tue, 16 Feb 2021 16:06:05 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id w4so339100wmi.4; Tue, 16 Feb 2021 16:06:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XQqpqg6jSzHG83op6n6dlIe74aKdQKtD9br7jGebjUw=; b=UNKYNkYO0LfnOS/TsdDDmSB9Njy/d4xhqsOEFDi91kfNRXvsy9i6E8+4Xs92EgAxrN A1mTLusx49wda93oKOT4RMx3bTUrvcfaxgEIVSl4XHMpTCil4glWs2iSvfVr6iyHKXLY Cs3dzbnSF0QEr0+Yfb3rpnUKydrhYi0froutx0YA6PhN7nufa3O/d8GEkwyJi14OZyoY LPqCtTMhSX0iuggc8z3bs+/YFWNh0wleqLw4d/WPK9zt3+dzWJ/ZK15W/jP72Vlc58zy flMdpeoSr2Yy4bBq1kNlxT1f0Tp+kyHAq0D70zPfgamSvqXRq7+hwONx4HJFfZQJ/5tq jrPQ== 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=XQqpqg6jSzHG83op6n6dlIe74aKdQKtD9br7jGebjUw=; b=TSCiZKKWFFUa+qA69ErJOujMRW54ULQG10b0DGPtbud6NqWgFHM2cDI0XBvsDtqapf EiCGVk6DBWEevMOG6UKIIWq9XRP5r8oG57KNhwiJnuWUlJqKXo2poBcbucHfefKUX81G JpebInSIGqa4QRvJ4N0COmkTDm0/y+rz70+5XLpQxwCyJMmEmuqAix32sI7gmaI6ys+m Sn4nMxKgmzdLr4HHG6OMR284MB36BSyUG0ZaKkVd+84lwjYNcjljnLa5YJwPVpeY+oSW vcT2q+J9JYGx05nH0fDp5Rsh4ddk53a8Eo3N+b/f1cpOUHCaJGt+wrTz7mKAg1SGMv7g 1ymA== X-Gm-Message-State: AOAM530FSlnHqXTgEW6Jc6wZw3/Th6XKWaUgJ22RNMub0IjWXg6LU4PD MIlnUaoXBFml5F6hJO7y/gPdjiLto8rgTo/5Qo8= X-Received: by 2002:a7b:c149:: with SMTP id z9mr4975291wmi.164.1613520364006; Tue, 16 Feb 2021 16:06:04 -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: Rob Clark Date: Tue, 16 Feb 2021 16:08:56 -0800 Message-ID: Subject: Re: [PATCH v2 1/2] drm/msm: add compatibles for sm8150/sm8250 display To: Jonathan Marek Cc: Dmitry Baryshkov , "open list:DRM DRIVER FOR MSM ADRENO GPU" , 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, Feb 16, 2021 at 10:06 AM 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. I *think* typically the reason to split dt bindings into their own patch is that devicetree@ list isn't interested in reviewing driver changes, just binding changes.. In this case since it is just adding a compatible I think it is ok.. (or at least ok by me, but maybe other-Rob disagrees ;-)) > > 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. It is good to have a device specific compatible up front, even if we fallback to the more generic one for matching.. just in case we find a reason for needing it later BR, -R > > > >> 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 > >> > > > >