Commit Graph

708523 Commits

Author SHA1 Message Date
Dan Carpenter
f05f1b3da5 drm/amd/display: remove some unneeded code
We assign "v_init = asic_blank_start;" a few lines earlier so there is
no need to do it again inside the if statements.  Also "v_init" is
unsigned so it can't be less than zero.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-07 16:21:54 -05:00
Dan Carpenter
74baea4275 drm/amd/display: checking for NULL instead of IS_ERR()
backlight_device_register() never returns NULL, it returns error
pointers on error so the check here is wrong.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-07 16:21:44 -05:00
Dan Carpenter
620fd73edf drm/amd/display: small cleanup in destruct()
Static analysis tools get annoyed that we don't indent this if
statement.  Actually, the if statement isn't required because kfree()
can handle NULL pointers just fine.  The DCE110STRENC_FROM_STRENC()
macro is a wrapper around container_of() but it's basically a no-op or a
cast.  Anyway, it's not really appropriate here so it should be removed
as well.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-07 16:21:39 -05:00
Dave Airlie
26c860d557 Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux into drm-next
A few fixes for DC for 4.15.

* 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux:
  drm/amdgpu/display: fix integer arithmetic problem
  drm/amdgpu/display: remove unused REG_OFFSET macro
  drm/amdgpu/display: provide ASSERT macros unconditionally
  drm/amd/display: Read resource_straps from registers for DCE12
  drm/amd: Add DCE12 resource strap registers
  drm/amd/display: Explicitly call ->reset for each object
  drm/amd/display: Use single fail label in init_drm_dev
  drm/amd/display: Use plane pointer to avoid line breaks
  drm/amd/display: fix null pointer dereference
  amdgpu/dc: Avoid dereferencing NULL pointer
  drm/amd/display: Don't print error when bo_pin is interrupted
  drm/amd/display: Use constants from atom.h for HDMI caps read
  drm/amd/display: check if modeset is required before adding plane
  drm/amd/display: fix high part address in dm_plane_helper_prepare_fb()
  drm/amd/display : add high part address calculation for underlay
  drm/amd/display: Fix no display on Fiji
  Revert "drm/amd/display: Match actual state during S3 resume."
2017-11-03 05:32:08 +10:00
Arnd Bergmann
1f3493faa8 drm/amdgpu/display: fix integer arithmetic problem
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 <harry.wentland@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 13:44:41 -04:00
Arnd Bergmann
d8d46ae97f drm/amdgpu/display: remove unused REG_OFFSET macro
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 <harry.wentland@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 13:43:24 -04:00
Arnd Bergmann
d8eed8263a drm/amdgpu/display: provide ASSERT macros unconditionally
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 <harry.wentland@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 13:42:10 -04:00
Leo (Sunpeng) Li
4a74635ce2 drm/amd/display: Read resource_straps from registers for DCE12
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 <harry.wentland@amd.com>
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 13:06:26 -04:00
Leo (Sunpeng) Li
b7fa851905 drm/amd: Add DCE12 resource strap registers
We need them for initializing audio properly.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 13:05:04 -04:00
Harry Wentland
96719c5439 drm/amd/display: Explicitly call ->reset for each object
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 <harry.wentland@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 13:02:38 -04:00
Harry Wentland
cd8a2ae8dc drm/amd/display: Use single fail label in init_drm_dev
No need for multiple labels as kfree will always do a NULL check
before freeing the memory.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 13:02:20 -04:00
Harry Wentland
efa6a8b7ca drm/amd/display: Use plane pointer to avoid line breaks
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 13:02:05 -04:00
Shirish S
55d9038b0c drm/amd/display: fix null pointer dereference
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 <shirish.s@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 13:00:58 -04:00
Drew Davenport
f5ba60fefa amdgpu/dc: Avoid dereferencing NULL pointer
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 <ddavenport@chromium.org>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 12:58:41 -04:00
Harry Wentland
30b7c6147d drm/amd/display: Don't print error when bo_pin is interrupted
v2: Also don't print for ERESTARTSYS or EAGAIN
v3: Best practice is to only ignore ERESTARTSYS

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 12:58:25 -04:00
Andrew Jiang
cc57306f42 drm/amd/display: Use constants from atom.h for HDMI caps read
Get rid of the constant we copied over before and just directly use the
constants from the file.

Signed-off-by: Andrew Jiang <Andrew.Jiang@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-02 12:56:54 -04:00
Shirish S
7bef1af3b9 drm/amd/display: check if modeset is required before adding plane
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 <alexander.deucher@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Shirish S <shirish.s@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-27 13:15:57 -04:00
Shirish S
56087b31f4 drm/amd/display: fix high part address in dm_plane_helper_prepare_fb()
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 <shirish.s@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-27 13:14:26 -04:00
Shirish S
4d3e00dad8 drm/amd/display : add high part address calculation for underlay
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 <shirish.s@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-27 13:13:51 -04:00
Jerry Zuo
3b21b6d239 drm/amd/display: Fix no display on Fiji
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 <Jerry.Zuo@amd.com>
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-27 13:13:02 -04:00
Rex Zhu
9a68db7220 Revert "drm/amd/display: Match actual state during S3 resume."
This reverts commit 4f346e655d.

fix s3 hang issue.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-27 13:12:42 -04:00
Dave Airlie
af91113360 Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux 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-23 11:17:54 +10:00
Jerry (Fangzhi) Zuo
9b38bd1b8f drm/amd/display:: Fix NULL pointer in Raven hotplug
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 <harry.wentland@amd.com>
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:56 -04:00
Leo (Sunpeng) Li
af09e48aa5 drm/amd/display: Fix memoryleak during S3 resume.
Do not create dc_state within display_resume, since it's being
constructed within atomic check.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:53 -04:00
Shirish S
fc9e9920b1 drm/amd/display: add hardware_planes_only to list of affected planes
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 <shirish.s@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:49 -04:00
Tom St Denis
634086b464 drm/amd/display: Fix brace style
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:46 -04:00
Tom St Denis
9a227d263d drm/amd/display: Remove needless cast in amdgpu_dm_connector_init()
The cast of dc_link is redundant.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:42 -04:00
Tom St Denis
a8d8d3dc9a drm/amd/display: Fix brace style in amdgpu_dm_connector_ddc_get_modes()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:39 -04:00
Tom St Denis
f922237daa drm/amd/display: Tidy up dm_drm_plane_reset()
Move WARN_ON higher up and in doing so fix brace style.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:36 -04:00
Tom St Denis
a68d90e7ae drm/amd/display: Fix indentation in create_eml_sink()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:32 -04:00
Tom St Denis
d2b2562c23 drm/amd/display: Replace block with strncpy() in fill_audio_info()
Replace inlined strncpy with library call.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:29 -04:00
Tom St Denis
8440c30463 drm/amd/display: Fix brace style in amdgpu_dm_initialize_drm_device()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:26 -04:00
Tom St Denis
53cbf65c14 drm/amd/display: Simplify handle_hpd_rx_irq()
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 <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:22 -04:00
Tom St Denis
d4a6e8a90f drm/amd/display: Fix brace style in dm_handle_hpd_rx_irq()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:19 -04:00
Tom St Denis
900b3cb183 drm/amd/display: Fix brace style in amdgpu_dm_update_connector_after_detect()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:16 -04:00
Tom St Denis
1fb0c9ccb3 drm/amd/display: Fix indentation in dm_resume()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:13 -04:00
Tom St Denis
32f5062d1c drm/amd/display: Fix indentation in dm_suspend()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:10 -04:00
Tom St Denis
33be278547 drm/amd/display: Simplify dm_late_init()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:06 -04:00
Dave Airlie
299f27fd37 amdgpu/dc: inline dml_round_to_multiple
turns out to be a win to inline this.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:53:03 -04:00
Dave Airlie
b2484b6237 amdgpu/dc: drop dml_util_is_420
This is unused code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:52:55 -04:00
Harry Wentland
c6ca449617 drm/amd/display: Add bunch of missing license headers in DML
All files should have MIT headers.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:52:48 -04:00
Harry Wentland
16b2f2ed5f amdgpu/dc: inline a bunch of the dml wrappers.
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 <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:52:42 -04:00
Harry Wentland
565f26a39d drm/amd/display: Small comment on dc_commit_planes_to_stream
Having one struct on the stack was somewhat confusing. Also mention
that the whole function should eventually go.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:52:37 -04:00
Dmytro Laktyushkin
3eea71e36f drm/amd/display: Minor update to DML
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:52:32 -04:00
Dmytro Laktyushkin
f63d89066f drm/amd/display: change dml numdpp var to uint
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:52:27 -04:00
Tony Cheng
e92b44fdee drm/amd/display: default force_single_disp_pipe_split = 1 on RV
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 <tony.cheng@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:52:21 -04:00
Harry Wentland
be11749177 drm/amd/display: Remove redundant condition in dml vba
Found by 0-day
https://lists.freedesktop.org/archives/dri-devel/2017-October/154698.html

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:52:14 -04:00
Tony Cheng
9e7da3268a drm/amd/display: dal 3.1.07
- regression fixes in dal 3.1.06
- more linux upstream backport

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:52:07 -04:00
Harry Wentland
bb16bee4b3 drm/amd/display: Reduce stack size of commit_planes_to_stream
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 <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:52:02 -04:00
Harry Wentland
1bed4d09a4 drm/amd/display: Fix one more place for dc_stream_state leak
One more thing that happened due to uneven applying of patches. This
mirrors what Darren Salt fixed.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:51:54 -04:00