Re: [PATCH 2/3] mm/slab: delete cache_alloc_debugcheck_before()

2022-06-07 Thread David Hildenbrand
el Vetter > Cc: Christoph Lameter > Cc: Pekka Enberg > Cc: David Rientjes > Cc: Joonsoo Kim > Cc: Andrew Morton > Cc: Vlastimil Babka > Cc: Roman Gushchin > Cc: linux...@kvack.org > --- LGTM Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH 1/3] mm/page_alloc: use might_alloc()

2022-06-07 Thread David Hildenbrand
hould_fail_alloc_page(gfp_mask, order)) > return false; Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

RE: [PATCH 2/2] procfs: Add 'path' to /proc//fdinfo/

2022-06-01 Thread David Laight
ther os) are a PITA. Not to mention leading and trailing spaces! Anyone using filenames that only contain spaces does need shooting. Deliberately adding non-printables isn't really a good idea. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH] drm/st7735r: Fix module autoloading for Okaya RH128128T

2022-05-20 Thread David Lechner
H128128T") Signed-off-by: Javier Martinez Canillas --- Acked-by: David Lechner

RE: [PATCH v2 1/2] module: update dependencies at try_module_get()

2022-05-01 Thread David Laight
unt must be zero, and a module unload in progress. The thread doing the unload is blocked somewhere. Another thread makes a callback into the module for some request that (for instance) would need to create a kernel thread. It tries to get a reference for the thread. So try_module_get(THIS_

Re: [PATCH 1/1] drm: add PSR2 support and capability definition as per eDP 1.5

2022-04-01 Thread Zhang, Dingchen (David)
[AMD Official Use Only] Hi Paul and Harry, Thanks for reviewing the patch and commit msg has been revised as per your comments in the v2. From: Paul Menzel Sent: Friday, April 1, 2022 1:46 AM To: Zhang, Dingchen (David) Cc: amd-...@lists.freedesktop.org ; dri-devel@lists.freedesktop.org

[PATCH v2] drm: add PSR2 support and capability definition as per eDP 1.5

2022-04-01 Thread David Zhang
f-by: David Zhang Reviewed-by: Harry Wentland --- include/drm/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 30359e434c3f..ac7b7571ae66 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_help

[PATCH 1/1] drm: add PSR2 support and capability definition as per eDP 1.5

2022-03-31 Thread David Zhang
[why & how] In eDP 1.5 spec, some new DPCD bit fileds are defined for PSR-SU support. Signed-off-by: David Zhang --- include/drm/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 30359e434c3f..ac7b7571

[PATCH 0/1] add PSR-SU DPCD bitfield definitions as per eDP 1.5

2022-03-31 Thread David Zhang
*** BLURB HERE *** David Zhang (1): drm: add PSR2 support and capability definition as per eDP 1.5 include/drm/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.25.1

Re: [PATCH v2 1/3] mm: add vm_normal_lru_pages for LRU handled pages only

2022-03-31 Thread David Hildenbrand
better documentation > value, especially if accompanied by comments where it isn't entirely > obvious. What's your thought on FOLL_LRU? -- Thanks, David / dhildenb

Re: [PATCH v2] drm/qxl: fix qxl can't use in arm64

2022-03-30 Thread David Airlie
I'd like to make sure this has no side effects on x86 guests, it probably is safe, but keep an eye for regression reports. Reviewed-by: Dave Airlie Dave. On Wed, Mar 30, 2022 at 8:20 PM Cong Liu wrote: > > any suggestions or extra test I can do now? > > Regards, > Cong > > On 2022/3/25 15:45, C

Re: [ PATCH ] Documentation: fixed doc-build warnings

2022-03-28 Thread David Howells
cookie attached to an object > - * @object: Object description > * @aux_data: Updated auxiliary data (or NULL) > * @object_size: Revised size of the object (or NULL) > * Just deleting these lines is the wrong thing to do. They should instead mention the cookie parameter. David

Re: [PATCH v1 1/3] mm: split vm_normal_pages for LRU and non-LRU handling

2022-03-17 Thread David Hildenbrand
On 17.03.22 03:54, Alistair Popple wrote: > Felix Kuehling writes: > >> On 2022-03-11 04:16, David Hildenbrand wrote: >>> On 10.03.22 18:26, Alex Sierra wrote: >>>> DEVICE_COHERENT pages introduce a subtle distinction in the way >>>> "normal&qu

RE: amd-gfx Digest, Vol 70, Issue 199

2022-03-16 Thread Yat Sin, David
; > (*mem)->bo = bo; > (*mem)->va = va; > (*mem)->domain = (bo->preferred_domains & > AMDGPU_GEM_DOMAIN_VRAM) ? > @@ -2085,6 +2083,12 @@ int > amdgpu_amdkfd_gpuvm_import_dmabuf(struct amdgpu_device *adev, > (*mem)->is_imported = true; > > return 0; > + > +err_free_mem: > + kfree(mem); Should be kfree(*mem) Regards, David > +err_put_obj: > + drm_gem_object_put(obj); > + return ret; > } > > /* Evict a userptr BO by stopping the queues if necessary

RE: [RFC v3 7/8] binder: use __kernel_pid_t and __kernel_uid_t for userspace

2022-03-15 Thread David Laight
zeof(int) AND > 3) Consumers of the pid_t definition actually attempt to mutate the > result to make use of extra bits in the variable (which are not there) Or the userspace headers have a 16bit pid_t. I can't help feeling that uapi headers should only use explicit fixed sized types. There is no point indirecting the type names - the sizes still can't be changes. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH v1 1/3] mm: split vm_normal_pages for LRU and non-LRU handling

2022-03-11 Thread David Hildenbrand
or THP. [...]" But then, I'm confused by patch 2 and 3, because it feels more like we'd already have DEVICE_COHERENT then ("hmm_is_coherent_type"). -- Thanks, David / dhildenb

[PATCH] fixup! drm/amdkfd: CRIU export dmabuf handles for GTT BOs

2022-03-09 Thread David Yat Sin
Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 ++ include/uapi/linux/kfd_ioctl.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index e1e2362841f8

[PATCH] drm/amdkfd: Set handle to invalid for non GTT/VRAM BOs

2022-03-09 Thread David Yat Sin
Set dmabuf handle to invalid for BOs that cannot be accessed using SDMA during checkpoint/restore. Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 8 ++-- include/uapi/linux/kfd_ioctl.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff

RE: [PATCH v2] drm/amdkfd: CRIU export dmabuf handles for GTT BOs

2022-03-09 Thread Yat Sin, David
This is the link to the user mode change: https://github.com/checkpoint-restore/criu/pull/1709 Regards, David > -Original Message- > From: Kuehling, Felix > Sent: Tuesday, March 8, 2022 4:20 PM > To: Yat Sin, David ; amd-...@lists.freedesktop.org; > dri-devel@lists.

[PATCH v2] drm/amdkfd: CRIU export dmabuf handles for GTT BOs

2022-03-08 Thread David Yat Sin
Export dmabuf handles for GTT BOs so that their contents can be accessed using SDMA during checkpoint/restore. Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 12 include/uapi/linux/kfd_ioctl.h | 3 ++- 2 files changed, 10 insertions(+), 5

[PATCH] drm/amdkfd: CRIU export dmabuf handles for GTT BOs

2022-03-08 Thread David Yat Sin
Export dmabuf handles for GTT BOs so that their contents can be accessed using SDMA during checkpoint/restore. Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd

[PATCH 1/2] drm/amdkfd: CRIU remove sync and TLB flush on restore

2022-03-08 Thread David Yat Sin
When the process is getting restored, the queues are not mapped yet, so there is no VMID assigned for this process and no TLBs to flush. Signed-off-by: David Yat Sin Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 30 +--- 1 file changed, 1

[PATCH 2/2] drm/amdkfd: CRIU Refactor restore BO function

2022-03-08 Thread David Yat Sin
Refactor CRIU restore BO to reduce identation before adding support for IPC. Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 271 +++ 1 file changed, 129 insertions(+), 142 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b

RE: [PATCH RFC 0/3] MAP_POPULATE for device memory

2022-03-07 Thread David Laight
ind a sane way to pass that information to ->mmap. Is there any space in vma->vm_flags ? That would be better than an extra argument or function. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH 0/6] Remove usage of list iterator past the loop body

2022-03-07 Thread David Laight
ight help type checking. Then all the code that uses the current defines can slowly be moved over (probably a couple of releases) before the existing defines are deleted. That should simplify all the open-coded search loops that are just as likely to be buggy (possibly more so). David

Re: [PATCH RFC 0/3] MAP_POPULATE for device memory

2022-03-07 Thread David Hildenbrand
On 07.03.22 15:22, Jarkko Sakkinen wrote: > On Mon, Mar 07, 2022 at 11:12:44AM +0100, David Hildenbrand wrote: >> On 06.03.22 06:32, Jarkko Sakkinen wrote: >>> For device memory (aka VM_IO | VM_PFNMAP) MAP_POPULATE does nothing. Allow >>> to use that for initializing the

Re: [PATCH RFC 0/3] MAP_POPULATE for device memory

2022-03-07 Thread David Hildenbrand
allback in context. > > An obvious alternative is a ioctl but it is less elegant and requires > two syscalls (mmap + ioctl) per memory range, instead of just one > (mmap). What about extending MADV_POPULATE_READ | MADV_POPULATE_WRITE to support VM_IO | VM_PFNMAP (as well?) ? -- Thanks, David / dhildenb

RE: [PATCH RFC 0/3] MAP_POPULATE for device memory

2022-03-06 Thread David Laight
y is slightly more difficult. For buffers allocated with dma_alloc_coherent() you can probably use dma_mmap_coherent(). But I have a loop calling remap_pfn_range() because the buffer area is made of multiple 16kB kernel buffers that need to be mapped to contiguous user pages. David - Registe

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-03 Thread David Laight
From: Xiaomeng Tong > Sent: 03 March 2022 07:27 > > On Thu, 3 Mar 2022 04:58:23 +0000, David Laight wrote: > > on 3 Mar 2022 10:27:29 +0800, Xiaomeng Tong wrote: > > > The problem is the mis-use of iterator outside the loop on exit, and > > > the iterator will b

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread David Laight
From: Xiaomeng Tong > Sent: 03 March 2022 02:27 > > On Wed, 2 Mar 2022 14:04:06 +0000, David Laight > wrote: > > I think that it would be better to make any alternate loop macro > > just set the variable to NULL on the loop exit. > > That is easier to code for and t

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread David Laight
thout required declaration in the middle of blocks. OTOH there may be alternative definitions that can be used to get the compiler (or other compiler-like tools) to detect broken code. Even if the definition can't possibly generate a working kerrnel. David - Registered Address Lake

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread David Laight
From: Linus Torvalds > Sent: 01 March 2022 23:03 > > On Tue, Mar 1, 2022 at 2:58 PM David Laight wrote: > > > > Can it be resolved by making: > > #define list_entry_is_head(pos, head, member) ((pos) == NULL) > > and double-checking that it isn't used anywhe

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread David Laight
those aren't actually right either. (Oh at 3am this morning I thought it was a different list type that could have much the same problem!) Another plausible solution is a variant of list_foreach_entry() that does set the 'entry' to NULL at the end. Then code can be moved over in stages. I'd reorder the arguments as well as changing the name! David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH] mm: split vm_normal_pages for LRU and non-LRU handling

2022-03-01 Thread David Hildenbrand
On 01.03.22 17:30, Felix Kuehling wrote: > Am 2022-03-01 um 11:22 schrieb David Hildenbrand: >>>>> if (PageReserved(page)) >>>>> diff --git a/mm/migrate.c b/mm/migrate.c >>>>> index c31d04b46a5e..17d049311b78 100644 &

Re: [PATCH] mm: split vm_normal_pages for LRU and non-LRU handling

2022-03-01 Thread David Hildenbrand
ead. We most certainly don't want to have random memory holes in a dump just because some anonymous memory was migrated to DEVICE_COHERENT. -- Thanks, David / dhildenb

Re: [PATCH] mm: split vm_normal_pages for LRU and non-LRU handling

2022-03-01 Thread David Hildenbrand
> /* FOLL_DUMP to ignore special (like zero) pages */ > - follflags = FOLL_GET | FOLL_DUMP; > + follflags = FOLL_GET | FOLL_DUMP | FOLL_LRU; > page = follow_page(vma, addr, follflags); Why wouldn't we want to dump DEVICE_COHERENT pages? This looks wrong. -- Thanks, David / dhildenb

RE: [PATCH] devcoredump: increase the device delete timeout to 10 mins

2022-02-28 Thread David Laight
From: Abhinav Kumar > Sent: 28 February 2022 21:38 ... > We also did some profiling around how much increasing the block size > helps and here is the data: > > Block sizecost > > 4KB 229s > 8KB86s You must have an O(n^2) operation in there -

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-02-28 Thread David Laight
rily hold the address of 'member'. Something like: for (pos = (void *)head; \ pos ? ((pos = (void *)pos - offsetof(member)), 1) : 0; \ pos = (void *)pos->next) So that 'pos' is NULL if the loop terminates. No pointers outside structures

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-02-28 Thread David Laight
(__iter, head, member) ? (((pos)=__iter),1) : (((pos) = NULL),0); Which can be done in the original by: !list_entry_is_head(pos, head, member) ? 1 : (((pos) = NULL), 0); Although it would be safer to have (without looking up the actual name): for (item *__item = head; \

Re: [PATCH] [v2] Kbuild: move to -std=gnu11

2022-02-28 Thread David Sterba
On Mon, Feb 28, 2022 at 02:01:06PM +0100, Arnd Bergmann wrote: > On Mon, Feb 28, 2022 at 1:36 PM Jani Nikula > wrote: > > > > > > One minor issue that remains is an added gcc warning for shifts of > > > negative integers when building with -Werror, which happens with the > > > 'make W=1' option,

Re: [PATCH] [v2] Kbuild: move to -std=gnu11

2022-02-28 Thread David Sterba
Makefile| 6 +++--- > arch/arm64/kernel/vdso32/Makefile | 2 +- > drivers/gpu/drm/i915/Makefile | 1 + > drivers/staging/greybus/tools/Makefile | 3 ++- For > fs/btrf

RE: [PATCH] drm/amdgpu: Fix realloc of ptr

2022-02-26 Thread David Laight
realloc_array(tmp, i + 1, > ^~~ > > realloc will free tmp, so tmp can not be garbage. > And the return needs to be checked. Are you sure? A quick check seems to show that krealloc() behaves the same way as libc realloc() and the pointer isn't freed on failure. David > Fixes: 5ce5

[PATCH] drm/amdkfd: Fix for possible integer overflow

2022-02-18 Thread David Yat Sin
Fix for possible integer overflow when doing addition. Reported-by: Dan Carpenter Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

RE: [bug report] drm/amdkfd: CRIU checkpoint and restore queue mqds

2022-02-18 Thread Yat Sin, David
Hi Dan, Thank you for catching this. I will look into it and post a patch. Regards, David -Original Message- From: Dan Carpenter Sent: Friday, February 18, 2022 2:30 AM To: Yat Sin, David Cc: amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org Subject: [bug report] drm

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-16 Thread David Hildenbrand
> that is ok for coherent pages, but it's undesirable. We really should have the same pinning rules for GUP vs. GUP-fast. is_pinnable_page() should be the right place for such checks (similarly as indicated in my reply to the migration series). -- Thanks, David / dhildenb

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-15 Thread David Hildenbrand
On 11.02.22 18:07, Felix Kuehling wrote: > > Am 2022-02-11 um 11:39 schrieb David Hildenbrand: >> On 11.02.22 17:15, David Hildenbrand wrote: >>> On 01.02.22 16:48, Alex Sierra wrote: >>>> Device memory that is cache coherent from device and CPU point of view. &g

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-15 Thread David Hildenbrand
On 11.02.22 17:56, Jason Gunthorpe wrote: > On Fri, Feb 11, 2022 at 05:49:08PM +0100, David Hildenbrand wrote: >> On 11.02.22 17:45, Jason Gunthorpe wrote: >>> On Fri, Feb 11, 2022 at 05:15:25PM +0100, David Hildenbrand wrote: >>> >>>> ... I'm pretty

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-15 Thread David Hildenbrand
On 11.02.22 00:41, Alistair Popple wrote: > On Thursday, 10 February 2022 10:47:35 PM AEDT David Hildenbrand wrote: >> On 10.02.22 12:39, Alistair Popple wrote: >>> On Thursday, 10 February 2022 9:53:38 PM AEDT David Hildenbrand wrote: >>>> On 07.02.22 05:26, Alistair

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-11 Thread David Hildenbrand
On 11.02.22 17:45, Jason Gunthorpe wrote: > On Fri, Feb 11, 2022 at 05:15:25PM +0100, David Hildenbrand wrote: > >> ... I'm pretty sure we cannot FOLL_PIN DEVICE_PRIVATE pages > > Currently the only way to get a DEVICE_PRIVATE page out of the page > tables is via

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-11 Thread David Hildenbrand
On 11.02.22 17:15, David Hildenbrand wrote: > On 01.02.22 16:48, Alex Sierra wrote: >> Device memory that is cache coherent from device and CPU point of view. >> This is used on platforms that have an advanced system bus (like CAPI >> or CXL). Any page of a process can be mi

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-11 Thread David Hildenbrand
se? ... I'm pretty sure we cannot FOLL_PIN DEVICE_PRIVATE pages, but can we FILL_PIN DEVICE_EXCLUSIVE pages? I strongly assume so? Thanks for any information. -- Thanks, David / dhildenb

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-10 Thread David Hildenbrand
On 10.02.22 12:39, Alistair Popple wrote: > On Thursday, 10 February 2022 9:53:38 PM AEDT David Hildenbrand wrote: >> On 07.02.22 05:26, Alistair Popple wrote: >>> Currently any attempts to pin a device coherent page will fail. This is >>> because device coherent pa

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-10 Thread David Hildenbrand
if (gup_flags & FOLL_PIN) { > + get_page(head); > + unpin_user_page(head); > + } > + > + pages[i] = migrate_device_page(head, gup_flags); For ordinary migrate_pages(), we'll unpin all pages and return 0 so the caller will retry pinning by walking the page tables again. Why can't we apply the same mechanism here? This "let's avoid another walk" looks unnecessary complicated to me, but I might be wrong. -- Thanks, David / dhildenb

[PATCH v2] dt-bindings: display: bridge: document Toshiba TC358768 cells and panel node

2022-02-07 Thread David Heidelberg
Inherit valid properties from the dsi-controller. Reviewed-by: Dmitry Osipenko Signed-off-by: David Heidelberg --- v2: - added $ref ../dsi-controller.yaml# instead copying properties (Dmitry) - additionalProperties -> unevaluatedProperties (Dmitry) - example dsi-bridge@ -> dsi@ (

[PATCH v2] drm/panel: JDI LT070ME05000 simplify with dev_err_probe()

2022-02-06 Thread David Heidelberg
Use the dev_err_probe() helper to simplify error handling during probe. This also handle scenario, when EDEFER is returned and useless error is printed. Fixes error: panel-jdi-lt070me05000 470.dsi.0: cannot get enable-gpio -517 Signed-off-by: David Heidelberg --- v2: - original v1 patch

Re: [PATCH] drm/panel: JDI LT070ME05000 remove useless warning

2022-02-06 Thread David Heidelberg
On Sun, Feb 6 2022 at 20:26:50 +0100, Sam Ravnborg wrote: dev_err_probe Amazing, thanks I'll send fix right away. Davi

[PATCH] drm/panel: JDI LT070ME05000 remove useless warning

2022-02-06 Thread David Heidelberg
Do as most of panel and in case of deffered probe, don't print error. Fixes warning: panel-jdi-lt070me05000 470.dsi.0: cannot get enable-gpio -517 Signed-off-by: David Heidelberg --- drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 3 ++- 1 file changed, 2 insertions(+), 1 del

RE: [Patch v5 15/24] drm/amdkfd: CRIU implement gpu_id remapping

2022-02-03 Thread Yat Sin, David
One nit pick. Regards, David @@ -673,15 +693,19 @@ static int kfd_ioctl_dbg_address_watch(struct file *filep, memset((void *) &aw_info, 0, sizeof(struct dbg_address_watch_info)); - dev = kfd_device_by_id(args->gpu_id); - if (!dev) + mutex_lock(&a

RE: [PATCH v2] fbdev: fbmem: Fix the implicit type casting

2022-02-02 Thread David Laight
t; FB_BLANK_POWERDOWN) would be bypass if the original > "arg" is a large number, which is possible because it comes from > the user input. Fix this by adding the check before the function > call. Doesn't this convert invalid values (> FB_BLANK_POWERDOWN) that should gen

Re: [PATCH v2 0/3] drm/panel: Add MIPI DBI compatible SPI driver

2022-01-27 Thread David Lechner
On 1/25/22 11:56 AM, Noralf Trønnes wrote: Hi, This patchset adds a driver that will work with most MIPI DBI compatible SPI panels out there. It's a follow up on 'drm/tiny/st7735r: Match up with staging/fbtft driver'[1] which aimed at making the st7735r driver work with all panels adding DT pro

Re: [PATCH v2 3/3] drm/panel: Add MIPI DBI compatible SPI driver

2022-01-27 Thread David Lechner
On 1/25/22 11:57 AM, Noralf Trønnes wrote: Add a driver that will work with most MIPI DBI compatible SPI panels. This avoids adding a driver for every new MIPI DBI compatible controller that is to be used by Linux. The 'compatible' Device Tree property with a '.bin' suffix will be used to load a

Re: [PATCH] drm: Add PSR version 4 macro

2022-01-20 Thread Zhang, Dingchen (David)
Li Reviewed-by: David Zhang Thanks David Zhang --- include/drm/drm_dp_helper.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 3f2715eb965f..05268c51acaa 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h

RE: [PATCH 0/3] lib/string_helpers: Add a few string helpers

2022-01-20 Thread David Laight
cks. > As a result, there is a non-trivial risk of two mass changes: > > now: > > - contition ? "yes" : "no" > + yesno(condition) > > a few moths later: > > - yesno(condition) > + str_yes_no(condition) Followed by: - str_yes_no(x) + no

RE: [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

2022-01-19 Thread David Laight
> > except '"no\0\0yes" + v * 4' works a bit better. > > Is it a C code obfuscation contest? That would be: return &(v * 3)["no\0yes"]; :-) - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

2022-01-19 Thread David Laight
> > > > +static inline const char *yesno(bool v) { return v ? "yes" : "no"; } > > return "yes\0no" + v * 4; > > :-) except '"no\0\0yes" + v * 4' works a bit better. - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

2022-01-19 Thread David Laight
> > > +static inline const char *yesno(bool v) { return v ? "yes" : "no"; } return "yes\0no" + v * 4; :-) - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH v3 00/10] Add MEMORY_DEVICE_COHERENT for coherent device memory mapping

2022-01-12 Thread David Hildenbrand
es a process ever get a grab on such pages? And where does migration come into play? I assume migration is only required to migrate off of that device memory to ordinary system RAM when required because the device memory has to be freed up, correct? (a high level description on how this is exploited from users space would be great) -- Thanks, David / dhildenb

[PATCH] dt-bindings: msm/mdp4: convert to yaml format

2022-01-09 Thread David Heidelberg
Convert mdp4 binding into yaml format. Signed-off-by: David Heidelberg --- .../devicetree/bindings/display/msm/mdp4.txt | 114 .../devicetree/bindings/display/msm/mdp4.yaml | 124 ++ 2 files changed, 124 insertions(+), 114 deletions(-) delete mode 100644

[PATCH v3] dt-bindings: display/msm: hdmi: split and convert to yaml

2022-01-08 Thread David Heidelberg
Convert Qualcomm HDMI binding into HDMI TX and PHY yaml bindings. Other changes: - fixed reg-names numbering to match 0..3 instead 0,1,3,4 - phy part moved into phy/ directory Signed-off-by: David Heidelberg --- v2: - move phy into phy/ - added maxItems for gpios - simplified pinctrl-names

[WIP PATCH] dt-bindings: display: msm: dsi-controller-main: distinguish DSI versions

2022-01-08 Thread David Heidelberg
Update documentation compatible and checking to comprehend both V2 and 6G version bindings. Following this commit, there will be update for compatible string in chipsets dtsi. Additional changes: - switch to unevaluatedProperties Signed-off-by: David Heidelberg --- Rob, I know you mentioned

[PATCH v2] dt-bindings: display/msm: hdmi: split and convert to yaml

2022-01-08 Thread David Heidelberg
Convert Qualcomm HDMI binding into HDMI TX and PHY yaml bindings. Other changes: - fixed reg-names numbering to match 0..3 instead 0,1,3,4 - phy part moved into phy/ directory Signed-off-by: David Heidelberg --- v2: - move phy into phy/ - added maxItems for gpios - simplified pinctrl-names

[PATCH] Discussion: dt-bindings: display: msm: dsi-controller-main: fix the binding

2021-12-25 Thread David Heidelberg
I'm willing to implement it then and back from autodetection. David --- .../display/msm/dsi-controller-main.yaml | 53 --- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Doc

[PATCH] dt-bindings: display: enable port jdi,lt070me05000

2021-12-24 Thread David Heidelberg
ree/bindings/display/panel/jdi,lt070me05000.yaml Signed-off-by: David Heidelberg --- .../devicetree/bindings/display/panel/jdi,lt070me05000.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/jdi,lt070me05000.yaml b/Documentation/devicet

[PATCH] drm/panel: JDI LT070ME05000 drop broken link

2021-12-24 Thread David Heidelberg
Link is no longer functional and web.archive.org doesn't provide PDF with detail information. Some informations can be found from web.archive.org here: https://web.archive.org/web/20170629205602/http://panelone.net/en/7-0-inch/JDI_LT070ME05000_7.0_inch-datasheet Signed-off-by: David Heide

[PATCH] dt-bindings: display/msm: hdmi: split and convert to yaml

2021-12-24 Thread David Heidelberg
Convert Qualcomm HDMI binding into HDMI TX and PHY yaml bindings. Other changes: - fixed reg-names numbering to match 0..3 instead 0,1,3,4 Signed-off-by: David Heidelberg --- .../devicetree/bindings/display/msm/hdmi.txt | 99 - .../bindings/display/msm/qcom,hdmi-phy.yaml | 119

[PATCH] dt-bindings: msm: disp: remove bus from dpu bindings

2021-12-20 Thread David Heidelberg
vicetree/bindings/display/msm/dpu-sdm845.yaml Ref: https://lore.kernel.org/all/20210803101657.1072358-1-dmitry.barysh...@linaro.org/ Signed-off-by: David Heidelberg --- .../devicetree/bindings/display/msm/dpu-sdm845.yaml | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) d

[PATCH] dt-bindings: display: bridge: document Toshiba TC358768 cells and panel node

2021-12-15 Thread David Heidelberg
Properties #address-cells and #size-cells are valid. The bridge node can also contains panel node. Signed-off-by: David Heidelberg --- .../bindings/display/bridge/toshiba,tc358768.yaml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH v2 2/2] dt-bindings: convert Rockchip DW MIPI DSI binding to YAML format

2021-12-11 Thread David Heidelberg
Convert into YAML format into format, which can be validated. Changes: - drop panel from example Signed-off-by: David Heidelberg --- v2: - rename patch - drop possibility for only one compatible string - add patch for adding compatible to the PX30 dtsi .../display/rockchip

[PATCH] dt-bindings: convert power domain node for rockchip DW MIPI DSI

2021-12-06 Thread David Heidelberg
Convert into YAML format into format, which can be validated. Changes: - drop panel from example Signed-off-by: David Heidelberg --- .../display/rockchip/dw_mipi_dsi_rockchip.txt | 93 .../rockchip/rockchip,dw-mipi-dsi.yaml| 200 ++ 2 files changed, 200

Re: [PATCH 0/6] drm/tiny/st7735r: Match up with staging/fbtft driver

2021-12-06 Thread David Lechner
On 12/1/21 8:52 AM, Maxime Ripard wrote: Hi Noralf, On Tue, Nov 30, 2021 at 03:30:11PM +0100, Noralf Trønnes wrote: Den 29.11.2021 10.39, skrev Maxime Ripard: On Wed, Nov 24, 2021 at 04:03:07PM -0600, David Lechner wrote: On 11/24/21 9:07 AM, Noralf Trønnes wrote: I agree that it doesn&#

Re: [PATCH 3/6] dt-bindings: display: sitronix,st7735r: Remove spi-max-frequency limit

2021-12-06 Thread David Lechner
ver driver that runs configuration commands at a low speed and only the pixel data at the maximum speed the configuration can't be messed up by transfer errors and the speed is only limited by the amount of pixel glitches that one is able to tolerate. Signed-off-by: Noralf Trønnes --- Acked-by: David Lechner

Re: [PATCH 2/6] dt-bindings: display: sitronix,st7735r: Make reset-gpios optional

2021-12-06 Thread David Lechner
On 11/24/21 9:07 AM, Noralf Trønnes wrote: There are other ways than using a gpio to reset the controller so make this property optional. Signed-off-by: Noralf Trønnes --- Acked-by: David Lechner

Re: [PATCH 1/6] dt-bindings: display: sitronix, st7735r: Fix backlight in example

2021-12-06 Thread David Lechner
schema") Signed-off-by: Noralf Trønnes --- Acked-by: David Lechner

Re: [PATCH 0/6] drm/tiny/st7735r: Match up with staging/fbtft driver

2021-11-24 Thread David Lechner
On 11/24/21 9:07 AM, Noralf Trønnes wrote: Hi, This patchset adds a missing piece for decommissioning the staging/fbtft/fb_st7735r.c driver namely a way to configure the controller from Device Tree. All fbtft drivers have builtin support for one display panel and all other panels using that con

[PATCH] dt-bindings: display: sync formats with simplefb.h

2021-11-08 Thread David Heidelberg
Sync all formats from simplefb.h into documentation. Signed-off-by: David Heidelberg --- .../bindings/display/simple-framebuffer.yaml | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml b/Documentation

Re: [PATCH v6] dt-bindings: drm/msm/gpu: convert to YAML

2021-10-27 Thread David Heidelberg
Hello Rob, can this patch can go in? Thank you David On Mon, Oct 18 2021 at 08:48:23 -0500, Rob Herring wrote: On Sun, 17 Oct 2021 16:43:50 +0200, David Heidelberg wrote: Conversion of text binding for Adreno GPU to the YAML format. Signed-off-by: David Heidelberg --- v2: - added

[PATCH v6] dt-bindings: drm/msm/gpu: convert to YAML

2021-10-17 Thread David Heidelberg
Conversion of text binding for Adreno GPU to the YAML format. Signed-off-by: David Heidelberg --- v2: - added compatbile description from Rob Clark - dropped reg description - reg numbers increased to 3 (since we also have uncommon cx_dbgc) - specified interconnect-names items range

Re: [PATCH RFC] virtio: wrap config->reset calls

2021-10-13 Thread David Hildenbrand
On 13.10.21 14:17, Michael S. Tsirkin wrote: > On Wed, Oct 13, 2021 at 01:03:46PM +0200, David Hildenbrand wrote: >> On 13.10.21 12:55, Michael S. Tsirkin wrote: >>> This will enable cleanups down the road. >>> The idea is to disable cbs, then add "flush_queued_

Re: [PATCH RFC] virtio: wrap config->reset calls

2021-10-13 Thread David Hildenbrand
io_break_device(struct virtio_device *dev); -- Thanks, David / dhildenb

Re: BUG: KASAN: use-after-free in enqueue_timer+0x4f/0x1e0

2021-10-11 Thread David Airlie
On Tue, Oct 12, 2021 at 2:07 AM Kim Phillips wrote: > > Hi, > > On 10/5/21 1:10 PM, Kim Phillips wrote: > > Hi, I occasionally see the below trace with Linus' master on an > > AMD Milan system: > > > > [ 25.657322] BUG: kernel NULL pointer dereference, address: > > > > [ 25.6

[PATCH] [v5] dt-bindings: drm/msm/gpu: convert to YAML

2021-10-10 Thread David Heidelberg
Conversion of text binding for Adreno GPU to the YAML format. Signed-off-by: David Heidelberg --- v2: - added compatbile description from Rob Clark - dropped reg description - reg numbers increased to 3 (since we also have uncommon cx_dbgc) - specified interconnect-names items range

[PATCH] dt-bindings: display: simple: hardware can use ddc-i2c-bus

2021-09-28 Thread David Heidelberg
ndings/display/panel/panel-simple.yaml Signed-off-by: David Heidelberg --- .../devicetree/bindings/display/panel/panel-simple.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings

Re: Kernel 5.14.0 - invalid opcode: 0000 [#1] SMP NOPTI

2021-09-05 Thread David Airlie
cc'ing lists/people On Sun, Sep 5, 2021 at 11:50 AM Andrew Falcon wrote: > > Hello, > > I am encountering a kernel panic with the error in the subject line using > kernel 5.14.0 (final). Kernel 5.14.0-rc7 works without issue for me so > looking back at the last amdgpu commits for 5.14.0 (final)

Re: [PATCH] drm/ttm: provide default page protection for UML

2021-09-03 Thread David Gow
by: Randy Dunlap > > > > > Cc: Thomas Hellström > > > > > Cc: Christian König > > > > > Cc: Huang Rui > > > > > Cc: dri-devel@lists.freedesktop.org > > > > > Cc: Jeff Dike > > > > > Cc: Richard Weinberger > &g

Re: [PATCH v2 49/63] btrfs: Use memset_startat() to clear end of struct

2021-08-18 Thread David Sterba
t get confused about writing > beyond the destination member that is intended to be the starting point > of zeroing through the end of the struct. > > Cc: Chris Mason > Cc: Josef Bacik > Cc: David Sterba > Cc: linux-bt...@vger.kernel.org > Signed-off-by: Kees Cook Acked-by: David Sterba

[PATCH v2] drm/virtio: support mapping exported vram

2021-08-12 Thread David Stevens
Implement virtgpu specific map_dma_buf callback to support mapping exported vram object dma-bufs. The dma-buf callback is used directly, as vram objects don't have backing pages and thus can't implement the drm_gem_object_funcs.get_sg_table callback. Signed-off-by: David Stevens --

[PATCH] drm/virtio: set non-cross device blob uuid_state

2021-08-10 Thread David Stevens
Blob resources without the cross device flag don't have a uuid to share with other virtio devices. When exporting such blobs, set uuid_state to STATE_ERR so that virtgpu_virtio_get_uuid doesn't hang. Signed-off-by: David Stevens --- drivers/gpu/drm/virtio/virtgpu_prime.c | 2 ++ 1 fi

Re: [PATCH 47/64] btrfs: Use memset_after() to clear end of struct

2021-08-09 Thread David Sterba
On Sat, Jul 31, 2021 at 08:25:51AM -0700, Kees Cook wrote: > On Thu, Jul 29, 2021 at 12:33:37PM +0200, David Sterba wrote: > > On Wed, Jul 28, 2021 at 02:56:31PM -0700, Kees Cook wrote: > > > On Wed, Jul 28, 2021 at 11:42:15AM +0200, David Sterba wrote: > > > > On T

Re: [PATCH 01/64] media: omap3isp: Extract struct group for memcpy() region

2021-07-30 Thread David Sterba
On Thu, Jul 29, 2021 at 11:00:48PM -0700, Kees Cook wrote: > On Thu, Jul 29, 2021 at 11:20:39AM +0300, Dan Carpenter wrote: > > On Thu, Jul 29, 2021 at 07:56:27AM +0200, Greg Kroah-Hartman wrote: > > > On Wed, Jul 28, 2021 at 11:37:30PM +0200, David Sterba wrote: > > > &

Re: [PATCH 02/64] mac80211: Use flex-array for radiotap header bitmap

2021-07-29 Thread David Sterba
On Wed, Jul 28, 2021 at 02:54:52PM -0700, Kees Cook wrote: > On Wed, Jul 28, 2021 at 11:23:23AM +0200, David Sterba wrote: > > On Wed, Jul 28, 2021 at 10:35:56AM +0300, Dan Carpenter wrote: > > > @@ -372,7 +372,7 @@ ieee80211_add_rx_radiotap_header(struct > >

<    1   2   3   4   5   6   7   8   9   10   >