linux/drivers/gpu/drm/amd/display/dc
Anson Jacob bc39a69a2a drm/amd/display: dcn20_resource_construct reduce scope of FPU enabled
Limit when FPU is enabled to only functions that does FPU operations for
dcn20_resource_construct, which gets called during driver
initialization.

Enabling FPU operation disables preemption.  Sleeping functions(mutex
(un)lock, memory allocation using GFP_KERNEL, etc.) should not be called
when preemption is disabled.

Fixes the following case caught by enabling
CONFIG_DEBUG_ATOMIC_SLEEP in kernel config
[    1.338434] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:281
[    1.347395] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 197, name: systemd-udevd
[    1.356356] CPU: 7 PID: 197 Comm: systemd-udevd Not tainted 5.13.0+ #3
[    1.356358] Hardware name: System manufacturer System Product Name/PRIME X570-PRO, BIOS 3405 02/01/2021
[    1.356360] Call Trace:
[    1.356361]  dump_stack+0x6b/0x86
[    1.356366]  ___might_sleep.cold+0x87/0x98
[    1.356370]  __might_sleep+0x4b/0x80
[    1.356372]  mutex_lock+0x21/0x50
[    1.356376]  smu_get_uclk_dpm_states+0x3f/0x80 [amdgpu]
[    1.356538]  pp_nv_get_uclk_dpm_states+0x35/0x50 [amdgpu]
[    1.356711]  init_soc_bounding_box+0xf9/0x210 [amdgpu]
[    1.356892]  ? create_object+0x20d/0x340
[    1.356897]  ? dcn20_resource_construct+0x46f/0xd30 [amdgpu]
[    1.357077]  dcn20_resource_construct+0x4b1/0xd30 [amdgpu]
...

Tested on: 5700XT (NAVI10 0x1002:0x731F 0x1DA2:0xE410 0xC1)

Cc: Christian König <christian.koenig@amd.com>
Cc: Hersen Wu <hersenxs.wu@amd.com>
Cc: Anson Jacob <Anson.Jacob@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Acked-by: Agustin Gutierrez <agustin.gutierrez@amd.com>
Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-10-28 14:26:14 -04:00
..
basics
bios drm/amd/display: Add bios parser support for latest firmware_info 2021-10-19 17:32:51 -04:00
calcs drm/amd/display: Allocate structs needed by dcn_bw_calc_rq_dlg_ttu in pipe_ctx 2021-09-23 15:17:30 -04:00
clk_mgr drm/amd/display: Increase watermark latencies for DCN3.1 2021-10-19 17:19:54 -04:00
core Merge tag 'topic/amdgpu-dp2.0-mst-2021-10-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2021-10-28 10:36:26 +10:00
dce drm/amd/display: Add missing PSR state 2021-10-19 17:19:16 -04:00
dce60
dce80 drm/amd/display: Return last used DRR VTOTAL from DC 2021-06-08 12:20:12 -04:00
dce100
dce110 Revert "drm/amd/display: Add helper for blanking all dp displays" 2021-10-19 17:32:51 -04:00
dce112
dce120 drm/amd/display: Return last used DRR VTOTAL from DC 2021-06-08 12:20:12 -04:00
dcn10 drm/amd/display: Align bw context with hw config when system resume 2021-10-28 14:26:13 -04:00
dcn20 drm/amd/display: dcn20_resource_construct reduce scope of FPU enabled 2021-10-28 14:26:14 -04:00
dcn21 drm/amd/display: Re-arrange FPU code structure for dcn2x 2021-10-06 15:49:24 -04:00
dcn30 Revert "drm/amd/display: Add helper for blanking all dp displays" 2021-10-19 17:32:51 -04:00
dcn31 Linux 5.15-rc7 2021-10-28 14:59:38 +10:00
dcn201 drm/amd/display: Re-arrange FPU code structure for dcn2x 2021-10-06 15:49:24 -04:00
dcn301 drm/amd/display: Use adjusted DCN301 watermarks 2021-09-23 15:17:30 -04:00
dcn302 drm/amd/display: Fix multiple memory leaks reported by coverity 2021-09-14 15:57:10 -04:00
dcn303 drm/amd/display: add missing ABM register offsets 2021-09-01 16:55:10 -04:00
dml drm/amd/display: Fix prefetch bandwidth calculation for DCN3.1 2021-10-19 17:19:06 -04:00
dsc drm/amd/display: move bpp range decision in decide dsc bw range function 2021-09-14 15:57:09 -04:00
gpio drm/amd/display: add cyan_skillfish display support 2021-10-04 15:22:57 -04:00
hdcp drm/amd/display: Enforce DPCD Address ranges 2021-06-15 17:25:41 -04:00
inc drm/amd/display: Disable dsc root clock when not being used 2021-10-19 17:19:24 -04:00
irq drm/amdgpu/display: fold DRM_AMD_DC_DCN201 into DRM_AMD_DC_DCN 2021-10-04 15:23:02 -04:00
virtual drm/amd/display: Fix issue with dynamic bpp change for DCN3x 2021-09-23 15:17:30 -04:00
dc_bios_types.h drm/amd/display: Interface for LTTPR interop 2021-04-09 16:48:25 -04:00
dc_ddc_types.h drm/amd/display: Support for DMUB AUX 2021-03-02 14:05:41 -05:00
dc_dmub_srv.c drm/amdgpu/display: fold DRM_AMD_DC_DCN3_1 into DRM_AMD_DC_DCN 2021-06-22 16:51:45 -04:00
dc_dmub_srv.h drm/amdgpu/display: fold DRM_AMD_DC_DCN3_1 into DRM_AMD_DC_DCN 2021-06-22 16:51:45 -04:00
dc_dp_types.h drm/amd/display: Read USB4 DP tunneling data from DPCD. 2021-10-06 15:52:17 -04:00
dc_dsc.h drm/amd/display: move bpp range decision in decide dsc bw range function 2021-09-14 15:57:09 -04:00
dc_edid_parser.c
dc_edid_parser.h
dc_helper.c isystem: ship and use stdarg.h 2021-08-19 09:02:55 +09:00
dc_hw_types.h drm/amd/display: Add support for SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616. 2021-05-27 15:00:47 -04:00
dc_link.h Merge tag 'topic/amdgpu-dp2.0-mst-2021-10-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2021-10-28 10:36:26 +10:00
dc_stat.h drm/amd/display: DMUB Outbound Interrupt Process-X86 2021-07-08 15:14:36 -04:00
dc_stream.h drm/amd/display: Add DP 2.0 MST DC Support 2021-10-25 21:21:08 -04:00
dc_trace.h drm/amd/display: Add control mechanism for FPU utilization 2021-08-05 21:17:59 -04:00
dc_types.h drm/amd/display: Add missing PSR state 2021-10-19 17:19:16 -04:00
dc.h drm/amd/display: 3.2.157 2021-10-19 17:32:51 -04:00
dm_cp_psp.h drm/amd/display: Add DP 2.0 SST DC Support 2021-09-01 16:55:10 -04:00
dm_event_log.h
dm_helpers.h drm/amd/display: Support for SET_CONFIG processing with DMUB 2021-10-06 15:52:11 -04:00
dm_pp_smu.h drm/amdgpu/pm: display vcn pp dpm (v4) 2021-05-21 10:31:55 -04:00
dm_services_types.h
dm_services.h
irq_types.h drm/amd/display: Fix for access for ddc pin and aux engine. 2021-10-06 15:52:48 -04:00
Makefile drm/amd/display: Add stub to get DPIA tunneling device data 2021-10-06 15:51:22 -04:00
os_types.h drm/amd/display: Implement DPIA training loop 2021-10-06 15:51:39 -04:00