Commit aa8e2435 authored by Thomas Zimmermann's avatar Thomas Zimmermann Committed by Alex Deucher
Browse files

drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant



Most TTM drivers define the constant DRM_FILE_PAGE_OFFSET of the same
value. The only exception is vboxvideo, which is being converted to the
new offset by this patch. Unifying the constants in a single place
simplifies the driver code.

Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fd16ac8e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -51,8 +51,6 @@
#include "amdgpu_sdma.h"
#include "bif/bif_4_1_d.h"

#define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)

static int amdgpu_map_buffer(struct ttm_buffer_object *bo,
			     struct ttm_mem_reg *mem, unsigned num_pages,
			     uint64_t offset, unsigned window,
+0 −2
Original line number Diff line number Diff line
@@ -353,8 +353,6 @@ extern int ast_dumb_mmap_offset(struct drm_file *file,
				uint32_t handle,
				uint64_t *offset);

#define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)

int ast_mm_init(struct ast_private *ast);
void ast_mm_fini(struct ast_private *ast);

+0 −2
Original line number Diff line number Diff line
@@ -101,8 +101,6 @@ static inline struct bochs_bo *gem_to_bochs_bo(struct drm_gem_object *gem)
	return container_of(gem, struct bochs_bo, gem);
}

#define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)

static inline u64 bochs_bo_mmap_offset(struct bochs_bo *bo)
{
	return drm_vma_node_offset_addr(&bo->bo.vma_node);
+0 −1
Original line number Diff line number Diff line
@@ -169,7 +169,6 @@ cirrus_bo(struct ttm_buffer_object *bo)


#define to_cirrus_obj(x) container_of(x, struct cirrus_gem_object, base)
#define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)

				/* cirrus_main.c */
int cirrus_device_init(struct cirrus_device *cdev,
+0 −2
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@

#include "hibmc_drm_drv.h"

#define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)

static inline struct hibmc_drm_private *
hibmc_bdev(struct ttm_bo_device *bd)
{
Loading