Nathan Chancellor
d196bbbc28
drm/amd/display: Use proper enum conversion functions
...
clang warns:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:336:8:
warning: implicit conversion from enumeration type 'enum smu_clk_type'
to different enumeration type 'enum amd_pp_clock_type'
[-Wenum-conversion]
dc_to_smu_clock_type(clk_type),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:421:14:
warning: implicit conversion from enumeration type 'enum
amd_pp_clock_type' to different enumeration type 'enum smu_clk_type'
[-Wenum-conversion]
dc_to_pp_clock_type(clk_type),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are functions to properly convert between all of these types, use
them so there are no longer any warnings.
Fixes: a43913ea50
("drm/amd/powerplay: add function get_clock_by_type_with_latency for navi10")
Fixes: e5e4e22391
("drm/amd/powerplay: add interface to get clock by type with latency for display (v2)")
Link: https://github.com/ClangBuiltLinux/linux/issues/586
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com >
Reviewed-by: Leo Li <sunpeng.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:17:40 -05:00
Monk Liu
482f0e5385
drm/amdgpu: fix double ucode load by PSP(v3)
...
previously the ucode loading of PSP was repreated, one executed in
phase_1 init/re-init/resume and the other in fw_loading routine
Avoid this double loading by clearing ip_blocks.status.hw in suspend or reset
prior to the FW loading and any block's hw_init/resume
v2:
still do the smu fw loading since it is needed by bare-metal
v3:
drop the change in reinit_early_sriov, just clear all block's status.hw
in the head place and set the status.hw after hw_init done is enough
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Emily Deng <Emily.Deng@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:17:34 -05:00
Monk Liu
9244d3a6eb
drm/amdgpu: fix incorrect judge on sos fw version
...
for SRIOV the SOS fw of PSP is loaded in hypervisor thus
guest won't tell the version of it, and judging feature by
reading the sos fw version in guest side is completely wrong
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Emily Deng <Emily.Deng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:17:28 -05:00
Monk Liu
4cd4c5c064
drm/amdgpu: cleanup vega10 SRIOV code path
...
we can simplify all those unnecessary function under
SRIOV for vega10 since:
1) PSP L1 policy is by force enabled in SRIOV
2) original logic always set all flags which make itself
a dummy step
besides,
1) the ih_doorbell_range set should also be skipped
for VEGA10 SRIOV.
2) the gfx_common registers should also be skipped
for VEGA10 SRIOV.
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Emily Deng <Emily.Deng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:17:21 -05:00
Kevin Wang
67194518cb
drm/amd/powerplay: sort feature status index by asic feature id for smu
...
before this change, the pp_feature sysfs show feature enable state by
logic feature id, it is not easy to read.
this change will sort pp_features show index by asic feature id.
before:
features high: 0x00000623 low: 0xb3cdaffb
00. DPM_PREFETCHER ( 0) : enabeld
01. DPM_GFXCLK ( 1) : enabeld
02. DPM_UCLK ( 3) : enabeld
03. DPM_SOCCLK ( 4) : enabeld
04. DPM_MP0CLK ( 5) : enabeld
05. DPM_LINK ( 6) : enabeld
06. DPM_DCEFCLK ( 7) : enabeld
07. DS_GFXCLK (10) : enabeld
08. DS_SOCCLK (11) : enabeld
09. DS_LCLK (12) : disabled
10. PPT (23) : enabeld
11. TDC (24) : enabeld
12. THERMAL (33) : enabeld
13. RM (35) : disabled
......
after:
features high: 0x00000623 low: 0xb3cdaffb
00. DPM_PREFETCHER ( 0) : enabeld
01. DPM_GFXCLK ( 1) : enabeld
02. DPM_GFX_PACE ( 2) : disabled
03. DPM_UCLK ( 3) : enabeld
04. DPM_SOCCLK ( 4) : enabeld
05. DPM_MP0CLK ( 5) : enabeld
06. DPM_LINK ( 6) : enabeld
07. DPM_DCEFCLK ( 7) : enabeld
08. MEM_VDDCI_SCALING ( 8) : enabeld
09. MEM_MVDD_SCALING ( 9) : enabeld
10. DS_GFXCLK (10) : enabeld
11. DS_SOCCLK (11) : enabeld
12. DS_LCLK (12) : disabled
13. DS_DCEFCLK (13) : enabeld
......
Signed-off-by: Kevin Wang <kevin1.wang@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:17:05 -05:00
Dave Airlie
4b381ee25d
Merge tag 'drm-fixes-5.3-2019-07-31' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
...
drm-fixes-5.3-2019-07-31:
amdgpu:
- Fix temperature granularity for navi
- Fix stable pstate setting for navi
- Fix VCN DPM enablement on navi
- Fix error handling on CS ioctl when processing dependencies
- Fix possible information leak in debugfs
amdkfd:
- fix memory alignment for VegaM
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Alex Deucher <alexdeucher@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190731191648.25729-1-alexander.deucher@amd.com
2019-08-02 09:35:40 +10:00
Alex Deucher
9475a77b57
drm/amdkfd: enable KFD support for navi14
...
Same as navi10.
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:51:26 -05:00
Dennis Li
dc4d716d4c
drm/amdgpu: disable inject for failed subblocks of gfx
...
some subblocks of gfx fail in inject test, disable them
Signed-off-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:51:20 -05:00
Dennis Li
83b0582c90
drm/amdgpu: support gfx ras error injection and err_cnt query
...
check gfx error count in both ras querry function and
ras interrupt handler.
gfx ras is still disabled by default due to known stability
issue found in gpu reset.
Signed-off-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:51:14 -05:00
Dennis Li
2c960ea02f
drm/amdgpu: add RAS callback for gfx
...
Add functions for RAS error inject and query error counter
Signed-off-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:51:08 -05:00
Dennis Li
dc23a08f03
drm/amdgpu: add define for gfx ras subblock
...
Signed-off-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:51:01 -05:00
Dennis Li
4bb6b8c758
drm/amd/include: add define of TCP_EDC_CNT_NEW
...
Signed-off-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:50:54 -05:00
Dennis Li
ca3f422f53
drm/amd/include: add bitfield define for EDC registers
...
Add EDC registers to support VEGA20 RAS
Signed-off-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:50:47 -05:00
Tao Zhou
7cdc2ee300
drm/amdgpu: remove ras_reserve_vram in ras injection
...
error injection address is not in gpu address space
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:50:41 -05:00
Tao Zhou
e10634938b
drm/amdgpu: add check for ras error type
...
only ue and ce errors are supported
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:50:35 -05:00
Tao Zhou
81e02619e9
drm/amdgpu: update interrupt callback for all ras clients
...
add err_data parameter in interrupt cb for ras clients
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:50:29 -05:00
Tao Zhou
cf04dfd0e9
drm/amdgpu: allow ras interrupt callback to return error data
...
add error data as parameter for ras interrupt cb and process it
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:50:23 -05:00
Tao Zhou
8c94810357
drm/amdgpu: query umc ras error address
...
query umc ras error address, translate it to gpu 4k page view
and save it.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:50:17 -05:00
Tao Zhou
c2742aef4d
drm/amdgpu: add structures for umc error address translation
...
add related registers, callback function and channel index table
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:50:11 -05:00
Tao Zhou
6f102dba80
drm/amdgpu: add support for recording ras error address
...
more than one error address may be recorded in one query
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:50:05 -05:00
Tao Zhou
f1ed4afa13
drm/amdgpu: update algorithm of umc uncorrectable error counting
...
remove the check of ErrorCodeExt
v2: refine the if condition for ue counting
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:58 -05:00
Tao Zhou
045c021653
drm/amdgpu: switch to amdgpu_umc structure
...
create new amdgpu_umc structure to for more umc
settings in future and switch to the new structure
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:52 -05:00
Tao Zhou
5bbfb64a17
drm/amdgpu: use 64bit operation macros for umc
...
replace some 32bit macros with 64bit operations to simplify code
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:46 -05:00
Tao Zhou
4fa1c6a679
drm/amdgpu: add RREG64/WREG64(_PCIE) operations
...
add 64 bits register access functions
v2: implement 64 bit functions in low level
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:40 -05:00
Tao Zhou
05a58345db
drm/amdgpu: add ras error count after each query (v2)
...
v1: increase ras ce/ue error count
v2: log the number of correctable and uncorrectable errors
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:33 -05:00
Hawking Zhang
939e2258ce
drm/amdgpu: querry umc error count
...
check umc error count in both ras querry function and
ras interrupt handler
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:28 -05:00
Hawking Zhang
5b6b35aaac
drm/amdgpu: init umc v6_1 functions for vega20
...
init umc callback function for vega20 in sw early init phase
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:22 -05:00
Hawking Zhang
9884c2b1c3
drm/amdgpu: add umc v6_1 query error count support
...
Implement umc query_ras_error_count function to support querry
both correctable and uncorrectable error
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:16 -05:00
Hawking Zhang
03c9963f47
drm/amdgpu: add umc v6_1_1 IP headers
...
the change introduces IP headers for unified memory controller (umc)
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:10 -05:00
Hawking Zhang
245219a660
drm/amdgpu: add rsmu v_0_0_2 ip headers
...
remote smu (rsmu) is a sub-block used as ip register interface,
error handling, reset generation.etc
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:03 -05:00
Hawking Zhang
9e585a523b
drm/amdgpu: add amdgpu_umc_functions structure
...
This is common structure as UMC callback function
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:48:57 -05:00
Hawking Zhang
6501a77170
drm/amdgpu: init RSMU and UMC ip base address for vega20
...
the driver needs to program RSMU and UMC registers to
support vega20 RAS feature
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:48:51 -05:00
Hawking Zhang
7af25d5b7e
drm/amdgpu: move some ras data structure to amdgpu_ras.h
...
These are common structures that can be included by IP specific
source files
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:48:32 -05:00
Alex Deucher
fa1884f9d8
drm/amdgpu: drop drmP.h from vcn_v2_5.c
...
Unused.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:41 -05:00
Alex Deucher
9a2ffeb525
drm/amdgpu: drop drmP.h from vcn_v2_0.c
...
And fix the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:36 -05:00
Alex Deucher
75589f496d
drm/amdgpu: drop drmP.h from sdma_v5_0.c
...
And fix the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:31 -05:00
Alex Deucher
e9eea90247
drm/amdgpu: drop drmP.h from nv.c
...
And fix up the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:26 -05:00
Alex Deucher
b23b2e9e49
drm/amdgpu: drop drmP.h from navi10_ih.c
...
And fix the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:21 -05:00
Alex Deucher
0a069bbe13
drm/amdgpu: drop drmP.h in gfx_v10_0.c
...
And fix the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:16 -05:00
Alex Deucher
3b90f6ecdf
drm/amdgpu: drop drmP.h from amdgpu_amdkfd_gfx_v10.c
...
Unused.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:10 -05:00
Alex Deucher
32978d8cfd
drm/amdgpu: drop drmP.h in amdgpu_amdkfd_arcturus.c
...
Unused.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:32:56 -05:00
Andrzej Pietrasiewicz
5b50fa2b35
drm/amdgpu: Provide ddc symlink in connector sysfs directory
...
Use the ddc pointer provided by the generic connector.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/7fee0fa0d0f77af6595d283d5f3ae5d551475821.1564161140.git.andrzej.p@collabora.com
2019-07-31 16:35:37 +02:00
Daniel Vetter
b2ad978fd0
drm/amdgpu: Fill out gem_object->resv
...
That way we can ditch our gem_prime_res_obj implementation. Since ttm
absolutely needs the right reservation object all the boilerplate is
already there and we just have to wire it up correctly.
Note that gem/prime doesn't care when we do this, as long as we do it
before the bo is registered and someone can call the handle2fd ioctl
on it.
Aside: ttm_buffer_object.ttm_resv could probably be ditched in favour
of always passing a non-NULL resv to ttm_bo_init(). At least for gem
drivers that would avoid having two of these, on in ttm_buffer_object
and the other in drm_gem_object, one just there for confusion.
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: "Michel Dänzer" <michel.daenzer@amd.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Huang Rui <ray.huang@amd.com >
Cc: Felix Kuehling <Felix.Kuehling@amd.com >
Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Cc: Evan Quan <evan.quan@amd.com >
Cc: Sonny Jiang <sonny.jiang@amd.com >
Cc: Amber Lin <Amber.Lin@amd.com >
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl >
Cc: Junwei Zhang <Jerry.Zhang@amd.com >
Cc: Thomas Zimmermann <contact@tzimmermann.org >
Cc: Samuel Li <Samuel.Li@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190725132655.11951-4-daniel.vetter@ffwll.ch
2019-07-31 10:19:23 +02:00
Evan Quan
6dee4829cf
drm/amd/powerplay: correct UVD/VCE/VCN power status retrieval
...
VCN should be used for Vega20 later ASICs while UVD and VCE
are for previous ASICs.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 02:02:22 -05:00
Evan Quan
a3ebbdb95f
drm/amd/powerplay: correct Navi10 VCN powergate control (v2)
...
No VCN DPM bit check as that's different from VCN PG. Also
no extra check for possible double enablement/disablement
as that's already done by VCN.
v2: check return value of smu_feature_set_enabled
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 02:02:22 -05:00
Evan Quan
e21e3581e2
drm/amd/powerplay: support VCN powergate status retrieval for SW SMU
...
Commonly used for VCN powergate status retrieval for SW SMU.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 02:02:22 -05:00
Evan Quan
201cd702b7
drm/amd/powerplay: support VCN powergate status retrieval on Raven
...
Enable VCN powergate status report on Raven.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 02:02:22 -05:00
Evan Quan
a02709818f
drm/amd/powerplay: add new sensor type for VCN powergate status
...
VCN is widely used in new ASICs and different from tranditional
UVD and VCE.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 02:02:22 -05:00
Wang Xiayang
929e571c04
drm/amdgpu: fix a potential information leaking bug
...
Coccinelle reports a path that the array "data" is never initialized.
The path skips the checks in the conditional branches when either
of callback functions, read_wave_vgprs and read_wave_sgprs, is not
registered. Later, the uninitialized "data" array is read
in the while-loop below and passed to put_user().
Fix the path by allocating the array with kcalloc().
The patch is simplier than adding a fall-back branch that explicitly
calls memset(data, 0, ...). Also it does not need the multiplication
1024*sizeof(*data) as the size parameter for memset() though there is
no risk of integer overflow.
Signed-off-by: Wang Xiayang <xywang.sjtu@sjtu.edu.cn >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 01:26:09 -05:00
Christian König
67d0859e27
drm/amdgpu: fix error handling in amdgpu_cs_process_fence_dep
...
We always need to drop the ctx reference and should check
for errors first and then dereference the fence pointer.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 01:26:09 -05:00