Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4202299ybi; Tue, 18 Jun 2019 13:44:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyjg7Ook0EgYGcgG0df3R7sHTSZqgFyiPbdsjwN2asjNStp3rRBvmMcRQniPQaxLPTIqrw X-Received: by 2002:a17:90a:d681:: with SMTP id x1mr7031044pju.13.1560890693558; Tue, 18 Jun 2019 13:44:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560890693; cv=none; d=google.com; s=arc-20160816; b=SezGTvBJ6avGKGHhZC+RnurgLqrI/zYPJwLWtXpxxUhJKScVmPCMJI5GKhGZuhaaeQ 75r0qEyuvkDnSrQBvWgxbm9IzeScuAcgrQdW0XfIc8qBZIac9DoBTW1HCIgPdBGMpbhz NDmmYCN0cYoWy6DowxUwwLhsX/e4gkaQyuKfCZClv0X4AuOMTB1GT7+6YRcw68+zlOaf 0tFUWp164WYJ5Vc8/zGWNFx1iSdWNkm7ZFEpA+i89suwSf3VoirbJ+YrbCGzqSymN6ob ljM+WkDEsamdEKxoALxj22MfQYLdEJ54j6iYt8sY/2yBbo6d+ZccJSycg9F8WI2yJd25 svUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=a72KOM/txntfmB99IxHWW0QKe5DAoHdDFqzs/tLeZAU=; b=0WMJVKCYLMG2nzkSF9jh2kyrYl9TITPrUtg0TAGmqWDlPcaNUFhj8mEHyhSVjZMEd8 NH8uIGAwrQDHOQjWdqJzaerGj8xJtQ4WICkRovUHN/ImQ46r5wf3QhI4znCxyUU2qMcO TNJ7iZLoyOsRLtDO9RlkUHOyga9P+DUzJ2JGVqN+nz+hthQxomCcyJPnCQS39RCSZDPL CgbAofZb2E9oS4fMsKwSCxTYhZ3vc8xJCEBwYBIC5B3t5qPop2bjo4LO0vffoXC+Efv8 VLcca+P6RGunyMibrarLmbXG9/vpH/bJIou8vcT/sbzS3Y9NqKGtzTZdQ15U+XOGpG/Y 1FOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="GxA/N9un"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id a17si3282823pjs.98.2019.06.18.13.44.37; Tue, 18 Jun 2019 13:44:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="GxA/N9un"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730613AbfFRUo1 (ORCPT + 99 others); Tue, 18 Jun 2019 16:44:27 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:35571 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730341AbfFRUo1 (ORCPT ); Tue, 18 Jun 2019 16:44:27 -0400 Received: by mail-io1-f68.google.com with SMTP id m24so33115706ioo.2; Tue, 18 Jun 2019 13:44:27 -0700 (PDT) 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=a72KOM/txntfmB99IxHWW0QKe5DAoHdDFqzs/tLeZAU=; b=GxA/N9uny+NZFEUb7AtULKqb8Ajxz7iTbt3Ei3hBq0QRSOsoa7MU9rulCbQ0m8EReR dE2Lia0ULFg65uPitn7uvoXu3kv2jNZj37vxH9z7Wy2VppPKwYNLOvC5HC4f15t0hkIr GgQwJUFn7jX5RDOfFmOLENjcrrN1jwtmyxXNyIRqDDCY0VY0wQnNLQYm8Iy0Y/ZljoJE LuVEsXfIZyHANdv1Nu5XFr/iprpqTLNwf0ncamYOJIj7l7jiGRLie6cyk8k08J1v7DPj 1ae3KpyY0HvRyGdIL3DXert/tCJbNpMQd5lYjgI8AgW9fklGrvJqFu6/5C58kfdJu+zS 7agQ== 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=a72KOM/txntfmB99IxHWW0QKe5DAoHdDFqzs/tLeZAU=; b=iIaZMAKJAQHBtUl3iSp6e/CgubUrswRObZ/OYj6mRvm19R2/ICU7cNpOkeYXVJuvdh dTNiPyor6hoG/BBUkwpiFkqdBQjmfR/zy8IM72/iQeyrsuQl+yYqm49BGgkFBLx01uMX Gumcab/0KaRT1iqkG+jAah1IndVr4BE6K0vuE0S4jxA4vAav5rEARHj2PndG3qugaijR kuY/n0T8nk9E2mOVbgrYVAJEWrNa7270cWfhrsl4oOVoO/JP9lKFG4KDpTetnuc1YBlx ///wYopLqEkxlVIhlpkz9IsEuhkWueU6+F7uU+4sxhOgJXhgbwgSrITWk4h/dvWjyIQc n1YQ== X-Gm-Message-State: APjAAAXs/OGEoD1sDoGJU9CrQOO1x0fuPG30fGjcSg8t2oNbexuiZUpZ COGb7aS9SOBQlsQts7LM2+fMsmeiPm9n3GWWaTA= X-Received: by 2002:a02:b10b:: with SMTP id r11mr5142549jah.140.1560890666538; Tue, 18 Jun 2019 13:44:26 -0700 (PDT) MIME-Version: 1.0 References: <20190618202425.15259-1-robdclark@gmail.com> <20190618202425.15259-6-robdclark@gmail.com> In-Reply-To: <20190618202425.15259-6-robdclark@gmail.com> From: Jeffrey Hugo Date: Tue, 18 Jun 2019 14:44:16 -0600 Message-ID: Subject: Re: [Freedreno] [PATCH 5/5] drm/msm/mdp5: Use the interconnect API To: Rob Clark Cc: "open list:DRM PANEL DRIVERS" , Rob Clark , freedreno , Rajesh Yadav , Boris Brezillon , David Airlie , MSM , lkml , Mamta Shukla , Sean Paul , Daniel Vetter , Sean Paul , Georgi Djakov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 18, 2019 at 2:25 PM Rob Clark wrote: > > From: Georgi Djakov > > The interconnect API provides an interface for consumer drivers to > express their bandwidth needs in the SoC. This data is aggregated > and the on-chip interconnect hardware is configured to the most > appropriate power/performance profile. > > Use the API to configure the interconnects and request bandwidth > between DDR and the display hardware (MDP port(s) and rotator > downscaler). > > v2: update the path names to be consistent with dpu, handle the NULL > path case, updated commit msg from Georgi. > > Signed-off-by: Georgi Djakov > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > index 97179bec8902..eeac429acf40 100644 > --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c > @@ -16,6 +16,7 @@ > * this program. If not, see . > */ > > +#include > #include > > #include "msm_drv.h" > @@ -1050,6 +1051,19 @@ static const struct component_ops mdp5_ops = { > > static int mdp5_dev_probe(struct platform_device *pdev) > { > + struct icc_path *path0 = of_icc_get(&pdev->dev, "mdp0-mem"); > + struct icc_path *path1 = of_icc_get(&pdev->dev, "mdp1-mem"); > + struct icc_path *path_rot = of_icc_get(&pdev->dev, "rotator-mem"); > + > + if (IS_ERR_OR_NULL(path0)) > + return PTR_ERR_OR_ZERO(path0); Umm, am I misunderstanding something? It seems like of_icc_get() returns NULL if the property doesn't exist. Won't this be backwards incompatible? Existing DTs won't specify the property, and I don't believe the property is supported on all targets. Seems like we'll break things by not calling the below component_add() if the interconnect is not supported, specified, or the interconnect driver is not compiled. > + icc_set_bw(path0, 0, MBps_to_icc(6400)); > + > + if (!IS_ERR_OR_NULL(path1)) > + icc_set_bw(path1, 0, MBps_to_icc(6400)); > + if (!IS_ERR_OR_NULL(path_rot)) > + icc_set_bw(path_rot, 0, MBps_to_icc(6400)); > + > DBG(""); > return component_add(&pdev->dev, &mdp5_ops); > } > -- > 2.20.1 > > _______________________________________________ > Freedreno mailing list > Freedreno@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/freedreno