[Mesa-dev] [PATCH 2/2] i965: Context aware user space EU control through application

J Karanje, Kedar kedar.j.karanje at intel.com
Mon Jul 23 07:54:46 UTC 2018


> -----Original Message-----
> From: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] On
> Behalf Of Lionel Landwerlin
> Sent: Friday, July 20, 2018 3:31 PM
> To: Chris Wilson <chris at chris-wilson.co.uk>; Muthukumar, Aravindan
> <aravindan.muthukumar at intel.com>; mesa-dev at lists.freedesktop.org
> Subject: Re: [Mesa-dev] [PATCH 2/2] i965: Context aware user space EU
> control through application
> 
> On 20/07/18 09:47, Chris Wilson wrote:
> > Quoting aravindan.muthukumar at intel.com (2018-07-20 09:32:57)
> >> From: "Muthukumar, Aravindan" <aravindan.muthukumar at intel.com>
> >>
> >>   The Patch here is to give control to user/ application to really
> >>   decide what's the max GPU load it would put. If that can be
> >>   known in advance, rpcs can be programmed accordingly.
> >>   This solution has changes across i915,
> >>   drm and mesa (not limited only to kernel).
> >>
> >>   Here, we pass gpu_load_type = {high, medium, low} from application
> >>   while context is created. Default here is 'High' and applications
> >>   roughly know if they are going to eat up entire GPU. The typical
> >>   usecase of 'Low' is idle screen or minor mouse movements. Users can
> >>   read meaning of high/medium/low for their platform  & then program
> >>   contexts accordingly. Here gpu_load_type directly translates to
> >>   number of shader cores/EUs a particular GPU has.
> >>
> >>   Signed-off-by: Aravindan Muthukumar
> <aravindan.muthukumar at intel.com>
> >>   Signed-off-by: Kedar J Karanje <kedar.j.karanje at intel.com>
> >>   Signed-off-by: Praveen Diwakar <praveen.diwakar at intel.com>
> >>   Signed-off-by: Yogesh Marathe <yogesh.marathe at intel.com>
> >> +/* Dynamic Eu control */
> >> +struct drm_i915_load_type {
> >> +       __u32 ctx_id;
> >> +       __u32 load_type;
> >> +};
> >> +
> >> +/* DYNAMIC EU CONTROL */
> >> +int
> >> +brw_hw_context_load_type(struct brw_bufmgr *bufmgr,
> >> +                        uint32_t ctx_id,
> >> +                        int load_type) {
> >> +       struct drm_i915_load_type type = {
> >> +               .ctx_id = ctx_id,
> >> +               .load_type = load_type,
> >> +       };
> >> +       int err;
> >> +
> >> +       err = 0;
> >> +       if(drmIoctl(bufmgr->fd, DRM_IOCTL_I915_LOAD_TYPE, &type))
> >> +               err = -errno;
> > This went through 4 people and none noticed that there already exists
> > a means to set per-context parameters. And it's even used right next
> > to this function.
We are aware of  " DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM" , however the current RFC  is an initial plan, we have further plans to enable access to application for the ability to configure sub-architecture level  control (GPU) (hence the new ioctl), however we will consider SETPARAM/GETPARAM for our initial plan now, and move to new ioctl when we have considered all the enhancements that it would bring, thank you for the comments.
> >
> > The word hint needs to be firmly embedded around here.
> > -Chris
> > ______
> 
> Yep,
> 
> Looks like you want to get involved in this discussion :
> https://patchwork.freedesktop.org/series/42285/
Could you please let us know how we can be involved in this ? 
> 
> -
> Lionel
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list