Re: your mail

2021-04-07 Thread Huang Rui
On Wed, Apr 07, 2021 at 09:27:46AM +0800, songqiang wrote: Please add the description in the commit message and subject. Thanks, Ray > Signed-off-by: songqiang > --- > drivers/gpu/drm/ttm/ttm_page_alloc.c | 18 ++ > 1 file changed, 14 insertions(+), 4 deletions(-) > > diff --g

Re: [PATCH 2/2] drm/ttm: optimize the pool shrinker a bit v2

2021-04-15 Thread Huang Rui
ood for me as well. Acked-by: Huang Rui > --- > drivers/gpu/drm/ttm/ttm_pool.c | 44 +- > 1 file changed, 22 insertions(+), 22 deletions(-) > > diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c > index cb38b1a17b09..955

Re: [PATCH] drm/ttm: remove special handling for non GEM drivers

2021-04-19 Thread Huang Rui
On Mon, Apr 19, 2021 at 05:28:53PM +0800, Christian König wrote: > vmwgfx is the only driver actually using this. Move the handling into > the driver instead. > > Signed-off-by: Christian König Acked-by: Huang Rui > --- > drivers/gpu/drm/ttm/ttm_bo.c | 11 ---

Re: [PATCH 1/1] drm: ttm: Don't bail from ttm_global_init if debugfs_create_dir fails

2021-08-15 Thread Huang Rui
fs root directory fails, then no biggie: keep calm and > carry on. > > Fixes: 69de4421bb4c ("drm/ttm: Initialize debugfs from ttm_global_init()") > Signed-off-by: Dan Moulding It looks ok for me. Reviewed-by: Huang Rui Thanks, Ray > --- > drivers/gpu/drm/ttm/ttm_

Re: [PATCH 0/1] Fix DRM driver initialization failure in kernel v5.14

2021-08-15 Thread Huang Rui
On Sat, Aug 14, 2021 at 12:50:14AM +0800, Dan Moulding wrote: > Just a friendly reminder that this fix for a regression needs > review. It should be a quick review. > > It would probably be good to ensure this gets in before the final 5.14 > release, otherwise this is going to be a very visible re

Re: [PATCH V2] drm: amd: pm: Mundane typo fixes in the file amdgpu_pm.c

2021-03-14 Thread Huang Rui
On Mon, Mar 15, 2021 at 11:21:36AM +0800, Bhaskar Chowdhury wrote: > > s/"an minimum"/"a minimum"/ > s/"an maxmum"/"a maximum"/ > > Signed-off-by: Bhaskar Chowdhury Reviewed-by: Huang Rui > --- > Changes from V1: > Randy&#

Re: [PATCH 1/3] drm/ttm: move swapout logic around v2

2021-03-18 Thread Huang Rui
On Thu, Mar 18, 2021 at 08:47:17PM +0800, Christian K�nig wrote: > Move the iteration of the global lru into the new function > ttm_global_swapout() and use that instead in drivers. > > v2: consistently return int > > Signed-off-by: Christian K?nig Reviewed-by: Huang Rui &g

Re: [PATCH 2/3] drm/ttm: remove swap LRU v3

2021-03-18 Thread Huang Rui
ian König Reviewed-by: Huang Rui > --- > drivers/gpu/drm/ttm/ttm_bo.c| 29 -- > drivers/gpu/drm/ttm/ttm_bo_util.c | 1 - > drivers/gpu/drm/ttm/ttm_device.c| 60 + > drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- > include/drm/

Re: [PATCH 3/3] drm/ttm: switch to per device LRU lock

2021-03-18 Thread Huang Rui
On Thu, Mar 18, 2021 at 08:47:19PM +0800, Christian König wrote: > Instead of having a global lock. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++--- > drivers/gpu/drm/qxl/qxl_release.c | 5 +-- > drivers/gpu/drm/ttm/ttm_bo.c | 49 +

Re: [PATCH 3/3] drm/ttm: switch to per device LRU lock

2021-03-22 Thread Huang Rui
On Fri, Mar 19, 2021 at 08:10:21PM +0800, Christian König wrote: > Am 19.03.21 um 05:32 schrieb Huang Rui: > > On Thu, Mar 18, 2021 at 08:47:19PM +0800, Christian König wrote: > >> Instead of having a global lock. > >> > >> Signed-off-by: Christian König > &

Re: [PATCH] drm/ttm: device naming cleanup

2021-01-22 Thread Huang Rui
e. > > Signed-off-by: Christian König Acked-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- > .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c | 6 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_t

Re: [PATCH][next] drm/amdgpu: Fix masking binary not operator on two mask operations

2021-01-24 Thread Huang Rui
wise operator") > Fixes: 3c9a7b7d6e75 ("drm/amdgpu: update mmhub mgcg&ls for mmhub_v2_3") > Signed-off-by: Colin Ian King Thanks. Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >

Re: [PATCH] drm/ttm: Explain why ttm_bo_add_move_fence uses a shared slot

2021-05-19 Thread Huang Rui
On Wed, May 19, 2021 at 04:24:09PM +0800, Daniel Vetter wrote: > Motivated because I got confused and Christian confirmed why this > works. I think this is non-obvious enough that it merits a slightly > longer comment. > > Cc: Christian König > Cc: Christian Koenig > Cc: Hu

Re: [PATCH] drm/ttm: cleanup BO size handling

2020-12-08 Thread Huang Rui
->mem.num_pages is the size in number of pages in the > resource domain of bo->mem.mem_type. > > Signed-off-by: Christian König Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c |

Re: [PATCH] drm/ttm: fix DMA32 handling in the global page pool

2020-11-19 Thread Huang Rui
m > > it could otherwise happen that the DMA32 device gets pages > > it can't work with. > > > > Signed-off-by: Christian König Looks good for me. Reviewed-by: Huang Rui > > --- > > drivers/gpu/drm/ttm/ttm_pool.c | 22 ++ > > 1

Re: [PATCH 1/5] drm/ttm: cleanup ttm_resource_compat

2021-09-02 Thread Huang Rui
On Tue, Aug 31, 2021 at 07:21:06PM +0800, Christian König wrote: > Move that function into the resource handling and remove an unused parameter. > > Signed-off-by: Christian König Looks this patch is separate from others in this series. new_flags won't be used anymore. Reviewed

Re: [PATCH 2/5] drm/ttm: add busy and idle placement flags

2021-09-02 Thread Huang Rui
On Tue, Aug 31, 2021 at 07:21:07PM +0800, Christian König wrote: > More flexible than the busy placements. > > Signed-off-by: Christian König Patch 2 -> 5 are Acked-by: Huang Rui > --- > drivers/gpu/drm/ttm/ttm_bo.c| 8 +++- > include/drm/ttm/ttm_placement.h

[PATCH] drm/ttm: fix the type mismatch error on sparc64

2021-09-07 Thread Huang Rui
igned int". Suggested-by: Linus Torvalds Signed-off-by: Huang Rui Cc: Christian König --- drivers/gpu/drm/ttm/ttm_pool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c index af1b41369626..c961a788b519 10

Re: [PATCH 3/3] drm: fix the warnning of string style for scheduler trace.

2022-01-19 Thread Huang Rui
8, ring=' > [ 158.890910] WARNING: CPU: 6 PID: 1617 at kernel/trace/trace.c:3830 > trace_check_vprintf+0x481/0x4a0 > > Signed-off-by: Huang Rui > --- > drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 17 + > 1 file changed, 9 inser

[PATCH 2/3] drm/amdgpu: fix the fence timeline null pointer

2021-12-12 Thread Huang Rui
132302] amdgpu_ib_schedule+0x2f9/0x580 [amdgpu] [ 156.132586] amdgpu_job_run+0xed/0x220 [amdgpu] Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/g

[PATCH 1/3] dma-buf: make the flags can be configured during dma fence init

2021-12-12 Thread Huang Rui
might trigger some issues in get_timeline_name callback implementation of different gpu driver. So make a member to initialize the flags in dma_fence_init(). Signed-off-by: Huang Rui --- drivers/dma-buf/dma-fence.c | 2 +- include/linux/dma-fence.h | 7 +++ 2 files changed, 8 insertions

[PATCH 3/3] drm: fix the warnning of string style for scheduler trace.

2021-12-12 Thread Huang Rui
nt:%d ' current_buffer: 'Xorg-1588[001] . 149.391136: drm_sched_job: entity=76f0d517, id=1, fence=8dd56028, ring=' [ 158.890910] WARNING: CPU: 6 PID: 1617 at kernel/trace/trace.c:3830 trace_check_vprintf+0x481/0x4a0 Signed-off-by: Huang Rui --- drive

[PATCH v2] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-14 Thread Huang Rui
156.131993] amdgpu_fence_emit+0x10d/0x2b0 [amdgpu] [ 156.132302] amdgpu_ib_schedule+0x2f9/0x580 [amdgpu] [ 156.132586] amdgpu_job_run+0xed/0x220 [amdgpu] Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +- driv

[PATCH v3] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-14 Thread Huang Rui
156.131993] amdgpu_fence_emit+0x10d/0x2b0 [amdgpu] [ 156.132302] amdgpu_ib_schedule+0x2f9/0x580 [amdgpu] [ 156.132586] amdgpu_job_run+0xed/0x220 [amdgpu] Signed-off-by: Huang Rui --- V1 -> V2: add another amdgpu_fence_ops which is for job-embedded fence.

Re: 5.11-rc1 TTM list corruption

2021-01-04 Thread Huang Rui
On Mon, Jan 04, 2021 at 06:58:02PM +0800, Borislav Petkov wrote: > On Fri, Jan 01, 2021 at 03:34:28PM +0100, Christian K?nig wrote: > > Going to double check the code, but can you reproduce this issue > > reliable? > > Lemme find a test box which can trigger it too - the splat happened > on my wor

Re: 5.11-rc1 TTM list corruption

2021-01-05 Thread Huang Rui
On Tue, Jan 05, 2021 at 06:31:38PM +0800, Borislav Petkov wrote: > Hi, > > On Tue, Jan 05, 2021 at 12:12:13PM +0800, Huang Rui wrote: > > I am reproducing this issue as well, are you using a Raven board? > > I have no clue what Raven is. The workstation I trig

Re: 5.11-rc1 TTM list corruption

2021-01-05 Thread Huang Rui
On Tue, Jan 05, 2021 at 07:43:51PM +0800, Borislav Petkov wrote: > On Tue, Jan 05, 2021 at 07:08:52PM +0800, Huang Rui wrote: > > Ah, this asic is a bit old and still use radeon driver. So we didn't > > reproduce it on amdgpu driver. I don't have such the old asic in

Re: [PATCH 1/2] drm/radeon: stop re-init the TTM page pool

2021-01-05 Thread Huang Rui
On Wed, Jan 06, 2021 at 02:23:08AM +0800, Christian König wrote: > Drivers are not supposed to init the page pool directly any more. > > Signed-off-by: Christian König Series are Reviewed-by: Huang Rui > --- > drivers/gpu/drm/radeon/radeon_ttm.c | 3 --- > 1 file ch

Re: [PATCH] drm/ttm: make the pool shrinker lock a mutex

2021-01-12 Thread Huang Rui
an atomic context. > > > > Signed-off-by: Christian König > > Reported-by: Mikhail Gavrilov > > Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3") Sorry, missed this mail yesterday. Patch looks good for me. Reviewed-by: Huang Rui > > --- &

Re: [PATCH] drm: amdgpu: pm: Mark vangogh_clk_dpm_is_enabled() as static

2021-01-12 Thread Huang Rui
On Wed, Jan 13, 2021 at 03:57:22AM +0800, Souptick Joarder wrote: > kernel test robot throws below warnings -> > > drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:594:6: > warning: no previous prototype for 'vangogh_clk_dpm_is_enabled' > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdg

Re: [PATCH 5.11 regression fix] drm/ttm: fix combining __GFP_HIGHMEM and __GFP_DMA32 flag for DMA32 pools

2021-01-12 Thread Huang Rui
[ 419.852375] ---[ end trace 511e5346897d9526 ]--- > > Note in case of the vboxvideo driver the DMA32 pool is allocated through > drm_vram_helper_alloc_mm() which is also used by the bochs and > hisilicon/hibmc drivers. > > Cc: Christian König > Fixes: d099fc8f540a ("dr

Re: [PATCH] drm: amdgpu: pm: Mark vangogh_clk_dpm_is_enabled() as static

2021-01-12 Thread Huang Rui
On Wed, Jan 13, 2021 at 10:13:02AM +0800, Alex Deucher wrote: > On Tue, Jan 12, 2021 at 8:19 PM Huang Rui wrote: > > > > On Wed, Jan 13, 2021 at 03:57:22AM +0800, Souptick Joarder wrote: > > > kernel test robot throws below warnings -> > > > > > >

Re: [PATCH] drm: amdgpu: pm: Mark vangogh_clk_dpm_is_enabled() as static

2021-01-12 Thread Huang Rui
On Wed, Jan 13, 2021 at 10:21:26AM +0800, Huang Rui wrote: > On Wed, Jan 13, 2021 at 10:13:02AM +0800, Alex Deucher wrote: > > On Tue, Jan 12, 2021 at 8:19 PM Huang Rui wrote: > > > > > > On Wed, Jan 13, 2021 at 03:57:22AM +0800, Souptick Joarder wrote: > > &

Re: [PATCH v3] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-15 Thread Huang Rui
0day-ci%2Flinux&data=04%7C01%7Cray.huang%40amd.com%7C57b8f278a2a14c8dab7908d9bfcf2649%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637751718697946000%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=eX6JF%2FjinJTZj9CzP4tvTA3Chd8NODf85oNlSd

[PATCH] drm/amdgpu: fix mismatch warning between the prototype and function name

2021-12-15 Thread Huang Rui
Reported-by: kernel test robot Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index db41d16838b9..9afd11ca2709 100644 -

Re: [PATCH 3/3] drm: fix the warnning of string style for scheduler trace.

2021-12-19 Thread Huang Rui
entity=76f0d517, id=1, > fence=8dd56028, ring=' > [ 158.890910] WARNING: CPU: 6 PID: 1617 at kernel/trace/trace.c:3830 > trace_check_vprintf+0x481/0x4a0 > > Signed-off-by: Huang Rui > --- > drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 17 + >

Re: [PATCH] drm/amdgpu/powerplay: Fix missing break in switch statement

2019-03-03 Thread Huang Rui
; Fixes: 34a564eaf528 ("drm/amd/powerplay: implement fw image related smum > interface for Polaris.") > Cc: sta...@vger.kernel.org > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 + >

Re: [PATCH] drm/radeon: remove three set but not used variable

2019-12-27 Thread Huang Rui
obj_type’ set but not used [-Wunused-but-set-variable] > > They are never used, and so can be removed. > > Signed-off-by: yu kuai Thanks! Acked-by: Huang Rui > --- > drivers/gpu/drm/radeon/radeon_atombios.c | 15 ++- > 1 file changed, 2 insertions

Re: [RFC PATCH 0/6] do not store GPU address in TTM

2020-02-13 Thread Huang Rui
7c3344%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637171919805856109&sdata=zlA%2FHePGKcILKg7Ezc9CGc%2FWXJkRa5xmrBznvJcAomk%3D&reserved=0 Looks good for me as well for amd part. Acked-by: Huang Rui > > Nirmoy Das (6): > drm/amdgpu: move ttm bo->offset to amdgpu_bo > drm/radeon: d

Re: [PATCH] drm/ttm: fix false positive assert

2020-03-09 Thread Huang Rui
sometimes incorrectly triggers when pinned BOs are destroyed. > > > > Signed-off-by: Christian König Reviewed-by: Huang Rui > > --- > > drivers/gpu/drm/ttm/ttm_bo.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git

Re: [PATCH] drm/ttm: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Huang Rui
i Reviewed-by: Huang Rui > --- > drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > index bf876faea592..faefaaef790

Re: [PATCH] drm/ttm: nuke invalidate_caches callback

2020-01-13 Thread Huang Rui
On Mon, Jan 13, 2020 at 10:45:25PM +0800, Christian König wrote: > Ping? Just a trivial cleanup. > > Am 10.01.20 um 16:09 schrieb Christian König: > > Another completely unused feature. > > > > Signed-off-by: Christian König Reviewed-by: Huang Rui > > ---

Re: [PATCH] drm/nouveau: init the base GEM fields for internal BOs

2021-06-10 Thread Huang Rui
size, int align, > >>   if (IS_ERR(nvbo)) > >>   return PTR_ERR(nvbo); > >>   +    nvbo->bo.base.size = size; > >> +    dma_resv_init(&nvbo->bo.base._resv); > >> +    drm_vma_node_reset(&nvbo->bo.base.vma_node); > &

[RFC PATCH 0/5] Add Xen PVH dom0 support for GPU

2023-03-12 Thread Huang Rui
n (2): x86/xen: acpi registers gsi for xen pvh xen/privcmd: add IOCTL_PRIVCMD_GSI_FROM_IRQ Huang Rui (3): x86/xen: disable swiotlb for xen pvh xen/grants: update initialization order of xen grant table drm/amdgpu: set passthrough mode for xen pvh/hvm arch/x86/include/asm/ap

[RFC PATCH 2/5] xen/grants: update initialization order of xen grant table

2023-03-12 Thread Huang Rui
efore. Signed-off-by: Huang Rui --- arch/x86/xen/grant-table.c | 2 +- drivers/xen/grant-table.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/xen/grant-table.c b/arch/x86/xen/grant-table.c index 1e681bf62561..64a04d1e70f5 100644 --- a/arch/x86/xen/grant-table.c +++ b

[RFC PATCH 1/5] x86/xen: disable swiotlb for xen pvh

2023-03-12 Thread Huang Rui
Xen PVH is the paravirtualized mode and takes advantage of hardware virtualization support when possible. It will using the hardware IOMMU support instead of xen-swiotlb, so disable swiotlb if current domain is Xen PVH. Signed-off-by: Huang Rui --- arch/x86/kernel/pci-dma.c | 8 +++- 1 file

[RFC PATCH 3/5] drm/amdgpu: set passthrough mode for xen pvh/hvm

2023-03-12 Thread Huang Rui
ed to set passthrough mode for Xen PVH/HVM as well. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c index f2e2cba

[RFC PATCH 4/5] x86/xen: acpi registers gsi for xen pvh

2023-03-12 Thread Huang Rui
interrupt by vector. Signed-off-by: Chen Jiqian Signed-off-by: Huang Rui --- arch/x86/include/asm/apic.h | 7 ++ arch/x86/include/asm/xen/pci.h | 5 arch/x86/kernel/acpi/boot.c | 2 +- arch/x86/pci/xen.c | 39 drivers/xen/events

[RFC PATCH 5/5] xen/privcmd: add IOCTL_PRIVCMD_GSI_FROM_IRQ

2023-03-12 Thread Huang Rui
scall IOCTL_PRIVCMD_GSI_FROM_IRQ to translate irq to gsi. So that, we can map pirq successfully in hypervisor side. Signed-off-by: Chen Jiqian Signed-off-by: Huang Rui --- arch/x86/pci/xen.c | 4 drivers/xen/events/events_base.c | 37 driver

Re: [RFC PATCH 1/5] x86/xen: disable swiotlb for xen pvh

2023-03-14 Thread Huang Rui
On Wed, Mar 15, 2023 at 08:52:30AM +0800, Stefano Stabellini wrote: > On Mon, 13 Mar 2023, Jan Beulich wrote: > > On 12.03.2023 13:01, Huang Rui wrote: > > > Xen PVH is the paravirtualized mode and takes advantage of hardware > > > virtualization support when possible.

Re: [PATCH] drm/amdgpu: fix semicolon.cocci warnings

2017-03-31 Thread Huang Rui
On Fri, Mar 31, 2017 at 06:15:10PM +0800, kbuild test robot wrote: > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:133:2-3: Unneeded semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > CC: Huang Rui > Signed-off-by: Fe

[PATCH] drm/ttm: cleanup unuse ret value

2017-04-17 Thread Huang Rui
The ret must be 0 here, otherwise, the function will return after init_mem_type. Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_bo.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 9ee4ff4..5dcb4e1 100644 --- a/drivers

Re: [PATCH] drm/ttm: cleanup unuse ret value

2017-04-17 Thread Huang Rui
On Mon, Apr 17, 2017 at 11:42:18PM +0800, Alex Deucher wrote: > On Mon, Apr 17, 2017 at 3:38 AM, Huang Rui wrote: > > The ret must be 0 here, otherwise, the function will return after > init_mem_type. > > > > Signed-off-by: Huang Rui > > I think you can drop th

[PATCH] drm: amdgpu: mark symbols static where possible

2016-09-03 Thread Huang Rui
are only used in the file in which they are > declared and don't need a declaration, but can be made static. > So this patch marks these functions with 'static'. > > Signed-off-by: Baoyou Xie Thanks. Acked-by: Huang Rui

[PATCH] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-05 Thread Huang Rui
the code logic more clearly. Signed-off-by: Huang Rui --- drivers/gpu/drm/drm_global.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_global.c b/drivers/gpu/drm/drm_global.c index 3d2e91c..3abe738 100644 --- a/drivers/gpu/drm/drm_global.c ++

[PATCH] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-07 Thread Huang Rui
On Tue, Sep 06, 2016 at 10:33:18PM +0800, Sean Paul wrote: > On Mon, Sep 5, 2016 at 3:00 AM, Huang Rui wrote: > > In previous drm_global_item_ref, there are two times of writing > > ref->object if item->refcount is 0. So this patch does a minor update > > to put allo

[PATCH v2] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-07 Thread Huang Rui
the code logic more clearly. Signed-off-by: Huang Rui --- Changes from V1 -> V2: - Add kfree exceptional handle to avoid memory leak. - Improve code style. --- drivers/gpu/drm/drm_global.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/

[PATCH v2] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-07 Thread Huang Rui
Sorry, please ignore this V2, there is a typo in "goto out" at this patch. I will send a "update V2" later. Thanks, Rui On Wed, Sep 07, 2016 at 11:26:39AM +0800, Huang Rui wrote: > In previous drm_global_item_ref, there are two times of writing > ref->object if item-

[Updated PATCH v2] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-07 Thread Huang Rui
the code logic more clearly. Signed-off-by: Huang Rui --- Changes from V1 -> V2: - Add kfree exceptional handle to avoid memory leak. - Improve code style. --- drivers/gpu/drm/drm_global.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/

[Updated PATCH v2] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-07 Thread Huang Rui
On Wed, Sep 07, 2016 at 09:12:29AM +0200, Christian König wrote: > Am 07.09.2016 um 07:24 schrieb Huang Rui: > >In previous drm_global_item_ref, there are two times of writing > >ref->object if item->refcount is 0. So this patch does a minor update > >to put alloc and

[Updated PATCH v2] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-07 Thread Huang Rui
On Wed, Sep 07, 2016 at 04:02:47PM +0800, Koenig, Christian wrote: > Am 07.09.2016 um 09:54 schrieb Huang Rui: > > On Wed, Sep 07, 2016 at 09:12:29AM +0200, Christian K?nig wrote: > >> Am 07.09.2016 um 07:24 schrieb Huang Rui: snip. > >>> ++item->ref

[PATCH v3] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-07 Thread Huang Rui
the code logic more clearly. Signed-off-by: Huang Rui --- Changes from V2 -> V3: - Use duplicate mutex release to avoid "goto" in non-error patch. - Rename error label --- drivers/gpu/drm/drm_global.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(

[PATCH v3] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-08 Thread Huang Rui
On Thu, Sep 08, 2016 at 02:36:06PM +0800, Chris Wilson wrote: > On Wed, Sep 07, 2016 at 10:07:57PM -0400, Huang Rui wrote: > > In previous drm_global_item_ref, there are two times of writing > > ref->object if item->refcount is 0. So this patch does a minor update > >

[PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible

2016-09-19 Thread Huang Rui
Hi Baoyou, On Mon, Sep 19, 2016 at 03:28:39PM +0800, Baoyou Xie wrote: > We get a few warnings when building kernel with W=1: > drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: > no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes] > drivers/

Re: drm/ttm: new TT backend allocation pool

2020-10-26 Thread Huang Rui
On Sun, Oct 25, 2020 at 11:40:47PM +0800, Christian König wrote: > This replaces the spaghetti code in the two existing page pools. > > First of all depending on the allocation size it is between 3 (1GiB) and > 5 (1MiB) times faster than the old implementation. > > It makes better use of

Re: [PATCH 1/9] drm/ttm: new TT backend allocation pool v2

2020-10-27 Thread Huang Rui
ages which is now fixed in the new code as well. > > v2: make ttm_pool_apply_caching static as reported by the kernel bot, add > some more checks > > Signed-off-by: Christian König Just verified them in my renoir platform, the page faults are gone. Thanks! Serie

Re: [PATCH 1/9] drm/ttm: new TT backend allocation pool v2

2020-10-27 Thread Huang Rui
On Mon, Oct 26, 2020 at 06:41:09PM +0100, Christian König wrote: > This replaces the spaghetti code in the two existing page pools. > > First of all depending on the allocation size it is between 3 (1GiB) and > 5 (1MiB) times faster than the old implementation. > > It makes better use of buddy pa

Re: [PATCH] drm/ttm: Warn on pinning without holding a reference

2020-10-28 Thread Huang Rui
o we know who's the culprit). > > Signed-off-by: Daniel Vetter Reviewed-by: Huang Rui > Cc: Christian Koenig > Cc: Huang Rui > --- > drivers/gpu/drm/ttm/ttm_bo.c | 2 +- > include/drm/ttm/ttm_bo_api.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) >

[PATCH] drm/ttm: clean up the inteface which is not used

2020-03-25 Thread Huang Rui
invalidate_caches is actually not used, so clean it up. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 6 -- drivers/gpu/drm/nouveau/nouveau_bo.c | 7 --- drivers/gpu/drm/qxl/qxl_ttm.c | 6 -- drivers/gpu/drm/radeon/radeon_ttm.c

Re: [PATCH] drm/ttm: clean up the inteface which is not used

2020-03-25 Thread Huang Rui
On Thu, Mar 26, 2020 at 01:30:31AM +0800, Christian König wrote: > Am 25.03.20 um 18:27 schrieb Alex Deucher: > > On Wed, Mar 25, 2020 at 1:20 PM Christian König > > wrote: > >> Am 25.03.20 um 16:34 schrieb Huang Rui: > >>> invalidate_caches

[PATCH 1/2] drm/ttm: clean up ttm_trace_dma_map/ttm_trace_dma_unmap

2020-04-06 Thread Huang Rui
ttm_trace_dma_map/ttm_trace_dma_unmap is never used anymore. Move the pr_fmt prefix into this header. Signed-off-by: Huang Rui --- include/drm/ttm/ttm_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/drm/ttm/ttm_debug.h b/include/drm/ttm/ttm_debug.h index

[PATCH 2/2] drm/ttm: abstract all ttm prefix into ttm_debug header

2020-04-06 Thread Huang Rui
Using the debug header instead of macro at the start of the files. Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_agp_backend.c| 3 +-- drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- drivers/gpu/drm/ttm/ttm_bo_vm.c | 3 +-- drivers/gpu/drm/ttm/ttm_memory.c | 3

Re: [PATCH 1/2] drm/ttm: clean up ttm_trace_dma_map/ttm_trace_dma_unmap

2020-04-07 Thread Huang Rui
On Tue, Apr 07, 2020 at 03:06:01PM +0800, Koenig, Christian wrote: > Am 07.04.20 um 08:44 schrieb Huang Rui: > > ttm_trace_dma_map/ttm_trace_dma_unmap is never used anymore. Move the pr_fmt > > prefix into this header. > > > > Signed-off-by: Huang Rui > > --- >

[PATCH v2] drm/ttm: clean up ttm_trace_dma_map/ttm_trace_dma_unmap (v2)

2020-04-07 Thread Huang Rui
ttm_trace_dma_map/ttm_trace_dma_unmap is never used anymore. v2: remove the file completely Signed-off-by: Huang Rui --- include/drm/ttm/ttm_debug.h | 31 --- 1 file changed, 31 deletions(-) delete mode 100644 include/drm/ttm/ttm_debug.h diff --git a/include/drm

Re: [PATCH] drm/ttm: update kernel-doc line comments

2020-09-18 Thread Huang Rui
rm/ttm/ttm_memory.c:271: warning: Function parameter or > member 'ctx' not described in 'ttm_shrink' > > Signed-off-by: Tian Tao Acked-by: Huang Rui > --- > drivers/gpu/drm/ttm/ttm_memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH 01/11] drm/ttm: add ttm_bo_pin()/ttm_bo_unpin() v2

2020-09-22 Thread Huang Rui
On Tue, Sep 22, 2020 at 09:31:58PM +0800, Christian König wrote: > As an alternative to the placement flag add a > pin count to the ttm buffer object. > > v2: add dma_resv_assert_help() calls > > Signed-off-by: Christian König Series look good for me as well. Reviewed-by: Hu

Re: [PATCH -next] drm/amdkfd: Fix -Wunused-const-variable warning

2020-09-10 Thread Huang Rui
On Thu, Sep 10, 2020 at 10:55:32AM +0800, YueHaibing wrote: > If KFD_SUPPORT_IOMMU_V2 is not set, gcc warns: > > drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device.c:121:37: warning: > ‘raven_device_info’ defined but not used [-Wunused-const-variable=] > static const struct kfd_device_info raven_de

Re: [PATCH v2 -next] drm/amdkfd: Fix -Wunused-const-variable warning

2020-09-10 Thread Huang Rui
kfd_device_info raven_device_info = { > ^~~~~~~~~ > > As Huang Rui suggested, Raven already has the fallback path, > so it should be out of IOMMU v2 flag. > > Suggested-by: Huang Rui > Signed-off-by: YueHaibing Acked-by: Huang Rui

Re: [PATCH][drm-next] drm/amdgpu/powerplay: fix missing break in switch statements

2018-10-09 Thread Huang Rui
Missing break in switch") > > Fixes: 18aafc59b106 ("drm/amd/powerplay: implement fw related smu interface > for iceland.") > Signed-off-by: Colin Ian King Acked-by: Huang Rui > --- > drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 2 ++ > drivers/gpu/drm/

Re: [PATCH 1/3] drm/ttm: Provide struct ttm_global for referencing TTM global state

2018-10-18 Thread Huang Rui
On Fri, Oct 19, 2018 at 12:27:50AM +0800, Thomas Zimmermann wrote: > The new struct ttm_global provides drivers with TTM's global memory and > BO in a unified way. Initialization and release is handled internally. > > The functionality provided by struct ttm_global is currently re-implemented > by

Re: [PATCH 2/3] drm/amdgpu: Replace TTM initialization/release with ttm_global

2018-10-18 Thread Huang Rui
On Fri, Oct 19, 2018 at 12:27:51AM +0800, Thomas Zimmermann wrote: > Unified initialization and relesae of the global TTM state is provided > by struct ttm_global and its interfaces. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/a

Re: [PATCH 3/3] drm/radeon: Replace TTM initialization/release with ttm_global

2018-10-18 Thread Huang Rui
On Fri, Oct 19, 2018 at 12:27:52AM +0800, Thomas Zimmermann wrote: > Unified initialization and release of the global TTM state is provided > by struct ttm_global and its interfaces. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Huang Rui > --- > drivers/gpu/drm/radeon

Re: [PATCH][next] drm/amd/pp: initialized result to zero before or'ing in data

2018-06-07 Thread Huang Rui
off-by: Colin Ian King Nice catch, we must check return values for programming didt registers all as 0. Acked-by: Huang Rui > --- > drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/

[PATCH v2 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-10 Thread Huang Rui
From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui --- include/drm/ttm/ttm_bo_driver.h | 28 1 file changed, 28

[PATCH v2 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves

2018-08-10 Thread Huang Rui
From: Christian König When move a BO to the end of LRU, it need remember the BO positions. Make sure all moved bo in between "first" and "last". And they will be bulk moving together. Signed-off-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amd

[PATCH v2 3/5] drm/ttm: add bulk move function on LRU

2018-08-10 Thread Huang Rui
This function allow us to bulk move a group of BOs to the tail of their LRU. The positions of group of BOs are stored on the (first, last) bulk_move_pos structure. Signed-off-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_bo.c | 52

[PATCH v2 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v2)

2018-08-10 Thread Huang Rui
l. We can see the visible improvement than original, and even better than original with workaround. v2: move all BOs include idle, relocated, and moved list to the end of LRU and put them together. Signed-off-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/am

[PATCH v2 5/5] drm/amdgpu: move PD/PT bos on LRU again

2018-08-10 Thread Huang Rui
The new bulk moving functionality is ready, the overhead of moving PD/PT bos to LRU is fixed. So move them on LRU again. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Re: [PATCH v2 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v2)

2018-08-10 Thread Huang Rui
On Fri, Aug 10, 2018 at 10:18:24PM +0800, Koenig, Christian wrote: > Am 10.08.2018 um 13:55 schrieb Huang Rui: > > I continue to work for bulk moving that based on the proposal by Christian. > > > > Background: > > amdgpu driver will move all PD/PT and PerVM BOs into id

Re: [PATCH v2 0/5] drm/ttm, amdgpu: Introduce LRU bulk move functionality

2018-08-12 Thread Huang Rui
> Cheers > > Mike > > On Fri, 10 Aug 2018 at 12:56 Huang Rui wrote: > > > The idea and proposal is originally from Christian, and I continue to work > > to > > deliver it. > > > > Background: > > amdgpu driver will move all PD/PT and PerVM BOs

[PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Huang Rui
From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian --- include/drm/ttm/ttm_bo_driver.h | 28

[PATCH v3 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality

2018-08-13 Thread Huang Rui
h_entry instead of the one with save entry. Thanks, Rui Christian König (2): drm/ttm: add helper structures for bulk moves on lru list drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves Huang Rui (3): drm/ttm: add bulk move function on LRU drm/amdgpu: use bulk moves for effic

[PATCH v3 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves

2018-08-13 Thread Huang Rui
From: Christian König When move a BO to the end of LRU, it need remember the BO positions. Make sure all moved bo in between "first" and "last". And they will be bulk moving together. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian ---

[PATCH v3 5/5] drm/amdgpu: move PD/PT bos on LRU again

2018-08-13 Thread Huang Rui
The new bulk moving functionality is ready, the overhead of moving PD/PT bos to LRU is fixed. So move them on LRU again. Signed-off-by: Huang Rui Tested-by: Mike Lothian --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-13 Thread Huang Rui
: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 73 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 ++ 2 files changed, 61 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH v3 3/5] drm/ttm: add bulk move function on LRU

2018-08-13 Thread Huang Rui
This function allow us to bulk move a group of BOs to the tail of their LRU. The positions of group of BOs are stored on the (first, last) bulk_move_pos structure. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian --- drivers/gpu/drm/ttm/ttm_bo.c | 52

Re: [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:02:00AM +0800, Zhou, David(ChunMing) wrote: > > > On 2018年08月13日 18:16, Christian König wrote: > > Am 13.08.2018 um 11:58 schrieb Huang Rui: > >> From: Christian König > >> > >> Add bulk move pos to store the pointer of firs

Re: [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:22:34AM +0800, Zhang, Jerry (Junwei) wrote: > On 08/13/2018 06:16 PM, Christian König wrote: > >Am 13.08.2018 um 11:58 schrieb Huang Rui: > >>From: Christian König > >> > >>Add bulk move pos to store the pointer of first and last bu

Re: [PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-13 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:26:43AM +0800, Zhang, Jerry wrote: > On 08/13/2018 05:58 PM, Huang Rui wrote: > > I continue to work for bulk moving that based on the proposal by Christian. > > > > Background: > > amdgpu driver will move all PD/PT and PerVM BOs into idle

Re: [PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-14 Thread Huang Rui
On Tue, Aug 14, 2018 at 02:45:22PM +0800, Koenig, Christian wrote: > Am 14.08.2018 um 05:05 schrieb Huang Rui: > > On Tue, Aug 14, 2018 at 10:26:43AM +0800, Zhang, Jerry wrote: > >> On 08/13/2018 05:58 PM, Huang Rui wrote: > >>> I continue to work for bulk moving

  1   2   >