On 4/11/25 9:43 AM, Dave Airlie wrote:
>>
>>> However, I understand that you prefer to have primary authorship, even if
>>> the
>>> code has been re-organized in new commits, moved, modified or rewritten.
>>
>> Correct.
>
> For anyone working in this area that is intending to upstream anything
>
On 4/9/25 4:17 AM, Danilo Krummrich wrote:
> On Wed, Apr 09, 2025 at 03:06:38AM +0900, Asahi Lina wrote:
>> On 4/9/25 2:04 AM, Danilo Krummrich wrote:
>>> On Wed, Apr 09, 2025 at 01:29:35AM +0900, Asahi Lina wrote:
>>>> On 3/26/25 8:54 AM, Danilo Krummrich wrote:
&
On 4/10/25 7:23 PM, Danilo Krummrich wrote:
> (Adding Sima and dri-devel back in.)
>
> On Thu, Apr 10, 2025 at 04:12:13PM +0900, Asahi Lina wrote:
>>
>> P.S. my analysis based on the pasted code (since everyone here and
>> everyone on Reddit is forcing me to do it)
rg/nouveau/2025032523.5326-1-d...@kernel.org/
> [3] https://gitlab.freedesktop.org/drm/nova/-/tree/staging/nova-drm
>
> Asahi Lina (1):
> rust: drm: ioctl: Add DRM ioctl abstraction
>
> Danilo Krummrich (7):
> drm: drv: implement __drm_dev_alloc()
> rust: drm: add
t; [1] https://gitlab.freedesktop.org/drm/misc/kernel/-/tree/topic/rust-drm
> [2] https://lore.kernel.org/nouveau/2025032523.5326-1-d...@kernel.org/
> [3] https://gitlab.freedesktop.org/drm/nova/-/tree/staging/nova-drm
>
> Asahi Lina (1):
> rust: drm: ioctl: Add DRM ioctl abstr
On 4/9/25 2:04 AM, Danilo Krummrich wrote:
> On Wed, Apr 09, 2025 at 01:29:35AM +0900, Asahi Lina wrote:
>> On 3/26/25 8:54 AM, Danilo Krummrich wrote:
>>> This is the series for the initial DRM Rust abstractions, including DRM
>>> device /
>>> driver, IOC
Hi,
On 2/3/25 6:21 PM, Boris Brezillon wrote:
> +Akash with whom we've been discussing adding a 'REPEAT' mode to
> drm_gpuvm/panthor.
>
> On Sun, 2 Feb 2025 19:53:47 +0100
> Danilo Krummrich wrote:
>
>> Hi Lina,
>>
>> On Sun, Feb 02, 2
On 2/3/25 3:53 AM, Danilo Krummrich wrote:
> Hi Lina,
>
> On Sun, Feb 02, 2025 at 10:34:49PM +0900, Asahi Lina wrote:
>> Some hardware requires dummy page mappings to efficiently implement
>> Vulkan sparse features. These mappings consist of the same physical
>>
Now that the map API functions take a flags argument, plumb it through
into the drm_gpuva_op_map structure so that drivers can retrieve the
value that was passed. Similarly, for remap calls, take the flags from
the existing drm_gpuva.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/drm_gpuvm.c
flags on map and alter the merge/split logic depending
on the requested flags and the flags of the existing drm_gpuva ranges
that are being split.
First, just add the argument to the API and do nothing with it.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/drm_gpuvm.c| 6
that to the Xe folks.
Signed-off-by: Asahi Lina
---
Asahi Lina (4):
drm/gpuvm: Add a flags argument to drm_gpuvm_sm_map[_*]
drm/gpuvm: Plumb through flags into drm_gpuva_op_map
drm/gpuvm: Add DRM_GPUVA_SINGLE_PAGE flag and logic
drm/gpuvm: Plumb through flags into drm_gpuva
.
Signed-off-by: Asahi Lina
---
include/drm/drm_gpuvm.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/drm/drm_gpuvm.h b/include/drm/drm_gpuvm.h
index
dfeec61908b1a8295ae08b26bef211d3d4fda85b..16e6dcb8755bfedca5d1f184d72db9b2e9b857d0
100644
--- a/include/drm
o it when
mappings are split.
Note that this does not require drm_gpuva to know anything about the
page size.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/drm_gpuvm.c | 44 ++--
include/drm/drm_gpuvm.h | 9 -
2 files changed, 42 inserti
On 9/8/24 12:07 AM, Lucas De Marchi wrote:
> On Sat, Sep 07, 2024 at 08:38:30PM GMT, Asahi Lina wrote:
>>
>>
>> On 9/6/24 6:42 PM, Raag Jadav wrote:
>>> Introduce device wedged event, which will notify userspace of wedged
>>> (hanged/unusable) state of t
On 9/6/24 6:42 PM, Raag Jadav wrote:
> Introduce device wedged event, which will notify userspace of wedged
> (hanged/unusable) state of the DRM device through a uevent. This is
> useful especially in cases where the device is in unrecoverable state
> and requires userspace intervention for reco
as the `DriverInfo`, driver features
>> and IOCTLs.
>>
>> Co-developed-by: Asahi Lina
>> Signed-off-by: Asahi Lina
>> Signed-off-by: Danilo Krummrich
>> ---
>> rust/bindings/bindings_helper.h | 1 +
>> rust/kernel/drm/drv.rs | 141 +++
On 5/22/24 6:23 AM, Rob Herring wrote:
> On Mon, May 20, 2024 at 07:20:50PM +0200, Danilo Krummrich wrote:
>> From: Asahi Lina
>>
>> Add abstractions for DRM drivers and devices. These go together in one
>> commit since both are fairly tightly coupled types.
&
On 18/07/2023 14.45, Luben Tuikov wrote:
On 2023-07-17 22:35, Asahi Lina wrote:
On 18/07/2023 00.55, Christian König wrote:
Am 15.07.23 um 16:14 schrieb aly...@rosenzweig.io:
15 July 2023 at 00:03, "Luben Tuikov" wrote:
On 2023-07-14 05:57, Christian König wrote:
Am 14.07.2
On 18/07/2023 00.55, Christian König wrote:
Am 15.07.23 um 16:14 schrieb aly...@rosenzweig.io:
15 July 2023 at 00:03, "Luben Tuikov" wrote:
On 2023-07-14 05:57, Christian König wrote:
Am 14.07.23 um 11:49 schrieb Asahi Lina:
On 14/07/2023 17.43, Christian König wrote:
Am 1
On 18/07/2023 02.40, Luben Tuikov wrote:
On 2023-07-16 03:51, Asahi Lina wrote:
On 15/07/2023 16.14, Luben Tuikov wrote:
On 2023-07-14 04:21, Asahi Lina wrote:
drm_sched_fini() currently leaves any pending jobs dangling, which
causes segfaults and other badness when job completion fences are
On 15/07/2023 16.14, Luben Tuikov wrote:
On 2023-07-14 04:21, Asahi Lina wrote:
drm_sched_fini() currently leaves any pending jobs dangling, which
causes segfaults and other badness when job completion fences are
signaled after the scheduler is torn down.
If there are pending jobs, ideally we
On 14/07/2023 19.18, Christian König wrote:
Am 14.07.23 um 12:06 schrieb Asahi Lina:
On 14/07/2023 18.57, Christian König wrote:
Am 14.07.23 um 11:49 schrieb Asahi Lina:
On 14/07/2023 17.43, Christian König wrote:
Am 14.07.23 um 10:21 schrieb Asahi Lina:
A signaled scheduler fence can
On 14/07/2023 18.51, Christian König wrote:
Am 14.07.23 um 11:44 schrieb Asahi Lina:
On 14/07/2023 17.43, Christian König wrote:
Am 14.07.23 um 10:21 schrieb Asahi Lina:
A signaled scheduler fence can outlive its scheduler, since fences are
independencly reference counted. Therefore, we can
On 14/07/2023 18.57, Christian König wrote:
Am 14.07.23 um 11:49 schrieb Asahi Lina:
On 14/07/2023 17.43, Christian König wrote:
Am 14.07.23 um 10:21 schrieb Asahi Lina:
A signaled scheduler fence can outlive its scheduler, since fences are
independencly reference counted. Therefore, we can
On 14/07/2023 18.47, Christian König wrote:
Am 14.07.23 um 11:39 schrieb Asahi Lina:
On 14/07/2023 17.40, Christian König wrote:
Am 14.07.23 um 10:21 schrieb Asahi Lina:
Document the implied lifetime rules of the scheduler (or at least the
intended ones), as well as the expectations of how
On 14/07/2023 17.43, Christian König wrote:
Am 14.07.23 um 10:21 schrieb Asahi Lina:
A signaled scheduler fence can outlive its scheduler, since fences are
independencly reference counted. Therefore, we can't reference the
scheduler in the get_timeline_name() implementation.
Fixes oops
On 14/07/2023 17.43, Christian König wrote:
Am 14.07.23 um 10:21 schrieb Asahi Lina:
A signaled scheduler fence can outlive its scheduler, since fences are
independencly reference counted. Therefore, we can't reference the
scheduler in the get_timeline_name() implementation.
Fixes oops
On 14/07/2023 17.40, Christian König wrote:
Am 14.07.23 um 10:21 schrieb Asahi Lina:
Document the implied lifetime rules of the scheduler (or at least the
intended ones), as well as the expectations of how resource acquisition
should be handled.
Signed-off-by: Asahi Lina
---
drivers/gpu
Document the implied lifetime rules of the scheduler (or at least the
intended ones), as well as the expectations of how resource acquisition
should be handled.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/scheduler/sched_main.c | 58 --
1 file changed, 55
gnal
detached job fences with an error. I'd missed that and I think it's what
was causing us some rare lockups due to fences never getting signaled.
Signed-off-by: Asahi Lina
---
Asahi Lina (3):
drm/scheduler: Add more documentation
drm/scheduler: Fix UAF in drm_sched_fe
m GPU schedulers that no longer exist.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/scheduler/sched_entity.c | 7 ++-
drivers/gpu/drm/scheduler/sched_fence.c | 4 +++-
include/drm/gpu_scheduler.h | 5 +
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/gp
abstraction for
drm_sched, without having to externally duplicate the tracking of
in-flight jobs.
This shouldn't regress any existing drivers, since calling
drm_sched_fini() with any pending jobs is broken and this change should
be a no-op if there are no pending jobs.
Signed-off-by: Asahi
On 11/04/2023 23.07, Daniel Vetter wrote:
On Sat, Apr 08, 2023 at 04:05:20PM +0900, Asahi Lina wrote:
On 04/04/2023 10.58, Matthew Brost wrote:
On Tue, Apr 04, 2023 at 10:07:48AM +0900, Asahi Lina wrote:
Hi, thanks for the Cc!
No problem.
On 04/04/2023 09.22, Matthew Brost wrote:
Hello
On 04/04/2023 10.58, Matthew Brost wrote:
On Tue, Apr 04, 2023 at 10:07:48AM +0900, Asahi Lina wrote:
Hi, thanks for the Cc!
No problem.
On 04/04/2023 09.22, Matthew Brost wrote:
Hello,
As a prerequisite to merging the new Intel Xe DRM driver [1] [2], we
have been asked to merge our
On 07/04/2023 00.30, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 11:43:19PM +0900, Asahi Lina wrote:
On 06/04/2023 22.37, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 09:21:47PM +0900, Asahi Lina wrote:
On 06/04/2023 19.09, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 06:05:11PM +0900
On 07/04/2023 01.13, Daniel Vetter wrote:
On Fri, Apr 07, 2023 at 12:53:47AM +0900, Asahi Lina wrote:
On 06/04/2023 23.15, Daniel Vetter wrote:
On Tue, Mar 07, 2023 at 11:25:32PM +0900, Asahi Lina wrote:
drm_mm provides a simple range allocator, useful for managing virtual
address ranges. Add
On 05/04/2023 21.33, Daniel Vetter wrote:
On Tue, Mar 07, 2023 at 11:25:34PM +0900, Asahi Lina wrote:
DRM Sync Objects are a container for a DMA fence, and can be waited on
signaled, exported, and imported from userspace. Add a Rust abstraction
so Rust DRM drivers can support this functionality
On 06/04/2023 23.15, Daniel Vetter wrote:
On Tue, Mar 07, 2023 at 11:25:32PM +0900, Asahi Lina wrote:
drm_mm provides a simple range allocator, useful for managing virtual
address ranges. Add a Rust abstraction to expose this module to Rust
drivers.
Signed-off-by: Asahi Lina
In the cover
On 06/04/2023 22.48, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 10:15:56PM +0900, Asahi Lina wrote:
On 06/04/2023 20.55, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 01:44:22PM +0900, Asahi Lina wrote:
On 05/04/2023 23.37, Daniel Vetter wrote:
On Tue, Mar 07, 2023 at 11:25:43PM +0900
On 06/04/2023 22.37, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 09:21:47PM +0900, Asahi Lina wrote:
On 06/04/2023 19.09, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 06:05:11PM +0900, Asahi Lina wrote:
On 06/04/2023 17.27, Daniel Vetter wrote:
On Thu, 6 Apr 2023 at 10:22, Christian König
On 06/04/2023 18.48, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 06:27:27PM +0900, Asahi Lina wrote:
On 06/04/2023 18.15, Asahi Lina wrote:
On 06/04/2023 18.06, Christian König wrote:
Am 06.04.23 um 10:49 schrieb Asahi Lina:
On 06/04/2023 17.29, Christian König wrote:
Am 05.04.23 um 18:34
On 06/04/2023 20.25, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 02:02:55PM +0900, Asahi Lina wrote:
On 05/04/2023 23.44, Daniel Vetter wrote:
On Tue, Mar 07, 2023 at 11:25:43PM +0900, Asahi Lina wrote:
+/// Look up a GEM object handle for a `File` and return an `ObjectRef` for it.
+pub
On 06/04/2023 20.55, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 01:44:22PM +0900, Asahi Lina wrote:
On 05/04/2023 23.37, Daniel Vetter wrote:
On Tue, Mar 07, 2023 at 11:25:43PM +0900, Asahi Lina wrote:
+/// A generic monotonically incrementing ID used to uniquely identify object
instances
On 06/04/2023 19.09, Daniel Vetter wrote:
On Thu, Apr 06, 2023 at 06:05:11PM +0900, Asahi Lina wrote:
On 06/04/2023 17.27, Daniel Vetter wrote:
On Thu, 6 Apr 2023 at 10:22, Christian König wrote:
Am 05.04.23 um 18:09 schrieb Luben Tuikov:
On 2023-04-05 10:05, Danilo Krummrich wrote:
On 4
On 06/04/2023 18.15, Asahi Lina wrote:
On 06/04/2023 18.06, Christian König wrote:
Am 06.04.23 um 10:49 schrieb Asahi Lina:
On 06/04/2023 17.29, Christian König wrote:
Am 05.04.23 um 18:34 schrieb Asahi Lina:
A signaled scheduler fence can outlive its scheduler, since fences are
On 06/04/2023 18.06, Christian König wrote:
Am 06.04.23 um 10:49 schrieb Asahi Lina:
On 06/04/2023 17.29, Christian König wrote:
Am 05.04.23 um 18:34 schrieb Asahi Lina:
A signaled scheduler fence can outlive its scheduler, since fences are
independently reference counted.
Well that is
On 06/04/2023 17.27, Daniel Vetter wrote:
On Thu, 6 Apr 2023 at 10:22, Christian König wrote:
Am 05.04.23 um 18:09 schrieb Luben Tuikov:
On 2023-04-05 10:05, Danilo Krummrich wrote:
On 4/4/23 06:31, Luben Tuikov wrote:
On 2023-03-28 04:54, Lucas Stach wrote:
Hi Danilo,
Am Dienstag, dem 28
On 06/04/2023 17.29, Christian König wrote:
Am 05.04.23 um 18:34 schrieb Asahi Lina:
A signaled scheduler fence can outlive its scheduler, since fences are
independently reference counted.
Well that is actually not correct. Schedulers are supposed to stay
around until the hw they have been
Same as the prior email, this was supposed to go to Daniel...
On 06/04/2023 14.02, Asahi Lina wrote:
On 05/04/2023 23.44, Daniel Vetter wrote:
On Tue, Mar 07, 2023 at 11:25:43PM +0900, Asahi Lina wrote:
+/// Look up a GEM object handle for a `File` and return an `ObjectRef` for it.
+pub(crate
nd... yeah, that wasn't the same person.
Sorry for the confusion... I have no idea why Thunderbird hates Daniel...
On 06/04/2023 13.44, Asahi Lina wrote:
On 05/04/2023 23.37, Daniel Vetter wrote:
On Tue, Mar 07, 2023 at 11:25:43PM +0900, Asahi Lina wrote:
+/// A generic monotonically incre
On 05/04/2023 23.44, Daniel Vetter wrote:
On Tue, Mar 07, 2023 at 11:25:43PM +0900, Asahi Lina wrote:
+/// Look up a GEM object handle for a `File` and return an `ObjectRef` for it.
+pub(crate) fn lookup_handle(file: &DrmFile, handle: u32) -> Result {
+Ok(ObjectRef::new(shmem:
On 05/04/2023 23.37, Daniel Vetter wrote:
On Tue, Mar 07, 2023 at 11:25:43PM +0900, Asahi Lina wrote:
+/// A generic monotonically incrementing ID used to uniquely identify object
instances within the
+/// driver.
+pub(crate) struct ID(AtomicU64);
+
+impl ID {
+/// Create a new ID counter
After a job is pushed into the queue, it is owned by the scheduler core
and may be freed at any time, so we can't write nor read the submit
timestamp after that point.
Fixes oopses observed with the drm/asahi driver, found with kASAN.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/sche
m GPU schedulers that no longer exist.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/scheduler/sched_entity.c | 7 ++-
drivers/gpu/drm/scheduler/sched_fence.c | 4 +++-
include/drm/gpu_scheduler.h | 5 +
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/gp
Hi, thanks for the Cc!
On 04/04/2023 09.22, Matthew Brost wrote:
Hello,
As a prerequisite to merging the new Intel Xe DRM driver [1] [2], we
have been asked to merge our common DRM scheduler patches first as well
as develop a common solution for long running workloads with the DRM
scheduler. Th
On 10/03/2023 04.59, Faith Ekstrand wrote:
> On Thu, 2023-03-09 at 18:43 +0900, Asahi Lina wrote:
>> On 09/03/2023 17.42, Christian König wrote:
>>> Long story short: Don't do this! This is what the Windows drivers
>>> have
>>> been doing and it creates to
On 10/03/2023 03.50, Faith Ekstrand wrote:
> Jumping in here quick... (Sorry, I was out yesterday and was ignoring
> my e-mail on Tuesday so I could finally type some compiler code.)
>
> On Thu, 2023-03-09 at 18:14 +0900, Asahi Lina wrote:
>> On 09/03/2023 17.05, Christian K
On 10/03/2023 05.39, Karol Herbst wrote:
> On Thu, Mar 9, 2023 at 9:24 PM Faith Ekstrand
> wrote:
>>
>> On Thu, 2023-03-09 at 15:04 +0900, Asahi Lina wrote:
>>> On 08/03/2023 02.34, Björn Roy Baron wrote:
>>>>> +// SAFETY: Th
On 10/03/2023 06.16, Faith Ekstrand wrote:
> On Tue, 2023-03-07 at 23:25 +0900, Asahi Lina wrote:
>> 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 thei
On 09/03/2023 20.47, Maíra Canal wrote:
> On 3/9/23 02:25, Asahi Lina wrote:
>> On 08/03/2023 22.38, Maíra Canal wrote:
>>> On 3/7/23 11:25, Asahi Lina wrote:
>>>> The DRM shmem helper includes common code useful for drivers which
>>>> allocate
On 09/03/2023 20.47, Christian König wrote:
> Am 09.03.23 um 10:43 schrieb Asahi Lina:
>> On 09/03/2023 17.42, Christian König wrote:
>>> Am 08.03.23 um 20:37 schrieb Asahi Lina:
>>>> On 09/03/2023 03.12, Christian König wrote:
>>>>> Am 08.03
On 09/03/2023 17.42, Christian König wrote:
> Am 08.03.23 um 20:37 schrieb Asahi Lina:
>> On 09/03/2023 03.12, Christian König wrote:
>>> Am 08.03.23 um 18:32 schrieb Asahi Lina:
>>>> [SNIP]
>>>> Yes but... none of this cleans up jobs that are already
On 09/03/2023 17.05, Christian König wrote:
> Am 09.03.23 um 07:30 schrieb Asahi Lina:
>> On 09/03/2023 05.14, Christian König wrote:
>>>> I think you mean wake_up_interruptible(). That would be
>>>> drm_sched_job_done(), on the fence callback when a job complete
On 09/03/2023 05.14, Christian König wrote:
>> I think you mean wake_up_interruptible(). That would be
>> drm_sched_job_done(), on the fence callback when a job completes, which
>> as I keep saying is the same logic used for
>> hw_rq_count/hw_submission_limit tracking.
>
> As the documentation to
On 08/03/2023 03.19, Björn Roy Baron wrote:
> --- Original Message ---
> On Tuesday, March 7th, 2023 at 15:25, Asahi Lina wrote:
>
>> Add the initial abstractions for DRM drivers and devices. These go
>> together in one commit since they are fairly tightly coupl
On 08/03/2023 02.34, Björn Roy Baron wrote:
>> +// SAFETY: This is just the ioctl argument,
>> which hopefully has the right type
>> +// (we've done our best checking the size).
>
> In the rust tree there is the ReadableFromBytes [1] trait w
On 08/03/2023 00.32, Maíra Canal wrote:
> On 3/7/23 11:25, Asahi Lina wrote:
>> DRM drivers need to be able to declare which driver-specific ioctls they
>> support. This abstraction adds the required types and a helper macro to
>> generate the ioctl definition inside the D
On 08/03/2023 22.38, Maíra Canal wrote:
> On 3/7/23 11:25, Asahi Lina wrote:
>> The DRM shmem helper includes common code useful for drivers which
>> allocate GEM objects as anonymous shmem. Add a Rust abstraction for
>> this. Drivers can choose the raw GEM implementati
On 09/03/2023 04.12, Christian König wrote:
> Am 08.03.23 um 20:05 schrieb Asahi Lina:
>> [SNIP]
>>> Well it's not the better way, it's the only way that works.
>>>
>>> I have to admit that my bet on your intentions was wrong, but even that
>>
On 09/03/2023 03.12, Christian König wrote:
> Am 08.03.23 um 18:32 schrieb Asahi Lina:
>> [SNIP]
>> Yes but... none of this cleans up jobs that are already submitted by the
>> scheduler and in its pending list, with registered completion callbacks,
>> which were already
On 09/03/2023 02.57, Christian König wrote:
> Am 08.03.23 um 17:44 schrieb Asahi Lina:
>> On 09/03/2023 00.30, Christian König wrote:
>>> Am 08.03.23 um 15:53 schrieb Asahi Lina:
>>>> [SNIP]
>>>>> The background is that core memory management requires
On 09/03/2023 02.39, aly...@rosenzweig.io wrote:
>> You can't ask me for a list
>> of pending jobs (the scheduler knows this, it doesn't make any sense to
>> duplicate that outside)
>
> Silly question: could you add a new exported function to drm_sched to get the
> list of pending jobs, to be use
On 09/03/2023 00.42, Christian König wrote:
> Am 08.03.23 um 16:18 schrieb Asahi Lina:
>> On 08/03/2023 19.03, Christian König wrote:
>>> Am 08.03.23 um 10:57 schrieb Maarten Lankhorst:
>>>> On 2023-03-07 15:25, Asahi Lina wrote:
>>>>> drm_sched_fini
On 09/03/2023 00.30, Christian König wrote:
> Am 08.03.23 um 15:53 schrieb Asahi Lina:
>> [SNIP]
>>> The background is that core memory management requires that signaling a
>>> fence only depends on signaling other fences and hardware progress and
>>> nothing
On 08/03/2023 19.03, Christian König wrote:
> Am 08.03.23 um 10:57 schrieb Maarten Lankhorst:
>>
>> On 2023-03-07 15:25, Asahi Lina wrote:
>>> drm_sched_fini() currently leaves any pending jobs dangling, which
>>> causes segfaults and other badness when job complet
On 08/03/2023 19.00, Christian König wrote:
> Am 08.03.23 um 10:41 schrieb Asahi Lina:
>> On 08/03/2023 17.46, Christian König wrote:
>>> Am 07.03.23 um 15:25 schrieb Asahi Lina:
>>>> Some hardware may require more complex resource utilization accounting
>>>&
On 08/03/2023 17.46, Christian König wrote:
> Am 07.03.23 um 15:25 schrieb Asahi Lina:
>> Some hardware may require more complex resource utilization accounting
>> than the simple job count supported by drm_sched internally. Add a
>> can_run_job callback to allow drivers to
That was supposed to have Markdown-style section headings, but I forgot
that b4 considers a leading # as a comment... sorry for the abrupt topic
changes...
The intended headings are below.
On 07/03/2023 23.25, Asahi Lina wrote:
> Hi everyone!
>
> This is my first take on the Rust abs
This macro allows Rust code to build multiple versions of the same code,
conditionally including certain fields or code segments.
The asahi driver uses this to support multiple GPU types and firmware
revisions in the same codebase, without duplicating everything.
Signed-off-by: Asahi Lina
Add the Asahi UAPI to bindings_helper.h so Rust code can use it.
Signed-off-by: Asahi Lina
---
rust/bindings/bindings_helper.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h
index dc01be08676e..e21c87e6d317 100644
--- a/rust
Adds the Asahi GPU driver UAPI. Note: this API is not yet stable and
therefore not ready for merging!
Signed-off-by: Asahi Lina
---
include/uapi/drm/asahi_drm.h | 556 +++
1 file changed, 556 insertions(+)
diff --git a/include/uapi/drm/asahi_drm.h b
This allows drivers to control whether a given GEM object is allowed to
be exported via PRIME to other drivers.
---
rust/kernel/drm/gem/mod.rs | 7 +++
1 file changed, 7 insertions(+)
diff --git a/rust/kernel/drm/gem/mod.rs b/rust/kernel/drm/gem/mod.rs
index e66bdef35c2e..196252a25b5a 100644
.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/drm_gem.c | 1 +
drivers/gpu/drm/drm_prime.c | 5 +
include/drm/drm_gem.h | 8
3 files changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 7a3cb08dc942..152ad9295a8d 100644
--- a
The GPU scheduler manages scheduling GPU jobs and dependencies between
them. This Rust abstraction allows Rust DRM drivers to use this
functionality.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/Kconfig | 5 +
rust/bindings/bindings_helper.h | 1 +
rust/helpers.c
abstraction for
drm_sched, without having to externally duplicate the tracking of
in-flight jobs.
This shouldn't regress any existing drivers, since calling
drm_sched_fini() with any pending jobs is broken and this change should
be a no-op if there are no pending jobs.
Signed-off-by: Asahi
Some hardware may require more complex resource utilization accounting
than the simple job count supported by drm_sched internally. Add a
can_run_job callback to allow drivers to implement more logic before
deciding whether to run a GPU job.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm
DRM Sync Objects are a container for a DMA fence, and can be waited on
signaled, exported, and imported from userspace. Add a Rust abstraction
so Rust DRM drivers can support this functionality.
Signed-off-by: Asahi Lina
---
rust/bindings/bindings_helper.h | 1 +
rust/helpers.c
for initialization.
TODO: Expose this to the user at some point with a safe abstraction.
Signed-off-by: Asahi Lina
---
rust/bindings/bindings_helper.h | 2 +
rust/helpers.c | 53
rust/kernel/dma_fence.rs| 532
rust/kernel
drm_mm provides a simple range allocator, useful for managing virtual
address ranges. Add a Rust abstraction to expose this module to Rust
drivers.
Signed-off-by: Asahi Lina
---
rust/kernel/drm/mm.rs | 309 +
rust/kernel/drm/mod.rs | 1 +
2
The DRM shmem helper includes common code useful for drivers which
allocate GEM objects as anonymous shmem. Add a Rust abstraction for
this. Drivers can choose the raw GEM implementation or the shmem layer,
depending on their needs.
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/Kconfig
There doesn't seem to be a way for the Rust bindings to get a
compile-time constant reference to drm_gem_shmem_vm_ops, so we need to
duplicate that structure in Rust... this isn't nice...
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 9 ++---
i
The DRM GEM subsystem is the DRM memory management subsystem used by
most modern drivers. Add a Rust abstraction to allow Rust DRM driver
implementations to use it.
Signed-off-by: Asahi Lina
---
rust/bindings/bindings_helper.h | 1 +
rust/helpers.c | 23 +++
rust/kernel/drm
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.
Signed-off-by: Asahi Lina
---
rust/bindings/bindings_helper.h | 1 +
rust
Add the initial abstractions for DRM drivers and devices. These go
together in one commit since they are fairly tightly coupled types.
A few things have been stubbed out, to be implemented as further bits of
the DRM subsystem are introduced.
Signed-off-by: Asahi Lina
---
rust/bindings
not fail to compile on its own, if
not called).
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/Kconfig | 7 ++
rust/bindings/bindings_helper.h | 2 +
rust/kernel/drm/ioctl.rs| 147
rust/kernel/drm/mod.rs | 5 ++
rust/kernel
x/20230224-rust-arc-v1-0-568eea613...@asahilina.net/T/
[10] https://github.com/AsahiLinux/docs/wiki/SW:AGX-driver-notes
Signed-off-by: Asahi Lina
---
Asahi Lina (18):
rust: drm: ioctl: Add DRM ioctl abstraction
rust: drm: Add Device and Driver abstractions
rust: drm: file: Add
On 27/02/2023 17.04, Thomas Zimmermann wrote:
> Hi
>
> Am 27.02.23 um 08:55 schrieb Asahi Lina:
>> On 27/02/2023 16.45, Thomas Zimmermann wrote:
>>> Hi
>>>
>>> Am 25.02.23 um 22:51 schrieb Dmitry Osipenko:
>>>> On 2/
s_sgt()")
Signed-off-by: Asahi Lina
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c
b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 7e5c6a8d0212..75185a960fc4 100644
--- a/drive
On 27/02/2023 16.45, Thomas Zimmermann wrote:
> Hi
>
> Am 25.02.23 um 22:51 schrieb Dmitry Osipenko:
>> On 2/5/23 15:51, Asahi Lina wrote:
>>> -EXPORT_SYMBOL_GPL(drm_gem_shmem_get_pages_sgt);
>>> +EXPORT_SYMBOL(drm_gem_shmem_get_pages_sgt);
>>
>> No
Sorry, I accidentally sent this reply offlist! Resending, my apologies...
On 07/02/2023 20.29, Thomas Zimmermann wrote:
> Hi
>
> Am 05.02.23 um 13:51 schrieb Asahi Lina:
>> Other functions touching shmem->sgt take the pages lock, so do that here
>
> Really? I was just lo
1 - 100 of 102 matches
Mail list logo