mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
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 <popcornmix@gmail.com>
This commit is contained in:
@@ -812,11 +812,8 @@ static unsigned int vc4_lbm_channel_size(const struct drm_plane_state *state,
|
||||
unsigned int channel)
|
||||
{
|
||||
const struct drm_format_info *info = state->fb->format;
|
||||
const struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
|
||||
unsigned int channels_scaled = 0;
|
||||
unsigned int components, words, wpc;
|
||||
unsigned int width, lines;
|
||||
unsigned int i;
|
||||
|
||||
/* LBM is meant to use the smaller of source or dest width, but there
|
||||
* 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,
|
||||
|
||||
lines = DIV_ROUND_UP(words, 128 / info->hsub);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
if (vc4_state->y_scaling[channel] != VC4_SCALING_NONE)
|
||||
channels_scaled++;
|
||||
|
||||
if (channels_scaled == 1)
|
||||
lines = lines / 2;
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user