[Intel-gfx] [PATCH] drm/i915: Unset mmap_offset on failure path.

2010-07-10 Thread Chris Wilson
If we fail to correctly setup the mapping for an object, make sure that
we nullify the pointer within the object after tearing down. Otherwise,
we may later attempt to reuse the invalid pointer...

Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk
Cc: sta...@kernel.org
---
 drivers/gpu/drm/i915/i915_gem.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 52643dd..ed2803f 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1261,6 +1261,7 @@ out_free_mm:
drm_mm_put_block(list-file_offset_node);
 out_free_list:
kfree(list-map);
+   list-map = NULL;
 
return ret;
 }
-- 
1.7.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] XV image size limits on 965G

2010-07-10 Thread Alexander E. Patrakov

 Hello.

As you probably know, YouTube started supporting 4K videos (i.e., those 
with resolution of 4096x2304). The downloaded copies of these videos 
play fine with mplayer -vo gl (provided that the CPU is powerful enough 
- but even an old Core 2 Duo E6420 @ 2.13 GHz is enough), but not with 
-vo xv. This happens because both XV adaptors on 965G (overlay and 
textured) have an image size limit of 2048x2048, and that is not enough.


(the fact that there is a version of the same movie more suitable for my 
monitor is ignored for the purposes of this mail)


Do I understand correctly that in the end, both gl and xv textured 
adaptor use the same hardware for scaling and colorspace conversion? If 
so, why do they have different limitations?


P.S. I tried to change IMAGE_MAX_{WIDTH,HEIGHT} in src/i830_video.c to 
4096. Result: textured video fails with BadAlloc (obviously, I have to 
change something else), overlay video mostly works (sometimes stutters - 
i.e., displays frames n, n+1, n+2, n+3, n+2, n+3, n+2, n+3, n+4, ...).


--
Alexander E. Patrakov

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx