Re: [Intel-gfx] [RFC/CI] drm/i915: Sanitize GuC client initialization

2017-02-14 Thread Joonas Lahtinen
On pe, 2017-02-10 at 14:36 +, Chris Wilson wrote: > On Fri, Feb 10, 2017 at 03:30:10PM +0200, Joonas Lahtinen wrote: > > > > +static unsigned long __reserve_cacheline(struct intel_guc* guc) > >  { > > - const uint32_t cacheline_size = cache_line_size(); > > - uint32_t offset; > > +

Re: [Intel-gfx] [RFC/CI] drm/i915: Sanitize GuC client initialization

2017-02-14 Thread Joonas Lahtinen
On pe, 2017-02-10 at 16:11 +0100, Michal Wajdeczko wrote: > On Fri, Feb 10, 2017 at 03:30:10PM +0200, Joonas Lahtinen wrote: > > > > Started adding proper teardown to guc_client_alloc, ended up removing > > quite a few dead ends where errors communicating with the GuC were > > silently ignored.

Re: [Intel-gfx] [RFC/CI] drm/i915: Sanitize GuC client initialization

2017-02-14 Thread Joonas Lahtinen
On pe, 2017-02-10 at 12:03 -0800, Daniele Ceraolo Spurio wrote: > > > > > > > > > + > > >  /* > > >   * Tell the GuC to allocate or deallocate a specific doorbell > > >   */ > > > > > > -static int guc_allocate_doorbell(struct intel_guc *guc, > > > -  struct

Re: [Intel-gfx] [RFC/CI] drm/i915: Sanitize GuC client initialization

2017-02-14 Thread Joonas Lahtinen
On pe, 2017-02-10 at 11:55 -0800, Daniele Ceraolo Spurio wrote: > > On 10/02/17 05:30, Joonas Lahtinen wrote: > > +static bool __test_doorbell(struct i915_guc_client *client) > > +{ > > + return test_bit(client->doorbell_id, client->guc->doorbell_bitmap); > > +} > > bikeshed: this helper is

Re: [Intel-gfx] [RFC/CI] drm/i915: Sanitize GuC client initialization

2017-02-10 Thread Daniele Ceraolo Spurio
+ /* * Tell the GuC to allocate or deallocate a specific doorbell */ -static int guc_allocate_doorbell(struct intel_guc *guc, -struct i915_guc_client *client) +static int __create_doorbell_hw(struct i915_guc_client *client) I would rather prefer to only

Re: [Intel-gfx] [RFC/CI] drm/i915: Sanitize GuC client initialization

2017-02-10 Thread Daniele Ceraolo Spurio
On 10/02/17 05:30, Joonas Lahtinen wrote: Started adding proper teardown to guc_client_alloc, ended up removing quite a few dead ends where errors communicating with the GuC were silently ignored. There also seemed to be quite a few erronous teardown actions performed in case of an error

Re: [Intel-gfx] [RFC/CI] drm/i915: Sanitize GuC client initialization

2017-02-10 Thread Michal Wajdeczko
On Fri, Feb 10, 2017 at 03:30:10PM +0200, Joonas Lahtinen wrote: > Started adding proper teardown to guc_client_alloc, ended up removing > quite a few dead ends where errors communicating with the GuC were > silently ignored. There also seemed to be quite a few erronous > teardown actions

Re: [Intel-gfx] [RFC/CI] drm/i915: Sanitize GuC client initialization

2017-02-10 Thread Chris Wilson
On Fri, Feb 10, 2017 at 03:30:10PM +0200, Joonas Lahtinen wrote: > +static unsigned long __reserve_cacheline(struct intel_guc* guc) > { > - const uint32_t cacheline_size = cache_line_size(); > - uint32_t offset; > + unsigned long offset; > > /* Doorbell uses a single cache

[Intel-gfx] [RFC/CI] drm/i915: Sanitize GuC client initialization

2017-02-10 Thread Joonas Lahtinen
Started adding proper teardown to guc_client_alloc, ended up removing quite a few dead ends where errors communicating with the GuC were silently ignored. There also seemed to be quite a few erronous teardown actions performed in case of an error (ordering wrong). Signed-off-by: Joonas Lahtinen