platform/kernel/linux-rpi.git
6 years agodrm/amd/display: DAL3: HDR10 Infoframe encoding
Andrew Wong [Thu, 22 Dec 2016 20:41:30 +0000 (15:41 -0500)]
drm/amd/display: DAL3: HDR10 Infoframe encoding

- Add HDR metadata struct
- Add register programming calculations
- Added HDR metadata to surface and update_surface
- Add HDR info packet programming for DP port

Signed-off-by: Andrew Wong <andrew.wong1@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Allow multiple instance of DTO regs
Tony Cheng [Thu, 22 Dec 2016 19:54:50 +0000 (14:54 -0500)]
drm/amd/display: Allow multiple instance of DTO regs

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Pass adev to fill_plane_attr
Andrey Grodzovsky [Thu, 15 Dec 2016 05:53:04 +0000 (00:53 -0500)]
drm/amd/display: Pass adev to fill_plane_attr

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Add refcount debug assert
Andrey Grodzovsky [Tue, 20 Dec 2016 23:01:30 +0000 (18:01 -0500)]
drm/amd/display: Add refcount debug assert

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@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 crash caused by unnecessary clock source in split pipe.
Yongqiang Sun [Thu, 22 Dec 2016 18:07:11 +0000 (13:07 -0500)]
drm/amd/display: Fixed crash caused by unnecessary clock source in split pipe.

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: Fixed split update bug.
Yongqiang Sun [Thu, 22 Dec 2016 15:48:19 +0000 (10:48 -0500)]
drm/amd/display: Fixed split update bug.

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 licensing header
Harry Wentland [Thu, 22 Dec 2016 15:25:57 +0000 (10:25 -0500)]
drm/amd/display: Fix licensing header

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: Fixed crash
Yongqiang Sun [Wed, 21 Dec 2016 21:48:51 +0000 (16:48 -0500)]
drm/amd/display: Fixed crash

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: reset transfer_func to NULL on release
Yongqiang Sun [Wed, 21 Dec 2016 16:13:48 +0000 (11:13 -0500)]
drm/amd/display: reset transfer_func to NULL on release

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: don't crash if stream is NULL when trying to share clocks
Yongqiang Sun [Wed, 21 Dec 2016 16:16:48 +0000 (11:16 -0500)]
drm/amd/display: don't crash if stream is NULL when trying to share clocks

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: Implement gamma correction using input LUT
Aric Cyr [Wed, 21 Dec 2016 01:24:24 +0000 (20:24 -0500)]
drm/amd/display: Implement gamma correction using input LUT

The dc_gamma in dc_surface will be programmed to the input
LUT if provided.  If dc_gamma is not provided in dc_surface
regamma may be used to emulate gamma.

Some refactor and cleanup included as well.

Signed-off-by: Aric Cyr <aric.cyr@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: Reset gamma to NULL after release
Anthony Koo [Tue, 20 Dec 2016 23:48:11 +0000 (18:48 -0500)]
drm/amd/display: Reset gamma to NULL after release

Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: track cursor width in ipp
Tony Cheng [Tue, 20 Dec 2016 15:54:38 +0000 (10:54 -0500)]
drm/amd/display: track cursor width in ipp

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>
6 years agodrm/amd/display: Add dcc param to surface
Leon Elazar [Mon, 19 Dec 2016 17:00:05 +0000 (12:00 -0500)]
drm/amd/display: Add dcc param to surface

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: minor clock source refactor
Dmytro Laktyushkin [Mon, 19 Dec 2016 20:41:49 +0000 (15:41 -0500)]
drm/amd/display: minor clock source refactor

This should make it easier to share code with newer ASICs

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: add pitch to cursor attributes
Tony Cheng [Mon, 19 Dec 2016 23:54:15 +0000 (18:54 -0500)]
drm/amd/display: add pitch to cursor attributes

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>
6 years agodrm/amd/display: 4k split black out due to incorrect cursor
Tony Cheng [Mon, 19 Dec 2016 17:54:40 +0000 (12:54 -0500)]
drm/amd/display: 4k split black out due to incorrect cursor

- add handling to program both cursor for left and right pipe
- add guard to disable cursor in case where cursor isn't visible to prevent pipe hang

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>
6 years agodrm/amd/display: Fix Regamma end point
Anthony Koo [Mon, 19 Dec 2016 20:16:12 +0000 (15:16 -0500)]
drm/amd/display: Fix Regamma end point

1. HW register programmed to wrong value
2. End slope for PQ case not calculated correctly

Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Framework for degamma and regramma through color module
Amy Zhang [Mon, 12 Dec 2016 21:57:40 +0000 (16:57 -0500)]
drm/amd/display: Framework for degamma and regramma through color module

Signed-off-by: Amy Zhang <Amy.Zhang@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: assign correct enum for edp revision
Dave Airlie [Tue, 13 Dec 2016 06:41:12 +0000 (16:41 +1000)]
drm/amd/display: assign correct enum for edp revision

There are 2 edp enum revisions, no idea why, drop one, and just
assign 1.1 to the default value.

Signed-off-by: Dave Airlie <airlied@redhat.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: port to using drm dpcd defines
Dave Airlie [Tue, 13 Dec 2016 06:41:11 +0000 (16:41 +1000)]
drm/amd/display: port to using drm dpcd defines

We only keep one list of these defines in the kernel, so we should use it.

Signed-off-by: Dave Airlie <airlied@redhat.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 dpcd structs into dp_types header
Harry Wentland [Mon, 19 Dec 2016 19:10:53 +0000 (14:10 -0500)]
drm/amd/display: Move dpcd structs into dp_types 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: drop setmode complete notifier
Dave Airlie [Tue, 13 Dec 2016 06:41:09 +0000 (16:41 +1000)]
drm/amd/display: drop setmode complete notifier

Signed-off-by: Dave Airlie <airlied@redhat.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: drop get platform info
Dave Airlie [Tue, 13 Dec 2016 06:41:08 +0000 (16:41 +1000)]
drm/amd/display: drop get platform info

Signed-off-by: Dave Airlie <airlied@redhat.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: drop register logger and pid/tgid getters
Dave Airlie [Tue, 13 Dec 2016 06:41:07 +0000 (16:41 +1000)]
drm/amd/display: drop register logger and pid/tgid getters

While I'm sure this is useful I think we should bring it back later.

It's usage of pid/tgid is incorrect, you have to get/put
pid/tgids not store them away.

Signed-off-by: Dave Airlie <airlied@redhat.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 some unused wrappers
Dave Airlie [Tue, 13 Dec 2016 06:41:06 +0000 (16:41 +1000)]
drm/amd/display: remove some unused wrappers

Signed-off-by: Dave Airlie <airlied@redhat.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 dc hub - this seems unused.
Dave Airlie [Tue, 13 Dec 2016 06:41:05 +0000 (16:41 +1000)]
drm/amd/display: remove dc hub - this seems unused.

Signed-off-by: Dave Airlie <airlied@redhat.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 programming of gamma end points
Anthony Koo [Fri, 16 Dec 2016 17:12:03 +0000 (12:12 -0500)]
drm/amd/display: Fix programming of gamma end points

Signed-off-by: Anthony Koo <anthony.koo@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: Fix distribution of segments for PQ
Anthony Koo [Fri, 16 Dec 2016 17:12:03 +0000 (12:12 -0500)]
drm/amd/display: Fix distribution of segments for PQ

For PQ case, redistribution of segments should be done differently
for FP16 case in order to handle content above FP16 value of 1.0

Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: OPP refactor and consolidation for DCE.
Zeyu Fan [Wed, 14 Dec 2016 23:54:41 +0000 (18:54 -0500)]
drm/amd/display: OPP refactor and consolidation for DCE.

Signed-off-by: Zeyu Fan <Zeyu.Fan@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: Implement PQ curve based on output transfer function
Anthony Koo [Fri, 16 Dec 2016 17:12:03 +0000 (12:12 -0500)]
drm/amd/display: Implement PQ curve based on output transfer function

Refactor part 5 - Regamma programming should be dependent on Output
transfer function type

Program sRGB gamma or PQ transfer function based on output transfer
function.

Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@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 to move gamma correction to module
Anthony Koo [Fri, 16 Dec 2016 15:43:21 +0000 (10:43 -0500)]
drm/amd/display: Refactor to move gamma correction to module

Refactor part 4 - Moving input gamma correction programming into color module

DM will translate to dc_gamma structure, but programming will be moved into
the color module. Later, this will allow gamma correction to be added on top of
in/out transfer function curves.

Signed-off-by: Anthony Koo <anthony.koo@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: define reg helpers to update registers with 8 and 9 fields
Dmytro Laktyushkin [Thu, 15 Dec 2016 18:53:15 +0000 (13:53 -0500)]
drm/amd/display: define reg helpers to update registers with 8 and 9 fields

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: Refactor output transfer function to stream
Anthony Koo [Thu, 15 Dec 2016 17:09:46 +0000 (12:09 -0500)]
drm/amd/display: Refactor output transfer function to stream

Refactor part 3 - Moving output transfer function from surface to stream

Split HWSS to program degamma and regamma separately.
Degamma should be dependent on input transfer function.
And Regamma should depend on the desired output transfer function.

Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@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 hotplug regression after code refactor
Roman Li [Thu, 15 Dec 2016 16:51:09 +0000 (11:51 -0500)]
drm/amd/display: fix hotplug regression after code refactor

The condition logic of REG_WAIT in dce110_stream_encoder_dp_blank()
got inverted after refactoring.

Signed-off-by: Roman Li <Roman.Li@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@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 debug option to disable dmcu
Yongqiang Sun [Thu, 15 Dec 2016 15:50:48 +0000 (10:50 -0500)]
drm/amd/display: Add debug option to disable dmcu

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: Refactor to move color helper into module
Anthony Koo [Wed, 14 Dec 2016 21:26:27 +0000 (16:26 -0500)]
drm/amd/display: Refactor to move color helper into module

Refactor part 2 - Moving color helper into color module

The color module will need table defined in the helper in order to calculate
the logical regamma curve, and also to fully handle gamut remapping.

Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Resolved HDMI assert in dal
Yongqiang Sun [Wed, 14 Dec 2016 21:05:22 +0000 (16:05 -0500)]
drm/amd/display: Resolved HDMI assert in dal

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/dal: Add POLARIS12 support (v2)
Jordan Lazare [Wed, 14 Dec 2016 20:35:13 +0000 (15:35 -0500)]
drm/amd/dal: Add POLARIS12 support (v2)

v2: agd: squash in dm fix, rebase

Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/dp-helper: add missing defines needed by AMD display core.
Dave Airlie [Wed, 19 Apr 2017 17:15:18 +0000 (13:15 -0400)]
drm/dp-helper: add missing defines needed by AMD display core.

These are all the ones required by the AMD display core.

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>
6 years agodrm/amd/display: Add in/out transfer functions to DC
Anthony Koo [Tue, 13 Dec 2016 18:59:41 +0000 (13:59 -0500)]
drm/amd/display: Add in/out transfer functions to DC

Refactor part 1 of degamma/regamma programming.

End goal is to have source and output transfer function in
which dc can use to decide how to program the degamma
and regamma HW.

Gamma will be explicitly applied through
dc_update_surfaces_for_target.

Color module should build the logical curve with all
adjustments applied and pass enough information
for dc to program HW PWL.

Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Moved swizzle parameter translation to dc.
Yongqiang Sun [Mon, 12 Dec 2016 19:20:45 +0000 (14:20 -0500)]
drm/amd/display: Moved swizzle parameter translation to dc.

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: re gamma programming
Vitaly Prosyak [Tue, 13 Dec 2016 20:23:16 +0000 (14:23 -0600)]
drm/amd/display: re gamma programming

Fix gamma update logic to avoid crash

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@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 HDMI scaling corruption issue.
Zeyu Fan [Mon, 12 Dec 2016 18:54:56 +0000 (13:54 -0500)]
drm/amd/display: Fix HDMI scaling corruption issue.

Signed-off-by: Zeyu Fan <Zeyu.Fan@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: Retrieve windowed fullscreen state
Andrew Wong [Mon, 12 Dec 2016 16:47:47 +0000 (11:47 -0500)]
drm/amd/display: Retrieve windowed fullscreen state

- Retrieve windowed fullscreen state when getting freesync params.

Signed-off-by: Andrew Wong <andrew.wong1@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: Change locking of registers when flipping frames.
Andrew Wong [Mon, 12 Dec 2016 16:17:06 +0000 (11:17 -0500)]
drm/amd/display: Change locking of registers when flipping frames.

- Introduce GRPH_UPDATE_LOCK around programming surface flip.
- Remove the now unused graphic surface lock.
- Add macros to get and set four registers
- both immediate and H Retrace should not be enabled at the same time

Signed-off-by: Andrew Wong <andrew.wong1@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 Gamma Adjustment
Amy Zhang [Mon, 12 Dec 2016 15:32:24 +0000 (10:32 -0500)]
drm/amd/display: Fix Gamma Adjustment

- Gamma correction is not properly copied to the surface after refactor
- Make sure gamma correction is copied with correct retain

Signed-off-by: Amy Zhang <Amy.Zhang@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: Added timing sync trace.
Yongqiang Sun [Thu, 8 Dec 2016 14:47:11 +0000 (09:47 -0500)]
drm/amd/display: Added timing sync trace.

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 up construction of scratch_val_ctx
Dmytro Laktyushkin [Mon, 5 Dec 2016 23:03:04 +0000 (18:03 -0500)]
drm/amd/display: fix up construction of scratch_val_ctx

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Fix refcount over dc_sink.
Andrey Grodzovsky [Wed, 7 Dec 2016 19:10:05 +0000 (14:10 -0500)]
drm/amd/display: Fix refcount over dc_sink.

Retain a dc_sink pointer until a new physical pointer
arrives in case of new display connected.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: avoid apply_clk_constraints for address update
Tony Cheng [Wed, 7 Dec 2016 02:22:17 +0000 (21:22 -0500)]
drm/amd/display: avoid apply_clk_constraints for address update

- dc_update_surfaces_for_target get called in ISR but apply_clk_constraints allocates memory

Signed-off-by: Tony Cheng <tony.cheng@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 indexing bug
Tony Cheng [Wed, 7 Dec 2016 03:12:09 +0000 (22:12 -0500)]
drm/amd/display: fix indexing bug

- is_new_pipe_surface should be addressed with pipe idx, not surface idx

Signed-off-by: Tony Cheng <tony.cheng@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 warning. Set MAX_SURFACES to 3
Harry Wentland [Tue, 6 Dec 2016 17:25:52 +0000 (12:25 -0500)]
drm/amd/display: Fix warning. Set MAX_SURFACES to 3

Currently we never use more than 2 surfaces in all use cases.
This avoids pushing dc_commit_surfaces_to_target beyond a
stacksize of 1024.

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: Fix warning in freesync module
Harry Wentland [Tue, 6 Dec 2016 17:01:23 +0000 (12:01 -0500)]
drm/amd/display: Fix warning in freesync module

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: Fix bunch of warnings in DC
Harry Wentland [Tue, 6 Dec 2016 16:26:08 +0000 (11:26 -0500)]
drm/amd/display: Fix bunch of warnings in DC

Some of those are potential bugs

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: remove DM_NOT_IMPL messages
Arindam Nath [Mon, 5 Dec 2016 13:51:26 +0000 (19:21 +0530)]
drm/amd/display: remove DM_NOT_IMPL messages

Some functions like dm_bandwidth_update are placeholders
for future implementations. Right now, they simply
print messages like "DM_NOT_IMPL: dm_bandwidth_update".
This message even though informational, sometimes can
create some confusion for users.

Since these functions are only skeletons for future, we
simply remove the rather un-unecessary messages from these
functions.

Signed-off-by: Arindam Nath <arindam.nath@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: moving remaining functionality from gpu to dce_clocks
Dmytro Laktyushkin [Fri, 2 Dec 2016 19:48:04 +0000 (14:48 -0500)]
drm/amd/display: moving remaining functionality from gpu to dce_clocks

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: Temporarily blocking interlacing mode until it's supported.
Ding Wang [Mon, 5 Dec 2016 23:20:51 +0000 (18:20 -0500)]
drm/amd/display: Temporarily blocking interlacing mode until it's supported.

Signed-off-by: Ding Wang <Ding.Wang@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 scratch_val_ctx as temp w/a
Dmytro Laktyushkin [Tue, 29 Nov 2016 18:11:08 +0000 (13:11 -0500)]
drm/amd/display: create scratch_val_ctx as temp w/a

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: use rgb full range as default quantization for non HDMI
Wenjing Liu [Wed, 30 Nov 2016 22:57:24 +0000 (17:57 -0500)]
drm/amd/display: use rgb full range as default quantization for non HDMI

Refactor the quantization decision to color module.
Add the check if non HDMI, default quantization should be rgb full range.

Signed-off-by: Wenjing Liu <Wenjing.Liu@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: fix display clock integrated info read
Dmytro Laktyushkin [Fri, 2 Dec 2016 22:41:42 +0000 (17:41 -0500)]
drm/amd/display: fix display clock integrated info read

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: add newline to generic_reg_wait timeout message
Dmytro Laktyushkin [Fri, 2 Dec 2016 15:55:32 +0000 (10:55 -0500)]
drm/amd/display: add newline to generic_reg_wait timeout message

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: consolidate dce8-11.2 display clock code
Dmytro Laktyushkin [Thu, 1 Dec 2016 23:13:25 +0000 (18:13 -0500)]
drm/amd/display: consolidate dce8-11.2 display clock code

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 clocks_state enum
Dmytro Laktyushkin [Wed, 30 Nov 2016 21:07:50 +0000 (16:07 -0500)]
drm/amd/display: remove clocks_state enum

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 get_min_clocks_state
Dmytro Laktyushkin [Wed, 30 Nov 2016 20:45:51 +0000 (15:45 -0500)]
drm/amd/display: remove get_min_clocks_state

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 store clock state
Dmytro Laktyushkin [Wed, 30 Nov 2016 19:26:37 +0000 (14:26 -0500)]
drm/amd/display: remove store clock state

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: restyle display clock calls part 2
Dmytro Laktyushkin [Wed, 30 Nov 2016 16:03:37 +0000 (11:03 -0500)]
drm/amd/display: restyle display clock calls part 2

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: restyle display clock calls part 1
Dmytro Laktyushkin [Wed, 30 Nov 2016 15:49:51 +0000 (10:49 -0500)]
drm/amd/display: restyle display clock calls part 1

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 dead display clock code
Dmytro Laktyushkin [Tue, 29 Nov 2016 22:22:27 +0000 (17:22 -0500)]
drm/amd/display: remove dead display clock code

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: Add missing GRPH register definition
Yongqiang Sun [Thu, 1 Dec 2016 18:37:25 +0000 (13:37 -0500)]
drm/amd/display: Add missing GRPH register definition

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: refactor DCE11 DVVM
Tony Cheng [Wed, 30 Nov 2016 21:15:47 +0000 (16:15 -0500)]
drm/amd/display: refactor DCE11 DVVM

- move to new programming style
- clean up table to make it obvious what we are programming

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Zeyu Fan <Zeyu.Fan@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 REG_SET_5 macro
Roman Li [Wed, 30 Nov 2016 21:23:16 +0000 (16:23 -0500)]
drm/amd/display: fix REG_SET_5 macro

Signed-off-by: Roman Li <Roman.Li@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Roman Li <Roman.Li@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 obsolete LATEST_ATOM_BIOS_SUPPORT
Harry Wentland [Thu, 1 Dec 2016 15:00:09 +0000 (10:00 -0500)]
drm/amd/display: Remove obsolete LATEST_ATOM_BIOS_SUPPORT

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: Removing extra newline
Harry Wentland [Thu, 1 Dec 2016 14:43:14 +0000 (09:43 -0500)]
drm/amd/display: Removing extra newline

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: Update rgb limited range csc matrix calculation
Wenjing Liu [Wed, 30 Nov 2016 17:10:35 +0000 (12:10 -0500)]
drm/amd/display: Update rgb limited range csc matrix calculation

The issue causes hue adjustment for rgb
limited range color space programmed wrong.
Update calculation formula for rgb limited range

Signed-off-by: Wenjing Liu <Wenjing.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: Block 3D Timings
Joshua Aberback [Tue, 29 Nov 2016 22:56:05 +0000 (17:56 -0500)]
drm/amd/display: Block 3D Timings

- we don't yet support 3D timings in DAL3
- somehow a code path was being executed that resulted in HW programming
for a 3D timing, which caused 3D displays to show half the desktop in one
frame, and the other half of the desktop in the next frame
- blocking all 3D timings in timing generator validation until we
implement proper 3D timing support

Signed-off-by: Joshua Aberback <Joshua.Aberback@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 memory corruption issue.
jimqu [Mon, 28 Nov 2016 00:05:46 +0000 (08:05 +0800)]
drm/amd/display: Fix memory corruption issue.

temp_flip_context is always same as current_context,
and the current_context will be freed in
dc_commit_targets(), but  temp_flip_context will be used in
dc_update_surfaces_for_target().

Signed-off-by: JimQu <Jim.Qu@amd.com>
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@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 bugs causing Hawaii and Bonaire not light up.
Zeyu Fan [Tue, 6 Dec 2016 17:59:52 +0000 (12:59 -0500)]
drm/amd/display: Fix bugs causing Hawaii and Bonaire not light up.

Signed-off-by: Zeyu Fan <Zeyu.Fan@amd.com>
Acked-by: Jordan Lazare <Jordan.Lazare@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Fix hdmi not lighting up on Hawaii.
Zeyu Fan [Wed, 7 Dec 2016 16:28:03 +0000 (11:28 -0500)]
drm/amd/display: Fix hdmi not lighting up on Hawaii.

Signed-off-by: Zeyu Fan <Zeyu.Fan@amd.com>
Acked-by: Jordan Lazare <Jordan.Lazare@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/dc/dm: remove redundant display structs
Alex Deucher [Tue, 13 Dec 2016 20:42:48 +0000 (15:42 -0500)]
drm/amd/dc/dm: remove redundant display structs

Now that the mc_access functions are gone, we no longer
need separate structs for all the different dce families
in dm.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/dc: Add dc display driver (v2)
Harry Wentland [Tue, 12 Sep 2017 19:58:20 +0000 (15:58 -0400)]
drm/amd/dc: Add dc display driver (v2)

Supported DCE versions: 8.0, 10.0, 11.0, 11.2

v2: rebase against 4.11

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Pulling old prepare and submit for flip back
Harry Wentland [Wed, 13 Sep 2017 14:03:31 +0000 (10:03 -0400)]
drm/amdgpu: Pulling old prepare and submit for flip back

This is needed to ensure every single DC commit builds. Reverting
this again when it's no longer needed by DC.

This reverts commit 98da65d5e32583d89a1b1c760293b601816a98d3.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: clarify license in amdgpu_trace_points.c
Alex Deucher [Tue, 19 Sep 2017 14:20:27 +0000 (10:20 -0400)]
drm/amdgpu: clarify license in amdgpu_trace_points.c

It was not clear.  The rest of the driver is MIT/X11.

Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Add gem_prime_mmap support
Samuel Li [Tue, 22 Aug 2017 19:25:33 +0000 (15:25 -0400)]
drm/amdgpu: Add gem_prime_mmap support

v2: drop hdp invalidate/flush.
v3: honor pgoff during prime mmap. Add a barrier after cpu access.
v4: drop begin/end_cpu_access() for now, revisit later.

Signed-off-by: Samuel Li <Samuel.Li@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/powerplay: delete dead code in smumgr
Rex Zhu [Wed, 20 Sep 2017 09:34:15 +0000 (17:34 +0800)]
drm/amd/powerplay: delete dead code in smumgr

Reviewed-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>
6 years agodrm/amd/powerplay: delete SMUM_FIELD_MASK
Rex Zhu [Wed, 20 Sep 2017 09:33:55 +0000 (17:33 +0800)]
drm/amd/powerplay: delete SMUM_FIELD_MASK

repeated defining in hwmgr.h

Reviewed-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>
6 years agodrm/amd/powerplay: delete SMUM_WAIT_INDIRECT_FIELD
Rex Zhu [Wed, 20 Sep 2017 09:31:07 +0000 (17:31 +0800)]
drm/amd/powerplay: delete SMUM_WAIT_INDIRECT_FIELD

repeated defining in hwmgr.h
use PHM_WAIT_INDIRECT_FIELD instand.

Reviewed-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>
6 years agodrm/amd/powerplay: delete SMUM_READ_FIELD
Rex Zhu [Wed, 20 Sep 2017 09:26:03 +0000 (17:26 +0800)]
drm/amd/powerplay: delete SMUM_READ_FIELD

repeated defining in hwmgr.h

Reviewed-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>
6 years agodrm/amd/powerplay: delete SMUM_SET_FIELD
Rex Zhu [Wed, 20 Sep 2017 09:24:58 +0000 (17:24 +0800)]
drm/amd/powerplay: delete SMUM_SET_FIELD

