diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-08-12 19:17:18 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-08-12 20:42:08 +0200 |
commit | 534b1f9071d95325044c21d47d9f63a45cdf425e (patch) | |
tree | 5c2aa3cd65bfb6b9e73d9ad22c021d800380f0f6 /drivers/gpu/drm/nouveau/nouveau_bo.h | |
parent | 82dd18096c718962379e61cd8a7a0dc219db174f (diff) | |
parent | 62975d27d647a40c58d3b96c29b911fc4f33c310 (diff) | |
download | lwn-534b1f9071d95325044c21d47d9f63a45cdf425e.tar.gz lwn-534b1f9071d95325044c21d47d9f63a45cdf425e.zip |
Merge drm/drm-next into drm-misc-next
Backmerging drm-next into drm-misc-next for nouveau and panel updates.
Resolves a conflict between ttm and nouveau, where struct ttm_mem_res got
renamed to struct ttm_resource.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.h | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.h b/drivers/gpu/drm/nouveau/nouveau_bo.h index e944b4aa5547..aecb7481df0d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.h +++ b/drivers/gpu/drm/nouveau/nouveau_bo.h @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: MIT */ #ifndef __NOUVEAU_BO_H__ #define __NOUVEAU_BO_H__ - +#include <drm/ttm/ttm_bo_driver.h> #include <drm/drm_gem.h> struct nouveau_channel; +struct nouveau_cli; +struct nouveau_drm; struct nouveau_fence; -struct nvkm_vma; struct nouveau_bo { struct ttm_buffer_object bo; @@ -135,4 +136,42 @@ nouveau_bo_new_pin_map(struct nouveau_cli *cli, u64 size, int align, u32 flags, } return ret; } + +int nv04_bo_move_init(struct nouveau_channel *, u32); +int nv04_bo_move_m2mf(struct nouveau_channel *, struct ttm_buffer_object *, + struct ttm_resource *, struct ttm_resource *); + +int nv50_bo_move_init(struct nouveau_channel *, u32); +int nv50_bo_move_m2mf(struct nouveau_channel *, struct ttm_buffer_object *, + struct ttm_resource *, struct ttm_resource *); + +int nv84_bo_move_exec(struct nouveau_channel *, struct ttm_buffer_object *, + struct ttm_resource *, struct ttm_resource *); + +int nva3_bo_move_copy(struct nouveau_channel *, struct ttm_buffer_object *, + struct ttm_resource *, struct ttm_resource *); + +int nvc0_bo_move_init(struct nouveau_channel *, u32); +int nvc0_bo_move_m2mf(struct nouveau_channel *, struct ttm_buffer_object *, + struct ttm_resource *, struct ttm_resource *); + +int nvc0_bo_move_copy(struct nouveau_channel *, struct ttm_buffer_object *, + struct ttm_resource *, struct ttm_resource *); + +int nve0_bo_move_init(struct nouveau_channel *, u32); +int nve0_bo_move_copy(struct nouveau_channel *, struct ttm_buffer_object *, + struct ttm_resource *, struct ttm_resource *); + +#define NVBO_WR32_(b,o,dr,f) nouveau_bo_wr32((b), (o)/4 + (dr), (f)) +#define NVBO_RD32_(b,o,dr) nouveau_bo_rd32((b), (o)/4 + (dr)) +#define NVBO_RD32(A...) DRF_RD(NVBO_RD32_, ##A) +#define NVBO_RV32(A...) DRF_RV(NVBO_RD32_, ##A) +#define NVBO_TV32(A...) DRF_TV(NVBO_RD32_, ##A) +#define NVBO_TD32(A...) DRF_TD(NVBO_RD32_, ##A) +#define NVBO_WR32(A...) DRF_WR( NVBO_WR32_, ##A) +#define NVBO_WV32(A...) DRF_WV( NVBO_WR32_, ##A) +#define NVBO_WD32(A...) DRF_WD( NVBO_WR32_, ##A) +#define NVBO_MR32(A...) DRF_MR(NVBO_RD32_, NVBO_WR32_, u32, ##A) +#define NVBO_MV32(A...) DRF_MV(NVBO_RD32_, NVBO_WR32_, u32, ##A) +#define NVBO_MD32(A...) DRF_MD(NVBO_RD32_, NVBO_WR32_, u32, ##A) #endif |