]> Git Repo - linux.git/log
linux.git
6 years agodrm/amd/display: clean up encoding checks
Eric Yang [Fri, 14 Sep 2018 19:55:01 +0000 (15:55 -0400)]
drm/amd/display: clean up encoding checks

[Why]
All ASICS we support has YCbCr support, so
the check is unnecessary, the currently logic
in validate output also returns true all
the time, so the unneccessary logic is removed

Signed-off-by: Eric Yang <[email protected]>
Reviewed-by: Tony Cheng <[email protected]>
Acked-by: Leo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/display: block DP YCbCr420 modes
Eric Yang [Fri, 14 Sep 2018 17:53:14 +0000 (13:53 -0400)]
drm/amd/display: block DP YCbCr420 modes

[why]
Currently not supported, will black screen when set.

[How]
Fail validate timing helper for those modes.

Signed-off-by: Eric Yang <[email protected]>
Reviewed-by: Tony Cheng <[email protected]>
Acked-by: Leo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/display: Add function to fetch clock requirements
Eryk Brol [Fri, 7 Sep 2018 17:24:28 +0000 (13:24 -0400)]
drm/amd/display: Add function to fetch clock requirements

Also add dram clock to clocks struct, for systems that uses them.

Signed-off-by: Eryk Brol <[email protected]>
Reviewed-by: Jun Lei <[email protected]>
Acked-by: Leo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/display: Calculate swizzle mode using bpp during validation
Su Sung Chung [Thu, 13 Sep 2018 19:26:08 +0000 (15:26 -0400)]
drm/amd/display: Calculate swizzle mode using bpp during validation

[Why]
Previously bandwidth validation was failing because swizzle mode was not
initialized during plane_state allocation. The swizzle mode was
calculated using pixed format which is how swizzle mode is initially
calculated in addrlib.

[How]
* Set default swizzle mode for validation to DC_SW_UNKNOWN
* Created new function in dcn10_assign_swizzle_mode which sets the
  plane swizzle mode based on selected pixed format
* Added the call of assign_swizzle_mode into dc_validate_global_state
* Set failsafe swizzle mode back to DC_SW_LINEAR

Signed-off-by: Su Sung Chung <[email protected]>
Reviewed-by: Eric Yang <[email protected]>
Acked-by: Leo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/display: Add a check-function for virtual signal type
Nikola Cornij [Wed, 12 Sep 2018 19:17:51 +0000 (15:17 -0400)]
drm/amd/display: Add a check-function for virtual signal type

[why]
Same functions exist for all other signal types.

[how]
Add a function that checks against virtual signal type.

Signed-off-by: Nikola Cornij <[email protected]>
Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/display: fix 4K stereo screen flash issue
Charlene Liu [Wed, 12 Sep 2018 22:22:16 +0000 (18:22 -0400)]
drm/amd/display: fix 4K stereo screen flash issue

[Why]
HDMI_scramber is not enabled for pixel rate >340Mhz.
[How]
Calculate the phy clock to include the Hw frame packing factor.

Signed-off-by: Charlene Liu <[email protected]>
Reviewed-by: Chris Park <[email protected]>
Acked-by: Leo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/display: Add DC build_id to determine build type
Jun Lei [Thu, 13 Sep 2018 13:32:26 +0000 (09:32 -0400)]
drm/amd/display: Add DC build_id to determine build type

[why]
Sometimes there are indications that the incorrect driver is being
loaded in automated tests. This change adds the ability for builds to
be tagged with a string, and picked up by the test infrastructure.

[how]
dc.c will allocate const for build id, which is init-ed with default
value, indicating production build. For test builds, build server will
find/replace this value. The test machine will then verify this value.

Signed-off-by: Jun Lei <[email protected]>
Reviewed-by: Tony Cheng <[email protected]>
Acked-by: Leo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD
Akshu Agrawal [Mon, 24 Sep 2018 10:18:02 +0000 (15:48 +0530)]
drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD

We observe black lines (underflow) on display when playing a
4K video with UVD. On Disabling Low memory P state this issue is
not seen.
Multiple runs of power measurement shows no imapct.

Signed-off-by: Akshu Agrawal <[email protected]>
Signed-off-by: Satyajit Sahu <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
6 years agodrm/amd/pp: Remove wrong code in fiji_start_smu
Rex Zhu [Wed, 26 Sep 2018 04:17:52 +0000 (12:17 +0800)]
drm/amd/pp: Remove wrong code in fiji_start_smu

HW CG feature will be enabled after hw ip initialized

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/pp: Remove uncessary extra vcn pg cntl in smu
Rex Zhu [Fri, 28 Sep 2018 08:57:34 +0000 (16:57 +0800)]
drm/amd/pp: Remove uncessary extra vcn pg cntl in smu

the vcn power will be controlled by VCN.

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amdgpu: Move out power up/down sdma out of smu
Rex Zhu [Tue, 25 Sep 2018 11:53:30 +0000 (19:53 +0800)]
drm/amdgpu: Move out power up/down sdma out of smu

smu only expose interface to other ip blocks.
in order to reduce dependence between smu and other ip blocks

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/pp: Expose the smu support for SDMA PG cntl
Rex Zhu [Tue, 25 Sep 2018 11:45:46 +0000 (19:45 +0800)]
drm/amd/pp: Expose the smu support for SDMA PG cntl

SDMA IP can be power up/down via smu message

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/pp: Avoid divide-by-zero in fan_ctrl_set_fan_speed_rpm
Rex Zhu [Thu, 20 Sep 2018 03:50:26 +0000 (11:50 +0800)]
drm/amd/pp: Avoid divide-by-zero in fan_ctrl_set_fan_speed_rpm

The minRPM speed maybe equal to zero. so need to check
input RPM not equal to 0, otherwise cause divide-by-zero driver crash.

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/pp: Fix fan's RPM setting not work on VI/Vega10
Rex Zhu [Thu, 20 Sep 2018 07:11:08 +0000 (15:11 +0800)]
drm/amd/pp: Fix fan's RPM setting not work on VI/Vega10

