Re: [PATCH 1/2] drm/ttm: test private resv obj on release/destroy

2025-01-29 Thread James Zhu
Reviewed-and-Tested-by: James Zhu for the series On 2025-01-29 10:28, Christian König wrote: Test the fences in the private dma_resv object instead of the pointer to a potentially shared dma_resv object. This only matters for imported BOs with an SG table since those don't get their dma

[PATCH v2] drm: register more drm device nodes

2024-08-29 Thread James Zhu
Since the default number 256 can't handle large modern systems with large numbers of GPUs, specify a more reasonable default. -v2: update drm_core_exit to unregister more drm device nodes Signed-off-by: James Zhu --- drivers/gpu/drm/drm_drv.c | 4 ++-- include/drm/drm_drv.h | 2 ++ 2

Re: [PATCH] drm: register more drm device nodes

2024-08-29 Thread James Zhu
Please ignore this. need update unregister_chrdev in the meantime Will send out v2 later, On 2024-08-29 15:51, James Zhu wrote: Ping ... On 2024-05-30 11:34, James Zhu wrote: Since the default number 256 can't handle large modern systems with large numbers of GPUs, specify a more reaso

Re: [PATCH] drm: register more drm device nodes

2024-08-29 Thread James Zhu
Ping ... On 2024-05-30 11:34, James Zhu wrote: Since the default number 256 can't handle large modern systems with large numbers of GPUs, specify a more reasonable default. Signed-off-by: James Zhu --- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v6 0/4] drm: Use full allocated minor range for DRM

2024-08-13 Thread James Zhu
Hi Michal I did give Tested-by before. If you need Acks, Here  I can give Acked-by: James Zhu for the series Best Regards! James On 2024-08-13 20:18, Michał Winiarski wrote: On Mon, Aug 12, 2024 at 01:38:38PM GMT, Alex Deucher wrote: Are there any objections to this series? We have been

Re: [PATCH v6 0/4] drm: Use full allocated minor range for DRM

2024-08-13 Thread James Zhu
Hi Michal I did give Tested-by before. If you need Acks, Here I can give Acked-by:JamesZhufortheseries Best Regards! James On 2024-08-13 20:18, Michał Winiarski wrote: On Mon, Aug 12, 2024 at 01:38:38PM GMT, Alex Deucher wrote: Are there any objections to this series? We have been running

[PATCH] drm: register more drm device nodes

2024-05-30 Thread James Zhu
Since the default number 256 can't handle large modern systems with large numbers of GPUs, specify a more reasonable default. Signed-off-by: James Zhu --- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gp

Re: [PATCH v6 0/4] drm: Use full allocated minor range for DRM

2023-08-30 Thread James Zhu
PATCH 1 and 3 are Tested-by:JamesZhu Best Regards! James Zhu On 2023-07-24 17:14, Michał Winiarski wrote: 64 DRM device nodes is not enough for everyone. Upgrade it to ~512K (which definitely is more than enough). To allow testing userspace support for >64 devices, add additional

Re: [PATCH v6 1/4] drm: Use XArray instead of IDR for minors

2023-08-29 Thread James Zhu
On 2023-08-29 14:33, Matthew Wilcox wrote: On Tue, Aug 29, 2023 at 01:34:22PM -0400, James Zhu wrote: @@ -1067,7 +1055,7 @@ static void drm_core_exit(void) unregister_chrdev(DRM_MAJOR, "drm"); debugfs_remove(drm_debugfs_root); drm_sysfs_destroy(); - i

Re: [PATCH v6 1/4] drm: Use XArray instead of IDR for minors

2023-08-29 Thread James Zhu
On 2023-08-28 17:08, Michał Winiarski wrote: On Fri, Aug 25, 2023 at 12:59:26PM -0400, James Zhu wrote: On 2023-07-24 17:14, Michał Winiarski wrote: IDR is deprecated, and since XArray manages its own state with internal locking, it simplifies the locking on DRM side. Additionally, don'

Re: [PATCH v6 1/4] drm: Use XArray instead of IDR for minors

2023-08-25 Thread James Zhu
On 2023-07-24 17:14, Michał Winiarski wrote: IDR is deprecated, and since XArray manages its own state with internal locking, it simplifies the locking on DRM side. Additionally, don't use the IRQ-safe variant, since operating on drm minor is not done in IRQ context. Signed-off-by: Michał Winia

Re: [PATCH v6 3/4] drm: Expand max DRM device number to full MINORBITS

2023-08-23 Thread James Zhu
Hi Simon, Thanks! Yes, this kernel patch should work with latest libdrm. Best regards! James Zhu On 2023-08-23 06:53, Simon Ser wrote: On Tuesday, August 8th, 2023 at 17:04, James Zhu wrote: I have a MR for libdrm to support drm nodes type up to 2^MINORBITS nodes which can work with these

Re: [PATCH v6 3/4] drm: Expand max DRM device number to full MINORBITS

2023-08-08 Thread James Zhu
I would like if these kernel patches are accepted by everyone, If yes, when they can be upstream. I have a MR for libdrm to support drm nodes type up to 2^MINORBITS  nodes which can work with these patches, https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/305 Thanks! James On 2023-

Re: [PATCH v6 3/4] drm: Expand max DRM device number to full MINORBITS

2023-07-24 Thread James Zhu
ave libdrm patches for review together with this change? Especially to support static int drmGetMinorType(int major, int minor). Thanks and Best Regards! James Zhu Signed-off-by: Michał Winiarski --- drivers/gpu/drm/drm_drv.c | 12 1 file changed, 12 insertions(+) diff --git

Re: [PATCH 1/3] drm/drv: use enum drm_minor_type when appropriate

2023-07-14 Thread James Zhu
Hi Simon Thanks! Reviewed-by:JamesZhufortheseries.Best Regards! James Zhu On 2023-07-14 06:46, Simon Ser wrote: This makes it easier to figure out what the "type" variable can be set to when reading the implementation of these functions. Signed-off-by: Simon Ser Cc: Christian König

[PATCH] drm: support up to 128 drm devices

2023-06-30 Thread James Zhu
From: Christian König This makes room for up to 128 DRM devices. Signed-off-by: Christian König Signed-off-by: James Zhu --- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 73b845a75d52

[PATCH] drm: support up to 128 drm devices

2023-06-30 Thread James Zhu
From: Christian König This makes room for up to 128 DRM devices. Signed-off-by: Christian König Signed-off-by: James Zhu --- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 73b845a75d52

Re: linux-next: build failure after merge of the amdgpu tree

2023-05-18 Thread James Zhu
Hi Stephen, I saw https://gitlab.freedesktop.org/agd5f/linux/-/blob/amd-staging-drm-next/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c#349 should not have this error. Thanks! James Zhu On 2023-05-18 20:06, Stephen Rothwell wrote: Hi all, After merging the amdgpu tree, today's linux-next

[PATCH v3 3/4] drm/sched: always keep selected ring sched list in ctx entity

2022-09-08 Thread James Zhu
Always keep selected ring sched list in ctx entity. Later entity->sched_list can always be used to track ring which is used in this ctx in amdgpu_ctx_fini_entity. v2: fixed typo v3. Update comments Signed-off-by: James Zhu --- drivers/gpu/drm/scheduler/sched_entity.c | 7 ++- 1 f

Re: [PATCH 1/4] drm/sched: returns struct drm_gpu_scheduler ** for drm_sched_pick_best

2022-09-08 Thread James Zhu
earlier patch maybe ? Andrey On 2022-09-08 10:45, James Zhu wrote: To save lines is not the purpose. Also I want to use entity->sched_list to track ring which is used in this ctx in amdgpu_ctx_fini_entity Best Regards! James On 2022-09-08 10:38 a.m., Andrey Grodzovsky wrote: I guess it&

Re: [PATCH 1/4] drm/sched: returns struct drm_gpu_scheduler ** for drm_sched_pick_best

2022-09-08 Thread James Zhu
alue  ? You saved a few lines in this patch but added a few lines in another. In total seems to me no to much difference ? Andrey On 2022-09-08 10:17, James Zhu wrote: Hi Andrey Basically this entire patch set are derived from patch [3/4]: entity->sched_list = num_sched_list > 1 ? sche

Re: [PATCH 1/4] drm/sched: returns struct drm_gpu_scheduler ** for drm_sched_pick_best

2022-09-08 Thread James Zhu
's the reason for this entire patch set ? Andrey On 2022-09-07 16:57, James Zhu wrote: drm_sched_pick_best returns struct drm_gpu_scheduler ** instead of struct drm_gpu_scheduler * Signed-off-by: James Zhu ---   include/drm/gpu_scheduler.h | 2 +-   1 file changed, 1 insertion(+), 1 deleti

Re: [PATCH 3/4] drm/sched: always keep selecetd ring sched list in ctx entity

2022-09-08 Thread James Zhu
James On 2022-09-08 2:15 a.m., Christian König wrote: Am 07.09.22 um 22:57 schrieb James Zhu: Always keep selecetd ring sched list in ctx entity. I have no idea what you are doing here, but this certainly doesn't make sense. Please explain a bit more. Thanks, Christian. Signed-o

[PATCH v2 3/4] drm/sched: always keep selected ring sched list in ctx entity

2022-09-07 Thread James Zhu
Always keep selected ring sched list in ctx entity. v2: fixed typo Signed-off-by: James Zhu --- drivers/gpu/drm/scheduler/sched_entity.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler

[PATCH 4/4] drm/amdgpu: update amdgpu_ctx_init_entity

2022-09-07 Thread James Zhu
update amdgpu_ctx_init_entity with new drm_sched_pick_best. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index

[PATCH 2/4] drm/sched: implement new drm_sched_pick_best

2022-09-07 Thread James Zhu
drm_sched_pick_best return best selecetd ring schedul list's address. Signed-off-by: James Zhu --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- drivers/gpu/drm/scheduler/sched_main.c | 14 -- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gp

[PATCH 3/4] drm/sched: always keep selecetd ring sched list in ctx entity

2022-09-07 Thread James Zhu
Always keep selecetd ring sched list in ctx entity. Signed-off-by: James Zhu --- drivers/gpu/drm/scheduler/sched_entity.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index

[PATCH 1/4] drm/sched: returns struct drm_gpu_scheduler ** for drm_sched_pick_best

2022-09-07 Thread James Zhu
drm_sched_pick_best returns struct drm_gpu_scheduler ** instead of struct drm_gpu_scheduler * Signed-off-by: James Zhu --- include/drm/gpu_scheduler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h index 0fca8f38bee4

Re: [PATCH linux-next] drm/amdgpu/vcn: Remove unused assignment in vcn_v4_0_stop

2022-08-24 Thread James Zhu
ThispatchisReviewed-by:JamesZhu On 2022-08-15 3:00 a.m., Khalid Masum wrote: The value assigned from vcn_v4_0_stop_dbg_mode to r is overwritten before it can be used. Remove this assignment. Addresses-Coverity: 1504988 ("Unused value") Fixes: 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support

Re: [radeon-alex:drm-next-4.21-wip 10/27] drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1174 vcn_v1_0_stop_dpg_mode() error: uninitialized symbol 'ret_code'.

2018-10-16 Thread James Zhu
Hi Dan, Thanks! I send out the correct patch for review. Best Regards! James Zhu On 2018-10-16 09:56 AM, Dan Carpenter wrote: > tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.21-wip > head: 6af94a9d0e185f48bef5cc1372f3ada89d003858 &g

Re: [PATCH] drm/amdgpu: use first uvd instance to avoid clang build error

2018-06-17 Thread James Zhu
u_device *adev = ^ 2 errors generated. Fixes: 10dd74eac4db ("drm/amdgpu/vg20:Restruct uvd.inst to support multiple instances") Cc: James Zhu Signed-off-by: Stefan Agner --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH libdrm 1/2] add new uvd enc support check

2017-10-05 Thread James Zhu
Query hardware IP information to find out if there are uvd encode rings ready for use in kernel driver. Signed-off-by: James Zhu --- tests/amdgpu/uvd_enc_tests.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/tests/amdgpu/uvd_enc_tests.c b/tests

[PATCH libdrm v2 1/2] tests/amdgpu: add new uvd enc support check

2017-10-05 Thread James Zhu
Query hardware IP information to find out if there are uvd encode rings ready for use in kernel driver. Signed-off-by: James Zhu --- tests/amdgpu/uvd_enc_tests.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/tests/amdgpu/uvd_enc_tests.c b/tests

Re: [PATCH libdrm v2 2/2] tests/amdgpu: fix uvd enc data corruption issue

2017-10-05 Thread James Zhu
Hi Leo, Sure, I will reset 0 in header file Thanks! James Zhu On 2017-10-05 11:39 AM, Leo Liu wrote: On 10/05/2017 11:24 AM, James Zhu wrote: In uvd encode parameter package, parameters input_pic_luma_pitch and input_pic_chroma_pitch should be picture width align with hardware alignment

[PATCH libdrm v2 2/2] tests/amdgpu: fix uvd enc data corruption issue

2017-10-05 Thread James Zhu
: James Zhu --- tests/amdgpu/uvd_enc_tests.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/amdgpu/uvd_enc_tests.c b/tests/amdgpu/uvd_enc_tests.c index 7518103..bbda131 100644 --- a/tests/amdgpu/uvd_enc_tests.c +++ b/tests/amdgpu/uvd_enc_tests.c @@ -272,7 +272,7 @@ static

[PATCH libdrm 2/2] fix uvd enc data corruption issue

2017-10-05 Thread James Zhu
: James Zhu --- tests/amdgpu/uvd_enc_tests.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/amdgpu/uvd_enc_tests.c b/tests/amdgpu/uvd_enc_tests.c index 7518103..bbda131 100644 --- a/tests/amdgpu/uvd_enc_tests.c +++ b/tests/amdgpu/uvd_enc_tests.c @@ -272,7 +272,7 @@ static