[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210305230222.GA28867@qmqm.qmqm.pl>
Date: Sat, 6 Mar 2021 00:02:22 +0100
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: Dmitry Osipenko <digetx@...il.com>
Cc: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Matt Merhar <mattmerhar@...tonmail.com>,
Peter Geis <pgwipeout@...il.com>,
Nicolas Chauvet <kwizart@...il.com>,
linux-tegra@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v13 1/2] drm/tegra: dc: Support memory bandwidth
management
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
Powered by blists - more mailing lists