From patchwork Tue Jun 18 20:24:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 167190 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4673940ilk; Tue, 18 Jun 2019 13:25:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTZUdOXDhFpzlCDjZBSihyHgzrqR76KPkIoJMNi7r3zx0Dn5Nvei/9V8FkW/9cmOqyeiOl X-Received: by 2002:a62:6d47:: with SMTP id i68mr123690542pfc.189.1560889550100; Tue, 18 Jun 2019 13:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560889550; cv=none; d=google.com; s=arc-20160816; b=VmFIz2fI8VHdeHRyMI8KFleAAsxdh9V1e+yQq+RC3xV89U2WwPT/Y0EeKFHJIVpgpK Jw8g0DvbH23oOzXb1Jd/j+QM7R/xATHZRWMGuPOrI0GcvKS6ZaBnAn5PmQu0dOeqM6DQ 9dczMN/H786edDkPZAcItxnwey9+Oozt6BtZ2+4KzgWvmjP80u7LkjLe4rPE99pxKFa4 izgjdWIHA08eHxvmHPxpReOWO8EwbA51K+lLx8OCCHlS+w0qBT+Xjg64DRjU5MZ/nb4l EYJ+Y8Y09i3B/w2ahtfL16jtlZnAbW3jS6QF2peXiKym1WJDsTOKuYrOldpQhth2Z5if u1KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/mPcWOq6bvI/Rz9hbv+lJlmkKRg/e135jxE2BAg50pM=; b=vYLNXLLYyN+WaMisigWnVlsDPWN41lG4Tkhug4BUUKDJBjNOhyAYMOoD8M749uSP7G NgxmcooCUeLxJhskZRa+yXyvwHbm8PJhVDTWC7ALblhN9hiMTF5Tm6uQ9BJlLMhQv5XM geItpAYIDWxpORu0PVtUZ7cgzwv0l9fNY4xnQIQ+dsrovRQcm2A9CS0ZffkIPM6w/hb8 9JCwHjrwYn+eZHY6JSeBvCIhHv8N++kUwKzcIMyDh+K5zEIht1lbRq8z2FjzJDoHBhvZ QEVp04oEFf3qhyVOmoQTibJldLGUnW+B42wBr40A52I0cUZeGqnRKcaZkHfrgcQzkN/V co3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A2+Re1WB; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 v36si1035818pgl.91.2019.06.18.13.25.49; Tue, 18 Jun 2019 13:25:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=A2+Re1WB; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1730266AbfFRUZt (ORCPT + 15 others); Tue, 18 Jun 2019 16:25:49 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:37592 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725909AbfFRUZt (ORCPT ); Tue, 18 Jun 2019 16:25:49 -0400 Received: by mail-qt1-f193.google.com with SMTP id y57so17122531qtk.4; Tue, 18 Jun 2019 13:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/mPcWOq6bvI/Rz9hbv+lJlmkKRg/e135jxE2BAg50pM=; b=A2+Re1WBNBOftakVI6RS8tTdogZIEpHTmvSLUhBTnj7jSO/1JQdBvuHU/GTYpThg0v cNvGiwlhpFX0Rz2L8uikLorkH5Z/VMo1TnBSwP42FrbPhRvGpVGF7e39yOIA6ZKNiGoZ +2SGJOttWeg/zmqDYPVPw+6CyZAVzyXYcF5HGKf+sMEhPyYOsgvTm/Q6iiV1SDd+yz3L CjiqL5/kToemOxQnH4GQmfNFh8XpH2atSaXIUBwZmBZvMeT3k0qW83KjwBANJ+Sg1/Qj LIrPeFDjUPu95ncOTwy6lieNtH+gTWDuHPnAwp4p3Rb3UDe/rkQYIq5ayV+7UmMU5Rb5 XFXw== 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=/mPcWOq6bvI/Rz9hbv+lJlmkKRg/e135jxE2BAg50pM=; b=JZKVCzFPtclhgsAqLF3q1DAEUUdUmbSu70rlD5at2foECv7xANz6wAuX6LTTyMg1Dx FZwZuLBQrLNuAtYuJRQsb5mwQkczhqyaOryagLVEPBdA2B8L3lFMUnzXERvZnLQ7AXJX r+SXwnpZ1fBF7nwBxnTU1BnayR+aUgsNID1PzTcPj09s3JnmWfNL31FlZ8nhb9ui7Onk aCajpFldcUCwxh2l6ZD04c66Fwllz4ib6FBPyieTicSUkYX9rIy8uBnuDIl4oIcCDteF hb67fpGRtCbQ86leVvl718msle3a+dbzDjq4HNWRCWSPCTJ5n76jYqnqv5pu3Q5YqDIJ RI+w== X-Gm-Message-State: APjAAAVvibroXaRyJMPT/0B7M76AaZo0wmsSOy69dJ9SxGT1RHdUoUZY OlXYFsd8uFcND3y8whx1zsC0K39ON+Y= X-Received: by 2002:ac8:38a8:: with SMTP id f37mr101708974qtc.150.1560889547868; Tue, 18 Jun 2019 13:25:47 -0700 (PDT) Received: from localhost ([2601:184:4780:7861:5010:5849:d76d:b714]) by smtp.gmail.com with ESMTPSA id c16sm4004494qke.43.2019.06.18.13.25.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 18 Jun 2019 13:25:47 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, Sean Paul , Georgi Djakov , Rob Clark , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Rajesh Yadav , Boris Brezillon , Mamta Shukla , freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] drm/msm/mdp5: Use the interconnect API Date: Tue, 18 Jun 2019 13:24:13 -0700 Message-Id: <20190618202425.15259-6-robdclark@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190618202425.15259-1-robdclark@gmail.com> References: <20190618202425.15259-1-robdclark@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(+) -- 2.20.1 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); + 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); }