mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
drm/tegra: Introduce GEM object functions
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in tegra. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Thierry Reding <treding@nvidia.com> Acked-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-16-tzimmermann@suse.de
This commit is contained in:
parent
0d590af314
commit
dd311c6fe8
2 changed files with 8 additions and 4 deletions
|
@ -231,6 +231,12 @@ static int tegra_bo_iommu_unmap(struct tegra_drm *tegra, struct tegra_bo *bo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct drm_gem_object_funcs tegra_gem_object_funcs = {
|
||||
.free = tegra_bo_free_object,
|
||||
.export = tegra_gem_prime_export,
|
||||
.vm_ops = &tegra_bo_vm_ops,
|
||||
};
|
||||
|
||||
static struct tegra_bo *tegra_bo_alloc_object(struct drm_device *drm,
|
||||
size_t size)
|
||||
{
|
||||
|
@ -241,6 +247,8 @@ static struct tegra_bo *tegra_bo_alloc_object(struct drm_device *drm,
|
|||
if (!bo)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
bo->gem.funcs = &tegra_gem_object_funcs;
|
||||
|
||||
host1x_bo_init(&bo->base, &tegra_bo_ops);
|
||||
size = round_up(size, PAGE_SIZE);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue