openwrt/staging/blogic.git
6 years agodrm/amd/display: Move dc_link interface to separate header
Harry Wentland [Wed, 8 Nov 2017 19:59:48 +0000 (14:59 -0500)]
drm/amd/display: Move dc_link interface to separate header

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>
6 years agodrm/amd/display: Move dc_stream interface to separate header
Harry Wentland [Wed, 8 Nov 2017 19:34:14 +0000 (14:34 -0500)]
drm/amd/display: Move dc_stream interface to separate header

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>
6 years agodrm/amd/display: Optimize front end programming.
Yongqiang Sun [Wed, 8 Nov 2017 19:50:06 +0000 (14:50 -0500)]
drm/amd/display: Optimize front end programming.

for video scaling changes,
Reduce reg access count from 1044 to 447, duration time
from 4.6ms to 3ms.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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>
6 years agodrm/amd/display: Fix unused variable warning
Leo (Sunpeng) Li [Wed, 8 Nov 2017 17:00:51 +0000 (12:00 -0500)]
drm/amd/display: Fix unused variable warning

'struct mpc *mpc' is not used.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@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>
6 years agodrm/amd/display: Add check update surfaces for stream wrapper
Andrew Jiang [Wed, 8 Nov 2017 17:15:17 +0000 (12:15 -0500)]
drm/amd/display: Add check update surfaces for stream wrapper

This allows us to properly clear and set the update flags for all cases.

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>
6 years agodrm/amd/display: Rename pitch_alignment to linear_pitch_alignment
Andrew Jiang [Wed, 8 Nov 2017 14:21:28 +0000 (09:21 -0500)]
drm/amd/display: Rename pitch_alignment to linear_pitch_alignment

Also initialize this to 64 for all ASICs.

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>
6 years agodrm/amd/display: Added Opp and Diags Interface for P to I
Arun Pandey [Wed, 8 Nov 2017 09:02:55 +0000 (17:02 +0800)]
drm/amd/display: Added Opp and Diags Interface for P to I

Signed-off-by: Arun Pandey <Arun.Pandey@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix plane update prior to stream enablement
Tony Cheng [Wed, 8 Nov 2017 04:37:49 +0000 (23:37 -0500)]
drm/amd/display: fix plane update prior to stream enablement

plane update prior to stream enablement is there to recombine pipe
in case we need free pipe for new display.  need to pass in new state
or we will just re-applyingwhat we already have

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>
6 years agodrm/amd/display: Add update flags in to determine surface update type
Andrew Jiang [Mon, 6 Nov 2017 22:00:07 +0000 (17:00 -0500)]
drm/amd/display: Add update flags in to determine surface update type

This way, we can know exactly what triggered the update type we're
looking at, and we can simplify the logic for determining what exactly
needs to be updated in the future.

Also allow a dst rect size increase to go through a medium update,
since that does not require us to increase clock or bandwidth.

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>
6 years agodrm/amd/display: Remove legacy unused workaround
Andrew Jiang [Tue, 7 Nov 2017 19:54:56 +0000 (14:54 -0500)]
drm/amd/display: Remove legacy unused workaround

We shouldn't be able to get a non-visible plane into DC anymore.

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>
6 years agodrm/amd/display: Early return on stream programming failure
Leo (Sunpeng) Li [Tue, 7 Nov 2017 20:54:58 +0000 (15:54 -0500)]
drm/amd/display: Early return on stream programming failure

The fail goto is incorrect. It will incorrectly release the dc_states on
stream programming failure.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@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>
6 years agodrm/amd/display: Change frontend/backend programming sequence
Leo (Sunpeng) Li [Tue, 7 Nov 2017 18:51:02 +0000 (13:51 -0500)]
drm/amd/display: Change frontend/backend programming sequence

This is a follow-up to the following change:

Yongqiang Sun: Program front end first when set mode.

Due to pipe-splitting features, how we handle stream enabling and
disabling needs to change.

In the case of pipe split disable, two planes need to be combined back
into the same stream. This needs to be done before any stream
programming happens.

The previous patch addresses this, but breaks cross-platform
compatibility. It's not guaranteed that a dc commit will be called
separately to program planes and streams.

Therefore, we handle the combined commit case by doing plane programming
both before and after stream programming, to handle pipe split disable
and plane enable respectively.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@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>
6 years agodrm/amd/display: Remove dangling planes on dc commit state
Leo (Sunpeng) Li [Tue, 7 Nov 2017 18:21:02 +0000 (13:21 -0500)]
drm/amd/display: Remove dangling planes on dc commit state

When disabling pipe splitting, we need to make sure we disable both
planes used.

This should be done for Linux as well.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@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>
6 years agodrm/amd/display: Optimize programming front end
Yongqiang Sun [Tue, 7 Nov 2017 16:01:34 +0000 (11:01 -0500)]
drm/amd/display: Optimize programming front end

In case of update type is medium, optimize squence,
reduce programing time.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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>
6 years agodrm/amd/display: Fix unbalanced locking in surface apply
Roman Li [Tue, 7 Nov 2017 15:58:40 +0000 (10:58 -0500)]
drm/amd/display: Fix unbalanced locking in surface apply

also simplifying syntax and removing unused variable in
dce110_apply_ctx_for_surface()

Signed-off-by: Roman Li <Roman.Li@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>
6 years agodrm/amd/display: Apply work around for stutter.
Yongqiang Sun [Mon, 6 Nov 2017 19:40:31 +0000 (14:40 -0500)]
drm/amd/display: Apply work around for stutter.

Power on one plane after disable all the planes, for
a hw bug work around to resolve stutter efficiency issue.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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>
6 years agodrm/amd/display: remove dcn10 wait on tg unlock
Dmytro Laktyushkin [Tue, 31 Oct 2017 21:29:18 +0000 (17:29 -0400)]
drm/amd/display: remove dcn10 wait on tg unlock

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>
6 years agodrm/amd/display: Loosen plane_info and scaling_info checks
Andrew Jiang [Mon, 6 Nov 2017 20:53:36 +0000 (15:53 -0500)]
drm/amd/display: Loosen plane_info and scaling_info checks

Make it so that differing dcc and plane size fields don't necessarily
result in a full update, along with upscaling modes. This allows us to
save some unnecessary full updates.

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>
6 years agodrm/amd/display: Report pitch_alignment for DCN
Andrew Jiang [Mon, 6 Nov 2017 16:56:21 +0000 (11:56 -0500)]
drm/amd/display: Report pitch_alignment for DCN

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>
6 years agodrm/amd/display: combine output signal and signal
Eric Yang [Fri, 3 Nov 2017 21:58:42 +0000 (17:58 -0400)]
drm/amd/display: combine output signal and signal

output signal used to be a public member to be used by DM to override
the stream signal. Now since there is no longer separation between
public and private part of stream, they are combined. The overriding
was not working properly as well, which is addressed by this change

Signed-off-by: Eric Yang <Eric.Yang2@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>
6 years agodrm/amd/display: A few more color indentation changes
Harry Wentland [Wed, 1 Nov 2017 18:31:58 +0000 (14:31 -0400)]
drm/amd/display: A few more color indentation changes

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Remove unused register read in program_pwl
Harry Wentland [Tue, 31 Oct 2017 19:17:27 +0000 (15:17 -0400)]
drm/amd/display: Remove unused register read in program_pwl

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Bunch more color indentation cleanups
Harry Wentland [Tue, 31 Oct 2017 19:16:56 +0000 (15:16 -0400)]
drm/amd/display: Bunch more color indentation cleanups

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Remove extra arr_points element
Harry Wentland [Tue, 31 Oct 2017 18:41:41 +0000 (14:41 -0400)]
drm/amd/display: Remove extra arr_points element

arr_points[1] and [2] were duplicated. Remove the extra
one. If we ever need more points we can add them but the
current state of affairs is confusing.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: dal 3.1.16
Tony Cheng [Fri, 3 Nov 2017 20:33:14 +0000 (16:33 -0400)]
drm/amd/display: dal 3.1.16

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>
6 years agodrm/amd/display: always call set output tf
Eric Yang [Fri, 3 Nov 2017 20:21:37 +0000 (16:21 -0400)]
drm/amd/display: always call set output tf

Temporary solution to fix gamma adjustment not
working.

Signed-off-by: Eric Yang <Eric.Yang2@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>
6 years agodrm/amd/display: Fixed not set scaler bug.
Yongqiang Sun [Fri, 3 Nov 2017 20:02:50 +0000 (16:02 -0400)]
drm/amd/display: Fixed not set scaler bug.

New scaler parameter assign to dpp is after early return,
cause next flip scaler not program.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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>
6 years agodrm/amd/display: dal 3.1.15
Tony Cheng [Thu, 2 Nov 2017 22:53:26 +0000 (18:53 -0400)]
drm/amd/display: dal 3.1.15

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>
6 years agodrm/amd/display: Remove unused OPP functions from interface
Eric Bernstein [Thu, 2 Nov 2017 21:39:48 +0000 (17:39 -0400)]
drm/amd/display: Remove unused OPP functions from interface

Signed-off-by: Eric Bernstein <eric.bernstein@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>
6 years agodrm/amd/display: fix dcn10_hubbub_wm_read_state
Ken Chalmers [Thu, 2 Nov 2017 21:21:35 +0000 (17:21 -0400)]
drm/amd/display: fix dcn10_hubbub_wm_read_state

The ALLOW_SR registers might not always be available.

Signed-off-by: Ken Chalmers <ken.chalmers@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>
6 years agodrm/amd/display: Add transfer function to dc_surface_update
SivapiriyanKumarasamy [Thu, 2 Nov 2017 19:28:32 +0000 (15:28 -0400)]
drm/amd/display: Add transfer function to dc_surface_update

Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@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>
6 years agodrm/amd/display: send display_count msg so SMU can enter S0i2
Hersen Wu [Tue, 31 Oct 2017 19:55:15 +0000 (15:55 -0400)]
drm/amd/display: send display_count msg so SMU can enter S0i2

SMU can future lower voltages in long idle case when all display is off.

If all display output is turned off via DPMS, send display_count = 0
after all output are turned off.

otherwise send display_count msg before turning on display to make sure
SMU exit S0i2 state.  before is not neccessary as we are out of S0i2
when driver execute code, but send message before anyways for correctness.

Signed-off-by: Hersen Wu <hersenxs.wu@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>
6 years agodrm/amd/display: Modified front end initiail in init_hw
Yongqiang Sun [Thu, 2 Nov 2017 17:24:20 +0000 (13:24 -0400)]
drm/amd/display: Modified front end initiail in init_hw

Optimized front end initial sequence, reset MPC module
properly.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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>
6 years agodrm/amd/display: add warning on long reg_wait
Dmytro Laktyushkin [Thu, 2 Nov 2017 18:55:14 +0000 (14:55 -0400)]
drm/amd/display: add warning on long reg_wait

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>
6 years agodrm/amd/display: remove unnecessary waits in dcn10
Dmytro Laktyushkin [Tue, 31 Oct 2017 22:05:31 +0000 (18:05 -0400)]
drm/amd/display: remove unnecessary waits in dcn10

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix uninitialized variable warning
Dmytro Laktyushkin [Thu, 2 Nov 2017 19:07:25 +0000 (15:07 -0400)]
drm/amd/display: fix uninitialized variable warning

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix regamma programming
Dmytro Laktyushkin [Thu, 2 Nov 2017 14:52:09 +0000 (10:52 -0400)]
drm/amd/display: fix regamma programming

When new coefficients match cached we would skip setting regamma mode
Also, when doing a stream update we would program regamma for all pipes,
even thos that are not yet powered on. This resulted in never setting
regamma since we would cache before the pipe is powered.

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>
6 years agodrm/amd/display: Fix some more color indentations
Harry Wentland [Tue, 31 Oct 2017 20:27:59 +0000 (16:27 -0400)]
drm/amd/display: Fix some more color indentations

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>
6 years agodrm/amd/display: Bunch of indentation cleanups in color stuff
Harry Wentland [Tue, 31 Oct 2017 18:34:13 +0000 (14:34 -0400)]
drm/amd/display: Bunch of indentation cleanups in color stuff

Trying to align with kernel coding style and make it a bit more
readable.

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>
6 years agodrm/amd/display: Refactor disable front end pipes.
Yongqiang Sun [Mon, 30 Oct 2017 21:32:14 +0000 (17:32 -0400)]
drm/amd/display: Refactor disable front end pipes.

There are different code to disable front end, it is
difficult to debug and adding new process.
This refactor makes all disable front end call the same
functions.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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>
6 years agodrm/amd/display: dal 3.1.14
Tony Cheng [Thu, 2 Nov 2017 01:52:21 +0000 (21:52 -0400)]
drm/amd/display: dal 3.1.14

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>
6 years agodrm/amd/display: renaming dpp function to follow naming convention
Yue Hin Lau [Tue, 31 Oct 2017 19:23:57 +0000 (15:23 -0400)]
drm/amd/display: renaming dpp function to follow naming convention

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Yuehin Lau <Yuehin.Lau@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: dal 3.1.13
Tony Cheng [Tue, 31 Oct 2017 21:55:20 +0000 (17:55 -0400)]
drm/amd/display: dal 3.1.13

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>
6 years agodrm/amd/display: call set csc_default if enable adjustment is false
Yue Hin Lau [Fri, 27 Oct 2017 19:28:38 +0000 (15:28 -0400)]
drm/amd/display: call set csc_default if enable adjustment is false

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Add OPP DPG blank function
Eric Bernstein [Tue, 31 Oct 2017 15:52:25 +0000 (11:52 -0400)]
drm/amd/display: Add OPP DPG blank function

Added a function to blank data using OPP DPG.
Clean up code to prepare for pseudocode review with HW.

Signed-off-by: Eric Bernstein <eric.bernstein@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>
6 years agodrm/amd/display: dal 3.1.12
Tony Cheng [Tue, 31 Oct 2017 17:51:40 +0000 (13:51 -0400)]
drm/amd/display: dal 3.1.12

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>
6 years agodrm/amd/display: cache pwl params and scl_data to avoid extra programming
Dmytro Laktyushkin [Fri, 27 Oct 2017 21:55:03 +0000 (17:55 -0400)]
drm/amd/display: cache pwl params and scl_data to avoid extra programming

This saves us about 5000 reg writes per full update. This translates to about
40000 writes over the course of single eDP bootup.

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>
6 years agodrm/amd/display: Don't use dc_link in link_encoder
Andrew Jiang [Tue, 26 Sep 2017 23:45:43 +0000 (19:45 -0400)]
drm/amd/display: Don't use dc_link in link_encoder

dc_link is at a higher level than link_encoder, and we only want
higher-level components to be able to access lower-level ones,
not the other way around.

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>
6 years agodrm/amd/display: Both timing_sync and multisync need stream_count > 1
Harry Wentland [Mon, 30 Oct 2017 19:53:40 +0000 (15:53 -0400)]
drm/amd/display: Both timing_sync and multisync need stream_count > 1

Previous code threw a warning about misleading indentation

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Add tg_init interface.
Yongqiang Sun [Mon, 30 Oct 2017 17:35:04 +0000 (13:35 -0400)]
drm/amd/display: Add tg_init interface.

Clear OPTC underflow status when init_hw.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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>
6 years agodrm/amd/display: Enalbe blank data double buffer after mpc disconnected.
Yongqiang Sun [Mon, 23 Oct 2017 19:57:52 +0000 (15:57 -0400)]
drm/amd/display: Enalbe blank data double buffer after mpc disconnected.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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>
6 years agodrm/amd/display: get remote dpcd caps for timing validation
Eric Yang [Mon, 23 Oct 2017 16:06:54 +0000 (12:06 -0400)]
drm/amd/display: get remote dpcd caps for timing validation

Signed-off-by: Eric Yang <Eric.Yang2@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>
6 years agodrm/amd/display: Only update dchub if hubbub is available
Yue Hin Lau [Thu, 26 Oct 2017 20:30:44 +0000 (16:30 -0400)]
drm/amd/display: Only update dchub if hubbub is available

Signed-off-by: Yue Hin Lau <Yuehin.Lau@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>
6 years agodrm/amd/display: Call ipp_program_bias_and_scale only if available
Eric Bernstein [Thu, 26 Oct 2017 22:13:36 +0000 (18:13 -0400)]
drm/amd/display: Call ipp_program_bias_and_scale only if available

Also move some register definitions to common DCN regs.

Signed-off-by: Eric Bernstein <eric.bernstein@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>
6 years agodrm/amd/display: dal 3.1.11
Tony Cheng [Thu, 26 Oct 2017 03:28:38 +0000 (23:28 -0400)]
drm/amd/display: dal 3.1.11

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>
6 years agodrm/amd/display: hubbub function flipping true and false
Yue Hin Lau [Thu, 26 Oct 2017 15:29:54 +0000 (11:29 -0400)]
drm/amd/display: hubbub function flipping true and false

no logic change

Signed-off-by: Yue Hin Lau <Yuehin.Lau@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>
6 years agodrm/amd/display: Do post_update_surfaces on new state
Charlene Liu [Thu, 26 Oct 2017 00:30:46 +0000 (20:30 -0400)]
drm/amd/display: Do post_update_surfaces on new state

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: function renaming for hubbub
Yue Hin Lau [Tue, 24 Oct 2017 19:16:38 +0000 (15:16 -0400)]
drm/amd/display: function renaming for hubbub

following the naming convention with correct prefix

Signed-off-by: Yue Hin Lau <Yuehin.Lau@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>
6 years agodrm/amd/display: create new function prototype update_dchub for dcn
Yue Hin Lau [Tue, 24 Oct 2017 18:13:16 +0000 (14:13 -0400)]
drm/amd/display: create new function prototype update_dchub for dcn

dcn version of update_dchub now uses hubbub instead of hwseq

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/virt: remove redundant variable pf2vf_ver
Colin Ian King [Sat, 11 Nov 2017 11:51:10 +0000 (11:51 +0000)]
drm/amdgpu/virt: remove redundant variable pf2vf_ver

Variable pf2vf_ver is assigned but never read, it is redundant and
hence can be removed.

Cleans up clang warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:310:3: warning: Value stored
to 'pf2vf_ver' is never read

Reivewed-by: Horace Chen <horace.chen@amd.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/amdgpu: fix UVD mc offsets
Piotr Redlewski [Fri, 10 Nov 2017 18:28:01 +0000 (19:28 +0100)]
drm/amd/amdgpu: fix UVD mc offsets

When UVD bo is created, its size is based on the information from firmware
header (ucode_size_bytes). The same value should be be used when programming
UVD mc controller offsets, otherwise it can happen that
(mmUVD_VCPU_CACHE_OFFSET2 + mmUVD_VCPU_CACHE_SIZE2) will point
AMDGPU_GPU_PAGE_SIZE bytes after the UVD bo end.

Second issue is that when programming the mmUVD_VCPU_CACHE_SIZE0 register,
AMDGPU_UVD_FIRMWARE_OFFSET should be taken into account. If it isn't,
(mmUVD_VCPU_CACHE_OFFSET2 + mmUVD_VCPU_CACHE_SIZE2) will always point
AMDGPU_UVD_FIRMWARE_OFFSET bytes after the UVD bo end.

v2: move firmware size calculation into macro definition
v3: align firmware size to the gpu page size

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Piotr Redlewski <predlewski@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Multi display synchronization logic
Mikita Lipski [Tue, 17 Oct 2017 19:29:22 +0000 (15:29 -0400)]
drm/amd/display: Multi display synchronization logic

This feature synchronizes multiple displays with various timings
to a display with the highest refresh rate
it is enabled if edid caps flag multi_display_sync is set to one

There are limitations on refresh rates allowed
that can be synchronized. That would
prevent from underflow and other potential
corruptions.

Multi display synchronization is using the
same functions as timing_sync in order to minimize
redunduncy and decision to disable synchronization is
based on trigger parametre set in DM

Feature is developed for DCN1 and DCE11

Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Implement BO size validation V2
Andrey Grodzovsky [Fri, 10 Nov 2017 23:35:56 +0000 (18:35 -0500)]
drm/amdgpu: Implement BO size validation V2

Validates BO size against each requested domain's total memory.

v2:
Make GTT size check a MUST to allow fall back to GTT.
Rmove redundant NULL check.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: cleanup vm_size handling
Christian König [Sat, 4 Nov 2017 15:51:44 +0000 (16:51 +0100)]
drm/amdgpu: cleanup vm_size handling

It's pointless to have the same value twice, just always use max_pfn.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: remove nonsense const u32 cast on ARRAY_SIZE result
Christian König [Fri, 3 Nov 2017 14:59:25 +0000 (15:59 +0100)]
drm/amdgpu: remove nonsense const u32 cast on ARRAY_SIZE result

Not sure what that should originally been good for, but it doesn't seem
to make any sense any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: use dep_sync for CS dependency/syncobj
Chunming Zhou [Mon, 13 Nov 2017 02:51:57 +0000 (10:51 +0800)]
drm/amdgpu: use dep_sync for CS dependency/syncobj

Otherwise, they could be optimized by scheduled fence.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/gfx8: Fix compute ring failure after resetting
Xiangliang.Yu [Fri, 10 Nov 2017 06:23:38 +0000 (14:23 +0800)]
drm/amdgpu/gfx8: Fix compute ring failure after resetting

Do ring clear before ring test, otherwise compute ring test will
fail after gpu resetting. Still can't find the root cause, just
workaround it.

Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com>
Acked-by: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/ttm: remove ttm_bo_unreserve_ticket
Christian König [Wed, 8 Nov 2017 20:06:03 +0000 (21:06 +0100)]
drm/ttm: remove ttm_bo_unreserve_ticket

Just another alias for ttm_bo_unreserve.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/ttm: user reservation object wrappers v2
Christian König [Wed, 8 Nov 2017 20:02:31 +0000 (21:02 +0100)]
drm/ttm: user reservation object wrappers v2

Consistently use the reservation object wrappers instead of accessing
the ww_mutex directly.

Additional to that use the reservation object wrappers directly instead of
calling __ttm_bo_reserve with fixed parameters.

v2: fix typo

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/ttm: consistently use reservation_object_unlock
Christian König [Wed, 8 Nov 2017 13:38:34 +0000 (14:38 +0100)]
drm/ttm: consistently use reservation_object_unlock

Instead of having a confusing wrapper or call the underlying ww_mutex
function directly.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/ttm: move unlocking out of ttm_bo_cleanup_memtype_use
Christian König [Wed, 8 Nov 2017 11:37:35 +0000 (12:37 +0100)]
drm/ttm: move unlocking out of ttm_bo_cleanup_memtype_use

Needed for the next patch and makes the code quite a bit easier to
understand.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/scheduler: add WARN_ON for s_fence->parent
Chunming Zhou [Tue, 7 Nov 2017 02:27:43 +0000 (10:27 +0800)]
drm/amd/scheduler: add WARN_ON for s_fence->parent

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/scheduler: fix page protection of cb
Chunming Zhou [Tue, 7 Nov 2017 02:40:00 +0000 (10:40 +0800)]
drm/amd/scheduler: fix page protection of cb

We must remove the fence callback.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: revise retry init to fully cleanup driver
Pixel Ding [Wed, 8 Nov 2017 03:03:14 +0000 (11:03 +0800)]
drm/amdgpu: revise retry init to fully cleanup driver

Retry at drm_dev_register instead of amdgpu_device_init.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoamdgpu/dm: Remove fb_location form fill_plane_attributes
Harry Wentland [Wed, 8 Nov 2017 14:58:59 +0000 (09:58 -0500)]
amdgpu/dm: Remove fb_location form fill_plane_attributes

We no longer set the framebuffer address here so this is now
dead code.

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>
6 years agodrm/amdgpu:fix gpu recover missing skipping(v2)
Monk Liu [Wed, 8 Nov 2017 06:35:04 +0000 (14:35 +0800)]
drm/amdgpu:fix gpu recover missing skipping(v2)

if app close CTX right after IB submit, gpu recover
will fail to find out the entity behind this guilty
job thus lead to no job skipping for this guilty job.

to fix this corner case just move the increasement of
job->karma out of the entity iteration.

v2:
only do karma increasment if bad->s_priority != KERNEL
because we always consider KERNEL job be correct and always
want to recover an unfinished kernel job (sometimes kernel
job is interrupted by VF FLR or other GPU hang event)

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-By: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu:read VRAMLOST from gim
Monk Liu [Mon, 30 Oct 2017 12:11:54 +0000 (20:11 +0800)]
drm/amdgpu:read VRAMLOST from gim

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: bypass FB resizing for SRIOV VF
pding [Tue, 7 Nov 2017 03:02:00 +0000 (11:02 +0800)]
drm/amdgpu: bypass FB resizing for SRIOV VF

It introduces 900ms latency in exclusive mode which causes failure
of driver loading. Host can resize the BAR before guest staring,
so the resizing is not necessary here.

Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: release exclusive mode after hw_init
pding [Mon, 6 Nov 2017 03:21:55 +0000 (11:21 +0800)]
drm/amdgpu: release exclusive mode after hw_init

Signed-off-by: pding <Pixel.Ding@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdkfd: initialise kfd inside amdgpu_device_init
pding [Mon, 6 Nov 2017 02:21:26 +0000 (10:21 +0800)]
drm/amdkfd: initialise kfd inside amdgpu_device_init

Also finalize kfd inside amdgpu_device_fini. kfd device_init needs
SRIOV exclusive accessing. Try to gather exclusive accessing to
reduce time consuming.

Signed-off-by: pding <Pixel.Ding@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: don't use ttm_bo_move_ttm in amdgpu_ttm_bind v2
Christian König [Thu, 26 Oct 2017 15:54:12 +0000 (17:54 +0200)]
drm/amdgpu: don't use ttm_bo_move_ttm in amdgpu_ttm_bind v2

Just allocate the GART space and fill it.

This prevents forcing the BO to be idle.

v2: don't unbind/bind at all, just fill the allocated GART space

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: rename amdgpu_ttm_bind to amdgpu_ttm_alloc_gart
Christian König [Fri, 27 Oct 2017 13:43:14 +0000 (15:43 +0200)]
drm/amdgpu: rename amdgpu_ttm_bind to amdgpu_ttm_alloc_gart

We actually don't bind here, but rather allocate GART space if necessary.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: switch to use new SOC15 reg read/write macros for soc15 ih
Hawking Zhang [Thu, 2 Nov 2017 09:53:37 +0000 (17:53 +0800)]
drm/amdgpu: switch to use new SOC15 reg read/write macros for soc15 ih

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: resize VRAM BAR for CPU access v6
Christian König [Tue, 28 Feb 2017 09:36:43 +0000 (10:36 +0100)]
drm/amdgpu: resize VRAM BAR for CPU access v6

Try to resize BAR0 to let CPU access all of VRAM.

v2: rebased, style cleanups, disable mem decode before resize,
    handle gmc_v9 as well, round size up to power of two.
v3: handle gmc_v6 as well, release and reassign all BARs in the driver.
v4: rename new function to amdgpu_device_resize_fb_bar,
    reenable mem decoding only if all resources are assigned.
v5: reorder resource release, return -ENODEV instead of BUG_ON().
v6: squash in rebase fix

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: refine SR-IOV firmware VRAM reservation to protect data
Horace Chen [Wed, 1 Nov 2017 11:32:11 +0000 (19:32 +0800)]
drm/amdgpu: refine SR-IOV firmware VRAM reservation to protect data

The previous solution will create a zero buffer on the system
domain and then move the zeroes to the VRAM. This will break the
original data on the VRAM.

Refine the code to create bo on VRAM domain directly and then remove
and re-create mem node to the exact position before bo_pin. This can
avoid breaking the data and will not cause eviction.

Signed-off-by: Horace Chen <horace.chen@amd.com>
Reviewed-by: monk liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: retry init if exclusive mode request is failed
pding [Mon, 30 Oct 2017 06:07:24 +0000 (14:07 +0800)]
drm/amdgpu: retry init if exclusive mode request is failed

This is caused of that hypervisor fails to handle request, one known
issue is MMIO unblocking timeout. In theory we can retry init here.

Signed-off-by: pding <Pixel.Ding@amd.com>
Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: return error when sriov access requests get timeout
pding [Mon, 30 Oct 2017 05:51:54 +0000 (13:51 +0800)]
drm/amdgpu: return error when sriov access requests get timeout

Reported-by: Sun Gary <Gary.Sun@amd.com>
Signed-off-by: pding <Pixel.Ding@amd.com>
Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Remove fb_location parameter from get_fb_info
Michel Dänzer [Thu, 26 Oct 2017 14:56:35 +0000 (16:56 +0200)]
drm/amd/display: Remove fb_location parameter from get_fb_info

It's dead code.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoamdgpu: Remove AMDGPU_{HPD,CRTC_IRQ,PAGEFLIP_IRQ}_LAST
Michel Dänzer [Tue, 24 Oct 2017 09:15:52 +0000 (11:15 +0200)]
amdgpu: Remove AMDGPU_{HPD,CRTC_IRQ,PAGEFLIP_IRQ}_LAST

Not used anymore.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Use real number of CRTCs and HPDs in set_irq_funcs
Michel Dänzer [Tue, 24 Oct 2017 09:13:34 +0000 (11:13 +0200)]
drm/amd/display: Use real number of CRTCs and HPDs in set_irq_funcs

Corresponding to the previous non-DC change.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoamdgpu/dce: Use actual number of CRTCs and HPDs in set_irq_funcs
Michel Dänzer [Tue, 24 Oct 2017 09:03:21 +0000 (11:03 +0200)]
amdgpu/dce: Use actual number of CRTCs and HPDs in set_irq_funcs

Hardcoding the maximum numbers could result in spurious error messages
from the IRQ state callbacks, e.g. on Polaris 11/12:

[drm:dce_v11_0_set_pageflip_irq_state [amdgpu]] *ERROR* invalid pageflip crtc 5
[drm:amdgpu_irq_disable_all [amdgpu]] *ERROR* error disabling interrupt (-22)

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Move conn_state to header
Harry Wentland [Thu, 19 Oct 2017 18:28:23 +0000 (14:28 -0400)]
drm/amd/display: Move conn_state to header

We'll need it in amdgpu_dm_mst_types.c as well.

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>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: dal 3.1.10
Tony Cheng [Wed, 25 Oct 2017 04:15:05 +0000 (00:15 -0400)]
drm/amd/display: dal 3.1.10

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>
6 years agodrm/amd/display: correct DP is always in full range or bt609
Charlene Liu [Tue, 24 Oct 2017 22:19:06 +0000 (18:19 -0400)]
drm/amd/display: correct DP is always in full range or bt609

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix bug from last commit for hubbub
Yue Hin Lau [Tue, 24 Oct 2017 15:40:50 +0000 (11:40 -0400)]
drm/amd/display: fix bug from last commit for hubbub

fix memory leak

Signed-off-by: Yue Hin Lau <Yuehin.Lau@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>
6 years agodrm/amd/display: Move hdr_metadata from plane to stream
Anthony Koo [Mon, 23 Oct 2017 21:02:02 +0000 (17:02 -0400)]
drm/amd/display: Move hdr_metadata from plane to stream

Need to move HDR Metadata from Surface to Stream since there is only one
infoframe possible per stream.

Also cleaning up some duplicate definitions.

Signed-off-by: Anthony Koo <anthony.koo@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>
6 years agodrm/amd/display: Apply VQ adjustments in MPO case
SivapiriyanKumarasamy [Thu, 19 Oct 2017 17:41:30 +0000 (13:41 -0400)]
drm/amd/display: Apply VQ adjustments in MPO case

Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@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>
6 years agodrm/amd/display: create new structure for hubbub
Yue Hin Lau [Mon, 23 Oct 2017 20:01:36 +0000 (16:01 -0400)]
drm/amd/display: create new structure for hubbub

instantiating new structure hubbub in resource.c

Signed-off-by: Yue Hin Lau <Yuehin.Lau@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>
6 years agodrm/amd/display: dal 3.1.09
Tony Cheng [Sat, 21 Oct 2017 22:32:15 +0000 (18:32 -0400)]
drm/amd/display: dal 3.1.09

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>
6 years agodrm/amd/display: Added disconnect dchub.
Yongqiang Sun [Sat, 21 Oct 2017 19:52:40 +0000 (15:52 -0400)]
drm/amd/display: Added disconnect dchub.

Add disable ttu interface to dcn10, when remove
mpc, disable ttu as well.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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>