- 18 9月, 2020 4 次提交
-
-
由 Dave Airlie 提交于
Now the bind functions have all the protection explicitly the drivers can just call them directly, and the api can be unexported Reviewed-by: NChristian König <christian.koenig@amd.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-5-airlied@gmail.com
-
由 Dave Airlie 提交于
This moves unbind into the driver side on destroy paths. Reviewed-by: NChristian König <christian.koenig@amd.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-4-airlied@gmail.com
-
由 Dave Airlie 提交于
Call the driver first and have it call the common code cleanup. This is useful later to fix unbind. Reviewed-by: NChristian König <christian.koenig@amd.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-3-airlied@gmail.com
-
由 Dave Airlie 提交于
This moves the generic tracking into the drivers and protects against reentrancy in the drivers. It fixes up radeon and agp to be able to query the bound status as that is required. Reviewed-by: NChristian König <christian.koenig@amd.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-2-airlied@gmail.com
-
- 16 9月, 2020 3 次提交
-
-
由 Dave Airlie 提交于
Move these up to the bo level, moving ttm_tt to just being backing store. Next step is to move the bound flag out. Reviewed-by: NChristian König <christian.koenig@amd.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-6-airlied@gmail.com
-
由 Dave Airlie 提交于
Drivers have to call populate themselves now before binding. Reviewed-by: NChristian König <christian.koenig@amd.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-5-airlied@gmail.com
-
由 Dave Airlie 提交于
This adds 2 getters and 4 setters, however unbound and populated are currently the same thing, this will change, it also drops a BUG_ON that seems not that useful. Reviewed-by: NChristian König <christian.koenig@amd.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-2-airlied@gmail.com
-
- 15 9月, 2020 1 次提交
-
-
由 Christian König 提交于
Instead of letting TTM masking the caching bits specify directly what the driver needs. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/390206
-
- 11 9月, 2020 2 次提交
-
-
由 Christian König 提交于
It's not supported to specify more than one of those flags. So it never made sense to make this a flag in the first place. Nuke the flags and specify directly which memory type to use. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/389826/?series=81551&rev=1
-
由 Christian König 提交于
Those are going to be removed, stop using them here. Instead use the GEM flags from the UAPI. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/389825/?series=81551&rev=1
-
- 09 9月, 2020 4 次提交
-
-
由 Dave Airlie 提交于
Since the agp bind/unbind/destroy are now getting called from drivers rather than via the func table, drop the bdev parameter. Reviewed-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NBen Skeggs <bskeggs@redhat.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-13-airlied@gmail.com
-
由 Dave Airlie 提交于
Reviewed-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NBen Skeggs <bskeggs@redhat.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-12-airlied@gmail.com
-
由 Dave Airlie 提交于
Acked-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NBen Skeggs <bskeggs@redhat.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-7-airlied@gmail.com
-
由 Dave Airlie 提交于
This pattern is cut-n-pasted across 4 drivers, switch it to a WARN_ON instead, as BUG_ON is considered a bad idea usually. Reviewed-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NBen Skeggs <bskeggs@redhat.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-2-airlied@gmail.com
-
- 08 9月, 2020 2 次提交
-
-
由 Christian König 提交于
This is used by TTM to communicate the physical address which should be used with ioremap(), ioremap_wc(). We don't need to separate the base and offset in any way here. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/389457/
-
由 Dave Airlie 提交于
I want to split this structure up and use it differently, step one remove bdev pointer from it and pass it explicitly. Reviewed-by: NChristian König <christian.koenig@amd.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200826014428.828392-4-airlied@gmail.com
-
- 03 9月, 2020 1 次提交
-
-
由 Christian König 提交于
While working on TTM cleanups I've found that the io_reserve_lru used by Nouveau is actually not working at all. In general we should remove driver specific handling from the memory management, so this patch moves the io_reserve_lru handling into Nouveau instead. v2: don't call ttm_bo_unmap_virtual in nouveau_ttm_io_mem_reserve v3: rebased and use both base and offset in the check v4: fix small typos and test the patch v5: rebased and keep the mem.bus init in TTM. Signed-off-by: NChristian König <christian.koenig@amd.com> Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: NBen Skeggs <bskeggs@redhat.com> Link: https://patchwork.freedesktop.org/patch/388643/
-
- 24 8月, 2020 1 次提交
-
-
由 Dave Airlie 提交于
The drivers all do the same thing here. Reviewed-by: Christian König <christian.koenig@amd.com> for both. Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200811074658.58309-1-airlied@gmail.com
-
- 12 8月, 2020 1 次提交
-
-
由 Christian König 提交于
This is a separate object we work within TTM. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/384338/?series=80346&rev=1
-
- 06 8月, 2020 2 次提交
-
-
由 Dave Airlie 提交于
This name better reflects what the object does. I didn't rename all the pointers it seemed too messy. Signed-off-by: NDave Airlie <airlied@redhat.com> Acked-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NBen Skeggs <bskeggs@redhat.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-60-airlied@gmail.com
-
由 Dave Airlie 提交于
Instead of rolling driver copies of them. v2: cleanup return handling (Ben) Reviewed-by: NBen Skeggs <bskeggs@redhat.com> Signed-off-by: NDave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-4-airlied@gmail.com
-
- 31 7月, 2020 4 次提交
-
-
由 Christian König 提交于
It is a very strange concept to call a function which just calls back the caller for the functions parameters. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NThomas Zimmermann <tzimmermann@suse.de> Reviewed-by: NAlex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/382085/
-
由 Christian König 提交于
Instead just initialize the memory type parameters before calling ttm_bo_init_mm. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NAlex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/382081/
-
由 Christian König 提交于
Instead use a boolean field in the memory manager structure. Also invert the meaning of the field since the use of a TT structure is the special case here. v2: cleanup zero init. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: NThomas Zimmermann <tzimmermann@suse.de> Reviewed-by: NAlex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/382079/
-
由 Christian König 提交于
Instead of repeating that in each driver. v2: keep the caching limitation for VMWGFX for now. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: NAlex Deucher <alexander.deucher@amd.com> Reviewed-by: NThomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/382078/
-
- 24 7月, 2020 3 次提交
-
-
由 Ben Skeggs 提交于
Signed-off-by: NBen Skeggs <bskeggs@redhat.com> Reviewed-by: NLyude Paul <lyude@redhat.com>
-
由 Ben Skeggs 提交于
Signed-off-by: NBen Skeggs <bskeggs@redhat.com> Reviewed-by: NLyude Paul <lyude@redhat.com>
-
由 Gustavo A. R. Silva 提交于
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-throughSigned-off-by: NGustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
-
- 21 7月, 2020 4 次提交
-
-
由 Christian König 提交于
The driver doesn't expose any not-mapable memory resources. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/378244/
-
由 Christian König 提交于
The original intention was to avoid CPU page table unmaps when BOs move between the GTT and SYSTEM domain. The problem is that this never correctly handled changes in the caching attributes or backing pages. Just drop this for now and simply unmap the CPU page tables in all cases. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/378240/
-
由 Christian König 提交于
Just use the use_io_reserve_lru flag. It doesn't make much sense to have two flags. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/378238/
-
由 Christian König 提交于
Nouveau is the only user of this functionality and evicting io space on -EAGAIN is really a misuse of the return code. Instead switch to using -ENOSPC here which makes much more sense and simplifies the code. This could unbreak something as we now cleanly return EAGAIN, but the chance for this are rather low. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/378237/
-
- 26 6月, 2020 1 次提交
-
-
由 Nirmoy Das 提交于
Store ttm bo->offset in struct nouveau_bo instead. Signed-off-by: NNirmoy Das <nirmoy.das@amd.com> Acked-by: NChristian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/372932/Signed-off-by: NChristian König <christian.koenig@amd.com>
-
- 07 4月, 2020 1 次提交
-
-
由 Ben Skeggs 提交于
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
-
- 16 1月, 2020 1 次提交
-
-
由 Christian König 提交于
Another completely unused feature. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NHuang Rui <ray.huang@amd.com> Link: https://patchwork.freedesktop.org/patch/348265/
-
- 15 1月, 2020 1 次提交
-
-
由 James Jones 提交于
The pointer used to walk the table of move ops and pick the right one for the current GPU was declared static, meaning its state was carried over between invocations of the function, and also made the function non-rentrant and thread-unsafe. Since the table is ordered such that newer GPU methods are listed first, the result of this was that initializing newer GPUs after older GPUs would result in no suitable ttm move acceleration operations being found, and ttm would fall back to CPU blits on the older GPUs. This change declares the walking pointer separately from the table and makes it non-static to fix the logic. Signed-off-by: NJames Jones <jajones@nvidia.com> Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
-
- 17 9月, 2019 2 次提交
-
-
由 Thierry Reding 提交于
When the last reference to a TTM BO is dropped, ttm_bo_release() will acquire the DMA reservation object's wound/wait mutex while trying to clean up (ttm_bo_cleanup_refs_or_queue() via ttm_bo_release()). It is therefore essential that drm_gem_object_release() be called after the TTM BO has been uninitialized, otherwise drm_gem_object_release() has already destroyed the wound/wait mutex (via dma_resv_fini()). Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
-
由 Thierry Reding 提交于
Commit 019cbd4a ("drm/nouveau: Initialize GEM object before TTM object") introduced a subtle change in how the buffer allocation size is handled. Prior to that change, the size would get aligned to at least a page, whereas after that change a non-page-aligned size would get passed through unmodified. This ultimately causes a BUG_ON() to trigger in drm_gem_private_object_init() and crashes the system. Fix this by restoring the code that align the allocation size. Fixes: 019cbd4a ("drm/nouveau: Initialize GEM object before TTM object") Reported-by: NIlia Mirkin <imirkin@alum.mit.edu> Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
-
- 21 8月, 2019 1 次提交
-
-
由 Thierry Reding 提交于
TTM assumes that drivers initialize the embedded GEM object before calling the ttm_bo_init() function. This is not currently the case in the Nouveau driver. Fix this by splitting up nouveau_bo_new() into nouveau_bo_alloc() and nouveau_bo_init() so that the GEM can be initialized before TTM BO initialization when necessary. Fixes: b96f3e7c ("drm/ttm: use gem vma_node") Acked-by: NGerd Hoffmann <kraxel@redhat.com> Acked-by: NBen Skeggs <bskeggs@redhat.com> Signed-off-by: NThierry Reding <treding@nvidia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190814093524.GA31345@ulmo
-
- 13 8月, 2019 1 次提交
-
-
由 Christian König 提交于
Be more consistent with the naming of the other DMA-buf objects. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/323401/
-