Re: [PATCH v2] drm/ast: astdp: fix loop timeout check

2024-08-11 Thread Dan Carpenter
On Mon, Aug 12, 2024 at 08:48:16AM +0200, Thomas Zimmermann wrote: > Hi > > Am 12.08.24 um 08:42 schrieb Dan Carpenter: > > This code has an issue because it loops until "i" is set to UINT_MAX but > > the test for failure assumes that "i" is set to zero. The result is that > > it will only print

Re: [PATCH v2] drm/ast: astdp: fix loop timeout check

2024-08-11 Thread Dan Carpenter
On Mon, Aug 12, 2024 at 09:42:53AM +0300, Dan Carpenter wrote: > This code has an issue because it loops until "i" is set to UINT_MAX but > the test for failure assumes that "i" is set to zero. The result is that > it will only print an error message if we succeed on the very last try. > Reformat

Re: [PATCH v2] drm/ast: astdp: fix loop timeout check

2024-08-11 Thread Thomas Zimmermann
Hi Am 12.08.24 um 08:42 schrieb Dan Carpenter: This code has an issue because it loops until "i" is set to UINT_MAX but the test for failure assumes that "i" is set to zero. The result is that it will only print an error message if we succeed on the very last try. Reformat the loop to count for

[PATCH v2] drm/ast: astdp: fix loop timeout check

2024-08-11 Thread Dan Carpenter
This code has an issue because it loops until "i" is set to UINT_MAX but the test for failure assumes that "i" is set to zero. The result is that it will only print an error message if we succeed on the very last try. Reformat the loop to count forwards instead of backwards. Fixes: 2281475168d2 (

Re: [PATCH 2/2] mtd: rawnand: nuvoton: add new driver for the Nuvoton MA35 SoC

2024-08-11 Thread Krzysztof Kozlowski
On 12/08/2024 05:00, Hui-Ping Chen wrote: > Nuvoton MA35 SoCs NAND Flash Interface Controller > supports 2KB, 4KB and 8KB page size, and up to 8-bit, > 12-bit, and 24-bit hardware ECC calculation circuit > to protect data communication. > > Signed-off-by: Hui-Ping Chen > --- > drivers/mtd/nand/r

Re: [PATCH 1/2] dt-bindings: mtd: nuvoton,ma35d1-nand: add new bindings

2024-08-11 Thread Krzysztof Kozlowski
On 12/08/2024 05:00, Hui-Ping Chen wrote: > Add dt-bindings for the Nuvoton MA35 SoC NAND Controller. > > Signed-off-by: Hui-Ping Chen > --- > .../bindings/mtd/nuvoton,ma35d1-nand.yaml | 97 +++ > 1 file changed, 97 insertions(+) > create mode 100644 > Documentation/devicet

[PATCH v2] drm/amdgpu: add dce6 drm_panic support

2024-08-11 Thread Lu Yao
Add support for the drm_panic module, which displays a pretty user friendly message on the screen when a Linux kernel panic occurs. Signed-off-by: Lu Yao --- Changes in v2: 1. Drop include "drm_internal.h" 2. Add disabling DC tiling ops. Per suggestion from previous thread: https://patchwork.fre

Re: [PATCH 3/3] drm/mediatek: ovl_adaptor: use scoped variant of for_each_child_of_node()

2024-08-11 Thread 胡俊光

Re: [PATCH v3 4/5] drm/sched: Use drm sched lockdep map for submit_wq

2024-08-11 Thread Ghimiray, Himal Prasad
On 10-08-2024 03:58, Matthew Brost wrote: Avoid leaking a lockdep map on each drm sched creation and destruction by using a single lockdep map for all drm sched allocated submit_wq. v2: - Use alloc_ordered_workqueue_lockdep_map (Tejun) Cc: Luben Tuikov Cc: Christian König Signed-off-by:

Re: [PATCH] drm/ast: astdp: fix pre-op vs post-op bug

2024-08-11 Thread Thomas Zimmermann
Hi Am 09.08.24 um 19:06 schrieb Dan Carpenter: On Fri, Aug 09, 2024 at 04:43:51PM +0300, Jani Nikula wrote: On Fri, 09 Aug 2024, Thomas Zimmermann wrote: Hi, thanks a lot for the bugfix. Am 09.08.24 um 14:33 schrieb Dan Carpenter: The test for "Link training failed" expect the loop to exit

Re: [PATCH v3 3/5] workqueue: Add interface for user-defined workqueue lockdep map

2024-08-11 Thread Ghimiray, Himal Prasad
On 10-08-2024 03:58, Matthew Brost wrote: Add an interface for a user-defined workqueue lockdep map, which is helpful when multiple workqueues are created for the same purpose. This also helps avoid leaking lockdep maps on each workqueue creation. v2: - Add alloc_workqueue_lockdep_map (Teju

Re: [PATCH 2/3] drm/mediatek: ovl_adaptor: add missing of_node_put()

2024-08-11 Thread 胡俊光

Re: [PATCH 1/3] drm/mediatek: ovl_adaptor: drop unused mtk_crtc.h header

2024-08-11 Thread 胡俊光

Re: [PATCH v2 1/4] udmabuf: cancel mmap page fault, direct map it

2024-08-11 Thread Huan Yang
在 2024/8/10 9:28, Kasireddy, Vivek 写道: [Some people who received this message don't often get email from vivek.kasire...@intel.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Huan, The current udmabuf mmap uses a page fault mechanism to populate the v

Re: [PATCH v2 4/4] udmabuf: remove folio unpin list

2024-08-11 Thread Huan Yang
在 2024/8/10 10:52, Kasireddy, Vivek 写道: [Some people who received this message don't often get email from vivek.kasire...@intel.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Huan, Currently, udmabuf handles folio by creating an unpin list to record

Re: [PATCH v2 3/4] fix vmap_udmabuf error page set

2024-08-11 Thread Huan Yang
在 2024/8/10 10:39, Kasireddy, Vivek 写道: [Some people who received this message don't often get email from vivek.kasire...@intel.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Huan, Currently vmap_udmabuf set page's array by each folio. But, ubuf->fol

Re: [PATCH v2 2/4] udmabuf: change folios array from kmalloc to kvmalloc

2024-08-11 Thread Huan Yang
在 2024/8/10 9:29, Kasireddy, Vivek 写道: [Some people who received this message don't often get email from vivek.kasire...@intel.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Huan, When PAGE_SIZE 4096, MAX_PAGE_ORDER 10, 64bit machine, page_alloc only

[PATCH v6 9/9] drm: Replace strcpy() with strscpy()

2024-08-11 Thread Yafang Shao
To prevent erros from occurring when the src string is longer than the dst string in strcpy(), we should use strscpy() instead. This approach also facilitates future extensions to the task comm. Signed-off-by: Yafang Shao Acked-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thom

[PATCH v6 8/9] net: Replace strcpy() with strscpy()

2024-08-11 Thread Yafang Shao
To prevent errors from occurring when the src string is longer than the dst string in strcpy(), we should use strscpy() instead. This approach also facilitates future extensions to the task comm. Signed-off-by: Yafang Shao Cc: "David S. Miller" Cc: David Ahern Cc: Eric Dumazet Cc: Jakub Kicins

[PATCH v6 7/9] tracing: Replace strncpy() with strscpy()

2024-08-11 Thread Yafang Shao
Using strscpy() to read the task comm ensures that the name is always NUL-terminated, regardless of the source string. This approach also facilitates future extensions to the task comm. Signed-off-by: Yafang Shao Acked-by: Masami Hiramatsu (Google) Cc: Steven Rostedt Cc: Mathieu Desnoyers ---

[PATCH v6 6/9] mm/util: Deduplicate code in {kstrdup, kstrndup, kmemdup_nul}

2024-08-11 Thread Yafang Shao
These three functions follow the same pattern. To deduplicate the code, let's introduce a common helper __kmemdup_nul(). Suggested-by: Andrew Morton Signed-off-by: Yafang Shao Cc: Simon Horman Cc: Matthew Wilcox --- mm/util.c | 67 +-- 1 fil

[PATCH v6 5/9] mm/util: Fix possible race condition in kstrdup()

2024-08-11 Thread Yafang Shao
In kstrdup(), it is critical to ensure that the dest string is always NUL-terminated. However, potential race condidtion can occur between a writer and a reader. Consider the following scenario involving task->comm: readerwriter len = strlen(s) + 1;

[PATCH v6 4/9] bpftool: Ensure task comm is always NUL-terminated

2024-08-11 Thread Yafang Shao
Let's explicitly ensure the destination string is NUL-terminated. This way, it won't be affected by changes to the source string. Signed-off-by: Yafang Shao Reviewed-by: Quentin Monnet --- tools/bpf/bpftool/pids.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/bpf/bpftool/pids.c b/

[PATCH v6 3/9] security: Replace memcpy() with get_task_comm()

2024-08-11 Thread Yafang Shao
Quoted from Linus [0]: selinux never wanted a lock, and never wanted any kind of *consistent* result, it just wanted a *stable* result. Using get_task_comm() to read the task comm ensures that the name is always NUL-terminated, regardless of the source string. This approach also facilitates f

[PATCH v6 2/9] auditsc: Replace memcpy() with strscpy()

2024-08-11 Thread Yafang Shao
Using strscpy() to read the task comm ensures that the name is always NUL-terminated, regardless of the source string. This approach also facilitates future extensions to the task comm. Signed-off-by: Yafang Shao Acked-by: Paul Moore Cc: Eric Paris --- kernel/auditsc.c | 6 +++--- 1 file chang

[PATCH v6 1/9] Get rid of __get_task_comm()

2024-08-11 Thread Yafang Shao
We want to eliminate the use of __get_task_comm() for the following reasons: - The task_lock() is unnecessary Quoted from Linus [0]: : Since user space can randomly change their names anyway, using locking : was always wrong for readers (for writers it probably does make sense : to have so

[PATCH v6 0/9] Improve the copy of task comm

2024-08-11 Thread Yafang Shao
Using {memcpy,strncpy,strcpy,kstrdup} to copy the task comm relies on the length of task comm. Changes in the task comm could result in a destination string that is overflow. Therefore, we should explicitly ensure the destination string is always NUL-terminated, regardless of the task comm. This ap

Re:[PATCH RESEND] drm/rockchip: Unregister platform drivers in reverse order

2024-08-11 Thread Andy Yan
Hi Cristian, At 2024-08-08 19:58:02, "Cristian Ciocaltea" wrote: >Move rockchip_drm_platform_driver unregistration after its sub-drivers, >which ensures all drivers are unregistered in the reverse order used >when they were registered. Would you please provied some detail information about how

Re: [PATCH] drm/amdgpu: add dce6 drm_panic support

2024-08-11 Thread Lu Yao
On Thu, Aug 8, 2024 at 13:24 PM Alex Deucher wrote: > > On Thu, Aug 8, 2024 at 12:43 PM Alex Deucher wrote: > > > > On Thu, Aug 8, 2024 at 2:35 AM Lu Yao wrote: > > > > > > On 2024/8/5 17:25, Jocelyn Falempe wrote: > > > > > > > > > > > > On 02/08/2024 11:39, Christian König wrote: > > > >> Am 0

Re: [PATCH] drm/mediatek: Declare Z Position for all planes

2024-08-11 Thread 胡俊光

Re: [PATCH v4] drm/mediatek: dsi: Add dsi per-frame lp code for mt8188

2024-08-11 Thread 胡俊光

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-11 Thread Pavel Begunkov
On 8/11/24 03:21, Mina Almasry wrote: On Fri, Aug 9, 2024 at 11:52 PM Jakub Kicinski wrote: On Fri, 9 Aug 2024 16:45:50 +0100 Pavel Begunkov wrote: I think this is good, and it doesn't seem hacky to me, because we can check the page_pools of the netdev while we hold rtnl, so we can be sure no

Re: [PATCH v2 1/9] of: property: add of_graph_get_next_port()

2024-08-11 Thread Laurent Pinchart
Hi Morimoto-san, (CC'ing Sakari) Thank you for the patch. On Fri, Aug 09, 2024 at 04:22:22AM +, Kuninori Morimoto wrote: > We have endpoint base functions > - of_graph_get_next_device_endpoint() > - of_graph_get_device_endpoint_count() > - for_each_of_graph_device_endpoint(

[PATCH] drm: Add missing documentation for struct drm_plane_size_hint

2024-08-11 Thread Mohammed Anees
This patch takes care of the following warnings during documentation compiling: ./include/uapi/drm/drm_mode.h:869: warning: Function parameter or struct member 'width' not described in 'drm_plane_size_hint' ./include/uapi/drm/drm_mode.h:869: warning: Function parameter or struct member 'height'

Re: [PATCH 6.10] drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode()

2024-08-11 Thread Greg KH
On Tue, Jul 30, 2024 at 08:53:39PM +0200, Kevin Holm wrote: > From: Wayne Lin > > [ Upstream commit fa57924c76d995e87ca3533ec60d1d5e55769a27 ] > > [Why] > dm_dp_mst_is_port_support_mode() is a bit not following the original design > rule and cause > light up issue with multiple 4k monitors afte

Re: [PATCH RESEND 2/2] drm: panel-orientation-quirks: Add quirk for Ayn Loki Max

2024-08-11 Thread Luke Jones
On Mon, 29 Jul 2024, at 12:47 AM, Bouke Sybren Haarsma wrote: > Add quirk orientation for Ayn Loki Max model. > > This has been tested by JELOS team that uses their > own patched kernel for a while now and confirmed by > users in the ChimeraOS discord servers. > > Signed-off-by: Bouke Sybren Haar

[PATCH] docs:mm: Fixed typos/spelling mistakes in drm translation table manager documentation

2024-08-11 Thread Dennis Lam
--- Spelling errors fixed: successe, inistilize, and ddestroy. drivers/gpu/drm/ttm/ttm_pool.c | 2 +- drivers/gpu/drm/ttm/ttm_resource.c | 2 +- include/drm/ttm/ttm_device.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/g

[PATCH] drm/imagination: properly support stopping LAYOUT_MARS = 1 cores

2024-08-11 Thread Icenowy Zheng
Some new Rogue GPU cores have an extra MARS power domain, which controlls the power of the firmware core and allows the firmware core to power down most parts of the GPU. Adapt to this by ignoring power domains that should be powered down by the fiwmare and checking MARS idle status instead. The