aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-11-02drm/amdgpu/display: fix integer arithmetic problemArnd Bergmann1-1/+1
gcc warns about an ambiguous integer calculation: drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function 'calculate_bandwidth': drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:534:5: error: this decimal constant is unsigned only in ISO C90 [-Werror] data->lb_line_pitch = bw_ceil2(bw_mul(bw_div(bw_frc_to_fixed(2401171875, 100000000), bw_int_to_fixed(3)), bw_ceil2(data->source_width_in_lb, bw_int_to_fixed(8))), bw_int_to_fixed(48)); ^~~~ Marking the constant as explicitly unsigned makes it work fine everywhere without warnings. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02drm/amdgpu/display: remove unused REG_OFFSET macroArnd Bergmann1-3/+0
The name conflicts with another macro of the same name on the ARM ixp4xx platform, leading to build errors. Neither of the users actually should use a name that generic, but the other one was here first and the dc driver doesn't actually use it. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02drm/amdgpu/display: provide ASSERT macros unconditionallyArnd Bergmann1-4/+0
It seems impossible to build this driver without setting either CONFIG_DEBUG_KERNEL or CONFIG_DEBUG_DRIVER: drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h: In function 'set_reg_field_value_ex': drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:132:2: error: implicit declaration of function 'ASSERT'; did you mean 'IS_ERR'? [-Werror=implicit-function-declaration] This moves the ASSERT() macro and related helpers outside of the #ifdef to get it to build again. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02drm/amd/display: Read resource_straps from registers for DCE12Leo (Sunpeng) Li1-6/+13
Now that the registers exist, assign them to the resource_straps struct. v2: Fix indentation v3: Fix trailing whitespace and checkpatch warnings. bug: https://bugs.freedesktop.org/show_bug.cgi?id=103404 Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Leo (Sunpeng) Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02drm/amd: Add DCE12 resource strap registersLeo (Sunpeng) Li2-0/+12
We need them for initializing audio properly. Signed-off-by: Leo (Sunpeng) Li <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02drm/amd/display: Explicitly call ->reset for each objectHarry Wentland1-2/+12
We need to avoid calling reset after detection because the next commit adds freesync properties on the atomic_state which are set during detection. Calling reset after this clears them. The easiest way to accomplish this right now is to call ->reset on the connector right after creation but before detection. To stay consistent call ->reset on every other object as well after creation. v2: Provide better reason for this change in commit msg. Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Roman Li <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02drm/amd/display: Use single fail label in init_drm_devHarry Wentland1-13/+11
No need for multiple labels as kfree will always do a NULL check before freeing the memory. Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Bhawanpreet Lakha <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02drm/amd/display: Use plane pointer to avoid line breaksHarry Wentland1-4/+7
Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Mikita Lipski <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02drm/amd/display: fix null pointer dereferenceShirish S1-1/+1
While setting cursor position in case of mpo, input_pixel_processor is not available for underlay, hence add check of the same to avoid null pointer access issue. Signed-off-by: Shirish S <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02amdgpu/dc: Avoid dereferencing NULL pointerDrew Davenport1-3/+6
crtc is dereferenced from within drm_atomic_get_new_crtc_state, so check for NULL before initializing new_crtc_state. Signed-off-by: Drew Davenport <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02drm/amd/display: Don't print error when bo_pin is interruptedHarry Wentland1-1/+2
v2: Also don't print for ERESTARTSYS or EAGAIN v3: Best practice is to only ignore ERESTARTSYS Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-11-02drm/amd/display: Use constants from atom.h for HDMI caps readAndrew Jiang1-3/+3
Get rid of the constant we copied over before and just directly use the constants from the file. 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-27drm/amd/display: check if modeset is required before adding planeShirish S1-0/+3
Adding affected planes without checking if modeset is requested from the user space causes performance regression in video p/b scenarios when full screen p/b is not composited. Hence add a check before adding a plane as affected. bug: https://bugs.freedesktop.org/show_bug.cgi?id=103408 Acked-by: Alex Deucher <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Shirish S <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-27drm/amd/display: fix high part address in dm_plane_helper_prepare_fb()Shirish S1-2/+8
The high part calculation of luma and chroma address' was missing in dm_plane_helper_prepare_fb(). This fix brings uniformity in the address' at atomic_check and atomic_commit for both RGB & YUV planes. Signed-off-by: Shirish S <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-27drm/amd/display : add high part address calculation for underlayShirish S1-2/+7
Currently the high part of the address structure is not populated in case of luma and chroma. This patch adds this calculation. Signed-off-by: Shirish S <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-27drm/amd/display: Fix no display on FijiJerry Zuo1-10/+9
Allocate memory for the second pipe allocate_mem_input() needs to be done prior to program pipe front end. It shows sensitive to Fiji. Failure to do so will cause error in allocate memory  allocate_mem_input() on the second connected display. Signed-off-by: Jerry Zuo <[email protected]> Signed-off-by: Yongqiang Sun <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-27Revert "drm/amd/display: Match actual state during S3 resume."Rex Zhu1-33/+0
This reverts commit 4f346e655d24140fb40b46f814506ba17ac34ea1. fix s3 hang issue. Acked-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-10-23Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie88-6064/+13890
into drm-next Last batch of new stuff for DC. Highlights: - Fix some memory leaks - S3 fixes - Hotplug fixes - Fix some CX multi-display issues - MST fixes - DML updates from the hw team - Various code cleanups - Misc bug fixes * 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux: (155 commits) drm/amd/display:: Fix NULL pointer in Raven hotplug drm/amd/display: Fix memoryleak during S3 resume. drm/amd/display: add hardware_planes_only to list of affected planes drm/amd/display: Fix brace style drm/amd/display: Remove needless cast in amdgpu_dm_connector_init() drm/amd/display: Fix brace style in amdgpu_dm_connector_ddc_get_modes() drm/amd/display: Tidy up dm_drm_plane_reset() drm/amd/display: Fix indentation in create_eml_sink() drm/amd/display: Replace block with strncpy() in fill_audio_info() drm/amd/display: Fix brace style in amdgpu_dm_initialize_drm_device() drm/amd/display: Simplify handle_hpd_rx_irq() drm/amd/display: Fix brace style in dm_handle_hpd_rx_irq() drm/amd/display: Fix brace style in amdgpu_dm_update_connector_after_detect() drm/amd/display: Fix indentation in dm_resume() drm/amd/display: Fix indentation in dm_suspend() drm/amd/display: Simplify dm_late_init() amdgpu/dc: inline dml_round_to_multiple amdgpu/dc: drop dml_util_is_420 drm/amd/display: Add bunch of missing license headers in DML amdgpu/dc: inline a bunch of the dml wrappers. ...
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]>