set the target rpm value to wrong register.

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amdgpu: Fix comments error in sdma_v4_1_update_power_gating
Rex Zhu [Tue, 25 Sep 2018 05:27:00 +0000 (13:27 +0800)]
drm/amdgpu: Fix comments error in sdma_v4_1_update_power_gating

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/powerplay: enable MGPU fan boost feature on Vega20
Evan Quan [Thu, 27 Sep 2018 05:48:45 +0000 (13:48 +0800)]
drm/amd/powerplay: enable MGPU fan boost feature on Vega20

Added Vega20 specific implementation for MGPU fan boost
feature.

Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/powerplay: helper interfaces for MGPU fan boost feature
Evan Quan [Thu, 27 Sep 2018 05:43:16 +0000 (13:43 +0800)]
drm/amd/powerplay: helper interfaces for MGPU fan boost feature

MGPU fan boost feature is enabled only when two or more dGPUs
in the system.

Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amdgpu: added AMD GPU instance counting V2
Evan Quan [Thu, 27 Sep 2018 05:26:58 +0000 (13:26 +0800)]
drm/amdgpu: added AMD GPU instance counting V2

Count all GPU instances from AMD(including iGPUs and
dGPUs) in the system.

V2: drop unnecessary initialization for other gpu_info
    members except mutex

Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amdgpu/vega20: make power profile output more consistent
Alex Deucher [Thu, 27 Sep 2018 03:55:47 +0000 (22:55 -0500)]
drm/amdgpu/vega20: make power profile output more consistent

Make the profile name line match previous generations more closely.

E.g.,
0 3D_FULL_SCREEN :
vs:
0(3D_FULL_SCREEN )

Reviewed-by: Evan Quan <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amdgpu: change Raven always on CUs to 4
Evan Quan [Wed, 19 Sep 2018 11:07:19 +0000 (19:07 +0800)]
drm/amdgpu: change Raven always on CUs to 4

For Vega10 and Vega20, the always on CUs are 12.
For Raven, it's 4.

Signed-off-by: Evan Quan <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amdgpu: added vega20 LBPW support v2
Evan Quan [Fri, 24 Aug 2018 08:40:03 +0000 (16:40 +0800)]
drm/amdgpu: added vega20 LBPW support v2

Enable LBPW support on vega20.

v2: squash in warning fix (Alex)

Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/powerplay/vega20: enable fan RPM and pwm settings V2
Evan Quan [Tue, 18 Sep 2018 10:04:44 +0000 (18:04 +0800)]
drm/amd/powerplay/vega20: enable fan RPM and pwm settings V2

Manual fan RPM and pwm setting on vega20 are
available now.

V2: correct the register for fan speed setting and
    avoid divide-by-zero

Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/powerplay/vega20: tell the correct gfx voltage V2
Evan Quan [Mon, 17 Sep 2018 10:41:28 +0000 (18:41 +0800)]
drm/amd/powerplay/vega20: tell the correct gfx voltage V2

Export the correct gfx voltage by hwmon interface.

V2: update the register naming for consistency

Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agodrm/amd/powerplay/vega20: correct the hwmon interface ppt limit output
Evan Quan [Mon, 17 Sep 2018 07:05:54 +0000 (15:05 +0800)]
drm/amd/powerplay/vega20: correct the hwmon interface ppt limit output

The ppt limit read out by hwmon interface is always 0.
Correct this hwmon interface output.

Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
6 years agoMAINTAINERS: Add Maxime Ripard as drm-misc maintainer
Sean Paul [Fri, 5 Oct 2018 16:02:22 +0000 (12:02 -0400)]
MAINTAINERS: Add Maxime Ripard as drm-misc maintainer

Unfortunately Gustavo has decided to step down as drm-misc maintainer to
focus on other projects. Thanks Gustavo for your dedication and hard work!

Fortunately for us, we have a wealth of people qualified to assume a
-misc maintainer role. Maxime has done an outstanding job with sun4i and
in the community in general. I'm really excited that he agreed to take
on this responsibility and I look forward to working with him!

Cc: Dave Airlie <[email protected]>
Cc: Gustavo Padovan <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
6 years agodrm/msm: a6xx: Fix improper u64 division
Sean Paul [Mon, 8 Oct 2018 18:24:14 +0000 (14:24 -0400)]
drm/msm: a6xx: Fix improper u64 division

This patch uses the proper do_div() macro to perform u64 division and
guards against overflow if the result is too large for the unsigned long
return type

Fixes: a2c3c0a54d4c drm/msm/a6xx: Add devfreq support for a6xx
Cc: Sharat Masetty <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: a5xx: Remove unneeded parens
Sean Paul [Mon, 8 Oct 2018 18:24:13 +0000 (14:24 -0400)]
drm/msm: a5xx: Remove unneeded parens

A small fixup I posted with my v2 patch [1] that was dropped.

[1]- https://lists.freedesktop.org/archives/freedreno/2018-October/003647.html

Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agoMerge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next
Dave Airlie [Mon, 8 Oct 2018 06:38:48 +0000 (16:38 +1000)]
Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next

I've realised that the commit 3dae1c0919d8 ("drm/arm/malidp: Implemented
the size validation for AFBC framebuffers") got bungled up in the
upstreaming process and it was missing an important line from the
function that calculates the size of the AFBC framebuffer

Signed-off-by: Dave Airlie <[email protected]>
From: Liviu Dudau <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
6 years agodrm/msm/a6xx: Remove CP perfcounter selects from the protected list
Jordan Crouse [Fri, 5 Oct 2018 20:06:05 +0000 (14:06 -0600)]
drm/msm/a6xx: Remove CP perfcounter selects from the protected list

The CP performance counter selects were accidentally marked as protected
so they couldn't be written from PM4 streams. Remove the protection
because user space does have an interest in setting up their own
counters.

Signed-off-by: Jordan Crouse <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Fix memory leak caused by dropped reference
Sean Paul [Thu, 4 Oct 2018 18:09:44 +0000 (14:09 -0400)]
drm/msm: dpu: Fix memory leak caused by dropped reference

We are currently leaking a drm_crtc_commit struct for every atomic
commit containing plane state. The dpu plane destroy function cleans up
the fb reference manually, but fails to release the commit ref. As a
result, we just keep allocating drm_crtc_commits without ever freeing
them. Fortunately there's a helper function which will clean up all of
our mess at once, so use that.

Thanks to Doug Anderson for reporting the memory leak (and leaving
breadcrumbs from kmemleak!).

Reported-by: Doug Anderson <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: a5xx: Fix improper u64 division
Sean Paul [Thu, 4 Oct 2018 19:24:04 +0000 (15:24 -0400)]
drm/msm: a5xx: Fix improper u64 division

This patch uses the proper do_div() macro to perform u64 division and
guards against overflow if the result is too large for the unsigned long
return type

Fixes: de0a3d094de0 drm/msm: re-factor devfreq code
Cc: Sharat Masetty <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: update generated headers
Rob Clark [Thu, 4 Oct 2018 19:10:30 +0000 (15:10 -0400)]
drm/msm: update generated headers

Signed-off-by: Rob Clark <[email protected]>
6 years agodrm: malidp: Add the size of the superblocks when calculating total
Liviu Dudau [Fri, 5 Oct 2018 12:30:48 +0000 (13:30 +0100)]
drm: malidp: Add the size of the superblocks when calculating total
size for AFBC buffers

The size of the superblocks being added to the total AFBC buffer size
got lost in the upstreaming process. Add it back.

Reviewed-by: Ayan Kumar Halder <[email protected]>
Signed-off-by: Liviu Dudau <[email protected]>
6 years agodrm/imx: fix build failure without CONFIG_DRM_FBDEV_EMULATION
Arnd Bergmann [Wed, 26 Sep 2018 19:38:36 +0000 (21:38 +0200)]
drm/imx: fix build failure without CONFIG_DRM_FBDEV_EMULATION

The variable is declared in an #ifdef section, but the user is
now unconditional, which leads to a build failure:

drivers/gpu/drm/imx/imx-drm-core.c: In function 'imx_drm_bind':
drivers/gpu/drm/imx/imx-drm-core.c:264:6: error: 'legacyfb_depth' undeclared (first use in this function); did you mean 'lockdep_depth'?

Remove the remaining #ifdef as well.

Fixes: f53705fd9803 ("drm/imx: Use drm_fbdev_generic_setup()")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Noralf Trønnes <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
6 years agodrm/msm/a6xx: Add devfreq support for a6xx
Sharat Masetty [Thu, 4 Oct 2018 09:41:43 +0000 (15:11 +0530)]
drm/msm/a6xx: Add devfreq support for a6xx

Implement routines to estimate GPU busy time and fetching the
current frequency for the polling interval. This is required by
the devfreq framework which recommends a frequency change if needed.
The driver code then tries to set this new frequency on the GPU by
sending an Out Of Band(OOB) request to the GMU.

Signed-off-by: Sharat Masetty <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: re-factor devfreq code
Sharat Masetty [Thu, 4 Oct 2018 09:41:42 +0000 (15:11 +0530)]
drm/msm: re-factor devfreq code

The devfreq framework requires the drivers to provide busy time estimations.
The GPU driver relies on the hardware performance counteres for the busy time
estimations, but different hardware revisions have counters which can be
sourced from different clocks. So the busy time estimation will be target
dependent.  Additionally on targets where the clocks are completely controlled
by the on chip microcontroller, fetching and setting the current GPU frequency
will be different. This patch aims to embrace these differences by re-factoring
the devfreq code a bit.

Signed-off-by: Sharat Masetty <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/a6xx: Add gmu_read64() register read op
Sharat Masetty [Thu, 4 Oct 2018 09:41:41 +0000 (15:11 +0530)]
drm/msm/a6xx: Add gmu_read64() register read op

Add a simple function to read 64 registers in the GMU domain

Signed-off-by: Sharat Masetty <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: suspend devfreq on init
Sharat Masetty [Thu, 4 Oct 2018 09:41:40 +0000 (15:11 +0530)]
drm/msm: suspend devfreq on init

Devfreq turns on and starts recommending power level as soon as it is
initialized. The GPU is still not powered on by the time the devfreq
init happens and this leads to problems on GPU's where register access
is needed to get/set power levels. So we start suspended and only restart
devfreq when GPU is powered on.

Signed-off-by: Sharat Masetty <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agoMerge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next
Dave Airlie [Thu, 4 Oct 2018 01:30:58 +0000 (11:30 +1000)]
Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next

misc mali-dp updates.

Signed-off-by: Dave Airlie <[email protected]>
From: Liviu Dudau <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
6 years agoMerge tag 'tilcdc-4.20' of https://github.com/jsarha/linux into drm-next
Dave Airlie [Thu, 4 Oct 2018 01:28:54 +0000 (11:28 +1000)]
Merge tag 'tilcdc-4.20' of https://github.com/jsarha/linux into drm-next

drm/tilcdc changes for Linux v4.20

suspend/resume update.

Signed-off-by: Dave Airlie <[email protected]>
From: Jyri Sarha <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
6 years agoBackMerge v4.19-rc6 into drm-next
Dave Airlie [Thu, 4 Oct 2018 01:03:34 +0000 (11:03 +1000)]
BackMerge v4.19-rc6 into drm-next

I have some pulls based on rc6, and I prefer to have an explicit backmerge.

Signed-off-by: Dave Airlie <[email protected]>
6 years agoMerge tag 'exynos-drm-next-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel...
Dave Airlie [Thu, 4 Oct 2018 00:40:35 +0000 (10:40 +1000)]
Merge tag 'exynos-drm-next-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

Add out-bridge support
- This patch series enables out-bridge for LVDS bridge device support,
  and also includes two cleanups and one relevant dt binding update
  for this.

Add Samsung 16x16 tiled format support
- This patch series adds Samsung 16x16 tiled format to scaler and
  gsc drivers. As for this, it adds Samsung specific format to
  drm_forcc.h header. For the git-pull request with relevant patches,
  I requested ack-by[1] to relevant maintainers but there was no any response.
  I'm pretty sure no problem to go to mainline though Exynos tree
  because the only user of it is Exynos.
(airlied: this looked fine to me)

[1] https://patchwork.freedesktop.org/patch/243921/

Add configurable plane alpha and pixel blend mode support
- This patch series makes mixer driver to be configuragle for
  pixel blend mode and plane alpha, which also includes one fixup
  to set all default values correctly after reset.

One cleanup
- This patch replaces drm_atomic_helper_suspend/resume() with
  drm_mode_config_helper_suspend/resume() to remove exynos specific
  suspend_state.

Signed-off-by: Dave Airlie <[email protected]>
From: Inki Dae <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
6 years agoMerge tag 'omapdrm-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba...
Dave Airlie [Thu, 4 Oct 2018 00:38:23 +0000 (10:38 +1000)]
Merge tag 'omapdrm-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next

omapdrm fixes and cleanups for 4.20

- fix memory barrier bug in DMM driver
- fix interrupt management in DMM driver
- partial workaround for errata i878
- fix use of freed memory
- some cleanups

Signed-off-by: Dave Airlie <[email protected]>
From: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
6 years agoMerge tag 'drm-misc-next-fixes-2018-10-03' of git://anongit.freedesktop.org/drm/drm...
Dave Airlie [Thu, 4 Oct 2018 00:37:30 +0000 (10:37 +1000)]
Merge tag 'drm-misc-next-fixes-2018-10-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

- Add EXPERT config option to allow phys mem leak from fbdev for blob drivers (Neil)

Cc: Neil Armstrong <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
From: Sean Paul <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20181003195957.GA64584@art_vandelay
6 years agodrm/msm/a6xx: Add inactive_period for a6xx
Jordan Crouse [Fri, 28 Sep 2018 14:27:56 +0000 (08:27 -0600)]
drm/msm/a6xx: Add inactive_period for a6xx

The target definition for a630 didn't set a reasonable
value for inactive_period so it defaulted to zero and
we were essentially powering down after every submission.
Set it back to the default value to keep the GPU from
bouncing too much during regular workloads.

Signed-off-by: Jordan Crouse <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: Replace drm_dev_unref with drm_dev_put
Thomas Zimmermann [Wed, 26 Sep 2018 11:48:59 +0000 (13:48 +0200)]
drm/msm: Replace drm_dev_unref with drm_dev_put

This patch unifies the naming of DRM functions for reference counting
of struct drm_device. The resulting code is more aligned with the rest
of the Linux kernel interfaces.

Signed-off-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: Replace drm_gem_object_{un/reference} with put, get functions
Thomas Zimmermann [Wed, 26 Sep 2018 11:48:58 +0000 (13:48 +0200)]
drm/msm: Replace drm_gem_object_{un/reference} with put, get functions

This patch unifies the naming of DRM functions for reference counting
of struct drm_gem_object. The resulting code is more aligned with the
rest of the Linux kernel interfaces.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jordan Crouse <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: Replace drm_framebuffer_{un/reference} with put, get functions
Thomas Zimmermann [Wed, 26 Sep 2018 11:48:57 +0000 (13:48 +0200)]
drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions

This patch unifies the naming of DRM functions for reference counting
of struct drm_framebuffer. The resulting code is more aligned with the
rest of the Linux kernel interfaces.

Signed-off-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/a6xx: Poll for HFI responses
Jordan Crouse [Thu, 20 Sep 2018 23:04:43 +0000 (17:04 -0600)]
drm/msm/a6xx: Poll for HFI responses

The only HFI communication with the GMU on sdm845 happens
during initialization and all commands are synchronous. A fancy
interrupt tasklet and associated infrastructure is entirely
not eeded and puts us at the mercy of the scheduler.

Instead poll for the message signal and handle the response
immediately and go on our way.

Signed-off-by: Jordan Crouse <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agomsm/gpu/a6xx: Force of_dma_configure to setup DMA for GMU
Jordan Crouse [Fri, 14 Sep 2018 15:03:46 +0000 (09:03 -0600)]
msm/gpu/a6xx: Force of_dma_configure to setup DMA for GMU

The point of the 'force_dma' parameter for of_dma_configure
is to force the device to be set up even if DMA capability is
not described by the firmware which is exactly the use case
 we have for GMU - we need SMMU to get set up but we have no
other dma capabilities since memory is managed by the GPU
driver. Currently we pass false so of_dma_configure() fails
and subsequently GMU and GPU probe does as well.

Fixes: 4b565ca5a2c ("drm/msm: Add A6XX device support")
Signed-off-by: Jordan Crouse <[email protected]>
Tested-by: Sibi Sankar <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/a5xx: Skip hardware preemption init if no preemption
Sharat Masetty [Fri, 14 Sep 2018 08:38:55 +0000 (14:08 +0530)]
drm/msm/a5xx: Skip hardware preemption init if no preemption

In the case where preemption is not enabled, this patch simply skips
preemption related initialization in hardware init sequence.

Signed-off-by: Sharat Masetty <[email protected]>
Reviewed-by: Jordan Crouse <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: fix unsigned comparison with less than zero
Colin Ian King [Tue, 21 Aug 2018 11:55:19 +0000 (12:55 +0100)]
drm/msm: fix unsigned comparison with less than zero

The return from the call to _mixer_stages can be a negative error
code however this is being assigned to an unsigned variable 'stages'
hence the check is always false. Fix this by making 'stages' an
int.

