[Intel-gfx] [PATCH 2/5] drm: Define a work struct for scheduling a uevent for modeset retry

2016-10-25 Thread Daniel Vetter
On Tue, Oct 25, 2016 at 06:30:29AM +, Pandiyan, Dhinakaran wrote:
> On Mon, 2016-10-24 at 23:28 -0700, Manasi Navare wrote:
> > On Sat, Oct 22, 2016 at 10:48:13AM +0200, Daniel Vetter wrote:
> > > On Fri, Oct 21, 2016 at 04:45:40PM -0700, Manasi Navare wrote:
> > > > This work struct will be used to schedule a uevent on a separate
> > > > thread. This will be scheduled after a link train failure during modeset
> > > > to indicate a modeset retry request. It will get executed after the
> > > > current modeset is complete and all locks are released. This was
> > > > required to avoid deadlock.
> > > > 
> > > > Cc: dri-devel at lists.freedesktop.org
> > > > Cc: Jani Nikula 
> > > > Cc: Daniel Vetter 
> > > > Cc: Ville Syrjala 
> > > > 
> > > > Signed-off-by: Manasi Navare 
> > > > ---
> > > >  include/drm/drm_connector.h | 5 +
> > > >  1 file changed, 5 insertions(+)
> > > > 
> > > > diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> > > > index ac9d7d8..fcf6b97 100644
> > > > --- a/include/drm/drm_connector.h
> > > > +++ b/include/drm/drm_connector.h
> > > > @@ -682,6 +682,11 @@ struct drm_connector {
> > > > uint8_t num_h_tile, num_v_tile;
> > > > uint8_t tile_h_loc, tile_v_loc;
> > > > uint16_t tile_h_size, tile_v_size;
> > > > +
> > > > +   /* Work struct to schedule a uevent on link train failure for
> > > > +* DisplayPort.
> > > > +*/
> > > > +   struct work_struct i915_modeset_retry_work;
> > > 
> > > You cannot put i915 stuff into core structs.
> > > -Daniel
> > > 
> > > >  };
> > 
> > I will rename it to use modeset_retry_work instead.
> > 
> > Manasi
> 
> 
> Why not move it struct intel_connector? The work function is defined in
> intel_dp.c afaict

Yeah, the place is wrong, not just the name.
-Daniel
> 
> -DK
> > > >  
> > > >  #define obj_to_connector(x) container_of(x, struct drm_connector, base)
> > > > -- 
> > > > 1.9.1
> > > > 
> > > > ___
> > > > Intel-gfx mailing list
> > > > Intel-gfx at lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > > 
> > > -- 
> > > Daniel Vetter
> > > Software Engineer, Intel Corporation
> > > http://blog.ffwll.ch
> > ___
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


[Intel-gfx] [PATCH 2/5] drm: Define a work struct for scheduling a uevent for modeset retry

2016-10-25 Thread Pandiyan, Dhinakaran
On Mon, 2016-10-24 at 23:28 -0700, Manasi Navare wrote:
> On Sat, Oct 22, 2016 at 10:48:13AM +0200, Daniel Vetter wrote:
> > On Fri, Oct 21, 2016 at 04:45:40PM -0700, Manasi Navare wrote:
> > > This work struct will be used to schedule a uevent on a separate
> > > thread. This will be scheduled after a link train failure during modeset
> > > to indicate a modeset retry request. It will get executed after the
> > > current modeset is complete and all locks are released. This was
> > > required to avoid deadlock.
> > > 
> > > Cc: dri-devel at lists.freedesktop.org
> > > Cc: Jani Nikula 
> > > Cc: Daniel Vetter 
> > > Cc: Ville Syrjala 
> > > 
> > > Signed-off-by: Manasi Navare 
> > > ---
> > >  include/drm/drm_connector.h | 5 +
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> > > index ac9d7d8..fcf6b97 100644
> > > --- a/include/drm/drm_connector.h
> > > +++ b/include/drm/drm_connector.h
> > > @@ -682,6 +682,11 @@ struct drm_connector {
> > >   uint8_t num_h_tile, num_v_tile;
> > >   uint8_t tile_h_loc, tile_v_loc;
> > >   uint16_t tile_h_size, tile_v_size;
> > > +
> > > + /* Work struct to schedule a uevent on link train failure for
> > > +  * DisplayPort.
> > > +  */
> > > + struct work_struct i915_modeset_retry_work;
> > 
> > You cannot put i915 stuff into core structs.
> > -Daniel
> > 
> > >  };
> 
> I will rename it to use modeset_retry_work instead.
> 
> Manasi


Why not move it struct intel_connector? The work function is defined in
intel_dp.c afaict

-DK
> > >  
> > >  #define obj_to_connector(x) container_of(x, struct drm_connector, base)
> > > -- 
> > > 1.9.1
> > > 
> > > ___
> > > Intel-gfx mailing list
> > > Intel-gfx at lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > 
> > -- 
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch
> ___
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Intel-gfx] [PATCH 2/5] drm: Define a work struct for scheduling a uevent for modeset retry

2016-10-25 Thread Manasi Navare
On Sat, Oct 22, 2016 at 10:48:13AM +0200, Daniel Vetter wrote:
> On Fri, Oct 21, 2016 at 04:45:40PM -0700, Manasi Navare wrote:
> > This work struct will be used to schedule a uevent on a separate
> > thread. This will be scheduled after a link train failure during modeset
> > to indicate a modeset retry request. It will get executed after the
> > current modeset is complete and all locks are released. This was
> > required to avoid deadlock.
> > 
> > Cc: dri-devel at lists.freedesktop.org
> > Cc: Jani Nikula 
> > Cc: Daniel Vetter 
> > Cc: Ville Syrjala 
> > 
> > Signed-off-by: Manasi Navare 
> > ---
> >  include/drm/drm_connector.h | 5 +
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> > index ac9d7d8..fcf6b97 100644
> > --- a/include/drm/drm_connector.h
> > +++ b/include/drm/drm_connector.h
> > @@ -682,6 +682,11 @@ struct drm_connector {
> > uint8_t num_h_tile, num_v_tile;
> > uint8_t tile_h_loc, tile_v_loc;
> > uint16_t tile_h_size, tile_v_size;
> > +
> > +   /* Work struct to schedule a uevent on link train failure for
> > +* DisplayPort.
> > +*/
> > +   struct work_struct i915_modeset_retry_work;
> 
> You cannot put i915 stuff into core structs.
> -Daniel
> 
> >  };

I will rename it to use modeset_retry_work instead.

Manasi
> >  
> >  #define obj_to_connector(x) container_of(x, struct drm_connector, base)
> > -- 
> > 1.9.1
> > 
> > ___
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch


[Intel-gfx] [PATCH 2/5] drm: Define a work struct for scheduling a uevent for modeset retry

2016-10-22 Thread Daniel Vetter
On Fri, Oct 21, 2016 at 04:45:40PM -0700, Manasi Navare wrote:
> This work struct will be used to schedule a uevent on a separate
> thread. This will be scheduled after a link train failure during modeset
> to indicate a modeset retry request. It will get executed after the
> current modeset is complete and all locks are released. This was
> required to avoid deadlock.
> 
> Cc: dri-devel at lists.freedesktop.org
> Cc: Jani Nikula 
> Cc: Daniel Vetter 
> Cc: Ville Syrjala 
> 
> Signed-off-by: Manasi Navare 
> ---
>  include/drm/drm_connector.h | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index ac9d7d8..fcf6b97 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -682,6 +682,11 @@ struct drm_connector {
>   uint8_t num_h_tile, num_v_tile;
>   uint8_t tile_h_loc, tile_v_loc;
>   uint16_t tile_h_size, tile_v_size;
> +
> + /* Work struct to schedule a uevent on link train failure for
> +  * DisplayPort.
> +  */
> + struct work_struct i915_modeset_retry_work;

You cannot put i915 stuff into core structs.
-Daniel

>  };
>  
>  #define obj_to_connector(x) container_of(x, struct drm_connector, base)
> -- 
> 1.9.1
> 
> ___
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch