Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-05-16 Thread Mateo Lozano, Oscar
-Original Message- From: Ville Syrjälä [mailto:ville.syrj...@linux.intel.com] Sent: Thursday, May 15, 2014 2:34 PM To: Mateo Lozano, Oscar Cc: Daniel Vetter; intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-05-15 Thread Mateo Lozano, Oscar
But looking at the code a better way should be: 1. Create new bo, wrap it in a kms fb. 2. Slap busy load onto that bo, e.g. reapeatedly fill it with the blitter. 3. Enable evil interruptor (igt_fork_signal_helper). 4. Submit pageflip - Boom since the set_cache_level will block, get

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-05-15 Thread Ville Syrjälä
On Thu, May 15, 2014 at 01:14:54PM +, Mateo Lozano, Oscar wrote: But looking at the code a better way should be: 1. Create new bo, wrap it in a kms fb. 2. Slap busy load onto that bo, e.g. reapeatedly fill it with the blitter. 3. Enable evil interruptor (igt_fork_signal_helper).

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-05-15 Thread Daniel Vetter
On Thu, May 15, 2014 at 01:14:54PM +, Mateo Lozano, Oscar wrote: But looking at the code a better way should be: 1. Create new bo, wrap it in a kms fb. 2. Slap busy load onto that bo, e.g. reapeatedly fill it with the blitter. 3. Enable evil interruptor (igt_fork_signal_helper).

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-05-12 Thread Mateo Lozano, Oscar
Hi Daniel, Sorry, this fell through the cracks: Subject: Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display On Wed, Apr 02, 2014 at 07:21:01PM +0100, oscar.ma...@intel.com wrote: From: Oscar Mateo oscar.ma...@intel.com Otherwise, we do a NULL

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-05-12 Thread Chris Wilson
On Mon, May 12, 2014 at 09:05:45AM +, Mateo Lozano, Oscar wrote: Hi Daniel, Sorry, this fell through the cracks: Subject: Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display On Wed, Apr 02, 2014 at 07:21:01PM +0100,

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-05-12 Thread Mateo Lozano, Oscar
- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 -Original Message- From: Chris Wilson [mailto:ch...@chris-wilson.co.uk] Sent:

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-05-12 Thread Chris Wilson
On Mon, May 12, 2014 at 10:30:11AM +, Mateo Lozano, Oscar wrote: Did you consider my alternative fix of restoring the old value in the error path? Is that directed to Daniel or me? Restoring the old value is way easier, but I thought you wanted to keep is_pin_display as a theory of

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-05-12 Thread Daniel Vetter
On Mon, May 12, 2014 at 09:05:45AM +, Mateo Lozano, Oscar wrote: Hi Daniel, Sorry, this fell through the cracks: Subject: Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display On Wed, Apr 02, 2014 at 07:21:01PM +0100,

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-05-12 Thread Mateo Lozano, Oscar
I call this review by asking for an igt ;-) -Daniel Ok, I´ll give it a try. At least I will learn something about the kms code, a.k.a. learning by igt :D ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-04-03 Thread Daniel Vetter
On Wed, Apr 02, 2014 at 07:21:01PM +0100, oscar.ma...@intel.com wrote: From: Oscar Mateo oscar.ma...@intel.com Otherwise, we do a NULL pointer dereference. I've seen this happen while handling an error in i915_gem_object_pin_to_display_plane(): If i915_gem_object_set_cache_level()

[Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-04-02 Thread oscar . mateo
From: Oscar Mateo oscar.ma...@intel.com Otherwise, we do a NULL pointer dereference. I've seen this happen while handling an error in i915_gem_object_pin_to_display_plane(): If i915_gem_object_set_cache_level() fails, we call is_pin_display() to handle the error. At this point, the object is

Re: [Intel-gfx] [PATCH] drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

2014-04-02 Thread Chris Wilson
On Wed, Apr 02, 2014 at 07:21:01PM +0100, oscar.ma...@intel.com wrote: From: Oscar Mateo oscar.ma...@intel.com Otherwise, we do a NULL pointer dereference. Or we could just do was_pin_display = obj-pin_display; obj-pin_display = true; err_unpin_display: obj-pin_display = was_pin_display;