Skip to content

Conversation

@popcornmix
Copy link
Collaborator

Spec says "Note that there is not an extra mode to save memory for alpha-less formats" in the TPZ section.

Curently, if first plane is RGB888 and scaled down (TPZ) a second plane will corrupt the LBM and result in garbage

I've also folded in the modification to components to the function as it seems misplaced

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>
Copy link
Contributor

@6by9 6by9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit pick over the comment, but I'm happy with this change.

Nasty that they tucked the comment about there not being a non-alpha TPZ mode into one of the examples :-(


if (info->has_alpha)
// spec says "Note that there is not an extra mode to save memory
// for alpha-less formats" in the TPZ section
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit text is sufficient via git blame, so no need for this comment that checkpatch complain had about the length of, and is now a multi-line using // (should be /* */).

spec says "Note that there is not an extra mode to save memory
for alpha-less formats" in the TPZ section.

Currently, if first plane is RGB888 and scaled down (TPZ)
a second plane will corrupt the LBM and result in garbage

I've also folded in the modification to components to the
function as it seems misplaced

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
@popcornmix
Copy link
Collaborator Author

Nasty that they tucked the comment about there not being a non-alpha TPZ mode into one of the examples :-(

Indeed. It was well hidden away.

Removed the comment.

@popcornmix
Copy link
Collaborator Author

@pelwell any objection?

@pelwell
Copy link
Contributor

pelwell commented Dec 4, 2025

None from me - when I looked yesterday the auto-builds were still active. I wish GitHub had a "Merge when it passes" button.

@pelwell pelwell merged commit a8c4c46 into raspberrypi:rpi-6.12.y Dec 4, 2025
12 checks passed
@popcornmix popcornmix deleted the tpz_alpha branch December 4, 2025 15:06
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Dec 8, 2025
kernel: media: i2c: imx477: Correct IMX477_REG_TEST_PATTERN to be 16bit
See: raspberrypi/linux#7162

kernel: dtoverlay for Ilitek 23XX, 25XX, and 213X touch controllers
See: raspberrypi/linux#7146

kernel: drm/vc4: plane: TPZ scaling modes cannot reduce lbm size when alpha-less
See: raspberrypi/linux#7164
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Dec 8, 2025
kernel: media: i2c: imx477: Correct IMX477_REG_TEST_PATTERN to be 16bit
See: raspberrypi/linux#7162

kernel: dtoverlay for Ilitek 23XX, 25XX, and 213X touch controllers
See: raspberrypi/linux#7146

kernel: drm/vc4: plane: TPZ scaling modes cannot reduce lbm size when alpha-less
See: raspberrypi/linux#7164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants