linux-block.git
13 months agodrm/amd/display: workaround for oled eDP not lighting up on DCN401
Joshua Aberback [Mon, 13 May 2024 22:14:59 +0000 (18:14 -0400)]
drm/amd/display: workaround for oled eDP not lighting up on DCN401

[Why]
Currently there's an issue on DCN401 that prevents oled eDP panels from
being lit up that is still under investigation. To unblock dev work
while investigating, we can work around the issue by skipping toggling
the enablement of the backlight.

[How]
 - new debug bit that will skip touching backlight enable DPCD for oled

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Add params of set_abm_event for VB Scaling
Chun-LiangChang [Fri, 10 May 2024 07:00:18 +0000 (02:00 -0500)]
drm/amd/display: Add params of set_abm_event for VB Scaling

[Why]
Add parameters for set_abm_event to enable varibright scaling.
VariBright Scaling is a feature to refer to system states like

1. Power mode
2. Battery Life percent
3. FullScreen video
4. Backlight slider

to adjust variBright strength to get low power or user experience.

[How]
Add parameters of set_abm_event for VB Scaling

Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Chun-LiangChang <chuchang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Fix swapped dimension calculations
Joshua Aberback [Mon, 13 May 2024 18:05:58 +0000 (14:05 -0400)]
drm/amd/display: Fix swapped dimension calculations

[Why]
The values calculated in optc1_get_otg_active_size are assigned to the
wrong output parameters, vertical blank is being used for horizontal size
and vice versa. This results in DPG test pattern looking wrong during
hardware init, as the DPG dimensions get assigned from this output, and
potentially other issues.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Wait for hardmins to complete on dcn401
Dillon Varone [Mon, 13 May 2024 18:24:14 +0000 (14:24 -0400)]
drm/amd/display: Wait for hardmins to complete on dcn401

[WHY&HOW]
When updating clocks via SMU, DAL needs to wait for requests to be fulfilled
before proceeding.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Dillon Varone <dillon.varone@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: turn on symclk for dio virtual stream in dpms sequence
Wenjing Liu [Fri, 10 May 2024 16:43:53 +0000 (12:43 -0400)]
drm/amd/display: turn on symclk for dio virtual stream in dpms sequence

[why]
In order to support glitchless display clock ramping for virtual stream,
we must
turn on symclk for stream encoder. The code will power on phy and enable
symclk
for dio encoder during virtual stream dpms sequence.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Keep VBios pixel rate div setting until next mode set
yi-lchen [Mon, 29 Apr 2024 06:28:36 +0000 (14:28 +0800)]
drm/amd/display: Keep VBios pixel rate div setting until next mode set

[why]
Vbios & Driver have difference pixel rate div policy.
When enabling fast boot & performing blank & unblank w/o timing setting,
pixel clock & pixel rate dividor are not match.
It would cause too high pixel reate and eDP would be black screen.

[How]
We would keep pixel rate div setting by Vbios until next timing setting.

Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: yi-lchen <yi-lchen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agoRevert "drm/amdgpu/gfx11: enable gfx pipe1 hardware support"
Alex Deucher [Fri, 31 May 2024 17:40:03 +0000 (13:40 -0400)]
Revert "drm/amdgpu/gfx11: enable gfx pipe1 hardware support"

This reverts commit 6670142d25f3cc3166f2a6c8454acd310bf2776a.

Pierre-Eric reported problems with this on his navi33.  Revert
for now until we understand what is going wrong.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Pierre-eric.Pelloux-prayer@amd.com
13 months agodrm/amdgpu: update gc_12_0_0 headers
Alex Deucher [Fri, 31 May 2024 15:57:00 +0000 (11:57 -0400)]
drm/amdgpu: update gc_12_0_0 headers

Add some additional registers.

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: define new gfx12 uapi flags
Marek Olšák [Sat, 29 Apr 2023 11:49:07 +0000 (07:49 -0400)]
drm/amdgpu: define new gfx12 uapi flags

define new gfx12 uapi flags

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdkfd: remove dead code in the function svm_range_get_pte_flags
Jesse Zhang [Thu, 30 May 2024 02:41:03 +0000 (10:41 +0800)]
drm/amdkfd: remove dead code in the function svm_range_get_pte_flags

The varible uncached  set false, the condition uncached cannot be true.
So remove the dead code, mapping flags will set the flag AMDGPU_VM_MTYPE_UC in else.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Update the impelmentation of AMDGPU_PTE_MTYPE_NV10
Shane Xiao [Wed, 29 May 2024 09:57:31 +0000 (17:57 +0800)]
drm/amdgpu: Update the impelmentation of AMDGPU_PTE_MTYPE_NV10

This patch changes the implementation of AMDGPU_PTE_MTYPE_NV10,
clear the bits before setting the new one.

Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: longlyao <Longlong.Yao@amd.com>
Signed-off-by: Shane Xiao <shane.xiao@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: disable lane0 L1TLB and enable lane1 L1TLB
Yifan Zhang [Thu, 23 May 2024 06:10:30 +0000 (14:10 +0800)]
drm/amdgpu: disable lane0 L1TLB and enable lane1 L1TLB

This patch to disable lane0 L1TLB and enable lane1 L1TLB.

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: init SAW registers for mmhub v3.3
Yifan Zhang [Mon, 6 May 2024 07:48:54 +0000 (15:48 +0800)]
drm/amdgpu: init SAW registers for mmhub v3.3

This patch to configure mmhub3.3 SAW registers

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/pptable: Fix UBSAN array-index-out-of-bounds
Tasos Sahanidis [Fri, 31 May 2024 16:23:30 +0000 (19:23 +0300)]
drm/amdgpu/pptable: Fix UBSAN array-index-out-of-bounds

Flexible arrays used [1] instead of []. Replace the former with the latter
to resolve multiple UBSAN warnings observed on boot with a BONAIRE card.

In addition, use the __counted_by attribute where possible to hint the
length of the arrays to the compiler and any sanitizers.

Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Fix a handful of spelling mistakes
Colin Ian King [Fri, 31 May 2024 09:32:11 +0000 (10:32 +0100)]
drm/amd/display: Fix a handful of spelling mistakes

There are a few spelling mistakes in dml2_printf messages. Fix them.

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix comments and error message for ipdump
Sunil Khatri [Fri, 31 May 2024 07:07:39 +0000 (12:37 +0530)]
drm/amdgpu: fix comments and error message for ipdump

Fix comments and error messages to rightly represent
the information.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: rename ip_dump_cp_queues to compute queues
Sunil Khatri [Fri, 31 May 2024 06:52:20 +0000 (12:22 +0530)]
drm/amdgpu: rename ip_dump_cp_queues to compute queues

Rename the variable ip_dump_cp_queues to ip_dump_compute_queue
as it represent compute queues.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add cp queue registers for gfx9 ipdump
Sunil Khatri [Wed, 29 May 2024 06:17:55 +0000 (11:47 +0530)]
drm/amdgpu: add cp queue registers for gfx9 ipdump

Add gfx9 support of CP queue registers for all queues
to be used by devcoredump.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add print support for gfx9 ipdump
Sunil Khatri [Wed, 29 May 2024 06:01:08 +0000 (11:31 +0530)]
drm/amdgpu: add print support for gfx9 ipdump

Add support of gfx9 ipdump print so devcoredump
could trigger it to dump the captured registers
in devcoredump.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add gfx9 register support in ipdump
Sunil Khatri [Wed, 29 May 2024 05:50:20 +0000 (11:20 +0530)]
drm/amdgpu: add gfx9 register support in ipdump

Add general registers of gfx9 in ipdump for
devcoredump support.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Fix type mismatch in amdgpu_gfx_kiq_init_ring
Srinivasan Shanmugam [Sat, 25 May 2024 02:09:01 +0000 (07:39 +0530)]
drm/amdgpu: Fix type mismatch in amdgpu_gfx_kiq_init_ring

This commit fixes a type mismatch in the amdgpu_gfx_kiq_init_ring
function triggered by the snprintf function expecting unsigned char
arguments due to the '%hhu' format specifier, but receiving int and u32
arguments.

The issue occurred because the arguments xcc_id, ring->me, ring->pipe,
and ring->queue were of type int and u32, not unsigned char. This led to
a type mismatch when these arguments were passed to snprintf.

To resolve this, the snprintf line was modified to cast these arguments
to unsigned char. This ensures that the arguments are of the correct
type for the '%hhu' format specifier and resolves the warning.

Fixes the below:
>> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:4: warning: format
>> specifies type 'unsigned char' but the argument has type 'int'
>> [-Wformat]
                    xcc_id, ring->me, ring->pipe, ring->queue);
                    ^~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:12: warning: format
>> specifies type 'unsigned char' but the argument has type 'u32' (aka
>> 'unsigned int') [-Wformat]
                    xcc_id, ring->me, ring->pipe, ring->queue);
                            ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:22: warning: format specifies type 'unsigned char' but the argument has type 'u32' (aka 'unsigned int') [-Wformat]
                    xcc_id, ring->me, ring->pipe, ring->queue);
                                      ^~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:34: warning: format specifies type 'unsigned char' but the argument has type 'u32' (aka 'unsigned int') [-Wformat]
                    xcc_id, ring->me, ring->pipe, ring->queue);
                                                  ^~~~~~~~~~~
   4 warnings generated.

Fixes: 0ea554455542 ("drm/amdgpu: Fix snprintf usage in amdgpu_gfx_kiq_init_ring")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405250446.XeaWe66u-lkp@intel.com/
Cc: Lijo Lazar <lijo.lazar@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgu: fix Unintentional integer overflow for mall size
Jesse Zhang [Wed, 29 May 2024 09:29:01 +0000 (17:29 +0800)]
drm/amdgu: fix Unintentional integer overflow for mall size

Potentially overflowing expression mall_size_per_umc * adev->gmc.num_umc with type unsigned int (32 bits, unsigned)
is evaluated using 32-bit arithmetic,and then used in a context that expects an expression of type u64 (64 bits, unsigned).

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Update programming for boot error reporting
Hawking Zhang [Thu, 30 May 2024 08:02:12 +0000 (16:02 +0800)]
drm/amdgpu: Update programming for boot error reporting

AMDGPU_RAS_GPU_ERR_BOOT_STATUS field is no longer valid.
The polling sequence is also simplifed according to
the latest firmware change.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/radeon: Remove __counted_by from StateArray.states[]
Bill Wendling [Wed, 29 May 2024 21:54:44 +0000 (14:54 -0700)]
drm/radeon: Remove __counted_by from StateArray.states[]

Work for __counted_by on generic pointers in structures (not just
flexible array members) has started landing in Clang 19 (current tip of
tree). During the development of this feature, a restriction was added
to __counted_by to prevent the flexible array member's element type from
including a flexible array member itself such as:

  struct foo {
    int count;
    char buf[];
  };

  struct bar {
    int count;
    struct foo data[] __counted_by(count);
  };

because the size of data cannot be calculated with the standard array
size formula:

  sizeof(struct foo) * count

This restriction was downgraded to a warning but due to CONFIG_WERROR,
it can still break the build. The application of __counted_by on the
states member of 'struct _StateArray' triggers this restriction,
resulting in:

  drivers/gpu/drm/radeon/pptable.h:442:5: error: 'counted_by' should not be applied to an array with element of unknown size because 'ATOM_PPLIB_STATE_V2' (aka 'struct _ATOM_PPLIB_STATE_V2') is a struct type with a flexible array member. This will be an error in a future compiler version [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size]
    442 |     ATOM_PPLIB_STATE_V2 states[] __counted_by(ucNumEntries);
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.

Remove this use of __counted_by to fix the warning/error. However,
rather than remove it altogether, leave it commented, as it may be
possible to support this in future compiler releases.

Cc: stable@vger.kernel.org
Closes: https://github.com/ClangBuiltLinux/linux/issues/2028
Fixes: efade6fe50e7 ("drm/radeon: silence UBSAN warning (v3)")
Signed-off-by: Bill Wendling <morbo@google.com>
Co-developed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/soc24: use common nbio callback to set remap offset
Alex Deucher [Wed, 8 May 2024 19:22:59 +0000 (15:22 -0400)]
drm/amdgpu/soc24: use common nbio callback to set remap offset

This fixes HDP flushes on systems with non-4K pages.

Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Convert some legacy DRM debug macros into appropriate categories
Tvrtko Ursulin [Tue, 28 May 2024 12:57:11 +0000 (13:57 +0100)]
drm/amd/display: Convert some legacy DRM debug macros into appropriate categories

Currently when one enables driver debugging dmesg gets spammed, at I
suspect vblank rate, with messages like:

 [drm:amdgpu_dm_atomic_check [amdgpu]] MPO enablement requested on crtc:[00000000f073c3bb]

Fix if by converting some logging from deprecated and incorrect
DRM_DEBUG_DRIVER to drm_dbg_atomic. Plus some localized drive-by changes
to drm_dbg_kms.

By no means an exhaustive conversion but at least it allows turning on
driver debug selectively.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Estimate RAS reservation when report capacity v2
Hawking Zhang [Tue, 28 May 2024 05:52:46 +0000 (13:52 +0800)]
drm/amdgpu: Estimate RAS reservation when report capacity v2

Add estimate of how much vram we need to reserve for RAS
when caculating the total available vram.

v2: apply the change to MP0 v13_0_2 and v13_0_14

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: use u32 for buf size in __amdgpu_eeprom_xfer
Tao Zhou [Mon, 20 May 2024 08:47:32 +0000 (16:47 +0800)]
drm/amdgpu: use u32 for buf size in __amdgpu_eeprom_xfer

And also make sure the value of msg[1].len should be in the range of u16.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdkfd: gfx12 context save/restore trap handler fixes
Jay Cornwall [Thu, 23 May 2024 14:00:28 +0000 (09:00 -0500)]
drm/amdkfd: gfx12 context save/restore trap handler fixes

Fix LDS size interpretation: 512 bytes (>= gfx12) vs 256 (< gfx12).

Ensure STATE_PRIV.BARRIER_COMPLETE cannot change after reading or
before writing. Other waves in the threadgroup may cause this field
to assert if they complete the barrier.

Do not overwrite EXCP_FLAG_PRIV.{SAVE_CONTEXT,HOST_TRAP} when
restoring this register. Both of these fields can assert while the
wavefront is running the trap handler.

Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
Reviewed-by: Lancelot Six <lancelot.six@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: drop some kernel messages in VCN code
David (Ming Qiang) Wu [Thu, 23 May 2024 14:50:18 +0000 (10:50 -0400)]
drm/amdgpu: drop some kernel messages in VCN code

We have messages when the VCN fails to initialize and
there is no need to report on success.
Also PSP loading FWs is the default for production.

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Sonny Jiang <sonjiang@amd.com>
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Update the impelmentation of AMDGPU_PTE_MTYPE_GFX12
Shane Xiao [Wed, 29 May 2024 09:53:11 +0000 (17:53 +0800)]
drm/amdgpu: Update the impelmentation of AMDGPU_PTE_MTYPE_GFX12

This patch changes the implementation of AMDGPU_PTE_MTYPE_GFX12,
clear the bits before setting the new one.
This fixed the potential issue that GFX12 setting memory to NC.

v2: Clear mtype field before setting the new one (Alex)
v3: Fix typo (Felix)

Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: longlyao <Longlong.Yao@amd.com>
Signed-off-by: Shane Xiao <shane.xiao@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Move 'struct scaler_data' off stack
Arnd Bergmann [Tue, 28 May 2024 11:51:21 +0000 (13:51 +0200)]
drm/amd/display: Move 'struct scaler_data' off stack

The scaler_data structure is implicitly copied onto the stack twice by
being returned from a function. This is usually a bad idea, but it
was not flagged by the compiler until a recent addition that pushed
it over the 1024 byte function stack limit:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_translation_helper.c: In function 'populate_dml_plane_cfg_from_plane_state':
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_translation_helper.c:1075:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Use an explicit kzalloc() and memcpy() instead here to keep it off the
stack.

Fixes: 00c391102abc ("drm/amd/display: Add misc DC changes for DCN401")
Fixes: 7966f319c66d ("drm/amd/display: Introduce DML2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: avoid large on-stack structures
Arnd Bergmann [Tue, 28 May 2024 11:51:20 +0000 (13:51 +0200)]
drm/amd/display: avoid large on-stack structures

Putting excessively large objects on a function stack causes
a warning about possibly overflowing the 8KiB of kernel stack:

drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn401/dcn401_resource.c: In function 'dcn401_update_bw_bounding_box':
drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn401/dcn401_resource.c:1599:1: error: the frame size of 1196 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
 1599 | }
      | ^
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c: In function 'dc_state_create':
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:221:1: error: the frame size of 1196 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
  221 | }
      | ^

Use dynamic allocation instead.

Fixes: e779f4587f61 ("drm/amd/display: Add handling for DC power mode")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: fix graphics_object_id size
Arnd Bergmann [Tue, 28 May 2024 11:51:19 +0000 (13:51 +0200)]
drm/amd/display: fix graphics_object_id size

The graphics_object_id structure is meant to fit into 32 bits, as it's
passed by value in and out of functions. A recent change increased
the size to 128 bits, so it's now always passed by reference, which
is clearly not intended and ends up producing a compile-time warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c: In function 'construct_phy':
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:743:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Add back the bitfields to revert to the original size, while keeping
the 'enum' type change.

