Re: [RFC] amdgpu: Add a context flag to disable implicit sync

2024-08-19 Thread Bas Nieuwenhuizen
On Mon, Aug 19, 2024 at 4:51 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 07.08.24 um 22:33 schrieb Bas Nieuwenhuizen: > > On Wed, Aug 7, 2024 at 10:25 PM Faith Ekstrand > wrote: > >> On Wed, Aug 7, 2024 at 2:23 PM Joshua Ashton wrote: >> &

[PATCH] drm/amdgpu: Actually check flags for all context ops.

2024-08-06 Thread Bas Nieuwenhuizen
Missing validation ... Checked libdrm and it clears all the structs, so we should be safe to just check everything. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

Re: [PATCH] drm/amdgpu: Actually check flags for all context ops.

2024-08-07 Thread Bas Nieuwenhuizen
Yeah, I also found that one. Will send it out this evening if you don't get to it. On Wed, Aug 7, 2024, 5:03 PM Michel Dänzer wrote: > On 2024-08-06 22:27, Bas Nieuwenhuizen wrote: > > Missing validation ... > > > > Checked libdrm and it clears all the structs, so we

Re: [RFC] amdgpu: Add a context flag to disable implicit sync

2024-08-07 Thread Bas Nieuwenhuizen
and similar to the >> >approach taken by ANV/i915 and it works well for those drivers. >> > >> >Ideally, I would like to see something like this back-ported to at least >> >the kernel where DMA_BUF_IOCTL_IMPORT/EXPORT_SYNC_FILE were introduced >> >so that w

[PATCH 0/6] Add submission flag to disable implicit sync.

2024-08-07 Thread Bas Nieuwenhuizen
t till we know the actual version) Bas Nieuwenhuizen (6): amdgpu: Add usage argument to amdgpu_sync_resv. amdgpu: Ignore BOOKKEEP fences for submissions. drm/amdgpu: Check cs flags. drm/amdgpu: Add UAPI for disabling implicit sync per submission. drm/amdgpu: Implement disabling imp

[PATCH 1/6] amdgpu: Add usage argument to amdgpu_sync_resv.

2024-08-07 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 7 +++ drivers/gpu/drm/amd

[PATCH 2/6] amdgpu: Ignore BOOKKEEP fences for submissions.

2024-08-07 Thread Bas Nieuwenhuizen
C_EQ_OWNER/EXPLICIT. I think this doesn't conflict and would like to leave the VM side out of it as much as possible in this series to land something to resolve some radv/radeonsi issues for cross process sharing) Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 4/6] drm/amdgpu: Add UAPI for disabling implicit sync per submission.

2024-08-07 Thread Bas Nieuwenhuizen
't really anticipate an usecase for doing it per BO. (e.g. I don't think we need to selectively do implicit in radv and I don't see radeonsi tracking READ vs. WRITE at this point.) Signed-off-by: Bas Nieuwenhuizen --- include/uapi/drm/amdgpu_drm.h | 6 ++ 1 file change

[PATCH 3/6] drm/amdgpu: Check cs flags.

2024-08-07 Thread Bas Nieuwenhuizen
Had no validation before. libdrm_amdgpu memsets this, even for the raw/raw2 functions. We have a lot of functions touching the ioctl struct, no strong opinion on where this is placed, but I thought early would be good. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 5/6] drm/amdgpu: Implement disabling implicit sync per submission.

2024-08-07 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 21 - drivers/gpu/drm/amd/amdgpu/amdgpu_cs.h | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 6/6] drm/amdgpu: Bump the driver version for the new flag.

2024-08-07 Thread Bas Nieuwenhuizen
AMDGPU_CS_NO_IMPLICIT_SYNC. Probably wildly out of date because amd-staging-drm-next didn't boot for me. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv

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

2024-01-15 Thread Bas Nieuwenhuizen
On Mon, Jan 15, 2024 at 7:14 PM Friedrich Vock wrote: > Re-sending as plaintext, sorry about that > > On 15.01.24 18:54, Michel Dänzer wrote: > > On 2024-01-15 18:26, Friedrich Vock wrote: > >> [snip] > >> The fundamental problem here is that not telling applications that > >> something went wron

Re: [PATCH 3/3] drm/amd/display: Add modifiers capable of DCC image stores for gfx10_3

2021-09-15 Thread Bas Nieuwenhuizen
. Doom Eternal, present from compute following compute >> post-fx and would benefit from having DCC image stores available. >> >> DCN on gfx10_3 doesn't need INDEPENDENT_128B_BLOCKS = 0 so we can expose >> these modifiers capable of DCC image stores. >> >> Signed

Re: [PATCH] drm/amdgpu: Ensure that the modifier requested is supported by plane.

2021-03-23 Thread Bas Nieuwenhuizen
lidate that the > modifier is on the list of the plane's supported modifiers. > > The bug was caught using igt-gpu-tools test: > kms_addfb_basic.addfb25-bad-modifier > > Tested on ChromeOS Zork by turning on the display, running an overlay > test, and running a YT video. >

Re: [PATCH] drm/amdgpu: Ensure that the modifier requested is supported by plane.

2021-03-24 Thread Bas Nieuwenhuizen
gt; >>> modifier is on the list of the plane's supported modifiers. > >>> > >>> The bug was caught using igt-gpu-tools test: > kms_addfb_basic.addfb25-bad-modifier > >>> > >>> Tested on ChromeOS Zork by turning on the display, running a

Re: amd/display: allow non-linear multi-planar formats

2021-04-11 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Fri, Apr 9, 2021 at 3:19 PM Simon Ser wrote: > Hi, > > Can you have a look at this patch? > > Thanks, > > Simon > > On Friday, March 26th, 2021 at 5:59 PM, Simon Ser > wrote: > > > Accept non-linear buffers which use a m

Re: [PATCH 1/2] drm/amd/display: Update modifier list for gfx10_3

2021-04-15 Thread Bas Nieuwenhuizen
On Thu, Apr 15, 2021 at 1:35 AM Qingqing Zhuo wrote: > [Why] > Current list only includes modifiers where DCC_MAX_COMPRESSED_BLOCK > is set to AMD_FMT_MOD_DCC_BLOCK_128B, while AMD_FMT_MOD_DCC_BLOCK_64B > is also supported and used by userspace. > > [How] > Add AMD_FMT_MOD_DCC_BLOCK_64B to modifi

Re: [PATCH 1/2] drm/amd/display: Update modifier list for gfx10_3

2021-04-15 Thread Bas Nieuwenhuizen
Btw please add a fixes tag so it gets directed to stable releases. Thanks! On Thu, Apr 15, 2021, 6:06 PM Zhuo, Qingqing wrote: > [AMD Public Use] > > > > Inline. > > > > *From:* Bas Nieuwenhuizen > *Sent:* Thursday, April 15, 2021 7:26 AM > *To:* Zhuo, Qingq

Re: [PATCH v2] drm/amd/display: Update modifier list for gfx10_3

2021-04-15 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen Tested-by: Bas Nieuwenhuizen (Checked that Weston on SIENNA_CICHLID now gets DCC) Thanks! On Thu, Apr 15, 2021 at 7:35 PM Qingqing Zhuo wrote: > [Why] > Current list supports modifiers that have DCC_MAX_COMPRESSED_BLOCK > set to AMD_FMT_MOD_DCC_B

[PATCH] Revert "drm/amdgpu: Verify bo size can fit framebuffer size on init."

2021-04-29 Thread Bas Nieuwenhuizen
work for AMDGPU, especially around DCC planes. Signed-off-by: Bas Nieuwenhuizen --- For -fixes. Might have some conflicts with "drm/amdgpu: Ensure that the modifier requested is supported by plane" for amd-staging-drm-next drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 68 -

Re: [PATCH] Revert "drm/amdgpu: Verify bo size can fit framebuffer size on init."

2021-04-29 Thread Bas Nieuwenhuizen
On Thu, Apr 29, 2021 at 11:27 PM Mark Yacoub wrote: > > On Thu, Apr 29, 2021 at 4:50 PM Bas Nieuwenhuizen > wrote: > > > > This reverts commit f258907fdd835e1aed6d666b00cdd0f186676b7c. > > > > Same problem as "drm/amdgpu: Verify bo size can fit framebuffer

[PATCH] drm/amdgpu: Use device specific BO size & stride check.

2021-05-04 Thread Bas Nieuwenhuizen
ita I was generous adding explicit error messages to every failure case. Fixes: f258907fdd83 ("drm/amdgpu: Verify bo size can fit framebuffer size on init.") Signed-off-by: Bas Nieuwenhuizen --- For drm-fixes, replaces the 'Revert "drm/amdgpu: Verify bo size can fit framebuff

[PATCH] drm/amdgpu: Init GFX10_ADDR_CONFIG for VCN v3 in DPG mode.

2021-05-04 Thread Bas Nieuwenhuizen
Otherwise tiling modes that require the values form this field (In particular _*_X) would be corrupted upon video decode. Copied from the VCN v2 code. Fixes: 99541f392b4d ("drm/amdgpu: add mc resume DPG mode for VCN3.0") Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgp

Re: [PATCH 2/2] Revert "Revert "drm/amdgpu: Ensure that the modifier requested is supported by plane.""

2021-05-09 Thread Bas Nieuwenhuizen
It would be very helpful if you could enable drm.debug=0x4 and then take the dmesg to figure out what modifier was rejected On Sun, May 9, 2021 at 10:51 PM youling 257 wrote: > > look this video, > https://drive.google.com/file/d/1QklH_H2AlOTu8W1D3yl6_3rtZ7IqbjR_/view?usp=sharing > > 2021-05-09 2

Re: [RFC PATCH v2 2/3] drm: set fb_modifiers_not_supported flag in legacy drivers

2022-01-13 Thread Bas Nieuwenhuizen
I think we'll also want to do a conditional disable for DC (drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c) since it only enables modifiers on newer HW. Something like "if (modifiers == NULL) fb_modifiers_not_supported = true;" in amdgpu_dm_plane_init. On Thu, Jan 13, 2022 at 10:44 AM Tomohito

[PATCH] drm/amdgpu/display: Remove t_srx_delay_us.

2022-01-22 Thread Bas Nieuwenhuizen
Unused. Convert the divisions into asserts on the divisor, to debug why it is zero. The divide by zero is suspected of causing kernel panics. While I have no idea where the zero is coming from I think this patch is a positive either way. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd

[PATCH 2/2] drm/amd/display: Wrap dcn301_calculate_wm_and_dlg for FPU.

2022-01-23 Thread Bas Nieuwenhuizen
Mirrors the logic for dcn30. Cue lots of WARNs and some kernel panics without this fix. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/dc/dcn301/dcn301_resource.c | 11 +++ .../gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c| 2 +- .../gpu/drm/amd/display/dc/dml

[PATCH 1/2] drm/amd/display: Fix FP start/end for dcn30_internal_validate_bw.

2022-01-23 Thread Bas Nieuwenhuizen
It calls populate_dml_pipes which uses doubles to initialize the scale_ratio_depth params. Mirrors the dcn20 logic. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

[PATCH] drm/amd/display: Protect update_bw_bounding_box FPU code.

2022-02-12 Thread Bas Nieuwenhuizen
For DCN3/3.01/3.02 at least these use the fpu. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc.c | 5 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH RESEND] amd/display: convert DRM_DEBUG_ATOMIC to drm_dbg_atomic

2021-05-26 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen I think there are plenty more occurrences too or did I miss the cleanup of those? On Wed, May 26, 2021 at 3:56 PM Simon Ser wrote: > > This allows to tie the log message to a specific DRM device. > > Signed-off-by: Simon Ser > Cc: Alex Deuch

Enabling AMDGPU by default for SI & CIK

2020-08-02 Thread Bas Nieuwenhuizen
Hi all, Now that we have recently made some progress on getting feature parity with the Radeon driver for SI, I'm wondering what it would take to make AMDGPU the default driver for these generations. As far as I understand AMDGPU has had these features for CIK for a while already but it is still

[PATCH 4/8] drm/fourcc: Add AMD DRM modifiers.

2020-08-04 Thread Bas Nieuwenhuizen
X11 rendering onto the frontbuffer with DCC, but still fit into 4 DRM planes. Signed-off-by: Bas Nieuwenhuizen --- include/uapi/drm/drm_fourcc.h | 115 ++ 1 file changed, 115 insertions(+) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_f

[PATCH 7/8] drm/amd/display: Add formats for DCC with 2/3 planes.

2020-08-04 Thread Bas Nieuwenhuizen
. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 95 +++ 1 file changed, 95 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index ac913b8f10ef..c38257081868 100644

[PATCH 2/8] drm/amd: Init modifier field of helper fb.

2020-08-04 Thread Bas Nieuwenhuizen
Otherwise the field ends up being used uninitialized when enabling modifiers, failing validation with high likelihood. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 3/8] drm/amd/display: Honor the offset for plane 0.

2020-08-04 Thread Bas Nieuwenhuizen
With modifiers I'd like to support non-dedicated buffers for images. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm

[PATCH 8/8] drm/amd/display: Expose modifiers.

2020-08-04 Thread Bas Nieuwenhuizen
the meantime this should not regress things from pre-modifiers and does not risk regressions as we make up our mind in the future. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 343 +- 1 file changed, 342 insertions(+), 1 deletion(-) diff

[PATCH 0/8] amd/display: Add GFX9+ modifier support.

2020-08-04 Thread Bas Nieuwenhuizen
itial work). This series can be found on https://github.com/BNieuwenhuizen/linux/tree/modifiers An userspace implementation in radeonsi can be found on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6176 Bas Nieuwenhuizen (8): drm/amd/display: Do not silently accept DCC for multi

[PATCH 1/8] drm/amd/display: Do not silently accept DCC for multiplane formats.

2020-08-04 Thread Bas Nieuwenhuizen
Silently accepting it could result in corruption. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH 5/8] drm/amd/display: Refactor surface tiling setup.

2020-08-04 Thread Bas Nieuwenhuizen
Prepare for inserting modifiers based configuration, while sharing a bunch of DCC validation & initializing the device-based configuration. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 209 ++ 1 file changed, 116 insertions(+)

[PATCH 6/8] drm/amd/display: Set DC options from modifiers.

2020-08-04 Thread Bas Nieuwenhuizen
-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 109 +- 1 file changed, 103 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 6ef7f2f8acab..ac913b8f10ef

Re: [PATCH 6/8] drm/amd/display: Set DC options from modifiers.

2020-08-10 Thread Bas Nieuwenhuizen
On Mon, Aug 10, 2020 at 3:09 PM Daniel Vetter wrote: > > On Mon, Aug 10, 2020 at 02:49:00PM +0200, Michel Dänzer wrote: > > On 2020-08-10 2:28 p.m., Daniel Vetter wrote: > > > > > > Ok just learned that amdgpu hat set/get_tiling, so I'm upgrading my idea > > > here to a very strong recommendation,

Re: [PATCH 8/8] drm/amd/display: Expose modifiers.

2020-09-02 Thread Bas Nieuwenhuizen
On Fri, Aug 7, 2020 at 9:43 PM Marek Olšák wrote: > > On Tue, Aug 4, 2020 at 5:32 PM Bas Nieuwenhuizen > wrote: >> >> This expose modifier support on GFX9+. >> >> Only modifiers that can be rendered on the current GPU are >> added. This is to reduce the nu

[PATCH v2 00/11] amd/display: Add GFX9+ modifier support.

2020-09-04 Thread Bas Nieuwenhuizen
ddfb2 time and convert them into modifiers for GFX9+. Furthermore, the DCC constant econding modifers only get exposed on RAVEN2 and newer. Bas Nieuwenhuizen (11): drm/amd/display: Do not silently accept DCC for multiplane formats. drm/amd: Init modifier field of helper fb. drm/amd/display:

[PATCH v2 02/11] drm/amd: Init modifier field of helper fb.

2020-09-04 Thread Bas Nieuwenhuizen
Otherwise the field ends up being used uninitialized when enabling modifiers, failing validation with high likelyhood. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v2 06/11] drm/amd/display: Convert tiling_flags to modifiers.

2020-09-04 Thread Bas Nieuwenhuizen
This way the modifier path gets exercised all the time, improving testing. Furthermore, for modifiers this is required as getfb2 will always return the modifier if the driver sets allow_fb_modifiers. This only triggers once allow_fb_modifiers is set. Signed-off-by: Bas Nieuwenhuizen

[PATCH v2 11/11] drm/amd/display: Clean up GFX9 tiling_flags path.

2020-09-04 Thread Bas Nieuwenhuizen
We're unconditionally using modifiers internally for GFX9+ now. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 74 ++- 1 file changed, 7 insertions(+), 67 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm

[PATCH v2 10/11] drm/amd/display: Expose modifiers.

2020-09-04 Thread Bas Nieuwenhuizen
64bpp on GFX10+. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 338 +- 1 file changed, 337 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH v2 01/11] drm/amd/display: Do not silently accept DCC for multiplane formats.

2020-09-04 Thread Bas Nieuwenhuizen
Silently accepting it could result in corruption. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v2 03/11] drm/amd/display: Honor the offset for plane 0.

2020-09-04 Thread Bas Nieuwenhuizen
With modifiers I'd like to support non-dedicated buffers for images. Signed-off-by: Bas Nieuwenhuizen Cc: sta...@vger.kernel.org --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/di

[PATCH v2 04/11] drm/fourcc: Add AMD DRM modifiers.

2020-09-04 Thread Bas Nieuwenhuizen
X11 rendering onto the frontbuffer with DCC, but still fit into 4 DRM planes. Signed-off-by: Bas Nieuwenhuizen --- include/uapi/drm/drm_fourcc.h | 115 ++ 1 file changed, 115 insertions(+) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_f

[PATCH v2 07/11] drm/amd/display: Refactor surface tiling setup.

2020-09-04 Thread Bas Nieuwenhuizen
Prepare for inserting modifiers based configuration, while sharing a bunch of DCC validation & initializing the device-based configuration. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 211 ++ 1 file changed, 116 insertions(+)

[PATCH v2 09/11] drm/amd/display: Add formats for DCC with 2/3 planes.

2020-09-04 Thread Bas Nieuwenhuizen
. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 96 +++ 1 file changed, 96 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 545d177bf703..ceb92a0dccdc 100644

[PATCH v2 08/11] drm/amd/display: Set DC options from modifiers.

2020-09-04 Thread Bas Nieuwenhuizen
modifier check to should_reset_plane. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 102 -- 1 file changed, 95 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH v2 05/11] drm/amd/display: Store tiling_flags in the framebuffer.

2020-09-04 Thread Bas Nieuwenhuizen
This moves the tiling_flags to the framebuffer creation. This way the time of the "tiling" decision is the same as it would be with modifiers. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 48 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h

Re: [PATCH v2 00/11] amd/display: Add GFX9+ modifier support.

2020-09-07 Thread Bas Nieuwenhuizen
On Mon, Sep 7, 2020 at 10:51 AM Ernst Sjöstrand wrote: > > > > Den fre 4 sep. 2020 kl 18:07 skrev Bas Nieuwenhuizen > : >> >> This adds modifier support to radeonsi. > > > Wouldn't it be more correct to say that this adds modifier support to amdgpu >

Re: [PATCH v2 04/11] drm/fourcc: Add AMD DRM modifiers.

2020-09-07 Thread Bas Nieuwenhuizen
Thanks, fixed both locally. On Mon, Sep 7, 2020 at 10:44 AM Pierre-Eric Pelloux-Prayer wrote: > > Hi Bas, > > 2 small typos you may want to fix: > > On 04/09/2020 18:07, Bas Nieuwenhuizen wrote: > > This adds modifiers for GFX9+ AMD GPUs. > > > > As the modifi

Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'

2021-02-22 Thread Bas Nieuwenhuizen
I think Alex moved to gitlab for his branches On Tue, Feb 23, 2021, 12:50 AM Simon Ser wrote: > On Tuesday, February 23rd, 2021 at 12:44 AM, Nathan Chancellor < > nat...@kernel.org> wrote: > > > On Mon, Feb 22, 2021 at 11:05:17PM +, Simon Ser wrote: > > > On Monday, February 22nd, 2021 at 8:

[PATCH] drm/amd/display: Initialize num_pkrs on VANGOGH.

2020-10-20 Thread Bas Nieuwenhuizen
As far a I can tell uses a variant of DCN3xx which uses num_pkrs. If we do not initialize the variable we will set the register field to ilog2(0) = -1, though the mask will reduce that to 7. Pretty sure 7 is not the value we want here. Signed-off-by: Bas Nieuwenhuizen --- Found while rebasing

Re: [PATCH] drm/amd/display: Interpret log_2(0) as 0

2020-10-21 Thread Bas Nieuwenhuizen
On Wed, Oct 21, 2020 at 6:09 PM Harry Wentland wrote: > > Even though log(0) is technically undefined our code assumes that > log_2(0) is 0. This mirrors the current behavior of our log_2 > implementation on non-Linux platforms. > > Signed-off-by: Harry Wentland > --- > > What's num_pkrs value is

[PATCH v3 00/11] amd/display: Add GFX9+ modifier support.

2020-10-21 Thread Bas Nieuwenhuizen
d and CCing more people to actually get a review. Bas Nieuwenhuizen (11): drm/amd/display: Do not silently accept DCC for multiplane formats. drm/amd: Init modifier field of helper fb. drm/amd/display: Honor the offset for plane 0. drm/fourcc: Add AMD DRM modifiers. drm/amd/display:

[PATCH v3 04/11] drm/fourcc: Add AMD DRM modifiers.

2020-10-21 Thread Bas Nieuwenhuizen
X11 rendering onto the frontbuffer with DCC, but still fit into 4 DRM planes. Signed-off-by: Bas Nieuwenhuizen --- include/uapi/drm/drm_fourcc.h | 115 ++ 1 file changed, 115 insertions(+) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_f

[PATCH v3 02/11] drm/amd: Init modifier field of helper fb.

2020-10-21 Thread Bas Nieuwenhuizen
Otherwise the field ends up being used uninitialized when enabling modifiers, failing validation with high likelyhood. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v3 03/11] drm/amd/display: Honor the offset for plane 0.

2020-10-21 Thread Bas Nieuwenhuizen
With modifiers I'd like to support non-dedicated buffers for images. Signed-off-by: Bas Nieuwenhuizen Cc: sta...@vger.kernel.org # 5.1.0 --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/dr

[PATCH v3 11/11] drm/amd/display: Clean up GFX9 tiling_flags path.

2020-10-21 Thread Bas Nieuwenhuizen
We're unconditionally using modifiers internally for GFX9+ now. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 74 ++- 1 file changed, 7 insertions(+), 67 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm

[PATCH v3 05/11] drm/amd/display: Store tiling_flags in the framebuffer.

2020-10-21 Thread Bas Nieuwenhuizen
This moves the tiling_flags to the framebuffer creation. This way the time of the "tiling" decision is the same as it would be with modifiers. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 48 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h

[PATCH v3 01/11] drm/amd/display: Do not silently accept DCC for multiplane formats.

2020-10-21 Thread Bas Nieuwenhuizen
Silently accepting it could result in corruption. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v3 06/11] drm/amd/display: Convert tiling_flags to modifiers.

2020-10-21 Thread Bas Nieuwenhuizen
This way the modifier path gets exercised all the time, improving testing. Furthermore, for modifiers this is required as getfb2 will always return the modifier if the driver sets allow_fb_modifiers. This only triggers once allow_fb_modifiers is set. Signed-off-by: Bas Nieuwenhuizen

[PATCH v3 08/11] drm/amd/display: Set DC options from modifiers.

2020-10-21 Thread Bas Nieuwenhuizen
modifier check to should_reset_plane. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 102 -- 1 file changed, 95 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH v3 10/11] drm/amd/display: Expose modifiers.

2020-10-21 Thread Bas Nieuwenhuizen
64bpp on GFX10+. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 338 +- 1 file changed, 337 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH v3 07/11] drm/amd/display: Refactor surface tiling setup.

2020-10-21 Thread Bas Nieuwenhuizen
Prepare for inserting modifiers based configuration, while sharing a bunch of DCC validation & initializing the device-based configuration. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 222 ++ 1 file changed, 119 insertions(+),

[PATCH v3 09/11] drm/amd/display: Add formats for DCC with 2/3 planes.

2020-10-21 Thread Bas Nieuwenhuizen
. Signed-off-by: Bas Nieuwenhuizen --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 96 +++ 1 file changed, 96 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 034397c1f2b1..6b33e030fe20 100644

Re: [PATCH v3 10/11] drm/amd/display: Expose modifiers.

2020-10-22 Thread Bas Nieuwenhuizen
You are totally right! Added that locally. Thanks! On Thu, Oct 22, 2020 at 7:51 AM Alex Deucher wrote: > > On Wed, Oct 21, 2020 at 7:31 PM Bas Nieuwenhuizen > wrote: > > > > This expose modifier support on GFX9+. > > > > Only modifiers that can be rendered

Re: [PATCH v3 04/11] drm/fourcc: Add AMD DRM modifiers.

2020-10-22 Thread Bas Nieuwenhuizen
On Thu, Oct 22, 2020 at 5:41 PM Alex Deucher wrote: > > On Wed, Oct 21, 2020 at 7:31 PM Bas Nieuwenhuizen > wrote: > > > > This adds modifiers for GFX9+ AMD GPUs. > > > > As the modifiers need a lot of parameters I split things out in > > getters and set

Re: [PATCH 3/3] drm/amdgpu/display: add MALL support

2020-10-26 Thread Bas Nieuwenhuizen
On Tue, Oct 20, 2020 at 10:26 PM Alex Deucher wrote: > > From: Bhawanpreet Lakha > > Enable Memory Access at Last Level (MALL) feature for display. > > Signed-off-by: Bhawanpreet Lakha > Signed-off-by: Alex Deucher > --- > .../drm/amd/display/dc/clk_mgr/dcn30/dalsmc.h | 1 + > .../display/dc/

[PATCH v4 09/11] drm/amd/display: Add formats for DCC with 2/3 planes.

2020-10-28 Thread Bas Nieuwenhuizen
. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 96 +++ 1 file changed, 96 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index

[PATCH v4 04/11] drm/fourcc: Add AMD DRM modifiers.

2020-10-28 Thread Bas Nieuwenhuizen
X11 rendering onto the frontbuffer with DCC, but still fit into 4 DRM planes. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher --- include/uapi/drm/drm_fourcc.h | 115 ++ 1 file changed, 115 insertions(+) diff --git a/include/uapi/drm/drm_fourcc.h b/inc

[PATCH v4 08/11] drm/amd/display: Set DC options from modifiers.