Detected by Coccinelle ("Unsigned expression compared with zero:
stages < 0")

Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/a6xx: Fix PDC register overlap
Jordan Crouse [Wed, 8 Aug 2018 22:39:38 +0000 (16:39 -0600)]
drm/msm/a6xx: Fix PDC register overlap

The current design greedily takes a big chunk of the PDC
register space instead of just the GPU specific sections
which conflicts with other drivers and generally makes
a mess of things.

Furthermore we only need to map the GPU PDC sections
just once during init so map the memory inside the function
that uses it and adjust the pointers and register offsets
accordingly.

Signed-off-by: Jordan Crouse <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/a6xx: Rename gmu phandle to qcom,gmu
Jordan Crouse [Wed, 8 Aug 2018 22:38:52 +0000 (16:38 -0600)]
drm/msm/a6xx: Rename gmu phandle to qcom,gmu

>From the review for the DT bindings for the GPU/GMU it
was suggested that the phandle for the GMU be
'qcom,gmu' instead of just 'gmu'.

Signed-off-by: Jordan Crouse <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/gpu: fix parameters in function msm_gpu_crashstate_capture
Anders Roxell [Tue, 31 Jul 2018 20:45:32 +0000 (22:45 +0200)]
drm/msm/gpu: fix parameters in function msm_gpu_crashstate_capture

When CONFIG_DEV_COREDUMP isn't defined msm_gpu_crashstate_capture
doesn't pass the correct parameters.
drivers/gpu/drm/msm/msm_gpu.c: In function ‘recover_worker’:
drivers/gpu/drm/msm/msm_gpu.c:479:34: error: passing argument 2 of ‘msm_gpu_crashstate_capture’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  msm_gpu_crashstate_capture(gpu, submit, comm, cmd);
                                  ^~~~~~
drivers/gpu/drm/msm/msm_gpu.c:388:13: note: expected ‘char *’ but argument is of type ‘struct msm_gem_submit *’
 static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/msm_gpu.c:479:2: error: too many arguments to function ‘msm_gpu_crashstate_capture’
  msm_gpu_crashstate_capture(gpu, submit, comm, cmd);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/msm_gpu.c:388:13: note: declared here
 static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm,

In current code the function msm_gpu_crashstate_capture parameters.

Fixes: cdb95931dea3 ("drm/msm/gpu: Add the buffer objects from the submit to the crash dump")
Signed-off-by: Anders Roxell <[email protected]>
Reviewed-By: Jordan Crouse <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/a6xx: Send the right perf index value to GMU
Sharat Masetty [Thu, 27 Sep 2018 16:46:22 +0000 (22:16 +0530)]
drm/msm/a6xx: Send the right perf index value to GMU

The index of the perf table was being set in the wrong bit position
in the register. With this fix, the GPU clock can be seen running at
desired frequency.

Signed-off-by: Sharat Masetty <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/rd: fix crash with long process cmdlines
Rob Clark [Tue, 25 Sep 2018 17:54:00 +0000 (13:54 -0400)]
drm/msm/rd: fix crash with long process cmdlines

The [v]snprintf() functions return the size that *would have* been
written into the buffer, rather than the size *actually* written.
Which results in us trying to memcpy() past the end of the stack.

What we really want is [v]scnprintf().

Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Don't reset dpu_enc->cur_master on .disable()
Sean Paul [Mon, 17 Sep 2018 20:49:32 +0000 (16:49 -0400)]
drm/msm: dpu: Don't reset dpu_enc->cur_master on .disable()

cur_master in dpu_encoder is assigned at modeset and cleared on
.disable(). Unfortunately dpms (or enable/disable) does not guarantee a
modeset, so cur_master is NULL when we try to re-enable it.

This patch moves the NULL assignment to setup_display where it will be
re-assigned later in the function.

Tested-by: Bruce Wang <[email protected]>
Reviewed-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: Revise _dpu_plane_get_aspace
Bruce Wang [Tue, 25 Sep 2018 21:10:25 +0000 (17:10 -0400)]
drm/msm/dpu: Revise _dpu_plane_get_aspace

Remove unneeded checks from _dpu_plane_get_aspace.

v3: change _dpu_plane_get_aspace to return a struct
*msm_gem_address_space instead passing in a pointer of the same
type to edit. Remove uneeded arguments.

Reviewed-by: Jordan Crouse <[email protected]>
Signed-off-by: Bruce Wang <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: Make dpu_plane_danger_signal_ctrl void
Bruce Wang [Mon, 24 Sep 2018 16:22:27 +0000 (12:22 -0400)]
drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void

Removed all impossible checks from the function, which eliminates
the need for a return value. This function is also never used
outside of dpu_plane.c, so the function is made static.

v3: Using helper function _dpu_plane_get_kms() instead of doing
it locally.

Signed-off-by: Bruce Wang <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: Change _dpu_crtc_vblank_enable_no_lock to void
Bruce Wang [Mon, 24 Sep 2018 16:22:26 +0000 (12:22 -0400)]
drm/msm/dpu: Change _dpu_crtc_vblank_enable_no_lock to void

Removes redundant tests for _dpu_crtc_vblank_enable_no_lock.
Function return type is now void and all function calls have
been changed accordingly.

Signed-off-by: Bruce Wang <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: Remove _dpu_crtc_power_enable
Bruce Wang [Wed, 26 Sep 2018 21:28:59 +0000 (17:28 -0400)]
drm/msm/dpu: Remove _dpu_crtc_power_enable

All checks for _dpu_crtc_power_enable are not true, so the function
can never return an error code. This removes the need for the
function as pm_runtime functions can be used instead.

v3: Separated _dpu_crtc_power_enable into _dpu_crtc_power_enable and
_dpu_crtc_power_disable for clarity.

v4: Removed both _dpu_crtc_power_enable and _dpu_crtc_power_disable
and called pm_runtime_get_sync and pm_runtime_put_sync from all
call points

Reviewed-by: Jordan Crouse <[email protected]>
Signed-off-by: Bruce Wang <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: Remove unneeded checks in dpu_crtc.c
Bruce Wang [Mon, 24 Sep 2018 16:22:24 +0000 (12:22 -0400)]
drm/msm/dpu: Remove unneeded checks in dpu_crtc.c

Removes impossible checks in dpu_crtc.c.
Variable assignments are moved up to be initializations where
possible. Some variables are no longer used, these are removed.

v3: reverted back to original patch

Reviewed-by: Sean Paul <[email protected]>
Reviewed-by: Jordan Crouse <[email protected]>
Signed-off-by: Bruce Wang <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: Clean up plane atomic disable/update
Bruce Wang [Mon, 24 Sep 2018 16:22:23 +0000 (12:22 -0400)]
drm/msm/dpu: Clean up plane atomic disable/update

Removes unnecessary checks from dpu_plane_atomic_disable, old_state
argument for both dpu_plane_atomic_disable and
dpu_plane_sspp_atomic_update is removed as it is no longer used.

Reviewed-by: Sean Paul <[email protected]>
Reviewed-by: Jordan Crouse <[email protected]>
Signed-off-by: Bruce Wang <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: Remove unneeded checks in dpu_plane.c
Bruce Wang [Mon, 24 Sep 2018 16:22:22 +0000 (12:22 -0400)]
drm/msm/dpu: Remove unneeded checks in dpu_plane.c

Removes some checks from dpu_plane.c that will never result in an error.
Subsequent variable assignments become part of the initialization wherever
possible. Unused variables are removed.

v3: removed additional impossible checks and called helper function
_dpu_plane_get_kms() where possible.

Reviewed-by: Sean Paul <[email protected]>
Reviewed-by: Jordan Crouse <[email protected]>
Signed-off-by: Bruce Wang <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Don't store/deref pointers in trace ringbuffer
Sean Paul [Wed, 19 Sep 2018 18:33:50 +0000 (14:33 -0400)]
drm/msm: dpu: Don't store/deref pointers in trace ringbuffer

TP_printk is not synchronous, so storing pointers and then later
dereferencing them is a Bad Idea. This patch stores everything locally to
avoid display stomped memory.

Reviewed-by: Abhinav Kumar <[email protected]>
[seanpaul fixed up commit msg typo on apply]
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Add extra_flush_bits to trigger_flush trace
Sean Paul [Wed, 19 Sep 2018 18:33:49 +0000 (14:33 -0400)]
drm/msm: dpu: Add extra_flush_bits to trigger_flush trace

It's useful to know which bits of the flush come from extra_flush_bits

Reviewed-by: Abhinav Kumar <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Clear frame_busy_mask bit after trace
Sean Paul [Wed, 19 Sep 2018 18:33:48 +0000 (14:33 -0400)]
drm/msm: dpu: Clear frame_busy_mask bit after trace

We're printing the frame_busy_mask in a trace, but after it's been
cleared. This, as it turns out, is pretty pointless.

Reviewed-by: Abhinav Kumar <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Don't continue after error in atomic_check
Sean Paul [Wed, 12 Sep 2018 13:54:59 +0000 (09:54 -0400)]
drm/msm: dpu: Don't continue after error in atomic_check

There's no benefit in falling out of the if, just return directly.

Changes in v2:
- None

Reviewed-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Make dpu_plane_sspp_atomic_update() void
Sean Paul [Wed, 12 Sep 2018 13:54:58 +0000 (09:54 -0400)]
drm/msm: dpu: Make dpu_plane_sspp_atomic_update() void

All of the checks in dpu_plane_sspp_atomic_update() are impossible, so
remove them and make the function void. This removes the need to error
check in dpu_plane_atomic_update(). Additionally, remove impossible checks
in dpu_plane_atomic_update().

Changes in v2:
- None

Reviewed-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Remove dpu_plane_enabled()
Sean Paul [Wed, 12 Sep 2018 13:54:57 +0000 (09:54 -0400)]
drm/msm: dpu: Remove dpu_plane_enabled()

plane->state->visible encompasses all of these checks and more, so we
can just check visible.

Changes in v2:
- None

Reviewed-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Remove dpu_plane_sspp_enabled()
Sean Paul [Wed, 12 Sep 2018 13:54:56 +0000 (09:54 -0400)]
drm/msm: dpu: Remove dpu_plane_sspp_enabled()

It's doing the same thing dpu_plane_enabled() is.

Changes in v2:
- None

Reviewed-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Consolidate atomic_check functions()
Sean Paul [Wed, 12 Sep 2018 13:54:55 +0000 (09:54 -0400)]
drm/msm: dpu: Consolidate atomic_check functions()

dpu_plane_atomic_check() is a very thin wrapper around
dpu_plane_sspp_atomic_check(). All it does is a NULL-check of state->fb,
which is already done by drm_atomic_helper_check_plane_state(). Further,
the helper sets state->visible = false when this is true. So remove
dpu_plane_atomic_check() and just use dpu_plane_sspp_atomic_check()
directly.

Changes in v2:
- Fix spelling mistake in Subject (Jeykumar)

Reviewed-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Move atomic_check_plane_state() call to atomic_check
Sean Paul [Wed, 12 Sep 2018 13:54:54 +0000 (09:54 -0400)]
drm/msm: dpu: Move atomic_check_plane_state() call to atomic_check

src/dst rects are checked in both atomic_check and atomic_update, with
the more comprehensive check occurring in atomic_update, which is
backwards. So consolodate the checks in atomic_check.

Changes in v2:
- Use the correct crtc state (Jeykumar)

Cc: Jeykumar Sankaran <[email protected]>
Reviewed-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Remove impossible checks
Sean Paul [Wed, 12 Sep 2018 13:54:53 +0000 (09:54 -0400)]
drm/msm: dpu: Remove impossible checks

This patch removes some checks which are impossible to hit. As a result,
we can move some of the local var assignments into the declarations.

Changes in v2:
- None

Reviewed-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: Remove an unused enum
Jordan Crouse [Thu, 13 Sep 2018 16:46:15 +0000 (10:46 -0600)]
drm/msm/dpu: Remove an unused enum

enum dpu_ad isn't used and can be safely removed.

Reviewed-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Jordan Crouse <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove RM topology definition
Jeykumar Sankaran [Sat, 8 Sep 2018 00:24:27 +0000 (17:24 -0700)]
drm/msm/dpu: remove RM topology definition

RM maintained a redundant definition for display topology
to identify the no. of hw blocks needed for a display
and their hardware dependencies. This information can be
implicitly deduced from the msm_display_topology structure
available in RM reserve request. In addition to getting
rid of the redundant topology, this change also removes
the topology name enums and their usages.

changes in v4:
- remove the topology name enum entirely (Sean)
changes in v5:
- remove RM topology definition and their
  references (Sean)
- Implement helper for dual mixer CRTC (Sean)
changes in v6:
- avoid heap memory for topology (Sean)

Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: relax parameter validation in encoders
Jeykumar Sankaran [Sat, 8 Sep 2018 00:24:26 +0000 (17:24 -0700)]
drm/msm/dpu: relax parameter validation in encoders

DPU, being over protective, validates every parameter of a
module. This change traces the call stack for some of encoder
functions affected by previous set of clean up patches and
cleans up unwanted validations.

changes in v5:
- Introduced in the series
changes in v6:
- none

Signed-off-by: Jeykumar Sankaran <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove RM dependency on connector state
Jeykumar Sankaran [Sat, 8 Sep 2018 00:24:25 +0000 (17:24 -0700)]
drm/msm/dpu: remove RM dependency on connector state

Connector states were passed around RM to update the custom
topology connector property with chosen topology data. Now that
we got rid of both custom properties and topology names, this
change cleans up the mechanism to pass connector states across
RM helpers and encoder functions.

changes in v5:
- Introduced in the series
changes in v6:
- remove parameter checking in rm reserve (Jordan)

Signed-off-by: Jeykumar Sankaran <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove display H_TILE from encoder
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:25 +0000 (19:08 -0700)]
drm/msm/dpu: remove display H_TILE from encoder

