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

2025-03-25 Thread Jianxun Zhang
On 3/25/25 15:27, 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

[PATCH 0/5] drm/amd/pm: Prevent division by zero

2025-03-25 Thread Denis Arefev
This series of patches prevents possible division by zero. The user can set any speed value. If speed is greater than UINT_MAX/8, division by zero is possible. Found by Linux Verification Center (linuxtesting.org) with SVACE. Denis Arefev (5): drm/amd/pm: Prevent division by zero drm/amd/pm

RE: [PATCH v8 01/14] drm: Define histogram structures exposed to user

2025-03-25 Thread Murthy, Arun R
> On Wed, 19 Mar 2025 12:08:15 + > "Murthy, Arun R" wrote: > > > > On Mon, 3 Mar 2025 13:23:42 +0530 > > > "Murthy, Arun R" wrote: > > > > > > > On 20-02-2025 21:20, Pekka Paalanen wrote: > > > > > On Wed, 19 Feb 2025 09:28:51 +0530 "Murthy, Arun R" > > > > > wrote: > > ... > > > > > Hi P

[PATCH] drm/amdgpu: Remove the redundant NULL check for the 'dte_data' object

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

Re: [PATCH v2 4/4] drm/dp: fallback to maximum when PWM bit count is zero

2025-03-25 Thread Dmitry Baryshkov
On 25/03/2025 21:21, Christopher Obbard wrote: Some eDP devices report DP_EDP_PWMGEN_BIT_COUNT as 0, but still provide valid non-zero MIN and MAX values. This patch reworks the logic to fallback to the max value in such cases, ensuring correct backlight PWM configuration even when the bit count v

[PATCH v2 3/5] drm/bridge: it6505: modify DP link auto training

2025-03-25 Thread Hermes Wu via B4 Relay
From: Hermes Wu IT6505 supports HW link training which will write DPCD and check training status automatically. In the case that driver set link rate at 2.7G and HW fail to training, it will change link configuration and try 1.65G. And this will cause INT_VID_FIFO_ERROR triggered when link clock

[PATCH v2 5/5] drm/bridge: it6505: skip auto training when previous try fail

2025-03-25 Thread Hermes Wu via B4 Relay
From: Hermes Wu When connect to device which can only training done by step training, skip auto training when link training restart, usually happen when display resolution is changed. Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridge/ite-it6505.c | 29 + 1 file ch

[PATCH v2 1/5] drm/bridge: it6505: fix link training state HW register reset

2025-03-25 Thread Hermes Wu via B4 Relay
From: Hermes Wu In order to reset HW link auto training state, bits FORCE_RETRAIN and MANUAL_TRAIN at REG_TRAIN_CTRL1 must be set at the same time. Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridge/ite-it6505.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 0/2] drm: Make some resolution info unsigned

2025-03-25 Thread Lyude Paul
During the review of some of my patches for KMS bindings in Rust, it was pointed out we have some areas of DRM that are storing resolutions as signed integers when it doesn't really make sense. Since there's no real usecase for this and it's a bit more obvious when writing rust code then it is in C

[PATCH v2 4/5] drm/bridge: it6505: modify DP link training work

2025-03-25 Thread Hermes Wu via B4 Relay
From: Hermes Wu The DP link training work include auto training and after auto training failed "AUTO_TRAIN_RETRY" times, it switch to step training mode. It will more efficiency that finish link auto training, include retry, and step training in a work, rather than re-schedule train work when ea

Re: [PATCH v2 2/3] misc: fastrpc: add support for gpdsp remoteproc

2025-03-25 Thread Dmitry Baryshkov
On Thu, Mar 20, 2025 at 05:11:20PM +, Srinivas Kandagatla wrote: > > > On 20/03/2025 09:14, Ling Xu wrote: > > The fastrpc driver has support for 5 types of remoteprocs. There are > > some products which support GPDSP remoteprocs. Add changes to support > > GPDSP remoteprocs. > > > > Reviewe

[PATCH v2 2/5] drm/bridge: it6505: check INT_LINK_TRAIN_FAIL while link auto training

2025-03-25 Thread Hermes Wu via B4 Relay
From: Hermes Wu When start link training, interrupt status INT_LINK_TRAIN_FAIL can use to check link training fail and no need to wait until timeout. it6505_irq_link_train_fail() remove from interrupt and no longer used. Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridge/ite-it6505.c | 25 ++

[PATCH v2 0/5] drm/bridge: it6505: fix DP link traning and improve compatibility

2025-03-25 Thread Hermes Wu via B4 Relay
IT6505 supports HW auto link training which will write DPCD and check training status automatically. Some DP device can not pass HW auto link training and must set link training step by step. when HW auto link training fail, it may trigger video FIFO error, and link training process will reset to

[PATCH 1/8] drm: drv: implement __drm_dev_alloc()

2025-03-25 Thread Danilo Krummrich
In the Rust DRM device abstraction we need to allocate a struct drm_device. Currently, there are two options, the deprecated drm_dev_alloc() (which does not support subclassing) and devm_drm_dev_alloc(). The latter supports subclassing, but also manages the initial reference through devres for the

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

2025-03-25 Thread Kasireddy, Vivek
Hi Dmitry, > Subject: [PATCH v1 2/2] drm/virtio: Fix missed dmabuf unpinning in error path > of prepare_fb() > > 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+ >

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

2025-03-25 Thread Kasireddy, Vivek
> Subject: Re: [PATCH] drm/virtio: Fix flickering issue seen with imported > dmabufs > > 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(

[PATCH v8 1/6] bits: add comments and newlines to #if, #else and #endif directives

2025-03-25 Thread Vincent Mailhol via B4 Relay
From: Vincent Mailhol This is a preparation for the upcoming GENMASK_U*() and BIT_U*() changes. After introducing those new macros, there will be a lot of scrolling between the #if, #else and #endif. Add a comment to the #else and #endif preprocessor macros to help keep track of which context we

[PATCH v8 6/6] test_bits: add tests for BIT_U*()

2025-03-25 Thread Vincent Mailhol via B4 Relay
From: Vincent Mailhol Add some additional tests in lib/tests/test_bits.c to cover the expected results of the fixed type BIT_U*() macros. Signed-off-by: Vincent Mailhol Reviewed-by: Lucas De Marchi --- Changelog: v7 -> v8: - In commit db6fe4d61ece ("lib: Move KUnit tests into tests/

[PATCH v2 3/4] perf drm_pmu: Add a tool like PMU to expose DRM information

2025-03-25 Thread Ian Rogers
DRM clients expose information through usage stats as documented in Documentation/gpu/drm-usage-stats.rst (available online at https://docs.kernel.org/gpu/drm-usage-stats.html). Add a tool like PMU, similar to the hwmon PMU, that exposes DRM information. For example on a tigerlake laptop: ``` $ per

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: hexagon-randconfig-002-20250326 (https://download.01.org/0day-ci

[PATCH v2 09/15] drm/mediatek: Refine OVL format convert API and export to public

2025-03-25 Thread paul-pl . chen
From: Nancy Lin Refine OVL format convert API and export to public. Signed-off-by: Nancy Lin Signed-off-by: Paul-pl Chen --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 158 drivers/gpu/drm/mediatek/mtk_disp_ovl.h | 16 +++ 2 files changed, 122 insertions(+), 52 deleti

[PATCH v2 4/4] perf tests: Add a DRM PMU test

2025-03-25 Thread Ian Rogers
The test opens any DRM devices so that the shell has fdinfo files containing the DRM data. The test then uses perf stat to make sure the events can be read. Signed-off-by: Ian Rogers --- tools/perf/tests/shell/drm_pmu.sh | 77 +++ 1 file changed, 77 insertions(+) cre

[PATCH v2 0/4] Add support for a DRM tool like PMU

2025-03-25 Thread Ian Rogers
DRM clients expose information through usage stats as documented in Documentation/gpu/drm-usage-stats.rst (available online at https://docs.kernel.org/gpu/drm-usage-stats.html). Add a tool like PMU, similar to the hwmon PMU, that exposes DRM information. v2: Add support to only scan hwmon and drm

[PATCH v2 2/4] perf parse-events: Avoid scanning PMUs that can't match a wildcard

2025-03-25 Thread Ian Rogers
Add perf_pmus__scan_matching_wildcard that only reads sysfs for pmus that could wildcard match. For example, if searching for the event 'inst_retired.any/period=100/' first 'inst_retired.any' will try to be directly looked up as a PMU, then 'inst_retired.any' will try to be wildcard matched aga

Re: [PATCH v2] drm/panel/sharp-ls043t1le01: Use _multi variants

2025-03-25 Thread Anusha Srivatsa
On Tue, Mar 25, 2025 at 11:34 AM Doug Anderson wrote: > Hi, > > On Mon, Mar 24, 2025 at 1:31 PM Anusha Srivatsa > wrote: > > > > Move away from using deprecated API and use _multi > > variants if available. Use mipi_dsi_msleep() > > and mipi_dsi_usleep_range() instead of msleep() > > and usleep_

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

2025-03-25 Thread Kasireddy, Vivek
Hi Christian, > Subject: Re: [PATCH] udmabuf: fix a buf size overflow issue during udmabuf > creation > > 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 w

[PATCH 8/8] MAINTAINERS: add DRM Rust source files to DRM DRIVERS

2025-03-25 Thread Danilo Krummrich
Add the DRM Rust source files to the DRM DRIVERS maintainers entry. Signed-off-by: Danilo Krummrich --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index de46acc247c3..c704431f02aa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7672,6 +7672,7 @@ F:

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

2025-03-25 Thread Liu Ying
On 03/25/2025, Charles Han wrote: > 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-br

[RFC PATCH v2 1/6] lib/scatterlist.c: Support constructing sgt from page xarray

2025-03-25 Thread Adrián Larumbe
In preparation for a future commit that will introduce sparse allocation of pages in DRM shmem, a scatterlist function that knows how to deal with an xarray collection of memory pages had to be introduced. Because the new function is identical to the existing one that deals with a page array, the

[RFC PATCH v2 6/6] drm/panfrost/panthor: Take sparse objects into account for fdinfo

2025-03-25 Thread Adrián Larumbe
Make use of the new shmem helper for deciding whether a GEM object has backing pages. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +- drivers/gpu/drm/panthor/panthor_gem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/p

[RFC PATCH v2 3/6] drm/shmem: Implement sparse allocation of pages for shmem objects

2025-03-25 Thread Adrián Larumbe
Add a new function that lets drivers allocate pages for a subset of the shmem object's virtual address range, and another function for obtaining an SG table from those pages, so that memory can be mapped onto an MMU. Add also a new function for putting the pages of a sparse page array. The sparse

[RFC PATCH v2 5/6] drm/shmem: Add a helper to check object's page backing status

2025-03-25 Thread Adrián Larumbe
Provide a helper function that lets shmem API users know whether a given object is backed by physical pages, or else in the case of a sparse shmem object, at least one of them is populated. The obvious user is fdinfo, which needs to know an object's resident status. Signed-off-by: Adrián Larumbe

[RFC PATCH v2 4/6] drm/panfrost: Use shmem sparse allocation for heap BOs

2025-03-25 Thread Adrián Larumbe
Panfrost heap BOs grow on demand when the GPU triggers a page fault after accessing an address within the BO's virtual range. We still store the sgts we get back from the shmem sparse allocation function, since it was decided management of sparse memory SGTs should be done by client drivers rather

[RFC PATCH v2 0/6] Introduce sparse DRM shmem object allocations

2025-03-25 Thread Adrián Larumbe
This patch series is a proposal for implementing sparse page allocations for shmem objects. It was initially motivated by a kind of BO managed by the Panfrost driver, the tiler heap, which grows on demand every time the GPU faults on a virtual address within its drm_mm-managed ranged. Because keep

[RFC PATCH v2 2/6] drm/shmem: Introduce the notion of sparse objects

2025-03-25 Thread Adrián Larumbe
Sparse DRM objects will store their backing pages in an xarray, to avoid the overhead of preallocating a huge struct page pointer array when only a very small range of indices might be assigned. For now, only the definition of a sparse object as a union alternative to a 'dense' object is provided,

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

2025-03-25 Thread Tamir Duberstein
On Tue, Mar 25, 2025 at 4:23 PM Miguel Ojeda wrote: > > 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 d

[PATCH v5 6/6] drm/panfrost: Force AARCH64_4K page table format on MediaTek MT8192

2025-03-25 Thread Ariel D'Alessandro
MediaTek MT8192 SoC has an ARM Mali-G57 MC5 GPU (Valhall-JM). Now that Panfrost supports AARCH64_4K page table format, let's enable it on this SoC. Running glmark2-es2-drm [0] benchmark, reported the same performance score on both modes Mali LPAE (LEGACY) vs. AARCH64_4K, before and after this comm

[PATCH v20 01/10] drm/gem: Change locked/unlocked postfix of drm_gem_v/unmap() function names

2025-03-25 Thread Dmitry Osipenko
Make drm/gem API function names consistent by having locked function use the _locked postfix in the name, while the unlocked variants don't use the _unlocked postfix. Rename drm_gem_v/unmap() function names to make them consistent with the rest of the API functions. Acked-by: Maxime Ripard Review

[PATCH 0/2] Nova DRM skeleton driver

2025-03-25 Thread Danilo Krummrich
This patch series adds the nova-drm skeleton driver. 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 IOC

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

[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: [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

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

[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 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 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 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

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 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 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 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 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 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

[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 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] 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

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

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 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/

[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

[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

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

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 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 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] drm/amdgpu: use static ids for ACP platform devs

2025-03-25 Thread Alex Deucher
On Tue, Mar 25, 2025 at 6:07 PM Brady Norander wrote: > > 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. While you

[PATCH v13 1/6] drm/xe/xe_hw_engine: Map xe and user engine class in header

2025-03-25 Thread Jonathan Cavitt
Move the helper arrays xe_to_user_engine_class and user_to_xe_engine_class to xe_hw_engine_types.h, making them available to more of the xe kernel. This is done for user_to_xe_engine_class to reduce duplication, and xe_to_user_engine_class can and will be used in more than one place in the future.

[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/

[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 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 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 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

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

Re: [RFC v3 12/33] rust: drm/kms: Add RawConnector and RawConnectorState

2025-03-25 Thread Lyude Paul
On Fri, 2025-03-14 at 13:04 +0100, Maxime Ripard wrote: > On Wed, Mar 05, 2025 at 05:59:28PM -0500, Lyude Paul wrote: > > Now that we have more then one way to refer to connectors, we also want to > > ensure that any methods which are common to any kind of connector type can > > be used on all conn

[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

[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

[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

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 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

[PATCH v2 1/6] dt-bindings: display: rockchip, inno-hdmi: Fix Document of RK3036 compatible

2025-03-25 Thread Andy Yan
From: Andy Yan The RK3036 HDMI DDC bus requires it's PHY's reference clock to be enabled first before normal DDC communication can be carried out. Therefore, both RK3036 and RK3128 HDMI require two identical clocks. Signed-off-by: Andy Yan Reviewed-by: Rob Herring (Arm) --- (no changes sinc

[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

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

[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 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 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

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

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.

[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 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 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

[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 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

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 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 6/7] drm/syncobj: Add a fast path to drm_syncobj_array_wait_timeout

2025-03-25 Thread Maíra Canal
Hi Tvrtko, On 25/03/25 06:33, Tvrtko Ursulin wrote: On 24/03/2025 23:00, Maíra Canal wrote: Hi Tvrtko, On 18/03/25 12:54, Tvrtko Ursulin wrote: Running the Cyberpunk 2077 benchmark we can observe that waiting on DRM sycobjs is relatively hot, but the 96% of the calls are for a single object.

[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

  1   2   3   >