Re: [PATCH] drm/amdgpu: Replace HQD terminology with slots naming

2025-07-04 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, Jul 4, 2025 at 3:43 AM Jesse Zhang wrote: > The term "HQD" is CP-specific and doesn't > accurately describe the queue resources for other IP blocks like SDMA, > VCN, or VPE. This change: > > 1. Renames `num_hqds` to `num_sl

Re: [PATCH v2] drm/amdgpu: check a user-provided number of BOs in list

2025-04-28 Thread Marek Olšák
USHRT_MAX seems too low. Traces for workstation apps create 20-30k BOs, which is not very far from the limit. RADV doesn't suballocate BOs. Neither GL nor VK has a ilmit on the number of BOs that can be created. The hypothetical maximum number of BOs that can be allocated on a GPU with 32GB of addr

Re: [PATCH v2] drm/amdgpu: Add queue id support to the user queue wait IOCTL

2025-04-14 Thread Marek Olšák
On Mon, Apr 14, 2025 at 7:33 AM Christian König wrote: > Am 12.04.25 um 10:03 schrieb Arunpravin Paneer Selvam: > > Add queue id support to the user queue wait IOCTL > > drm_amdgpu_userq_wait structure. > > > > This is required to retrieve the wait user queue and maintain > > the fence driver ref

Re: [PATCH 1/2] drm/amdgpu: add UAPI to query if user queues are supported

2025-04-06 Thread Marek Olšák
Reviewed-by: Marek Olšák For both patches. Marek On Mon, Mar 24, 2025 at 4:34 PM Alex Deucher wrote: > Add an INFO query to check if user queues are supported. > > v2: switch to a mask of IPs (Marek) > v3: move to drm_amdgpu_info_device (Marek) > > Cc: marek.ol...@amd.

Re: [PATCH] drm/amdgpu: add UAPI to query if user queues are supported

2025-03-23 Thread Marek Olšák
Adding it into drm_amdgpu_info_device with a DRM version bump is better. Marek On Fri, Mar 21, 2025 at 4:54 PM Alex Deucher wrote: > I can move it into device_info if that's better. > > Alex > > On Fri, Mar 21, 2025 at 3:42 PM Marek Olšák wrote: > > > > This

Re: [PATCH] drm/amdgpu: add UAPI to query if user queues are supported

2025-03-21 Thread Marek Olšák
This is not in device_info, but it'll do. Reviewed-by: Marek Olšák Marek On Mon, Mar 17, 2025 at 5:38 PM Alex Deucher wrote: > Add an INFO query to check if user queues are supported. > > v2: switch to a mask of IPs (Marek) > > Cc: marek.ol...@amd.com > Cc: p

Re: [PATCH] drm/amdgpu: add UAPI to query if user queues are supported

2025-03-17 Thread Marek Olšák
I would prefer a bitmask of supported UQ IPs in device info, but this is fine too. Reviewed-by: Marek Olšák Marek On Mon, Mar 17, 2025 at 3:23 PM Alex Deucher wrote: > Add an INFO query to check if user queues are supported. > > Cc: marek.ol...@amd.com > Cc: prike.li...@

Re: [PATCH 02/11] drm/amdgpu: add ring flag for no user submissions

2025-03-17 Thread Marek Olšák
On Mon, Mar 17, 2025 at 2:27 PM Alex Deucher wrote: > On Mon, Mar 17, 2025 at 1:23 PM Marek Olšák wrote: > > > > Userspace needs a query that a queue IP type is supported. > "available_rings" is used for that right now, but if that's 0, somethin

Re: [PATCH 02/11] drm/amdgpu: add ring flag for no user submissions

2025-03-17 Thread Marek Olšák
Userspace needs a query that a queue IP type is supported. "available_rings" is used for that right now, but if that's 0, something else must indicate IP support. amd_ip_info::num_queues should be non-zero even when user queues are supported. The exact number doesn't matter with user queues. Mare

[PATCH] drm/amd/display: allow 256B DCC max compressed block sizes on gfx12

2025-03-07 Thread Marek Olšák
The hw supports it. Signed-off-by: Marek Olšák --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) From 02f89c11dca69c6555f8bad75c84b50126c53554 Mon Sep 17 00:00:00

Re: [PATCH] drm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M

2025-03-03 Thread Marek Olšák
Reviewed-by: Marek Olšák On Tue, Jun 18, 2019 at 3:19 AM Richard Thier wrote: > num_gb_pipes was set to a wrong value using r420_pipe_config > > This have lead to HyperZ glitches on fast Z clearing. > > See: https://bugs.freedesktop.org/show_bug.cgi?id=110897 > > Signed-

Re: [PATCH] drm/amdgpu: add a BO metadata flag to disable write compression for Vulkan

2025-01-29 Thread Marek Olšák
Ping. This is urgent. Marek On Mon, Jan 27, 2025 at 10:52 AM Marek Olšák wrote: > Updated patch attached. > > Vulkan can't support DCC and Z/S compression on GFX12 without this. > > Marek > > On Fri, Jan 24, 2025 at 10:15 AM Marek Olšák wrote: > >> Require

Re: [PATCH] drm/amdgpu: add a BO metadata flag to disable write compression for Vulkan

2025-01-27 Thread Marek Olšák
Updated patch attached. Vulkan can't support DCC and Z/S compression on GFX12 without this. Marek On Fri, Jan 24, 2025 at 10:15 AM Marek Olšák wrote: > Required by Vulkan because it can allocate whole VRAM as 1 BO and parts > of it bypass compression and read raw data. > &

Re: [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs

2025-01-24 Thread Marek Olšák
So it's implemented but not enabled by default, right? Marek On Fri, Jan 24, 2025 at 12:40 PM Alex Deucher wrote: > On Fri, Jan 24, 2025 at 12:38 PM SRINIVASAN SHANMUGAM > wrote: > > > > > > On 1/24/2025 10:01 PM, Marek Olšák wrote: > > > > Does this

Re: [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs

2025-01-24 Thread Marek Olšák
Does this commit really enable it though? Or is it just for sysfs? Marek On Fri, Jan 24, 2025 at 1:42 AM Srinivasan Shanmugam < srinivasan.shanmu...@amd.com> wrote: > Enable the cleaner shader for GFX10.1.1/10.1.2 GPUs to provide data > isolation between GPU workloads. The cleaner shader is resp

[PATCH] drm/amdgpu: add a BO metadata flag to disable write compression for Vulkan

2025-01-24 Thread Marek Olšák
Required by Vulkan because it can allocate whole VRAM as 1 BO and parts of it bypass compression and read raw data. Signed-off-by: Marek Olšák From 98d5342d1b6f247fc6addca48febf0334a445bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 24 Jan 2025 09:43:45 -0500

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2025-01-21 Thread Marek Olšák
On Mon, Jan 20, 2025 at 1:41 PM Simona Vetter wrote: > On Mon, Jan 20, 2025 at 08:58:20AM +0100, Thomas Zimmermann wrote: > > Hi > > > > > > Am 18.01.25 um 03:37 schrieb Marek Olšák: > > [...] > > > > > > 3) Implementing DRM_FORMAT_MOD_LINEAR as

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2025-01-17 Thread Marek Olšák
15, 2025 at 12:20:07PM +, Daniel Stone wrote: > > On Wed, 15 Jan 2025 at 04:05, Marek Olšák wrote: > > > On Tue, Jan 14, 2025 at 12:58 PM Daniel Stone > wrote: > > >> AMD hardware is the only hardware I know of which doesn't support > > >> overalig

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2025-01-14 Thread Marek Olšák
On Tue, Jan 14, 2025 at 1:34 PM Faith Ekstrand wrote: > On January 14, 2025 03:39:45 Marek Olšák wrote: > >> I would keep the existing modifier interfaces, API extensions, and >> expectations the same as today for simplicity. >> >> The new linear modifier definit

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2025-01-14 Thread Marek Olšák
On Tue, Jan 14, 2025 at 12:58 PM Daniel Stone wrote: > Hi, > > On Tue, 14 Jan 2025 at 09:38, Marek Olšák wrote: > > I would keep the existing modifier interfaces, API extensions, and > expectations the same as today for simplicity. > > Well yes, not just for simplicity

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2025-01-14 Thread Marek Olšák
On Tue, Jan 14, 2025 at 12:55 PM James Jones wrote: > I don't see how that fits in the current modifier usage patterns. I'm > not clear how applications are supposed to programmatically "look at the > modifiers of other drivers to find commonalities," nor how that "keeps > "expectations the same

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2025-01-14 Thread Marek Olšák
I would keep the existing modifier interfaces, API extensions, and expectations the same as today for simplicity. The new linear modifier definition (proposal) will have these fields: 5 bits for log2 pitch alignment in bytes 5 bits for log2 height alignment in rows 5 bits for log2 offset

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-24 Thread Marek Olšák
On Fri, Dec 20, 2024 at 10:24 AM Simona Vetter wrote: > On Thu, Dec 19, 2024 at 05:09:33PM +0100, Michel Dänzer wrote: > > On 2024-12-19 10:02, Daniel Stone wrote: > > > > > > How this would be used in practice is also way too underdocumented. We > > > need to document that exact-round-up 64b is

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-20 Thread Marek Olšák
> > * Modifiers must uniquely encode buffer layout. In other words, a buffer > must > * match only a single modifier. > That sentence is misleading and impossible to meet. Specifications are sometimes changed to reflect the overwhelming reality. Multiple modifiers can represent identical layouts

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-19 Thread Marek Olšák
On Thu, Dec 19, 2024 at 5:32 AM Brian Starkey wrote: > On Wed, Dec 18, 2024 at 09:53:56PM +0000, Marek Olšák wrote: > > On Wed, Dec 18, 2024 at 5:32 AM Brian Starkey > wrote: > > > > > On Wed, Dec 18, 2024 at 11:24:58AM +, Simona Vetter wrote: > > > >

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-18 Thread Marek Olšák
On Wed, Dec 18, 2024 at 5:32 AM Brian Starkey wrote: > On Wed, Dec 18, 2024 at 11:24:58AM +, Simona Vetter wrote: > > > > For that reason I think linear modifiers with explicit pitch/size > > alignment constraints is a sound concept and fits into how modifiers work > > overall. > > -Sima > >

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-16 Thread Marek Olšák
On Mon, Dec 16, 2024 at 9:53 AM Simona Vetter wrote: > On Mon, Dec 16, 2024 at 11:46:13AM +0100, Lucas Stach wrote: > > Am Montag, dem 16.12.2024 um 10:27 +0100 schrieb Michel Dänzer: > > > On 2024-12-15 21:53, Marek Olšák wrote: > > > > The com

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-16 Thread Marek Olšák
On Mon, Dec 16, 2024 at 5:46 AM Lucas Stach wrote: > Am Montag, dem 16.12.2024 um 10:27 +0100 schrieb Michel Dänzer: > > On 2024-12-15 21:53, Marek Olšák wrote: > > > The comment explains the problem with DRM_FORMAT_MOD_LINEAR. > > > > > > Signed-off-

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-16 Thread Marek Olšák
On Mon, Dec 16, 2024 at 4:28 AM Dmitry Baryshkov < dmitry.barysh...@linaro.org> wrote: > On Mon, Dec 16, 2024 at 12:40:54AM -0500, Marek Olšák wrote: > > git send-email (or rather the way it sends email) has been banned by > gmail > > due to being considered unsecure. I

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-16 Thread Marek Olšák
On Mon, Dec 16, 2024 at 4:27 AM Michel Dänzer wrote: > On 2024-12-15 21:53, Marek Olšák wrote: > > The comment explains the problem with DRM_FORMAT_MOD_LINEAR. > > > > Signed-off-by: Marek Olšák marek.ol...@amd.com>> > > > > diff --git a/include/uap

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-15 Thread Marek Olšák
> > You should really just be using git send-email. > > On 12/15/24 11:57 PM, Marek Olšák wrote: > > Only for you: Attached. > > > > Marek > > > > On Sun, Dec 15, 2024 at 6:37 PM Joshua Ashton > <mailto:jos...@froggi.es>> wrote: > > > &g

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-15 Thread Marek Olšák
Only for you: Attached. Marek On Sun, Dec 15, 2024 at 6:37 PM Joshua Ashton wrote: > You should just re-send the whole patch, probably. > > On 12/15/24 8:54 PM, Marek Olšák wrote: > > Missed 2 lines from the diff: > > > > +#define DRM_FORMAT_MOD_LINEAR_PITCH_ALIGN_1

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-15 Thread Marek Olšák
Missed 2 lines from the diff: +#define DRM_FORMAT_MOD_LINEAR_PITCH_ALIGN_128B fourcc_mod_code(NONE, 2) +#define DRM_FORMAT_MOD_LINEAR_PITCH_ALIGN_256B fourcc_mod_code(NONE, 3) Marek On Sun, Dec 15, 2024 at 3:53 PM Marek Olšák wrote: > The comment explains the problem w

[PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-15 Thread Marek Olšák
The comment explains the problem with DRM_FORMAT_MOD_LINEAR. Signed-off-by: Marek Olšák diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index 78abd819fd62e..8ec4163429014 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -484,9 +484,27

Re: [PATCH] drm/fourcc: add AMD_FMT_MOD_TILE_GFX9_4K_D_X

2024-10-25 Thread Marek Olšák
Reviewed-by: Marek Olšák BTW, we don't have to define everything here. We can use most of the 32 values freely. Marek On Fri, Oct 25, 2024 at 2:03 AM Qiang Yu wrote: > > From: Qiang Yu > > This is used when radeonsi export small texture's modifier > to user with eglE

Re: [PATCH v4 09/09] drm/amdgpu: Add separate array of read and write for BO handles

2024-10-15 Thread Marek Olšák
Selvam > Acked-by: Christian König > Suggested-by: Marek Olšák > Suggested-by: Christian König > --- > .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 238 +- > include/uapi/drm/amdgpu_drm.h | 48 ++-- > 2 files changed, 206 insertions(+), 8

Re: [PATCH] drm/amdgpu: bump driver version for cleared VRAM

2024-09-26 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Thu, Sep 26, 2024 at 10:02 AM Alex Deucher wrote: > > On Thu, Sep 26, 2024 at 10:00 AM Marek Olšák wrote: > > > > Is GTT cleared too? > > GTT has always been cleared since it's system memory. > > Alex > > > > >

Re: [PATCH] drm/amdgpu: bump driver version for cleared VRAM

2024-09-26 Thread Marek Olšák
Is GTT cleared too? Marek On Thu, Sep 26, 2024, 09:53 Alex Deucher wrote: > Ping? > > On Fri, Sep 6, 2024 at 2:04 PM Alex Deucher > wrote: > > > > Driver now clears VRAM on allocation. Bump the > > driver version so mesa knows when it will get > > cleared vram by default. > > > > Signed-off-b

Re: [PATCH] drm/amdgpu: always allocate cleared VRAM for GEM allocations

2024-09-06 Thread Marek Olšák
On Fri, Sep 6, 2024 at 1:53 PM Alex Deucher wrote: > > On Fri, Sep 6, 2024 at 10:18 AM Marek Olšák wrote: > > > > Can you also bump the DRM version, so that userspace knows when to > > skip its own clear? > > Sure, although going forward, it might be better to migr

Re: [PATCH] drm/amdgpu: always allocate cleared VRAM for GEM allocations

2024-09-06 Thread Marek Olšák
Can you also bump the DRM version, so that userspace knows when to skip its own clear? Also, clearing with SDMA takes up to 33 times more time (= is up to 97% slower) than clearing with compute. Marek On Thu, Aug 29, 2024 at 2:23 PM Paneer Selvam, Arunpravin wrote: > > this will fix performance

Re: [PATCH] drm/amdgpu: optimize the padding with hw optimization

2024-08-07 Thread Marek Olšák
On Wed, Aug 7, 2024 at 4:21 AM Tvrtko Ursulin wrote: > > > On 04/08/2024 19:11, Marek Olšák wrote: > > On Thu, Aug 1, 2024 at 2:55 PM Marek Olšák wrote: > >> > >> On Thu, Aug 1, 2024, 03:37 Christian König > >> wrote: > >>> > >>

Re: [PATCH] drm/amdgpu: optimize the padding with hw optimization

2024-08-04 Thread Marek Olšák
On Thu, Aug 1, 2024 at 2:55 PM Marek Olšák wrote: > > On Thu, Aug 1, 2024, 03:37 Christian König wrote: >> >> Am 01.08.24 um 08:53 schrieb Marek Olšák: >> >> On Thu, Aug 1, 2024, 00:28 Khatri, Sunil wrote: >>> >>> >>> On 8/1/2024 8:49 AM

Re: [PATCH] drm/amdgpu: optimize the padding with hw optimization

2024-08-03 Thread Marek Olšák
On Fri, Aug 2, 2024 at 6:10 AM Lazar, Lijo wrote: > > > > On 8/2/2024 12:25 AM, Marek Olšák wrote: > > On Thu, Aug 1, 2024, 03:37 Christian König > <mailto:christian.koe...@amd.com>> wrote: > > > > __ > > Am 01.08.24 um 08:53 schrieb

Re: [PATCH] drm/amdgpu: optimize the padding with hw optimization

2024-08-01 Thread Marek Olšák
On Thu, Aug 1, 2024, 03:37 Christian König wrote: > Am 01.08.24 um 08:53 schrieb Marek Olšák: > > On Thu, Aug 1, 2024, 00:28 Khatri, Sunil wrote: > >> >> On 8/1/2024 8:49 AM, Marek Olšák wrote: >> >> + /* Header is at index 0, followed by num_nops - 1

Re: [PATCH] drm/amdgpu: optimize the padding with hw optimization

2024-07-31 Thread Marek Olšák
On Thu, Aug 1, 2024, 00:28 Khatri, Sunil wrote: > > On 8/1/2024 8:49 AM, Marek Olšák wrote: > > On Tue, Jul 30, 2024 at 8:43 AM Sunil Khatri > wrote: > >> Adding NOP packets one by one in the ring > >> does not use the CP efficiently. > >> > >&

Re: [PATCH] drm/amdgpu: optimize the padding with hw optimization

2024-07-31 Thread Marek Olšák
he Header instead of fetching all NOP packets > one by one. > > Cc: Christian König > Cc: Pierre-Eric Pelloux-Prayer > Cc: Tvrtko Ursulin > Cc: Marek Olšák > Signed-off-by: Sunil Khatri > --- > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 24 +--- >

Re: [PATCH v1 2/3] drm/amdgpu: optimize the padding for gfx9

2024-07-31 Thread Marek Olšák
he Header instead of fetching all NOP packets > one by one. > > Cc: Christian König > Cc: Pierre-Eric Pelloux-Prayer > Cc: Tvrtko Ursulin > Cc: Marek Olšák > Signed-off-by: Sunil Khatri > --- > drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 24 +--- >

Re: [PATCH v1 3/3] drm/amdgpu: optimize the padding for gfx_v9_4_3

2024-07-31 Thread Marek Olšák
he Header instead of fetching all NOP packets > one by one. > > Cc: Christian König > Cc: Pierre-Eric Pelloux-Prayer > Cc: Tvrtko Ursulin > Cc: Marek Olšák > Signed-off-by: Sunil Khatri > --- > drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 20 +++- > 1 f

Re: [PATCH v1 1/3] drm/amdgpu: optimize the padding for gfx12

2024-07-31 Thread Marek Olšák
he Header instead of fetching all NOP packets > one by one. > > Cc: Christian König > Cc: Pierre-Eric Pelloux-Prayer > Cc: Tvrtko Ursulin > Cc: Marek Olšák > Signed-off-by: Sunil Khatri > --- > drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 22 -- >

Re: [PATCH] drm/amdgpu: optimize the padding with hw optimization

2024-07-31 Thread Marek Olšák
On Wed, Jul 31, 2024 at 11:19 PM Marek Olšák wrote: > > On Tue, Jul 30, 2024 at 8:43 AM Sunil Khatri wrote: > > > > Adding NOP packets one by one in the ring > > does not use the CP efficiently. > > > > Solution: > > Use CP optimization while addi

Re: [PATCH 2/2] drm/amdgpu: optimize the padding for gfx11

2024-07-31 Thread Marek Olšák
he Header instead of fetching all NOP packets > one by one. > > Cc: Christian König > Cc: Pierre-Eric Pelloux-Prayer > Cc: Tvrtko Ursulin > Cc: Marek Olšák > Signed-off-by: Sunil Khatri > --- > drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 22 -- >

Re: [PATCH] drm/amdgpu: optimize the padding with hw optimization

2024-07-31 Thread Marek Olšák
he Header instead of fetching all NOP packets > one by one. > > Cc: Christian König > Cc: Pierre-Eric Pelloux-Prayer > Cc: Tvrtko Ursulin > Cc: Marek Olšák > Signed-off-by: Sunil Khatri > --- > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 24 +--- >

Re: [PATCH v7 1/2] drm/buddy: Add start address support to trim function

2024-07-23 Thread Marek Olšák
The reason is that our DCC requires 768K alignment in some cases. I haven't read this patch series, but one way to do that is to align to 256K, overallocate by 512K, and then not use either 0, 256K, or 512K at the beginning to get to 768K alignment. Marek On Tue, Jul 23, 2024, 11:04 Matthew Auld

Re: [PATCH v5 2/2] drm/amdgpu: Add address alignment support to DCC buffers

2024-07-16 Thread Marek Olšák
AMDGPU_GEM_CREATE_GFX12_DCC is set on 90% of all memory allocations, and almost all of them are not displayable. Shouldn't we use a different way to indicate that we need a non-power-of-two alignment, such as looking at the alignment field directly? Marek On Tue, Jul 16, 2024, 11:45 Arunpravin Pa

Re: [PATCH] drm/amd: Bump KMS_DRIVER_MINOR version

2024-07-12 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Thu, Jul 11, 2024 at 11:05 AM Aurabindo Pillai wrote: > > Increase the KMS minor version to indicate GFX12 DCC support since this > contains a major change in how DCC is managed across IPs like GFX, DCN > etc. This will be used mainly by userspace

Re: [PATCH] drm/amd/display: Allow display DCC for DCN401

2024-07-10 Thread Marek Olšák
Can you also increase KMS_DRIVER_MINOR with a proper comment in amdgpu_drv.c, which will be used by Mesa to tell whether display DCC is supported on gfx12? Thanks, Marek On Wed, Jul 10, 2024 at 4:05 PM Aurabindo Pillai wrote: > > > > On 7/10/24 10:49 AM, Marek Olšák wrote: > >

Re: [PATCH] drm/amd/display: Allow display DCC for DCN401

2024-07-10 Thread Marek Olšák
This will enable display DCC for Wayland because Mesa already exposes modifiers with DCC. Has it been tested? Marek On Mon, Jul 8, 2024 at 12:06 PM Aurabindo Pillai wrote: > > To enable mesa to use display dcc, DM should expose them in the > supported modifiers. Add the best (most efficient) mod

Re: [PATCH] drm/amdgpu: restore dcc bo tilling configs while moving

2024-07-02 Thread Marek Olšák
data_format == 13, 15, and 23 are also invalid. Marek On Tue, Jul 2, 2024 at 12:05 PM Marek Olšák wrote: > > I think the change should fix invalid values passed from userspace. > > max_com == 3 should be clamped to 2. > data_format == 0 || data_format > 24 should do 2 things:

Re: [PATCH] drm/amdgpu: restore dcc bo tilling configs while moving

2024-07-02 Thread Marek Olšák
I think the change should fix invalid values passed from userspace. max_com == 3 should be clamped to 2. data_format == 0 || data_format > 24 should do 2 things: set data_format to 10, set num_format to 0. Marek On Tue, Jul 2, 2024 at 9:43 AM Marek Olšák wrote: > > Reviewed-by: Ma

Re: [PATCH] drm/amdgpu: restore dcc bo tilling configs while moving

2024-07-02 Thread Marek Olšák
Reviewed-by: Marek Olšák On Sun, Jun 30, 2024 at 11:35 PM Min, Frank wrote: > > [AMD Official Use Only - AMD Internal Distribution Only] > > From: Frank Min > > While moving buffer which as dcc tiling config, it is needed to restore its > original dcc tiling. > > 1

[PATCH 12/13] drm/amdgpu/display: add all gfx12 modifiers

2024-06-26 Thread Marek Olšák
Signed-off-by: Marek Olšák --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c index

[PATCH 13/13] drm/amdgpu: rewrite convert_tiling_flags_to_modifier_gfx12

2024-06-26 Thread Marek Olšák
There were multiple bugs, like checking SWIZZLE_MODE before checking GFX12_SWIZZLE_MODE, which has undefined behavior. The function had no effect before (it always returned -EINVAL). Signed-off-by: Marek Olšák --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 45 + 1 file

[PATCH 10/13] drm/amdgpu/display: handle gfx12 in amdgpu_dm_plane_format_mod_supported

2024-06-26 Thread Marek Olšák
All this code has undefined behavior on GFX12 and shouldn't be executed. Signed-off-by: Marek Olšák --- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 47 ++- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pl

[PATCH 09/13] drm/amdgpu: handle gfx12 in amdgpu_display_verify_sizes

2024-06-26 Thread Marek Olšák
It verified GFX9-11 swizzle modes on GFX12, which has undefined behavior. Signed-off-by: Marek Olšák --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 27 - include/uapi/drm/drm_fourcc.h | 2 ++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a

[PATCH 08/13] drm/amdgpu: don't use amdgpu_lookup_format_info on gfx12

2024-06-26 Thread Marek Olšák
It only uses fields for GFX9-11 related to the separate DCC buffer, which doesn't exist in GFX12. Signed-off-by: Marek Olšák --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/dr

[PATCH 07/13] drm/amdgpu: add amdgpu_framebuffer::gfx12_dcc

2024-06-26 Thread Marek Olšák
amdgpu_framebuffer doesn't have tiling_flags, so we need this. amdgpu_display_get_fb_info never gets NULL parameters, so checking for NULL was useless. Signed-off-by: Marek Olšák --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 15 --- drivers/gpu/drm/amd/amdgpu/amdgpu_m

[PATCH 11/13] drm/amdgpu/display: set plane attributes for gfx12 correctly

2024-06-26 Thread Marek Olšák
It used gfx9 flags, which has undefined behavior on gfx12. Signed-off-by: Marek Olšák --- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 50 ++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu

[PATCH 06/13] drm/amdgpu/display: handle gfx12 in dm_check_cursor_fb

2024-06-26 Thread Marek Olšák
Checking SWIZZLE_MODE has undefined behavior on gfx12. Signed-off-by: Marek Olšák --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH 05/13] drm/amdgpu: remove AMD_FMT_MOD_GFX12_DCC_MAX_COMPRESSED_BLOCK_* definitions

2024-06-26 Thread Marek Olšák
They were added accidentally. Signed-off-by: Marek Olšák --- include/uapi/drm/drm_fourcc.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index d0063ac6e09f..4168445fbb8b 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b

[PATCH 03/13] drm/amdgpu/gfx12: remove superfluous cache flags

2024-06-26 Thread Marek Olšák
If any INV flags are needed, they should be executed via ACQUIRE_MEM before INDIRECT_BUFFER. GLM flags are also removed because the hw ignores them. Signed-off-by: Marek Olšák Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 6 -- 1 file changed, 6 deletions(-) diff

[PATCH 04/13] drm/amdgpu/gfx12: remove GDS leftovers

2024-06-26 Thread Marek Olšák
GDS doesn't exist in gfx12. The incomplete packet allows userspace to hang the hw from the kernel. Signed-off-by: Marek Olšák Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/gpu/drm/amd/a

[PATCH 02/13] drm/amdgpu/gfx11: remove superfluous cache flags

2024-06-26 Thread Marek Olšák
If any INV flags are needed, they should be executed via ACQUIRE_MEM before INDIRECT_BUFFER. Signed-off-by: Marek Olšák Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 01/13] drm/amdgpu: check for LINEAR_ALIGNED correctly in check_tiling_flags_gfx6

2024-06-26 Thread Marek Olšák
Signed-off-by: Marek Olšák --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index cfec85563bc6..3c5fb907bdd9 100644 --- a/drivers/gpu

Re: [PATCH 4/6] drm/amdgpu: add AMDGPU_INFO_GB_ADDR_CONFIG query

2024-06-19 Thread Marek Olšák
s > and work around issues because of legacy hw. > > Regards, > Christian. > > Am 19.06.24 um 02:34 schrieb Marek Olšák: > > I would put this into drm_amdgpu_info_device. That structure can grow in > > size. > > > > Marek > > > > On T

Re: [PATCH 4/6] drm/amdgpu: add AMDGPU_INFO_GB_ADDR_CONFIG query

2024-06-18 Thread Marek Olšák
I would put this into drm_amdgpu_info_device. That structure can grow in size. Marek On Tue, Jun 18, 2024 at 11:30 AM Pierre-Eric Pelloux-Prayer wrote: > > libdrm_amdgpu uses AMDGPU_INFO_READ_MMR_REG to fill the dev->info.gb_addr_cfg > value. > Since this value is already known by the kernel, th

Re: "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu

2024-06-13 Thread Marek Olšák
On Thu, Jun 13, 2024 at 3:23 AM Thomas Zimmermann wrote: > > Hi > > Am 13.06.24 um 08:00 schrieb Marek Olšák: > > +amd-gfx > > > > On Thu, Jun 13, 2024 at 1:59 AM Marek Olšák wrote: > >> Hi Thomas, > >> > >> Commit 9eac534db0013aff9b912

Re: "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu

2024-06-12 Thread Marek Olšák
+amd-gfx On Thu, Jun 13, 2024 at 1:59 AM Marek Olšák wrote: > > Hi Thomas, > > Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title > breaks (crashes?) lightdm (login screen) such that all I get is the > terminal. It's also reproducible with tag v6.9 where

Re: [RFC PATCH 00/18] TTM interface for managing VRAM oversubscription

2024-04-25 Thread Marek Olšák
The most extreme ping-ponging is mitigated by throttling buffer moves in the kernel, but it only works without VM_ALWAYS_VALID and you can set BO priorities in the BO list. A better approach that works with VM_ALWAYS_VALID would be nice. Marek On Wed, Apr 24, 2024 at 1:12 PM Friedrich Vock wrote

Re: [PATCH 1/3] drm/amdgpu: Forward soft recovery errors to userspace

2024-03-09 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, Mar 8, 2024 at 3:43 AM Christian König wrote: > > Am 07.03.24 um 20:04 schrieb Joshua Ashton: > > As we discussed before[1], soft recovery should be > > forwarded to userspace, or we can get into a really > > bad state where a

Re: [PATCH 2/2] drm/amdgpu: Mark ctx as guilty in ring_soft_recovery path

2024-01-15 Thread Marek Olšák
On Mon, Jan 15, 2024 at 3:06 PM Christian König wrote: > > Am 15.01.24 um 20:30 schrieb Joshua Ashton: > > On 1/15/24 19:19, Christian König wrote: > >> Am 15.01.24 um 20:13 schrieb Joshua Ashton: > >>> On 1/15/24 18:53, Christian König wrote: > Am 15.01.24 um 19:35 schrieb Joshua Ashton: > >

Re: [PATCH 2/2] drm/amdgpu: Mark ctx as guilty in ring_soft_recovery path

2024-01-15 Thread Marek Olšák
On Mon, Jan 15, 2024 at 11:41 AM Michel Dänzer wrote: > > On 2024-01-15 17:19, Friedrich Vock wrote: > > On 15.01.24 16:43, Joshua Ashton wrote: > >> On 1/15/24 15:25, Michel Dänzer wrote: > >>> On 2024-01-15 14:17, Christian König wrote: > Am 15.01.24 um 12:37 schrieb Joshua Ashton: > >

Re: [PATCH] Revert "drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole"

2024-01-10 Thread Marek Olšák
ernel outside the ranges reserved for the kernel. Marek On Sat, Jan 6, 2024 at 1:48 AM Marek Olšák wrote: > > The 32-bit address space means the high 32 bits are constant and > predetermined and it's definitely somewhere in the upper range of the address > space. If ROCm or

Re: 回复: Re: 回复: Re: [PATCH libdrm 1/2] amdgpu: fix parameter of amdgpu_cs_ctx_create2

2024-01-09 Thread Marek Olšák
int p = -1. unsigned u = p; int p2 = u; p2 is -1. Marek On Tue, Jan 9, 2024, 03:26 Christian König wrote: > Am 09.01.24 um 09:09 schrieb 李真能: > > Thanks! > > What about the second patch? > > The second patch: amdgpu: change proirity value to be consistent with > kernel. > > As I want to pass

Re: [PATCH] Revert "drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole"

2024-01-05 Thread Marek Olšák
crashing Mesa application shuts down. > Reverting Jay's patch certainly didn't fix that, but only hides the > problem. > > Regards, >Felix > > > On 2024-01-04 13:29, Marek Olšák wrote: > > Hi, > > > > I have received information that the origi

Re: [PATCH] Revert "drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole"

2024-01-04 Thread Marek Olšák
Hi, I have received information that the original commit makes all 32-bit userspace VA allocations fail, so UMDs like Mesa can't even initialize and they either crash or fail to load. If TBA/TMA was relocated to the 32-bit address range, it would explain why UMDs can't allocate anything in that ra

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-11 Thread Marek Olšák
On Fri, Dec 8, 2023 at 1:37 PM Alex Deucher wrote: > On Fri, Dec 8, 2023 at 12:27 PM Joshua Ashton wrote: > > > > FWIW, we are shipping this right now in SteamOS Preview channel > > (probably going to Stable soon) and it seems to be working as expected > > and fixing issues there in instances we

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Marek Olšák
On Fri, Dec 8, 2023 at 9:57 AM Christian König wrote: > Am 08.12.23 um 12:43 schrieb Friedrich Vock: > > On 08.12.23 10:51, Christian König wrote: > >> Well longer story short Alex and I have been digging up the > >> documentation for this and as far as we can tell this isn't correct. > > Huh. I

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Marek Olšák
It's correct according to our documentation. Reviewed-by: Marek Olšák Marek On Fri, Dec 8, 2023 at 5:47 AM Christian König wrote: > Well longer story short Alex and I have been digging up the > documentation for this and as far as we can tell this isn't correct. > >

Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-08-09 Thread Marek Olšák
On Wed, Aug 9, 2023 at 3:35 AM Michel Dänzer wrote: > > On 8/8/23 19:03, Marek Olšák wrote: > > It's the same situation as SIGSEGV. A process can catch the signal, > > but if it doesn't, it gets killed. GL and Vulkan APIs give you a way > > to catch the

Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-08-08 Thread Marek Olšák
It's the same situation as SIGSEGV. A process can catch the signal, but if it doesn't, it gets killed. GL and Vulkan APIs give you a way to catch the GPU error and prevent the process termination. If you don't use the API, you'll get undefined behavior, which means anything can happen, including pr

Re: Non-robust apps and resets (was Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations)

2023-08-02 Thread Marek Olšák
A screen that doesn't update isn't usable. Killing the window system and returning to the login screen is one option. Killing the window system manually from a terminal or over ssh and then returning to the login screen is another option, but 99% of users either hard-reset the machine or do sysrq+R

Re: Non-robust apps and resets (was Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations)

2023-07-25 Thread Marek Olšák
On Tue, Jul 25, 2023 at 4:03 AM Michel Dänzer wrote: > > On 7/25/23 04:55, André Almeida wrote: > > Hi everyone, > > > > It's not clear what we should do about non-robust OpenGL apps after GPU > > resets, so I'll try to summarize the topic, show some options and my > > proposal to move forward o

Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-07-05 Thread Marek Olšák
On Wed, Jul 5, 2023 at 3:32 AM Michel Dänzer wrote: > > On 7/5/23 08:30, Marek Olšák wrote: > > On Tue, Jul 4, 2023, 03:55 Michel Dänzer wrote: > > On 7/4/23 04:34, Marek Olšák wrote: > > > On Mon, Jul 3, 2023, 03:12 Michel Dänzer > > wrote: > >

Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-07-04 Thread Marek Olšák
On Tue, Jul 4, 2023, 03:55 Michel Dänzer wrote: > On 7/4/23 04:34, Marek Olšák wrote: > > On Mon, Jul 3, 2023, 03:12 Michel Dänzer <mailto:michel.daen...@mailbox.org>> wrote: > > On 6/30/23 22:32, Marek Olšák wrote: > > > On Fri, Jun 30, 2023 at 11:11

Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-07-03 Thread Marek Olšák
On Mon, Jul 3, 2023, 22:38 Randy Dunlap wrote: > > > On 7/3/23 19:34, Marek Olšák wrote: > > > > > > On Mon, Jul 3, 2023, 03:12 Michel Dänzer <mailto:michel.daen...@mailbox.org>> wrote: > > > > Marek, > Please stop sending html emails to the ma

Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-07-03 Thread Marek Olšák
On Mon, Jul 3, 2023, 03:12 Michel Dänzer wrote: > On 6/30/23 22:32, Marek Olšák wrote: > > On Fri, Jun 30, 2023 at 11:11 AM Michel Dänzer < > michel.daen...@mailbox.org <mailto:michel.daen...@mailbox.org>> wrote: > >> On 6/30/23 16:59, Alex Deucher wrote: >

Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-06-30 Thread Marek Olšák
That's a terrible idea. Ignoring API calls would be identical to a freeze. You might as well disable GPU recovery because the result would be the same. There are 2 scenarios: - robust contexts: report the GPU reset status and skip API calls; let the app recreate the context to recover - non-robust

Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-06-27 Thread Marek Olšák
On Tue, Jun 27, 2023 at 5:31 PM André Almeida wrote: > Hi Marek, > > Em 27/06/2023 15:57, Marek Olšák escreveu: > > On Tue, Jun 27, 2023, 09:23 André Almeida > <mailto:andrealm...@igalia.com>> wrote: > > > > +User Mode Driver > > +---

Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-06-27 Thread Marek Olšák
On Tue, Jun 27, 2023, 09:23 André Almeida wrote: > Create a section that specifies how to deal with DRM device resets for > kernel and userspace drivers. > > Acked-by: Pekka Paalanen > Signed-off-by: André Almeida > --- > > v4: > https://lore.kernel.org/lkml/20230626183347.55118-1-andrealm...@i

Re: [RFC PATCH 0/1] Add AMDGPU_INFO_GUILTY_APP ioctl

2023-05-03 Thread Marek Olšák
On Wed, May 3, 2023, 14:53 André Almeida wrote: > Em 03/05/2023 14:08, Marek Olšák escreveu: > > GPU hangs are pretty common post-bringup. They are not common per user, > > but if we gather all hangs from all users, we can have lots and lots of > > them. > > > &

  1   2   3   4   5   6   >