Dave Airlie
4dec2aa9eb
amdgpu/dc: make program_regamma_pwl return void
...
The return value was unused.
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 >
2017-09-29 13:02:08 -04:00
Dave Airlie
2c9a7908b4
amdgpu/dc: make get_audio_clock_info return void.
...
This function never returned false under any sane circumstances.
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 >
2017-09-29 13:02:02 -04:00
Dave Airlie
99913a171d
amdgpu/dc: make dce80 timing generator construct return void.
...
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 >
2017-09-29 13:01:55 -04:00
Dave Airlie
5fb005c458
amdgpu/dc: make dce transform constructor void
...
This never returns anything but true.
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 >
2017-09-29 13:01:49 -04:00
Dave Airlie
9cf29399f6
amdgpu/dc: make opp construct void.
...
This doesn't return anything except true.
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 >
2017-09-29 13:01:42 -04:00
Dave Airlie
c60ae11201
amdgpu/dc: make link encoder construct void.
...
This only ever returned true.
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 >
2017-09-29 13:01:36 -04:00
Dave Airlie
f29f918f28
amdgpu/dc: make stream encoder constructor return void.
...
The checks weren't useful here really.
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 >
2017-09-29 13:01:29 -04:00
Dave Airlie
ca19d1a68b
amdgpu/dc: make timing generator constructor return void.
...
This can't fail as is.
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 >
2017-09-29 13:01:21 -04:00
Dave Airlie
395f669eb6
amdgpu/dc: constify a bunch of dc structs.
...
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 >
2017-09-29 13:01:15 -04:00
Dave Airlie
b8a1d69ccb
amdgpu/dc: static constify update_surface_trace_level
...
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 >
2017-09-29 13:00:49 -04:00
Dave Airlie
2dc3e4a86c
amdgpu/dc: drop dc_ver char
...
This isn't referenced anywhere, and if it was it should be const.
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 >
2017-09-29 13:00:17 -04:00
Harry Wentland
a2e74cb626
drm/amd/display: Remove DWB
...
It's not in a good shape and currently completely unused.
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 >
2017-09-28 16:53:10 -04:00
Dave Airlie
29656a363c
amdgpu/dc: remove wait_reg/wait_reg_func interfaces.
...
These aren't used in the tree anywhere, and there is a TODO.
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 >
2017-09-28 16:52:53 -04:00
Dave Airlie
e9d7dc62bc
amdgpu/dc: don't check for 0 on register read/writes always.
...
This adds ~50k to the driver text segment, and 10k to data segment.
text data bss dec hex filename
2385556 39681 1045 2426282 2505aa drivers/gpu/drm/amd/amdgpu/amdgpu.o
text data bss dec hex filename
2336593 28857 1045 2366495 241c1f drivers/gpu/drm/amd/amdgpu/amdgpu.o
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 >
2017-09-28 16:52:39 -04:00
Dave Airlie
5e0adbff08
amdgpu/dc: drop dml display_mode_support.c (v2)
...
This code isn't used, and this function is huge, reimport later if
going to be used.
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 >
2017-09-28 16:52:16 -04:00
Dave Airlie
e25cb588e6
amdgpu/dc: separate out some common code from bios parsers.
...
This extracts the bios parser object id handling into a common file.
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 >
2017-09-28 16:51:56 -04:00
Dave Airlie
e5bcf3d83e
amdgpu/dc: drop dml_util_is_420
...
This is unused code.
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 >
2017-09-28 16:51:43 -04:00
Dave Airlie
3e8c3108da
amdgpu/dc: inline a bunch of the dml wrappers.
...
This reduces code size.
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 >
2017-09-28 16:51:28 -04:00
Dave Airlie
d1209512e0
amdgpu/dc: inline a bunch of float operations.
...
This reduces code size for the bw calcs code.
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 >
2017-09-28 16:51:08 -04:00
Dave Airlie
b3fbdcec5e
amdgpu/dc: drop display_pipe_clocks.c.
...
This code isn't used at all in the kernel tree, perhaps it can wait to
be imported when it is. It also does a lot of floating point calcs,
so probably good to drop it until it's needed and we can ensure
proper fpu accessors.
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 >
2017-09-28 16:50:44 -04:00
Dave Airlie
8c0dc2b989
amdgpu/dc: move filter taps to being static const data (v2)
...
This just adds two accessor methods, and moves all the data
to static const.
v2: fix dcn build.
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 >
2017-09-28 16:49:55 -04:00
Dave Airlie
24a0d8538e
amdgpu/dc: add static to construct function
...
There was a global construct symbol in the module symbols, kill it.
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 >
2017-09-28 16:49:36 -04:00
Harry Wentland
2004f45ef8
drm/amd/display: Use kernel alloc/free
...
Abstractions are frowned upon.
cocci script:
virtual context
virtual patch
virtual org
virtual report
@@
expression ptr;
@@
- dm_alloc(ptr)
+ kzalloc(ptr, GFP_KERNEL)
@@
expression ptr, size;
@@
- dm_realloc(ptr, size)
+ krealloc(ptr, size, GFP_KERNEL)
@@
expression ptr;
@@
- dm_free(ptr)
+ kfree(ptr)
v2: use GFP_KERNEL, not GFP_ATOMIC. add cocci script
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-28 16:46:15 -04:00
Bhawanpreet Lakha
fff0925832
drm/amd/display: fix pflip irq registor for raven
...
The pflip registor index was incorrect, this was overriding the macro
and caused a dummy irq call.
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:45 -04:00
Shirish S
2c8f195adf
drm/amd/display: don't clean-up bottom pipe plane_state
...
In the scenario of setting underlay, dc_validate_global_state()
is called after constructing the context with all
relevant bottom_pipe related configurations in dm_update_planes_state().
Currently, in dc_validate_global_state(), without checking for bottom_pipe's
existence, the pipe_ctx structure is initialised to 0, hence
nullyfying the plane_state of bottom_pipe which shall be accessed
in populate_initial_data() called from bw_calcs().
Due to this null pointer access kernel panics and leads to reboot
when underlay is tried to set.
This patch fixes the issue by no longer clearing the top_pipe. This
workaround is no longer required.
Signed-off-by: Shirish S <shirish.s@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:44 -04:00
Harry Wentland
4a6cee2ca1
drm/amd/display: Remove unused dc_validate_guaranteed function
...
It got refactored away and was never cleaned.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:44 -04:00
Harry Wentland
01a526f3de
drm/amd/display: Pass log_mask from DM
...
Linux and Windows often desire different log levels.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:43 -04:00
Harry Wentland
a6def44598
drm/amd/display: Update include to bring in line with internal tree
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:41 -04:00
Harry Wentland
f6baff4d1a
drm/amd/display: Change comments to bring in line with internal tree
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:40 -04:00
Harry Wentland
1ecfc3da95
drm/amd/display: Format changes to bring in line with internal tree
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:40 -04:00
Roman Li
05230fa90d
drm/amd/display: Disable FBC for linear tiling
...
- Fixing text console on FBC-enabled builds
Signed-off-by: Roman Li <Roman.Li@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:39 -04:00
Vitaly Prosyak
e338aab03f
drm/amd/display: Update DPP registers
...
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Reviewed-by: Charlene Liu <Charlene.Liu@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:17:38 -04:00
pana
e9475143fb
drm/amd/display: Add 2X Cursor Magnification Code
...
Signed-off-by: Pandey, Arun <Arun.Pandey@amd.com >
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:37 -04:00
Harry Wentland
21e67d4d52
drm/amd/display: No need to keep track of unreffed clk sources
...
This simplifies clock source reprogramming a bit.
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:17:36 -04:00
Yue Hin Lau
e74c6972f8
drm/amd/display: move dwb registers to header file
...
Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:35 -04:00
Eric Bernstein
264efa3183
drm/amd/display: remove output_format from ipp_setup
...
Signed-off-by: Eric Bernstein <eric.bernstein@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:35 -04:00
Harry Wentland
b8ea60cea2
drm/amd/display: Remove switching of clk sources at end of commit
...
This should be taken care of in validate now.
All of timing sync is quite broken at the moment anyways. Will submit
another patch set to address that.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@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:17:34 -04:00
Harry Wentland
9d0dcecd93
drm/amd/display: Power down clock source at commit
...
Still one more in dc_validate_global
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:17:34 -04:00
Harry Wentland
4a6295361c
drm/amd/display: Don't reset clock source at unref
...
Powering down the clock source during unref is unsafe as we might want
to unref during atomic_check
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:17:33 -04:00
Yue Hin Lau
8352464661
drm/amd/display: seperate dpp_cm_helper functions into new file
...
Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:32 -04:00
Andrew Jiang
aeff7ab11e
drm/amd/display: Fix context alloc failed logging
...
Since there was no return statement in the fail block immediately
preceding the context_alloc_fail block, any failure within the
function caused a context alloc failed error message to be printed.
Since the context_alloc_fail block is only used once, move it to
where the goto is directly and accompany it with a return statement.
Signed-off-by: Andrew Jiang <Andrew.Jiang@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:32 -04:00
Tony Cheng
603767f903
drm/amd/display: fix default dithering
...
bug: default is mapped to no dithering.
default to spatial dithering based on color depth
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:31 -04:00
Harry Wentland
61a44fc626
drm/amd/display: Enable dcn10_power_on_fe log by default
...
This should only happen on full update. If this ever happens
on regular pageflips it needs to be debugged.
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:17:30 -04:00
Charlene Liu
1b7441b00a
drm/amd/display: fix crc_source_select use hardcoded color depth
...
Signed-off-by: Charlene Liu <charlene.liu@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:17:30 -04:00
Wenjing Liu
acea7183b5
drm/amd/display: set CP2520 Test pattern to use DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE
...
Signed-off-by: Wenjing Liu <Wenjing.Liu@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:17:29 -04:00
Hersen Wu
8f38b66c82
drm/amd/display: USB-C to HDMI dongle not light
...
RV1 support only USB-C active DP-2-HDMI dongle. HPD short pulse is
generated only for DP signal.
When processing HPD short pulse, it must be DP active dongle. No need
for I2C-Over-AUX detection.
v2: Add description
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:29 -04:00
Shirish S
4451a2551d
drm/amd/display: dce110: fix plane validation
...
For MPO to work with per surface rendering and flipping,
the previous logic of restricting plane[1] only as underlay
needs to be removed.
validate_surface_sets() now checks only the width and height
bounds in case of underlay rather than checking format.
Without this patch one cannot set underlay only.
Signed-off-by: Shirish S <shirish.s@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:28 -04:00
Hersen Wu
1bb4715440
drm/amd/display: Request to have DCN RV pipe Harvesting
...
TODO: Current change only work for sucessive last fused pipe,
like p3, or p3,p2. It does not work for fused p1,p2.
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:27 -04:00
Wenjing Liu
78e685f9a3
drm/amd/display: Use TPS4 instead of CP2520_3 for phy pattern 7
...
[Description]
We originally use TPS4 phy test pattern for test pattern 7.
On RV we switched to a new method to use CP2520.
CP2520 should produce the same result.
However in reality, it fails DP PHY automation test.
We use the original method instead.
Signed-off-by: Wenjing Liu <Wenjing.Liu@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:17:27 -04:00
Yongqiang Sun
890db270a5
drm/amd/display: Remove sanity check.
...
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:17:26 -04:00