Encoder H_TILE values are not used for allocating the hw blocks.
no. of hw_intf blocks provides the info.

changes in v4:
- remove irrelevant changes (Sean)
- retain log macros (Sean)
changes in v5:
- none

Signed-off-by: Jeykumar Sankaran <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove LOCK/CLEAR support in RM
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:24 +0000 (19:08 -0700)]
drm/msm/dpu: remove LOCK/CLEAR support in RM

DPU had the support to LOCK the hw resources in
atomic check and CLEAR the locked resources explicitly
through custom property values. Now that DPU is
stripped off of all the custom properties, the RM
handlers for this feature will be no-op's. This change
gets rid of all its references.

changes in v5:
- Introduced in the series.

Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove cdm block support from resource manager
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:23 +0000 (19:08 -0700)]
drm/msm/dpu: remove cdm block support from resource manager

Support for CDM block is not present in DPU. Remove CDM
handlers from resource manager.

changes in v4:
- Introduced in the series
changes in v5:
- Remove catalog references to CDM (Sean)

Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: clean up destination scaler residue
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:22 +0000 (19:08 -0700)]
drm/msm/dpu: clean up destination scaler residue

Destination scaling(DS) is a Snapdragon hardware feature to
scale up the display ROI after layer blending. DPU driver doesn't
support programming of DS blocks yet. This change cleans up the
residual code present in catalog and RM for DS block handling.
Support for the same can be added back when the feature is
formally implemented.

