Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp2017658pxx; Sat, 31 Oct 2020 05:49:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKEOlV9is0CQ+tpuHx3Ddw6NOYt3mHsk8FS1xX7Ak57FE+NiDUpADEWDhJG21RjxsF4VH2 X-Received: by 2002:aa7:d28a:: with SMTP id w10mr7535238edq.192.1604148545625; Sat, 31 Oct 2020 05:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604148545; cv=none; d=google.com; s=arc-20160816; b=GbjSqDm6Xf0V7wPPrVP+0QwFnmTg0ZwFKU7KPYrRRs1cul/Wr3XkerQQmJQ6m06V4N /eCwUHNjqyNk6o6pTf2HJjHYlAphDVxTAcVPBa6CNYkD4swvZYXaS9fhYSlNk+pM/gXS jqdxF77w8MgqZxAbiREYvN1yt8edCdbQAA6gNiJ5txAwB/vp20pYOkCRlmA36dAPOU/8 l17Z8G4xRmLhlwH5uJeDGhdqO23O/0/Iobdphfnc2HZmnYf9peFpt04uAlBn7elwdaRz LW1El6qyJbvEvLjf8e4uDGSlhm7ZPz6kKT41nGz95XAuIPN7O9Nwbfxq/CAnFCqBKdQg LXEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=tuRqAAfuZLMX5y5ZsfB+Ki/qGjMFtvrjMHfPPi2hqoM=; b=bxtoSWZ7oqpXfz9tD3v40lERxO9TjD81aSna2ORtiJanLUcURHDtYocsRCHaCXgfIA L0zqzA32M6l/KI0i9IYxWrS6dt4vL5dpxenyRD786tHVOcR3MzlDnhdwNEKqBuZA/C/J doK4jN+PcisNO73WXQoT1YOt+F9b+LQKDbfd5EChcgsOoA1XE+cEKDqPAfS+oObTHbov 8rT7fjHzQSooawZ3gunUoIlo6rNuxppmjBJmLjaOB1G/Jb3ezaDcZHFUyEgjpa0USnMM 3ZzRkrBnEF5gAR4e92VVZUFueRh3JHB4dxL4bIqH+LlgnQupCLfbK05W44CDlUSFbNNL UIrQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc15si5449891edb.316.2020.10.31.05.48.41; Sat, 31 Oct 2020 05:49:05 -0700 (PDT) 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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727211AbgJaMrW convert rfc822-to-8bit (ORCPT + 99 others); Sat, 31 Oct 2020 08:47:22 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33696 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726738AbgJaMrW (ORCPT ); Sat, 31 Oct 2020 08:47:22 -0400 Received: by mail-wr1-f65.google.com with SMTP id b8so9354247wrn.0; Sat, 31 Oct 2020 05:47:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=+gL7Op3KIBpBphNR+C9mEgS569nJZM4vxaFbpSVbwWo=; b=e1CO85PondYAc5m6el2DSQmEwZHO1oDLOLBz2z5xYIEvTaNlbZ/CPoYjgfysCqqqJ7 61kFMUF/ravAji82JG9Apl+8HPUcN4PuIGtaRW8HsC6DDM2+edjTRBZHNONm381itmcP JfkumnSZXSUtGrjw8Y6DJWOLOhXjFYAkeGqAahxxRa2hZcroXfDS9E5u3RUvVvqC7c4V s/ER6xw9t1rkyDrxpN/C7M2z6Kro1LN4Ql1OUhQMB0Ii6oYDAUBaQNQi/Yo7A5pEmIZG jxCByusNC3LIcUKK1dbfjT9eq9fSbumzao4zV07OLbEvxWTxEO8fSMEG6HgXV37kQhDu iufA== X-Gm-Message-State: AOAM530LJ7dgTN4fqmdAwTxWCFJ4FfW2fXM+/v9GsIdWtYnWTnO0QYJP Ycy+4Joa7NMiT9pnBNJoma8= X-Received: by 2002:adf:9204:: with SMTP id 4mr1764068wrj.241.1604148440070; Sat, 31 Oct 2020 05:47:20 -0700 (PDT) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id 4sm14367078wrp.58.2020.10.31.05.47.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2020 05:47:18 -0700 (PDT) Date: Sat, 31 Oct 2020 13:47:17 +0100 From: Krzysztof Kozlowski To: Sylwester Nawrocki Cc: georgi.djakov@linaro.org, cw00.choi@samsung.com, devicetree@vger.kernel.org, robh+dt@kernel.org, a.swigon@samsung.com, myungjoo.ham@samsung.com, inki.dae@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 Subject: Re: [PATCH v7 6/6] drm: exynos: mixer: Add interconnect support Message-ID: <20201031124717.GE9399@kozik-lap> References: <20201030125149.8227-1-s.nawrocki@samsung.com> <20201030125149.8227-7-s.nawrocki@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20201030125149.8227-7-s.nawrocki@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 30, 2020 at 01:51:49PM +0100, Sylwester Nawrocki wrote: > This patch adds interconnect support to exynos-mixer. The mixer works > the same as before when CONFIG_INTERCONNECT is 'n'. > > For proper operation of the video mixer block we need to ensure the > interconnect busses like DMC or LEFTBUS provide enough bandwidth so > as to avoid DMA buffer underruns in the mixer block. I.e we need to > prevent those busses from operating in low perfomance OPPs when > the mixer is running. > In this patch the bus bandwidth request is done through the interconnect > API, the bandwidth value is calculated from selected DRM mode, i.e. > video plane width, height, refresh rate and pixel format. > > The bandwidth setting is synchronized with VSYNC when we are switching > to lower bandwidth. This is required to ensure enough bandwidth for > the device since new settings are normally being applied in the hardware > synchronously with VSYNC. > > Co-developed-by: Artur Świgoń > Signed-off-by: Marek Szyprowski > Signed-off-by: Sylwester Nawrocki > --- > Changes for v7: > - fixed incorrect setting of the ICC bandwidth when the mixer is > disabled, now the bandwidth is set explicitly to 0 in such case. > > Changes for v6: > - the icc_set_bw() call is now only done when calculated value for > a crtc changes, this avoids unnecessary calls per each video frame > - added synchronization of the interconnect bandwidth setting with > the mixer VSYNC in order to avoid buffer underflow when we lower > the interconnect bandwidth when the hardware still operates with > previous mode settings that require higher bandwidth. This fixed > IOMMU faults observed e.g. during switching from two planes to > a single plane operation. > > Changes for v5: > - renamed soc_path variable to icc_path > --- > drivers/gpu/drm/exynos/exynos_mixer.c | 146 ++++++++++++++++++++++++++++++++-- > 1 file changed, 138 insertions(+), 8 deletions(-) [...] > @@ -1223,19 +1330,33 @@ static int mixer_probe(struct platform_device *pdev) > struct device *dev = &pdev->dev; > const struct mixer_drv_data *drv; > struct mixer_context *ctx; > + struct icc_path *path; > int ret; > > + /* > + * Returns NULL if CONFIG_INTERCONNECT is disabled. You could add here: or if "interconnects" property does not exist. Best regards, Krzysztof