From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org Subject: [Bug 89969] vaDriverInit fails with gallium/nouveau driver Date: Fri, 17 Jul 2015 23:08:26 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0049924379==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Nouveau" To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============0049924379== Content-Type: multipart/alternative; boundary="1437174506.BB30FbB2.29698"; charset="UTF-8" --1437174506.BB30FbB2.29698 Date: Fri, 17 Jul 2015 23:08:26 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89969 --- Comment #8 from Julien Isorce --- Created attachment 117214 --> https://bugs.freedesktop.org/attachment.cgi?id=117214&action=edit WIP - nouveau: add support for chunk decoding A: resize buffer in nvc0_decoder_bsp: http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c#n73 B: memcpy of the data in nouveau_vp3_bsp: http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c#n294 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 http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/radeon/radeon_video.c#n100) that could explain why it is still not working. But I wanted to know if I am on the right track or not ? -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. --1437174506.BB30FbB2.29698 Date: Fri, 17 Jul 2015 23:08:26 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 8 on bug 89969 from
Created attachment 117214 [details] [review]
WIP - nouveau: add support for chunk decoding


A: resize buffer in nvc0_decoder_bsp:
http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c#n73

B: memcpy of the data in nouveau_vp3_bsp:
http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c#n294

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
http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/radeon/radeon_video.c#n100)
that could explain why it is still not working.

But I wanted to know if I am on the right track or not ?


You are receiving this mail because:
  • You are the QA Contact for the bug.
  • You are the assignee for the bug.
--1437174506.BB30FbB2.29698-- --===============0049924379== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTm91dmVhdSBt YWlsaW5nIGxpc3QKTm91dmVhdUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cDovL2xpc3RzLmZy ZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL25vdXZlYXUK --===============0049924379==--