search for: drm_vram_mm_init

Displaying 19 results from an estimated 19 matches for "drm_vram_mm_init".

2019 Sep 09
5
[PATCH 0/4] Merge VRAM MM and GEM VRAM source files
VRAM MM and GEM VRAM are only used with each other. This patch set moves VRAM MM into GEM VRAM source files and cleans up the helper's public interface. Thomas Zimmermann (4): drm/vram: Move VRAM memory manager to GEM VRAM implementation drm/vram: Have VRAM MM call GEM VRAM functions directly drm/vram: Unexport internal functions of VRAM MM drm/vram: Unconditonally set BO call-back
2019 Sep 11
4
[PATCH v2 0/4] Merge VRAM MM and GEM VRAM source files
VRAM MM and GEM VRAM are only used with each other. This patch set moves VRAM MM into GEM VRAM source files and cleans up the helper's public interface. Version 2 of the patch set doesn't contain functional changes. I'm reposting due to the rebasing onto the debugfs patches. v2: * updated for debugfs support * fixed typos in comments Thomas Zimmermann (4): drm/vram: Move VRAM
2019 Apr 24
0
[PATCH v2 05/17] drm: Add VRAM MM, a simple memory manager for dedicated VRAM
...type = bo_driver_init_mem_type, + .eviction_valuable = ttm_bo_eviction_valuable, + .evict_flags = bo_driver_evict_flags, + .verify_access = bo_driver_verify_access, + .io_mem_reserve = bo_driver_io_mem_reserve, + .io_mem_free = bo_driver_io_mem_free, +}; + +/* + * struct drm_vram_mm + */ + +/** + * drm_vram_mm_init() - Initialize an instance of VRAM MM. + * @vmm: the VRAM MM instance to initialize + * @dev: the DRM device + * @vram_base: the base address of the video memory + * @vram_size: the size of the video memory in bytes + * @funcs: callback functions for buffer objects + * + * Returns: + * 0 on success...
2019 Sep 13
2
[PATCH 8/8] drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS
...TM BO device + * + * Returns: + * The containing instance of &struct drm_vram_mm + */ +static inline struct drm_vram_mm *drm_vram_mm_of_bdev( + struct ttm_bo_device *bdev) +{ + return container_of(bdev, struct drm_vram_mm, bdev); +} + +int drm_vram_mm_debugfs_init(struct drm_minor *minor); +int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, + uint64_t vram_base, size_t vram_size, + const struct drm_vram_mm_funcs *funcs); +void drm_vram_mm_cleanup(struct drm_vram_mm *vmm); + +int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma, + struct drm_vram_mm *vmm);...
2019 Sep 13
2
[PATCH 8/8] drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS
...TM BO device + * + * Returns: + * The containing instance of &struct drm_vram_mm + */ +static inline struct drm_vram_mm *drm_vram_mm_of_bdev( + struct ttm_bo_device *bdev) +{ + return container_of(bdev, struct drm_vram_mm, bdev); +} + +int drm_vram_mm_debugfs_init(struct drm_minor *minor); +int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, + uint64_t vram_base, size_t vram_size, + const struct drm_vram_mm_funcs *funcs); +void drm_vram_mm_cleanup(struct drm_vram_mm *vmm); + +int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma, + struct drm_vram_mm *vmm);...
2019 Sep 05
1
[PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer
...t;failed initializing buffer object driver(%d).\n", r); diff --git a/drivers/gpu/drm/drm_vram_mm_helper.c b/drivers/gpu/drm/drm_vram_mm_helper.c index c911781d6728..56fd1519eb35 100644 --- a/drivers/gpu/drm/drm_vram_mm_helper.c +++ b/drivers/gpu/drm/drm_vram_mm_helper.c @@ -172,6 +172,7 @@ int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, ret = ttm_bo_device_init(&vmm->bdev, &bo_driver, dev->anon_inode->i_mapping, + NULL, true); if (ret) return ret; diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c inde...
2019 Sep 05
1
[PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer
...t;failed initializing buffer object driver(%d).\n", r); diff --git a/drivers/gpu/drm/drm_vram_mm_helper.c b/drivers/gpu/drm/drm_vram_mm_helper.c index c911781d6728..56fd1519eb35 100644 --- a/drivers/gpu/drm/drm_vram_mm_helper.c +++ b/drivers/gpu/drm/drm_vram_mm_helper.c @@ -172,6 +172,7 @@ int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, ret = ttm_bo_device_init(&vmm->bdev, &bo_driver, dev->anon_inode->i_mapping, + NULL, true); if (ret) return ret; diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c inde...
2019 Sep 05
1
[PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer
...t;failed initializing buffer object driver(%d).\n", r); diff --git a/drivers/gpu/drm/drm_vram_mm_helper.c b/drivers/gpu/drm/drm_vram_mm_helper.c index c911781d6728..56fd1519eb35 100644 --- a/drivers/gpu/drm/drm_vram_mm_helper.c +++ b/drivers/gpu/drm/drm_vram_mm_helper.c @@ -172,6 +172,7 @@ int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, ret = ttm_bo_device_init(&vmm->bdev, &bo_driver, dev->anon_inode->i_mapping, + NULL, true); if (ret) return ret; diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c inde...
2019 Apr 24
0
[PATCH v2 07/17] drm/ast: Convert AST driver to VRAM MM
...mp;ast->ttm.bdev, - &ast_bo_driver, - dev->anon_inode->i_mapping, - true); - if (ret) { - DRM_ERROR("Error initialising bo driver; %d\n", ret); - return ret; - } - ret = ttm_bo_init_mm(bdev, TTM_PL_VRAM, - ast->vram_size >> PAGE_SHIFT); + ret = drm_vram_mm_init(&ast->vmm, dev, + pci_resource_start(dev->pdev, 0), + ast->vram_size, &ast_vram_mm_funcs); if (ret) { - DRM_ERROR("Failed ttm VRAM init: %d\n", ret); + DRM_ERROR("Error initializing VRAM MM; %d\n", ret); return ret; } @@ -166,7 +59,7...
2019 Sep 13
0
[PATCH 8/8] drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS
...ing instance of &struct drm_vram_mm > + */ > +static inline struct drm_vram_mm *drm_vram_mm_of_bdev( > + struct ttm_bo_device *bdev) > +{ > + return container_of(bdev, struct drm_vram_mm, bdev); > +} > + > +int drm_vram_mm_debugfs_init(struct drm_minor *minor); > +int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, > + uint64_t vram_base, size_t vram_size, > + const struct drm_vram_mm_funcs *funcs); > +void drm_vram_mm_cleanup(struct drm_vram_mm *vmm); > + > +int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma, > +...
2019 Apr 24
21
[PATCH v2 00/17] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2024 Oct 04
1
[PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools
...rm/drm_gem_vram_helper.c > > > b/drivers/gpu/drm/drm_gem_vram_helper.c > > > index 22b1fe9c03b8..7c3165b00378 100644 > > > --- a/drivers/gpu/drm/drm_gem_vram_helper.c > > > +++ b/drivers/gpu/drm/drm_gem_vram_helper.c > > > @@ -931,9 +931,10 @@ static int drm_vram_mm_init(struct > > > drm_vram_mm > > > *vmm, struct drm_device *dev, > > > ?? vmm->vram_size = vram_size; > > > ? > > > ?? ret = ttm_device_init(&vmm->bdev, &bo_driver, dev->dev, > > > - dev->anon_inode->i_mapping, > >...
2024 Oct 05
1
[PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools
...> > > > b/drivers/gpu/drm/drm_gem_vram_helper.c > > > > index 22b1fe9c03b8..7c3165b00378 100644 > > > > --- a/drivers/gpu/drm/drm_gem_vram_helper.c > > > > +++ b/drivers/gpu/drm/drm_gem_vram_helper.c > > > > @@ -931,9 +931,10 @@ static int drm_vram_mm_init(struct > > > > drm_vram_mm > > > > *vmm, struct drm_device *dev, > > > > ?? vmm->vram_size = vram_size; > > > > ? > > > > ?? ret = ttm_device_init(&vmm->bdev, &bo_driver, dev->dev, > > > > - dev->anon_i...
2024 Oct 02
2
[PATCH v2 0/2] drm/ttm: Add an option to report graphics memory OOM
Some graphics APIs differentiate between out-of-graphics-memory and out-of-host-memory (system memory). Add a device init flag to have -ENOSPC propagated from the resource managers instead of being converted to -ENOMEM, to aid driver stacks in determining what error code to return or whether corrective action can be taken at the driver level. The first patch deals with a ttm_device_init()
2019 May 06
25
[PATCH v4 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 06
25
[PATCH v4 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 08
22
[PATCH v5 00/20] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 08
22
[PATCH v5 00/20] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 Apr 29
21
[PATCH v3 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same