Skip to content

Commit d04e379

Browse files
popcornmixpelwell
authored andcommitted
drm/vc4: plane: Remove dead channels_scaled code
This code can never do anything, as channels_scaled can only be 0 or 2. I suspect that the index was intended to be i rather than channel, but that would trigger for scaled RGB planes, and halving lines is not wanted there. Just remove it. Signed-off-by: Dom Cobley <[email protected]>
1 parent e8017d9 commit d04e379

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

drivers/gpu/drm/vc4/vc4_plane.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -812,11 +812,8 @@ static unsigned int vc4_lbm_channel_size(const struct drm_plane_state *state,
812812
unsigned int channel)
813813
{
814814
const struct drm_format_info *info = state->fb->format;
815-
const struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
816-
unsigned int channels_scaled = 0;
817815
unsigned int components, words, wpc;
818816
unsigned int width, lines;
819-
unsigned int i;
820817

821818
/* LBM is meant to use the smaller of source or dest width, but there
822819
* is a issue with UV scaling that the size required for the second
@@ -843,13 +840,6 @@ static unsigned int vc4_lbm_channel_size(const struct drm_plane_state *state,
843840

844841
lines = DIV_ROUND_UP(words, 128 / info->hsub);
845842

846-
for (i = 0; i < 2; i++)
847-
if (vc4_state->y_scaling[channel] != VC4_SCALING_NONE)
848-
channels_scaled++;
849-
850-
if (channels_scaled == 1)
851-
lines = lines / 2;
852-
853843
return lines;
854844
}
855845

0 commit comments

Comments
 (0)