repeated defining in hwmgr.h

Reviewed-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>
6 years agodrm/amd/powerplay: delete SMUM_READ_VFPF_INDIRECT_FIELD
Rex Zhu [Wed, 20 Sep 2017 09:21:25 +0000 (17:21 +0800)]
drm/amd/powerplay: delete SMUM_READ_VFPF_INDIRECT_FIELD

repeated defining in hwmgr.h

Reviewed-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>
6 years agodrm/amd/powerplay: delete SMUM_WRITE_VFPF_INDIRECT_FIELD
Rex Zhu [Wed, 20 Sep 2017 09:19:58 +0000 (17:19 +0800)]
drm/amd/powerplay: delete SMUM_WRITE_VFPF_INDIRECT_FIELD

repeated defining in hwmgr.h

Reviewed-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>
6 years agodrm/amd/powerplay: delete SMUM_WRITE_FIELD
Rex Zhu [Wed, 20 Sep 2017 09:18:16 +0000 (17:18 +0800)]
drm/amd/powerplay: delete SMUM_WRITE_FIELD

the macro is as same as PHM_WRITE_FIELD

Reviewed-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>
6 years agodrm/amd/powerplay: delete SMU_WRITE_INDIRECT_FIELD
Rex Zhu [Wed, 20 Sep 2017 09:17:08 +0000 (17:17 +0800)]
drm/amd/powerplay: delete SMU_WRITE_INDIRECT_FIELD

the macro is as same as PHM_WRITE_INDIRECT_FIELD

Reviewed-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>
6 years agodrm/amd/powerplay: move macros to hwmgr.h
Rex Zhu [Wed, 20 Sep 2017 09:29:23 +0000 (17:29 +0800)]
drm/amd/powerplay: move macros to hwmgr.h

the macro is not relevant to SMU,
so rename SMU_WAIT_FIELD_UNEQUAL to
PHM_WAIT_FIELD_UNEQUAL and move to hwmgr.h

Reviewed-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>
6 years agodrm/amd/powerplay: move PHM_WAIT_VFPF_INDIRECT_FIELD to hwmgr.h
Rex Zhu [Wed, 20 Sep 2017 09:04:33 +0000 (17:04 +0800)]
drm/amd/powerplay: move PHM_WAIT_VFPF_INDIRECT_FIELD to hwmgr.h

the macro is not relevant to SMU, so move to hwmgr.h
and rename to PHM_WAIT_VFPF_INDIRECT_FIELD

Reviewed-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>
6 years agodrm/amd/powerplay: move SMUM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL to hwmgr.h
Rex Zhu [Wed, 20 Sep 2017 09:00:50 +0000 (17:00 +0800)]
drm/amd/powerplay: move SMUM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL to hwmgr.h

the macro is not relevant to SMU, so move to hwmgr.h
and rename to PHM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL

Reviewed-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>
6 years agodrm/amd/powerplay: move SMUM_WAIT_INDIRECT_FIELD_UNEQUAL to hwmgr.h
Rex Zhu [Wed, 20 Sep 2017 11:28:29 +0000 (19:28 +0800)]
drm/amd/powerplay: move SMUM_WAIT_INDIRECT_FIELD_UNEQUAL to hwmgr.h

the macro is not relevent to SMU, so move to hwmgr.h
and rename to PHM_WAIT_INDIRECT_FIELD_UNEQUAL

Reviewed-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>
6 years agodrm/amd/powerplay: add new helper functions in hwmgr.h
Rex Zhu [Wed, 20 Sep 2017 11:22:01 +0000 (19:22 +0800)]
drm/amd/powerplay: add new helper functions in hwmgr.h

Reviewed-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>
6 years agodrm/amd/powerplay: use SMU_IND_INDEX/DATA_11 pair
Rex Zhu [Wed, 20 Sep 2017 08:49:29 +0000 (16:49 +0800)]
drm/amd/powerplay: use SMU_IND_INDEX/DATA_11 pair

in VFPF macros to support virtualization

Reviewed-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>
6 years agodrm/amd/powerplay: refine powerplay code.
Rex Zhu [Tue, 26 Sep 2017 17:28:27 +0000 (13:28 -0400)]
drm/amd/powerplay: refine powerplay code.

delete struct smumgr, put smu backend function table
in struct hwmgr

Reviewed-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>