2020-10-28 Thread Bas Nieuwenhuizen
modifier check to should_reset_plane. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 102 -- 1 file changed, 95 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers

[PATCH v4 03/11] drm/amd/display: Honor the offset for plane 0.

2020-10-28 Thread Bas Nieuwenhuizen
With modifiers I'd like to support non-dedicated buffers for images. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Cc: sta...@vger.kernel.org # 5.1.0 --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +- 1 file chang

[PATCH v4 11/11] drm/amd/display: Clean up GFX9 tiling_flags path.

2020-10-28 Thread Bas Nieuwenhuizen
We're unconditionally using modifiers internally for GFX9+ now. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 74 ++- 1 file changed, 7 insertions(+), 67 deletions(-) diff --git a/drivers/gpu/drm/amd/di

[PATCH v4 00/11] amd/display: Add GFX9+ modifier support.

2020-10-28 Thread Bas Nieuwenhuizen
d and CCing more people to actually get a review. v4: Changed an initialization from {0} to memset, fixed a missing switch case in the modifier enumeration and added review tags. Bas Nieuwenhuizen (11): drm/amd/display: Do not silently accept DCC for multiplane formats. drm/amd: Init modifier fie

[PATCH v4 05/11] drm/amd/display: Store tiling_flags in the framebuffer.

2020-10-28 Thread Bas Nieuwenhuizen
This moves the tiling_flags to the framebuffer creation. This way the time of the "tiling" decision is the same as it would be with modifiers. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/amdgpu/amdgpu_displa

[PATCH v4 10/11] drm/amd/display: Expose modifiers.

2020-10-28 Thread Bas Nieuwenhuizen
64bpp on GFX10+. v4: Add AMDGPU_FAMILY_VGH case. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 339 +- 1 file changed, 338 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm

[PATCH v4 06/11] drm/amd/display: Convert tiling_flags to modifiers.

2020-10-28 Thread Bas Nieuwenhuizen
This way the modifier path gets exercised all the time, improving testing. Furthermore, for modifiers this is required as getfb2 will always return the modifier if the driver sets allow_fb_modifiers. This only triggers once allow_fb_modifiers is set. Signed-off-by: Bas Nieuwenhuizen Reviewed-by

[PATCH v4 01/11] drm/amd/display: Do not silently accept DCC for multiplane formats.

2020-10-28 Thread Bas Nieuwenhuizen
Silently accepting it could result in corruption. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display

[PATCH v4 02/11] drm/amd: Init modifier field of helper fb.

2020-10-28 Thread Bas Nieuwenhuizen
Otherwise the field ends up being used uninitialized when enabling modifiers, failing validation with high likelyhood. v4: Use memset Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher (for v1) --- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v4 07/11] drm/amd/display: Refactor surface tiling setup.

2020-10-28 Thread Bas Nieuwenhuizen
Prepare for inserting modifiers based configuration, while sharing a bunch of DCC validation & initializing the device-based configuration. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |

[PATCH 2/3] drm/amd/display: Set new format info for converted metadata.

2020-11-10 Thread Bas Nieuwenhuizen
oves the format lookup to amdgpu_display.c so we do not have issues when DC is not compiled. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 97 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 2 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_d

[PATCH 1/3] drm/amd/display: Store gem objects for planes 1-3

2020-11-10 Thread Bas Nieuwenhuizen
Also do the proper validation which was missed. Besides the missing validation, not storing the objects in the framebuffer led to wrong results in the getfb2 ioctl. Note that this should really have been done for multi-plane formats like NV12 already before modifiers landed. Signed-off-by: Bas

[PATCH 0/3] amdgpu getfb2+modifier improvements

2020-11-10 Thread Bas Nieuwenhuizen
This has some more improvements for the addfb2 code in amdgpu. These patches make ffmpeg work with DCC compressed and YUV surfaces with kmsgrab, both in the modifier and non-modifier case. Bas Nieuwenhuizen (3): drm/amd/display: Store gem objects for planes 1-3 drm/amd/display: Set new

[PATCH 3/3] drm/amd/display: Extract 3rd plane from metadata

2020-11-10 Thread Bas Nieuwenhuizen
metadata plane with implicit sync. Looking into the opaque metadata isn't ideal but this converts to something mainly for the purpose of the userspace driver and falls back properly if it isn't what we expect. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_displ

[PATCH] drm/fourcc: Fix modifier field mask for AMD modifiers.

2020-11-13 Thread Bas Nieuwenhuizen
The DCC_MAX_COMPRESSED_BLOCK has to contain one of AMD_FMT_MOD_DCC_BLOCK_* and with 3 values this doesn't fit in 1 bit. Fix this cleanly while it is only in drm-next. Fixes: 8ba16d5993749c3f31fd2b49e16f0dc1e1770b9c --- Found while reviewing Simon's drm_info PR: https://github.com/ascent12/drm_i

[PATCH v2] drm/fourcc: Fix modifier field mask for AMD modifiers.

2020-11-13 Thread Bas Nieuwenhuizen
The DCC_MAX_COMPRESSED_BLOCK has to contain one of AMD_FMT_MOD_DCC_BLOCK_* and with 3 values this doesn't fit in 1 bit. Fix this cleanly while it is only in drm-next. Fixes: 8ba16d599374 ("drm/fourcc: Add AMD DRM modifiers.") Reviewed-by: Alex Deucher Signed-off-by: Ba

Re: [PATCH 0/3] amdgpu getfb2+modifier improvements

2020-11-13 Thread Bas Nieuwenhuizen
On Fri, Nov 13, 2020 at 6:53 PM Alex Deucher wrote: > > On Tue, Nov 10, 2020 at 9:48 PM Bas Nieuwenhuizen > wrote: > > > > This has some more improvements for the addfb2 code in amdgpu. > > > > These patches make ffmpeg work with DCC compressed and YUV surfa

Re: [PATCH] drm/fourcc: fix AMD modifiers PACKERS field doc

2020-11-15 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Sun, Nov 15, 2020 at 10:39 AM Simon Ser wrote: > > This field doesn't alias with BANK_XOR_BITS: PACKERS is bits 26:28 while > BANK_XOR_BITS is bits 23:25. > > Fixes: 8ba16d599374 ("drm/fourcc: Add AMD DRM modifiers.") > Si

Re: [PATCH v3] drm/amd/amdgpu: set the default value of noretry to 1 for some dGPUs

2020-11-28 Thread Bas Nieuwenhuizen
Can we revert this patch to fix https://gitlab.freedesktop.org/drm/amd/-/issues/1374 ? On Thu, Oct 15, 2020 at 4:30 PM Felix Kuehling wrote: > > Am 2020-10-14 um 11:35 p.m. schrieb Chengming Gui: > > noretry = 0 cause some dGPU's kfd page fault tests fail, > > so set noretry to 1 for these specia

Re: [PATCH] drm/amdgpu: Do not change amdgpu framebuffer format during page flip

2020-12-22 Thread Bas Nieuwenhuizen
On Tue, Dec 22, 2020 at 9:55 PM Kazlauskas, Nicholas wrote: > > On 2020-12-21 10:18 p.m., Zhan Liu wrote: > > [Why] > > Driver cannot change amdgpu framebuffer (afb) format while doing > > page flip. Force system doing so will cause ioctl error, and result in > > breaking several functionalities i

[PATCH] drm: Check actual format for legacy pageflip.

2021-01-02 Thread Bas Nieuwenhuizen
is is safe to relax. Signed-off-by: Bas Nieuwenhuizen Fixes: 816853f9dc40 ("drm/amd/display: Set new format info for converted metadata.") --- drivers/gpu/drm/drm_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/

Re: [PATCH] drm/amdgpu: Do not change amdgpu framebuffer format during page flip

2021-01-02 Thread Bas Nieuwenhuizen
https://lists.freedesktop.org/archives/dri-devel/2021-January/292761.html is my alternative patch. On Tue, Dec 22, 2020 at 4:18 AM Zhan Liu wrote: > > [Why] > Driver cannot change amdgpu framebuffer (afb) format while doing > page flip. Force system doing so will cause ioctl error, and result in

Re: [PATCH] drm/amd/display: Fix pageflipping for XOrg in Linux 5.11+

2021-01-02 Thread Bas Nieuwenhuizen
re the exception than the rule? > > Fixes: 816853f9dc40 ("drm/amd/display: Set new format info for converted > metadata.") > Cc: Bas Nieuwenhuizen > Cc: Alex Deucher > Signed-off-by: Mario Kleiner > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 3 ++- > 1

Re: [PATCH] drm/amd/display: Fix pageflipping for XOrg in Linux 5.11+

2021-01-02 Thread Bas Nieuwenhuizen
On Sat, Jan 2, 2021 at 4:05 PM Mario Kleiner wrote: > > On Sat, Jan 2, 2021 at 3:05 PM Bas Nieuwenhuizen > wrote: > > > > I think the problem here is that application A can set the FB and then > > application B can use getfb2 (say ffmpeg). > > > Yes. That, and

  1   2   3   >