Dmytro Laktyushkin
d5c40d5368
drm/amd/display: enable watermark range reporting to pplib
...
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 18:07:05 -04:00
Charlene Liu
ca3cba9c60
drm/amd/display: single channel bandwidth verses dual channel bandwidth
...
DPM0, FCLK=MCLK, single channel bandwidth = dual channel bandwidth
for the rest of the DPM levels, single channel bandwidth = 1/2 dual channel bandwidth
Signed-off-by: Charlene Liu <charlene.liu@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 18:07:04 -04:00
Harry Wentland
e61a04f1af
drm/amd/display: Use MED update type if clip position changes
...
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 18:07:03 -04:00
Yongqiang Sun
d4b4597384
drm/amd/display: Add 64KB_S_T and 64KB_D_T swizzle mode.
...
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 18:07:03 -04:00
Dmytro Laktyushkin
c66a54dc4a
drm/amd/display: switch to using calc_clk and cur_clk for dcn bw setting
...
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 18:07:02 -04:00
Dmytro Laktyushkin
9037d802a9
drm/amd/display: refactor bw related variable structure in val_ctx
...
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 18:07:01 -04:00
Dmytro Laktyushkin
ac5c294719
drm/amd/display: prevent assert on error of 1 in calc_freesync_range
...
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 18:07:01 -04:00
Andrey Grodzovsky
3273d3bfe5
drm/amd/display: Fix race.
...
Problem :
A race between two adjecent page flips makes the earlier one
to release an alocated frame buffer for the subsequent one -
since there are 2 frambuffer swapped back and forth between flips,
the 'new' fb of the later flip is actually the 'previous' fb for the earlier flip.
Fix:
Don't set fb->address = 0 in cleanup hook, this is unnecessery and
erases the newly cached adress that was set in prepare_fb of the second
flip.
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 18:07:00 -04:00
Harry Wentland
f3e4341871
drm/amd/display: ifdef some code only needed for DCN
...
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 18:07:00 -04:00
Anthony Koo
fe62673471
drm/amd/display: Implement support for backlight optimization
...
- Add functionality to get real hw backlight level as opposed to user
level, meaning the level that takes into account backlight ramping
over time and backlight reduction due to Varibright
- Add backlight optimization which allows for a second OS state
that is able to control ABM
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 18:06:59 -04:00
Ken Chalmers
c0ba5ec70e
drm/amd/display: Continue with stream enable if DP link training fails.
...
Not necessarily a fatal problem - some monitors will recover and show
the stream anyway if link training fails.
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 >
2017-09-26 18:06:58 -04:00
Tony Cheng
cbfd33fd97
drm/amd/display: do not set_mpc_tree if tree is already setup
...
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:58 -04:00
Anthony Koo
c282ca3390
drm/amd/display: use signal type to decide whether to set backlight
...
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 >
2017-09-26 18:06:57 -04:00
Leon Elazar
a90fbf78a6
drm/amd/display: Allow MPO on Raven
...
Signed-off-by: Leon Elazar <leon.elazar@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 18:06:57 -04:00
Yongqiang Sun
8d1b404744
drm/amd/display: Only apply ctx for specific surface.
...
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 18:06:56 -04:00
Dmytro Laktyushkin
64b44524d4
drm/amd/display: bw debug options now apply to dml as well
...
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 18:06:55 -04:00
Harry Wentland
56dcade33f
drm/amd/display: Keep DVI_SINGLE_LINK signal if low clk
...
If user is using DVI->HDMI dongle dual link signal might pose a
problem. Keep single link signal type if clk is lower than
max tmds clk.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:55 -04:00
Andrey Grodzovsky
46df790c6b
drm/amd/display: i2c/aux Remove link index.
...
Link index is an unnecessery level of inderection when
calling from kernel i2c/aux transfer into DAL.
Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:54 -04:00
Harry Wentland
15a27de250
drm/amd/display: Don't call PSR func if DMCU is off
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:54 -04:00
kbuild test robot
2801b0a84e
drm/amdgpu/display: fix semicolon.cocci warnings
...
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_resource.c:1085:2-3: Unneeded semicolon
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
CC: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:53 -04:00
kbuild test robot
8e863620aa
drm/amdgpu/display: fix semicolon.cocci warnings
...
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_stream_encoder.c:411:23-24: Unneeded semicolon
drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_stream_encoder.c:420:39-40: Unneeded semicolon
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
CC: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:52 -04:00
Hawking Zhang
fd18785385
drm/amdgpu: enable dcn1.0 dc support on raven
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:52 -04:00
Alex Deucher
ff5ef99248
drm/amdgpu/display: Enable DCN in DC
...
Enable DCN in DC.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:51 -04:00
Harry Wentland
1909bed5b4
drm/amdgpu/display: Add irq support for DCN
...
DCN code for display interrupts.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:50 -04:00
Harry Wentland
f690b1d580
drm/amdgpu/display: Add i2c/aux support for DCN
...
Implement support for i2c and aux on DCN.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:50 -04:00
Harry Wentland
981ab3f1dc
drm/amdgpu/display: Add gpio support for DCN
...
GPIOs are used for i2c and other things.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:49 -04:00
Harry Wentland
061bfa06a4
drm/amdgpu/display: Add dml support for DCN
...
Display mode lib handles clock, watermark, and bandwidth
calculations for DCN.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:49 -04:00
Harry Wentland
70ccab6040
drm/amdgpu/display: Add core dc support for DCN
...
Core display support for DCN.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:48 -04:00
Harry Wentland
74c49c7ac1
drm/amdgpu/display: Add calcs code for DCN
...
Bandwidth and scaling calculations for DCN.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:47 -04:00
Arindam Nath
03ea364c8e
drm/amd/display: fix resume hang because of DP short pulse
...
There is a hard hang observed during resume from S3 when
the system receives a DP short pulse interrupt. This is
because there are two code paths contending for GPIO
access for AUX channel transactions. One such path is
through amdgpu_dm_display_resume() function which is
invoked from the regular system resume code path. The
other path is through handle_hpd_rx_irq(), which is
invoked in response to system receiving DP short pulse
interrupt. handle_hpd_rx_irq() guards against conflicting
GPIO access using hpd_lock, but the GPIO access from
amdgpu_dm_display_resume() remains unguarded.
This patch makes sure we use hpd_lock inside
amdgpu_dm_display_resume() to avoid race conditions
for GPIO access.
Signed-off-by: Arindam Nath <arindam.nath@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:47 -04:00
Harry Wentland
ba624cddbc
drm/amd/display: Assign stream to map before we need it
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:46 -04:00
Hersen Wu
7d091f7a44
drm/amd/display: Get dprefclk ss percentage from vbios
...
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:46 -04:00
Tony Cheng
9c3b2b50b3
drm/amd/display: move drr_params definition to TG
...
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:45 -04:00
Yongqiang Sun
cf4cde2b0b
drm/amd/display: Disable cursor on video surface.
...
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:44 -04:00
Eric Cook
9e594f4c3f
drm/amd/display: Add support for FreeSync on eDP to module
...
Signed-off-by: Eric <eric.cook@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:44 -04:00
Ding Wang
529cad0f94
drm/amd/display: Add function to set dither option
...
Signed-off-by: Ding Wang <Ding.Wang@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:43 -04:00
Eric Cook
7cc9e7a68a
drm/amd/display: Check for Zero Range in FreeSync Calc
...
-check for min/max range in freesync calculation and handle it accordingly
Signed-off-by: Eric <eric.cook@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:43 -04:00
Dmytro Laktyushkin
1c29313b96
drm/amd/display: fix crash caused by incorrect index being used for array
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:42 -04:00
Ding Wang
b92033b678
drm/amd/display: Define dithering options
...
Signed-off-by: Ding Wang <Ding.Wang@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:41 -04:00
Tony Cheng
a2b8659db9
drm/amd/display: decouple resource_pool from resource_context
...
to avoid null access in case res_ctx is used to access res_pool before it's fully constructed
also make it clear which function has dependency on resource_pool
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:41 -04:00
Eric Cook
72ada5f769
drm/amd/display: FreeSync Auto Sweep Support
...
Implement core support to allow for FreeSync Auto Sweep to work
Signed-off-by: Eric Cook <Eric.Cook@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:40 -04:00
Dmytro Laktyushkin
84f6739fc4
drm/amd/display: no need for return value from ipp_program_degamma_pwl
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:40 -04:00
Dmytro Laktyushkin
e6303950ea
drm/amd/display: dce80, 100, 110 and 112 to dce ipp refactor
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:39 -04:00
Dmytro Laktyushkin
86b6a203b9
drm/amd/display: dce120 to dce ipp refactor
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:38 -04:00
Tony Cheng
50db413d55
drm/amd/display: clarify delay param for REG_WAIT
...
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:38 -04:00
Tony Cheng
e91b57334a
drm/amd/display: move tg_color to dc_hw_types
...
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:37 -04:00
Sylvia Tsai
94267b3df7
drm/amd/display: PSR Refactor
...
- Refacotr PSR to follow correct module pattern
- fix eDP only working on sink index 0.
Signed-off-by: Sylvia Tsai <sylvia.tsai@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:36 -04:00
Zeyu Fan
d27383a2b5
drm/amd/display: Make dc_link param const in set_drive_settings
...
Signed-off-by: Zeyu Fan <Zeyu.Fan@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:36 -04:00
Dmytro Laktyushkin
beb16b6a0f
drm/amd/display: improve cursor programming reliability
...
This change will cache cursor attributes and reprogram them
when enabling cursor after power gating if the attributes were not
yet reprogrammed
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:35 -04:00
Charlene Liu
03f5c686c3
drm/amd/display: USB-c DP-HDMI dongle shows garbage on Sony TV
...
Signed-off-by: Charlene Liu <charlene.liu@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:35 -04:00