Harry Wentland
eaca91eea6
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 >
2017-09-26 17:06:14 -04:00
Dave Airlie
2c755dae30
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 >
2017-09-26 17:06:11 -04:00
Dave Airlie
e285917063
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 >
2017-09-26 17:06:07 -04:00
Dave Airlie
2a0998846d
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 >
2017-09-26 17:06:04 -04:00
Dave Airlie
55b99b4640
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 >
2017-09-26 17:06:01 -04:00
Dave Airlie
1964cb736a
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 >
2017-09-26 17:05:58 -04:00
Anthony Koo
538735e9e5
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 >
2017-09-26 17:05:54 -04:00
Anthony Koo
4a69244eb6
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 >
2017-09-26 17:05:51 -04:00
Zeyu Fan
ab3ee7a556
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 >
2017-09-26 17:05:47 -04:00
Anthony Koo
e63d86dc9b
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 >
2017-09-26 17:05:44 -04:00
Anthony Koo
c5ea922237
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 >
2017-09-26 17:05:41 -04:00
Dmytro Laktyushkin
cb9a5a90ee
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 >
2017-09-26 17:05:36 -04:00
Anthony Koo
90e508ba25
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 >
2017-09-26 17:05:32 -04:00
Roman Li
9cdc4e7ce4
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 >
2017-09-26 17:05:29 -04:00
Yongqiang Sun
aa66df58b2
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 >
2017-09-26 17:05:26 -04:00
Anthony Koo
ea24af3e21
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 >
2017-09-26 17:05:22 -04:00
Yongqiang Sun
b90a2b23ed
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 >
2017-09-26 17:05:19 -04:00
Jordan Lazare
b264d3455d
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 >
2017-09-26 17:05:16 -04:00
Anthony Koo
fb735a9f29
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 >
2017-09-26 17:05:08 -04:00
Yongqiang Sun
88499197de
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 >
2017-09-26 17:05:05 -04:00
Vitaly Prosyak
1e3d346f4f
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 >
2017-09-26 17:05:02 -04:00
Zeyu Fan
30018e9fa2
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 >
2017-09-26 17:04:58 -04:00
Andrew Wong
4b5752c742
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 >
2017-09-26 17:04:55 -04:00
Andrew Wong
98d2cc2b03
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 >
2017-09-26 17:04:52 -04:00
Amy Zhang
89e8963036
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 >
2017-09-26 17:04:48 -04:00
Yongqiang Sun
9474980ac4
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 >
2017-09-26 17:04:45 -04:00
Dmytro Laktyushkin
5ea81b9185
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 >
2017-09-26 17:04:41 -04:00
Andrey Grodzovsky
922aa1e15e
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 >
2017-09-26 17:04:38 -04:00
Tony Cheng
f4c07f88cc
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 >
2017-09-26 17:04:34 -04:00
Tony Cheng
edbd58af69
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 >
2017-09-26 17:04:31 -04:00
Harry Wentland
091a97e542
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 >
2017-09-26 17:04:28 -04:00
Harry Wentland
eaf9094475
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 >
2017-09-26 17:04:25 -04:00
Harry Wentland
a33fa99d8b
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 >
2017-09-26 17:04:17 -04:00
Arindam Nath
49c07a99b2
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 >
2017-09-26 17:04:13 -04:00
Dmytro Laktyushkin
e11b86ad7d
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 >
2017-09-26 17:04:10 -04:00
Ding Wang
e91dbe3dee
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 >
2017-09-26 17:04:07 -04:00
Dmytro Laktyushkin
13625c7bf3
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 >
2017-09-26 17:04:04 -04:00
Wenjing Liu
b007045674
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 >
2017-09-26 17:04:00 -04:00
Dmytro Laktyushkin
85944914f1
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 >
2017-09-26 17:03:13 -04:00
Dmytro Laktyushkin
8318a7eb98
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 >
2017-09-26 17:03:04 -04:00
Dmytro Laktyushkin
9a70eba7f2
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 >
2017-09-26 17:03:01 -04:00
Dmytro Laktyushkin
e9c58bb439
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 >
2017-09-26 17:02:58 -04:00
Dmytro Laktyushkin
95015be8f4
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 >
2017-09-26 17:02:55 -04:00
Dmytro Laktyushkin
3bad7c5ccf
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 >
2017-09-26 17:02:52 -04:00
Dmytro Laktyushkin
5d6d185f32
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 >
2017-09-26 17:02:48 -04:00
Dmytro Laktyushkin
1a687574a7
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 >
2017-09-26 17:02:44 -04:00
Dmytro Laktyushkin
00d64d289f
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 >
2017-09-26 17:02:41 -04:00
Yongqiang Sun
565968219c
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 >
2017-09-26 17:02:37 -04:00
Tony Cheng
197062bf12
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 >
2017-09-26 17:02:31 -04:00
Roman Li
22f050be15
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 >
2017-09-26 17:02:27 -04:00