OSDN Git Service

modetest: initialize handles/pitches in set_plane()
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Mon, 20 Apr 2015 19:50:45 +0000 (21:50 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 28 Apr 2015 10:23:14 +0000 (11:23 +0100)
commitb1d19de76468fdb4ae7cb87791c77d1f8839a573
tree014233f11e183551041346eaa49c989db07407a2
parent0c8db0a563857239cfe2b38df1590c571db5a1f1
modetest: initialize handles/pitches in set_plane()

Only the 'offsets' array was initialized to zero.
Since bo_create only sets the handles which are
necessary, were we passing garbage data to the
kernel when calling drmModeAddFB2 later.

The issue only seems to appear when passing e.g.
NV12 data to the kernel, a case where not only
handles[0] is used. I therefore also removed the
corresponding comment.

v2: Do the same for set_mode(), set_cursors()
    and test_page_flip().

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
tests/modetest/modetest.c