From: Dave Airlie Date: Thu, 6 Apr 2017 19:41:42 +0000 (+1000) Subject: Merge branch 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux into drm... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0168778115687486575a6831df865dbc4f5369fe;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-next A few more things for 4.12: - ttm and amdgpu support for non-contiguous vram CPU mappings - lots of bug fixes and cleanups for vega10 - misc bug fixes and code cleanups [airlied: fix do_div error on 32-bit arm, not sure it's 100% correct] * 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux: (58 commits) drm/amdgpu: use uintptr_t instead of unsigned long to store pointer drm/amdgpu: Avoid using signed integer to store pointer value drm/amdgpu:invoke new implemented AI MB func drm/amdgpu/vega10:timeout set to equal with VI drm/amdgpu:implement the reset MB func for vega10 drm/amdgpu:fix typo for mxgpu_ai drm/amdgpu:no need to involv HDP in KIQ drm/amdgpu:add PSP block only load_type=PSP (v2) drm/amdgpu/smu9: update to latest driver interface drm/amd/amdgpu: cleanup gfx_v9_0_gpu_init() drm/amd/amdgpu: cleanup gfx_v9_0_rlc_reset() drm/amd/amdgpu: cleanup gfx_v9_0_rlc_start() drm/amd/amdgpu: simplify gfx_v9_0_cp_gfx_enable() drm/amd/amdgpu: cleanup gfx_v9_0_kiq_init_register() drm/amd/amdgpu: Drop gfx_v9_0_print_status() drm/amd/amdgpu: cleanup gfx_v9_0_set_gfx_eop_interrupt_state() drm/amd/amdgpu: cleanup gfx_v9_0_set_priv_reg_fault_state() drm/amd/amdgpu: cleanup gfx_v9_0_set_priv_inst_fault_state() drm/amd/amdgpu: cleanup gfx_v9_0_init_queue() drm/amdgpu: Move function amdgpu_has_atpx near other similar functions ... --- 0168778115687486575a6831df865dbc4f5369fe diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 244bb9aacf86,e3008d55ec77..7e993259c2e9 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@@ -574,6 -546,17 +546,17 @@@ static void amdgpu_ttm_io_mem_free(stru { } + static unsigned long amdgpu_ttm_io_mem_pfn(struct ttm_buffer_object *bo, + unsigned long page_offset) + { + struct drm_mm_node *mm = bo->mem.mm_node; + uint64_t size = mm->size; - unsigned long offset = page_offset; ++ uint64_t offset = page_offset; + + page_offset = do_div(offset, size); + return (bo->mem.bus.base >> PAGE_SHIFT) + mm->start + page_offset; + } + /* * TTM backend functions. */