[PATCH] drm/gem: fix overflow in calculating DMA GEM size

2025-03-25 Thread Ваторопин Андрей
From: Andrey Vatoropin The IOCTL handler drm_gem_dma_dumb_create() calculates "size" by multiplying "pitch" and "height." This expression is currently being evaluated using 32-bit arithmetic, which can lead to an overflow during multiplication. Since a value of type 'u64' is used to store the

Re: [PATCH v6 03/10] optee: account for direction while converting parameters

2025-03-25 Thread Jens Wiklander
On Tue, Mar 25, 2025 at 6:56 AM Sumit Garg wrote: > > On Thu, Mar 20, 2025 at 02:00:57PM +0100, Jens Wiklander wrote: > > Hi Sumit, > > > > On Thu, Mar 20, 2025 at 10:25 AM Sumit Garg wrote: > > > > > > Hi Jens, > > > > > > On Mon, Mar 17, 2025 at 08:42:01AM +0100, Jens Wiklander wrote: > > > > H

Re: [PATCH] udmabuf: fix a buf size overflow issue during udmabuf creation

2025-03-25 Thread Christian König
Am 25.03.25 um 07:23 schrieb Kasireddy, Vivek: > Hi Christian, > >> Am 21.03.25 um 17:41 schrieb Xiaogang.Chen: >>> From: Xiaogang Chen >>> >>> by casting size_limit_mb to u64 when calculate pglimit. >>> >>> Signed-off-by: Xiaogang Chen >> Reviewed-by: Christian König >> >> If nobody objects I'm

Re: [PATCH] drm/ttm: reserve the move fence space first

2025-03-25 Thread Christian König
Am 25.03.25 um 07:46 schrieb Prike Liang: > Reserve the move fence space before adding the fence > to reserve objection. NAK, the caller is doing this. We are just reserving a new slot for the next move here. Aborting without noting the fence is illegal and would lead to memory corruption. Reg

[PATCH 1/8] drm/format-helper: Move helpers for pixel conversion to header file

2025-03-25 Thread Thomas Zimmermann
The DRM draw helpers contain format-conversion helpers that operate on individual pixels. Move them into an internal header file and adopt them as individual API. Update the draw code accordingly. The pixel helpers will also be useful for other format conversion helpers. Signed-off-by: Thomas Zimm

[PATCH] drm/amdkfd: Remove the redundant NULL check for the 'svms' object

2025-03-25 Thread Ваторопин Андрей
From: Andrey Vatoropin Static analysis shows that pointer "svms" cannot be NULL because it points to the object "struct svm_range_list". Remove the extra NULL check. It is meaningless and harms the readability of the code. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed

Re: [PATCH] drm/edid: Add non-desktop quirk for Playstation VR Headsets with Product ID 0xB403

2025-03-25 Thread Maxime Ripard
On Tue, Mar 25, 2025 at 12:47:49PM +0200, Jani Nikula wrote: > On Tue, 25 Mar 2025, Maxime Ripard wrote: > > On Tue, Mar 25, 2025 at 11:16:47AM +0200, Jani Nikula wrote: > >> On Sat, 22 Mar 2025, devbrones wrote: > >> > This fixes a bug where some Playstation VR Headsets would not be assigned > >

[PATCH 8/8] drm/format-helper: Optimize 32-to-8-bpp conversion

2025-03-25 Thread Thomas Zimmermann
For ease of implementation, existing line-conversion functions for 8-bit formats write each pixel individually. Optimize the performance by writing mulitple pixels in a single 32-bit store. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_format_helper.c | 23 ++- 1 f

Re: [PATCH v6 6/6] rust: enable `clippy::cast_lossless` lint

2025-03-25 Thread Tamir Duberstein
On Tue, Mar 25, 2025 at 6:40 AM Benno Lossin wrote: > > On Mon Mar 24, 2025 at 11:01 PM CET, Tamir Duberstein wrote: > > Before Rust 1.29.0, Clippy introduced the `cast_lossless` lint [1]: > > > >> Rust’s `as` keyword will perform many kinds of conversions, including > >> silently lossy conversion

[PATCH] drm/i915/gt: Avoid duplicating CCS mode workaround

2025-03-25 Thread Andi Shyti
When generating workarounds for the CCS engine, specifically for setting the CCS mode related to compute load balancing, the function 'ccs_engine_wa_mode()' is called twice: once for the render engine and once for the compute engine. Add a check to ensure the engine class is compute before applyin

[PATCH 2/2] accel/ivpu: Fix PM related deadlocks in MS IOCTLs

2025-03-25 Thread Maciej Falkowski
From: Jacek Lawrynowicz Prevent runtime resume/suspend while MS IOCTLs are in progress. Failed suspend will call ivpu_ms_cleanup() that would try to acquire file_priv->ms_lock, which is already held by the IOCTLs. Fixes: cdfad4db7756 ("accel/ivpu: Add NPU profiling support") Cc: # v6.11+ Signed

[PATCH 1/2] accel/ivpu: Fix deadlock in ivpu_ms_cleanup()

2025-03-25 Thread Maciej Falkowski
From: Jacek Lawrynowicz Fix deadlock in ivpu_ms_cleanup() by preventing runtime resume after file_priv->ms_lock is acquired. During a failure in runtime resume, a cold boot is executed, which calls ivpu_ms_cleanup_all(). This function calls ivpu_ms_cleanup() that acquires file_priv->ms_lock and

[PATCH] accel/ivpu: Fix warning in ivpu_ipc_send_receive_internal()

2025-03-25 Thread Maciej Falkowski
From: Jacek Lawrynowicz Warn if device is suspended only when runtime PM is enabled. Runtime PM is disabled during reset/recovery and it is not an error to use ivpu_ipc_send_receive_internal() in such cases. Fixes: 5eaa49741119 ("accel/ivpu: Prevent recovery invocation during probe and resume")

Re: [PATCH 2/2] rust: drm: Add GPUVM abstraction

2025-03-25 Thread Charalampos Mitrodimas
Daniel Almeida writes: > +/// The object returned after a call to [`GpuVm::lock`]. > +/// > +/// This object has access to operations that modify the VM's interval tree. > +pub struct LockedGpuVm<'a, T: DriverGpuVm> { > +gpuvm: &'a GpuVm, > +} > + > +impl LockedGpuVm<'_, T> { > +/// Finds

Re: (subset) [PATCH v2 00/57] irqdomain: Cleanups and Documentation

2025-03-25 Thread Christophe Leroy
On Wed, 19 Mar 2025 10:28:53 +0100, Jiri Slaby (SUSE) wrote: > tl;dr if patches are agreed upon, I ask subsys maintainers to take the > respective ones via their trees (as they are split per subsys), so that > the IRQ tree can take only the rest. That would minimize churn/conflicts > during merge

[PATCH v2] drm/panel: himax-hx8394: transition to mipi_dsi wrapped functions

2025-03-25 Thread Tejas Vipin
Changes the himax-hx8394 panel to use multi style functions for improved error handling. Reviewed-by: Dmitry Baryshkov Signed-off-by: Tejas Vipin --- Changes in v2: - Revert behavior change in hx8394_enable - Move variable declaration to top of function Link to v1: https://lore.kernel.

Re: [PATCH 7/7] drm/xe/userptr: replace xe_hmm with gpusvm

2025-03-25 Thread Ghimiray, Himal Prasad
On 21-03-2025 02:22, Matthew Brost wrote: On Thu, Mar 20, 2025 at 05:30:04PM +, Matthew Auld wrote: Goal here is cut over to gpusvm and remove xe_hmm, relying instead on common code. The core facilities we need are get_pages(), unmap_pages() and free_pages() for a given useptr range, plus

Re: [RFC v3 10/33] rust: drm/kms: Add ConnectorGuard::add_modes_noedid()

2025-03-25 Thread Maxime Ripard
On Fri, Mar 21, 2025 at 07:52:23PM -0400, Lyude Paul wrote: > On Fri, 2025-03-21 at 19:50 -0400, Lyude Paul wrote: > > On Fri, 2025-03-14 at 13:02 +0100, Maxime Ripard wrote: > > > On Wed, Mar 05, 2025 at 05:59:26PM -0500, Lyude Paul wrote: > > > > A simple binding for drm_add_modes_noedid() using

Re: [PATCH 7/7] drm/syncobj: Add a fast path to drm_syncobj_array_find

2025-03-25 Thread Tvrtko Ursulin
On 24/03/2025 23:06, Maíra Canal wrote: Hi Tvrtko, Some nits inline, mostly personal comments. In any case, Reviewed-by: Maíra Canal On 18/03/25 12:54, Tvrtko Ursulin wrote: Running the Cyberpunk 2077 benchmark we can observe that the lookup helper is relatively hot, but the 97% of the c

Re: [PATCH 0/7] A few drm_syncobj optimisations

2025-03-25 Thread Tvrtko Ursulin
On 24/03/2025 23:17, Maíra Canal wrote: Hi Tvrtko, Thanks for this patchset! I applied this patchset to the RPi downstream kernel 6.13.7 [1] and saw an FPS improvement of approximately 5.85% with "vkgears -present-mailbox" on the RPi 5. I did five 100 seconds runs on each kernel and here are

Re: [PATCH] drm/i2c: tda998x: select CONFIG_DRM_KMS_HELPER

2025-03-25 Thread Neil Armstrong
On 24/03/2025 22:08, Arnd Bergmann wrote: From: Arnd Bergmann This fails to build without the KMS helper functions: x86_64-linux-ld: drivers/gpu/drm/bridge/tda998x_drv.o: in function `tda998x_detect_work': tda998x_drv.c:(.text+0x4e6): undefined reference to `drm_kms_helper_hotplug_event' x86

Re: [PATCH v12 5/5] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl

2025-03-25 Thread Raag Jadav
On Mon, Mar 24, 2025 at 11:09:28PM +, Jonathan Cavitt wrote: > Add support for userspace to request a list of observed faults > from a specified VM. ... > v10: > - Remove unnecessary switch case logic (Raag) This is usually "changes present in version" and not "comments received in version"

Re: [PATCH v6 09/10] optee: FF-A: dynamic restricted memory allocation

2025-03-25 Thread Sumit Garg
On Wed, Mar 05, 2025 at 02:04:15PM +0100, Jens Wiklander wrote: > Add support in the OP-TEE backend driver dynamic restricted memory > allocation with FF-A. > > The restricted memory pools for dynamically allocated restrict memory > are instantiated when requested by user-space. This instantiation

Re: [PATCH v6 10/10] optee: smc abi: dynamic restricted memory allocation

2025-03-25 Thread Sumit Garg
On Wed, Mar 05, 2025 at 02:04:16PM +0100, Jens Wiklander wrote: > Add support in the OP-TEE backend driver for dynamic restricted memory > allocation using the SMC ABI. > > Signed-off-by: Jens Wiklander > --- > drivers/tee/optee/smc_abi.c | 96 +++-- > 1 file chan

[PATCH] drm/bridge: dw-hdmi-cec: fix inconsistent indenting warning

2025-03-25 Thread Charles Han
Fix below inconsistent indenting smatch warning. smatch warnings: drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c:336 dw_hdmi_cec_suspend() warn: inconsistent indenting Signed-off-by: Charles Han --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 dele

[PATCH] drm/imx: legacy-bridge: fix inconsistent indenting warning

2025-03-25 Thread Charles Han
Fix below inconsistent indenting smatch warning. smatch warnings: drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c:79 devm_imx_drm_legacy_bridge() warn: inconsistent indenting Signed-off-by: Charles Han --- drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c | 6 +++--- 1 file changed, 3 insertions(+)

[PATCH] drm/sti: hda: fix inconsistent indenting warning

2025-03-25 Thread Charles Han
Fix below inconsistent indenting smatch warning. smatch warnings: drivers/gpu/drm/sti/sti_hda.c:696 sti_hda_bind() warn: inconsistent indenting Signed-off-by: Charles Han --- drivers/gpu/drm/sti/sti_hda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sti/sti

Re: [PATCH] drm/vc4: plane: fix inconsistent indenting warning

2025-03-25 Thread Maíra Canal
Hi Charles, I already applied this patch earlier this month as I mentioned in this e-mail [1]. Here is the commit [2]. [1] https://lore.kernel.org/dri-devel/f5f920ec-be44-48d3-ae4d-bd385c3a4...@igalia.com/ [2] https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/ce468a7b63f1e4e2b09f951ca0a7

Re: [PATCH v6 6/6] rust: enable `clippy::cast_lossless` lint

2025-03-25 Thread Benno Lossin
On Mon Mar 24, 2025 at 11:01 PM CET, Tamir Duberstein wrote: > Before Rust 1.29.0, Clippy introduced the `cast_lossless` lint [1]: > >> Rust’s `as` keyword will perform many kinds of conversions, including >> silently lossy conversions. Conversion functions such as `i32::from` >> will only perform

Re: [PATCH v2 9/9] arm64: dts: imx95: Describe Mali G310 GPU

2025-03-25 Thread Alexander Stein
Hi Marek, Am Dienstag, 25. März 2025, 00:35:41 CET schrieb Marek Vasut: > On 3/24/25 8:02 AM, Alexander Stein wrote: > > Hi, > > >> @@ -1890,6 +1919,35 @@ netc_emdio: mdio@0,0 { > >>}; > >>}; > >> > >> + gpu_blk_ctrl: reset-controller@4d81 { > >> +

Re: [PATCH 3/3] drm/ast: Validate display modes against framebuffer and format limits

2025-03-25 Thread Jocelyn Falempe
On 24/03/2025 10:44, Thomas Zimmermann wrote: Reimplement ast_mode_config_mode_valid() with DRM format helpers and ast's helpers for framebuffer size calculation. Replaces ast's open- coded assumptions on bpp and page-alignments. Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe Si

Re: [PATCH v1 4/4] drm/ls2kbmc: Add Loongson-2K BMC reset function support

2025-03-25 Thread Binbin Zhou
On Tue, Feb 11, 2025 at 7:27 PM Binbin Zhou wrote: > > Hi Thomas: > > Sorry for my late reply and thanks for your advice. > > On Wed, Jan 15, 2025 at 2:57 PM Thomas Zimmermann wrote: > > > > Hi > > > > > > Am 30.12.24 um 10:31 schrieb Binbin Zhou: > > > Since the display is a sub-function of the

[PATCH 3/8] rust: drm: add driver abstractions

2025-03-25 Thread Danilo Krummrich
Implement the DRM driver abstractions. The `Driver` trait provides the interface to the actual driver to fill in the driver specific data, such as the `DriverInfo`, driver features and IOCTLs. Co-developed-by: Asahi Lina Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich --- rust/bindi

[PATCH 2/8] rust: drm: ioctl: Add DRM ioctl abstraction

2025-03-25 Thread Danilo Krummrich
From: Asahi Lina DRM drivers need to be able to declare which driver-specific ioctls they support. Add an abstraction implementing the required types and a helper macro to generate the ioctl definition inside the DRM driver. Note that this macro is not usable until further bits of the abstractio

[PATCH 0/8] DRM Rust abstractions

2025-03-25 Thread Danilo Krummrich
This is the series for the initial DRM Rust abstractions, including DRM device / driver, IOCTL, File and GEM object abstractions. This series has been posted previously, however this is a long time ago and I reworked a lot of things quite heavily. Hence, I decided to post this as a whole new serie

Re: [PATCH 1/2] drm/amd/display: Protect dml2_create()/dml2_copy()/dml2_create_copy()

2025-03-25 Thread Alex Hung
On 3/19/25 22:23, Huacai Chen wrote: Hi, Alex, On Thu, Mar 20, 2025 at 10:16 AM Alex Hung wrote: On 3/18/25 05:17, Huacai Chen wrote: Commit 7da55c27e76749b9 ("drm/amd/display: Remove incorrect FP context start") removes the FP context protection of dml2_create(), and it said "All the D

[PATCH 7/8] rust: drm: gem: Add GEM object abstraction

2025-03-25 Thread Danilo Krummrich
DRM GEM is the DRM memory management subsystem used by most modern drivers; add a Rust abstraction for DRM GEM. This includes the BaseObject trait, which contains operations shared by all GEM object classes. Co-developed-by: Asahi Lina Signed-off-by: Asahi Lina Signed-off-by: Danilo Krummrich

[PATCH 5/8] rust: drm: add DRM driver registration

2025-03-25 Thread Danilo Krummrich
Implement the DRM driver `Registration`. The `Registration` structure is responsible to register and unregister a DRM driver. It makes use of the `Devres` container in order to allow the `Registration` to be owned by devres, such that it is automatically dropped (and the DRM driver unregistered) o

[PATCH 6/8] rust: drm: file: Add File abstraction

2025-03-25 Thread Danilo Krummrich
A DRM File is the DRM counterpart to a kernel file structure, representing an open DRM file descriptor. Add a Rust abstraction to allow drivers to implement their own File types that implement the DriverFile trait. Co-developed-by: Asahi Lina Signed-off-by: Asahi Lina Signed-off-by: Danilo Krum

Re: [PATCH v7 7/7] rust: enable `clippy::ref_as_ptr` lint

2025-03-25 Thread Tamir Duberstein
On Tue, Mar 25, 2025 at 6:40 PM Benno Lossin wrote: > > On Tue Mar 25, 2025 at 11:33 PM CET, Tamir Duberstein wrote: > > On Tue, Mar 25, 2025 at 6:11 PM Benno Lossin wrote: > >> > >> On Tue Mar 25, 2025 at 9:07 PM CET, Tamir Duberstein wrote: > >> > diff --git a/rust/kernel/str.rs b/rust/kernel/s

[PATCH v7 3/5] drm/i915: Convert REG_GENMASK*() to fixed-width GENMASK_U*()

2025-03-25 Thread Vincent Mailhol via B4 Relay
From: Lucas De Marchi Now that include/linux/bits.h implements fixed-width GENMASK_U*(), use them to implement the i915/xe specific macros. Converting each driver to use the generic macros are left for later, when/if other driver-specific macros are also generalized. Signed-off-by: Lucas De Marc

Re: [PATCH v6 4/4] drm/tidss: Add OLDI bridge support

2025-03-25 Thread Sverdlin, Alexander
Thank you for your work Aradhya! On Wed, 2025-02-26 at 23:43 +0530, Aradhya Bhatia wrote: > From: Aradhya Bhatia > > The AM62x and AM62Px SoCs feature 2 OLDI TXes each, which makes it > possible to connect them in dual-link or cloned single-link OLDI display > modes. The current OLDI support in

Re: [PATCH] drm/i915/gvt: Add __nonstring annotations for unterminated strings

2025-03-25 Thread Kees Cook
On Sun, Mar 23, 2025 at 12:42:41PM +, Damian Tometzki wrote: > On Mon, 10. Mar 15:23, Kees Cook wrote: > > When a character array without a terminating NUL character has a static > > initializer, GCC 15's -Wunterminated-string-initialization will only > > warn if the array lacks the "nonstring"

Re: [PATCH 7/7] drm/syncobj: Add a fast path to drm_syncobj_array_find

2025-03-25 Thread Maíra Canal
Hi Tvrtko, On 25/03/25 06:54, Tvrtko Ursulin wrote: On 24/03/2025 23:06, Maíra Canal wrote: Hi Tvrtko, Some nits inline, mostly personal comments. In any case, Reviewed-by: Maíra Canal On 18/03/25 12:54, Tvrtko Ursulin wrote: Running the Cyberpunk 2077 benchmark we can observe that the lo

[PATCH 1/2] drm/edid: Use unsigned int in drm_add_modes_noedid()

2025-03-25 Thread Lyude Paul
A negative resolution doesn't really make any sense, no one goes into a TV store and says "Hello sir, I would like a negative 4K TV please", that would make everyone look at you funny. So, let's make these parameters a bit more reasonable and ensure that they're unsigned - which makes the resultin

[PATCH 2/2] drm/mode_config: Make drm_mode_config.(max|min)_(width|height) signed

2025-03-25 Thread Lyude Paul
Similarly, it doesn't really make much sense for us to allow devices to specify their minimum/maximum resolution as signed. So, let's fix that as well while we're at it. Signed-off-by: Lyude Paul Cc: Greg Kroah-Hartman Cc: Maxime Ripard --- include/drm/drm_mode_config.h | 4 ++-- 1 file change

Re: [PATCH v10 12/13] drm/atomic-helper: Re-order bridge chain pre-enable and post-disable

2025-03-25 Thread Sverdlin, Alexander
On Wed, 2025-02-26 at 21:27 +0530, Aradhya Bhatia wrote: > Move the bridge pre_enable call before crtc enable, and the bridge > post_disable call after the crtc disable. > > The sequence of enable after this patch will look like: > > bridge[n]_pre_enable > ... > bridge[1]_pre_en

[PATCH 1/5] drm/panel: Add new helpers for refcounted panel allocatons

2025-03-25 Thread Anusha Srivatsa
Introduce reference counted allocations for panels to avoid use-after-free. The patch adds the macro devm_drm_bridge_alloc() to allocate a new refcounted panel. Followed the documentation for drmm_encoder_alloc() and devm_drm_dev_alloc and other similar implementations for this purpose. Signed-off

Re: [PATCH v10 5/5] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl

2025-03-25 Thread Raag Jadav
On Tue, Mar 25, 2025 at 08:14:13PM +0530, Cavitt, Jonathan wrote: > From: Jadav, Raag > > On Tue, Mar 25, 2025 at 03:01:27AM +0530, Cavitt, Jonathan wrote: > > > From: Jadav, Raag > > > > On Mon, Mar 24, 2025 at 10:27:08PM +0530, Cavitt, Jonathan wrote: > > > > > From: Jadav, Raag > > > > > >

Re: [PATCH v12 5/5] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl

2025-03-25 Thread Raag Jadav
On Tue, Mar 25, 2025 at 08:15:59PM +0530, Cavitt, Jonathan wrote: > From: Jadav, Raag > > On Mon, Mar 24, 2025 at 11:09:28PM +, Jonathan Cavitt wrote: > > > Add support for userspace to request a list of observed faults > > > from a specified VM. > > > > ... > > > > > v10: > > > - Remove un

[PATCH] drm/virtio: Fix flickering issue seen with imported dmabufs

2025-03-25 Thread Vivek Kasireddy
We need to save the reservation object pointer associated with the imported dmabuf in the newly created GEM object to allow drm_gem_plane_helper_prepare_fb() to extract the exclusive fence from it and attach it to the plane state during prepare phase. This is needed to ensure that drm_atomic_helper

[PATCH v1 2/2] drm/virtio: Fix missed dmabuf unpinning in error path of prepare_fb()

2025-03-25 Thread Dmitry Osipenko
Unpin imported dmabuf on fence allocation failure in prepare_fb(). Fixes: 4a696a2ee646 ("drm/virtio: Add prepare and cleanup routines for imported dmabuf obj") Cc: # v6.14+ Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/virtio/virtgpu_plane.c | 25 ++--- 1 file changed,

[PATCH v1 1/2] drm/virtio: Don't attach GEM to a non-created context in gem_object_open()

2025-03-25 Thread Dmitry Osipenko
The vfpriv->ctx_id is always initialized to a non-zero value. Check whether context was created before attaching GEM to this context ID. This left unnoticed previously because host silently skips attachment if context doesn't exist, still we shouldn't do that for consistency. Fixes: 086b9f27f0ab (

Re: [RFC v3 14/33] rust: drm/kms: Add OpaqueConnector and OpaqueConnectorState

2025-03-25 Thread Lyude Paul
On Fri, 2025-03-14 at 13:08 +0100, Maxime Ripard wrote: > Hi, > > On Wed, Mar 05, 2025 at 05:59:30PM -0500, Lyude Paul wrote: > > Since we allow drivers to have multiple implementations of DriverConnector > > and DriverConnectorState (in C, the equivalent of this is having multiple > > structs whi

Re: [PATCH v2 3/4] arm64: dts: qcom: x1e78100-t14s-oled: add eDP panel

2025-03-25 Thread Dmitry Baryshkov
On 25/03/2025 21:21, Christopher Obbard wrote: Add the Samsung ATNA40YK20 eDP panel to the device tree for the Snapdragon T14s OLED model. Signed-off-by: Christopher Obbard --- .../arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts | 10 ++ 1 file changed, 10 insertions(+) d

Re: [PATCH v7 7/7] rust: enable `clippy::ref_as_ptr` lint

2025-03-25 Thread Benno Lossin
On Tue Mar 25, 2025 at 11:33 PM CET, Tamir Duberstein wrote: > On Tue, Mar 25, 2025 at 6:11 PM Benno Lossin wrote: >> >> On Tue Mar 25, 2025 at 9:07 PM CET, Tamir Duberstein wrote: >> > diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs >> > index 40034f77fc2f..6233af50bab7 100644 >> > --- a/rus

[PATCH 4/8] rust: drm: add device abstraction

2025-03-25 Thread Danilo Krummrich
Implement the abstraction for a `struct drm_device`. A `drm::device::Device` creates a static const `struct drm_driver` filled with the data from the `drm::drv::Driver` trait implementation of the actual driver creating the `drm::device::Device`. Co-developed-by: Asahi Lina Signed-off-by: Asahi

Re: [PATCH 2/5] drm/panel: Add refcount support

2025-03-25 Thread kernel test robot
: c8ba07caaecc622a9922cda49f24790821af8a71 patch link: https://lore.kernel.org/r/20250325-b4-panel-refcounting-v1-2-4e2bf5d19c5d%40redhat.com patch subject: [PATCH 2/5] drm/panel: Add refcount support config: s390-randconfig-002-20250326 (https://download.01.org/0day-ci/archive/20250326

Re: [PATCH] drm/virtio: Fix flickering issue seen with imported dmabufs

2025-03-25 Thread Dmitry Osipenko
On 3/25/25 23:10, Vivek Kasireddy wrote: > We need to save the reservation object pointer associated with the > imported dmabuf in the newly created GEM object to allow > drm_gem_plane_helper_prepare_fb() to extract the exclusive fence > from it and attach it to the plane state during prepare phase

[PATCH 2/8] drm/format-helper: Add generic conversion to 32-bit formats

2025-03-25 Thread Thomas Zimmermann
Add drm_fb_xfrm_line_32to32() to implement conversion from 32-bit pixels to 32-bit pixels. The pixel-conversion is specified by the given callback parameter. Mark the helper as always_inline to avoid overhead from function calls. Then implement all existing line-conversion functions with the new g

Re: [PATCH v12 5/5] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl

2025-03-25 Thread Jianxun Zhang
On 3/24/25 16:09, Jonathan Cavitt wrote: Add support for userspace to request a list of observed faults from a specified VM. v2: - Only allow querying of failed pagefaults (Matt Brost) v3: - Remove unnecessary size parameter from helper function, as it is a property of the arguments. (jca

Re: [PATCH 1/2] dt-bindings: display: panel: Add Visionox G2647FB105

2025-03-25 Thread Krzysztof Kozlowski
On 25/03/2025 19:16, Danila Tikhonov wrote: >>> + vsp-supply: >>> +description: Positive source voltage rail >> Are you sure these are real voltage rails on the device? Weirdly similar >> to some old Samsung AMOLED panels... > Hello Krzysztof, > > I was somewhat intrigued by your observation,

Re: [PATCH 3/5] drm/panel: get/put panel reference in drm_panel_add/remove()

2025-03-25 Thread kernel test robot
: c8ba07caaecc622a9922cda49f24790821af8a71 patch link: https://lore.kernel.org/r/20250325-b4-panel-refcounting-v1-3-4e2bf5d19c5d%40redhat.com patch subject: [PATCH 3/5] drm/panel: get/put panel reference in drm_panel_add/remove() config: xtensa-randconfig-001-20250326 (https://download.01.org/0day-ci

Re: [PATCH 1/2] drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO

2025-03-25 Thread M Henning
Okay, that sounds reasonable since I don't expect this to change very quickly. Since I don't fully understand, is the suggestion here to: 1) add the interface as a function on nvkm_gr using the nvkm_gr_func vtable and store the actual data on r535_gr or 2) add the interface to NVIF (which IF?) and

Re: [PATCH v3 00/16] Introduce and use generic parity16/32/64 helper

2025-03-25 Thread H. Peter Anvin
On 3/23/25 08:16, Kuan-Wei Chiu wrote: Interface 3: Multiple Functions Description: bool parity_odd8/16/32/64() Pros: No need for explicit casting; easy to integrate architecture-specific optimizations; except for parity8(), all functions are one-liners with no significant code dup

[PATCH v13 2/6] drm/xe/xe_gt_pagefault: Disallow writes to read-only VMAs

2025-03-25 Thread Jonathan Cavitt
The page fault handler should reject write/atomic access to read only VMAs. Add code to handle this in handle_pagefault after the VMA lookup. Fixes: 3d420e9fa848 ("drm/xe: Rework GPU page fault handling") Signed-off-by: Jonathan Cavitt Suggested-by: Matthew Brost --- drivers/gpu/drm/xe/xe_gt_p

Re: [PATCH v7 7/7] rust: enable `clippy::ref_as_ptr` lint

2025-03-25 Thread Benno Lossin
On Tue Mar 25, 2025 at 9:07 PM CET, Tamir Duberstein wrote: > diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs > index 40034f77fc2f..6233af50bab7 100644 > --- a/rust/kernel/str.rs > +++ b/rust/kernel/str.rs > @@ -29,7 +29,7 @@ pub const fn is_empty(&self) -> bool { > #[inline] > pub c

[PATCH v13 3/6] drm/xe/xe_gt_pagefault: Move pagefault struct to header

2025-03-25 Thread Jonathan Cavitt
Move the pagefault struct from xe_gt_pagefault.c to the xe_gt_pagefault_types.h header file, and move the associated enum values into the regs folder under xe_pagefault_desc.h Since xe_pagefault_desc.h is being initialized here, also move the xe_guc_pagefault_desc hardware formats to the new file.

[PATCH v13 6/6] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl

2025-03-25 Thread Jonathan Cavitt
Add support for userspace to request a list of observed faults from a specified VM. v2: - Only allow querying of failed pagefaults (Matt Brost) v3: - Remove unnecessary size parameter from helper function, as it is a property of the arguments. (jcavitt) - Remove unnecessary copy_from_user (Jain

[PATCH v13 5/6] drm/xe/xe_vm: Add per VM fault info

2025-03-25 Thread Jonathan Cavitt
Add additional information to each VM so they can report up to the first 50 seen faults. Only pagefaults are saved this way currently, though in the future, all faults should be tracked by the VM for future reporting. Additionally, of the pagefaults reported, only failed pagefaults are saved this

[PATCH v13 0/6] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl

2025-03-25 Thread Jonathan Cavitt
Add additional information to each VM so they can report up to the first 50 seen faults. Only pagefaults are saved this way currently, though in the future, all faults should be tracked by the VM for future reporting. Additionally, of the pagefaults reported, only failed pagefaults are saved this

[PATCH v13 4/6] drm/xe/uapi: Define drm_xe_vm_get_property

2025-03-25 Thread Jonathan Cavitt
Add initial declarations for the drm_xe_vm_get_property ioctl. v2: - Expand kernel docs for drm_xe_vm_get_property (Jianxun) v3: - Remove address type external definitions (Jianxun) - Add fault type to xe_drm_fault struct (Jianxun) Signed-off-by: Jonathan Cavitt Cc: Zhang Jianxun --- include/

Re: [PATCH v8 5/6] test_bits: add tests for GENMASK_U*()

2025-03-25 Thread Andy Shevchenko
On Wed, Mar 26, 2025 at 01:00:00AM +0900, Vincent Mailhol via B4 Relay wrote: > From: Lucas De Marchi > > Add some additional tests in lib/tests/test_bits.c to cover the > expected/non-expected values of the fixed-type GENMASK_U*() macros. > > Also check that the result value matches the expecte

[PATCH v7 2/7] rust: enable `clippy::ptr_as_ptr` lint

2025-03-25 Thread Tamir Duberstein
In Rust 1.51.0, Clippy introduced the `ptr_as_ptr` lint [1]: > Though `as` casts between raw pointers are not terrible, > `pointer::cast` is safer because it cannot accidentally change the > pointer's mutability, nor cast the pointer to other types like `usize`. There are a few classes of changes

[PATCH v7 1/7] rust: retain pointer mut-ness in `container_of!`

2025-03-25 Thread Tamir Duberstein
Avoid casting the input pointer to `*const _`, allowing the output pointer to be `*mut` if the input is `*mut`. This allows a number of `*const` to `*mut` conversions to be removed at the cost of slightly worse ergonomics when the macro is used with a reference rather than a pointer; the only examp

[PATCH v7 7/7] rust: enable `clippy::ref_as_ptr` lint

2025-03-25 Thread Tamir Duberstein
In Rust 1.78.0, Clippy introduced the `ref_as_ptr` lint [1]: > Using `as` casts may result in silently changing mutability or type. While this doesn't eliminate unchecked `as` conversions, it makes such conversions easier to scrutinize. It also has the slight benefit of removing a degree of free

[PATCH v7 0/7] rust: reduce `as` casts, enable related lints

2025-03-25 Thread Tamir Duberstein
This started with a patch that enabled `clippy::ptr_as_ptr`. Benno Lossin suggested I also look into `clippy::ptr_cast_constness` and I discovered `clippy::as_ptr_cast_mut`. This series now enables all 3 lints. It also enables `clippy::as_underscore` which ensures other pointer casts weren't missed

[PATCH v7 4/7] rust: enable `clippy::as_ptr_cast_mut` lint

2025-03-25 Thread Tamir Duberstein
In Rust 1.66.0, Clippy introduced the `as_ptr_cast_mut` lint [1]: > Since `as_ptr` takes a `&self`, the pointer won’t have write > permissions unless interior mutability is used, making it unlikely > that having it as a mutable pointer is correct. There is only one affected callsite, and the chan

Re: [PATCH v2 47/59] drm-dyndbg: add DRM_CLASSMAP_USE to bochs

2025-03-25 Thread jim . cromie
On Mon, Mar 24, 2025 at 9:03 AM Louis Chauvet wrote: > > > > Le 20/03/2025 à 19:52, Jim Cromie a écrit : > > tiny/bochs has 5 DRM_UT_* debugs, make them controllable when > > CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has > > class'd debugs. > > > > Signed-off-by: Jim Cromie

Re: [PATCH v2 30/59] dyndbg: drop "protection" of class'd pr_debugs from legacy queries

2025-03-25 Thread jim . cromie
> > - int valid_class; > > + int slctd_class; > > Nitpick: can you use full words? slctd is difficult to read. > yes. done. thx.

Re: [PATCH v7 0/7] rust: reduce `as` casts, enable related lints

2025-03-25 Thread Miguel Ojeda
On Tue, Mar 25, 2025 at 9:07 PM Tamir Duberstein wrote: > > Changes in v7: > - Add patch to enable `clippy::ref_as_ptr`. > - Link to v6: > https://lore.kernel.org/r/20250324-ptr-as-ptr-v6-0-49d1b7fd4...@gmail.com Please slow down -- at least wait a few days between revisions (unless there is a p

Re: [PATCH 0/7] A few drm_syncobj optimisations

2025-03-25 Thread Maíra Canal
Hi Tvrtko, On 25/03/25 06:57, Tvrtko Ursulin wrote: On 24/03/2025 23:17, Maíra Canal wrote: Hi Tvrtko, Thanks for this patchset! I applied this patchset to the RPi downstream kernel 6.13.7 [1] and saw an FPS improvement of approximately 5.85% with "vkgears -present-mailbox" on the RPi 5. I d

Re: [PATCH v2 30/59] dyndbg: drop "protection" of class'd pr_debugs from legacy queries

2025-03-25 Thread jim . cromie
On Tue, Mar 25, 2025 at 12:29 PM wrote: > > On Mon, Mar 24, 2025 at 9:20 AM Louis Chauvet > wrote: > > > > > > > > Le 20/03/2025 à 19:52, Jim Cromie a écrit : > > > Current classmap code protects class'd pr_debugs from unintended > > > changes by "legacy" unclassed queries: > > > > > ># this

Re: [PATCH v10 11/13] drm/atomic-helper: Separate out bridge pre_enable/post_disable from enable/disable

2025-03-25 Thread Sverdlin, Alexander
On Wed, 2025-02-26 at 21:27 +0530, Aradhya Bhatia wrote: > The encoder-bridge ops occur by looping over the new connector states of > the display pipelines. The enable sequence runs as follows - > > - pre_enable(bridge), > - enable(encoder), > - enable(bridge), > > while the dis

[PATCH v2 1/4] dt-bindings: display: panel: samsung,atna40yk20: document ATNA40YK20

2025-03-25 Thread Christopher Obbard
The Samsung ATNA40YK20 panel is a 14" AMOLED eDP panel. It is similar to the ATNA33XC20 except that it is larger and has a different resolution. Signed-off-by: Christopher Obbard --- Documentation/devicetree/bindings/display/panel/samsung,atna33xc20.yaml | 2 ++ 1 file changed, 2 insertions(+)

[PATCH v2 2/4] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to LCD panel

2025-03-25 Thread Christopher Obbard
The eDP panel has an HPD GPIO. Describe it in the devicetree. Unfortunately I cannot test this on the non-OLED model since I only have access to the model with OLED (which also uses the HPD GPIO). I believe this could be split into two patches; one adding the pinctrl node and one adding the hpd g

[PATCH V3] accel/amdxdna: Add BO import and export

2025-03-25 Thread Lizhi Hou
Add amdxdna_gem_prime_export() and amdxdna_gem_prime_import() for BO import and export. Register mmu notifier for imported BO as well. When MMU_NOTIFIER_UNMAP event is received, queue work to remove the notifier. The same BO could be mapped multiple times if it is exported and imported by an appli

Re: [PATCH 1/2] accel/ivpu: Fix deadlock in ivpu_ms_cleanup()

2025-03-25 Thread Lizhi Hou
On 3/25/25 04:43, Maciej Falkowski wrote: From: Jacek Lawrynowicz Fix deadlock in ivpu_ms_cleanup() by preventing runtime resume after file_priv->ms_lock is acquired. During a failure in runtime resume, a cold boot is executed, which calls ivpu_ms_cleanup_all(). This function calls ivpu_ms_c

Re: [PATCH v2 33/59] docs/dyndbg: add classmap info to howto (TBD)

2025-03-25 Thread jim . cromie
On Mon, Mar 24, 2025 at 9:23 AM Louis Chauvet wrote: > > > > Le 20/03/2025 à 19:52, Jim Cromie a écrit : > > Describe the 3 API macros providing dynamic_debug's classmaps > > > > DYNDBG_CLASSMAP_DEFINE - create & export a classmap ... > > +Dynamic Debug classmaps > > +=== > > +

[PATCH v7 3/7] rust: enable `clippy::ptr_cast_constness` lint

2025-03-25 Thread Tamir Duberstein
In Rust 1.72.0, Clippy introduced the `ptr_cast_constness` lint [1]: > Though `as` casts between raw pointers are not terrible, > `pointer::cast_mut` and `pointer::cast_const` are safer because they > cannot accidentally cast the pointer to another type. There are only 2 affected sites: - `*mut T

[PATCH v7 5/7] rust: enable `clippy::as_underscore` lint

2025-03-25 Thread Tamir Duberstein
In Rust 1.63.0, Clippy introduced the `as_underscore` lint [1]: > The conversion might include lossy conversion or a dangerous cast that > might go undetected due to the type being inferred. > > The lint is allowed by default as using `_` is less wordy than always > specifying the type. Always sp

[PATCH v7 6/7] rust: enable `clippy::cast_lossless` lint

2025-03-25 Thread Tamir Duberstein
Before Rust 1.29.0, Clippy introduced the `cast_lossless` lint [1]: > Rust’s `as` keyword will perform many kinds of conversions, including > silently lossy conversions. Conversion functions such as `i32::from` > will only perform lossless conversions. Using the conversion functions > prevents con

[PATCH] drm/amdgpu: use static ids for ACP platform devs

2025-03-25 Thread Brady Norander
mfd_add_hotplug_devices() assigns child platform devices with PLATFORM_DEVID_AUTO, but the ACP machine drivers expect the platform device names to never change. Use mfd_add_devices() instead and give each cell a unique id. Signed-off-by: Brady Norander --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c

Re: [PATCH] drm/amdgpu: use static ids for ACP platform devs

2025-03-25 Thread Brady Norander
On 3/25/25 6:12 PM, Alex Deucher wrote: While you are at it, can you take a look at drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.c and drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c as well? Alex I think it makes more sense to handle that in a separate patch as it is an unrelated ip block.

Re: [PATCH v7 7/7] rust: enable `clippy::ref_as_ptr` lint

2025-03-25 Thread Tamir Duberstein
On Tue, Mar 25, 2025 at 6:11 PM Benno Lossin wrote: > > On Tue Mar 25, 2025 at 9:07 PM CET, Tamir Duberstein wrote: > > diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs > > index 40034f77fc2f..6233af50bab7 100644 > > --- a/rust/kernel/str.rs > > +++ b/rust/kernel/str.rs > > @@ -29,7 +29,7 @@ p

[PATCH 2/2] drm: nova-drm: add initial driver skeleton

2025-03-25 Thread Danilo Krummrich
Add the initial nova-drm driver skeleton. nova-drm is connected to nova-core through the auxiliary bus and implements the DRM parts of the nova driver stack. For now, it implements the fundamental DRM abstractions, i.e. creates a DRM device and registers it, exposing a three sample IOCTLs. DRM

[PATCH 1/2] gpu: nova-core: register auxiliary device for nova-drm

2025-03-25 Thread Danilo Krummrich
Register an auxiliary device for nova-drm. For now always use zero for the auxiliary device' ID; we don't use it yet anyways. However, once it lands, we should switch to XArray. Signed-off-by: Danilo Krummrich --- drivers/gpu/nova-core/Kconfig | 1 + drivers/gpu/nova-core/driver.rs| 9

Re: [PATCH V1] accel/amdxdna: Add BO import and export

2025-03-25 Thread Lizhi Hou
Hi Jeff, Just noticed that the driver should not use import_attach. https://lore.kernel.org/all/20250317131923.238374-1-tzimmerm...@suse.de/ I will remove the import_attach usage and send V3 patch. Thanks Lizhi On 3/21/25 12:52, Lizhi Hou wrote: On 3/21/25 08:15, Jeff Hugo wrote: On 3/

Re: [PATCH 2/2] drm/panel: Add Visionox G2647FB105 panel driver

2025-03-25 Thread Danila Tikhonov
On 3/25/25 18:57, Alexander Baransky wrote: Add the driver for Visionox G2647FB105 6.47" FHD Plus CMD mode AMOLED panel support found in: - Xiaomi Mi Note 10 / CC9 Pro (sm7150-xiaomi-tucana) - Xiaomi Mi Note 10 Lite (sm7150-xiaomi-toco) Signed-off-by: Alexander Baransky --- drivers/gpu/drm/pan

[PATCH AUTOSEL 6.13 6/7] drm/amd/display: Fix incorrect fw_state address in dmub_srv

2025-03-25 Thread Sasha Levin
From: Lo-an Chen [ Upstream commit d60073294cc3b46b73d6de247e0e5ae8684a6241 ] [WHY] The fw_state in dmub_srv was assigned with wrong address. The address was pointed to the firmware region. [HOW] Fix the firmware state by using DMUB_DEBUG_FW_STATE_OFFSET in dmub_cmd.h. Reviewed-by: Nicholas Ka

  1   2   3   >