Commit eb8dd3ab authored by Boris Brezillon's avatar Boris Brezillon

drm/vc4: Prefer PPF over TPZ when dst >= 2/3 src

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: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20181109102633.32603-2-boris.brezillon@bootlin.com
parent 0560054d
...@@ -129,12 +129,12 @@ static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) ...@@ -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) 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; return VC4_SCALING_PPF;
else if (dst < src)
return VC4_SCALING_TPZ;
else else
return VC4_SCALING_NONE; return VC4_SCALING_TPZ;
} }
static bool plane_enabled(struct drm_plane_state *state) static bool plane_enabled(struct drm_plane_state *state)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment