[kwin] [Bug 432264] In multi-monitor setups with differenlty scaled displays, Context menus have items which are invisible until hovered

2023-11-24 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=432264 --- Comment #66 from Asahi Lina --- > That's right, it's not. :) Unfortunately not every Qt 6 change is feasible > to backport to the KDE Qt5 patch collection. That's kind of unfortunate... this bug is pretty ugly for anyone using multi-

[kwin] [Bug 432264] In multi-monitor setups with differenlty scaled displays, Context menus have items which are invisible until hovered

2023-11-24 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=432264 --- Comment #64 from Asahi Lina --- (In reply to indx from comment #63) > (In reply to Asahi Lina from comment #62) > > Is this tracked upstream in Qt somewhere, especially for Qt 5? I don't see > > any activity in the bugs that were

[kwin] [Bug 432264] In multi-monitor setups with differenlty scaled displays, Context menus have items which are invisible until hovered

2023-11-24 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=432264 Asahi Lina changed: What|Removed |Added CC||l...@asahilina.net --- Comment #62 from Asahi

[kwin] [Bug 477451] Outputs freeze on multi-screen when hardware cursors are not supported

2023-11-24 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=477451 Asahi Lina changed: What|Removed |Added Platform|Other |Fedora RPMs -- You are receiving this mail

[kwin] [Bug 477455] Software cursor repaints are glitchy with fractional scaling sometimes

2023-11-24 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=477455 Asahi Lina changed: What|Removed |Added Platform|Other |Fedora RPMs -- You are receiving this mail

[kwin] [Bug 477454] Root background damage regions are calculated incorrectly with multiscreen

2023-11-24 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=477454 Asahi Lina changed: What|Removed |Added Platform|Other |Fedora RPMs -- You are receiving this mail

[kwin] [Bug 477455] New: Software cursor repaints are glitchy with fractional scaling sometimes

2023-11-24 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=477455 Bug ID: 477455 Summary: Software cursor repaints are glitchy with fractional scaling sometimes Classification: Plasma Product: kwin Version: 5.27.9 Platform: Other

[kwin] [Bug 477454] New: Root background damage regions are calculated incorrectly with multiscreen

2023-11-24 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=477454 Bug ID: 477454 Summary: Root background damage regions are calculated incorrectly with multiscreen Classification: Plasma Product: kwin Version: 5.27.9 Platform: Other

[kwin] [Bug 477451] New: Outputs freeze on multi-screen when hardware cursors are not supported

2023-11-24 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=477451 Bug ID: 477451 Summary: Outputs freeze on multi-screen when hardware cursors are not supported Classification: Plasma Product: kwin Version: 5.27.9 Platform: Other

[systemsettings] [Bug 465384] Support a way to set a preference for CJK character variants (Han unification) in KCM or derive it automatically

2023-11-20 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=465384 --- Comment #11 from Asahi Lina --- Also an unrelated note for other people who end up here: Firefox uses its own logic for this and you have to edit the `font.cjk_pref_fallback_order` pref to change the CJK fallback order. It's a bit unfortunate

[systemsettings] [Bug 465384] Support a way to set a preference for CJK character variants (Han unification) in KCM or derive it automatically

2023-11-20 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=465384 Asahi Lina changed: What|Removed |Added CC||l...@asahilina.net --- Comment #10 from Asahi

[FFmpeg-devel] [PATCH] avdevice/v4l2: Switch to wrapped AVFrames and implement strides

2023-09-29 Thread Asahi Lina via ffmpeg-devel
esolutions like 1080x1920, which require stride padding to a multiple of 64 bytes. In principle, this could be extended to support the V4L2 multiplanar API, though there seem to be practically no capture (not M2M) drivers that support this, so it's not terribly useful right now. Signed-off-by:

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-21 Thread Asahi Lina
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

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-17 Thread Asahi Lina
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

Re: [PATCH 3/3] drm/scheduler: Clean up jobs when the scheduler is torn down.

2023-07-17 Thread Asahi Lina
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

Re: [PATCH 3/3] drm/scheduler: Clean up jobs when the scheduler is torn down.

2023-07-16 Thread Asahi Lina
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

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Asahi Lina
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

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Asahi Lina
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't

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread 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 outlive its scheduler, since fences are independencly reference counted. Therefore, we can't

Re: [PATCH 1/3] drm/scheduler: Add more documentation

2023-07-14 Thread Asahi Lina
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

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread 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't reference the scheduler in the get_timeline_name() implementation. Fixes oopses

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread 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't reference the scheduler in the get_timeline_name() implementation. Fixes oopses

Re: [PATCH 1/3] drm/scheduler: Add more documentation

2023-07-14 Thread 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 resource acquisition should be handled. Signed-off-by: Asahi Lina --- drivers/gpu

[PATCH 1/3] drm/scheduler: Add more documentation

2023-07-14 Thread 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/drm/scheduler/sched_main.c | 58 -- 1 file changed, 55

[PATCH 0/3] DRM scheduler documentation & bug fixes

2023-07-14 Thread Asahi Lina
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_fence_get_timeline_name drm/scheduler: Clean up jobs when

[PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Asahi Lina
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/gpu/drm

[PATCH 3/3] drm/scheduler: Clean up jobs when the scheduler is torn down.

2023-07-14 Thread Asahi Lina
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 Lina

Re: [RFC PATCH 00/10] Xe DRM scheduler and long running workload plans

2023-04-11 Thread Asahi Lina
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

Re: [RFC PATCH 00/10] Xe DRM scheduler and long running workload plans

2023-04-08 Thread Asahi Lina
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

Re: [Regression] drm/scheduler: track GPU active time per entity

2023-04-06 Thread Asahi Lina
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

Re: [Linaro-mm-sig] Re: [PATCH RFC 07/18] rust: drm: mm: Add DRM MM Range Allocator abstraction

2023-04-06 Thread Asahi Lina
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

Re: [PATCH RFC 09/18] rust: drm: syncobj: Add DRM Sync Object abstraction

2023-04-06 Thread Asahi Lina
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

Re: [PATCH RFC 07/18] rust: drm: mm: Add DRM MM Range Allocator abstraction

2023-04-06 Thread Asahi Lina
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

Re: [Linaro-mm-sig] Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-06 Thread Asahi Lina
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

Re: [Regression] drm/scheduler: track GPU active time per entity

2023-04-06 Thread Asahi Lina
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

Re: [PATCH] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-04-06 Thread Asahi Lina
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

Re: [Linaro-mm-sig] Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-06 Thread Asahi Lina
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

Re: [Linaro-mm-sig] Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-06 Thread Asahi Lina
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

Re: [Regression] drm/scheduler: track GPU active time per entity

2023-04-06 Thread Asahi Lina
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

Re: [PATCH] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-04-06 Thread Asahi Lina
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

Re: [PATCH] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-04-06 Thread Asahi Lina
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

Re: [Regression] drm/scheduler: track GPU active time per entity

2023-04-06 Thread Asahi Lina
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

Re: [PATCH] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-04-06 Thread 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 actually not correct. Schedulers are supposed to stay around until the hw they have been

Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-05 Thread Asahi Lina
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

Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-05 Thread Asahi Lina
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 incrementi

Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-05 Thread Asahi Lina
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: , handle: u32) -> Result { +Ok(ObjectRef::new(shmem::Object::lookup_han

Re: [PATCH RFC 18/18] drm/asahi: Add the Asahi driver for Apple AGX GPUs

2023-04-05 Thread Asahi Lina
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

[PATCH] drm/scheduler: Fix UAF race in drm_sched_entity_push_job()

2023-04-05 Thread Asahi Lina
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/scheduler

[PATCH] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-04-05 Thread Asahi Lina
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/gpu/drm

Re: [RFC PATCH 00/10] Xe DRM scheduler and long running workload plans

2023-04-03 Thread Asahi Lina
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.

Re: [PATCH RFC 11/18] drm/scheduler: Clean up jobs when the scheduler is torn down

2023-03-10 Thread Asahi Lina
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 tons of

Re: [PATCH RFC 10/18] drm/scheduler: Add can_run_job callback

2023-03-10 Thread Asahi Lina
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

Re: [PATCH RFC 01/18] rust: drm: ioctl: Add DRM ioctl abstraction

2023-03-09 Thread Asahi Lina
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

Re: [PATCH RFC 03/18] rust: drm: file: Add File abstraction

2023-03-09 Thread Asahi Lina
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

Re: [PATCH RFC 06/18] rust: drm: gem: shmem: Add DRM shmem helper abstraction

2023-03-09 Thread Asahi Lina
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

Re: [PATCH RFC 11/18] drm/scheduler: Clean up jobs when the scheduler is torn down

2023-03-09 Thread Asahi Lina
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

Re: [PATCH RFC 11/18] drm/scheduler: Clean up jobs when the scheduler is torn down

2023-03-09 Thread 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.23 um 18:32 schrieb Asahi Lina: >>>> [SNIP] >>>> Yes but... none of this cleans up jobs that are already

Re: [PATCH RFC 10/18] drm/scheduler: Add can_run_job callback

2023-03-09 Thread Asahi Lina
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 compl

Re: [PATCH RFC 10/18] drm/scheduler: Add can_run_job callback

2023-03-08 Thread 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 completes, which >> as I keep saying is the same logic used for >> hw_rq_count/hw_submission_limit tracking. > > As the documentation to

Re: [PATCH RFC 02/18] rust: drm: Add Device and Driver abstractions

2023-03-08 Thread Asahi Lina
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

Re: [PATCH RFC 01/18] rust: drm: ioctl: Add DRM ioctl abstraction

2023-03-08 Thread Asahi Lina
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

Re: [PATCH RFC 01/18] rust: drm: ioctl: Add DRM ioctl abstraction

2023-03-08 Thread Asahi Lina
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

Re: [PATCH RFC 06/18] rust: drm: gem: shmem: Add DRM shmem helper abstraction

2023-03-08 Thread Asahi Lina
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

Re: [PATCH RFC 10/18] drm/scheduler: Add can_run_job callback

2023-03-08 Thread Asahi Lina
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 >>> use

Re: [PATCH RFC 11/18] drm/scheduler: Clean up jobs when the scheduler is torn down

2023-03-08 Thread 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 submitted by the >> scheduler and in its pending list, with registered completion callbacks, >> which were already

Re: [PATCH RFC 10/18] drm/scheduler: Add can_run_job callback

2023-03-08 Thread Asahi Lina
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 requi

Re: [PATCH RFC 11/18] drm/scheduler: Clean up jobs when the scheduler is torn down

2023-03-08 Thread Asahi Lina
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

Re: [PATCH RFC 11/18] drm/scheduler: Clean up jobs when the scheduler is torn down

2023-03-08 Thread Asahi Lina
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

Re: [PATCH RFC 10/18] drm/scheduler: Add can_run_job callback

2023-03-08 Thread 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 that signaling a >>> fence only depends on signaling other fences and hardware progress and >>> nothing

Re: [PATCH RFC 11/18] drm/scheduler: Clean up jobs when the scheduler is torn down

2023-03-08 Thread 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() currently leaves any pending jobs dangling, which >>> causes segfaults and other badness when job complet

Re: [PATCH RFC 10/18] drm/scheduler: Add can_run_job callback

2023-03-08 Thread Asahi Lina
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 >>&g

Re: [PATCH RFC 10/18] drm/scheduler: Add can_run_job callback

2023-03-08 Thread 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 >> than the simple job count supported by drm_sched internally. Add a >> can_run_job callback to allow drivers to

Re: [PATCH RFC 00/18] Rust DRM subsystem abstractions (& preview AGX driver)

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 17/18] rust: macros: Add versions macro

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 16/18] rust: bindings: Bind the Asahi DRM UAPI

2023-03-07 Thread 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

[PATCH RFC 15/18] drm/asahi: Add the Asahi driver UAPI [DO NOT MERGE]

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 14/18] rust: drm: gem: Add set_exportable() method

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 13/18] drm/gem: Add a flag to control whether objects can be exported

2023-03-07 Thread Asahi Lina
. 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

[PATCH RFC 12/18] rust: drm: sched: Add GPU scheduler abstraction

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 11/18] drm/scheduler: Clean up jobs when the scheduler is torn down

2023-03-07 Thread Asahi Lina
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 Lina

[PATCH RFC 10/18] drm/scheduler: Add can_run_job callback

2023-03-07 Thread 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 implement more logic before deciding whether to run a GPU job. Signed-off-by: Asahi Lina --- drivers/gpu/drm

[PATCH RFC 09/18] rust: drm: syncobj: Add DRM Sync Object abstraction

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 08/18] rust: dma_fence: Add DMA Fence abstraction

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 07/18] rust: drm: mm: Add DRM MM Range Allocator abstraction

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 06/18] rust: drm: gem: shmem: Add DRM shmem helper abstraction

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 05/18] drm/gem-shmem: Export VM ops functions

2023-03-07 Thread Asahi Lina
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 ++--- include/drm

[PATCH RFC 04/18] rust: drm: gem: Add GEM object abstraction

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 03/18] rust: drm: file: Add File abstraction

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 02/18] rust: drm: Add Device and Driver abstractions

2023-03-07 Thread Asahi Lina
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

[PATCH RFC 01/18] rust: drm: ioctl: Add DRM ioctl abstraction

2023-03-07 Thread Asahi Lina
(but it will 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

[PATCH RFC 00/18] Rust DRM subsystem abstractions (& preview AGX driver)

2023-03-07 Thread Asahi Lina
[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 File abstraction rust: drm: gem: Add GEM object a

Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()

2023-02-27 Thread Asahi Lina
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/

[PATCH] drm/shmem-helper: Revert accidental non-GPL export

2023-02-27 Thread Asahi Lina
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

Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()

2023-02-26 Thread Asahi Lina
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

Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()

2023-02-07 Thread Asahi Lina
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

Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()

2023-02-07 Thread Asahi Lina
On 07/02/2023 03.47, Javier Martinez Canillas wrote: > Hello Lina, > > On 2/5/23 13:51, Asahi Lina wrote: >> Other functions touching shmem->sgt take the pages lock, so do that here >> too. drm_gem_shmem_get_pages() & co take the same lock, so move to the >> _lo

[PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()

2023-02-05 Thread Asahi Lina
Add library for shmem backed GEM objects") Fixes: 4fa3d66f132b ("drm/shmem: Do dma_unmap_sg before purging pages") Signed-off-by: Asahi Lina --- drivers/gpu/drm/drm_gem_shmem_helper.c | 54 -- 1 file changed, 34 insertions(+), 20 deletions(-) d

[kwin] [Bug 462811] New: Software cursor on Wayland causes artifacts over blurred surfaces

2022-12-09 Thread Asahi Lina
https://bugs.kde.org/show_bug.cgi?id=462811 Bug ID: 462811 Summary: Software cursor on Wayland causes artifacts over blurred surfaces Classification: Plasma Product: kwin Version: 5.26.4 Platform: Archlinux