<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - vaDriverInit fails with gallium/nouveau driver"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89969#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - vaDriverInit fails with gallium/nouveau driver"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89969">bug 89969</a>
from <span class="vcard"><a class="email" href="mailto:julien.isorce@gmail.com" title="Julien Isorce <julien.isorce@gmail.com>"> <span class="fn">Julien Isorce</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=117214" name="attach_117214" title="WIP - nouveau: add support for chunk decoding">attachment 117214</a> <a href="attachment.cgi?id=117214&action=edit" title="WIP - nouveau: add support for chunk decoding">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=89969&attachment=117214'>[review]</a>
WIP - nouveau: add support for chunk decoding
A: resize buffer in nvc0_decoder_bsp:
<a href="http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c#n73">http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c#n73</a>
B: memcpy of the data in nouveau_vp3_bsp:
<a href="http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c#n294">http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c#n294</a>
For radeon driver it both happens in ruvd_decode_bitstream.
To compare radeon to nouveau:
struct ruvd_decoder.bs_buffers is an array of struct rvid_buffer that hold a
ref on struct r600_resource, aka pipe_resource.
struct nouveau_vp3_decoder.bsp_bo is an array of struct nouveau_bo (which comes
from libdrm/nouveau library)
So if I am right, in the function nvc0_decoder_decode_bitstream it should
resize the nouveau_bo buffers and store current data, i.e. A and B.
So I made a patch that first splits nvc0_decoder_bsp to extract A and B into a
new function nvc0_decoder_bsp_next_chunk. The remaining part of
nvc0_decoder_bsp go to nvc0_decoder_bsp_end_frame.
I just realize the patch is missing the preserving part while resizing buffers
(equivalent of the memcpy in rvid_resize_buffer
<a href="http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/radeon/radeon_video.c#n100">http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/radeon/radeon_video.c#n100</a>)
that could explain why it is still not working.
But I wanted to know if I am on the right track or not ?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>