I wrote a program which call XvCreateImage function. With the i965 driver, If
the Image's size is more than 2000x2000, then the function (Line 113 in my
source file) will cause program exit without any prompt. With i915 driver, the
function work without error.
Attachment is the source file.
Created attachment 7611 [details]
Yeah, looks like we're exposing limits that are overly large for the memory we
set aside for video.
Wow, there are a few interesting bugs I found looking at this:
1) we'll always ultimately restrict the image to the overlay sizes (1980x1088
for i915-class) in the current code.
2) our overlay sizes are overly restrictive, as the hardware can do 2048x2048.
3) Above 1920x1088 (1080, but rounded up to a 16-pixel boundary to appease
software), we run into the limits of the bigrequests extension.
I've got fixes for 1) and 2) ready.
3) is the one being hit in particular by this bug. My plan is to reduce our xv
limits advertised to fit within the bigrequests limit. Then we can
independently change bigrequests if that's what we decide.
I'm not quite sure what config you've setup for your i915 vs i965, because they
can use textured video or hw overlay.
But as Eric says, the current driver (for hw overlay) restricts the size to
1920x1088. But in the case of textured overlay, it doesn't seem to - I think
that's a bug in the textured code.
You should be using XvQueryBestSize() to determine the limits so your app
It's true that the hw overlay can support upto 2048x2048, but I've not tested
the code and therefore that's why it's currently limited to 1920x1088.
Additionally, you need to ensure you are using the Option "LinearAlloc" to give
more memory to the overlay allocator. I suggest a value of 8192 which will give
8MB of memory to it.
Eric, why don't you limit the textured overlay size in I830QueryImageAttributes() ??
Oh, and allocating 1920x1088 works perfectly well with the LinearAlloc option,
so no need to go messing with bigrequests or reducing xv limits - please.
I see the limits are restricted as part of the pEncodings. So not to worry about
So anyway, if it's i965 that's causing a crash then it's textured video that has
a problem as hw overlay isn't supported on i965.
Assigning back to you Eric.
Sorry, Alan, not sure why this would have been assigned to you. I did fix it,
by setting all of our limits to 1920x1088, which is just under the bigrequests