Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp379334pxb; Thu, 12 Nov 2020 06:14:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzee6NSwIgDVxHLFx/DIcx5O3GIGMJ6jLVCKy/IaZqYfwHeS9otCMQBTZB81anOJBcgeUOZ X-Received: by 2002:a17:906:6c93:: with SMTP id s19mr31746277ejr.544.1605190494869; Thu, 12 Nov 2020 06:14:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605190494; cv=none; d=google.com; s=arc-20160816; b=DXxJQW96WnxGC741xHZDTc0l8DvzIv4iA7tZfQDU8F4x6Zz3RQ5ruhk2sBXP9B+25f adcnnGcxY/bFCxZhBH8T1Vn4v3GfdYw0bIh5xjyP7UM78tgXbUdHPTCmIdiV/7O1YJv2 Vzw+EZNg/20q0cBPbi6+nGLEks5VfTUvlNQ3oQGBcWMXoeNvZgIJA8zG6T6fEpi68YNN KUvLvbKKpAeFmWgNx77ulNBCGVdBzWasr/5K+XKyN65fwuTgKMjx6WFaO4PEijRicZhx 8Luus+oENirX22SCisxqrcgbXdp3p8L433Hkt4pm4uf8tsvm0icx3MCDW3HLGTj8M3nF sc2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter; bh=Y8UGYXPQktNuVDpVrQPw+LqxbvaW5wF8I10yL3taz2M=; b=Z7GjWRjKX6ItlyaR3OB4q5hLowOsLDlyCxqI9PBpbtuzRuCN52YQghmF1ESns4FYdV OtP76RKM8d4dQeOdK9/TDpdt+SMgrbdn3ocl5BlsX8HFZJRY3AbW6fvnmIC+4cWHZLUl 4ps4E05l2ARo8mdpfXHaJDHngtjBEUEw9u1wDbJfpSSL7zWoGyIcLUlS7UIAx49IE56U wypQGrKbTyjhIhCzxnWHqYUyV5/wkADMnO3FEtbl8AK2Z3bHWsTVPRyNzTRDTsTF35C9 V3OxaHh9OglfEoCEo44QCLyFrX9/jChUfuScz+qxF90cc87ytAyjvNLtXsM+MJqsgPyB MOiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=OOsW2rXM; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i6si3790452eje.481.2020.11.12.06.14.29; Thu, 12 Nov 2020 06:14:54 -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=@samsung.com header.s=mail20170921 header.b=OOsW2rXM; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728263AbgKLOKz (ORCPT + 99 others); Thu, 12 Nov 2020 09:10:55 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:54764 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727739AbgKLOKy (ORCPT ); Thu, 12 Nov 2020 09:10:54 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201112141042euoutp014754d478615b93f9577f3ef1d0a36a35~GyAVzAFdr1450314503euoutp01q for ; Thu, 12 Nov 2020 14:10:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201112141042euoutp014754d478615b93f9577f3ef1d0a36a35~GyAVzAFdr1450314503euoutp01q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1605190242; bh=Y8UGYXPQktNuVDpVrQPw+LqxbvaW5wF8I10yL3taz2M=; h=From:To:Cc:Subject:Date:References:From; b=OOsW2rXM8mlMH1wqXa2oxyC41Z3BE6HpRS3d/r5tpm5748oddno/joI5Fs2M3rvHK KjKEXHn+SMTg+WyI5KrHdjgxlxlAq/pT4Zw1iNnPS2RNPIOn2yOYNqcHYX+ZwyFUkj F+rIK5P6lsAVNFJYuaxPeYy/WyFdASuwWIJ/w3OE= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201112141042eucas1p2eeada284ec969c498ac1e767c01401ce~GyAVOhRQV0207802078eucas1p2p; Thu, 12 Nov 2020 14:10:42 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 3F.C0.27958.2624DAF5; Thu, 12 Nov 2020 14:10:42 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201112141041eucas1p1a29130955afd4ec1d5d94cf17183920c~GyAUx8gtj2413224132eucas1p1Y; Thu, 12 Nov 2020 14:10:41 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201112141041eusmtrp16859c0c7493f04e771cd58e726ce6c7d~GyAUxDcBG1172011720eusmtrp1G; Thu, 12 Nov 2020 14:10:41 +0000 (GMT) X-AuditID: cbfec7f2-efdff70000006d36-2c-5fad426249f4 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id BE.FE.16282.1624DAF5; Thu, 12 Nov 2020 14:10:41 +0000 (GMT) Received: from AMDC3061.digital.local (unknown [106.120.51.75]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201112141041eusmtip26d9bfce875c3e898a25ab50da413d3d6~GyAUBSU8z2680626806eusmtip2_; Thu, 12 Nov 2020 14:10:40 +0000 (GMT) From: Sylwester Nawrocki To: georgi.djakov@linaro.org, cw00.choi@samsung.com, inki.dae@samsung.com Cc: krzk@kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, a.swigon@samsung.com, myungjoo.ham@samsung.com, sw0312.kim@samsung.com, b.zolnierkie@samsung.com, m.szyprowski@samsung.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, s.nawrocki@samsung.com Subject: [PATCH v9 0/5] Exynos: Simple QoS for exynos-bus using interconnect Date: Thu, 12 Nov 2020 15:09:26 +0100 Message-Id: <20201112140931.31139-1-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBKsWRmVeSWpSXmKPExsWy7djP87pJTmvjDY6d5bO4P6+V0WLjjPWs Fte/PGe1mH/kHKvFla/v2Sym793EZjHp/gQWi/PnN7BbbHp8jdXi8q45bBafe48wWsw4v4/J Yu2Ru+wWtxtXsFm07j3CbnH4TTurxYzJL9kcBD02repk87hzbQ+bx/3u40wem5fUe/RtWcXo 8XmTXABbFJdNSmpOZllqkb5dAlfGvj/nmQruaFQ8frWbqYHxk0IXIyeHhICJxMw9T1m6GLk4 hARWMEqsfrCKEcL5wigxZdplZgjnM6PE5W+v2GBabq16zQSRWM4oseTcDoSWGR92g1WxCRhK 9B7tA0pwcIgIeEqcbNAHqWEWaGaWaGjexAhSIyzgI3GzrxvMZhFQlXj4/QMziM0rYC1xetoj doht8hKrNxyAigtKnJz5hAXEZgaKN2+dDXaehEA7p8TTnrusEA0uEgc3LGWGsIUlXh3fAjVI RuL05B4WiIZmRome3bfZIZwJjBL3jy9ghKi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BX4nVJyexgBQxC0xmlnh0uwWsSFjA R+JmXzdYEYuAqsTD7x+YQWxeAWuJ09MesUNskJdYveEAVFxQ4uTMJywgRzALqEusnycEEmYG KmneOpt5AiP/LCRVsxCqZiGpWsDIvIpRJLW0ODc9t9hIrzgxt7g0L10vOT93EyMw+rYd+7ll B+PKVx/1DjEycTAeYpTgYFYS4VV2WBMvxJuSWFmVWpQfX1Sak1p8iNEU6OqJzFKiyfnA+M8r iTc0MzA1NDGzNDC1NDNWEuc1OQLUJJCeWJKanZpakFoE08fEwSnVwMQoNEHTtUN1972Dsx4V LDfYIrCr7sMJ7X13Jq4xXzf786bSy3Nu/gu8dPl6UFVRtJOUsJ3bxtdHr68L85Kawc0jHcy/ 6ZenVsrlXtf1ebdiQk5a7Jsj8yChtO6mVNvafRPX35r6OoeDO51j1efD05bNqQk5oXtSx3OR NI+6pKL+x9e9mtdtW+X37LlQ5/SySl56tajlTA59/UZzLcXkq9InHtbVriqelBD1u2j7kxsG 55ZPXK7sKvLkxmd+e+cc7ZeffBUSJiyKsRR0ylj4cGujxt2335RmpeQc6mkz3WmxrPNEXe2t 6fvf1CuEf4tcfqNK6KzZY9bo8xNe9TmeylnZbe37ZE//yewJK49JF31QYinOSDTUYi4qTgQA bXqZ80cDAAA= X-CMS-MailID: 20201112141041eucas1p1a29130955afd4ec1d5d94cf17183920c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20201112141041eucas1p1a29130955afd4ec1d5d94cf17183920c X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201112141041eucas1p1a29130955afd4ec1d5d94cf17183920c References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds interconnect API support for the Exynos SoC "samsung, exynos-bus" compatible devices, which already have their corresponding exynos-bus driver in the devfreq subsystem. Complementing the devfreq driver with an interconnect functionality allows to ensure the QoS requirements of devices accessing the system memory (e.g. video processing devices) are fulfilled and allows to avoid issues like the one discussed in thread [1]. This patch series adds implementation of the interconnect provider per each "samsung,exynos-bus" compatible DT node, with one interconnect node per provider. The interconnect code which was previously added as a part of the devfreq driver has been converted to a separate platform driver. In the devfreq a corresponding virtual child platform device is registered. Integration of devfreq and interconnect frameworks is achieved through the PM QoS API. A sample interconnect consumer for exynos-mixer is added in patch 5/5, it is currently added only for exynos4412 and allows to address the mixer DMA underrun error issues [1]. Changes since v8: - excluded from the series already applied dts patches, - Co-developed-by/Signed-off-by tag corrections, Ack tags added, - the maintainers entry corrections adressing review comments, - Kconfig/Makefile improvements/corrections, - whitespace/indentation cleanup. The series has been tested on Odroid U3 board. It is based on v5.10-rc1. -- Regards, Sylwester Changes since v7: - drivers/interconnect/exynos renamed to drivers/interconnect/samsung, - added INTERCONNECT_SAMSUNG Kconfig symbol, - added missing driver sync_state callback, - improved the DT binding description, - added a patch adding maintainers entry, - updated comment in patch 7/7, typo fix (patch 1/7). Changes since v6: - the interconnect consumer DT bindings are now used to describe dependencies of the interconnects (samsung,exynos-bus nodes), - bus-width property replaced with samsung,data-clk-ratio, - adaptation to recent changes in the interconnect code (of_icc_get_from_provider(), icc_node_add()). Changes since v5: - addition of "bus-width: DT property, which specifies data width of the interconnect bus (patches 1...2/6), - addition of synchronization of the interconnect bandwidth setting with VSYNC (patch 6/6). Changes since v3 [4] (v4 skipped to align with patchset [1]), detailed changes are listed in patches: - conversion to a separate interconnect (platform) driver, - an update of the DT binding documenting new optional properties: #interconnect-cells, samsung,interconnect-parent in "samsung,exynos-bus" nodes, - new DT properties added to the SoC, rather than to the board specific files. Changes since v2 [5]: - Use icc_std_aggregate(). - Implement a different modification of apply_constraints() in drivers/interconnect/core.c (patch 03). - Use 'exynos,interconnect-parent-node' in the DT instead of 'devfreq'/'parent', depending on the bus. - Rebase on DT patches that deprecate the 'devfreq' DT property. - Improve error handling, including freeing generated IDs on failure. - Remove exynos_bus_icc_connect() and add exynos_bus_icc_get_parent(). Changes since v1 [6]: - Rebase on coupled regulators patches. - Use dev_pm_qos_*() API instead of overriding frequency in exynos_bus_target(). - Use IDR for node ID allocation. - Reverse order of multiplication and division in mixer_set_memory_bandwidth() (patch 07) to avoid integer overflow. References: [1] https://patchwork.kernel.org/patch/10861757/ (original issue) [2] https://www.spinics.net/lists/linux-samsung-soc/msg70014.html [3] https://www.spinics.net/lists/arm-kernel/msg810722.html [4] https://lore.kernel.org/linux-pm/20191220115653.6487-1-a.swigon@samsung.com [5] https://patchwork.kernel.org/cover/11054417/ (v1 of this RFC) [6] https://patchwork.kernel.org/cover/11152595/ (v2 of this RFC) Sylwester Nawrocki (5): dt-bindings: devfreq: Add documentation for the interconnect properties interconnect: Add generic interconnect driver for Exynos SoCs MAINTAINERS: Add entry for Samsung interconnect drivers PM / devfreq: exynos-bus: Add registration of interconnect child device drm: exynos: mixer: Add interconnect support .../devicetree/bindings/devfreq/exynos-bus.txt | 71 +++++++- MAINTAINERS | 8 + drivers/devfreq/exynos-bus.c | 17 ++ drivers/gpu/drm/exynos/exynos_mixer.c | 146 ++++++++++++++- drivers/interconnect/Kconfig | 1 + drivers/interconnect/Makefile | 1 + drivers/interconnect/samsung/Kconfig | 13 ++ drivers/interconnect/samsung/Makefile | 4 + drivers/interconnect/samsung/exynos.c | 199 +++++++++++++++++++++ 9 files changed, 450 insertions(+), 10 deletions(-) create mode 100644 drivers/interconnect/samsung/Kconfig create mode 100644 drivers/interconnect/samsung/Makefile create mode 100644 drivers/interconnect/samsung/exynos.c -- 2.7.4