Christian König
6103b2f24e
drm/amdgpu: properly embed the IBs into the job
...
We now have standard macros for that.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:30 -05:00
Christian König
cdc7893fc9
drm/amdgpu: use job and ib structures directly in CS parsers
...
Instead of providing the ib index provide the job and ib pointers directly to
the patch and parse functions for UVD and VCE.
Also move the set/get functions for IB values to the IB declerations.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:30 -05:00
Christian König
a190f8dc4a
drm/amdgpu: header cleanup
...
No function change, just move a bunch of definitions from amdgpu.h into
separate header files.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:30 -05:00
Jingwen Chen
8c7442f026
drm/amd/amdgpu: set disabled vcn to no_schduler
...
[Why]
after the reset domain introduced, the sched.ready will be init after
hw_init, which will overwrite the setup in vcn hw_init, and lead to
vcn ib test fail.
[How]
set disabled vcn to no_scheduler
Fixes: 5fd8518d18 ("drm/amdgpu: Move scheduler init to after XGMI is ready")
Signed-off-by: Jingwen Chen <Jingwen.Chen2@amd.com >
Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:30 -05:00
Christian König
d18b8eadd8
drm/amdgpu: install ctx entities with cmpxchg
...
Since we removed the context lock we need to make sure that not two threads
are trying to install an entity at the same time.
Signed-off-by: Christian König <christian.koenig@amd.com >
Fixes: 461fa7b0ac ("drm/amdgpu: remove ctx->lock")
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:30 -05:00
Yifan Zhang
b664a56e86
drm/amdkfd: implement get_atc_vmid_pasid_mapping_info for gfx10.3
...
This patch implements get_atc_vmid_pasid_mapping_info for gfx10.3
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:30 -05:00
Yifan Zhang
c8b0507f40
drm/amdkfd: judge get_atc_vmid_pasid_mapping_info before call
...
Fix the NULL point issue:
[ 3076.255609] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 3076.255624] #PF: supervisor instruction fetch in kernel mode
[ 3076.255637] #PF: error_code(0x0010) - not-present page
[ 3076.255649] PGD 0 P4D 0
[ 3076.255660] Oops: 0010 [#1 ] SMP NOPTI
[ 3076.255669] CPU: 20 PID: 2415 Comm: kfdtest Tainted: G W OE 5.11.0-41-generic #45~20.04.1-Ubuntu
[ 3076.255691] Hardware name: AMD Splinter/Splinter-RPL, BIOS VS2326337N.FD 02/07/2022
[ 3076.255706] RIP: 0010:0x0
[ 3076.255718] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[ 3076.255732] RSP: 0018:ffffb64283e3fc10 EFLAGS: 00010297
[ 3076.255744] RAX: 0000000000000000 RBX: 0000000000000008 RCX: 0000000000000027
[ 3076.255759] RDX: ffffb64283e3fc1e RSI: 0000000000000008 RDI: ffff8c7a87f60000
[ 3076.255776] RBP: ffffb64283e3fc78 R08: ffff8c7d88518ac0 R09: ffffb64283e3fa60
[ 3076.255791] R10: 0000000000000001 R11: 0000000000000001 R12: 000000000000000f
[ 3076.255805] R13: ffff8c7bdcea5800 R14: ffff8c7a9f3f3000 R15: ffff8c7a8696bc00
[ 3076.255820] FS: 0000000000000000(0000) GS:ffff8c7d88500000(0000) knlGS:0000000000000000
[ 3076.255839] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 3076.255851] CR2: ffffffffffffffd6 CR3: 0000000109e3c000 CR4: 0000000000750ee0
[ 3076.255866] PKRU: 55555554
[ 3076.255873] Call Trace:
[ 3076.255884] dbgdev_wave_reset_wavefronts+0x72/0x160 [amdgpu]
[ 3076.256025] process_termination_cpsch.cold+0x26/0x2f [amdgpu]
[ 3076.256182] ? ktime_get_mono_fast_ns+0x4e/0xa0
[ 3076.256196] kfd_process_dequeue_from_all_devices+0x49/0x70 [amdgpu]
[ 3076.256328] kfd_process_notifier_release+0x187/0x2b0 [amdgpu]
[ 3076.256451] ? mn_itree_inv_end+0xdc/0x110
[ 3076.256463] __mmu_notifier_release+0x74/0x1f0
[ 3076.256474] exit_mmap+0x170/0x200
[ 3076.256484] ? __handle_mm_fault+0x677/0x920
[ 3076.256496] ? _cond_resched+0x19/0x30
[ 3076.256507] mmput+0x5d/0x130
[ 3076.256518] do_exit+0x332/0xaf0
[ 3076.256526] ? handle_mm_fault+0xd7/0x2b0
[ 3076.256537] do_group_exit+0x43/0xa0
[ 3076.256548] __x64_sys_exit_group+0x18/0x20
[ 3076.256559] do_syscall_64+0x38/0x90
[ 3076.256569] entry_SYSCALL_64_after_hwframe+0x44/0xa9
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:30 -05:00
Ruijing Dong
11eb648d01
drm/amdgpu/vcn: Add vcn firmware log
...
vcn fwlog is for debugging purpose only,
by default, it is disabled.
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:30 -05:00
Ruijing Dong
b6065ebf55
drm/amdgpu/vcn: Update fw shared data structure
...
Add fw log in fw shared data structure.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:30 -05:00
David Yu
811c04dbb3
drm/amdgpu: Add DFC CAP support for aldebaran
...
Add DFC CAP support for aldebaran
Initialize cap microcode in psp_init_sriov_microcode,
the ta microcode will be initialized in psp_vxx_init_microcode
Signed-off-by: David Yu <David.Yu@amd.com >
Reviewed-by: Shaoyun.liu <Shaoyun.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:30 -05:00
Harish Kasiviswanathan
24bf9fd197
drm/amdgpu: Set correct DMA mask for aldebaran
...
Aldebaran has 48-bit physical address support
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:29 -05:00
Lijo Lazar
9e08564727
drm/amdgpu: Refactor mode2 reset logic for v13.0.2
...
Use IP version and refactor reset logic to apply to a list of devices.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Le Ma <Le.Ma@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:29 -05:00
Aric Cyr
90d282582a
drm/amd/display: 3.2.175
...
drm/amd/display: 3.2.175
This version brings along following fixes:
- Remove invalid RDPCS Programming in DAL
- Make functional resource functions non-static
- Reset VIC if HDMI_VIC is present
- Add frame alternate 3D & restrict HW packed on dongles
- Reg to turn on/off PSR Power seq in FSM
- Modify plane removal sequence to avoid hangs
- Pass HostVM enable flag into DCN3.1 DML
- DC Validation failures
- Program OPP before ODM
- Refactor fixed VS w/a for PHY tests
- Pass deep sleep disabled allow info to dmub fw
- Refine the EDID override
- [FW Promotion] Release 0.0.106.0
- Add verify_link_cap back for hdmi
Acked-by: Alan Liu <HaoPing.Liu@amd.com >
Signed-off-by: Aric Cyr <aric.cyr@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:29 -05:00
Charlene Liu
493a7508d7
drm/amd/display: add verify_link_cap back for hdmi
...
[why]
hdmi specific: add verify link cap after retrive link cap.
Reviewed-by: Alvin Lee <Alvin.Lee2@amd.com >
Acked-by: Alan Liu <HaoPing.Liu@amd.com >
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:29 -05:00
Anthony Koo
36b362f5af
drm/amd/display: [FW Promotion] Release 0.0.106.0
...
Acked-by: Alan Liu <HaoPing.Liu@amd.com >
Signed-off-by: Anthony Koo <Anthony.Koo@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:29 -05:00
jinzh
575d0df6da
drm/amd/display: refine the EDID override
...
[Why]
We already get the SBIOS EDID via ACPI on KMD,
but after that, we just use the monitor EDID to set it HDR caps
[How]
Make the SBIOS EDID override to read_edid()
That can change the read EDID caps from the right EDID
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com >
Acked-by: Alan Liu <HaoPing.Liu@amd.com >
Signed-off-by: jinzh <jinzh@github.amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:29 -05:00
Robin Chen
5f5d08b7eb
drm/amd/display: Pass deep sleep disabled allow info to dmub fw
...
[Why]
The deep sleep mode need to be disabled in some PSR scenario.
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Acked-by: Alan Liu <HaoPing.Liu@amd.com >
Signed-off-by: Robin Chen <robin.chen@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:03:17 -05:00
George Shen
7a1bae874b
drm/amd/display: Refactor fixed VS w/a for PHY tests
...
[Why/How]
Refactor original w/a to unify naming and
simplify logic. This also re-enables the code
that was previously skipped due to the
disabling of the previous workaround logic.
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com >
Reviewed-by: Nevenko Stupar <Nevenko.Stupar@amd.com >
Acked-by: Alan Liu <HaoPing.Liu@amd.com >
Signed-off-by: George Shen <George.Shen@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 13:02:54 -05:00
Wesley Chalmers
f70b88b994
drm/amd/display: Program OPP before ODM
...
[WHY]
HW expects OPP to be configured before ODM is enabled.
Failure to do so can cause errors.
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com >
Acked-by: Alan Liu <HaoPing.Liu@amd.com >
Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 12:43:02 -05:00
Michael Strauss
863fa85e6a
drm/amd/display: Pass HostVM enable flag into DCN3.1 DML
...
[WHY]
Calculations differ with HostVM enabled/disabled, causing underflow in
configs with high refresh displays + scaling due to lower available BW
[HOW]
Check riommu_active in order to pass correct HostVM enablement to DML
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com >
Acked-by: Alan Liu <HaoPing.Liu@amd.com >
Signed-off-by: Michael Strauss <michael.strauss@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-04 12:42:41 -05:00
Christoph Hellwig
27674ef6c7
mm: remove the extra ZONE_DEVICE struct page refcount
...
ZONE_DEVICE struct pages have an extra reference count that complicates
the code for put_page() and several places in the kernel that need to
check the reference count to see that a page is not being used (gup,
compaction, migration, etc.). Clean up the code so the reference count
doesn't need to be treated specially for ZONE_DEVICE pages.
Note that this excludes the special idle page wakeup for fsdax pages,
which still happens at refcount 1. This is a separate issue and will
be sorted out later. Given that only fsdax pages require the
notifiacation when the refcount hits 1 now, the PAGEMAP_OPS Kconfig
symbol can go away and be replaced with a FS_DAX check for this hook
in the put_page fastpath.
Based on an earlier patch from Ralph Campbell <rcampbell@nvidia.com >.
Link: https://lkml.kernel.org/r/20220210072828.2930359-8-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de >
Reviewed-by: Logan Gunthorpe <logang@deltatee.com >
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com >
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Dan Williams <dan.j.williams@intel.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Tested-by: "Sierra Guiza, Alejandro (Alex)" <alex.sierra@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Alistair Popple <apopple@nvidia.com >
Cc: Ben Skeggs <bskeggs@redhat.com >
Cc: Chaitanya Kulkarni <kch@nvidia.com >
Cc: Christian Knig <christian.koenig@amd.com >
Cc: Karol Herbst <kherbst@redhat.com >
Cc: Lyude Paul <lyude@redhat.com >
Cc: Miaohe Lin <linmiaohe@huawei.com >
Cc: Muchun Song <songmuchun@bytedance.com >
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org >
2022-03-03 12:47:33 -05:00
Christoph Hellwig
dc90f0846d
mm: don't include <linux/memremap.h> in <linux/mm.h>
...
Move the check for the actual pgmap types that need the free at refcount
one behavior into the out of line helper, and thus avoid the need to
pull memremap.h into mm.h.
Link: https://lkml.kernel.org/r/20220210072828.2930359-7-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de >
Reviewed-by: Logan Gunthorpe <logang@deltatee.com >
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Dan Williams <dan.j.williams@intel.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Tested-by: "Sierra Guiza, Alejandro (Alex)" <alex.sierra@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Alistair Popple <apopple@nvidia.com >
Cc: Ben Skeggs <bskeggs@redhat.com >
Cc: Chaitanya Kulkarni <kch@nvidia.com >
Cc: Karol Herbst <kherbst@redhat.com >
Cc: Lyude Paul <lyude@redhat.com >
Cc: Miaohe Lin <linmiaohe@huawei.com >
Cc: Muchun Song <songmuchun@bytedance.com >
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com >
Cc: Ralph Campbell <rcampbell@nvidia.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org >
2022-03-03 12:47:33 -05:00
Christoph Hellwig
730ff52194
mm: remove pointless includes from <linux/hmm.h>
...
hmm.h pulls in the world for no good reason at all. Remove the
includes and push a few ones into the users instead.
Link: https://lkml.kernel.org/r/20220210072828.2930359-4-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de >
Reviewed-by: Logan Gunthorpe <logang@deltatee.com >
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com >
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com >
Reviewed-by: Muchun Song <songmuchun@bytedance.com >
Tested-by: "Sierra Guiza, Alejandro (Alex)" <alex.sierra@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Alistair Popple <apopple@nvidia.com >
Cc: Ben Skeggs <bskeggs@redhat.com >
Cc: Christian Knig <christian.koenig@amd.com >
Cc: Dan Williams <dan.j.williams@intel.com >
Cc: Felix Kuehling <Felix.Kuehling@amd.com >
Cc: Karol Herbst <kherbst@redhat.com >
Cc: Lyude Paul <lyude@redhat.com >
Cc: Miaohe Lin <linmiaohe@huawei.com >
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com >
Cc: Ralph Campbell <rcampbell@nvidia.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org >
2022-03-03 12:47:33 -05:00
Weiguo Li
3192f1d9b6
drm/amdgpu: remove redundant null check
...
Remove the redundant null check since the caller ensures
that 'ctx' is never NULL.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Weiguo Li <liwg06@foxmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:07 -05:00
Alex Deucher
825e0af0d4
drm/amdgpu/sdma5: drop unused cyan skillfish firmware
...
Leftover from bring up. Not used anymore.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:07 -05:00
Alex Deucher
31f5f46043
drm/amdgpu/gfx10: drop unused cyan skillfish firmware
...
Leftover from bring up. Not used anymore.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:07 -05:00
Alex Deucher
1b537e6410
drm/amdgpu: remove unused gpu_info firmwares
...
These were leftover from bring up and are no longer
necessary. The information is available via
the IP discovery table.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:07 -05:00
Alex Deucher
45a3e06be4
drm/amdgpu: Use IP versions in convert_tiling_flags_to_modifier()
...
Rather than checking the asic_type.
Reviewed-by: Guchun Chen <guchun.chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:07 -05:00
Dillon Varone
fe5e8f07fc
drm/amd/display: Modify plane removal sequence to avoid hangs.
...
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com >
Acked-by: Alan Liu <HaoPing.Liu@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 >
2022-03-02 18:40:07 -05:00
Danijel Slivka
7952fa0d3e
drm/amd/pm: new v3 SmuMetrics data structure for Sienna Cichlid
...
structure changed in smc_fw_version >= 0x3A4900,
"uint16_t VcnActivityPercentage" replaced with
"uint16_t VcnUsagePercentage0" and "uint16_t VcnUsagePercentage1"
Signed-off-by: Danijel Slivka <danijel.slivka@amd.com >
Acked-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:07 -05:00
Prike Liang
d7709eb6a1
drm/amdgpu: enable gfxoff routine for GC 10.3.7
...
Enable gfxoff routine for GC 10.3.7.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:07 -05:00
Prike Liang
fabe175385
drm/amdgpu: enable gfx power gating for GC 10.3.7
...
Enable gfx power gating for GC 10.3.7.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
Prike Liang
9a1358bb2c
drm/amdgpu/nv: enable clock gating for GC 10.3.7 subblock
...
This will enable the following block clock gating.
- MC
- SDMA
- HDP
- ATHUB
- IH
- VCN/JPEG
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
Prike Liang
00bfab4457
drm/amdgpu: enable gfx clock gating control for GC 10.3.7
...
Enable gfx cg gate/ungate control for GC 10.3.7.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
Qiang Yu
b6901d93cc
drm/amdgpu: fix suspend/resume hang regression
...
Regression has been reported that suspend/resume may hang with
the previous vm ready check commit.
So bring back the evicted list check as a temp fix.
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1922
Fixes: c1a66c3bc4 ("drm/amdgpu: check vm ready by amdgpu_vm->evicting flag")
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Qiang Yu <qiang.yu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
Yifan Zha
e6fac6a9c9
drm/amdgpu: Move CAP firmware loading to the beginning of PSP firmware list
...
[Why]
As PSP needs to verify the signature, CAP firmware must be loaded first when PSP loads firmwares.
Otherwise, when DFC feature is enabled, CP firmwares would be loaded failed.
[ 1149.160480] [drm] MM table gpu addr = 0x800022f000, cpu addr = 00000000a62afcea.
[ 1149.209874] [drm] failed to load ucode CP_CE(0x8)
[ 1149.209878] [drm] psp gfx command LOAD_IP_FW(0x6) failed and response status is (0xFFFF0007)
[ 1149.215914] [drm] failed to load ucode CP_PFP(0x9)
[ 1149.215917] [drm] psp gfx command LOAD_IP_FW(0x6) failed and response status is (0xFFFF0007)
[ 1149.221941] [drm] failed to load ucode CP_ME(0xA)
[ 1149.221944] [drm] psp gfx command LOAD_IP_FW(0x6) failed and response status is (0xFFFF0007)
[ 1149.228082] [drm] failed to load ucode CP_MEC1(0xB)
[ 1149.228085] [drm] psp gfx command LOAD_IP_FW(0x6) failed and response status is (0xFFFF0007)
[ 1149.234209] [drm] failed to load ucode CP_MEC2(0xD)
[ 1149.234212] [drm] psp gfx command LOAD_IP_FW(0x6) failed and response status is (0xFFFF0007)
[ 1149.242379] [drm] failed to load ucode VCN(0x1C)
[ 1149.242382] [drm] psp gfx command LOAD_IP_FW(0x6) failed and response status is (0xFFFF0007)
[How]
Move CAP UCODE ID to the beginning of AMDGPU_UCODE_ID enum list.
Signed-off-by: Yifan Zha <Yifan.Zha@amd.com >
Reviewed-by: Bokun Zhang <Bokun.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
Andrey Grodzovsky
5aa061474b
drm/amdgpu: Bump minor version for hot plug tests enabling.
...
This will allow to enable the tests only after latest fix
after which the tests passed on my system.
I tested on NV21 standalone and Vega 10 and Polaris as
pair with DRI_PRIME.
It's possible there might be still issues on ASICs i don't
have at my posession but that that the point of enbling
the tests finally - if other people during testing will
encounter errors they will report and I will be able to fix.
The releated merge request for enabling libdrm tests suite is in
https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/227
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
Andrey Grodzovsky
57230f0ce6
drm/amdgpu: Fix sigsev when accessing MMIO on hot unplug.
...
Protect with drm_dev_enter/exit
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
Yifan Zhang
7d4108e4ce
drm/amdgpu: convert code name to ip version for noretry set
...
Use IP version rather than codename for noretry set.
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
Yifan Zhang
957b0787ee
drm/amdgpu: move amdgpu_gmc_noretry_set after ip_versions populated
...
otherwise adev->ip_versions is still empty when amdgpu_gmc_noretry_set
is called.
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
yipechai
80e0c2cb37
drm/amdgpu: Remove redundant .ras_fini initialization in some ras blocks
...
1. Define amdgpu_ras_block_late_fini_default in amdgpu_ras.c as
.ras_fini common function, which is called when
.ras_fini of ras block isn't initialized.
2. Remove the code of using amdgpu_ras_block_late_fini to
initialize .ras_fini in ras blocks.
Signed-off-by: yipechai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
yipechai
30e58102d5
drm/amdgpu: Remove redundant calls of amdgpu_ras_block_late_fini in mca ras block
...
Remove redundant calls of amdgpu_ras_block_late_fini in mca ras block.
Signed-off-by: yipechai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
yipechai
149d7ba1f8
drm/amdgpu: Remove redundant calls of amdgpu_ras_block_late_fini in sdma ras block
...
Remove redundant calls of amdgpu_ras_block_late_fini in sdma ras block.
Signed-off-by: yipechai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
yipechai
aa8e65dfc7
drm/amdgpu: Remove redundant calls of amdgpu_ras_block_late_fini in hdp ras block
...
Remove redundant calls of amdgpu_ras_block_late_fini in hdp ras block.
Signed-off-by: yipechai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
yipechai
f148c143ef
drm/amdgpu: Remove redundant calls of amdgpu_ras_block_late_fini in xgmi ras block
...
Remove redundant calls of amdgpu_ras_block_late_fini in xgmi ras block.
Signed-off-by: yipechai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
yipechai
0dca257d6d
drm/amdgpu: Remove redundant calls of amdgpu_ras_block_late_fini in umc ras block
...
Remove redundant calls of amdgpu_ras_block_late_fini in umc ras block.
Signed-off-by: yipechai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
yipechai
f578a37d19
drm/amdgpu: Remove redundant calls of amdgpu_ras_block_late_fini in nbio ras block
...
Remove redundant calls of amdgpu_ras_block_late_fini in nbio ras block.
Signed-off-by: yipechai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:06 -05:00
yipechai
9dad47c50f
drm/amdgpu: Remove redundant calls of amdgpu_ras_block_late_fini in mmhub ras block
...
Remove redundant calls of amdgpu_ras_block_late_fini in mmhub ras block.
Signed-off-by: yipechai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:05 -05:00
yipechai
35366481d0
drm/amdgpu: Remove redundant calls of amdgpu_ras_block_late_fini in gfx ras block
...
Remove redundant calls of amdgpu_ras_block_late_fini in gfx ras block.
Signed-off-by: yipechai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:05 -05:00
yipechai
1f211a827c
drm/amdgpu: centrally calls the .ras_fini function of all ras blocks
...
centrally calls the .ras_fini function of all ras blocks.
Signed-off-by: yipechai <YiPeng.Chai@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-03-02 18:40:05 -05:00