From: Dmitry Osipenko <digetx@gmail.com>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Matt Merhar <mattmerhar@protonmail.com>,
Peter Geis <pgwipeout@gmail.com>,
Nicolas Chauvet <kwizart@gmail.com>,
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
Date: Mon, 8 Mar 2021 17:20:54 +0300 [thread overview]
Message-ID: <5cc7aaa9-1168-64ba-f311-2f27038dcf4a@gmail.com> (raw)
In-Reply-To: <20210305230222.GA28867@qmqm.qmqm.pl>
06.03.2021 02:02, Michał Mirosław пишет:
> 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)?
Seems you're right, it's actually not the bandwidth. Recently I added
memory client statistics gathering support to grate-kernel for Tegra20
and it shows that the consumed bandwidth is actually lower when plane is
downscaled.
So it should be the latency, which depends on memory frequency, and
thus, on bandwidth. I'll try to improve comment to the code in the next
version, thanks.
next prev parent reply other threads:[~2021-03-08 14:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 12:44 [PATCH v13 0/2] Add memory bandwidth management to NVIDIA Tegra DRM driver Dmitry Osipenko
2021-03-02 12:44 ` [PATCH v13 1/2] drm/tegra: dc: Support memory bandwidth management Dmitry Osipenko
2021-03-03 23:08 ` Michał Mirosław
2021-03-04 21:45 ` Dmitry Osipenko
2021-03-05 23:02 ` Michał Mirosław
2021-03-08 14:20 ` Dmitry Osipenko [this message]
2021-03-02 12:44 ` [PATCH v13 2/2] drm/tegra: dc: Extend debug stats with total number of events Dmitry Osipenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5cc7aaa9-1168-64ba-f311-2f27038dcf4a@gmail.com \
--to=digetx@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=kwizart@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mattmerhar@protonmail.com \
--cc=mirq-linux@rere.qmqm.pl \
--cc=pgwipeout@gmail.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome