Re: [PATCH V2] drm/ttm: increase ttm pre-fault value to PMD size

2024-06-04 Thread Huang Rui
> patch intends to increase the number of ttm pre-fault to relieve > the number of page faults. > > When multiple levels of page table is supported, the new default > value would be the PMD size, similar to huge page. > > Signed-off-by: Zhu Lingshan > Reported-and-tested

Re: [PATCH] drm/ttm: increase ttm pre-fault value to PMD size

2024-05-29 Thread Huang Rui
On Thu, May 30, 2024 at 11:41:04AM +0800, Zhu, Lingshan wrote: > ttm page fault handler ttm_bo_vm_fault_reserved() maps > TTM_BO_VM_NUM_PREFAULT more pages beforehand > due to the principle of locality. > > However, on some platform the page faults are more costly, this > patch intends to

Re: [PATCH] drm/virtio: add definition for venus capset

2023-12-17 Thread Huang Rui
On Sat, Dec 16, 2023 at 12:45:32AM +0800, Dmitry Osipenko wrote: > On 11/19/23 06:46, Dmitry Osipenko wrote: > > On 9/21/23 00:16, Dmitry Osipenko wrote: > >> On 9/15/23 13:59, Huang Rui wrote: > >>> This definition is used fro qemu, and qemu imports this marco in the

Re: [PATCH v3] drm/virtio: add new virtio gpu capset definitions

2023-10-10 Thread Huang Rui
On Tue, Oct 10, 2023 at 11:52:14PM +0800, Dmitry Osipenko wrote: > On 10/10/23 18:40, Dmitry Osipenko wrote: > > On 10/10/23 16:57, Huang Rui wrote: > >> These definitions are used fro qemu, and qemu imports this marco in the > >> headers to enable gfxstream, venus, cr

[PATCH v3] drm/virtio: add new virtio gpu capset definitions

2023-10-10 Thread Huang Rui
These definitions are used fro qemu, and qemu imports this marco in the headers to enable gfxstream, venus, cross domain, and drm (native context) for virtio gpu. So it should add them even kernel doesn't use this. Signed-off-by: Huang Rui Reviewed-by: Akihiko Odaki --- Changes V1 -> V2: -

Re: [PATCH v2] drm/virtio: add definitions for gfxstream and venus capset

2023-10-10 Thread Huang Rui
On Tue, Oct 10, 2023 at 06:20:03PM +0800, Dmitry Osipenko wrote: > Hi, > > On 10/10/23 06:25, Huang Rui wrote: > > These definitions are used fro qemu, and qemu imports this marco in the > > headers to enable gfxstream or venus for virtio gpu. So it should add it > &

[PATCH v2] drm/virtio: add definitions for gfxstream and venus capset

2023-10-09 Thread Huang Rui
These definitions are used fro qemu, and qemu imports this marco in the headers to enable gfxstream or venus for virtio gpu. So it should add it even kernel doesn't use this. Signed-off-by: Huang Rui --- Changes V1 -> V2: - Add all capsets including gfxstream and venus in kernel header (Dmi

[PATCH] drm/virtio: add definition for venus capset

2023-09-15 Thread Huang Rui
This definition is used fro qemu, and qemu imports this marco in the headers to enable venus for virtio gpu. So it should add it even kernel doesn't use this. Signed-off-by: Huang Rui --- Hi all, We would like to add a new definition for venus capset, it will be used for qemu. Please see

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.

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

2023-03-12 Thread Huang Rui
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 drivers/xen

[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 3/5] drm/amdgpu: set passthrough mode for xen pvh/hvm

2023-03-12 Thread Huang Rui
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 f2e2cbaa7fde

[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 2/5] xen/grants: update initialization order of xen grant table

2023-03-12 Thread Huang Rui
. 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/arch

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

2023-03-12 Thread Huang Rui
): 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/apic.h | 7

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

2022-01-19 Thread Huang Rui
[ 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 insertions(+), 8 deletion

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

2021-12-19 Thread Huang Rui
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 + > 1 file changed,

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

2021-12-15 Thread Huang Rui
ad 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 v3] drm/amdgpu: introduce new amdgpu_fence object to indicate the job embedded fence

2021-12-15 Thread Huang Rui
2a14c8dab7908d9bfcf2649%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637751718697946000%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=eX6JF%2FjinJTZj9CzP4tvTA3Chd8NODf85oNlSdCpq14%3Dreserved=0 > git fetch --no-tags linux-review > Hu

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

2021-12-14 Thread Huang Rui
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. V2 -

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

2021-12-14 Thread Huang Rui
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 +- drivers/g

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

2021-12-12 Thread Huang Rui
' 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 --- drivers/gpu/drm/scheduler

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

2021-12-12 Thread Huang Rui
, and it 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 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] drm/ttm: fix the type mismatch error on sparc64

2021-09-07 Thread Huang Rui
unsigned 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 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

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-by:

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

2021-08-16 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: [PATCH 1/1] drm: ttm: Don't bail from ttm_global_init if debugfs_create_dir fails

2021-08-16 Thread Huang Rui
ot 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_dev

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

2021-06-10 Thread Huang Rui
lign, > >>   if (IS_ERR(nvbo)) > >>   return PTR_ERR(nvbo); > >>   +    nvbo->bo.base.size = size; > >> +    dma_resv_init(>bo.base._resv); > >> +    drm_vma_node_reset(>bo.base.vma_node); > >> + > >>   ret = nouveau_bo_init(nvbo, size, align, domain, sg, robj); > >>   if (ret) > >>   return ret; > >> > > > > That works, thanks for the fix! > > > > Tested-by: Mikko Perttunen Reviewed-by: Huang Rui > > Thanks. Can anybody give me an rb that I can push this to drm-misc-next > before the weekend? > > Regards, > Christian. > > > > > Mikko >

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: 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 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: 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

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 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 2/3] drm/ttm: remove swap LRU v3

2021-03-18 Thread Huang Rui
n 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/ttm/t

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 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][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 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(-) > > diff -

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

2021-01-22 Thread Huang Rui
ange. > > 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] 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] 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 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 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] >

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

2021-01-12 Thread Huang Rui
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 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: 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 my hand.

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-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

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 file

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(-) > >

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

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

2020-10-27 Thread Huang Rui
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! Series are Tested-by: Huang Rui &

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 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] drm/ttm: update kernel-doc line comments

2020-09-18 Thread Huang Rui
gt; 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 --git a/drivers/gpu/drm/ttm/ttm_memory.c > b/drivers/gpu/drm/ttm/ttm_memory

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 -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

[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 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 1/2] drm/ttm: clean up ttm_trace_dma_map/ttm_trace_dma_unmap

2020-04-07 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-07 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] 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] 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: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Huang Rui
Iwai 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: 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: [RFC PATCH 0/6] do not store GPU address in TTM

2020-02-13 Thread Huang Rui
44%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637171919805856109sdata=zlA%2FHePGKcILKg7Ezc9CGc%2FWXJkRa5xmrBznvJcAomk%3Dreserved=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: don't use ttm

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/radeon: remove three set but not used variable

2019-12-27 Thread Huang Rui
pe’ 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(+), 13 de

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 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 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 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 >

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] list: introduce list_bulk_move_tail helper

2018-09-17 Thread Huang Rui
but better placed in the common list headers. > > Signed-off-by: Christian König > --- For TTM change, patch is Reviewed-by: Huang Rui For new list_bulk_move_tail helper in hinclude/linux/list.h, may we have your comments from LKML? Thanks, Ray > drivers/gpu/drm/ttm/ttm_bo.c | 25 +-

Re: [PATCH 1/2] list: introduce list_bulk_move_tail helper

2018-09-14 Thread Huang Rui
Bulk move helper is useful for TTM driver to improve the LRU moving efficiency. Please go on with my RB. Series are Reviewed-and-Tested-by: Huang Rui > --- > include/linux/list.h | 23 +++ > 1 file changed, 23 insertions(+) > > diff --git a/include/linux/list

Re: [PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed

2018-09-11 Thread Huang Rui
gt; staging tree to work properly...). > > Just add a printk to ttm_bo_bulk_move_helper to print pos->first and > pos->last. > > And another one to amdgpu_bo_destroy to printk the value of tbo. > Hi Tom, Could you help to add below traces to check when the bo is freed.

Re: [PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed

2018-09-10 Thread Huang Rui
On Mon, Sep 10, 2018 at 05:25:48PM +0800, Koenig, Christian wrote: > Am 10.09.2018 um 11:23 schrieb Huang Rui: > > On Mon, Sep 10, 2018 at 11:00:04AM +0200, Christian König wrote: > >> Hi Ray, > >> > >> well those patches doesn't make sense, the pointe

Re: [PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed

2018-09-10 Thread Huang Rui
On Mon, Sep 10, 2018 at 05:25:48PM +0800, Koenig, Christian wrote: > Am 10.09.2018 um 11:23 schrieb Huang Rui: > > On Mon, Sep 10, 2018 at 11:00:04AM +0200, Christian König wrote: > >> Hi Ray, > >> > >> well those patches doesn't make sense, the pointe

Re: [PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed

2018-09-10 Thread Huang Rui
gt; Christian. > > Am 10.09.2018 um 10:57 schrieb Huang Rui: > >It avoids to be refered again after freed. > > > >Signed-off-by: Huang Rui > >Cc: Christian König > >Cc: Tom StDenis > >--- > > drivers/gpu/drm/ttm/ttm_bo.c | 1 + > > 1 file c

[PATCH 2/2] drm/amdgpu: set tbo pointer as null after amdgpu bo is freed

2018-09-10 Thread Huang Rui
The tbo pointer will still have value even the amdgpu bo is freed. It doesn't make sense that it still points a freed memory. It could be refered mistakenly, so set it as null. Signed-off-by: Huang Rui Cc: Christian K??nig Cc: Tom StDenis --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1

[PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed

2018-09-10 Thread Huang Rui
It avoids to be refered again after freed. Signed-off-by: Huang Rui Cc: Christian K??nig Cc: Tom StDenis --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 138c989..d3ef5f8 100644 --- a/drivers

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

2018-08-22 Thread Huang Rui
Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 64 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 11

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

2018-08-22 Thread Huang Rui
On Wed, Aug 22, 2018 at 04:45:27PM +0800, Zhang, Jerry (Junwei) wrote: > On 08/22/2018 04:38 PM, Huang Rui wrote: > >On Wed, Aug 22, 2018 at 04:33:30PM +0800, Huang Rui wrote: > >>On Wed, Aug 22, 2018 at 04:07:20PM +0800, Zhang, Jerry wrote: > >>>On 08/22/2018 03:5

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

2018-08-22 Thread Huang Rui
k we can commit it. > > Thanks for taking care of this, > Christian. OK. Thanks to your time. Thanks, Ray > > Am 22.08.2018 um 09:52 schrieb Huang Rui: > > The idea and proposal is originally from Christian, and I continue to work > > to > > deliver it. > >

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

2018-08-22 Thread Huang Rui
On Wed, Aug 22, 2018 at 04:33:30PM +0800, Huang Rui wrote: > On Wed, Aug 22, 2018 at 04:07:20PM +0800, Zhang, Jerry wrote: > > On 08/22/2018 03:52 PM, Huang Rui wrote: > > > I continue to work for bulk moving that based on the proposal by > > > Christian. > >

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

2018-08-22 Thread Huang Rui
On Wed, Aug 22, 2018 at 04:07:20PM +0800, Zhang, Jerry wrote: > On 08/22/2018 03:52 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 id

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

2018-08-22 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 Tested-by: Dieter Nützel Acked-by: Chunming Zhou

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

2018-08-22 Thread Huang Rui
o_lru_tail after command submission, at that time, all bo will be back on idle list. v5: remove amdgpu_vm_move_to_lru_tail_by_list(), use bulk_moveable instread of validated, and move ttm_bo_bulk_move_lru_tail() also into amdgpu_vm_move_to_lru_tail(). Signed-off-by: Christian König Signed-off-by:

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

2018-08-22 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 Tested-by: Dieter Nützel Acked-by: Chunming Zhou Reviewed-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2

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

2018-08-22 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 Test

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

2018-08-22 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 Tested-by: Dieter Nützel Acked-by: Chunming Zhou Reviewed

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

2018-08-22 Thread Huang Rui
_bo_bulk_move_lru_tail() also into amdgpu_vm_move_to_lru_tail(). Thanks, Ray 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/

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

2018-08-22 Thread Huang Rui
On Wed, Aug 22, 2018 at 11:31:02AM +0800, Huang Rui wrote: > On Tue, Aug 21, 2018 at 03:54:28PM +0200, Christian König wrote: > > Am 21.08.2018 um 15:43 schrieb Huang Rui: > > >On Mon, Aug 20, 2018 at 09:17:12PM +0800, Christian König wrote: > > >>Am 20.08.2

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

2018-08-21 Thread Huang Rui
On Tue, Aug 21, 2018 at 03:54:28PM +0200, Christian König wrote: > Am 21.08.2018 um 15:43 schrieb Huang Rui: > >On Mon, Aug 20, 2018 at 09:17:12PM +0800, Christian König wrote: > >>Am 20.08.2018 um 08:05 schrieb Huang Rui: > >>>On Fri, Aug 17, 2018 at 06:38:16PM

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

2018-08-21 Thread Huang Rui
On Mon, Aug 20, 2018 at 09:17:12PM +0800, Christian König wrote: > Am 20.08.2018 um 08:05 schrieb Huang Rui: > > On Fri, Aug 17, 2018 at 06:38:16PM +0800, Koenig, Christian wrote: > >> Am 17.08.2018 um 12:08 schrieb Huang Rui: > >>> I continue to work for bulk mov

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

2018-08-20 Thread Huang Rui
On Fri, Aug 17, 2018 at 06:38:16PM +0800, Koenig, Christian wrote: > Am 17.08.2018 um 12:08 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

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

2018-08-17 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 Tested-by: Dieter N??tzel Acked-by: Chunming Zhou Reviewed-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

  1   2   >