Fixes: fec85f995a4b ("drm/amd/display: Fix compiler redefinition warnings for certain configs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: dynamically allocate dml2_configuration_options structures
Arnd Bergmann [Tue, 28 May 2024 11:51:18 +0000 (13:51 +0200)]
drm/amd/display: dynamically allocate dml2_configuration_options structures

This structure is too large to fit on a stack, as shown by the
newly introduced warnings from a recent code change:

drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn32/dcn32_resource.c: In function 'dcn32_update_bw_bounding_box':
drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn32/dcn32_resource.c:2019:1: error: the frame size of 1180 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn321/dcn321_resource.c: In function 'dcn321_update_bw_bounding_box':
drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn321/dcn321_resource.c:1597:1: error: the frame size of 1180 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c: In function 'dc_state_create':
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:219:1: error: the frame size of 1184 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Instead of open-coding the assignment of a large structure to a stack
variable, use an explicit kmemdup() in each case to move it off the stack.

Fixes: e779f4587f61 ("drm/amd/display: Add handling for DC power mode")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrivers/gpu: Fix misalignment in comment block
Bruno Rocha Levi [Tue, 28 May 2024 13:08:04 +0000 (10:08 -0300)]
drivers/gpu: Fix misalignment in comment block

This patch fixes a warning from checkpatch by ensuring the trailing */ is
aligned with the rest of the *, improving readability.

Co-developed-by: Lucas Antonio <lucasantonio.santos@usp.br>
Signed-off-by: Lucas Antonio <lucasantonio.santos@usp.br>
Signed-off-by: Bruno Rocha Levi <brunolevilevi@usp.br>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdkfd: Replace deprecated gfx12 trap handler instructions
Jay Cornwall [Thu, 23 May 2024 13:58:11 +0000 (08:58 -0500)]
drm/amdkfd: Replace deprecated gfx12 trap handler instructions

Newer assemblers reject S_WAITCNT. All instances of S_WAITCNT can be
replaced by S_WAITCNT 0 (< gfx12) or S_WAIT_IDLE (>= gfx12) since
there is no concurrency of different memory instruction classes.

Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
Reviewed-by: Lancelot Six <lancelot.six@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdkfd: Sync trap handler binary with source
Jay Cornwall [Thu, 23 May 2024 13:55:44 +0000 (08:55 -0500)]
drm/amdkfd: Sync trap handler binary with source

Source and binary have become mismatched during branch activity.

Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
Reviewed-by: Lancelot Six <lancelot.six@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms
Mario Limonciello [Sun, 26 May 2024 12:59:08 +0000 (07:59 -0500)]
drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms

commit cd94d1b182d2 ("dm/amd/pm: Fix problems with reboot/shutdown for
some SMU 13.0.4/13.0.11 users") attempted to fix shutdown issues
that were reported since commit 31729e8c21ec ("drm/amd/pm: fixes a
random hang in S4 for SMU v13.0.4/11") but caused issues for some
people.

Adjust the workaround flow to properly only apply in the S4 case:
-> For shutdown go through SMU_MSG_PrepareMp1ForUnload
-> For S4 go through SMU_MSG_GfxDeviceDriverReset and
   SMU_MSG_PrepareMp1ForUnload

Reported-and-tested-by: lectrode <electrodexsnet@gmail.com>
Closes: https://github.com/void-linux/void-packages/issues/50417
Cc: stable@vger.kernel.org
Fixes: cd94d1b182d2 ("dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users")
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/gfx11: enable gfx pipe1 hardware support
Alex Deucher [Thu, 11 Apr 2024 21:16:09 +0000 (17:16 -0400)]
drm/amdgpu/gfx11: enable gfx pipe1 hardware support

Enable gfx pipe1 hardware support.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Make CPX mode auto default in NPS4
Rajneesh Bhardwaj [Wed, 22 May 2024 19:04:29 +0000 (15:04 -0400)]
drm/amdgpu: Make CPX mode auto default in NPS4

On GFXIP9.4.3, make CPX mode as the default compute mode if the node is
setup in NPS4 memory partition mode. This change is only applicable for
dGPU, for APU, continue to use TPX mode.

Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/gfx11: handle priority setup for gfx pipe1
Alex Deucher [Thu, 2 May 2024 21:04:01 +0000 (17:04 -0400)]
drm/amdgpu/gfx11: handle priority setup for gfx pipe1

Set up pipe1 as a high priority queue.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/gfx11: select HDP ref/mask according to gfx ring pipe
Alex Deucher [Thu, 11 Apr 2024 21:13:13 +0000 (17:13 -0400)]
drm/amdgpu/gfx11: select HDP ref/mask according to gfx ring pipe

Use correct ref/mask for differnent gfx ring pipe. Ported from
ZhenGuo's patch for gfx10.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Add lock around VF RLCG interface
Victor Skvortsov [Mon, 27 May 2024 20:10:43 +0000 (16:10 -0400)]
drm/amdgpu: Add lock around VF RLCG interface

flush_gpu_tlb may be called from another thread while
device_gpu_recover is running.

Both of these threads access registers through the VF
RLCG interface during VF Full Access. Add a lock around this interface
to prevent race conditions between these threads.

Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com>
Reviewed-by: Zhigang Luo <zhigang.luo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdkfd: simplify APU VRAM handling
Alex Deucher [Wed, 22 May 2024 19:26:50 +0000 (15:26 -0400)]
drm/amdkfd: simplify APU VRAM handling

With commit 89773b85599a
("drm/amdkfd: Let VRAM allocations go to GTT domain on small APUs")
big and small APU "VRAM" handling in KFD was unified.  Since AMD_IS_APU
is set for both big and small APUs, we can simplify the checks in
the code.

v2: clean up a few more places (Lang)

Acked-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Lang Yu <Lang.Yu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agoRevert "drm/amdkfd: fix gfx_target_version for certain 11.0.3 devices"
Alex Deucher [Mon, 20 May 2024 18:41:31 +0000 (14:41 -0400)]
Revert "drm/amdkfd: fix gfx_target_version for certain 11.0.3 devices"

This reverts commit 28ebbb4981cb1fad12e0b1227dbecc88810b1ee8.

Revert this commit as apparently the LLVM code to take advantage of
this never landed.

Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Feifei Xu <feifei.xu@amd.com>
13 months agodrm/amd/display: Enable copying of bounding box data from VBIOS DMUB
Aurabindo Pillai [Tue, 21 May 2024 19:46:31 +0000 (19:46 +0000)]
drm/amd/display: Enable copying of bounding box data from VBIOS DMUB

Allocate some memory, send the address in chunks to dmub, and finally
ask it to copy the bounding box data into the newly allocated memory.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Add new GPINT command definitions
Aurabindo Pillai [Thu, 16 May 2024 14:30:53 +0000 (10:30 -0400)]
drm/amd/display: Add new GPINT command definitions

New commands for enabling copy of DC bounding box values from VBIOS DMUB

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Move some init routines to dm_sw_init()
Aurabindo Pillai [Thu, 16 May 2024 14:23:19 +0000 (10:23 -0400)]
drm/amd/display: Move some init routines to dm_sw_init()

Move creation of CGS device node and the DAL allocation list from
amdgpu_dm_init() to dm_sw_init() which runs before dmub's sw init hook.

This is required for communicating with the VBIOS DMUB image from the
VBIOS that was loaded for early pre-os boot.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Add missing registers for DCN401
Rodrigo Siqueira [Fri, 17 May 2024 19:10:20 +0000 (13:10 -0600)]
drm/amd/display: Add missing registers for DCN401

Add some additional registers.

Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Fix null pointer dereference for dcn401
Aurabindo Pillai [Tue, 14 May 2024 00:17:00 +0000 (00:17 +0000)]
drm/amd/display: Fix null pointer dereference for dcn401

When ODM slice happens on DCN401, there is a null pointer exception
caused by that. This commit address this issue by checking if the
required data structures are initialized.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Remove incorrect FP context start
Aurabindo Pillai [Tue, 14 May 2024 00:08:58 +0000 (20:08 -0400)]
drm/amd/display: Remove incorrect FP context start

All the DC_FP_START/END should be used before call anything from DML2,
for this reason, the use of those guards inside DML it is not correct.
This commit removes two unnecessary DC_FP_START/END from a dml2
function.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Use DCN 410 includes for DCN401
Aurabindo Pillai [Mon, 13 May 2024 23:31:10 +0000 (19:31 -0400)]
drm/amd/display: Use DCN 410 includes for DCN401

DCN401 is using DCN 320 headers, which does not have all the right
registers for DCN401. This commit just replace DCN320 includes with the
one from DCN410.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Remove unnecessary HPD entry for DCN401
Aurabindo Pillai [Mon, 13 May 2024 21:06:12 +0000 (17:06 -0400)]
drm/amd/display: Remove unnecessary HPD entry for DCN401

Drop the extra HPD irq entry for DCN401.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Update DML2.1 generated code
Rodrigo Siqueira [Mon, 29 Apr 2024 18:07:50 +0000 (14:07 -0400)]
drm/amd/display: Update DML2.1 generated code

Most of the DML code is generated, and it is necessary to update some
parts of it from time to time. This commit brings the latest generated
code for DML 2.1.

Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Refactor HUBP into component folder.
Pinninti [Thu, 25 Apr 2024 11:33:59 +0000 (17:03 +0530)]
drm/amd/display: Refactor HUBP into component folder.

[why]
cleaning up the code refactor requires hubp to be in its own component.

[how]
move all files under newly created hubp folder and fixing the makefiles.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Pinninti <bpinnint@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Remove unused code
Rodrigo Siqueira [Tue, 14 May 2024 17:22:00 +0000 (11:22 -0600)]
drm/amd/display: Remove unused code

This commit removes some unused code with the required adjustments.

Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Enable ISHARP support for DCN401
Samson Tam [Fri, 26 Apr 2024 16:17:26 +0000 (12:17 -0400)]
drm/amd/display: Enable ISHARP support for DCN401

[Why]
Enable sharpener support for DCN401

[How]
- Removed memcmp check that was preventing ISHARP from being enabled.
- Add missing ISHARP register defines, masks, and writes.
- Add programming of Blur and Scale coefficients.
- Program FMT_MODE and NLDELTA registers based on LLS_PREF and pixel
- format
- Only enable ISHARP for YUV420
- Add disabling of ISHARP
- Add debug flags and registry keys for debugging ISHARP.
- Set default to medium level

Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Fix incorrect cursor position for dcn401
Sridevi [Fri, 26 Apr 2024 22:06:26 +0000 (18:06 -0400)]
drm/amd/display: Fix incorrect cursor position for dcn401

[Why]
Incorrect cursor position calculation in some scenarios.  Also for
mirror and rotation cases.

[How]
Fix for incorrect cursor position.  Added new test scenarios for diags
cursor test.  Updated CRC for few of the diags cursor test scenarios.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Sridevi <sarvinde@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix typo in amdgpu_ras_aca_sysfs_read() function
Yang Wang [Mon, 27 May 2024 07:40:38 +0000 (15:40 +0800)]
drm/amdgpu: fix typo in amdgpu_ras_aca_sysfs_read() function

fix typo "info.ue_count" in amdgpu_ras_aca_sysfs_read() function.

Fixes: 865d3397630b ("drm/amdgpu: add aca deferred error type support")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix dereference null return value for the function amdgpu_vm_pt_parent
Jesse Zhang [Thu, 23 May 2024 09:14:45 +0000 (17:14 +0800)]
drm/amdgpu: fix dereference null return value for the function amdgpu_vm_pt_parent

The pointer parent may be NULLed by the function amdgpu_vm_pt_parent.
To make the code more robust, check the pointer parent.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/amdgpu: add AMD_PG_SUPPORT_VCN_DPG flag
David (Ming Qiang) Wu [Thu, 23 May 2024 18:14:35 +0000 (14:14 -0400)]
drm/amd/amdgpu: add AMD_PG_SUPPORT_VCN_DPG flag

AMD_PG_SUPPORT_VCN_DPG is needed for secure parts
and should/can be enabled by now.

Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Sonny Jiang <sonjiang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: drop MES 10.1 support v3
Alex Deucher [Thu, 2 May 2024 20:50:39 +0000 (16:50 -0400)]
drm/amdgpu: drop MES 10.1 support v3

It was an enablement vehicle for MES 11 and was never
productized.  Remove it.

v2: drop additional checks in the GFX10 code.
v3: drop mes_api_def.h

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: clean up some inconsistent indenting
Jiapeng Chong [Fri, 24 May 2024 02:19:20 +0000 (10:19 +0800)]
drm/amd/display: clean up some inconsistent indenting

No functional modification involved.

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:5200 dc_power_down_on_boot() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9166
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: silence UBSAN warning
Alex Deucher [Thu, 16 May 2024 13:51:26 +0000 (09:51 -0400)]
drm/amdgpu: silence UBSAN warning

Convert a variable sized array from [1] to [].

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Adjust logic in amdgpu_device_partner_bandwidth()
Alex Deucher [Wed, 15 May 2024 15:25:49 +0000 (11:25 -0400)]
drm/amdgpu: Adjust logic in amdgpu_device_partner_bandwidth()

Use current speed/width on devices which don't support
dynamic PCIe switching.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3289
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Enable colorspace property for MST connectors
Mario Limonciello [Wed, 8 May 2024 21:45:35 +0000 (16:45 -0500)]
drm/amd/display: Enable colorspace property for MST connectors

MST colorspace property support was disabled due to a series of warnings
that came up when the device was plugged in since the properties weren't
made at device creation. Create the properties in advance instead.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: 69a959610229 ("drm/amd/display: Temporary Disable MST DP Colorspace Property").
Reported-and-tested-by: Tyler Schneider <tyler.schneider@amd.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3353
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/display: Fix null pointer dereference in dc_stream_program_cursor_position
Srinivasan Shanmugam [Wed, 22 May 2024 15:24:50 +0000 (20:54 +0530)]
drm/amdgpu/display: Fix null pointer dereference in dc_stream_program_cursor_position

The fix involves adding a null check for 'stream' at the beginning of
the function. If 'stream' is NULL, the function immediately returns
false. This ensures that 'stream' is not NULL when we dereference it to
access 'ctx' in 'dc = stream->ctx->dc;' the function.

Fixes the below:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:398 dc_stream_program_cursor_position()
error: we previously assumed 'stream' could be null (see line 397)

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c
    389 bool dc_stream_program_cursor_position(
    390         struct dc_stream_state *stream,
    391         const struct dc_cursor_position *position)
    392 {
    393         struct dc *dc;
    394         bool reset_idle_optimizations = false;
    395         const struct dc_cursor_position *old_position;
    396
    397         old_position = stream ? &stream->cursor_position : NULL;
                               ^^^^^^^^
The patch adds a NULL check

--> 398         dc = stream->ctx->dc;
                     ^^^^^^^^
The old code didn't check

    399
    400         if (dc_stream_set_cursor_position(stream, position)) {
    401                 dc_z10_restore(dc);
    402
    403                 /* disable idle optimizations if enabling cursor */
    404                 if (dc->idle_optimizations_allowed &&
    405                     (!old_position->enable || dc->debug.exit_idle_opt_for_cursor_updates) &&
    406                     position->enable) {
    407                         dc_allow_idle_optimizations(dc, false);

Fixes: f63f86b5affc ("drm/amd/display: Separate setting and programming of cursor")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Tom Chung <chiahsuan.chung@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Roman Li <roman.li@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add gfx queue support for gfx11 ipdump
Sunil Khatri [Wed, 22 May 2024 06:28:28 +0000 (11:58 +0530)]
drm/amdgpu: add gfx queue support for gfx11 ipdump

Add support of all the CP GFX queues for gfx11 ipdump
to be used by devcoredump.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add cp queue registers for gfx11 ipdump
Sunil Khatri [Wed, 22 May 2024 05:44:26 +0000 (11:14 +0530)]
drm/amdgpu: add cp queue registers for gfx11 ipdump

Add gfx11 support of CP queue registers for all queues
to be used by devcoredump.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Pass errors from amdgpu_dm_init() up
Mario Limonciello [Sun, 19 May 2024 13:02:23 +0000 (08:02 -0500)]
drm/amd/display: Pass errors from amdgpu_dm_init() up

Errors in amdgpu_dm_init() are silently ignored and dm_hw_init()
will succeed. However often these are fatal errors and it would
be better to pass them up.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add print support for gfx11 ipdump
Sunil Khatri [Wed, 15 May 2024 08:21:50 +0000 (13:51 +0530)]
drm/amdgpu: add print support for gfx11 ipdump

Add support of gfx11 ipdump print so devcoredump
could trigger it to dump the captured registers
in devcoredump.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add gfx11 registers support in ipdump
Sunil Khatri [Wed, 15 May 2024 08:04:40 +0000 (13:34 +0530)]
drm/amdgpu: add gfx11 registers support in ipdump

Add general registers of gfx11 in ipdump for
devcoredump support.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Add missing offsets in gc_11_0_0_offset.h
Sunil Khatri [Tue, 21 May 2024 13:43:44 +0000 (19:13 +0530)]
drm/amdgpu: Add missing offsets in gc_11_0_0_offset.h

IB1 registers:
regCP_IB1_CMD_BUFSZ
regCP_IB1_BASE_LO
regCP_IB1_BASE_HI
regCP_IB1_BUFSZ
regCP_MES_DEBUG_INTERRUPT_INSTR_PNTR

Above registers are part of the asic but not of
the offset file for gc_11_0_0_offset.h and hence
adding them.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add more device info to the devcoredump
Sunil Khatri [Tue, 14 May 2024 08:52:59 +0000 (14:22 +0530)]
drm/amdgpu: add more device info to the devcoredump

Adding more device information:
a. PCI info
b. VRAM and GTT info
c. GDC config

Also correct the print layout and section information for
in devcoredump.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add prints in IP State dump
Sunil Khatri [Thu, 9 May 2024 11:08:38 +0000 (16:38 +0530)]
drm/amdgpu: add prints in IP State dump

add prints before and after ip state is dumped.
It avoids user to think of system being
stuck/hung as dump could take some time after a
gpu hang.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add gfx queue support of gfx10 in ipdump
Sunil Khatri [Wed, 22 May 2024 05:24:17 +0000 (10:54 +0530)]
drm/amdgpu: add gfx queue support of gfx10 in ipdump

Add gfx queue register for all instances in devcoredump
for gfx10.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Add cp queues support fro gfx10 in ipdump
Sunil Khatri [Wed, 22 May 2024 05:13:22 +0000 (10:43 +0530)]
drm/amdgpu: Add cp queues support fro gfx10 in ipdump

Add support to dump registers of all instances of
cp queue registers of gfx10 to devcoredump.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: rename the ip_dump to ip_dump_core
Sunil Khatri [Tue, 7 May 2024 05:38:34 +0000 (11:08 +0530)]
drm/amdgpu: rename the ip_dump to ip_dump_core

Rename the memory pointer from ip_dump to ip_dump_core
to make it specific to core registers and rest other
registers to be dumped in their respective memories.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Add CRC16 selection in config
Lijo Lazar [Tue, 21 May 2024 07:03:23 +0000 (12:33 +0530)]
drm/amdgpu: Add CRC16 selection in config

KFD uses crc16 for gpu_id generation.

Fixes: 3ed181b8ff43 ("drm/amdkfd: Ensure gpu_id is unique")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405211405.TidTWIBX-lkp@intel.com/
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: workaround to pass jpeg unit test
Kenneth Feng [Fri, 26 Apr 2024 01:30:25 +0000 (09:30 +0800)]
drm/amd/pm: workaround to pass jpeg unit test

this is a workaround to pass jpeg unit test on vcn 5.0 now.
will be removed later.

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Sonny Jiang <sonny.jiang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/amdgpu: fix the inst passed to amdgpu_virt_rlcg_reg_rw
Victor Zhao [Mon, 13 May 2024 05:10:51 +0000 (13:10 +0800)]
drm/amd/amdgpu: fix the inst passed to amdgpu_virt_rlcg_reg_rw

the inst passed to amdgpu_virt_rlcg_reg_rw should be physical instance.
Fix the miss matched code.

Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu - optimize rlc spm cntl
Jane Jian [Sat, 11 May 2024 06:39:34 +0000 (14:39 +0800)]
drm/amdgpu - optimize rlc spm cntl

v1
- driver MMIO read the register to check whether write is required
- if write is required, sriov full time to use rlcg, otherwise use KIQ

v2
- include gfx v11 sriov runtime case

Signed-off-by: Jane Jian <Jane.Jian@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Refactor construct_phy function in dc/link/link_factory.c
Srinivasan Shanmugam [Fri, 10 May 2024 09:55:47 +0000 (15:25 +0530)]
drm/amd/display: Refactor construct_phy function in dc/link/link_factory.c

This commit modifies the construct_phy function to handle the case where
`bios->integrated_info` is NULL and to address a compiler warning about
a large stack allocation.

Upon examination, it was found that the local `integrated_info`
structure was just used to copy values which is large and was being
declared directly on the stack which could potentially lead to
performance issues. This commit changes the code to use
`bios->integrated_info` directly, which avoids the need for a large
stack allocation.

The function now checks if `bios->integrated_info` is NULL before
entering a for loop that uses it. If `bios->integrated_info` is NULL,
the function skips the for loop and continues executing the rest of the
code. This ensures that the function behaves correctly when
`bios->integrated_info` is NULL and improves compatibility with dGPUs.

Fixes the below with gcc W=1:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c: In function ‘construct_phy’:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:743:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Wenjing Liu <wenjing.liu@amd.com>
Cc: Jerry Zuo <jerry.zuo@amd.com>
Cc: Qingqing Zhuo <qingqing.zhuo@amd.com>
Cc: Tom Chung <chiahsuan.chung@amd.com>
Cc: Alvin Lee <alvin.lee2@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Roman Li <roman.li@amd.com>
Cc: Hersen Wu <hersenxs.wu@amd.com>
Cc: Alex Hung <alex.hung@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Suggested-by: Wenjing Liu <wenjing.liu@amd.com>
Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: correct hbm field in boot status
Hawking Zhang [Tue, 21 May 2024 07:03:02 +0000 (15:03 +0800)]
drm/amdgpu: correct hbm field in boot status

hbm filed takes bit 13 and bit 14 in boot status.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: program device_cntl2 through pci cfg space
Frank Min [Tue, 21 May 2024 05:08:09 +0000 (13:08 +0800)]
drm/amdgpu: program device_cntl2 through pci cfg space

device_cntl2 is accessible from pci config space, so program it through pci cfg
space instead of mmio.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/atomfirmware: add intergrated info v2.3 table
Li Ma [Mon, 20 May 2024 10:43:55 +0000 (18:43 +0800)]
drm/amdgpu/atomfirmware: add intergrated info v2.3 table

[Why]
The vram width value is 0.
Because the integratedsysteminfo table in VBIOS has updated to 2.3.

[How]
Driver needs a new intergrated info v2.3 table too.
Then the vram width value will be correct.

Signed-off-by: Li Ma <li.ma@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Fix snprintf usage in amdgpu_gfx_kiq_init_ring
Srinivasan Shanmugam [Tue, 21 May 2024 04:33:37 +0000 (10:03 +0530)]
drm/amdgpu: Fix snprintf usage in amdgpu_gfx_kiq_init_ring

This commit fixes a format truncation issue arosed by the snprintf
function potentially writing more characters into the ring->name buffer
than it can hold, in the amdgpu_gfx_kiq_init_ring function

The issue occurred because the '%d' format specifier could write between
1 and 10 bytes into a region of size between 0 and 8, depending on the
values of xcc_id, ring->me, ring->pipe, and ring->queue. The snprintf
function could output between 12 and 41 bytes into a destination of size
16, leading to potential truncation.

To resolve this, the snprintf line was modified to use the '%hhu' format
specifier for xcc_id, ring->me, ring->pipe, and ring->queue. The '%hhu'
specifier is used for unsigned char variables and ensures that these
values are printed as unsigned decimal integers.

Fixes the below with gcc W=1:
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c: In function ‘amdgpu_gfx_kiq_init_ring’:
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:332:61: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size between 0 and 8 [-Wformat-truncation=]
  332 |         snprintf(ring->name, sizeof(ring->name), "kiq_%d.%d.%d.%d",
      |                                                             ^~
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:332:50: note: directive argument in the range [0, 2147483647]
  332 |         snprintf(ring->name, sizeof(ring->name), "kiq_%d.%d.%d.%d",
      |                                                  ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:332:9: note: ‘snprintf’ output between 12 and 41 bytes into a destination of size 16
  332 |         snprintf(ring->name, sizeof(ring->name), "kiq_%d.%d.%d.%d",
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  333 |                  xcc_id, ring->me, ring->pipe, ring->queue);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 345a36c4f1ba ("drm/amdgpu: prefer snprintf over sprintf")
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix invadate operation for pg_flags
Jesse Zhang [Tue, 21 May 2024 07:02:54 +0000 (15:02 +0800)]
drm/amdgpu: fix invadate operation for pg_flags

Since the type of pg_flags is u32, adev->pg_flags >> 16 >> 16 is 0
regardless of the values of its operands.

So removing the operations upper_32_bits and lower_32_bits.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/mes12: mes hw_fini fix for mode1 reset
Jack Xiao [Tue, 21 May 2024 07:28:17 +0000 (15:28 +0800)]
drm/amdgpu/mes12: mes hw_fini fix for mode1 reset

Port mes11 hw_fini to mes12, fix for mode1 reset.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix invadate operation for umsch
Jesse Zhang [Tue, 21 May 2024 06:48:57 +0000 (14:48 +0800)]
drm/amdgpu: fix invadate operation for umsch

Since the type of data_size is uint32_t, adev->umsch_mm.data_size - 1 >> 16 >> 16 is 0
regardless of the values of its operands

So removing the operations upper_32_bits and lower_32_bits.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/admgpu: fix dereferencing null pointer context
Jesse Zhang [Thu, 9 May 2024 02:57:04 +0000 (10:57 +0800)]
drm/admgpu: fix dereferencing null pointer context

When user space sets an invalid ta type, the pointer context will be empty.
So it need to check the pointer context before using it

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: fix unsigned value asic_type compared against
Jesse Zhang [Tue, 21 May 2024 06:56:25 +0000 (14:56 +0800)]
drm/amd/pm: fix unsigned value asic_type compared against

Enum asic_type always greater than or equal CHIP_TAHITI.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: skip to create ras xxx_err_count node when ACA is enabled
Yang Wang [Wed, 24 Apr 2024 02:47:35 +0000 (10:47 +0800)]
drm/amdgpu: skip to create ras xxx_err_count node when ACA is enabled

skip to create 'xxx_err_count' node when ACA is enabled.

Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Fix amdgpu_vm_is_bo_always_valid kerneldoc
Tvrtko Ursulin [Mon, 20 May 2024 08:18:14 +0000 (09:18 +0100)]
drm/amdgpu: Fix amdgpu_vm_is_bo_always_valid kerneldoc

Align kerneldoc with the function argument name.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 26e20235ce00 ("drm/amdgpu: Add amdgpu_bo_is_vm_bo helper")
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: remove unused struct 'dc_reg_sequence'
Dr. David Alan Gilbert [Fri, 17 May 2024 23:35:48 +0000 (00:35 +0100)]
drm/amd/display: remove unused struct 'dc_reg_sequence'

'dc_reg_sequence' was added in
commit 44788bbc309b ("drm/amd/display: refactor reg_update")

but isn't actually used.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: remove unused struct 'aux_payloads'
Dr. David Alan Gilbert [Fri, 17 May 2024 23:35:47 +0000 (00:35 +0100)]
drm/amd/display: remove unused struct 'aux_payloads'

'aux_payloads' is unused since
commit eae5ffa9bd7b ("drm/amd/display: Switch ddc to new aux interface")
Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: remove unused struct 'hqd_registers'
Dr. David Alan Gilbert [Fri, 17 May 2024 23:35:46 +0000 (00:35 +0100)]
drm/amdgpu: remove unused struct 'hqd_registers'

'hqd_registers' used to be used in a member of the 'bonaire_mqd'
struct. 'bonaire_mqd' was removed by
commit 486d807cd9a9 ("drm/amdgpu: remove duplicate definition of cik_mqd")
It's now unused.

Remove 'hqd_registers' as well.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: enable thermal alert on smu 14.0.2/3
Kenneth Feng [Thu, 16 May 2024 01:08:52 +0000 (09:08 +0800)]
drm/amd/pm: enable thermal alert on smu 14.0.2/3

enable thermal alert on smu 14.0.2/3

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/amdgpu: add thm 14.0.2 header file
Kenneth Feng [Thu, 16 May 2024 01:05:17 +0000 (09:05 +0800)]
drm/amd/amdgpu: add thm 14.0.2 header file

add thm 14.0.2 header file

v2: add license, update to latest changes (Alex)

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>