Displaying 20 results from an estimated 41 matches for "ttm_bo_init_mm".
2009 Aug 19
1
[PATCH] drm/nouveau: Add a MM for mappable VRAM that isn't usable as scanout.
...= drm_get_resource_len(dev, 1) >> PAGE_SHIFT;
text_size = (256 * 1024) >> PAGE_SHIFT;
@@ -530,6 +544,16 @@ nouveau_mem_init(struct drm_device *dev)
vram_size = bar1_size;
}
+ /* mappable vram that's unusable as scanout. */
+ if (scanout_size < vram_size) {
+ if ((ret = ttm_bo_init_mm(bdev, TTM_PL_PRIV1, scanout_size,
+ vram_size - scanout_size))) {
+ NV_ERROR(dev, "Failed PRIV1 mm init: %d\n", ret);
+ return ret;
+ }
+ vram_size = scanout_size;
+ }
+
/* mappable vram */
if ((ret = ttm_bo_init_mm(bdev, TTM_PL_VRAM, text_size,
vram_size - text_siz...
2015 Jun 10
1
[patch] drm/virtio: remove some dead code
...-- a/drivers/gpu/drm/virtio/virtgpu_ttm.c
+++ b/drivers/gpu/drm/virtio/virtgpu_ttm.c
@@ -443,14 +443,12 @@ int virtio_gpu_ttm_init(struct virtio_gpu_device *vgdev)
if (r) {
DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
goto err_dev_init;
- return r;
}
r = ttm_bo_init_mm(&vgdev->mman.bdev, TTM_PL_TT, 0);
if (r) {
DRM_ERROR("Failed initializing GTT heap.\n");
goto err_mm_init;
- return r;
}
return 0;
2015 Jun 10
1
[patch] drm/virtio: remove some dead code
...-- a/drivers/gpu/drm/virtio/virtgpu_ttm.c
+++ b/drivers/gpu/drm/virtio/virtgpu_ttm.c
@@ -443,14 +443,12 @@ int virtio_gpu_ttm_init(struct virtio_gpu_device *vgdev)
if (r) {
DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
goto err_dev_init;
- return r;
}
r = ttm_bo_init_mm(&vgdev->mman.bdev, TTM_PL_TT, 0);
if (r) {
DRM_ERROR("Failed initializing GTT heap.\n");
goto err_mm_init;
- return r;
}
return 0;
2019 Apr 09
0
[PATCH 13/15] drm/vboxvideo: Convert vboxvideo driver to Simple TTM
...> + vbox->available_vram_size,
> + &vbox_simple_ttm_funcs);
> if (ret) {
> - DRM_ERROR("Error initialising bo driver; %d\n", ret);
> + DRM_ERROR("Error initializing Simple TTM; %d\n", ret);
> return ret;
> }
>
> - ret = ttm_bo_init_mm(bdev, TTM_PL_VRAM,
> - vbox->available_vram_size >> PAGE_SHIFT);
> - if (ret) {
> - DRM_ERROR("Failed ttm VRAM init: %d\n", ret);
> - goto err_device_release;
> - }
> -
> #ifdef DRM_MTRR_WC
> vbox->fb_mtrr = drm_mtrr_add(pci_resource_start...
2019 Apr 24
0
[PATCH v2 07/17] drm/ast: Convert AST driver to VRAM MM
...;dev;
- struct ttm_bo_device *bdev = &ast->ttm.bdev;
-
- ret = ttm_bo_device_init(&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_E...
2019 May 06
0
[PATCH v4 12/19] drm/bochs: Convert bochs driver to VRAM MM
...m.bdev;
- int ret;
+ struct drm_vram_mm *vmm;
- ret = ttm_bo_device_init(&bochs->ttm.bdev,
- &bochs_bo_driver,
- bochs->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,
- bochs->fb_size >> PAGE_SHIFT);
- if (ret) {
- DRM_ERROR("Failed ttm VRAM init: %d\n", ret);
- return ret;
- }
+ vmm = drm_vram_helper_alloc_mm(bochs->dev, bochs->fb_base,
+ bochs->fb_size,
+ &drm_gem_vram_mm_funcs);
+...
2019 Apr 24
0
[PATCH v2 05/17] drm: Add VRAM MM, a simple memory manager for dedicated VRAM
...const struct drm_vram_mm_funcs* funcs)
+{
+ int ret;
+
+ vmm->vram_base = vram_base;
+ vmm->vram_size = vram_size;
+ vmm->funcs = funcs;
+
+ ret = ttm_bo_device_init(&vmm->bdev, &bo_driver,
+ dev->anon_inode->i_mapping,
+ true);
+ if (ret)
+ return ret;
+
+ ret = ttm_bo_init_mm(&vmm->bdev, TTM_PL_VRAM, vram_size >> PAGE_SHIFT);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+EXPORT_SYMBOL(drm_vram_mm_init);
+
+/**
+ * drm_vram_mm_cleanup() - Cleans up an initialized instance of VRAM MM.
+ * @vmm: the VRAM MM instance to clean up
+ */
+void drm_vram_mm_cleanup(str...
2020 Jul 15
3
[PATCH 1/4] drm: remove optional dummy function from drivers using TTM
Implementing those is completely unecessary.
Signed-off-by: Christian K?nig <christian.koenig at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 -----
drivers/gpu/drm/drm_gem_vram_helper.c | 5 -----
drivers/gpu/drm/qxl/qxl_ttm.c | 6 ------
drivers/gpu/drm/radeon/radeon_ttm.c | 5 -----
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 11 -----------
2019 May 22
2
[PATCH] drm/cirrus: remove leftover files
...truct ttm_bo_device *bdev = &cirrus->ttm.bdev;
-
- ret = ttm_bo_device_init(&cirrus->ttm.bdev,
- &cirrus_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,
- cirrus->mc.vram_size >> PAGE_SHIFT);
- if (ret) {
- DRM_ERROR("Failed ttm VRAM init: %d\n", ret);
- return ret;
- }
-
- arch_io_reserve_memtype_wc(pci_resource_start(dev->pdev, 0),
- pci_resource_len(dev->pdev, 0));
-
- cirrus->fb_mtrr...
2019 May 22
2
[PATCH] drm/cirrus: remove leftover files
...truct ttm_bo_device *bdev = &cirrus->ttm.bdev;
-
- ret = ttm_bo_device_init(&cirrus->ttm.bdev,
- &cirrus_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,
- cirrus->mc.vram_size >> PAGE_SHIFT);
- if (ret) {
- DRM_ERROR("Failed ttm VRAM init: %d\n", ret);
- return ret;
- }
-
- arch_io_reserve_memtype_wc(pci_resource_start(dev->pdev, 0),
- pci_resource_len(dev->pdev, 0));
-
- cirrus->fb_mtrr...
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
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
2014 Jul 18
22
[Bug 81485] New: dmesg spam on startup
https://bugs.freedesktop.org/show_bug.cgi?id=81485
Priority: medium
Bug ID: 81485
Assignee: nouveau at lists.freedesktop.org
Summary: dmesg spam on startup
QA Contact: xorg-team at lists.x.org
Severity: normal
Classification: Unclassified
OS: All
Reporter: fry.kun at gmail.com
Hardware: Other
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 Jul 02
2
[PATCH v6 11/18] drm/virtio: switch from ttm to gem shmem helpers
...t it to 0 */
- r = ttm_bo_device_init(&vgdev->mman.bdev,
- &virtio_gpu_bo_driver,
- vgdev->ddev->anon_inode->i_mapping,
- false);
- if (r) {
- DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
- goto err_dev_init;
- }
-
- r = ttm_bo_init_mm(&vgdev->mman.bdev, TTM_PL_TT, 0);
- if (r) {
- DRM_ERROR("Failed initializing GTT heap.\n");
- goto err_mm_init;
- }
- return 0;
-
-err_mm_init:
- ttm_bo_device_release(&vgdev->mman.bdev);
-err_dev_init:
- return r;
-}
-
-void virtio_gpu_ttm_fini(struct virtio_gpu_device *...
2019 Jun 20
2
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
...t it to 0 */
- r = ttm_bo_device_init(&vgdev->mman.bdev,
- &virtio_gpu_bo_driver,
- vgdev->ddev->anon_inode->i_mapping,
- false);
- if (r) {
- DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
- goto err_dev_init;
- }
-
- r = ttm_bo_init_mm(&vgdev->mman.bdev, TTM_PL_TT, 0);
- if (r) {
- DRM_ERROR("Failed initializing GTT heap.\n");
- goto err_mm_init;
- }
- return 0;
-
-err_mm_init:
- ttm_bo_device_release(&vgdev->mman.bdev);
-err_dev_init:
- return r;
-}
-
-void virtio_gpu_ttm_fini(struct virtio_gpu_device *...
2019 Jun 20
2
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
...t it to 0 */
- r = ttm_bo_device_init(&vgdev->mman.bdev,
- &virtio_gpu_bo_driver,
- vgdev->ddev->anon_inode->i_mapping,
- false);
- if (r) {
- DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
- goto err_dev_init;
- }
-
- r = ttm_bo_init_mm(&vgdev->mman.bdev, TTM_PL_TT, 0);
- if (r) {
- DRM_ERROR("Failed initializing GTT heap.\n");
- goto err_mm_init;
- }
- return 0;
-
-err_mm_init:
- ttm_bo_device_release(&vgdev->mman.bdev);
-err_dev_init:
- return r;
-}
-
-void virtio_gpu_ttm_fini(struct virtio_gpu_device *...
2019 Aug 02
0
[PATCH v7 14/18] drm/virtio: switch from ttm to gem shmem helpers
...t it to 0 */
- r = ttm_bo_device_init(&vgdev->mman.bdev,
- &virtio_gpu_bo_driver,
- vgdev->ddev->anon_inode->i_mapping,
- false);
- if (r) {
- DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
- goto err_dev_init;
- }
-
- r = ttm_bo_init_mm(&vgdev->mman.bdev, TTM_PL_TT, 0);
- if (r) {
- DRM_ERROR("Failed initializing GTT heap.\n");
- goto err_mm_init;
- }
- return 0;
-
-err_mm_init:
- ttm_bo_device_release(&vgdev->mman.bdev);
-err_dev_init:
- return r;
-}
-
-void virtio_gpu_ttm_fini(struct virtio_gpu_device *...
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