]> git.baikalelectronics.ru Git - kernel.git/commit
[media] vivid: fix broken Bayer text rendering
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 22 Jan 2016 15:13:25 +0000 (13:13 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 1 Feb 2016 10:16:28 +0000 (08:16 -0200)
commit002af8e501179d813ba5119ca7a7f0b84f8fa05d
tree7c7135e337163d097396325277e7a061d2d91a7a
parent6295b92cb0c181319d674a1029cc049bde24568a
[media] vivid: fix broken Bayer text rendering

Sometimes when a Bayer pixelformat is selected the rendering of the OSD text
by vivid was all wrong: every other line of the text was shifted by half the width
or more.

It turned out that to render Bayer formats the interleaved boolean is set to true
in the tpg. This mode indicates a semi-biplanar mode where two interleaved planes
are used to render the frame. From outside the tpg it looks like a single plane,
but internally it is two planes.

However, in the tpg_s_bytesperline() function the interleaved bool wasn't checked
and only the bytesperline value for plane 0 was updated. But for the interleaved
mode the same value has to be copied to bytesperline[1] as well.

The effect was that whatever old value was left in bytesperline[1] was used, which
caused all sorts of weird and seemingly unpredictable shifts.

Reported-by: Ove Brynestad <ovebryne@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vivid/vivid-tpg.h