Re: [PATCH v2] drm/amdgpu: register a dirty framebuffer callback for fbcon

2023-08-15 Thread Christian König
Am 15.08.23 um 19:26 schrieb Hamza Mahfooz: fbcon requires that we implement _framebuffer_funcs.dirty. Otherwise, the framebuffer might take a while to flush (which would manifest as noticeable lag). However, we can't enable this callback for non-fbcon cases since it might cause too many

Re: [PATCH] drm/amdgpu: register a dirty framebuffer callback for fbcon

2023-08-15 Thread Christian König
Am 15.08.23 um 19:10 schrieb Hamza Mahfooz: fbcon requires that we implement _framebuffer_funcs.dirty. Otherwise, the framebuffer might take awhile to flush (which would manifest as noticeable lag). However, we can't enable this callback for non-fbcon cases since it might cause too many atomic

RE: [PATCH] drm/amdgpu: Keep reset handlers shared

2023-08-15 Thread Lazar, Lijo
[AMD Official Use Only - General] Thanks, Lijo -Original Message- From: amd-gfx On Behalf Of Lijo Lazar Sent: Thursday, August 10, 2023 5:14 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Kamal, Asad ; Zhang, Hawking Subject: [PATCH] drm/amdgpu: Keep reset handlers

RE: [PATCH] drm/amdgpu: Remove gfxoff check in GFX v9.4.3

2023-08-15 Thread Lazar, Lijo
[AMD Official Use Only - General] Sorry, for the spam. Please ignore this. Thanks, Lijo -Original Message- From: amd-gfx On Behalf Of Lijo Lazar Sent: Wednesday, August 16, 2023 9:37 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; s...@canb.auug.org.au;

RE: [PATCH v2] drm/amdgpu/pm: Add notification function for no DC support

2023-08-15 Thread Lazar, Lijo
[Public] Hi Bokun, Originally the call back is meant to enable fast UCLK switching based on display configuration. We can reuse the same interface to notify PMFW for any display related configuration. smu_v13_0_notify_display_change looks to be copied from smuv11, but not really used now. I

[PATCH] drm/amdgpu: Remove gfxoff check in GFX v9.4.3

2023-08-15 Thread Lijo Lazar
GFXOFF feature is not there for GFX 9.4.3 ASICs. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c index

[PATCH] Documentation/gpu: Update amdgpu documentation

2023-08-15 Thread Lijo Lazar
7957ec80ef97 ("drm/amdgpu: Add FRU sysfs nodes only if needed") moved the documentation for some of the sysfs nodes to amdgpu_fru_eeprom.c. Update the documentation accordingly. Signed-off-by: Lijo Lazar --- Documentation/gpu/amdgpu/driver-misc.rst | 6 +++--- 1 file changed, 3 insertions(+), 3

RE: [PATCH] drm/amdgpu: Enable ras for mp0 v13_0_6 sriov

2023-08-15 Thread Yang, Stanley
[AMD Official Use Only - General] Reviewed-by: Stanley.Yang Regards, Stanley > -Original Message- > From: Chai, Thomas > Sent: Wednesday, August 16, 2023 10:26 AM > To: amd-gfx@lists.freedesktop.org > Cc: Chai, Thomas ; Zhang, Hawking > ; Zhou1, Tao ; Li, > Candice ; Yang, Stanley ; >

[PATCH] drm/amdgpu: Enable ras for mp0 v13_0_6 sriov

2023-08-15 Thread YiPeng Chai
Enable ras for mp0 v13_0_6 sriov Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 7689395e44fd..378478cf9c21 100644 ---

[linux-next:master] BUILD REGRESSION 98297fc6ecafc0c7eabc5d869279fb27609fcdc1

2023-08-15 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 98297fc6ecafc0c7eabc5d869279fb27609fcdc1 Add linux-next specific files for 20230815 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202308081459.us5rlyay-...@intel.com https

RE: [PATCH] drm/amd/pm: allow the user to force BACO on smu v13.0.0/7

2023-08-15 Thread Feng, Kenneth
[AMD Official Use Only - General] Hi Alex, Right, just BAMACO has its advantage for the fast resume. Maybe later we can further identify which sku needs to save more power vs faster resume time. For example, mobile device can by default use BACO and desktop/workstation device can by default use

[PATCH] Revert "Revert "drm/amdgpu/display: change pipe policy for DCN 2.0""

2023-08-15 Thread Alex Deucher
This reverts commit 27dd79c00aeab36cd7542c7a4481a32549038659. It appears MPC_SPLIT_DYNAMIC still causes problems with multiple displays on DCN2.0 hardware. Switch back to MPC_SPLIT_AVOID_MULT_DISP. This increases power usage with multiple displays, but avoids hangs. Link:

[PATCH v4 4/4] drm/amdgpu: Create version number for coredumps

2023-08-15 Thread André Almeida
Even if there's nothing currently parsing amdgpu's coredump files, if we eventually have such tools they will be glad to find a version field to properly read the file. Create a version number to be displayed on top of coredump file, to be incremented when the file format or content get changed.

[PATCH v4 3/4] drm/amdgpu: Move coredump code to amdgpu_reset file

2023-08-15 Thread André Almeida
Giving that we use codedump just for device resets, move it's functions and structs to a more semantic file, the amdgpu_reset.{c, h}. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 9 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 78 --

[PATCH v4 2/4] drm/amdgpu: Rework coredump to use memory dynamically

2023-08-15 Thread André Almeida
Instead of storing coredump information inside amdgpu_device struct, move if to a proper separated struct and allocate it dynamically. This will make it easier to further expand the logged information. Signed-off-by: André Almeida --- v4: change kmalloc to kzalloc ---

[PATCH v4 1/4] drm/amdgpu: Allocate coredump memory in a nonblocking way

2023-08-15 Thread André Almeida
During a GPU reset, a normal memory reclaim could block to reclaim memory. Giving that coredump is a best effort mechanism, it shouldn't disturb the reset path. Change its memory allocation flag to a nonblocking one. Signed-off-by: André Almeida Reviewed-by: Christian König ---

[PATCH v4 0/4] drm/amdgpu: Rework coredump memory allocation

2023-08-15 Thread André Almeida
Hi, The patches of this set are a rework to alloc devcoredump dynamically and to move it to a better source file. Thanks, André Changelog: v3: https://lore.kernel.org/dri-devel/20230810192330.198326-1-andrealm...@igalia.com/ - Changed from kmalloc to kzalloc - Dropped "Create a module

[PATCH v6 6/6] drm/doc: Define KMS atomic state set

2023-08-15 Thread André Almeida
From: Pekka Paalanen Specify how the atomic state is maintained between userspace and kernel, plus the special case for async flips. Signed-off-by: Pekka Paalanen Signed-off-by: André Almeida --- v5: Add note that not every redundant attribute will result in no-op v4: total rework by Pekka

[PATCH v6 5/6] drm: Refuse to async flip with atomic prop changes

2023-08-15 Thread André Almeida
Given that prop changes may lead to modesetting, which would defeat the fast path of the async flip, refuse any atomic prop change for async flips in atomic API. The only exceptions are the framebuffer ID to flip to and the mode ID, that could be referring to an identical mode. Signed-off-by:

[PATCH v6 4/6] amd/display: indicate support for atomic async page-flips on DC

2023-08-15 Thread André Almeida
From: Simon Ser amdgpu_dm_commit_planes() already sets the flip_immediate flag for async page-flips. This flag is used to set the UNP_FLIP_CONTROL register. Thus, no additional change is required to handle async page-flips with the atomic uAPI. Signed-off-by: Simon Ser Reviewed-by: André

[PATCH v6 3/6] drm: introduce drm_mode_config.atomic_async_page_flip_not_supported

2023-08-15 Thread André Almeida
From: Simon Ser This new field indicates whether the driver has the necessary logic to support async page-flips via the atomic uAPI. This is leveraged by the next commit to allow user-space to use this functionality. All atomic drivers setting drm_mode_config.async_page_flip are updated to also

[PATCH v6 2/6] drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP

2023-08-15 Thread André Almeida
From: Simon Ser This new kernel capability indicates whether async page-flips are supported via the atomic uAPI. DRM clients can use it to check for support before feeding DRM_MODE_PAGE_FLIP_ASYNC to the kernel. Make it clear that DRM_CAP_ASYNC_PAGE_FLIP is for legacy uAPI only. Signed-off-by:

[PATCH v6 1/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits

2023-08-15 Thread André Almeida
From: Simon Ser If the driver supports it, allow user-space to supply the DRM_MODE_PAGE_FLIP_ASYNC flag to request an async page-flip. Set drm_crtc_state.async_flip accordingly. Document that drivers will reject atomic commits if an async flip isn't possible. This allows user-space to fall back

[PATCH v6 0/6] drm: Add support for atomic async page-flip

2023-08-15 Thread André Almeida
Hi, This work from me and Simon adds support for DRM_MODE_PAGE_FLIP_ASYNC through the atomic API. This feature is already available via the legacy API. The use case is to be able to present a new frame immediately (or as soon as possible), even if after missing a vblank. This might result in

Re: [PATCH v2] drm/amdgpu: register a dirty framebuffer callback for fbcon

2023-08-15 Thread Mario Limonciello
On 8/15/2023 12:26, Hamza Mahfooz wrote: fbcon requires that we implement _framebuffer_funcs.dirty. Otherwise, the framebuffer might take a while to flush (which would manifest as noticeable lag). However, we can't enable this callback for non-fbcon cases since it might cause too many atomic

RE: [PATCH v2] drm/amdgpu/pm: Add notification function for no DC support

2023-08-15 Thread Zhang, Bokun
[Public] Hey Lijo, I have considered to combine the function. However notify_display_change() may serve for another purpose as mentioned in the comment: /** * @notify_display_change: Enable fast memory clock switching. * * Allows

Re: [PATCH v2] drm/amdgpu/pm: Add notification function for no DC support

2023-08-15 Thread Lazar, Lijo
[Public] There's already another smu callback - notify_display. This can be accommodated there, no need to add another callback. Thanks, Lijo From: amd-gfx on behalf of Deucher, Alexander Sent: Tuesday, August 15, 2023 11:13:14 PM To: Zhang, Bokun ;

RE: [PATCH v2] drm/amdgpu/pm: Add notification function for no DC support

2023-08-15 Thread Deucher, Alexander
[Public] > -Original Message- > From: amd-gfx On Behalf Of Bokun > Zhang > Sent: Tuesday, August 15, 2023 11:50 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhang, Bokun ; Quan, Evan > > Subject: [PATCH v2] drm/amdgpu/pm: Add notification function for no DC > support > > - There is a

[PATCH v2] drm/amdgpu: register a dirty framebuffer callback for fbcon

2023-08-15 Thread Hamza Mahfooz
fbcon requires that we implement _framebuffer_funcs.dirty. Otherwise, the framebuffer might take a while to flush (which would manifest as noticeable lag). However, we can't enable this callback for non-fbcon cases since it might cause too many atomic commits to be made at once. So, implement

[PATCH] drm/amdgpu: register a dirty framebuffer callback for fbcon

2023-08-15 Thread Hamza Mahfooz
fbcon requires that we implement _framebuffer_funcs.dirty. Otherwise, the framebuffer might take awhile to flush (which would manifest as noticeable lag). However, we can't enable this callback for non-fbcon cases since it might cause too many atomic commits to be made at once. So, implement

Re: [PATCH] drm/amd/pm: allow the user to force BACO on smu v13.0.0/7

2023-08-15 Thread Alex Deucher
On Tue, Aug 15, 2023 at 5:05 AM Kenneth Feng wrote: > > allow the user to force BACO on smu v13.0.0/7 > > Signed-off-by: Kenneth Feng Acked-by: Alex Deucher Would it be better to default to BACO? It would save more power at the expense of resume latency. Alex > --- >

[PATCH v2] drm/amdgpu/pm: Add notification function for no DC support

2023-08-15 Thread Bokun Zhang
- There is a DPM issue where if DC is not present, FCLK will stay at low level. We need to send a SMU message to configure the DPM Reviewed-by: Evan Quan Signed-off-by: Bokun Zhang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++

Re: [PATCH] drm/amdgpu/gmc6: fix in case the PCI BAR is larger than the actual amount of vram

2023-08-15 Thread Alex Deucher
Applied. Thanks! On Tue, Aug 15, 2023 at 3:13 AM hongao wrote: > > [why] > limit visible_vram_size to real_vram_size in case > the PCI BAR is larger than the actual amount of vram. > > Signed-off-by: hongao > --- > drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 ++ > 1 file changed, 2

Re: [PATCH] drm/amdgpu/pm: Add notification function for no DC support

2023-08-15 Thread Hamza Mahfooz
Hi Bokun, On 8/15/23 10:29, Bokun Zhang wrote: - There is a DPM issue where if DC is not present, FCLK will stay at low level. We need to send a SMU message to configure the DPM Signed-off-by: Bokun Zhang Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

[PATCH] drm/amdgpu/pm: Add notification function for no DC support

2023-08-15 Thread Bokun Zhang
- There is a DPM issue where if DC is not present, FCLK will stay at low level. We need to send a SMU message to configure the DPM Signed-off-by: Bokun Zhang Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++

[PATCH] drm/amdgpu/gmc6: fix in case the PCI BAR is larger than the actual amount of vram

2023-08-15 Thread hongao
[why] limit visible_vram_size to real_vram_size in case the PCI BAR is larger than the actual amount of vram. Signed-off-by: hongao --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c

[PATCH] drm/amd/pm: allow the user to force BACO on smu v13.0.0/7

2023-08-15 Thread Kenneth Feng
allow the user to force BACO on smu v13.0.0/7 Signed-off-by: Kenneth Feng --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 3 ++- 3 files changed, 5

[PATCH 7/8] drm/amd/pm: add fan target temperature OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan target temperature OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 +

[PATCH 8/8] drm/amd/pm: add fan minimum pwm OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan minimum pwm OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

[PATCH 5/8] drm/amd/pm: add fan acoustic limit OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan acoustic limit OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 +

[PATCH 4/8] drm/amd/pm: add fan temperature/pwm curve OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan temperature/pwm curve OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 ++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 +

[PATCH 6/8] drm/amd/pm: add fan acoustic target OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan acoustic target OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 +

[PATCH 0/8] A new set of Linux OD interfaces

2023-08-15 Thread Evan Quan
The existing OD interface `pp_od_clk_voltage` is unable to meet the growing demands for more OD functionalities. Since the buf used within it comes with size limit as one page. With more OD functionalities added, we will hit that limit soon. To better meet the growing demainds, a new set of OD

[PATCH 3/8] drm/amd/pm: add fan mode OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan mode OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 4 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c| 189 +- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 4 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

[PATCH 2/8] drm/amdgpu: revise the device initialization sequences

2023-08-15 Thread Evan Quan
By placing the sysfs interfaces creation after `.late_int`. Since some operations performed during `.late_init` may affect how the sysfs interfaces should be created. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 37 -- 1 file changed, 21

[PATCH 1/8] drm/amd/pm: introduce a new set of OD interfaces

2023-08-15 Thread Evan Quan
There will be multiple interfaces(sysfs files) exposed with each representing a single OD functionality. And all those interface will be arranged in a tree liked hierarchy with the top dir as "gpu_od". Meanwhile all functionalities for the same component will be arranged under the same directory.

Re: [RESEND v3 1/5] drm/amdgpu: Create a module param to disable soft recovery

2023-08-15 Thread Christian König
Am 10.08.23 um 21:23 schrieb André Almeida: Create a module parameter to disable soft recoveries on amdgpu, making every recovery go through the device reset path. This option makes easier to force device resets for testing and debugging purposes. I'm still torn apart on this. On the one hand