Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp78837pxb; Fri, 5 Mar 2021 15:05:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAuUZhu2BtMOclZxr+Yvc4Nf8XuIpTU5hJ71kq2Pkt+qVR+QDXMZkmbvAEhl/yvFDjBtGr X-Received: by 2002:a17:906:b14d:: with SMTP id bt13mr4504325ejb.407.1614985532437; Fri, 05 Mar 2021 15:05:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614985532; cv=none; d=google.com; s=arc-20160816; b=nHnmoL8Aq1u8psIWXimf3oXHHj5Cfdm5R2UeWXry7pW0r+7hoxOWrceUi1p0hOBf7r n2aXmWro/0hNBEYO8sxCSn8JmHBo16/3k43xsjeEG+j1UbUdTHs34nC6zXPGi0TDNdXk aUGoU4mM/40DLtjvUStzOsjtVw5Eg6/A7ymso0b2LH6T5IT5qDV9D+P0AHljYMz9WHvb 23X4DBWegSj6BiUUIy/nrLV9IX9rzqRR9jyfDrnTS1jhD9pG4w50CSEmx+q4V1S9r9AJ lS4QpM2LlNUaUZGfypTdQYKot6LyPKtJBrWlXjBfEoVa6hlT5MtzCFfYZOaydSglaW7j 73WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HbhZrTcVJjJqnXMWVpPeACjaBf//NdhTXZSPXXjENoA=; b=a/i2anUWCcGYwhMrz5P8lfvKP8JCA1F3GIHuxzHbsOsQoQA3g6YFRdj++nOGT2iG5J XkJHG/4chxQZ74ShSIdPski+JTRz4F0G4nUNQKJVm2HII6k9Zxj+haweFhZ8Tw8Ne6Rw jX8KvNvThlwkk5r9AtoXQLWdstZkVmjQVnhHCRQxTbsQby7CAlq6mBrjHi5VlesHCdXX GfkuLbitj4mCz773j9WEHCvbvCKIcZ7i4DH1s031hCl7ZSDW94sEjA5xnz4MKoBiChRL UCI0ULz4JAYz1UuUUiWP4/CUu0sPH9rOZLM2nKNZcF41/Z3nKUpNsIBtz7Xb/jTSzVWS aRTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=oQId8WMf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o4si2461729edc.426.2021.03.05.15.04.40; Fri, 05 Mar 2021 15:05:32 -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=@rere.qmqm.pl header.s=1 header.b=oQId8WMf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229740AbhCEXDG (ORCPT + 99 others); Fri, 5 Mar 2021 18:03:06 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:32669 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbhCEXCe (ORCPT ); Fri, 5 Mar 2021 18:02:34 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4Dsjtb56rBzL0; Sat, 6 Mar 2021 00:02:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1614985352; bh=SZHwnu6Rhn8QiMnEN2V1F4jUIvqNotWt5soGJPrBegA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oQId8WMfqBoaRrfZPG9CkUf0ZVKeWwczfSPSv0TOjPq4wAk55pdhc9Ew+V+8lPSCH wR/HYFeMgFz63iYdebjAfc25Ui8cYBPeLUWgyRarMOH8GPzCx1XcoMeuetALOveUeb F/BYmh5JP3VsdTW+4JtEzJAg+X4fmmIL3MyvGXJSOz/EkyQFeJPRWQzaijxbq/3HMy mMgXbpOXMYC5J1H003FVZf2IP2WWemzYzbw3vkpKBP3H8RW991gZHSDohXnSlmY/ow eDpRzkIREhXZfJ4nyAmM3yj8lvnlij5N35ftdWwCULVuL8DhAy0VCYUPbzkTZshKoc B0P2pde08URTw== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Sat, 6 Mar 2021 00:02:22 +0100 From: =?iso-8859-2?Q?Micha=B3_Miros=B3aw?= To: Dmitry Osipenko Cc: Thierry Reding , Jonathan Hunter , Matt Merhar , Peter Geis , Nicolas Chauvet , linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v13 1/2] drm/tegra: dc: Support memory bandwidth management Message-ID: <20210305230222.GA28867@qmqm.qmqm.pl> References: <20210302124445.29444-1-digetx@gmail.com> <20210302124445.29444-2-digetx@gmail.com> <20210303230827.GA22628@qmqm.qmqm.pl> <1b352c7e-cc72-ba08-32ba-08c05cc3aa03@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1b352c7e-cc72-ba08-32ba-08c05cc3aa03@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 05, 2021 at 12:45:51AM +0300, Dmitry Osipenko wrote: > 04.03.2021 02:08, Michał Mirosław пишет: > > On Tue, Mar 02, 2021 at 03:44:44PM +0300, Dmitry Osipenko wrote: > >> Display controller (DC) performs isochronous memory transfers, and thus, > >> has a requirement for a minimum memory bandwidth that shall be fulfilled, > >> otherwise framebuffer data can't be fetched fast enough and this results > >> in a DC's data-FIFO underflow that follows by a visual corruption. [...] > >> + /* > >> + * Horizontal downscale takes extra bandwidth which roughly depends > >> + * on the scaled width. > >> + */ > >> + if (src_w > dst_w) > >> + mul = (src_w - dst_w) * bpp / 2048 + 1; > >> + else > >> + mul = 1; > > > > Does it really need more bandwidth to scale down? Does it read the same > > data multiple times just to throw it away? > The hardware isn't optimized for downscale, it indeed takes more > bandwidth. You'll witness a severe underflow of plane's memory FIFO > buffer on trying to downscale 1080p plane to 50x50. [...] In your example, does it really need 16x the bandwidth compared to no scaling case? The naive way to implement downscaling would be to read all the pixels and only take every N-th. Maybe the problem is that in downscaling mode the latency requirements are tighter? Why would bandwidth required be proportional to a difference between the widths (instead e.g. to src/dst or dst*cacheline_size)? Best Regards Michał Mirosław