On Wed, 10 Dec 2025 14:35:51 +0100
Loïc Molinari <[email protected]> wrote:

> Hi Boris,
> 
> I missed that one, thanks for the fix.
> 
> On 09/12/2025 18:11, Boris Brezillon wrote:
> > drm_gem_get_unmapped_area() relies on mm_get_unmapped_area() which is
> > only available if CONFIG_MMU=y.
> > 
> > Fixes: 99bda20d6d4c ("drm/gem: Introduce drm_gem_get_unmapped_area() fop")
> > Cc: Loïc Molinari <[email protected]>
> > Signed-off-by: Boris Brezillon <[email protected]>  
> 
> Reviewed-by: Loïc Molinari <[email protected]>

Thanks, queued to drm-misc-next immediately so we don't get new kbot
reports.

> 
> Regards,
> Loïc
> 
> > ---
> >   drivers/gpu/drm/drm_gem.c | 2 ++
> >   include/drm/drm_gem.h     | 5 +++++
> >   2 files changed, 7 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
> > index 6021c4087a08..ca1956608261 100644
> > --- a/drivers/gpu/drm/drm_gem.c
> > +++ b/drivers/gpu/drm/drm_gem.c
> > @@ -1267,6 +1267,7 @@ drm_gem_object_lookup_at_offset(struct file *filp, 
> > unsigned long start,
> >     return obj;
> >   }
> >   
> > +#ifdef CONFIG_MMU
> >   /**
> >    * drm_gem_get_unmapped_area - get memory mapping region routine for GEM 
> > objects
> >    * @filp: DRM file pointer
> > @@ -1309,6 +1310,7 @@ unsigned long drm_gem_get_unmapped_area(struct file 
> > *filp, unsigned long uaddr,
> >     return ret;
> >   }
> >   EXPORT_SYMBOL_GPL(drm_gem_get_unmapped_area);
> > +#endif
> >   
> >   /**
> >    * drm_gem_mmap - memory map routine for GEM objects
> > diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
> > index cca815dc87f3..f4da8ed0d630 100644
> > --- a/include/drm/drm_gem.h
> > +++ b/include/drm/drm_gem.h
> > @@ -537,9 +537,14 @@ void drm_gem_vm_close(struct vm_area_struct *vma);
> >   int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size,
> >                  struct vm_area_struct *vma);
> >   int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
> > +
> > +#ifdef CONFIG_MMU
> >   unsigned long drm_gem_get_unmapped_area(struct file *filp, unsigned long 
> > uaddr,
> >                                     unsigned long len, unsigned long pgoff,
> >                                     unsigned long flags);
> > +#else
> > +#define drm_gem_get_unmapped_area NULL
> > +#endif
> >   
> >   /**
> >    * drm_gem_object_get - acquire a GEM buffer object reference  
> 

Reply via email to