Message ID | 20190614203615.12639-33-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | prime doc polish and ... a few cleanups | expand |
On Fri, Jun 14, 2019 at 10:36 PM Daniel Vetter <daniel.vetter@ffwll.ch> wrote: > They're the default. > > Aside: Would be really nice to switch the others over to > drm_gem_object_funcs. > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > Cc: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> When you write "Would be really nice to switch the others over to drm_gem_object_funcs." are you referring to the other drm driver function called by this one driver, or are you referring to other drivers not using these functions? If the former and if there is some nice upstream commit I should be looking at for inspiration I can take a stab at fixing this driver. Yours, Linus Walleij
On Sat, Jun 15, 2019 at 10:35 AM Linus Walleij <linus.walleij@linaro.org> wrote: > > On Fri, Jun 14, 2019 at 10:36 PM Daniel Vetter <daniel.vetter@ffwll.ch> wrote: > > > They're the default. > > > > Aside: Would be really nice to switch the others over to > > drm_gem_object_funcs. > > > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > > Cc: Linus Walleij <linus.walleij@linaro.org> > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> > > When you write "Would be really nice to switch the others over to > drm_gem_object_funcs." are you referring to the other > drm driver function called by this one driver, or are you > referring to other drivers not using these functions? > > If the former and if there is some nice upstream commit > I should be looking at for inspiration I can take a stab at > fixing this driver. There's a pile of callbacks in drm_driver around gem object handling which we want to move over to drm_gem_object_funcs. Patch 2 in this series here has a pretty big doc update. The hooks have exactly the same function signature (at least after this series) and semantics, just stored somewhere else. For the drivers using helpers this should amount to just creating an export default function table for drm_gem_object_funcs and using it everywhere. Aside: In general the chaotic pile of hooks in struct drm_driver is largely deprecated. There's a few things where we don't yet have more focused vtables. -Daniel
diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index a1f614e21fcc..830a5af25ac4 100644 --- a/drivers/gpu/drm/tve200/tve200_drv.c +++ b/drivers/gpu/drm/tve200/tve200_drv.c @@ -152,8 +152,6 @@ static struct drm_driver tve200_drm_driver = { .prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_import = drm_gem_prime_import, - .gem_prime_export = drm_gem_prime_export, .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table, .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table, .gem_prime_vmap = drm_gem_cma_prime_vmap,
They're the default. Aside: Would be really nice to switch the others over to drm_gem_object_funcs. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Linus Walleij <linus.walleij@linaro.org> --- drivers/gpu/drm/tve200/tve200_drv.c | 2 -- 1 file changed, 2 deletions(-)