Commit graph

967894 commits

Author SHA1 Message Date
Lee Jones
b439145960 drm/radeon/radeon_ring: Add missing function parameters 'rdev' and 'data'
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_ring.c:226: warning: Function parameter or member 'rdev' not described in 'radeon_ring_unlock_undo'
 drivers/gpu/drm/radeon/radeon_ring.c:240: warning: Function parameter or member 'rdev' not described in 'radeon_ring_lockup_update'
 drivers/gpu/drm/radeon/radeon_ring.c:283: warning: Function parameter or member 'data' not described in 'radeon_ring_backup'

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:11:18 -05:00
Lee Jones
e64e3ca1a3 drm/radeon/radeon_i2c: Remove pointless function header
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_i2c.c:46: warning: Function parameter or member 'radeon_connector' not described in 'radeon_ddc_probe'
 drivers/gpu/drm/radeon/radeon_i2c.c:46: warning: Function parameter or member 'use_aux' not described in 'radeon_ddc_probe'

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:11:15 -05:00
Lee Jones
1f01224604 drm/radeon/radeon_display: Remove unused variable 'mod'
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_display.c: In function ‘radeon_div’:
 drivers/gpu/drm/radeon/radeon_display.c:1094:11: warning: variable ‘mod’ set but not used [-Wunused-but-set-variable]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: report to <xorg-driver-ati@lists.x.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:11:12 -05:00
Lee Jones
a27d120527 drm/radeon/radeon_connectors: Strip out set but unused variable 'ret'
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_connectors.c: In function ‘radeon_setup_mst_connector’:
 drivers/gpu/drm/radeon/radeon_connectors.c:2574:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:11:10 -05:00
Lee Jones
de1d598b67 drm/radeon/radeon_fence: Demote some non-conformant kernel-doc headers and fix another
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_fence.c:168: warning: Function parameter or member 'wait' not described in 'radeon_fence_check_signaled'
 drivers/gpu/drm/radeon/radeon_fence.c:168: warning: Function parameter or member 'mode' not described in 'radeon_fence_check_signaled'
 drivers/gpu/drm/radeon/radeon_fence.c:168: warning: Function parameter or member 'flags' not described in 'radeon_fence_check_signaled'
 drivers/gpu/drm/radeon/radeon_fence.c:168: warning: Function parameter or member 'key' not described in 'radeon_fence_check_signaled'
 drivers/gpu/drm/radeon/radeon_fence.c:393: warning: Function parameter or member 'f' not described in 'radeon_fence_enable_signaling'
 drivers/gpu/drm/radeon/radeon_fence.c:393: warning: Excess function parameter 'fence' description in 'radeon_fence_enable_signaling'
 drivers/gpu/drm/radeon/radeon_fence.c:1010: warning: Function parameter or member 'm' not described in 'radeon_debugfs_gpu_reset'
 drivers/gpu/drm/radeon/radeon_fence.c:1010: warning: Function parameter or member 'data' not described in 'radeon_debugfs_gpu_reset'

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Jerome Glisse <glisse@freedesktop.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:11:00 -05:00
Lee Jones
92378a4b54 drm/radeon/radeon_ttm: Place declaration of 'rdev' in same clause as its use
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_create’:
 drivers/gpu/drm/radeon/radeon_ttm.c:611:24: warning: variable ‘rdev’ set but not used [-Wunused-but-set-variable]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Jerome Glisse <glisse@freedesktop.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:09:56 -05:00
Lee Jones
d706d409d9 drm/radeon/atombios_crtc: Remove description of non-existent function param 'encoder'
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/atombios_crtc.c:1796: warning: Excess function parameter 'encoder' description in 'radeon_get_shared_nondp_ppll'

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:03:54 -05:00
Lee Jones
300f6a5c12 drm/radeon: Move prototypes to shared header
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_kms.c:756:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes]
 756 | u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_kms.c:826:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes]
 826 | int radeon_enable_vblank_kms(struct drm_crtc *crtc)
 | ^~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_kms.c:853:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes]
 853 | void radeon_disable_vblank_kms(struct drm_crtc *crtc)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:03:51 -05:00
Lee Jones
1012c55380 drm/radeon/radeon_drv: Move prototypes to a shared headerfile
Fixes the following W=1 kernel build warning(s):

 62 | void radeon_driver_unload_kms(struct drm_device *dev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_kms.c:105:5: warning: no previous prototype for ‘radeon_driver_load_kms’ [-Wmissing-prototypes]
 105 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
 | ^~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_kms.c:619:6: warning: no previous prototype for ‘radeon_driver_lastclose_kms’ [-Wmissing-prototypes]
 619 | void radeon_driver_lastclose_kms(struct drm_device *dev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_kms.c:634:5: warning: no previous prototype for ‘radeon_driver_open_kms’ [-Wmissing-prototypes]
 634 | int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 | ^~~~~~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/radeon/radeon_kms.c:705:6: warning: no previous prototype for ‘radeon_driver_postclose_kms’ [-Wmissing-prototypes]
 705 | void radeon_driver_postclose_kms(struct drm_device *dev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Gareth Hughes <gareth@valinux.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:03:49 -05:00
Lee Jones
6d587203c2 drm/radeon/radeon_drv: Source file headers are not good candidates for kernel-doc
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_drv.c:2: warning: Cannot understand  * file radeon_drv.c

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Gareth Hughes <gareth@valinux.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:03:46 -05:00
Lee Jones
9c69e42e09 drm/radeon/radeon_kms: Include header containing our own prototypes
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_kms.c:61:6: warning: no previous prototype for ‘radeon_driver_unload_kms’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/radeon_kms.c:104:5: warning: no previous prototype for ‘radeon_driver_load_kms’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/radeon_kms.c:618:6: warning: no previous prototype for ‘radeon_driver_lastclose_kms’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/radeon_kms.c:633:5: warning: no previous prototype for ‘radeon_driver_open_kms’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/radeon_kms.c:704:6: warning: no previous prototype for ‘radeon_driver_postclose_kms’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/radeon_kms.c:755:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/radeon_kms.c:825:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/radeon_kms.c:852:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:03:43 -05:00
Lee Jones
f017853ee2 gpu: drm: radeon: radeon_device: Fix a bunch of kernel-doc misdemeanours
- Demote non-conformant headers
 - Fix misnaming issues
 - Rename labels with identical names
 - Remove incorrect descriptions

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes]
 drivers/gpu/drm/radeon/radeon_device.c:552: warning: duplicate section name 'Note'
 drivers/gpu/drm/radeon/radeon_device.c:556: warning: duplicate section name 'Note'
 drivers/gpu/drm/radeon/radeon_device.c:561: warning: duplicate section name 'Note'
 drivers/gpu/drm/radeon/radeon_device.c:564: warning: duplicate section name 'Note'
 drivers/gpu/drm/radeon/radeon_device.c:1106: warning: Function parameter or member 'family' not described in 'radeon_gart_size_auto'
 drivers/gpu/drm/radeon/radeon_device.c:1291: warning: Function parameter or member 'ddev' not described in 'radeon_device_init'
 drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'dev' not described in 'radeon_suspend_kms'
 drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'suspend' not described in 'radeon_suspend_kms'
 drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'fbcon' not described in 'radeon_suspend_kms'
 drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'freeze' not described in 'radeon_suspend_kms'
 drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Excess function parameter 'pdev' description in 'radeon_suspend_kms'
 drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Excess function parameter 'state' description in 'radeon_suspend_kms'
 drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'dev' not described in 'radeon_resume_kms'
 drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'resume' not described in 'radeon_resume_kms'
 drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'fbcon' not described in 'radeon_resume_kms'
 drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Excess function parameter 'pdev' description in 'radeon_resume_kms'

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:03:40 -05:00
Lee Jones
02f40f82c4 gpu: drm: amd: amdgpu: amdgpu: Mark global variables as __maybe_unused
These 3 variables are used in *some* sourcefiles which include
amdgpu.h, but not *all*.  This leads to a flurry of build warnings.

Fixes the following W=1 kernel build warning(s):

 from drivers/gpu/drm/amd/amdgpu/amdgpu.h:67,
 drivers/gpu/drm/amd/amdgpu/amdgpu.h:198:19: warning: ‘no_system_mem_limit’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/amd/amdgpu/amdgpu.h:197:19: warning: ‘debug_evictions’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/amd/amdgpu/amdgpu.h:196:18: warning: ‘sched_policy’ defined but not used [-Wunused-const-variable=]

 NB: Repeats ~650 times - snipped for brevity.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:03:37 -05:00
Lee Jones
3655d1a6a9 gpu: drm: radeon: radeon_drv: Remove unused variable 'ret'
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_drv.c: In function ‘radeon_pmops_runtime_suspend’:
 drivers/gpu/drm/radeon/radeon_drv.c:455:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Gareth Hughes <gareth@valinux.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:03:34 -05:00
Lee Jones
00d44b966d gpu: drm: scheduler: sched_entity: Demote non-conformant kernel-doc headers
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/scheduler/sched_entity.c:316: warning: Function parameter or member 'f' not described in 'drm_sched_entity_clear_dep'
 drivers/gpu/drm/scheduler/sched_entity.c:316: warning: Function parameter or member 'cb' not described in 'drm_sched_entity_clear_dep'
 drivers/gpu/drm/scheduler/sched_entity.c:330: warning: Function parameter or member 'f' not described in 'drm_sched_entity_wakeup'
 drivers/gpu/drm/scheduler/sched_entity.c:330: warning: Function parameter or member 'cb' not described in 'drm_sched_entity_wakeup'

Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Nirmoy Das <nirmoy.aiemd@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:03:31 -05:00
Lee Jones
26b5cf49cd gpu: drm: scheduler: sched_main: Provide missing description for 'sched' paramter
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/scheduler/sched_main.c:74: warning: Function parameter or member 'sched' not described in 'drm_sched_rq_init'

Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:03:24 -05:00
Bernard Zhao
5c0e684074 amd/display/amdgpu_dm: delete same check in if condition
In function amdgpu_dm_connector_get_modes, drm_edid_is_valid
will check weather (!edid), no need to check again in the if
branch.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Bernard Zhao <bernard@vivo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:28:00 -05:00
Tian Tao
e5285ac82d drm/amd/pm: Use kmemdup instead of kmalloc and memcpy
Fixes coccicheck warning:
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c:255:
36-43: WARNING opportunity for kmemdup

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:27:54 -05:00
Tao Zhou
03cc904cb1 drm/amdgpu: update gfx golden setting for dimgrey_cavefish
Set LDS_CONFIG to 0x20 on dimgrey_cavefish to fix GPU hang.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:27:47 -05:00
Bhaskar Chowdhury
f4d4f53ffd drivers: amdgpu: amdgpu_display: Fixed the spelling of falg to flag
s/falg/flag/p

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:27:25 -05:00
Alex Deucher
dda818a09b drm/amdgpu/pm/smu11: cache smu firmware version
So we print the proper SMU firmware version in debugfs, ioctls, etc.
for vangogh.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:27:22 -05:00
Alex Deucher
c15015b831 drm/amdgpu/pm/smu12: cache smu firmware version
So we print the proper SMU firmware version in debugfs, ioctls, etc.
for Renoir.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:27:18 -05:00
Lee Jones
a5a52a43ea drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device dev_info' from the stack
Place it on the heap instead.

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c: In function ‘amdgpu_info_ioctl’:
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:979:1: warning: the frame size of 1128 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:27:14 -05:00
Lee Jones
20b15c0ad7 drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're used
Also rid some unused ones.

This patch solves 2000 warnings!

Fixes the following W=1 kernel build warning(s):

 In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
 from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
 from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
 from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:35:
 At top level:
 drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: ‘dc_fixpt_ln2_div_2’ defined but not used [-Wunused-const-variable=]
 76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
 | ^~~~~~~~~~~~~~~~~~
 drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: ‘dc_fixpt_ln2’ defined but not used [-Wunused-const-variable=]
 75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
 | ^~~~~~~~~~~~
 drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: ‘dc_fixpt_e’ defined but not used [-Wunused-const-variable=]
 74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
 | ^~~~~~~~~~
 drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: ‘dc_fixpt_two_pi’ defined but not used [-Wunused-const-variable=]
 73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
 | ^~~~~~~~~~~~~~~
 drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: ‘dc_fixpt_pi’ defined but not used [-Wunused-const-variable=]
 72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
 | ^~~~~~~~~~~

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:27:10 -05:00
Lee Jones
22f453fbd5 drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr' params
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:594: warning: Function parameter or member 'reg_addr' not described in 'amdgpu_device_indirect_rreg'
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:624: warning: Function parameter or member 'reg_addr' not described in 'amdgpu_device_indirect_rreg64'

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:27:05 -05:00
Bhaskar Chowdhury
debbcf9f3b drivers: amdgpu: amdgpu_display.c: Fix a spelling doens\'t to doesn\'t
s/doens't/doesn't/p

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:26:38 -05:00
Bokun Zhang
de21e4aeb2 drm/amd/amdgpu: Add rev_id workaround logic for SRIOV setup
- When we are under SRIOV setup, the rev_id cannot be read
  properly. Therefore, we will return default value for it

Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:26:31 -05:00
Bokun Zhang
25a35065c0 drm/amd/amdgpu: Fix incorrect logic to increment VCN doorbell index
- The original logic uses a counter based index assignment,
  which is incorrect if we only assign VCN1 to this VF but no VCN0

  The doorbell index is absolute, so we can calculate it by
  using index variable i and j

Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:26:24 -05:00
Yongqiang Sun
880af2eaed drm/amd/display: cap dpp dto phase not more than modulo.
[Why]
4K monitor shows corruption if dpp dto phase is larger than modulo.

[How]
cap phase value never larger than modulo.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:26:18 -05:00
Yongqiang Sun
4b0b1d0526 drm/amd/display: check actual clock value.
[Why]
Actual dpp/disp clock PMFW set are always equal or more than requested.
Need to cache the actual clock for debugging purpose.

[How]
Add actuall dpp/disp clk in clock manager and save it when set clocks.
Add an ASSERT in case of actual clock less than requested.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:26:10 -05:00
Aric Cyr
b5fce050f0 drm/amd/display: 3.2.111
Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:26:05 -05:00
Anthony Koo
45b790dd85 drm/amd/display: [FW Promotion] Release 0.0.41
Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:25:59 -05:00
Alvin Lee
4f6274b3b9 drm/amd/display: Check other planes for iflip only if GSL already enabled
[Why]
We don't want GSL to be enabled when only updating
plane address

[How]
Only check other pipes for immediate flip if GSL is
already enabled

Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:25:51 -05:00
Victor Lu
5c68c65295 drm/amd/display: Explicitly disable cursor when disabling CRTC
[why]
On DCE, the cursor is not being disabled on commits where there is no
CRTC or FB enabled.

[how]
Explicitly disable the cursor in the commit tail only if the pending
commit disables the CRTC.

Signed-off-by: Victor Lu <victorchengchi.lu@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:25:45 -05:00
Yongqiang Sun
c07cbc1f04 drm/amd/display: update dpp dto phase and modulo.
[Why & How]
Program modulo with ref dpp clk Mhz/10.
Program phase with pipe dpp clk Mhz /10.
DMUB FW could use these value to determine optimization clk
for PSR power saving.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:25:38 -05:00
Jing Zhou
c616090023 drm/amd/display: force use sRGB for video TF is sRGB or BT709
[Why]
When mpo enabled, video comes is 709. Desktop use sRGB.
So color change easily noticeable especially when switch between
mpo/non-mpo.

[How]
Force use sRGB for video TF is sRGB or BT709.
DCN1/DCN2 use predefined type with YUV.
DCN3 use distributed points type with YUV.

Signed-off-by: Jing Zhou <Jing.Zhou@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:25:27 -05:00
Aric Cyr
e9917ef822 drm/amd/display: Only wait for flip pending on immediate flips
[Why]
We want to make sure all immediate flips are completed before locking
the pipes, but not pipes that are not flip immediate as they will be
locked by the OTG

[How]
Skip non flip immediate pipes when checking for flip pending.

Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:25:20 -05:00
Eric Bernstein
06d55ffaea drm/amd/display: Move common speakersToChannels definition to hw_shared.h
Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:25:15 -05:00
Dmytro Laktyushkin
74d7f445e8 drm/amd/display: correct dml dsc bpc assignment
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:25:09 -05:00
Krunoslav Kovac
1d496907f1 drm/amd/display: Engage PSR synchronously
[Why & How]
The intended use is to force PSR into active state and ignore all
events until explicit EXIT.
A new event force_static is added to power module. It is then sent
to FW.

Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:24:55 -05:00
Isabel Zhang
fa896813b4 drm/amd/display: Prevent freesync power optimization during validation
[Why]
Due to the freesync power optimization increasing vtotal, the driver
believes that MPO is supported. MPO is turned on. Freesync then
exits, MPO can no longer be supported and immediate flip fails. This
causes corruption on the panel.

[How]
Avoid the freesync optimization when doing validation so in the case
freesync exits, driver can still support the configuration.

Signed-off-by: Isabel Zhang <isabel.zhang@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:24:48 -05:00
Isabel Zhang
103cd0b129 drm/amd/display: Add fallback to prefetch mode 1 if 0 fails
[Why]
In some cases, prefetch mode 0 is unsupported but prefetch 1 is
supported. Due to previous change always forcing prefetch mode to 0, we
are failing bandwidth validation in cases where we should not.

[How]
By default try prefetch mode 0 but in the case validation fails, attempt
to do prefetch mode 1 to see if it is supported.

Signed-off-by: Isabel Zhang <isabel.zhang@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:24:39 -05:00
Tianci.Yin
8301f6b990 drm/amdgpu: enable DCN for navi10 headless SKU
There is a NULL pointer crash when DCN disabled on headless SKU.
On normal SKU, the variable adev->ddev.mode_config.funcs is
initialized in dm_hw_init(), and it is fine to access it in
amdgpu_device_resume(). But on headless SKU, DCN is disabled,
the funcs variable is not initialized, then crash arises.
Enable DCN to fix this issue.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Tianci.Yin <tianci.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:24:30 -05:00
Ramesh Errabolu
3ac2bc7609 drm/amd/amdgpu: Import amdgpu_amdkfd_gfx_v9 header file into implementation
[Why]
Prevent compiler warnings when building amdgpu kernel module

[How]
Add the include directive for amdgpu_amdkfd_gfx_v9 header file

Fixes: aeee2a48ec ("drm/amd/amdgpu: Enable arcturus devices to access the method kgd_gfx_v9_get_cu_occupancy that is already defined")
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Ramesh Errabolu <Ramesh.Errabolu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
2020-11-10 14:15:29 -05:00
Bhawanpreet Lakha
9713158cb2 drm/amdgpu: Add and use seperate reg headers for dcn302
Currently we are using dcn3 reg headers for dcn302. The offsets are
different between the two so they need seperate headers.

Add dcn302 header files and use these instead of dcn3 header

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:15:08 -05:00
Roman Li
29d36369a5 drm/amdgpu: add ta firmware load for green-sardine
[Why]
In preparation to enabling hdcp on green sardine.

[How]
Add green-sardine ta f/w loading in psp_v12

Signed-off-by: Roman Li <roman.li@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-10 14:14:51 -05:00
Daniel Vetter
512bce50a4 Linux 5.10-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl+oiOgeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGKBQIAJw6oad/FA7j9OO2
 dMoaXb8UaBehGWgW2rdfWrFPV5v0DBnp/GkdRpLoZIjV3W4mBfnog7bIa4Eswlxo
 Y8sZxo5/3JlgJQUkHvzR1TYk5z61lHkUw9Kj/cCyx6YdbjSl19AfFsnhQVVMuyp9
 TXL2c7hxkHlw8eBGrymVu0Ip7Zq0x8O2g+8nQpmRcvaR6SBuSHdikDF/iWCtU1YW
 wpk5eWEVaAO67keZOz6b+aCFHqjFX+1dUBBuPnslucYLR73Qi16hfaU9pebe97Gb
 lX/MJ1bR9BeRp314cF0PYbm4WhKjRLudHOFJH8x3dj/BiYNrFK3SJGLiiTwsrAZ8
 kytU0Xs=
 =Ke/D
 -----END PGP SIGNATURE-----

Merge v5.10-rc3 into drm-next

We need commit f8f6ae5d07 ("mm: always have io_remap_pfn_range() set
pgprot_decrypted()") to be able to merge Jason's cleanup patch.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2020-11-10 14:36:36 +01:00
Dave Airlie
5b8c596976 Merge tag 'amd-drm-next-5.11-2020-11-05' of git://people.freedesktop.org/~agd5f/linux into drm-next
amd-drm-next-5.11-2020-11-05:

amdgpu:
- Add initial support for Vangogh
- Add support for Green Sardine
- Add initial support for Dimgrey Cavefish
- Scatter/Gather display support for Renoir
- Updates for Sienna Cichlid
- Updates for Navy Flounder
- SMU7 power improvements
- Modifier support for gfx9+
- CI BACO fixes
- Arcturus SMU fixes
- Lots of code cleanups
- DC fixes
- Kernel doc fixes
- Add more GPU HW client information to page fault error logging
- MPO clock tuning for RV
- FP fixes for DCN3 on ARM and PPC

radeon:
- Expose voltage via hwmon on Sumo APUs

amdkfd:
- Fix unique id handling
- Misc fixes

From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201105222749.201798-1-alexander.deucher@amd.com
2020-11-10 17:48:47 +10:00
Linus Torvalds
f8394f232b Linux 5.10-rc3 2020-11-08 16:10:16 -08:00
Linus Torvalds
15f5d201c1 Driver core documentation fixes for 5.10-rc3
Here are some small Documentation fixes for 5.10-rc3 that were fallout
 from the larger documentation update we did in 5.10-rc2.  Nothing major
 here at all, but all of these have been in linux-next and resolve build
 warnings when building the documentation files.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCX6g8vw8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykdGQCgjEHwT/N2jltd8yHF1Kca5yR+FJYAoMb3sbJS
 gR1iX48G20OhkrPNSIUw
 =HDyQ
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core documentation fixes from Greg KH:
 "Some small Documentation fixes that were fallout from the larger
  documentation update we did in 5.10-rc2.

  Nothing major here at all, but all of these have been in linux-next
  and resolve build warnings when building the documentation files"

* tag 'driver-core-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  Documentation: remove mic/index from misc-devices/index.rst
  scripts: get_api.pl: Add sub-titles to ABI output
  scripts: get_abi.pl: Don't let ABI files to create subtitles
  docs: leds: index.rst: add a missing file
  docs: ABI: sysfs-class-net: fix a typo
  docs: ABI: sysfs-driver-dma-ioatdma: what starts with /sys
2020-11-08 11:30:25 -08:00