mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
drm/vc4: Make vc4_lbm_size() return 0 when vertical scaling is disabled
LBM is not needed when vertical scaling is disabled. Return 0 in this case to avoid allocating LBM memory that will anyway be unused. While at it, drop the test on ->is_unity which is now redundant. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-1-boris.brezillon@bootlin.com
This commit is contained in:
parent
22be874012
commit
b2e554d4df
1 changed files with 6 additions and 3 deletions
|
@ -395,10 +395,13 @@ static u32 vc4_lbm_size(struct drm_plane_state *state)
|
||||||
u32 pix_per_line = max(vc4_state->src_w[0], (u32)vc4_state->crtc_w);
|
u32 pix_per_line = max(vc4_state->src_w[0], (u32)vc4_state->crtc_w);
|
||||||
u32 lbm;
|
u32 lbm;
|
||||||
|
|
||||||
if (!vc4_state->is_yuv) {
|
/* LBM is not needed when there's no vertical scaling. */
|
||||||
if (vc4_state->is_unity)
|
if (vc4_state->y_scaling[0] == VC4_SCALING_NONE &&
|
||||||
|
vc4_state->y_scaling[1] == VC4_SCALING_NONE)
|
||||||
return 0;
|
return 0;
|
||||||
else if (vc4_state->y_scaling[0] == VC4_SCALING_TPZ)
|
|
||||||
|
if (!vc4_state->is_yuv) {
|
||||||
|
if (vc4_state->y_scaling[0] == VC4_SCALING_TPZ)
|
||||||
lbm = pix_per_line * 8;
|
lbm = pix_per_line * 8;
|
||||||
else {
|
else {
|
||||||
/* In special cases, this multiplier might be 12. */
|
/* In special cases, this multiplier might be 12. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue