Skip to content

Commit 8b6719f

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 987b6b7 commit 8b6719f

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
@@ -815,11 +815,8 @@ static unsigned int vc4_lbm_channel_size(const struct drm_plane_state *state,
815815
unsigned int channel)
816816
{
817817
const struct drm_format_info *info = state->fb->format;
818-
const struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
819-
unsigned int channels_scaled = 0;
820818
unsigned int components, words, wpc;
821819
unsigned int width, lines;
822-
unsigned int i;
823820

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

847844
lines = DIV_ROUND_UP(words, 128 / info->hsub);
848845

849-
for (i = 0; i < 2; i++)
850-
if (vc4_state->y_scaling[channel] != VC4_SCALING_NONE)
851-
channels_scaled++;
852-
853-
if (channels_scaled == 1)
854-
lines = lines / 2;
855-
856846
return lines;
857847
}
858848

0 commit comments

Comments
 (0)