From: Eric Anholt <eric@anholt.net>
Cc: Boris Brezillon <boris.brezillon@bootlin.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/vc4: Prefer PPF over TPZ when dst >= 2/3 src
Date: Thu, 08 Nov 2018 07:18:48 -0800 [thread overview]
Message-ID: <87pnvfoaw7.fsf@anholt.net> (raw)
In-Reply-To: <20181024100505.22436-3-boris.brezillon@bootlin.com>
[-- Attachment #1.1: Type: text/plain, Size: 1085 bytes --]
Boris Brezillon <boris.brezillon@bootlin.com> writes:
> The HVS spec recommends using PPF when the downscaling ratio is
> between 2/3 and 1. Let's modify vc4_get_scaling_mode() to follow this
> recommendation.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> ---
> drivers/gpu/drm/vc4/vc4_plane.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
> index 5950e6b6b7f0..1d0d91e50aaf 100644
> --- a/drivers/gpu/drm/vc4/vc4_plane.c
> +++ b/drivers/gpu/drm/vc4/vc4_plane.c
> @@ -129,12 +129,12 @@ static const struct hvs_format *vc4_get_hvs_format(u32 drm_format)
>
> static enum vc4_scaling_mode vc4_get_scaling_mode(u32 src, u32 dst)
> {
> - if (dst > src)
> + if (dst == src)
> + return VC4_SCALING_NONE;
> + if (3 * dst >= 2 * src)
> return VC4_SCALING_PPF;
> - else if (dst < src)
> - return VC4_SCALING_TPZ;
> else
> - return VC4_SCALING_NONE;
> + return VC4_SCALING_TPZ;
> }
Reviewed-by: Eric Anholt <eric@anholt.net>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-11-08 15:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 10:05 [PATCH 1/3] drm/vc4: Set PPF scaling when the source image is only vertically scaled Boris Brezillon
2018-10-24 10:05 ` [PATCH 2/3] drm/vc4: Force ->x_scaling[1] should never be set to VC4_SCALING_NONE Boris Brezillon
2018-10-24 10:06 ` Boris Brezillon
2018-11-08 14:52 ` Eric Anholt
2018-11-08 14:56 ` Boris Brezillon
2018-11-08 15:12 ` Eric Anholt
2018-11-12 10:20 ` Dave Stevenson
2018-11-12 10:24 ` Boris Brezillon
2018-10-24 10:05 ` [PATCH 3/3] drm/vc4: Prefer PPF over TPZ when dst >= 2/3 src Boris Brezillon
2018-11-08 15:18 ` Eric Anholt [this message]
2018-10-24 15:02 ` [PATCH 1/3] drm/vc4: Set PPF scaling when the source image is only vertically scaled Boris Brezillon
2018-11-07 17:08 ` Eric Anholt
2018-11-08 9:41 ` Boris Brezillon
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=87pnvfoaw7.fsf@anholt.net \
--to=eric@anholt.net \
--cc=boris.brezillon@bootlin.com \
--cc=dri-devel@lists.freedesktop.org \
/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