aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
AgeCommit message (Collapse)AuthorFilesLines
2017-10-25drm/amd/powerplay: add one smc message for Vega10Eric Huang1-1/+2
This is used to fix performance drop caused by updated SMU FW. Signed-off-by: Eric Huang <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-25drm/amd/powerplay: fix amd_powerplay_reset()Dan Carpenter1-1/+1
We accidentally inverted an if statement and turned amd_powerplay_reset() into a no-op. Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-25drm/amd/amdgpu: Remove workaround check for UVD6 on APUsTom St Denis1-11/+5
On APUs the uvd6 driver was skipping proper suspend/resume routines resulting in a broken state upon resume. Signed-off-by: Tom St Denis <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Leo Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-25locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns ↵Mark Rutland3-5/+5
to READ_ONCE()/WRITE_ONCE() Please do not apply this to mainline directly, instead please re-run the coccinelle script shown below and apply its output. For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't harmful, and changing them results in churn. However, for some features, the read/write distinction is critical to correct operation. To distinguish these cases, separate read/write accessors must be used. This patch migrates (most) remaining ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following coccinelle script: ---- // Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and // WRITE_ONCE() // $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2017-10-21drm/amd/powerplay: fix uninitialized variableRex Zhu1-3/+3
refresh_rate was not initialized when program display gap. this patch can fix vce ring test failed when do S3 on Polaris10. bug: https://bugs.freedesktop.org/show_bug.cgi?id=103102 bug: https://bugzilla.kernel.org/show_bug.cgi?id=196615 Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2017-10-21drm/amd/display:: Fix NULL pointer in Raven hotplugJerry (Fangzhi) Zuo1-7/+0
Programming sequence to frontend and backend has been switched. In such case, program_scaler() is getting called when programming frontend, and should be removed from backend programming routine. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Jerry (Fangzhi) Zuo <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix memoryleak during S3 resume.Leo (Sunpeng) Li1-4/+0
Do not create dc_state within display_resume, since it's being constructed within atomic check. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Leo (Sunpeng) Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: add hardware_planes_only to list of affected planesShirish S1-6/+24
For SoC's having software designed cursor plane, should be treated differently than hardware cursor planes. The DRM core initializes cursor plane by default with legacy_cursor_update set. Hence legacy_cursor_update can be use effectively to handle software cursor planes' update and atomicity functionalities. This patch uses this variable to decide in the atomic_check to whether add a requested plane to the list of affected planes or not, hence fixing the issue of co-existence of MPO, i.e, setting of available hardware planes like underlay and updation of cursor planes as well. Without this patch when underlay is set from user space, only blank screen with backlight is visible. Signed-off-by: Shirish S <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix brace styleTom St Denis1-9/+6
Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Remove needless cast in amdgpu_dm_connector_init()Tom St Denis1-1/+2
The cast of dc_link is redundant. Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix brace style in amdgpu_dm_connector_ddc_get_modes()Tom St Denis1-1/+2
Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Tidy up dm_drm_plane_reset()Tom St Denis1-3/+3
Move WARN_ON higher up and in doing so fix brace style. Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix indentation in create_eml_sink()Tom St Denis1-2/+1
Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Replace block with strncpy() in fill_audio_info()Tom St Denis1-5/+3
Replace inlined strncpy with library call. Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix brace style in amdgpu_dm_initialize_drm_device()Tom St Denis1-2/+1
Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Simplify handle_hpd_rx_irq()Tom St Denis1-6/+6
There is a local reference to the dc_link that wasn't being used so we shorten references throughout the function. Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix brace style in dm_handle_hpd_rx_irq()Tom St Denis1-1/+2
Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix brace style in amdgpu_dm_update_connector_after_detect()Tom St Denis1-2/+2
Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix indentation in dm_resume()Tom St Denis1-4/+1
Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix indentation in dm_suspend()Tom St Denis1-4/+1
Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Simplify dm_late_init()Tom St Denis1-2/+1
Signed-off-by: Tom St Denis <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21amdgpu/dc: inline dml_round_to_multipleDave Airlie3-21/+19
turns out to be a win to inline this. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21amdgpu/dc: drop dml_util_is_420Dave Airlie2-34/+0
This is unused code. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Add bunch of missing license headers in DMLHarry Wentland2-3/+46
All files should have MIT headers. Signed-off-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21amdgpu/dc: inline a bunch of the dml wrappers.Harry Wentland7-80/+110
This reduces the code size. This is basically a redo of Dave's change with the same name on top of the latest DML. Signed-off-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Small comment on dc_commit_planes_to_streamHarry Wentland1-0/+7
Having one struct on the stack was somewhat confusing. Also mention that the whole function should eventually go. Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Minor update to DMLDmytro Laktyushkin6-22/+5
Signed-off-by: Dmytro Laktyushkin <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: change dml numdpp var to uintDmytro Laktyushkin2-8/+8
Signed-off-by: Dmytro Laktyushkin <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: default force_single_disp_pipe_split = 1 on RVTony Cheng1-0/+1
1080p idle, stutter efficiency goes up from 95.8% to 97.8% result in 5mW saving from APU and 8mW saving from DDR4 Signed-off-by: Tony Cheng <[email protected]> Reviewed-by: Yongqiang Sun <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Remove redundant condition in dml vbaHarry Wentland1-1/+1
Found by 0-day https://lists.freedesktop.org/archives/dri-devel/2017-October/154698.html Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Dmytro Laktyushkin <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: dal 3.1.07Tony Cheng1-2/+1
- regression fixes in dal 3.1.06 - more linux upstream backport Signed-off-by: Tony Cheng <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Reduce stack size of commit_planes_to_streamHarry Wentland1-6/+13
This function likes to blow 1024 stack size when something is added to the addr struct. For now just dynamically allocate. Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix one more place for dc_stream_state leakHarry Wentland1-1/+1
One more thing that happened due to uneven applying of patches. This mirrors what Darren Salt fixed. Signed-off-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Move OS types to os_types.hHarry Wentland2-45/+40
Some of this stuff is not really dm_services Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: LGD panel willl flash line under windowHersen Wu1-0/+9
Signed-off-by: Hersen Wu <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: DAL 3.1.06Tony Cheng1-1/+2
Raven bug fixes - RS3 MPO stability improvement - SLS fixes - AM4 fixes DAL 3.1 - merge in upstream patches from DRM maintainer Dave Arilie - hubp, dpp HW objects Signed-off-by: Tony Cheng <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: rename dscl functionsYue Hin Lau3-56/+56
Signed-off-by: Yue Hin Lau <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: WA for 3 display play video hot plug.Yongqiang Sun5-23/+26
Three monitor connected and playing a video will occupy all 4 pipes, if hot plug forth display, commit streams will be failed due to no free pipe can be found. Work around: When forth monitor connected, mark video plane as a fake plane, remove it in dc, keep it in dm and report address to OS, until OS turn off MPO. Signed-off-by: Yongqiang Sun <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Add DIGD case when getting retimer settingsAndrew Jiang1-0/+12
One of the HDMI ports map to DIGD, which we did not map to DP3 ext HDMI settings. Add the DIGD case so that we can get proper retimer settings from SBIOS for that port. Signed-off-by: Andrew Jiang <[email protected]> Reviewed-by: Charlene Liu <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Add chip mask to HDMI retimer/redriver checkAndrew Jiang1-3/+5
There were cases where the chip caps held additional bits that led to the retimer/redriver check failing; use the proper mask to ensure that we have only the bits that we care about for the check in question. Signed-off-by: Andrew Jiang <[email protected]> Reviewed-by: Charlene Liu <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Correct timings in build scaling paramsAndrew Jiang1-14/+3
A previous patch set the addressable timing as active + border, when in fact, the VESA standard specifies active as equal to addressable + border. This patch makes the fix more correct and in line with the standard. Signed-off-by: Andrew Jiang <[email protected]> Reviewed-by: Andrew Jiang <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: check SR_WATERMARK regs prior to writeEric Bernstein1-70/+74
Signed-off-by: Eric Bernstein <[email protected]> Reviewed-by: Charlene Liu <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: drop display_pipe_clocks.c.Dave Airlie4-145/+1
This code isn't used at all in the kernel tree, perhaps it can wait to be imported when it is. It also does a lot of floating point calcs, so probably good to drop it until it's needed and we can ensure proper fpu accessors. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix up some whitespace in handle_cursor_updateHarry Wentland1-4/+4
Use combo of tabs and spaces Signed-off-by: Harry Wentland <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix warning about uninitialized variableHarry Wentland1-1/+1
Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Bhawanpreet Lakha <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Don't set cursor address is 0 logging as errorsAndrew Jiang1-1/+1
This actually happens quite a bit, and having it as an error causes false positive messages when running tests. Signed-off-by: Andrew Jiang <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: fix ifnullfree.cocci warningskbuild test robot1-4/+2
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:134:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:175:4-9: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: f09cd1f46388 ("drm/amd/display: Use kernel alloc/free") Signed-off-by: Fengguang Wu <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/dc: fix semicolon.cocci warningskbuild test robot1-1/+1
drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:134:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 80be23c57868 ("drm/amd/dc: Add dc display driver (v2)") CC: Harry Wentland <[email protected]> Signed-off-by: Fengguang Wu <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix warning about overflowHarry Wentland1-5/+5
v2: convert value to bool using !! Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-21drm/amd/display: Fix non-DCN buildHarry Wentland1-0/+2
Acquire_first_split_pipe only makes sense for DCN. Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>