changes in v5:
- introduced in the series

Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: rename hw_ctl to lm_ctl
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:21 +0000 (19:08 -0700)]
drm/msm/dpu: rename hw_ctl to lm_ctl

Rename hw_ctl to lm_ctl to mean the ctl associated
with the hw layer mixer block.

sed -i 's/\([*@.>]\)hw_ctl\([^s]\)/\1lm_ctl\2/g' dpu_crtc.c dpu_crtc.h

changes in v4:
- Specifiy shell command used for renaming (Sean)
changes in v5:
- none

Signed-off-by: Jeykumar Sankaran <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: move hw resource tracking to crtc state
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:20 +0000 (19:08 -0700)]
drm/msm/dpu: move hw resource tracking to crtc state

Prep changes for state based resource management.

Moves all the hw block tracking for the crtc to the state
object.

changes in v4:
- Serialize crtc state access in debugfs handlers (Sean)
- Split the crtc width query as a separate change (Sean)
changes in v5:
- mode set lock all before crtc state access (Sean)
- remove unwanted memset for hw mixer cache (Sean)

Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: make crtc get_mixer_width helper static
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:19 +0000 (19:08 -0700)]
drm/msm/dpu: make crtc get_mixer_width helper static

Mark CRTC get_mixer_width helper API static as it is
not used outside the file.

changes in v4:
- Patch introduced in the series
changes in v5:
- Simplify the inline function (Sean)

Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: avoid querying for hw intf before assignment
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:18 +0000 (19:08 -0700)]
drm/msm/dpu: avoid querying for hw intf before assignment

Resource manager assigns hw_intf blocks for the encoder only on
modeset. If queried for hw_intf objects during init, it will be
NULL. Since hw_intf objects are needed only after encoder enable,
defer the query to encoder enable which will be triggered after
modeset.

changes in v4:
- Add details on commit text on why the change is needed (Sean)
changes in v5:
- Reword commit text on the usage of hw_intf objects (Sean)

Signed-off-by: Jeykumar Sankaran <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: iterate for assigned hw ctl in virtual encoder
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:17 +0000 (19:08 -0700)]
drm/msm/dpu: iterate for assigned hw ctl in virtual encoder

In virtual encoder modeset, DPU makes RM request to assign hw blocks
for the display. It is also expected in modeset to iterate and
associate the physical encoders with their relevant hw blocks.
Ping pong blocks are already handled here but hw ctl blocks are not.
This change moves the hw_ctl iteration and mapping from physical
encoder to virtual encoder.

