Re: [Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-15 Thread Hans de Goede
Hi, On 13-01-17 17:30, Ville Syrjälä wrote: On Fri, Jan 13, 2017 at 05:06:52PM +0100, Hans de Goede wrote: Hi, On 01/13/2017 10:26 AM, Ville Syrjälä wrote: On Mon, Jan 02, 2017 at 03:21:13PM +0100, Hans de Goede wrote: Hi, On 02-01-17 15:12, Ville Syrjälä wrote: On Sun, Jan 01, 2017 at 09:

Re: [Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-13 Thread Ville Syrjälä
On Fri, Jan 13, 2017 at 05:06:52PM +0100, Hans de Goede wrote: > Hi, > > On 01/13/2017 10:26 AM, Ville Syrjälä wrote: > > On Mon, Jan 02, 2017 at 03:21:13PM +0100, Hans de Goede wrote: > >> Hi, > >> > >> On 02-01-17 15:12, Ville Syrjälä wrote: > >>> On Sun, Jan 01, 2017 at 09:14:00PM +0100, Hans d

Re: [Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-13 Thread Hans de Goede
Hi, On 01/13/2017 10:26 AM, Ville Syrjälä wrote: On Mon, Jan 02, 2017 at 03:21:13PM +0100, Hans de Goede wrote: Hi, On 02-01-17 15:12, Ville Syrjälä wrote: On Sun, Jan 01, 2017 at 09:14:00PM +0100, Hans de Goede wrote: The punit on baytrail / cherrytrail systems is not only accessed through

Re: [Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-13 Thread Ville Syrjälä
On Fri, Jan 13, 2017 at 01:12:15PM +0200, Jarkko Nikula wrote: > On 01/13/2017 12:51 PM, Ville Syrjälä wrote: > > On Fri, Jan 13, 2017 at 12:34:54PM +0200, Jarkko Nikula wrote: > >> On 01/13/2017 11:26 AM, Ville Syrjälä wrote: > >>> It also feels quite hand wavy since the punit could do whatever at

Re: [Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-13 Thread Jarkko Nikula
On 01/13/2017 12:51 PM, Ville Syrjälä wrote: On Fri, Jan 13, 2017 at 12:34:54PM +0200, Jarkko Nikula wrote: On 01/13/2017 11:26 AM, Ville Syrjälä wrote: It also feels quite hand wavy since the punit could do whatever at any time AFAIK. Eg. if there's some thermal event or something the punit mi

Re: [Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-13 Thread Ville Syrjälä
On Fri, Jan 13, 2017 at 12:34:54PM +0200, Jarkko Nikula wrote: > On 01/13/2017 11:26 AM, Ville Syrjälä wrote: > > It also feels quite hand wavy since the punit could do whatever at > > any time AFAIK. Eg. if there's some thermal event or something the > > punit might kick into action. So trying to

Re: [Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-13 Thread Jarkko Nikula
On 01/13/2017 11:26 AM, Ville Syrjälä wrote: It also feels quite hand wavy since the punit could do whatever at any time AFAIK. Eg. if there's some thermal event or something the punit might kick into action. So trying to protect this from the OS side might not be able to avoid these problems ent

Re: [Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-13 Thread Ville Syrjälä
On Mon, Jan 02, 2017 at 03:21:13PM +0100, Hans de Goede wrote: > Hi, > > On 02-01-17 15:12, Ville Syrjälä wrote: > > On Sun, Jan 01, 2017 at 09:14:00PM +0100, Hans de Goede wrote: > >> The punit on baytrail / cherrytrail systems is not only accessed through > >> the iosf_mbi functions, but also by

Re: [Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-02 Thread Hans de Goede
Hi, On 02-01-17 15:12, Ville Syrjälä wrote: On Sun, Jan 01, 2017 at 09:14:00PM +0100, Hans de Goede wrote: The punit on baytrail / cherrytrail systems is not only accessed through the iosf_mbi functions, but also by the i915 code. Add a mutex to protect the punit against simultaneous accesses a

Re: [Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-02 Thread Ville Syrjälä
On Sun, Jan 01, 2017 at 09:14:00PM +0100, Hans de Goede wrote: > The punit on baytrail / cherrytrail systems is not only accessed through > the iosf_mbi functions, but also by the i915 code. Add a mutex to protect > the punit against simultaneous accesses and 2 functions to lock / unlock > this mut

[Intel-gfx] [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access

2017-01-01 Thread Hans de Goede
The punit on baytrail / cherrytrail systems is not only accessed through the iosf_mbi functions, but also by the i915 code. Add a mutex to protect the punit against simultaneous accesses and 2 functions to lock / unlock this mutex. Signed-off-by: Hans de Goede --- arch/x86/include/asm/iosf_mbi.h