diff mbox

gpu: drm: vgem: Change return type to vm_fault_t

Message ID 20180416150232.GA26745@jordon-HP-15-Notebook-PC (mailing list archive)
State New, archived
Headers show

Commit Message

Souptick Joarder April 16, 2018, 3:02 p.m. UTC
Use new return type vm_fault_t for fault handler.

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
---
 drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Souptick Joarder May 10, 2018, 2:28 p.m. UTC | #1
Hi Sean,

On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> Use new return type vm_fault_t for fault handler.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
> ---
>  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
> index 2524ff1..c64a859 100644
> --- a/drivers/gpu/drm/vgem/vgem_drv.c
> +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
>         kfree(vgem_obj);
>  }
>
> -static int vgem_gem_fault(struct vm_fault *vmf)
> +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
>  {
>         struct vm_area_struct *vma = vmf->vma;
>         struct drm_vgem_gem_object *obj = vma->vm_private_data;
>         /* We don't use vmf->pgoff since that has the fake offset */
>         unsigned long vaddr = vmf->address;
> -       int ret;
> +       vm_fault_t ret = VM_FAULT_SIGBUS;
>         loff_t num_pages;
>         pgoff_t page_offset;
>         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
> @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
>         if (page_offset > num_pages)
>                 return VM_FAULT_SIGBUS;
>
> -       ret = -ENOENT;
>         mutex_lock(&obj->pages_lock);
>         if (obj->pages) {
>                 get_page(obj->pages[page_offset]);
> --
> 1.9.1
>

Any further comment on this patch ?
Sean Paul May 10, 2018, 6:51 p.m. UTC | #2
On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote:
> Hi Sean,
> 
> On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> > Use new return type vm_fault_t for fault handler.
> >
> > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> > Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
> > ---
> >  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
> > index 2524ff1..c64a859 100644
> > --- a/drivers/gpu/drm/vgem/vgem_drv.c
> > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
> >         kfree(vgem_obj);
> >  }
> >
> > -static int vgem_gem_fault(struct vm_fault *vmf)
> > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
> >  {
> >         struct vm_area_struct *vma = vmf->vma;
> >         struct drm_vgem_gem_object *obj = vma->vm_private_data;
> >         /* We don't use vmf->pgoff since that has the fake offset */
> >         unsigned long vaddr = vmf->address;
> > -       int ret;
> > +       vm_fault_t ret = VM_FAULT_SIGBUS;
> >         loff_t num_pages;
> >         pgoff_t page_offset;
> >         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
> > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
> >         if (page_offset > num_pages)
> >                 return VM_FAULT_SIGBUS;
> >
> > -       ret = -ENOENT;
> >         mutex_lock(&obj->pages_lock);
> >         if (obj->pages) {
> >                 get_page(obj->pages[page_offset]);
> > --
> > 1.9.1
> >
> 
> Any further comment on this patch ?

Patch looks good to me. My build test fails, though, since vm_fault_t doesn't
exist in drm-misc-next yet.

So, for now,

Reviewed-by: Sean Paul <seanpaul@chromium.org>
Daniel Vetter May 14, 2018, 4:26 p.m. UTC | #3
On Thu, May 10, 2018 at 02:51:38PM -0400, Sean Paul wrote:
> On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote:
> > Hi Sean,
> > 
> > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> > > Use new return type vm_fault_t for fault handler.
> > >
> > > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> > > Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
> > > ---
> > >  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
> > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
> > > index 2524ff1..c64a859 100644
> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c
> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> > > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
> > >         kfree(vgem_obj);
> > >  }
> > >
> > > -static int vgem_gem_fault(struct vm_fault *vmf)
> > > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
> > >  {
> > >         struct vm_area_struct *vma = vmf->vma;
> > >         struct drm_vgem_gem_object *obj = vma->vm_private_data;
> > >         /* We don't use vmf->pgoff since that has the fake offset */
> > >         unsigned long vaddr = vmf->address;
> > > -       int ret;
> > > +       vm_fault_t ret = VM_FAULT_SIGBUS;
> > >         loff_t num_pages;
> > >         pgoff_t page_offset;
> > >         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
> > > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
> > >         if (page_offset > num_pages)
> > >                 return VM_FAULT_SIGBUS;
> > >
> > > -       ret = -ENOENT;
> > >         mutex_lock(&obj->pages_lock);
> > >         if (obj->pages) {
> > >                 get_page(obj->pages[page_offset]);
> > > --
> > > 1.9.1
> > >
> > 
> > Any further comment on this patch ?
> 
> Patch looks good to me. My build test fails, though, since vm_fault_t doesn't
> exist in drm-misc-next yet.

vm_fault_t is already in upstream, just needs Maarten to do a backmerge.
Which I think he's done by now ... Otherwise nag him more :-)
-Daniel

> 
> So, for now,
> 
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
> 
> 
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Souptick Joarder May 23, 2018, 9:35 a.m. UTC | #4
On Mon, May 14, 2018 at 9:56 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Thu, May 10, 2018 at 02:51:38PM -0400, Sean Paul wrote:
>> On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote:
>> > Hi Sean,
>> >
>> > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
>> > > Use new return type vm_fault_t for fault handler.
>> > >
>> > > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>> > > Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
>> > > ---
>> > >  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
>> > >  1 file changed, 2 insertions(+), 3 deletions(-)
>> > >
>> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
>> > > index 2524ff1..c64a859 100644
>> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c
>> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
>> > > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
>> > >         kfree(vgem_obj);
>> > >  }
>> > >
>> > > -static int vgem_gem_fault(struct vm_fault *vmf)
>> > > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
>> > >  {
>> > >         struct vm_area_struct *vma = vmf->vma;
>> > >         struct drm_vgem_gem_object *obj = vma->vm_private_data;
>> > >         /* We don't use vmf->pgoff since that has the fake offset */
>> > >         unsigned long vaddr = vmf->address;
>> > > -       int ret;
>> > > +       vm_fault_t ret = VM_FAULT_SIGBUS;
>> > >         loff_t num_pages;
>> > >         pgoff_t page_offset;
>> > >         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
>> > > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
>> > >         if (page_offset > num_pages)
>> > >                 return VM_FAULT_SIGBUS;
>> > >
>> > > -       ret = -ENOENT;
>> > >         mutex_lock(&obj->pages_lock);
>> > >         if (obj->pages) {
>> > >                 get_page(obj->pages[page_offset]);
>> > > --
>> > > 1.9.1
>> > >
>> >
>> > Any further comment on this patch ?
>>
>> Patch looks good to me. My build test fails, though, since vm_fault_t doesn't
>> exist in drm-misc-next yet.
>
> vm_fault_t is already in upstream, just needs Maarten to do a backmerge.
> Which I think he's done by now ... Otherwise nag him more :-)
> -Daniel
>
>>
>> So, for now,
>>
>> Reviewed-by: Sean Paul <seanpaul@chromium.org>
>>
>>
>> --
>> Sean Paul, Software Engineer, Google / Chromium OS
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

Daniel/ Sean, is this patch already merged for 4.18 ?
Daniel Vetter May 24, 2018, 12:57 p.m. UTC | #5
On Wed, May 23, 2018 at 03:05:35PM +0530, Souptick Joarder wrote:
> On Mon, May 14, 2018 at 9:56 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Thu, May 10, 2018 at 02:51:38PM -0400, Sean Paul wrote:
> >> On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote:
> >> > Hi Sean,
> >> >
> >> > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> >> > > Use new return type vm_fault_t for fault handler.
> >> > >
> >> > > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> >> > > Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
> >> > > ---
> >> > >  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
> >> > >  1 file changed, 2 insertions(+), 3 deletions(-)
> >> > >
> >> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
> >> > > index 2524ff1..c64a859 100644
> >> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c
> >> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> >> > > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
> >> > >         kfree(vgem_obj);
> >> > >  }
> >> > >
> >> > > -static int vgem_gem_fault(struct vm_fault *vmf)
> >> > > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
> >> > >  {
> >> > >         struct vm_area_struct *vma = vmf->vma;
> >> > >         struct drm_vgem_gem_object *obj = vma->vm_private_data;
> >> > >         /* We don't use vmf->pgoff since that has the fake offset */
> >> > >         unsigned long vaddr = vmf->address;
> >> > > -       int ret;
> >> > > +       vm_fault_t ret = VM_FAULT_SIGBUS;
> >> > >         loff_t num_pages;
> >> > >         pgoff_t page_offset;
> >> > >         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
> >> > > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
> >> > >         if (page_offset > num_pages)
> >> > >                 return VM_FAULT_SIGBUS;
> >> > >
> >> > > -       ret = -ENOENT;
> >> > >         mutex_lock(&obj->pages_lock);
> >> > >         if (obj->pages) {
> >> > >                 get_page(obj->pages[page_offset]);
> >> > > --
> >> > > 1.9.1
> >> > >
> >> >
> >> > Any further comment on this patch ?
> >>
> >> Patch looks good to me. My build test fails, though, since vm_fault_t doesn't
> >> exist in drm-misc-next yet.
> >
> > vm_fault_t is already in upstream, just needs Maarten to do a backmerge.
> > Which I think he's done by now ... Otherwise nag him more :-)
> > -Daniel
> >
> >>
> >> So, for now,
> >>
> >> Reviewed-by: Sean Paul <seanpaul@chromium.org>
> >>
> >>
> >> --
> >> Sean Paul, Software Engineer, Google / Chromium OS
> >> _______________________________________________
> >> dri-devel mailing list
> >> dri-devel@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >
> > --
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch
> 
> Daniel/ Sean, is this patch already merged for 4.18 ?

Nope, fell through the cracks. Thanks for the reminder, queued for 4.18
now.
-Daniel

> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Souptick Joarder May 24, 2018, 2:21 p.m. UTC | #6
On Thu, May 24, 2018 at 6:27 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, May 23, 2018 at 03:05:35PM +0530, Souptick Joarder wrote:
>> On Mon, May 14, 2018 at 9:56 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
>> > On Thu, May 10, 2018 at 02:51:38PM -0400, Sean Paul wrote:
>> >> On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote:
>> >> > Hi Sean,
>> >> >
>> >> > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
>> >> > > Use new return type vm_fault_t for fault handler.
>> >> > >
>> >> > > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>> >> > > Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
>> >> > > ---
>> >> > >  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
>> >> > >  1 file changed, 2 insertions(+), 3 deletions(-)
>> >> > >
>> >> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
>> >> > > index 2524ff1..c64a859 100644
>> >> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c
>> >> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
>> >> > > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
>> >> > >         kfree(vgem_obj);
>> >> > >  }
>> >> > >
>> >> > > -static int vgem_gem_fault(struct vm_fault *vmf)
>> >> > > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
>> >> > >  {
>> >> > >         struct vm_area_struct *vma = vmf->vma;
>> >> > >         struct drm_vgem_gem_object *obj = vma->vm_private_data;
>> >> > >         /* We don't use vmf->pgoff since that has the fake offset */
>> >> > >         unsigned long vaddr = vmf->address;
>> >> > > -       int ret;
>> >> > > +       vm_fault_t ret = VM_FAULT_SIGBUS;
>> >> > >         loff_t num_pages;
>> >> > >         pgoff_t page_offset;
>> >> > >         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
>> >> > > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
>> >> > >         if (page_offset > num_pages)
>> >> > >                 return VM_FAULT_SIGBUS;
>> >> > >
>> >> > > -       ret = -ENOENT;
>> >> > >         mutex_lock(&obj->pages_lock);
>> >> > >         if (obj->pages) {
>> >> > >                 get_page(obj->pages[page_offset]);
>> >> > > --
>> >> > > 1.9.1
>> >> > >
>> >> >
>> >> > Any further comment on this patch ?
>> >>
>> >> Patch looks good to me. My build test fails, though, since vm_fault_t doesn't
>> >> exist in drm-misc-next yet.
>> >
>> > vm_fault_t is already in upstream, just needs Maarten to do a backmerge.
>> > Which I think he's done by now ... Otherwise nag him more :-)
>> > -Daniel
>> >
>> >>
>> >> So, for now,
>> >>
>> >> Reviewed-by: Sean Paul <seanpaul@chromium.org>
>> >>
>> >>
>> >> --
>> >> Sean Paul, Software Engineer, Google / Chromium OS
>> >> _______________________________________________
>> >> dri-devel mailing list
>> >> dri-devel@lists.freedesktop.org
>> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>> >
>> > --
>> > Daniel Vetter
>> > Software Engineer, Intel Corporation
>> > http://blog.ffwll.ch
>>
>> Daniel/ Sean, is this patch already merged for 4.18 ?
>
> Nope, fell through the cracks. Thanks for the reminder, queued for 4.18
> now.
> -Daniel

Thanks Daniel :).
Few other similar drm driver patches are also candidates
for 4.18. Are you the right Maintainer to make a request
for the same ?
Daniel Vetter May 29, 2018, 6:44 a.m. UTC | #7
On Thu, May 24, 2018 at 07:51:40PM +0530, Souptick Joarder wrote:
> On Thu, May 24, 2018 at 6:27 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Wed, May 23, 2018 at 03:05:35PM +0530, Souptick Joarder wrote:
> >> On Mon, May 14, 2018 at 9:56 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> >> > On Thu, May 10, 2018 at 02:51:38PM -0400, Sean Paul wrote:
> >> >> On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote:
> >> >> > Hi Sean,
> >> >> >
> >> >> > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> >> >> > > Use new return type vm_fault_t for fault handler.
> >> >> > >
> >> >> > > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> >> >> > > Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
> >> >> > > ---
> >> >> > >  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
> >> >> > >  1 file changed, 2 insertions(+), 3 deletions(-)
> >> >> > >
> >> >> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
> >> >> > > index 2524ff1..c64a859 100644
> >> >> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c
> >> >> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> >> >> > > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
> >> >> > >         kfree(vgem_obj);
> >> >> > >  }
> >> >> > >
> >> >> > > -static int vgem_gem_fault(struct vm_fault *vmf)
> >> >> > > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
> >> >> > >  {
> >> >> > >         struct vm_area_struct *vma = vmf->vma;
> >> >> > >         struct drm_vgem_gem_object *obj = vma->vm_private_data;
> >> >> > >         /* We don't use vmf->pgoff since that has the fake offset */
> >> >> > >         unsigned long vaddr = vmf->address;
> >> >> > > -       int ret;
> >> >> > > +       vm_fault_t ret = VM_FAULT_SIGBUS;
> >> >> > >         loff_t num_pages;
> >> >> > >         pgoff_t page_offset;
> >> >> > >         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
> >> >> > > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
> >> >> > >         if (page_offset > num_pages)
> >> >> > >                 return VM_FAULT_SIGBUS;
> >> >> > >
> >> >> > > -       ret = -ENOENT;
> >> >> > >         mutex_lock(&obj->pages_lock);
> >> >> > >         if (obj->pages) {
> >> >> > >                 get_page(obj->pages[page_offset]);
> >> >> > > --
> >> >> > > 1.9.1
> >> >> > >
> >> >> >
> >> >> > Any further comment on this patch ?
> >> >>
> >> >> Patch looks good to me. My build test fails, though, since vm_fault_t doesn't
> >> >> exist in drm-misc-next yet.
> >> >
> >> > vm_fault_t is already in upstream, just needs Maarten to do a backmerge.
> >> > Which I think he's done by now ... Otherwise nag him more :-)
> >> > -Daniel
> >> >
> >> >>
> >> >> So, for now,
> >> >>
> >> >> Reviewed-by: Sean Paul <seanpaul@chromium.org>
> >> >>
> >> >>
> >> >> --
> >> >> Sean Paul, Software Engineer, Google / Chromium OS
> >> >> _______________________________________________
> >> >> dri-devel mailing list
> >> >> dri-devel@lists.freedesktop.org
> >> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >> >
> >> > --
> >> > Daniel Vetter
> >> > Software Engineer, Intel Corporation
> >> > http://blog.ffwll.ch
> >>
> >> Daniel/ Sean, is this patch already merged for 4.18 ?
> >
> > Nope, fell through the cracks. Thanks for the reminder, queued for 4.18
> > now.
> > -Daniel
> 
> Thanks Daniel :).
> Few other similar drm driver patches are also candidates
> for 4.18. Are you the right Maintainer to make a request
> for the same ?

No, please try to find others. I'm occasionally picking stuff up that fell
through all the cracks, as a last resort, but if I make that a habit then
this doesn't scale. Please check with MAINTAINERS who's more appropriate
to get nag mails from you :-)

Thanks, Daniel
Souptick Joarder May 29, 2018, 8:04 a.m. UTC | #8
On Tue, May 29, 2018 at 12:14 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Thu, May 24, 2018 at 07:51:40PM +0530, Souptick Joarder wrote:
>> On Thu, May 24, 2018 at 6:27 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
>> > On Wed, May 23, 2018 at 03:05:35PM +0530, Souptick Joarder wrote:
>> >> On Mon, May 14, 2018 at 9:56 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
>> >> > On Thu, May 10, 2018 at 02:51:38PM -0400, Sean Paul wrote:
>> >> >> On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote:
>> >> >> > Hi Sean,
>> >> >> >
>> >> >> > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
>> >> >> > > Use new return type vm_fault_t for fault handler.
>> >> >> > >
>> >> >> > > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>> >> >> > > Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
>> >> >> > > ---
>> >> >> > >  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
>> >> >> > >  1 file changed, 2 insertions(+), 3 deletions(-)
>> >> >> > >
>> >> >> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
>> >> >> > > index 2524ff1..c64a859 100644
>> >> >> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c
>> >> >> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
>> >> >> > > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
>> >> >> > >         kfree(vgem_obj);
>> >> >> > >  }
>> >> >> > >
>> >> >> > > -static int vgem_gem_fault(struct vm_fault *vmf)
>> >> >> > > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
>> >> >> > >  {
>> >> >> > >         struct vm_area_struct *vma = vmf->vma;
>> >> >> > >         struct drm_vgem_gem_object *obj = vma->vm_private_data;
>> >> >> > >         /* We don't use vmf->pgoff since that has the fake offset */
>> >> >> > >         unsigned long vaddr = vmf->address;
>> >> >> > > -       int ret;
>> >> >> > > +       vm_fault_t ret = VM_FAULT_SIGBUS;
>> >> >> > >         loff_t num_pages;
>> >> >> > >         pgoff_t page_offset;
>> >> >> > >         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
>> >> >> > > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
>> >> >> > >         if (page_offset > num_pages)
>> >> >> > >                 return VM_FAULT_SIGBUS;
>> >> >> > >
>> >> >> > > -       ret = -ENOENT;
>> >> >> > >         mutex_lock(&obj->pages_lock);
>> >> >> > >         if (obj->pages) {
>> >> >> > >                 get_page(obj->pages[page_offset]);
>> >> >> > > --
>> >> >> > > 1.9.1
>> >> >> > >
>> >> >> >
>> >> >> > Any further comment on this patch ?
>> >> >>
>> >> >> Patch looks good to me. My build test fails, though, since vm_fault_t doesn't
>> >> >> exist in drm-misc-next yet.
>> >> >
>> >> > vm_fault_t is already in upstream, just needs Maarten to do a backmerge.
>> >> > Which I think he's done by now ... Otherwise nag him more :-)
>> >> > -Daniel
>> >> >
>> >> >>
>> >> >> So, for now,
>> >> >>
>> >> >> Reviewed-by: Sean Paul <seanpaul@chromium.org>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Sean Paul, Software Engineer, Google / Chromium OS
>> >> >> _______________________________________________
>> >> >> dri-devel mailing list
>> >> >> dri-devel@lists.freedesktop.org
>> >> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>> >> >
>> >> > --
>> >> > Daniel Vetter
>> >> > Software Engineer, Intel Corporation
>> >> > http://blog.ffwll.ch
>> >>
>> >> Daniel/ Sean, is this patch already merged for 4.18 ?
>> >
>> > Nope, fell through the cracks. Thanks for the reminder, queued for 4.18
>> > now.
>> > -Daniel
>>
>> Thanks Daniel :).
>> Few other similar drm driver patches are also candidates
>> for 4.18. Are you the right Maintainer to make a request
>> for the same ?
>
> No, please try to find others. I'm occasionally picking stuff up that fell
> through all the cracks, as a last resort, but if I make that a habit then
> this doesn't scale. Please check with MAINTAINERS who's more appropriate
> to get nag mails from you :-)
>

Sorry about it, I will ping the right MAINTAINERS :)
Souptick Joarder June 18, 2018, 11:26 a.m. UTC | #9
On Thu, May 24, 2018 at 6:27 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, May 23, 2018 at 03:05:35PM +0530, Souptick Joarder wrote:
>> On Mon, May 14, 2018 at 9:56 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
>> > On Thu, May 10, 2018 at 02:51:38PM -0400, Sean Paul wrote:
>> >> On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote:
>> >> > Hi Sean,
>> >> >
>> >> > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
>> >> > > Use new return type vm_fault_t for fault handler.
>> >> > >
>> >> > > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>> >> > > Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
>> >> > > ---
>> >> > >  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
>> >> > >  1 file changed, 2 insertions(+), 3 deletions(-)
>> >> > >
>> >> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
>> >> > > index 2524ff1..c64a859 100644
>> >> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c
>> >> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
>> >> > > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
>> >> > >         kfree(vgem_obj);
>> >> > >  }
>> >> > >
>> >> > > -static int vgem_gem_fault(struct vm_fault *vmf)
>> >> > > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
>> >> > >  {
>> >> > >         struct vm_area_struct *vma = vmf->vma;
>> >> > >         struct drm_vgem_gem_object *obj = vma->vm_private_data;
>> >> > >         /* We don't use vmf->pgoff since that has the fake offset */
>> >> > >         unsigned long vaddr = vmf->address;
>> >> > > -       int ret;
>> >> > > +       vm_fault_t ret = VM_FAULT_SIGBUS;
>> >> > >         loff_t num_pages;
>> >> > >         pgoff_t page_offset;
>> >> > >         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
>> >> > > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
>> >> > >         if (page_offset > num_pages)
>> >> > >                 return VM_FAULT_SIGBUS;
>> >> > >
>> >> > > -       ret = -ENOENT;
>> >> > >         mutex_lock(&obj->pages_lock);
>> >> > >         if (obj->pages) {
>> >> > >                 get_page(obj->pages[page_offset]);
>> >> > > --
>> >> > > 1.9.1
>> >> > >
>> >> >
>> >> > Any further comment on this patch ?
>> >>
>> >> Patch looks good to me. My build test fails, though, since vm_fault_t doesn't
>> >> exist in drm-misc-next yet.
>> >
>> > vm_fault_t is already in upstream, just needs Maarten to do a backmerge.
>> > Which I think he's done by now ... Otherwise nag him more :-)
>> > -Daniel
>> >
>> >>
>> >> So, for now,
>> >>
>> >> Reviewed-by: Sean Paul <seanpaul@chromium.org>
>> >>
>> >>
>> >> --
>> >> Sean Paul, Software Engineer, Google / Chromium OS
>> >> _______________________________________________
>> >> dri-devel mailing list
>> >> dri-devel@lists.freedesktop.org
>> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>> >
>> > --
>> > Daniel Vetter
>> > Software Engineer, Intel Corporation
>> > http://blog.ffwll.ch
>>
>> Daniel/ Sean, is this patch already merged for 4.18 ?
>
> Nope, fell through the cracks. Thanks for the reminder, queued for 4.18
> now.
> -Daniel
>

Daniel, This patch is not available in 4.18-rc-1 :-)
Daniel Vetter June 18, 2018, 4 p.m. UTC | #10
On Mon, Jun 18, 2018 at 1:26 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> On Thu, May 24, 2018 at 6:27 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
>> On Wed, May 23, 2018 at 03:05:35PM +0530, Souptick Joarder wrote:
>>> On Mon, May 14, 2018 at 9:56 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
>>> > On Thu, May 10, 2018 at 02:51:38PM -0400, Sean Paul wrote:
>>> >> On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote:
>>> >> > Hi Sean,
>>> >> >
>>> >> > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
>>> >> > > Use new return type vm_fault_t for fault handler.
>>> >> > >
>>> >> > > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>>> >> > > Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
>>> >> > > ---
>>> >> > >  drivers/gpu/drm/vgem/vgem_drv.c | 5 ++---
>>> >> > >  1 file changed, 2 insertions(+), 3 deletions(-)
>>> >> > >
>>> >> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
>>> >> > > index 2524ff1..c64a859 100644
>>> >> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c
>>> >> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
>>> >> > > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj)
>>> >> > >         kfree(vgem_obj);
>>> >> > >  }
>>> >> > >
>>> >> > > -static int vgem_gem_fault(struct vm_fault *vmf)
>>> >> > > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
>>> >> > >  {
>>> >> > >         struct vm_area_struct *vma = vmf->vma;
>>> >> > >         struct drm_vgem_gem_object *obj = vma->vm_private_data;
>>> >> > >         /* We don't use vmf->pgoff since that has the fake offset */
>>> >> > >         unsigned long vaddr = vmf->address;
>>> >> > > -       int ret;
>>> >> > > +       vm_fault_t ret = VM_FAULT_SIGBUS;
>>> >> > >         loff_t num_pages;
>>> >> > >         pgoff_t page_offset;
>>> >> > >         page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
>>> >> > > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf)
>>> >> > >         if (page_offset > num_pages)
>>> >> > >                 return VM_FAULT_SIGBUS;
>>> >> > >
>>> >> > > -       ret = -ENOENT;
>>> >> > >         mutex_lock(&obj->pages_lock);
>>> >> > >         if (obj->pages) {
>>> >> > >                 get_page(obj->pages[page_offset]);
>>> >> > > --
>>> >> > > 1.9.1
>>> >> > >
>>> >> >
>>> >> > Any further comment on this patch ?
>>> >>
>>> >> Patch looks good to me. My build test fails, though, since vm_fault_t doesn't
>>> >> exist in drm-misc-next yet.
>>> >
>>> > vm_fault_t is already in upstream, just needs Maarten to do a backmerge.
>>> > Which I think he's done by now ... Otherwise nag him more :-)
>>> > -Daniel
>>> >
>>> >>
>>> >> So, for now,
>>> >>
>>> >> Reviewed-by: Sean Paul <seanpaul@chromium.org>
>>> >>
>>> >>
>>> >> --
>>> >> Sean Paul, Software Engineer, Google / Chromium OS
>>> >> _______________________________________________
>>> >> dri-devel mailing list
>>> >> dri-devel@lists.freedesktop.org
>>> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>> >
>>> > --
>>> > Daniel Vetter
>>> > Software Engineer, Intel Corporation
>>> > http://blog.ffwll.ch
>>>
>>> Daniel/ Sean, is this patch already merged for 4.18 ?
>>
>> Nope, fell through the cracks. Thanks for the reminder, queued for 4.18
>> now.
>> -Daniel
>>
>
> Daniel, This patch is not available in 4.18-rc-1 :-)

I mixed up my book-keeping, it was queued for 4.19. Should show up in
linux-next any day (well as soon as drm-misc maintainers get their
book-keeping updated).
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index 2524ff1..c64a859 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -61,13 +61,13 @@  static void vgem_gem_free_object(struct drm_gem_object *obj)
 	kfree(vgem_obj);
 }
 
-static int vgem_gem_fault(struct vm_fault *vmf)
+static vm_fault_t vgem_gem_fault(struct vm_fault *vmf)
 {
 	struct vm_area_struct *vma = vmf->vma;
 	struct drm_vgem_gem_object *obj = vma->vm_private_data;
 	/* We don't use vmf->pgoff since that has the fake offset */
 	unsigned long vaddr = vmf->address;
-	int ret;
+	vm_fault_t ret = VM_FAULT_SIGBUS;
 	loff_t num_pages;
 	pgoff_t page_offset;
 	page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT;
@@ -77,7 +77,6 @@  static int vgem_gem_fault(struct vm_fault *vmf)
 	if (page_offset > num_pages)
 		return VM_FAULT_SIGBUS;
 
-	ret = -ENOENT;
 	mutex_lock(&obj->pages_lock);
 	if (obj->pages) {
 		get_page(obj->pages[page_offset]);