Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c76abab5 authored by Ayan Kumar Halder's avatar Ayan Kumar Halder
Browse files

drm: Use horizontal and vertical chroma subsampling factor while calculating...


drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer

For multi-planar formats, while calculating offsets in planes with index greater than 0
(ie second plane, third plane, etc), one needs to divide (src_x * cpp) with horizontal
chroma subsampling factor and (src_y * pitch) with vertical chroma subsampling factor.

The reason being that the planes contain subsampled (ie reduced) data (by a factor of 2) and thus
while calculating the byte position coresponding to the x and y co-ordinates, one needs to
divide it with the sampling factor.

Signed-off-by: default avatarAyan Kumar halder <ayan.halder@arm.com>
Reviewed-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.kernel.org/patch/10569263/
parent 065e8c8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment