Re: [PATCH v19 12/30] drm/shmem-helper: Prepare drm_gem_shmem_free() to shrinker addition

2024-01-25 Thread Boris Brezillon
On Fri, 5 Jan 2024 21:46:06 +0300 Dmitry Osipenko wrote: > Prepare drm_gem_shmem_free() to addition of memory shrinker support > to drm-shmem by adding and using variant of put_pages() that doesn't > touch reservation lock. Reservation shouldn't be touched because lockdep > will trigger a bogus

Re: [PATCH v19 13/30] drm/shmem-helper: Make drm_gem_shmem_get_pages() public

2024-01-25 Thread Boris Brezillon
On Fri, 5 Jan 2024 21:46:07 +0300 Dmitry Osipenko wrote: > We're going to move away from having implicit get_pages() done by > get_pages_sgt() to simplify refcnt handling. Drivers will manage > get/put_pages() by themselves. Expose the drm_gem_shmem_get_pages() > in a public drm-shmem API. > >

Re: [PATCH v19 15/30] drm/shmem-helper: Avoid lockdep warning when pages are released

2024-01-25 Thread Boris Brezillon
On Fri, 5 Jan 2024 21:46:09 +0300 Dmitry Osipenko wrote: > All drivers will be moved to get/put pages explicitly and then the last > put_pages() will be invoked during gem_free() time by some drivers. > We can't touch reservation lock when GEM is freed because that will cause > a spurious warnin

Re: [PATCH v19 14/30] drm/shmem-helper: Add drm_gem_shmem_put_pages()

2024-01-25 Thread Boris Brezillon
On Fri, 5 Jan 2024 21:46:08 +0300 Dmitry Osipenko wrote: > We're going to move away from having implicit get_pages() done by > get_pages_sgt() to ease simplify refcnt handling. Drivers will manage > get/put_pages() by themselves. Add drm_gem_shmem_put_pages(). > > Signed-off-by: Dmitry Osipenko

Re: [PATCH v19 18/30] drm/panfrost: Explicitly get and put drm-shmem pages

2024-01-25 Thread Boris Brezillon
On Fri, 5 Jan 2024 21:46:12 +0300 Dmitry Osipenko wrote: > To simplify the drm-shmem refcnt handling, we're moving away from > the implicit get_pages() that is used by get_pages_sgt(). From now on > drivers will have to pin pages while they use sgt. Panfrost's shrinker > doesn't support swapping

Re: [PATCH v3 3/3] dt-bindings: mfd: atmel,hlcdc: Convert to DT schema format

2024-01-25 Thread Conor Dooley
> > If the lvds pll is an input to the hlcdc, you need to add it here. > > From your description earlier it does sound like it is an input to > > the hlcdc, but now you are claiming that it is not. > > The LVDS PLL serves as an input to both the LCDC and LVDSC Then it should be an input to both

[PULL] drm-xe-fixes

2024-01-25 Thread Thomas Hellstrom
Hi, Dave, Sima The Xe fixes PR for 6.8-rc2. Thanks, Thomas. The following changes since commit 6613476e225e090cc9aad49be7fa504e290dd33d: Linux 6.8-rc1 (2024-01-21 14:11:32 -0800) are available in the Git repository at: https://gitlab.freedesktop.org/drm/xe/kernel.git tags/drm-xe-fixes-202

[PATCH] gpu: drm: display: indent fix in comment

2024-01-25 Thread Kousik Sanagavarapu
The comments explaining the function "drm_dp_mst_atom_check_mgr()" had uneven indentation which made "make htmldocs" complain: Documentation/gpu/drm-kms-helpers:296: ./drivers/gpu/drm/display/drm_dp_mst_topology.c:5496: ERROR: Unexpected indentation. Documentation/

[REGRESSION BISECTED] 6.8-rc1 - Wayland hangs when connecting via VNC or RDP

2024-01-25 Thread Paul Zimmerman
When I attempt to connect via VNC or RDP to my Ubuntu desktop, the Wayland server seems to hang. The desktop GUI no longer works either locally or remotely. I can still log in via ssh, so the system is still alive, but the GUI is frozen. If I boot into Xorg instead, everything works fine. Kernel 6.

Re: [REGRESSION BISECTED] 6.8-rc1 - Wayland hangs when connecting via VNC or RDP

2024-01-25 Thread Paul Zimmerman
I forgot to say what graphics driver I'm using. It is amdgpu. p.s. Sorry for the bad formatting in my previous email, it has been a while since I posted to LKML. Thanks, Paul On Wed, Jan 24, 2024 at 12:47 PM Paul Zimmerman wrote: > > When I attempt to connect via VNC or RDP to my Ubuntu desktop

Re: [REGRESSION BISECTED] 6.8-rc1 - Wayland hangs when connecting via VNC or RDP

2024-01-25 Thread Paul Zimmerman
Ah, I see that Mario already posted a patch for a "frozen desktop" problem here: https://lore.kernel.org/lkml/caovelgsczkyhj61t8szc2ck1cjy2izv6urva2422kcfy8on...@mail.gmail.com/T/#t and I can confirm that patch fixes my problem as well. Sorry for the noise. Thanks, Paul On Wed, Jan 24, 2024 at

Re: [PATCH v19 22/30] drm/shmem-helper: Add common memory shrinker

2024-01-25 Thread Boris Brezillon
On Fri, 5 Jan 2024 21:46:16 +0300 Dmitry Osipenko wrote: > * > * This function Increases the use count and allocates the backing pages if > * use-count equals to zero. > + * > + * Note that this function doesn't pin pages in memory. If your driver > + * uses drm-shmem shrinker, then it's f

Re: [PATCH v19 23/30] drm/shmem-helper: Export drm_gem_shmem_get_pages_sgt_locked()

2024-01-25 Thread Boris Brezillon
On Fri, 5 Jan 2024 21:46:17 +0300 Dmitry Osipenko wrote: > Export drm_gem_shmem_get_pages_sgt_locked() that will be used by virtio-gpu > shrinker during GEM swap-in operation done under the held reservation lock. > Nit: I'd move that patch before "drm/shmem-helper: Add common memory shrinker",

Re: [PATCH 0/3] accel/ivpu fixes for 6.8-rc1

2024-01-25 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 22.01.2024 13:09, Jacek Lawrynowicz wrote: > Stability fixes for reset, recovery and unbind. > > Jacek Lawrynowicz (3): > accel/ivpu: Fix dev open/close races with unbind > accel/ivpu: Improve stability of ivpu_submit_ioctl() > accel/ivpu: Improve recovery and r

Re: [PATCH] drm/sched: Drain all entities in DRM sched run job worker

2024-01-25 Thread Vlastimil Babka
On 1/24/24 22:08, Matthew Brost wrote: > All entities must be drained in the DRM scheduler run job worker to > avoid the following case. An entity found that is ready, no job found > ready on entity, and run job worker goes idle with other entities + jobs > ready. Draining all ready entities (i.e.

Re: [PATCH v19 24/30] drm/shmem-helper: Optimize unlocked get_pages_sgt()

2024-01-25 Thread Boris Brezillon
On Fri, 5 Jan 2024 21:46:18 +0300 Dmitry Osipenko wrote: > SGT isn't refcounted. Once SGT pointer has been obtained, it remains the > same for both locked and unlocked get_pages_sgt(). Return cached SGT > directly without taking a potentially expensive lock. > > Signed-off-by: Dmitry Osipenko

Re: BUG [RESEND][NEW BUG]: kernel NULL pointer dereference, address: 0000000000000008

2024-01-25 Thread Mirsad Todorovac
Hi Ma Jun, Copy that. This appears to be the exact problem, and thank you for reviewing the bug report at such a short notice. I apologise for the wrong assertion. The patch you sent then just triggered another bug, and it is not manifested without the patch (but a NULL pointer dereference ins

Re: [PATCH] drm/xe/display: Fix memleak in display initialization

2024-01-25 Thread Jani Nikula
On Thu, 25 Jan 2024, wangxiaoming321 wrote: > In the call stack xe_device_probe -> xe_display_init_nommio -> > intel_power_domains_init > Power_domains hasn't been cleaned up if return error, > which has do the clean in i915_driver_late_release call from > i915_driver_probe. This has nothing

Re: [PATCH v19 30/30] drm/panfrost: Switch to generic memory shrinker

2024-01-25 Thread Boris Brezillon
On Fri, 5 Jan 2024 21:46:24 +0300 Dmitry Osipenko wrote: > --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c > +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c > @@ -328,6 +328,7 @@ int panfrost_mmu_map(struct panfrost_gem_mapping *mapping) > struct panfrost_device *pfdev = to_panfrost_device(obj

Re: Re: [PATCH 1/3] bits: introduce fixed-type genmasks

2024-01-25 Thread Jani Nikula
On Wed, 24 Jan 2024, Gustavo Sousa wrote: > Quoting Yury Norov (2024-01-24 12:27:58-03:00) >>On Wed, Jan 24, 2024 at 08:03:53AM -0600, Lucas De Marchi wrote: >>> On Wed, Jan 24, 2024 at 09:58:26AM +0200, Jani Nikula wrote: >>> > On Tue, 23 Jan 2024, Lucas De Marchi wrote: >>> > > From: Yury Norov

Re: [PATCH v19 22/30] drm/shmem-helper: Add common memory shrinker

2024-01-25 Thread Boris Brezillon
On Fri, 5 Jan 2024 21:46:16 +0300 Dmitry Osipenko wrote: > +static bool drm_gem_shmem_is_evictable(struct drm_gem_shmem_object *shmem) > +{ > + return (shmem->madv >= 0) && shmem->base.funcs->evict && > + refcount_read(&shmem->pages_use_count) && > + !refcount_read(&s

Re: [PATCH v2 2/2] drm/amdgpu: Implement check_async_props for planes

2024-01-25 Thread Ville Syrjälä
On Wed, Jan 24, 2024 at 11:14:40AM -0300, André Almeida wrote: > Hi Ville, > > Em 19/01/2024 15:25, Ville Syrjälä escreveu: > > On Fri, Jan 19, 2024 at 03:12:35PM -0300, André Almeida wrote: > >> AMD GPUs can do async flips with changes on more properties than just > >> the FB ID, so implement a c

Re: [PATCH v3 01/39] drm/bridge: add ->edid_read hook and drm_bridge_edid_read()

2024-01-25 Thread Neil Armstrong
On 23/01/2024 20:37, Jani Nikula wrote: Add new struct drm_edid based ->edid_read hook and drm_bridge_edid_read() function to call the hook. v2: Include drm/drm_edid.h Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_bridge.c | 46 +++- include/drm/drm_brid

Re: [PATCH] accel/habanalabs: use kcalloc() instead of kzalloc()

2024-01-25 Thread Oded Gabbay
On 22/01/2024 18:45, Gustavo A. R. Silva wrote: On 1/20/24 09:10, Erick Archer wrote: As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar

回复:Making drm_gpuvm work across gpu devices

2024-01-25 Thread 周春明(日月)
[snip] Fd0 = open(card0) Fd1 = open(card1) Vm0 =xe_vm_create(fd0) //driver create process xe_svm on the process's first vm_create Vm1 = xe_vm_create(fd1) //driver re-use xe_svm created above if called from same process Queue0 = xe_exec_queue_create(fd0, vm0) Queue1 = xe_exec_queue_create(fd1, vm1

[PATCH v2 2/3] drm/etnaviv: Turn etnaviv_is_model_rev() into a function

2024-01-25 Thread Philipp Zabel
Turn the etnaviv_is_model_rev() macro into a static inline function. Use the raw model number as a parameter instead of the chipModel_GC defines. This reduces synchronization requirements for the generated headers. For newer hardware, the GC names are not the correct model names anyway. For

[PATCH v2 3/3] drm/etnaviv: Disable SH_EU clock gating on VIPNano-Si+

2024-01-25 Thread Philipp Zabel
Disable SH_EU clock gating for the VIPNano-Si+ NPU on i.MX8MP and for other affected core revisions. Taken from linux-imx lf-6.1.36-2.1.0, specifically [1]. [1] https://github.com/nxp-imx/linux-imx/blob/lf-6.1.36-2.1.0/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c#L2747-L2761 Sign

[PATCH v2 1/3] drm/etnaviv: Update hardware headers from rnndb

2024-01-25 Thread Philipp Zabel
Update the state HI header from the rnndb commit 8d7ee714cfe2 ("Merge pull request #24 from pH5/unknown-3950"). Signed-off-by: Philipp Zabel --- drivers/gpu/drm/etnaviv/cmdstream.xml.h | 52 ++-- drivers/gpu/drm/etnaviv/common.xml.h| 12 ++-- drivers/gpu/drm/etnaviv/state.xml.h

[PATCH v2 0/3] drm/etnaviv: Disable SH_EU clock gating on the i.MX8MP NPU

2024-01-25 Thread Philipp Zabel
The vendor kernel sets a previously unknown clock gating bit in the VIVS_PM_MODULE_CONTROLS register to disable SH_EU clock gating. Import new headers from rnndb for the definition and set the bit for the VIPNano-Si+ NPU on i.MX8MP and other affected cores. Signed-off-by: Philipp Zabel --- Chang

Re: [PATCH v19 30/30] drm/panfrost: Switch to generic memory shrinker

2024-01-25 Thread Dmitry Osipenko
On 1/25/24 12:49, Boris Brezillon wrote: > On Fri, 5 Jan 2024 21:46:24 +0300 > Dmitry Osipenko wrote: > >> --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c >> +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c >> @@ -328,6 +328,7 @@ int panfrost_mmu_map(struct panfrost_gem_mapping >> *mapping) >>

[PATCH v5 000/111] pwm: Improve lifetime tracking for pwm_chips

2024-01-25 Thread Uwe Kleine-König
Hello, this is v5 of this series. The relevant changes since v4 (https://lore.kernel.org/linux-pwm/cover.1701860672.git.u.kleine-koe...@pengutronix.de): - New first patch to reshuffle functions in core.c. This is a preparation for the later changes which brings functions in a better order

[PATCH v5 037/111] drm/bridge: ti-sn65dsi86: Make use of pwmchip_parent() macro

2024-01-25 Thread Uwe Kleine-König
struct pwm_chip::dev is about to change. To not have to touch this driver in the same commit as struct pwm_chip::dev, use the macro provided for exactly this purpose. Signed-off-by: Uwe Kleine-König --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 10 +- 1 file changed, 5 insertions(+), 5 del

[PATCH v5 104/111] drm/bridge: ti-sn65dsi86: Make use of devm_pwmchip_alloc() function

2024-01-25 Thread Uwe Kleine-König
This prepares the pwm driver of the ti-sn65dsi86 to further changes of the pwm core outlined in the commit introducing devm_pwmchip_alloc(). There is no intended semantical change and the driver should behave as before. Signed-off-by: Uwe Kleine-König --- drivers/gpu/drm/bridge/ti-sn65dsi86.c |

[PATCH v5 003/111] pwm: Provide a macro to get the parent device of a given chip

2024-01-25 Thread Uwe Kleine-König
Currently a pwm_chip stores in its struct device *dev member a pointer to the parent device. Preparing a change that embeds a full struct device in struct pwm_chip, this accessor macro should be used in all drivers directly accessing chip->dev now. This way struct pwm_chip and this macro can be cha

[PATCH v5 039/111] pwm: Provide wrappers for storing and getting driver private data

2024-01-25 Thread Uwe Kleine-König
These functions are useful to store and query driver private data a After struct pwm_chip got its own struct device, this can make use of dev_get_drvdata() and dev_set_drvdata() on that device. These functions are required already now to convert drivers to pwmchip_alloc() which must happen before

Re: [PATCH v3 00/39] drm/bridge: switch to struct drm_edid

2024-01-25 Thread Neil Armstrong
On 23/01/2024 20:37, Jani Nikula wrote: v3 of [1] with a couple of patches fixed. BR, Jani. [1] https://patchwork.freedesktop.org/series/128149/ Jani Nikula (39): drm/bridge: add ->edid_read hook and drm_bridge_edid_read() drm/bridge: switch to drm_bridge_read_edid() drm/bridge: chro

Re: [PATCH v3 00/39] drm/bridge: switch to struct drm_edid

2024-01-25 Thread Jani Nikula
On Thu, 25 Jan 2024, Neil Armstrong wrote: > Thanks, but now some patches subjects are wrong: > s/drm_bridge_read_edid/drm_bridge_edid_read/s Oh, dang it, that was mentioned before, but I forgot. My bad. > With that fixed please add: > Reviewed-by: Neil Armstrong Entire series? Much appreciate

Re: (subset) [PATCH v1 1/1] backlight: hx8357: Fix potential NULL pointer dereference

2024-01-25 Thread Lee Jones
On Sun, 14 Jan 2024 16:39:21 +0200, Andy Shevchenko wrote: > The "im" pins are optional. Add missing check in the hx8357_probe(). > > Applied, thanks! [1/1] backlight: hx8357: Fix potential NULL pointer dereference commit: 3b75d271e161e22aff8171940a77510d2fb2ad6f -- Lee Jones [李琼斯]

Re: [PATCH v4 1/3] leds: ktd2692: move ExpressWire code to library

2024-01-25 Thread Lee Jones
On Mon, 22 Jan 2024, Duje Mihanović wrote: > The ExpressWire protocol is shared between at least KTD2692 and KTD2801 > with slight differences such as timings and the former not having a > defined set of pulses for enabling the protocol (possibly because it > does not support PWM unlike KTD2801).

Re: [PATCH v5 5/8] iio: core: Add new DMABUF interface infrastructure

2024-01-25 Thread Paul Cercueil
Hi Jonathan, Le jeudi 21 décembre 2023 à 12:06 +, Jonathan Cameron a écrit : > On Tue, 19 Dec 2023 18:50:06 +0100 > Paul Cercueil wrote: > > > Add the necessary infrastructure to the IIO core to support a new > > optional DMABUF based interface. > > > > With this new interface, DMABUF objec

Re: [PATCH v5 039/111] pwm: Provide wrappers for storing and getting driver private data

2024-01-25 Thread AngeloGioacchino Del Regno
Il 25/01/24 13:09, Uwe Kleine-König ha scritto: These functions are useful to store and query driver private data a After struct pwm_chip got its own struct device, this can make use of dev_get_drvdata() and dev_set_drvdata() on that device. These functions are required already now to convert dr

Re: [PATCH v5 003/111] pwm: Provide a macro to get the parent device of a given chip

2024-01-25 Thread AngeloGioacchino Del Regno
Il 25/01/24 13:08, Uwe Kleine-König ha scritto: Currently a pwm_chip stores in its struct device *dev member a pointer to the parent device. Preparing a change that embeds a full struct device in struct pwm_chip, this accessor macro should be used in all drivers directly accessing chip->dev now.

[PATCH v5 040/111] pwm: Provide devm_pwmchip_alloc() function

2024-01-25 Thread Uwe Kleine-König
This function allocates a struct pwm_chip and driver data. Compared to the status quo the split into pwm_chip and driver data is new, otherwise it doesn't change anything relevant (yet). The intention is that after all drivers are switched to use this allocation function, its possible to add a str

Re: [PATCH] mm: Remove double faults once write a device pfn

2024-01-25 Thread Christian König
Am 24.01.24 um 12:04 schrieb Alistair Popple: "Zhou, Xianrong" writes: [AMD Official Use Only - General] The vmf_insert_pfn_prot could cause unnecessary double faults on a device pfn. Because currently the vmf_insert_pfn_prot does not make the pfn writable so the pte entry is normally read-o

[PATCH v4 1/3] drm/buddy: Implement tracking clear page feature

2024-01-25 Thread Arunpravin Paneer Selvam
- Add tracking clear page feature. - Driver should enable the DRM_BUDDY_CLEARED flag if it successfully clears the blocks in the free path. On the otherhand, DRM buddy marks each block as cleared. - Track the available cleared pages size - If driver requests cleared memory we prefer cleared

[PATCH v4 2/3] drm/amdgpu: Enable clear page functionality

2024-01-25 Thread Arunpravin Paneer Selvam
Add clear page support in vram memory region. v1:(Christian) - Dont handle clear page as TTM flag since when moving the BO back in from GTT again we don't need that. - Make a specialized version of amdgpu_fill_buffer() which only clears the VRAM areas which are not already cleared -

[PATCH v4 3/3] drm/buddy: Add defragmentation support

2024-01-25 Thread Arunpravin Paneer Selvam
Add a function to support defragmentation. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Matthew Auld --- drivers/gpu/drm/drm_buddy.c | 48 - 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm

Re: [Linaro-mm-sig] [PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access()

2024-01-25 Thread Christian König
Am 24.01.24 um 11:58 schrieb Paul Cercueil: [SNIP] The problem was then that dma_buf_unmap_attachment cannot be called before the dma_fence is signaled, and calling it after is already too late (because the fence would be signaled before the data is sync'd).  Well what sync are you tal

Re: [PATCH] drm/sched: Drain all entities in DRM sched run job worker

2024-01-25 Thread Christian König
Am 24.01.24 um 22:08 schrieb Matthew Brost: All entities must be drained in the DRM scheduler run job worker to avoid the following case. An entity found that is ready, no job found ready on entity, and run job worker goes idle with other entities + jobs ready. Draining all ready entities (i.e

Re: [PATCH v3 4/4] arm: dts: st: fix DSI peripheral clock on stm32mp15 boards

2024-01-25 Thread Alexandre TORGUE
Hi On 1/4/24 14:44, Raphael Gallais-Pou wrote: In RCC driver, 'DSI_K' is a kernel clock while 'DSI' has pclk4 as parent clock, which means that it is an APB peripheral clock. Swap the clocks in the DSI peripheral clock reference. Signed-off-by: Raphael Gallais-Pou --- After updating commit t

Re: [PATCH 1/3] udmabuf: Keep track current device mappings

2024-01-25 Thread Andrew Davis
On 1/24/24 4:36 PM, Kasireddy, Vivek wrote: Hi Andrew, When a device attaches to and maps our buffer we need to keep track of this mapping/device. This is needed for synchronization with these devices when beginning and ending CPU access for instance. Add a list that tracks device mappings as p

[PATCH v5 1/4] leds: introduce ExpressWire library

2024-01-25 Thread Duje Mihanović
The ExpressWire protocol is shared between at least KTD2692 and KTD2801 with slight differences such as timings and the former not having a defined set of pulses for enabling the protocol (possibly because it does not support PWM unlike KTD2801). Despite these differences the ExpressWire handling c

[PATCH v5 2/4] leds: ktd2692: convert to use ExpressWire library

2024-01-25 Thread Duje Mihanović
The KTD2692 uses the ExpressWire protocol implemented in the newly introduced ExpressWire library. Convert the driver to use the library. Suggested-by: Daniel Thompson Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Duje Mihanović --- drivers/leds/flash/Kconfig|

[PATCH v5 0/4] Kinetic ExpressWire library and KTD2801 backlight driver

2024-01-25 Thread Duje Mihanović
Hello, This series adds support for the Kinetic KTD2801 LED backlight driver IC found in samsung,coreprimevelte. Support is already upstream for the somewhat similar KTD2692 flash driver, and this series since v3 also moves its ExpressWire code into a separate library and converts the KTD2692 dri

[PATCH v5 4/4] backlight: Add Kinetic KTD2801 backlight support

2024-01-25 Thread Duje Mihanović
KTD2801 is a LED backlight driver IC found in samsung,coreprimevelte. The brightness can be set using PWM or the ExpressWire protocol. Add support for the KTD2801. Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Duje Mihanović --- MAINTAINERS

[PATCH v5 3/4] dt-bindings: backlight: add Kinetic KTD2801 binding

2024-01-25 Thread Duje Mihanović
KTD2801 is a LED backlight driver IC found in samsung,coreprimevelte. The brightness can be set using PWM or the ExpressWire protocol. Add a DT binding for the KTD2801. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Duje Mihanović --- .

Re: [PATCH 2/3] udmabuf: Sync buffer mappings for attached devices

2024-01-25 Thread Andrew Davis
On 1/24/24 5:05 PM, Kasireddy, Vivek wrote: Hi Andrew, Currently this driver creates a SGT table using the CPU as the target device, then performs the dma_sync operations against that SGT. This is backwards to how DMA-BUFs are supposed to behave. This may have worked for the case where these bu

Re: [PATCH v2 1/3] drm/etnaviv: Update hardware headers from rnndb

2024-01-25 Thread Christian Gmeiner
> > Update the state HI header from the rnndb commit > 8d7ee714cfe2 ("Merge pull request #24 from pH5/unknown-3950"). > > Signed-off-by: Philipp Zabel You missed my R-b from the v1 series for this patch - please include it the next time! Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/

Re: [PATCH v2 1/3] drm/etnaviv: Update hardware headers from rnndb

2024-01-25 Thread Philipp Zabel
On Do, 2024-01-25 at 17:14 +0100, Christian Gmeiner wrote: > > > > Update the state HI header from the rnndb commit > > 8d7ee714cfe2 ("Merge pull request #24 from pH5/unknown-3950"). > > > > Signed-off-by: Philipp Zabel > > You missed my R-b from the v1 series for this patch - please include >

Re: [PATCH v2 2/3] drm/etnaviv: Turn etnaviv_is_model_rev() into a function

2024-01-25 Thread Christian Gmeiner
Hi Philipp > > Turn the etnaviv_is_model_rev() macro into a static inline function. > Use the raw model number as a parameter instead of the chipModel_GC > defines. This reduces synchronization requirements for the generated > headers. For newer hardware, the GC names are not the correct m

RE: Making drm_gpuvm work across gpu devices

2024-01-25 Thread Zeng, Oak
Hi Christian, I got a few more questions inline From: Christian König Sent: Wednesday, January 24, 2024 3:33 AM To: Zeng, Oak ; Danilo Krummrich ; Dave Airlie ; Daniel Vetter ; Felix Kuehling Cc: Welty, Brian ; dri-devel@lists.freedesktop.org; intel...@lists.freedesktop.org; Bommu, Krishnaia

Re: [PATCH v19 17/30] drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr()

2024-01-25 Thread Steven Price
On 05/01/2024 18:46, Dmitry Osipenko wrote: > From: Boris Brezillon > > If some the pages or sgt allocation failed, we shouldn't release the > pages ref we got earlier, otherwise we will end up with unbalanced > get/put_pages() calls. We should instead leave everything in place > and let the BO r

Re: [PATCH v19 18/30] drm/panfrost: Explicitly get and put drm-shmem pages

2024-01-25 Thread Steven Price
On 05/01/2024 18:46, Dmitry Osipenko wrote: > To simplify the drm-shmem refcnt handling, we're moving away from > the implicit get_pages() that is used by get_pages_sgt(). From now on > drivers will have to pin pages while they use sgt. Panfrost's shrinker > doesn't support swapping out BOs, hence

Re: [PATCH v2 2/3] drm/etnaviv: Turn etnaviv_is_model_rev() into a function

2024-01-25 Thread Lucas Stach
Am Donnerstag, dem 25.01.2024 um 17:27 +0100 schrieb Christian Gmeiner: > Hi Philipp > > > > > Turn the etnaviv_is_model_rev() macro into a static inline function. > > Use the raw model number as a parameter instead of the chipModel_GC > > defines. This reduces synchronization requirements fo

RE: 回复:Making drm_gpuvm work across gpu devices

2024-01-25 Thread Zeng, Oak
Hi Chunming, From: 周春明(日月) Sent: Thursday, January 25, 2024 6:01 AM To: Zeng, Oak ; Christian König ; Danilo Krummrich ; Dave Airlie ; Daniel Vetter ; Felix Kuehling ; Shah, Ankur N ; Winiarski, Michal Cc: Brost, Matthew ; thomas.hellst...@linux.intel.com; Welty, Brian ; dri-devel@lists.fre

Re: [PATCH] drm/msm/dpu: make "vblank timeout" more useful

2024-01-25 Thread Abhinav Kumar
On 1/5/2024 3:50 PM, Dmitry Baryshkov wrote: We have several reports of vblank timeout messages. However after some debugging it was found that there might be different causes to that. Include the actual CTL_FLUSH value into the timeout message. This allows us to identify the DPU block that ge

Re: Making drm_gpuvm work across gpu devices

2024-01-25 Thread Felix Kuehling
On 2024-01-24 20:17, Zeng, Oak wrote: Hi Christian, Even though I mentioned KFD design, I didn’t mean to copy the KFD design. I also had hard time to understand the difficulty of KFD under virtualization environment. The problem with virtualization is related to virtualization design cho

Re: [PATCH v19 09/30] drm/shmem-helper: Add and use lockless drm_gem_shmem_get_pages()

2024-01-25 Thread Daniel Vetter
On Fri, Jan 05, 2024 at 09:46:03PM +0300, Dmitry Osipenko wrote: > Add lockless drm_gem_shmem_get_pages() helper that skips taking reservation > lock if pages_use_count is non-zero, leveraging from atomicity of the > refcount_t. Make drm_gem_shmem_mmap() to utilize the new helper. > > Acked-by: Ma

Re: [PATCH] drm/sched: Drain all entities in DRM sched run job worker

2024-01-25 Thread Matthew Brost
On Thu, Jan 25, 2024 at 04:12:58PM +0100, Christian König wrote: > > > Am 24.01.24 um 22:08 schrieb Matthew Brost: > > All entities must be drained in the DRM scheduler run job worker to > > avoid the following case. An entity found that is ready, no job found > > ready on entity, and run job wor

Re: [PATCH] drm/sched: Drain all entities in DRM sched run job worker

2024-01-25 Thread Matthew Brost
On Thu, Jan 25, 2024 at 10:24:24AM +0100, Vlastimil Babka wrote: > On 1/24/24 22:08, Matthew Brost wrote: > > All entities must be drained in the DRM scheduler run job worker to > > avoid the following case. An entity found that is ready, no job found > > ready on entity, and run job worker goes id

Re: [PATCH v5 037/111] drm/bridge: ti-sn65dsi86: Make use of pwmchip_parent() macro

2024-01-25 Thread Doug Anderson
Hi, On Thu, Jan 25, 2024 at 4:11 AM Uwe Kleine-König wrote: > > struct pwm_chip::dev is about to change. To not have to touch this > driver in the same commit as struct pwm_chip::dev, use the macro > provided for exactly this purpose. > > Signed-off-by: Uwe Kleine-König > --- > drivers/gpu/drm/

Re: [PATCH v5 104/111] drm/bridge: ti-sn65dsi86: Make use of devm_pwmchip_alloc() function

2024-01-25 Thread Doug Anderson
Hi, On Thu, Jan 25, 2024 at 4:11 AM Uwe Kleine-König wrote: > > This prepares the pwm driver of the ti-sn65dsi86 to further changes of > the pwm core outlined in the commit introducing devm_pwmchip_alloc(). > There is no intended semantical change and the driver should behave as > before. > > Sig

Re: [Linaro-mm-sig] [PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access()

2024-01-25 Thread Daniel Vetter
On Thu, Jan 25, 2024 at 04:00:16PM +0100, Christian König wrote: > Am 24.01.24 um 11:58 schrieb Paul Cercueil: > > [SNIP] > > > > The problem was then that dma_buf_unmap_attachment cannot be called > > > > before the dma_fence is signaled, and calling it after is already > > > > too > > > > late (b

Re: BUG [RESEND][NEW BUG]: kernel NULL pointer dereference, address: 0000000000000008

2024-01-25 Thread Mirsad Todorovac
Hi Ma Jun, Greetings again. So, I just tested the recommended patch and the issue with the graphical login screen was successfully resolved. Thank you very much for your prompt reviews and recommended patches. God bless. Best regards, Mirsad Todorovac On 1/25/24 10:29, Mirsad Todorovac wrote

[PATCH] drm/syncobj: handle NULL fence in syncobj_eventfd_entry_func

2024-01-25 Thread Erik Kurzinger
During syncobj_eventfd_entry_func, dma_fence_chain_find_seqno may set the fence to NULL if the given seqno is signaled and a later seqno has already been submitted. In that case, the eventfd should be signaled immediately which currently does not happen. This is a similar issue to the one addresse

Re: [PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access()

2024-01-25 Thread Daniel Vetter
On Fri, Jan 19, 2024 at 03:13:57PM +0100, Paul Cercueil wrote: > These functions should be used by device drivers when they start and > stop accessing the data of DMABUF. It allows DMABUF importers to cache > the dma_buf_attachment while ensuring that the data they want to access > is available for

Re: [PATCH v2 1/3] drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set

2024-01-25 Thread Daniel Vetter
On Fri, Jan 19, 2024 at 08:32:06AM -0800, Erik Kurzinger wrote: > When waiting for a syncobj timeline point whose fence has not yet been > submitted with the WAIT_FOR_SUBMIT flag, a callback is registered using > drm_syncobj_fence_add_wait and the thread is put to sleep until the > timeout expires.

Re: [PATCH 0/2] kernel-doc: Do not pre-process comments

2024-01-25 Thread Daniel Vetter
On Mon, Jan 22, 2024 at 10:31:50AM +0100, Anna-Maria Behnsen wrote: > Hi, > > this is a repost of the RFC queue > https://lkml.kernel.org/r/20240116151456.48238-1-anna-ma...@linutronix.de > > Jonathan Corbet is fine with this change and mentioned in an answer the > following: > > "The kernel-d

Re: [PATCH] drm/atomic-helpers: remove legacy_cursor_update hacks

2024-01-25 Thread Daniel Vetter
On Tue, Jan 23, 2024 at 06:09:05AM +, Jason-JH Lin (林睿祥) wrote: > Hi Maxime, Daniel, > > We encountered similar issue with mediatek SoCs. > > We have found that in drm_atomic_helper_commit_rpm(), when disabling > the cursor plane, the old_state->legacy_cursor_update in > drm_atomic_wait_for_v

Re: [PATCH] nouveau: rip out fence irq allow/block sequences.

2024-01-25 Thread Daniel Vetter
On Tue, Jan 23, 2024 at 05:25:38PM +1000, Dave Airlie wrote: > From: Dave Airlie > > fences are signalled on nvidia hw using non-stall interrupts. > > non-stall interrupts are not latched from my reading. > > When nouveau emits a fence, it requests a NON_STALL signalling, > but it only calls th

Re: Making drm_gpuvm work across gpu devices

2024-01-25 Thread Daniel Vetter
On Wed, Jan 24, 2024 at 09:33:12AM +0100, Christian König wrote: > Am 23.01.24 um 20:37 schrieb Zeng, Oak: > > [SNIP] > > Yes most API are per device based. > > > > One exception I know is actually the kfd SVM API. If you look at the > > svm_ioctl function, it is per-process based. Each kfd_proce

RE: Making drm_gpuvm work across gpu devices

2024-01-25 Thread Zeng, Oak
> -Original Message- > From: Felix Kuehling > Sent: Thursday, January 25, 2024 12:16 PM > To: Zeng, Oak ; Christian König > ; Danilo Krummrich ; Dave > Airlie ; Daniel Vetter ; Shah, Ankur N > ; Winiarski, Michal > Cc: Welty, Brian ; dri-devel@lists.freedesktop.org; > intel- > x...@lis

[PATCH v2] drm/syncobj: handle NULL fence in syncobj_eventfd_entry_func

2024-01-25 Thread Erik Kurzinger
During syncobj_eventfd_entry_func, dma_fence_chain_find_seqno may set the fence to NULL if the given seqno is signaled and a later seqno has already been submitted. In that case, the eventfd should be signaled immediately which currently does not happen. This is a similar issue to the one addresse

Re: [PATCH] drm/syncobj: handle NULL fence in syncobj_eventfd_entry_func

2024-01-25 Thread Erik Kurzinger
Sorry, I realized there is a mistake in this patch after sending it out. It results in a use-after-free of "entry". I've sent out an updated version which should avoid the issue. On 1/25/24 10:03, Erik Kurzinger wrote: > During syncobj_eventfd_entry_func, dma_fence_chain_find_seqno may set > the

Re: [PATCH 2/2] drm/bridge: samsung-dsim: Fix porch calcalcuation rounding

2024-01-25 Thread Adam Ford
On Mon, Dec 11, 2023 at 9:33 PM Adam Ford wrote: > > When using video sync pulses, the HFP, HBP, and HSA are divided between > the available lanes if there is more than one lane. For certain > timings and lane configurations, the HFP may not be evenly divisible. > If the HFP is rounded down, it e

Re: [PATCH] drm/imagination: On device loss, handle unplug after critical section

2024-01-25 Thread Daniel Vetter
On Tue, Jan 23, 2024 at 01:04:24PM +, Matt Coster wrote: > From: Donald Robson > > When the kernel driver 'loses' the device, for instance if the firmware > stops communicating, the driver calls drm_dev_unplug(). This is > currently done inside the drm_dev_enter() critical section, which isn'

Re: [PATCH v5 003/111] pwm: Provide a macro to get the parent device of a given chip

2024-01-25 Thread Florian Fainelli
On 1/25/24 04:08, Uwe Kleine-König wrote: Currently a pwm_chip stores in its struct device *dev member a pointer to the parent device. Preparing a change that embeds a full struct device in struct pwm_chip, this accessor macro should be used in all drivers directly accessing chip->dev now. This w

[PATCH 00/17] Add support for CDM over DP

2024-01-25 Thread Paloma Arellano
The Chroma Down Sampling (CDM) block is a hardware component in the DPU pipeline that includes a CSC block capable of converting RGB input from the DPU to YUV data. This block can be used with either HDMI, DP, or writeback interfaces. This series adds support for the CDM block to be used with DP i

[PATCH 02/17] drm/msm/dpu: move dpu_encoder_helper_phys_setup_cdm to dpu_encoder

2024-01-25 Thread Paloma Arellano
Move dpu_encoder_helper_phys_setup_cdm to dpu_encoder in preparation for implementing CDM compatibility for DP. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 78 + .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 9 ++ .../drm/msm/disp/dpu1/dp

[PATCH 03/17] drm/msm/dp: rename wide_bus_en to wide_bus_supported

2024-01-25 Thread Paloma Arellano
Rename wide_bus_en to wide_bus_supported in dp_display_private to correctly establish that the parameter is referencing if wide bus is supported instead of enabled. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/dp/dp_display.c | 42 ++--- 1 file changed, 21 inser

[PATCH 08/17] drm/msm/dp: change YUV420 related programming for DP

2024-01-25 Thread Paloma Arellano
Change all relevant DP controller related programming for YUV420 cases. Namely, change the pixel clock math to consider YUV420, program the configuration control to indicate YUV420, as well as modify the MVID programming to consider YUV420. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/

[PATCH 09/17] drm/msm/dp: move parity calculation to dp_catalog

2024-01-25 Thread Paloma Arellano
Parity calculation is necessary for VSC SDP implementation, therefore move it to dp_catalog so it usable by both SDP programming and dp_audio.c Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/dp/dp_audio.c | 100 drivers/gpu/drm/msm/dp/dp_catalog.h | 72 +++

[PATCH 07/17] drm/msm/dpu: disallow widebus en in INTF_CONFIG2 when DP is YUV420

2024-01-25 Thread Paloma Arellano
INTF_CONFIG2 register cannot have widebus enabled when DP format is YUV420. Therefore, program the INTF to send 1 ppc. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dp

[PATCH 01/17] drm/msm/dpu: allow dpu_encoder_helper_phys_setup_cdm to work for DP

2024-01-25 Thread Paloma Arellano
Generalize dpu_encoder_helper_phys_setup_cdm to be compatible with DP. Signed-off-by: Paloma Arellano --- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 4 +-- .../drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 31 ++- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git

[PATCH 10/17] drm/msm/dp: modify dp_catalog_hw_revision to show major and minor val

2024-01-25 Thread Paloma Arellano
Modify dp_catalog_hw_revision to make the major and minor version values known instead of outputting the entire hex value of the hardware version register in preparation of using it for VSC SDP programming. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/dp/dp_catalog.c | 12 +---

[PATCH 06/17] drm/msm/dpu: move widebus logic to its own API

2024-01-25 Thread Paloma Arellano
Widebus enablement is decided by the interfaces based on their specific checks and that already happens with DSI/DP specific helpers. Let's invoke these helpers from dpu_encoder_is_widebus_enabled() to make it cleaner overall. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/disp/dpu1/dpu_

[PATCH 05/17] drm/msm/dp: add an API to indicate if sink supports VSC SDP

2024-01-25 Thread Paloma Arellano
YUV420 format is supported only in the VSC SDP packet and not through MSA. Hence add an API which indicates the sink support which can be used by the rest of the DP programming. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/dp/dp_display.c | 3 ++- drivers/gpu/drm/msm/dp/dp_panel.c |

[PATCH 15/17] drm/msm/dpu: allow certain formats for CDM for DP

2024-01-25 Thread Paloma Arellano
CDM block supports formats other than H1V2 for DP. Since we are now adding support for CDM over DP, relax the checks to allow all other formats for DP other than H1V2. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 13/17] drm/msm/dp: enable SDP and SDE periph flush update

2024-01-25 Thread Paloma Arellano
DP controller can be setup to operate in either SDP update flush mode or peripheral flush mode based on the DP controller hardware version. Starting in DP v1.2, the hardware documents require the use of peripheral flush mode for SDP packets such as PPS OR VSC SDP packets. In-line with this guidan

[PATCH 14/17] drm/msm/dpu: modify encoder programming for CDM over DP

2024-01-25 Thread Paloma Arellano
Adjust the encoder format programming in the case of video mode for DP to accommodate CDM related changes. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 16 + drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 8 + .../drm/msm/disp/dpu1/dpu_encoder_

  1   2   >