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
Yongqiang Sun
6c626ffb1b
drm/amd/display: Make sure v_total_min and max not less than v_total.
...
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:34 -04:00
Amy Zhang
15350179f2
drm/amd/display: always retrieve PSR cap
...
Signed-off-by: Amy Zhang <Amy.Zhang@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:33 -04:00
Dmytro Laktyushkin
de37e273df
drm/amd/display: fix memory leak
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:33 -04:00
Yongqiang Sun
d4e745e3db
drm/amd/display: set correct v_total_min and v_total_max for dce.
...
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:32 -04:00
Dmytro Laktyushkin
974db151d4
drm/amd/display: remove unnecessary allocation for regamma_params inside opp
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:31 -04:00
Harry Wentland
50f27269b8
drm/amd/display: Fix memory leak in post_update_surfaces
...
Signed-off-by: Harry Wentland <harry.wentland@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:31 -04:00
Zeyu Fan
89aed24c18
drm/amd/display: Block YCbCr formats for eDP. Revert previous change.
...
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:30 -04:00
Shirish S
0430d52b76
drm/amd/display: make dc_commit_surfaces_to_stream() re-entrant
...
dc_commit_surfaces_to_stream() function currently
is handle's only one plane at a time.
This will not work if multiple planes have to be set to a crtc.
The functionality of dc_commit_surfaces_to_stream() with this patch
is slit into
1. Accumulate and initialise all the surfaces that needs to be
set to a crtc.
2. Update the intialised set of surfaces to the steam in one go.
Hence dc_commit_surfaces_to_stream() is renamed to init_surfaces().
Once all the planes requested by user space are initialised,
dc_commit_surfaces_to_stream() shall sequentially populates *updates,
*flip_addr, *plane_info and *scaling_info for all surfaces.
BUG: SWDEV-119421
TEST: (On Chromium OS for Stoney Only)
* Chromium UI comes up, on both eDP & DP.
* 'new_surface_count' now changes as per user input for e.g for
all below run tests its 2, without this patch for the below
tests it used to be 1
* Executed below tests to see YUV(underlay) & RGB planes on eDP
plane_test --format XR24 --size 500x100 -p --format YV12 --size 500x500
plane_test --format AR24 --size 500x50 -p --format YV12 --size 150x150
plane_test --format AR24 --size 500x50 -p --format YV12 --size 1366x768
Signed-off-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Shirish S <shirish.s@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:30 -04:00
Shirish S
110ff5439a
drm/amd/display: update the YUV plane offsets
...
This patch updates the planes default offsets to
the appropriate ones, and aligns the pitch to 64 bits.
BUG=SWDEV-119421
TEST=Boots to UI on jadeite
TEST=
plane_test --format AR24 --size 500x50 -p --format YV12 --size 500x500
plane_test --format AR24 --size 500x50 -p --format YV12 --size 1280x720
plane_test --format AR24 --size 500x50 -p --format YV12 --size 1366x768
Signed-off-by: Shirish S <shirish.s@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:29 -04:00
Shirish S
e6fbd5df0e
drm/amd/display: initialize YUV plane capabilities
...
This patch populates the YUV surface configurations.
Tests: (On Chromium OS for Stoney Only)
builds without any errors.
Signed-off-by: Shirish S <shirish.s@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:24:27 -04:00
Harry Wentland
07d72b39bc
drm/amd/display: Return context from validate_context
...
This will allow us to carry it from check to commit
Signed-off-by: Harry Wentland <harry.wentland@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 17:24:23 -04:00
Harry Wentland
8122a253b3
drm/amd/display: Move resource_validate_ctx_destruct to dc.h
...
This will be needed to clean up context once we add it to private
atomic state.
Signed-off-by: Harry Wentland <harry.wentland@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 17:24:20 -04:00
Harry Wentland
927f6eff2a
drm/amd/display: Copy ctx to current_context instead of assign
...
Signed-off-by: Harry Wentland <harry.wentland@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 17:24:16 -04:00
Harry Wentland
129eed7282
drm/amd/display: pull commit_surfaces out of atomic_commit into helper function
...
This should make things simpler when we try to rework this later when we
pass validate_context from atomic_check to atomic_commit.
Signed-off-by: Harry Wentland <harry.wentland@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 17:24:13 -04:00
Dmytro Laktyushkin
2180e7cca4
drm/amd/display: update dce8 & 10 bw programming
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:24:08 -04:00
Harry Wentland
6d9501e4ad
drm/amd/display: Get rid of temp_flip_context
...
If we need to update our context we can allocate memory.
No need to keep temporary memory for this.
Signed-off-by: Harry Wentland <harry.wentland@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 17:24:04 -04:00
Harry Wentland
03e4173b44
drm/amd/display: Remove unused scratch_val_ctx
...
Signed-off-by: Harry Wentland <harry.wentland@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 17:24:01 -04:00
Eric Cook
09e2d07f9d
drm/amd/display: FreeSync LFC MIN/MAX update on current frame
...
- Update BTR/LFC logic so that V_TOTAL_MIN/MAX will take affect on current frame
- Add in FreeSync update to MPO code path
Signed-off-by: Eric Cook <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 17:23:57 -04:00
Vitaly Prosyak
ab3c179893
drm/amd/display: Add support for programming stereo sync
...
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@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 17:23:51 -04:00
Sylvia Tsai
81c509633a
drm/amd/display: Parse scanline registers
...
They could differ between ASIC generations
Signed-off-by: Sylvia Tsai <sylvia.tsai@amd.com >
Signed-off-by: Harry Wentland <harry.wentland@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 17:23:47 -04:00
Charlene Liu
1ce71fcd5d
drm/amd/display: use full surface update when stream is NULL
...
Signed-off-by: Charlene Liu <charlene.liu@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 17:23:43 -04:00
Jordan Lazare
209a885be0
drm/amd/display: Fix missing irq refactor causing potential i2c race
...
Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:23:40 -04:00
Ding Wang
07c84c7ad3
drm/amd/display: Fix for tile MST
...
- Set stream signal type to be SST when setting non-tile timing on MST
tiled display.
- Disable MST on sink after disabling MST link.
- Enable MST on sink before enabling MST link.
Signed-off-by: Ding Wang <Ding.Wang@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Jun Lei <Jun.Lei@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:23:36 -04:00
Leon Elazar
b64875feb1
drm/amd/display: set NULL value during removal for remoteSink
...
In MST case during removal of remote sink its descriptor pointer wasn't freed corectly.
Signed-off-by: Leon Elazar <leon.elazar@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 17:23:32 -04:00
Yongqiang Sun
fb9611d216
drm/amd/display: change mpo surface update check condition.
...
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 17:23:29 -04:00
Yongqiang Sun
313bf4ff01
drm/amd/display: Add same check as reset pipes for programing backend regs.
...
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 17:23:25 -04:00
Sylvia Tsai
8b32076c27
drm/amd/display: Adding dm controlled signal type in dc_stream
...
- Adding dm controlled signal type in dc_stream
- Adding fallback to dvi signal when output signal is hdmi and the connector
type is not
Signed-off-by: Sylvia Tsai <sylvia.tsai@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Sylvia Tsai <Sylvia.Tsai@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:23:22 -04:00
Leon Elazar
6e5d1c829b
drm/amd/display: Memory was freed twice during disable
...
1. get_ss_info_from_atombios function was allocating the memory populating the provided pointer
but them freeing the memory.
Since the pointer was return as a valid value, we are trying to free the same memory during clock resource destruction
Signed-off-by: Leon Elazar <leon.elazar@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 17:23:19 -04:00
Zeyu Fan
632550d71f
drm/amd/display: Fix hotspot programming during set cursor position.
...
- Remove x,y hotspot from dc_cursor_attributes. Only program it
through setPosition.
Signed-off-by: Zeyu Fan <Zeyu.Fan@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Zeyu Fan <Zeyu.Fan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:23:15 -04:00
Charlene Liu
035e0fe548
drm/amd/display: adding FCLK and DPPCLK clock types
...
Signed-off-by: Charlene Liu <charlene.liu@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 17:23:11 -04:00
Mario Kleiner
00d7930c51
drm/amd/display: Prevent premature pageflip when comitting in vblank. (v3)
...
Make sure we do not program a hw pageflip inside vblank 'n' iff the
atomic flip is comitted while inside the same vblank 'n'. We must
defer such a flip by one refresh cycle to vblank 'n+1', unless this
is a DRM_MODE_PAGE_FLIP_ASYNC async pageflip, which must always
execute as soon as possible.
Without this, pageflips programmed via X11 GLX_OML_sync_control extensions
glXSwapBuffersMscOML(..., target_msc, ...); call and/or via DRI3/Present
PresentPixmap(..., target_msc, ...); request will complete one vblank
too early whenever target_msc > current_msc + 1, ie. more than 1 vblank
in the future. In such a case, the call of the pageflip ioctl() would be
triggered by a queued drmWaitVblank() vblank event, which itself gets
dispatched inside the vblank one frame before the target_msc vblank.
Testing with this patch does no longer show any problems with
OML_sync_control swap scheduling or flip completion timestamps.
Tested on R9 380 Tonga.
v2: Add acked/r-b by Harry and Michel.
v3: Feedback from Andrey: Must not wait an extra frame for
DRM_MODE_PAGE_FLIP_ASYNC flips.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com >
Acked-by: Harry Wentland <harry.wentland@amd.com > (v1)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com >
Cc: Harry Wentland <Harry.Wentland@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:23:05 -04:00