[PATCH v2 5/5] drm/vram: Don't export driver callback functions for PRIME

Emil Velikov emil.l.velikov at gmail.com
Tue Jul 2 10:23:52 UTC 2019


On Tue, 2 Jul 2019 at 10:20, Gerd Hoffmann <kraxel at redhat.com> wrote:
>
>   Hi,
>
> > +static void drm_gem_vram_object_free(struct drm_gem_object *gem)
> > +{
> > +     struct drm_gem_vram_object *gbo = drm_gem_vram_of_gem(gem);
> > +
> > +     drm_gem_vram_put(gbo);
> > +}
>
> Hmm, seems git diff didn't figure it's the same func just renamed
> (likewise pin/unpin/vmap/vunmap).  Maybe "git diff --minimal" gives
> better results here.  Placing the object_funcs struct (patch 1) at the
> end of the file might help too.
>
Yes please.

> > -/**
> > - * drm_gem_vram_driver_gem_free_object_unlocked() - \
> > -     Implements &struct drm_driver.gem_free_object_unlocked
> > - * @gem:     GEM object. Refers to &struct drm_gem_vram_object.gem
> > - */
>
> I think we should keep the documentation ...
>
> > -EXPORT_SYMBOL(drm_gem_vram_driver_gem_free_object_unlocked);
>
> And the EXPORT_SYMBOL too.
>
> Drivers might want roll their own version of drm_gem_object_funcs,
> with some of the functions replaced by driver-specific versions in
> case they have some extra work to do.
>
Keeping the comment sounds reasonable IMHO. Although I'm less sure
about EXPORT_SYMBOL.
If you have WIP series that makes use of it, sure. Otherwise any
driver wants to use it, they can trivially reinstate that.

With the nitpicks above, for the series:
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

-Emil


More information about the dri-devel mailing list