#
6729c731 |
| 23-Aug-2024 |
Jani Nikula <jani.nikula@intel.com> |
drm/ttm: fix kernel-doc typo for @trylock_only
s/tryock_only/trylock_only/
Fixes: da966b82bf3d ("drm/ttm: Provide a generic LRU walker helper") Cc: Thomas Hellström <thomas.hellstrom@linux.intel.co
drm/ttm: fix kernel-doc typo for @trylock_only
s/tryock_only/trylock_only/
Fixes: da966b82bf3d ("drm/ttm: Provide a generic LRU walker helper") Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Christian König <christian.koenig@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240823141110.3431423-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
show more ...
|
#
c358a809 |
| 20-Aug-2024 |
Alex Deucher <alexander.deucher@amd.com> |
Revert "drm/ttm: increase ttm pre-fault value to PMD size"
This reverts commit 0ddd2ae586d28e521d37393364d989ce118802e0.
This patch causes sluggishness and stuttering in graphical apps.
Closes: ht
Revert "drm/ttm: increase ttm pre-fault value to PMD size"
This reverts commit 0ddd2ae586d28e521d37393364d989ce118802e0.
This patch causes sluggishness and stuttering in graphical apps.
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3564 Link: https://www.spinics.net/lists/dri-devel/msg457005.html Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Zhu Lingshan <lingshan.zhu@amd.com> Cc: Christian König <christian.koenig@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240820134600.1909370-1-alexander.deucher@amd.com
show more ...
|
#
3756310e |
| 05-Jul-2024 |
Thomas Hellström <thomas.hellstrom@linux.intel.com> |
drm/ttm: Use the LRU walker for eviction
Use the LRU walker for eviction. This helps removing a lot of code with weird locking semantics.
The functionality is slightly changed so that when trylocke
drm/ttm: Use the LRU walker for eviction
Use the LRU walker for eviction. This helps removing a lot of code with weird locking semantics.
The functionality is slightly changed so that when trylocked buffer objects are exhausted, we continue to interleave walks with ticket-locks while there is still progress made. The list walks are not restarted in-between evictions.
Also provide a separate ttm_bo_evict_first() function for its single user. The context of that user allows sleeping dma_resv locks.
v6: - Various cleanups suggested by Matthew Brost. - Fix error return code of ttm_bo_evict_first(). (Matthew Brost) - Fix an error check that was inverted. (Matthew Brost) v7: - Use s64 rather than long (Christian König) - Early ttm_resource_cursor_fini() in ttm_bo_evict_first(). - Simplify check for bo_moved in ttm_bo_evict_first(). (Christian König) - Don't evict pinned bos.
Cc: Christian König <christian.koenig@amd.com> Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: <dri-devel@lists.freedesktop.org> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20240705153206.68526-8-thomas.hellstrom@linux.intel.com Signed-off-by: Christian König <christian.koenig@amd.com>
show more ...
|
#
10efe34d |
| 05-Jul-2024 |
Thomas Hellström <thomas.hellstrom@linux.intel.com> |
drm/ttm: Use the LRU walker helper for swapping
Rework the TTM swapping to use the LRU walker helper. This helps fixing up the ttm_bo_swapout() interface to be consistent about not requiring any loc
drm/ttm: Use the LRU walker helper for swapping
Rework the TTM swapping to use the LRU walker helper. This helps fixing up the ttm_bo_swapout() interface to be consistent about not requiring any locking.
For now mimic the current behaviour of using trylock only. We could be using ticket-locks here but defer that until it's deemed necessary. The TTM swapout functionality is a bit weird anyway since it alternates between memory types without exhausting TTM_PL_SYSTEM first.
Intentionally keep pages as the unit of progress since changing that to bytes is an unrelated change that can be done later.
v6: - Improve on error code translation in the swapout callback (Matthew Brost). v7: - Use s64 rather than long. - Remove ttm_resource_cursor_fini() since it's no longer used. - Rename ttm_resource_cursor_fini_locked() to ttm_resource_cursor_fini(). - Don't swap out pinned bos.
Cc: Christian König <christian.koenig@amd.com> Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: <dri-devel@lists.freedesktop.org> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20240705153206.68526-7-thomas.hellstrom@linux.intel.com Signed-off-by: Christian König <christian.koenig@amd.com>
show more ...
|
#
da966b82 |
| 05-Jul-2024 |
Thomas Hellström <thomas.hellstrom@linux.intel.com> |
drm/ttm: Provide a generic LRU walker helper
Provide a generic LRU walker in TTM, in the spirit of drm_gem_lru_scan() but building on the restartable TTM LRU functionality.
The LRU walker optionall
drm/ttm: Provide a generic LRU walker helper
Provide a generic LRU walker in TTM, in the spirit of drm_gem_lru_scan() but building on the restartable TTM LRU functionality.
The LRU walker optionally supports locking objects as part of a ww mutex locking transaction, to mimic to some extent the current functionality in ttm. However any -EDEADLK return is converted to -ENOSPC and then to -ENOMEM before reaching the driver, so that the driver will need to backoff and possibly retry without being able to keep the ticket.
v3: - Move the helper to core ttm. - Remove the drm_exec usage from it for now, it will be reintroduced later in the series. v4: - Handle the -EALREADY case if ticketlocking. v6: - Some cleanup and added code comments (Matthew Brost) - Clarified the ticketlock in the commit message (Matthew Brost) v7: - Use s64 rather than long for the target and progress (Christian König) - Update documentation to not encourage using pages as a progress measure. (Christian König) - Remove cond_resched(). (Christian König)
Cc: Christian König <christian.koenig@amd.com> Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: <dri-devel@lists.freedesktop.org> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20240705153206.68526-6-thomas.hellstrom@linux.intel.com Signed-off-by: Christian König <christian.koenig@amd.com>
show more ...
|
#
0ddd2ae5 |
| 04-Jun-2024 |
Zhu Lingshan <lingshan.zhu@amd.com> |
drm/ttm: increase ttm pre-fault value to PMD size
ttm page fault handler ttm_bo_vm_fault_reserved() maps TTM_BO_VM_NUM_PREFAULT more pages beforehand due to the principle of locality.
However, on s
drm/ttm: increase ttm pre-fault value to PMD size
ttm page fault handler ttm_bo_vm_fault_reserved() maps TTM_BO_VM_NUM_PREFAULT more pages beforehand due to the principle of locality.
However, on some platform the page faults are more costly, this patch intends to increase the number of ttm pre-fault to relieve the number of page faults.
When multiple levels of page table is supported, the new default value would be the PMD size, similar to huge page.
Signed-off-by: Zhu Lingshan <lingshan.zhu@amd.com> Reported-and-tested-by: Li Jingxiang <jingxiang.li@ecarxgroup.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240604084934.225738-1-lingshan.zhu@amd.com Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
show more ...
|
#
4f51e057 |
| 08-Mar-2024 |
Jani Nikula <jani.nikula@intel.com> |
drm/ttm: fix ttm_bo.h kernel-doc warnings
Some renames, some formatting fixes, add some missing documentation.
v3: Fix struct ttm_buffer_object .sg documentation (Christian)
Cc: Christian Koenig <
drm/ttm: fix ttm_bo.h kernel-doc warnings
Some renames, some formatting fixes, add some missing documentation.
v3: Fix struct ttm_buffer_object .sg documentation (Christian)
Cc: Christian Koenig <christian.koenig@amd.com> Cc: Huang Rui <ray.huang@amd.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240308160750.3741833-1-jani.nikula@intel.com
show more ...
|
#
2799804a |
| 09-Aug-2023 |
Yue Haibing <yuehaibing@huawei.com> |
drm/ttm: Remove two unused function declarations
Commit cd3a8a596214 ("drm/ttm: remove ttm_bo_(un)lock_delayed_workqueue") removed the implementations but not the declarations.
Signed-off-by: Yue H
drm/ttm: Remove two unused function declarations
Commit cd3a8a596214 ("drm/ttm: remove ttm_bo_(un)lock_delayed_workqueue") removed the implementations but not the declarations.
Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230809135839.13216-1-yuehaibing@huawei.com Signed-off-by: Christian König <christian.koenig@amd.com>
show more ...
|
#
13acb368 |
| 09-May-2022 |
Christian König <christian.koenig@amd.com> |
drm/ttm/vmwgfx: move ttm_bo_wait into VMWGFX
Not used anymore by other drivers or TTM itself.
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Zack Rusin <zackr@vmware.com> Li
drm/ttm/vmwgfx: move ttm_bo_wait into VMWGFX
Not used anymore by other drivers or TTM itself.
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Zack Rusin <zackr@vmware.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-9-christian.koenig@amd.com
show more ...
|
#
a3185f91 |
| 09-May-2022 |
Christian König <christian.koenig@amd.com> |
drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2
Merge and cleanup the two headers into a single description of the object API. Also move all the documentation to the implementation and drop unnec
drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2
Merge and cleanup the two headers into a single description of the object API. Also move all the documentation to the implementation and drop unnecessary includes from the header.
No functional change.
v2: minimal checkpatch.pl cleanup
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-4-christian.koenig@amd.com
show more ...
|