changes in v4:
- Fix hw_ctl initialization (Sean)
changes in v5:
- Update commit text with details on why the change is
  needed (Sean)

Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: use kms stored hw mdp block
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:16 +0000 (19:08 -0700)]
drm/msm/dpu: use kms stored hw mdp block

Avoid querying RM for hw mdp block. Use the one
stored in KMS during initialization.

changes in v4:
- none
changes in v5:
- none

Signed-off-by: Jeykumar Sankaran <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: enable master-slave encoders explicitly
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:15 +0000 (19:08 -0700)]
drm/msm/dpu: enable master-slave encoders explicitly

Identify slave-master encoders during initialization and enable
the encoders explicitly as the current logic has redundant and
ambiguous loops.

changes in v4:
- identify master/slave encoder while adding
  adding physical encoders(Sean)
changes in v5:
- get rid of temporary variable for phys enc(Sean)

Signed-off-by: Jeykumar Sankaran <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove ping pong split topology variables
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:14 +0000 (19:08 -0700)]
drm/msm/dpu: remove ping pong split topology variables

removes left out variables of previous ping pong
split topology cleanup.

changes in v4:
- none
changes in v5:
- none

Signed-off-by: Jeykumar Sankaran <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove resource pool manager
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:13 +0000 (19:08 -0700)]
drm/msm/dpu: remove resource pool manager

resource pool manager utility was introduced to manage
rotator sessions. Removing the support as the rotator
feature doesn't exist.

changes in v4:
- none
changes in v5:
- none

Signed-off-by: Jeykumar Sankaran <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove scalar config definitions
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:12 +0000 (19:08 -0700)]
drm/msm/dpu: remove scalar config definitions

cleans up left out scalar config definitions from headers

changes in v4:
- none
changes in v5:
- none

Signed-off-by: Jeykumar Sankaran <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: squash power handle event types
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:11 +0000 (19:08 -0700)]
drm/msm/dpu: squash power handle event types

DPU power handler maintained PRE/POST versions of power
ENABLE/DISABLE events to accommodate tasks which need be
handled before/after data bus voting. But since the bus voting
API's are deprecated and removed from the driver, squash
the events and their clients respective event handlers
to handle only ENABLE/DISABLE events.

changes in v5:
- introduced in the series

Signed-off-by: Jeykumar Sankaran <[email protected]>
[seanpaul converted #defines to BIT(x) in dpu_power_handle.h]
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove debugfs support for misr
Jeykumar Sankaran [Thu, 6 Sep 2018 02:08:10 +0000 (19:08 -0700)]
drm/msm/dpu: remove debugfs support for misr

MISR support is the debug feature present in Snapdragon chipsets.
At the layer mixer and interfaces, MISR algorithm can generate CRC
signatures of the pixel data which can be used for validating
the frames generated. Since there are no clients for this feature,
strip down the support from the driver.

changes in v4:
- changed introduced in the series
changes in v5:
- update commit text with the need for the change(Sean)

Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: Remove dpu_mdss_isr when dpu_mdss_destroy is called
Jordan Crouse [Tue, 28 Aug 2018 21:23:04 +0000 (15:23 -0600)]
drm/msm/dpu: Remove dpu_mdss_isr when dpu_mdss_destroy is called

The MDSS device is created before the MSM driver attempts to bind the
sub components. If any of the components return -EPROBE_DEFER the MDSS
device is destroyed and tried again later.

If this happens the dpu_mdss_isr interrupt created from the DPU MDSS
is not freed when the MDSS device is destroyed and has a risk of
triggering later and hitting a fault by accessing a mmio region that
no longer exists. Even if the interrupt isn't triggered by
accident when the device attempts to reprobe it would error out
when it tries to re-register the interrupt so unconditionally removing
it in the destroy is the right move.

Switch the device managed dpu_mdss_isr to be unmanaged and add a
free_irq() in the mdss destroy function.

Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Jordan Crouse <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm: dpu: Allow planes to extend past active display
Sean Paul [Wed, 29 Aug 2018 17:49:47 +0000 (13:49 -0400)]
drm/msm: dpu: Allow planes to extend past active display

The atomic_check is a bit too aggressive with respect to planes which
leave the active area. This caused a bunch of log spew when the cursor
got to the edge of the screen and stopped it from going all the way.

This patch removes the conservative bounds checks from atomic and clips
the dst rect such that we properly display planes which go off the
screen.

Changes in v2:
- Apply the clip to src as well (taking into account scaling)
Changes in v3:
- Use drm_atomic_helper_check_plane_state() to clip src/dst

Cc: Sravanthi Kollukuduru <[email protected]>
Cc: Jeykumar Sankaran <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: use encoder type to identify display type
Jeykumar Sankaran [Tue, 28 Aug 2018 23:02:18 +0000 (16:02 -0700)]
drm/msm/dpu: use encoder type to identify display type

With patch [1], DPU is broken since it continues to use
incorrect connector_type to identify the display type. Update
DPU to use the encoder type to get the info.

[1] https://patchwork.kernel.org/patch/10568269/

Acked-by: Jordan Crouse <[email protected]>
Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove unwanted encoder type mapping
Jeykumar Sankaran [Tue, 28 Aug 2018 23:02:17 +0000 (16:02 -0700)]
drm/msm/dpu: remove unwanted encoder type mapping

This change gets rid of unwanted connector-encoder type
mapping used for dsi-staging driver. Now that DPU will
be using upstream DSI driver, remove the stale code.

Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
6 years agodrm/msm/dpu: remove stale display port programming
Jeykumar Sankaran [Tue, 28 Aug 2018 23:02:16 +0000 (16:02 -0700)]
drm/msm/dpu: remove stale display port programming

Remove stale display port programming. It can be
added back with DPU support for display port.

Signed-off-by: Jeykumar Sankaran <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
This page took 0.110611 seconds and 4 git commands to generate.