cascardo/linux.git
8 years agodrm/amd: add Kconfig dependency for ACP on DRM_AMDGPU
Jeff Mahoney [Tue, 24 May 2016 17:47:44 +0000 (13:47 -0400)]
drm/amd: add Kconfig dependency for ACP on DRM_AMDGPU

The DRM_AMD_ACP option doesn't have any dependencies and selects
MFD_CORE, which results in MFD_CORE=y.  Since the code is only called
from DRM_AMDGPU, it should depend on it.  Adding the dependency results
in MFD_CORE being selected as a module again if amdgpu is also a module.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Fix hdmi deep color support.
Mario Kleiner [Tue, 24 May 2016 16:12:43 +0000 (18:12 +0200)]
drm/amdgpu: Fix hdmi deep color support.

When porting the hdmi deep color detection code from
radeon-kms to amdgpu-kms apparently some kind of
copy and paste error happened, attaching an else
branch to the wrong if statement.

The result is that hdmi deep color mode is always
disabled, regardless of gpu and display capabilities and
user wishes, as the code mistakenly thinks that the display
doesn't provide the required max_tmds_clock limit and falls
back to 8 bpc.

This patch fixes deep color support, as tested on a
R9 380 Tonga Pro + suitable display, and should be
backported to all kernels with amdgpu-kms support.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: stable@vger.kernel.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: fix bug in fence driver fini
Monk Liu [Wed, 18 May 2016 08:15:47 +0000 (16:15 +0800)]
drm/amdgpu: fix bug in fence driver fini

Using wrong counter for walking fences.  Fixes
a crash when unloading the driver.

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay/hwmgr: use kmemdup
Muhammad Falak R Wani [Thu, 19 May 2016 11:15:28 +0000 (16:45 +0530)]
drm/amd/powerplay/hwmgr: use kmemdup

Use kmemdup when some other buffer is immediately copied into allocated
region. It replaces call to allocation followed by memcpy, by a single
call to kmemdup.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay/hwmgr: use kmemdup
Muhammad Falak R Wani [Thu, 19 May 2016 11:15:29 +0000 (16:45 +0530)]
drm/amd/powerplay/hwmgr: use kmemdup

Use kmemdup when some other buffer is immediately copied into allocated
region. It replaces call to allocation followed by memcpy, by a single
call to kmemdup.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay/hwmgr: use kmemdup
Muhammad Falak R Wani [Thu, 19 May 2016 11:15:27 +0000 (16:45 +0530)]
drm/amd/powerplay/hwmgr: use kmemdup

Use kmemdup when some other buffer is immediately copied into allocated
region. It replaces call to allocation followed by memcpy, by a single
call to kmemdup.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: fix bugs of checking if dpm is running on Tonga
Eric Huang [Fri, 13 May 2016 21:07:59 +0000 (17:07 -0400)]
drm/amd/powerplay: fix bugs of checking if dpm is running on Tonga

Fixes OD failures on Tonga.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: update Polaris11 golden setting
Flora Cui [Tue, 17 May 2016 01:52:22 +0000 (09:52 +0800)]
drm/amdgpu: update Polaris11 golden setting

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Add more Polaris 11 PCI IDs
Flora Cui [Tue, 17 May 2016 01:52:02 +0000 (09:52 +0800)]
drm/amdgpu: Add more Polaris 11 PCI IDs

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: update Polaris10 golden setting
Flora Cui [Mon, 16 May 2016 09:18:17 +0000 (17:18 +0800)]
drm/amdgpu: update Polaris10 golden setting

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add more Polaris10 DID
Flora Cui [Mon, 16 May 2016 09:17:41 +0000 (17:17 +0800)]
drm/amdgpu: add more Polaris10 DID

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu : Remove unused variable
Muhammad Falak R Wani [Tue, 17 May 2016 09:42:47 +0000 (15:12 +0530)]
drm/amd/amdgpu : Remove unused variable

Remove unused variable 'ret', and directly return 0.

Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu : Remove unused variable
Muhammad Falak R Wani [Tue, 17 May 2016 09:42:46 +0000 (15:12 +0530)]
drm/amd/amdgpu : Remove unused variable

Remove unused variable 'ret', and directly return 0.

Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu : Remove unused variable
Muhammad Falak R Wani [Tue, 17 May 2016 09:42:45 +0000 (15:12 +0530)]
drm/amd/amdgpu : Remove unused variable

Remove unused variable 'ret', and directly return 0.

Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu/cz_dpm: Remove unused variable
Muhammad Falak R Wani [Tue, 17 May 2016 09:42:44 +0000 (15:12 +0530)]
drm/amd/amdgpu/cz_dpm: Remove unused variable

Remove unused variable 'ret' from functions where it
was not used anyway, and directly return 0.

Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu : Remove unused variable
Muhammad Falak R Wani [Tue, 17 May 2016 09:42:43 +0000 (15:12 +0530)]
drm/amd/amdgpu : Remove unused variable

Remove unused variable 'ret', and directly return 0.

Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: use ARRAY_SIZE() to calculate array size.
Muhammad Falak R Wani [Fri, 13 May 2016 17:36:40 +0000 (23:06 +0530)]
drm/amd/powerplay: use ARRAY_SIZE() to calculate array size.

It is preferred to use ARRAY_SIZE() for size calculation, instead
using sizeof(array)/sizeof(*array). It makes the code more readable.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: fix array out of bounds
tom will [Mon, 16 May 2016 14:31:07 +0000 (10:31 -0400)]
drm/amdgpu: fix array out of bounds

When the initial value of i is greater than zero,
it may cause endless loop, resulting in array out
of bounds, fix it.

This is a port of the radeon fix to amdgpu.

Signed-off-by: tom will <os@iscas.ac.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/radeon: fix array out of bounds
tom will [Mon, 16 May 2016 04:58:11 +0000 (21:58 -0700)]
drm/radeon: fix array out of bounds

When the initial value of i is greater than zero,
it may cause endless loop, resulting in array out
of bounds, fix it.

Signed-off-by: tom will <os@iscas.ac.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: fix a bug on updating sclk for Tonga
Eric Huang [Thu, 12 May 2016 18:41:04 +0000 (14:41 -0400)]
drm/amd/powerplay: fix a bug on updating sclk for Tonga

Update sclk smc table rather than mclk smc table for sclk updates.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: fix a bug on updating sclk for Fiji
Eric Huang [Tue, 10 May 2016 18:39:09 +0000 (14:39 -0400)]
drm/amd/powerplay: fix a bug on updating sclk for Fiji

Update sclk smc table rather than mclk smc table for sclk updates.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: create fence slab once when amdgpu module init.
Rex Zhu [Thu, 12 May 2016 05:27:28 +0000 (13:27 +0800)]
drm/amdgpu: create fence slab once when amdgpu module init.

This avoids problems with multiple GPUs.  For example,
if the first GPU failed before amdgpu_fence_init() was
called, amdgpu_fence_slab_ref is still 0 and it will
get decremented in amdgpu_fence_driver_fini().  This
will lead to a crash during init of the second GPU since
amdgpu_fence_slab_ref is not 0.

v2: add functions for init/exit instead of
    moving the variables into the driver.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: move asic unrelated function to hwmgr.c.
Rex Zhu [Tue, 10 May 2016 07:37:00 +0000 (15:37 +0800)]
drm/amd/powerplay: move asic unrelated function to hwmgr.c.

It's generic and used by multiple asics.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: fix NULL point check error
Rex Zhu [Tue, 10 May 2016 05:39:29 +0000 (13:39 +0800)]
drm/amd/powerplay: fix NULL point check error

&& was used instead of ||

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: SCLK will have a big drop with low VDDC when PPlib was enabled.
Rex Zhu [Tue, 3 May 2016 07:47:15 +0000 (15:47 +0800)]
drm/amd/powerplay: SCLK will have a big drop with low VDDC when PPlib was enabled.

SMC uses CurrSclkPllRange structure to keep track of what range of
PLL SCLK is sitting on.  Driver overwrites this value to 0 because
it's part of DPM table and driver doesn't program this.
This change will set this field to 0xFF every time there's a
init SMC table call.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Encapsulate some VM table update parameters (v2)
Harish Kasiviswanathan [Thu, 21 Apr 2016 14:40:18 +0000 (10:40 -0400)]
drm/amdgpu: Encapsulate some VM table update parameters (v2)

Bundle some VM table parameters into amdgpu_vm_update_params structure,
so that number of function parameters can be reduced. Only structural
change, no logic change.

v2: agd: squash in fix from Harish

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: fix TC cache flushing
Marek Olšák [Thu, 28 Apr 2016 12:32:44 +0000 (14:32 +0200)]
drm/amdgpu: fix TC cache flushing

TC_WB_ACTION must be set according to the docs

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: rewrite pp_sw_init to make code readable
Huang Rui [Mon, 9 May 2016 09:29:41 +0000 (17:29 +0800)]
drm/amd/powerplay: rewrite pp_sw_init to make code readable

Actually, pp_sw_init executes pptable_init and backend_init orderly if
they are initialized successfully. So rewrite it to make code more
readable.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu/dce11: fix audio offset for asics with >7 audio pins
Alex Deucher [Tue, 10 May 2016 13:29:56 +0000 (09:29 -0400)]
drm/amdgpu/dce11: fix audio offset for asics with >7 audio pins

Missing offset in the audio offset array.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: fix and cleanup user fence handling v2
Christian König [Fri, 6 May 2016 20:14:00 +0000 (22:14 +0200)]
drm/amdgpu: fix and cleanup user fence handling v2

We leaked the BO in the error pass, additional to that we only have
one user fence for all IBs in a job.

v2: remove white space changes

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: move VM fields into job
Christian König [Fri, 6 May 2016 15:50:03 +0000 (17:50 +0200)]
drm/amdgpu: move VM fields into job

They are the same for all IBs.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: move the context from the IBs into the job
Christian König [Fri, 6 May 2016 13:57:42 +0000 (15:57 +0200)]
drm/amdgpu: move the context from the IBs into the job

We only have one context for all IBs.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: move context switch handling into common code v2
Christian König [Fri, 6 May 2016 13:31:19 +0000 (15:31 +0200)]
drm/amdgpu: move context switch handling into common code v2

It was a source of bugs to repeat that in each IP version.

v2: rename parameter

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: move preamble IB handling into common code
Christian König [Fri, 6 May 2016 12:52:57 +0000 (14:52 +0200)]
drm/amdgpu: move preamble IB handling into common code

This fixes the handling which was completely broken when you
ad more than one preamble IB.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu/gfx7: fix pipeline sync
Chunming Zhou [Mon, 9 May 2016 09:29:39 +0000 (17:29 +0800)]
drm/amdgpu/gfx7: fix pipeline sync

Need to wait on the fence as well.

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoamdgpu/uvd: separate context buffer from DPB
Sonny Jiang [Wed, 11 May 2016 17:29:48 +0000 (13:29 -0400)]
amdgpu/uvd: separate context buffer from DPB

Updated to handle latest UVD ucode.

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: use fence_context to judge ctx switch v2
Christian König [Tue, 3 May 2016 13:17:40 +0000 (15:17 +0200)]
drm/amdgpu: use fence_context to judge ctx switch v2

Use of the ctx pointer is not safe, because they are likely already
be assigned to another ctx when doing comparing.

v2: recreate from scratch, avoid all unnecessary changes.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Monk.Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu: Added more named DRM info messages for debugging
Tom St Denis [Thu, 5 May 2016 14:23:40 +0000 (10:23 -0400)]
drm/amd/amdgpu:  Added more named DRM info messages for debugging

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/amdgpu: Add name field to amd_ip_funcs (v2)
Tom St Denis [Wed, 4 May 2016 18:28:35 +0000 (14:28 -0400)]
drm/amd/amdgpu: Add name field to amd_ip_funcs (v2)

Add name that we can print out in kernel messages
to aid in debugging.

v2: drop DAL changes for upstream

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Support DRM_MODE_PAGE_FLIP_ASYNC (v2)
Alex Deucher [Thu, 5 May 2016 20:03:57 +0000 (16:03 -0400)]
drm/amdgpu: Support DRM_MODE_PAGE_FLIP_ASYNC (v2)

When this flag is set, we program the hardware to execute the flip
during horizontal blank (i.e. for the next scanline) instead of during
vertical blank (i.e. for the next frame).

Ported from radeon commit:
drm/radeon: Support DRM_MODE_PAGE_FLIP_ASYNC

v2: drop DAL change for upstream

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu/dce11: don't share PLLs on Polaris
Alex Deucher [Thu, 5 May 2016 15:17:22 +0000 (11:17 -0400)]
drm/amdgpu/dce11: don't share PLLs on Polaris

They are part of the phy so you can't share them.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Drop unused parameter for *get_sleep_divider_id_from_clock
Nils Wallménius [Thu, 5 May 2016 07:07:48 +0000 (09:07 +0200)]
drm/amdgpu: Drop unused parameter for *get_sleep_divider_id_from_clock

Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Simplify calculation in *get_sleep_divider_id_from_clock
Nils Wallménius [Thu, 5 May 2016 07:07:47 +0000 (09:07 +0200)]
drm/amdgpu: Simplify calculation in *get_sleep_divider_id_from_clock

a / (1 << b) is equivalent to a >> b for unsigned values

Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Use max macro in *get_sleep_divider_id_from_clock
Nils Wallménius [Thu, 5 May 2016 07:07:46 +0000 (09:07 +0200)]
drm/amdgpu: Use max macro in *get_sleep_divider_id_from_clock

Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd/powerplay: Use defined constants for minium engine clock
Nils Wallménius [Thu, 5 May 2016 07:07:45 +0000 (09:07 +0200)]
drm/amd/powerplay: Use defined constants for minium engine clock

Replacing magic numbers in calculation of sleep divider id for fiji
and polaris.

Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add missing licenses on a couple of files
Alex Deucher [Thu, 5 May 2016 13:04:38 +0000 (09:04 -0400)]
drm/amdgpu: add missing licenses on a couple of files

Noticed by n1s on IRC.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: fetch cu_info once at init
Alex Deucher [Tue, 3 May 2016 20:25:53 +0000 (16:25 -0400)]
drm/amdgpu: fetch cu_info once at init

Fetch this info once at init and just store the results
for future requests.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd: cleanup remaining spaces and tabs v2
Christian König [Tue, 3 May 2016 13:54:54 +0000 (15:54 +0200)]
drm/amd: cleanup remaining spaces and tabs v2

This is the result of running the following commands:
find drivers/gpu/drm/amd/ -name "*.h" -exec sed -i 's/[ \t]\+$//' {} \;
find drivers/gpu/drm/amd/ -name "*.c" -exec sed -i 's/[ \t]\+$//' {} \;
find drivers/gpu/drm/amd/ -name "*.h" -exec sed -i 's/ \+\t/\t/' {} \;
find drivers/gpu/drm/amd/ -name "*.c" -exec sed -i 's/ \+\t/\t/' {} \;

v2: drop changes to DAL and internal headers

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: remove define for reserved client ID
Christian König [Wed, 4 May 2016 08:34:03 +0000 (10:34 +0200)]
drm/amdgpu: remove define for reserved client ID

Just set it to zero instead.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: remove owner cleanup v2
Christian König [Wed, 4 May 2016 08:33:11 +0000 (10:33 +0200)]
drm/amdgpu: remove owner cleanup v2

The client ID is now unique, so no need to resert the owner fields any more.

v2: remove unused variables as well

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: make the VMID owner always 64bit
Christian König [Wed, 4 May 2016 08:20:01 +0000 (10:20 +0200)]
drm/amdgpu: make the VMID owner always 64bit

Otherwise we could (in theory) run into problems on 32bit systems.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: two minor 80 char fixes
Christian König [Tue, 3 May 2016 16:46:19 +0000 (18:46 +0200)]
drm/amdgpu: two minor 80 char fixes

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: hdp flush&inval should always do
Monk Liu [Wed, 4 May 2016 08:27:41 +0000 (16:27 +0800)]
drm/amdgpu: hdp flush&inval should always do

This fixes Tonga vm-fault issue when running disaster
(a multiple context GL heavy tests),
We should always flush & invalidate hdp no matter vm
used or not.

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <David1.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
8 years agodrm/amd/amdgpu: Enable CG for UVD6 on Carrizo
Tom St Denis [Tue, 3 May 2016 14:36:28 +0000 (10:36 -0400)]
drm/amd/amdgpu:  Enable CG for UVD6 on Carrizo

Tested via vdpau/mpv.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add pipeline sync for compute job
Chunming Zhou [Wed, 27 Apr 2016 10:07:41 +0000 (18:07 +0800)]
drm/amdgpu: add pipeline sync for compute job

hardware ring is async processed, the job is executed in parallel.
In some case, this will result vm fault, like jobs with different vmids.

This works around a CPC hw issue which will eventually be fixed in fw.

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: keep vm in job instead of ib (v2)
Monk Liu [Tue, 19 Apr 2016 12:11:32 +0000 (20:11 +0800)]
drm/amdgpu: keep vm in job instead of ib (v2)

ib.vm is a legacy way to get vm, after scheduler
implemented vm should be get from job, and all ibs
from one job share the same vm, no need to keep ib.vm
just move vm field to job.

this patch as well add job as paramter to ib_schedule
so it can get vm from job->vm.

v2: agd: sqaush in:
drm/amdgpu: check if ring emit_vm_flush exists in vm flush

No vm flush on engines that don't support VM.

bug:
https://bugs.freedesktop.org/show_bug.cgi?id=95195

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: make vmid owner be client_id
Chunming Zhou [Mon, 25 Apr 2016 02:23:34 +0000 (10:23 +0800)]
drm/amdgpu: make vmid owner be client_id

Using the pointer is not adequate.

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add client id for every vm
Chunming Zhou [Mon, 25 Apr 2016 02:19:13 +0000 (10:19 +0800)]
drm/amdgpu: add client id for every vm

This adds a unique id for each vm client so we can
properly track them.

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: fix wrong release of vmid owner
Chunming Zhou [Mon, 25 Apr 2016 02:28:24 +0000 (10:28 +0800)]
drm/amdgpu: fix wrong release of vmid owner

The release of the vmid owner was not handled
correctly.  We need to take the lock and walk
the lru list.

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoMerge tag 'mediatek-drm-2016-05-09' of git://git.pengutronix.de/git/pza/linux into...
Dave Airlie [Tue, 10 May 2016 05:01:47 +0000 (15:01 +1000)]
Merge tag 'mediatek-drm-2016-05-09' of git://git.pengutronix.de/git/pza/linux into drm-next

MT8173 DRM support

- device tree binding documentation for all MT8173 display
  subsystem components
- basic mediatek-drm driver for MT8173 with two optional,
  currently fixed output paths:
- DSI encoder support for DSI and (via bridge) eDP panels
- DPI encoder support for output to HDMI bridge
- necessary clock tree changes for the DPI->HDMI path
- export mtk-smi functions used by mediatek-drm

* tag 'mediatek-drm-2016-05-09' of git://git.pengutronix.de/git/pza/linux:
  clk: mediatek: remove hdmitx_dig_cts from TOP clocks
  clk: mediatek: Add hdmi_ref HDMI PHY PLL reference clock output
  clk: mediatek: make dpi0_sel propagate rate changes
  drm/mediatek: Add DPI sub driver
  drm/mediatek: Add DSI sub driver
  drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.
  dt-bindings: drm/mediatek: Add Mediatek display subsystem dts binding
  memory: mtk-smi: export mtk_smi_larb_get/put

8 years agoMerge tag 'v4.6-rc7' into drm-next
Dave Airlie [Mon, 9 May 2016 03:49:56 +0000 (13:49 +1000)]
Merge tag 'v4.6-rc7' into drm-next

Merge this back as we've built up a fair few conflicts, and I have
some newer trees to pull in.

8 years agodrm/amdgpu: fix build on aarch64.
Dave Airlie [Mon, 9 May 2016 00:30:42 +0000 (10:30 +1000)]
drm/amdgpu: fix build on aarch64.

Same fix went in previously for some other files.

Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoMerge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm...
Dave Airlie [Mon, 9 May 2016 00:19:38 +0000 (10:19 +1000)]
Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next

Mostly cleanups, fixes, and 'struct fence' conversion this time
around, with one reservation patch which is a-b Sumit (which the fence
conversion patches depend on).

* 'msm-next' of git://people.freedesktop.org/~robclark/linux: (25 commits)
  drm/msm: Drop load/unload drm_driver ops
  drm/msm: Centralize connector registration/unregistration
  drm/msm/hdmi: Prevent gpio_free related kernel warnings
  drm/msm: print offender task name on hangcheck recovery
  drm/msm: fix leak in failed submit path
  drm/msm: de-indent submit_create()
  drm/msm: drop return from gpu->submit()
  drm/msm/mdp4: Don't manage DSI PLL regulators in MDP driver
  drm/msm/edp: Drop regulator_set_voltage call
  drm/msm/dsi: Fix regulator API abuse
  drm/msm: Move call to PTR_ERR_OR_ZERO after reassignment
  drm/msm/mdp: Add support for more RGBX formats
  drm: msm: remove unused variable
  drm/msm: fix ->last_fence() after recover
  drm/msm: 'struct fence' conversion
  drm/msm: remove fence_cbs
  drm/msm: introduce msm_fence_context
  drm/msm: split locking and pinning BO's
  drm/msm/gpu: simplify tracking in-flight bo's
  drm/msm: split out timeout_to_jiffies helper
  ...

8 years agoMerge tag 'topic/drm-misc-2016-05-08' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Mon, 9 May 2016 00:16:50 +0000 (10:16 +1000)]
Merge tag 'topic/drm-misc-2016-05-08' of git://anongit.freedesktop.org/drm-intel into drm-next

Refcounting is hard, so here's a quick pull request with the one-liner to
fix up i915. Otherwise just a few other small things I picked up. Plus the
regression fix from Marten for rmfb behaviour that lingered around forever
since no testers. Feel free to cherry-pick that over to drm-fixes, but
given that there's not many who seemed to have cared, meh.

* tag 'topic/drm-misc-2016-05-08' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Correctly refcount connectors in hw state readou
  drm/panel: Flesh out kerneldoc
  drm: Add gpu.tmpl docbook to MAINTAINERS entry
  drm/core: Do not preserve framebuffer on rmfb, v4.
  drm: Fix up markup fumble
  drm/fb_helper: Fix a few typos

8 years agoLinux 4.6-rc7 v4.6-rc7
Linus Torvalds [Sun, 8 May 2016 21:38:32 +0000 (14:38 -0700)]
Linux 4.6-rc7

8 years agodrm/msm: Drop load/unload drm_driver ops
Archit Taneja [Mon, 2 May 2016 05:35:54 +0000 (11:05 +0530)]
drm/msm: Drop load/unload drm_driver ops

The load/unload drm_driver ops are deprecated. They should be removed as
they result in creation of devices visible to userspace even before
the drm_device is registered.

Drop these ops and use drm_dev_alloc/register and drm_dev_unregister/unref
to explicitly create and destroy the drm device in the msm platform
driver's bind and unbind ops. With this in use, the drm connectors are
only registered once the drm_device is registered.

It also fixes the issue of stray debugfs files after the msm module is
removed. With this, all the debugfs files are removed, and allows
successive module insertions/removals.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
8 years agodrm/msm: Centralize connector registration/unregistration
Archit Taneja [Mon, 2 May 2016 05:35:53 +0000 (11:05 +0530)]
drm/msm: Centralize connector registration/unregistration

Move the drm_connector registration from the encoder(HDMI/DSI etc) drivers
to the msm platform driver. This will simplify the task of ensuring that
the connectors are registered only after the drm_device itself is
registered.

The connectors' destroy ops are made to use kzalloc instead of
devm_kzalloc to ensure that that the connectors can be successfully
unregistered when the msm driver module is removed. The memory for the
connectors is unallocated when drm_mode_config_cleanup() is called
during either during an error or during driver remove.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/hdmi: Prevent gpio_free related kernel warnings
Archit Taneja [Mon, 2 May 2016 05:35:52 +0000 (11:05 +0530)]
drm/msm/hdmi: Prevent gpio_free related kernel warnings

Calling the legacy gpio_free on an invalid GPIO (a GPIO numbered -1)
results in kernel warnings. This causes a lot of backtraces when
we try to unload the drm/msm module.

Call gpio_free only on valid GPIOs.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: print offender task name on hangcheck recovery
Rob Clark [Tue, 3 May 2016 14:10:15 +0000 (10:10 -0400)]
drm/msm: print offender task name on hangcheck recovery

Track the pid per submit, so we can print the name of the task which
submitted the batch that caused the gpu to hang.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: fix leak in failed submit path
Rob Clark [Tue, 3 May 2016 13:50:26 +0000 (09:50 -0400)]
drm/msm: fix leak in failed submit path

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: de-indent submit_create()
Rob Clark [Tue, 3 May 2016 13:49:40 +0000 (09:49 -0400)]
drm/msm: de-indent submit_create()

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: drop return from gpu->submit()
Rob Clark [Tue, 3 May 2016 13:46:49 +0000 (09:46 -0400)]
drm/msm: drop return from gpu->submit()

At this point, there is nothing left to fail.  And submit already has a
fence assigned and is added to the submit_list.  Any problems from here
on out are asynchronous (ie. hangcheck/recovery).

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/mdp4: Don't manage DSI PLL regulators in MDP driver
Archit Taneja [Fri, 29 Apr 2016 09:49:37 +0000 (15:19 +0530)]
drm/msm/mdp4: Don't manage DSI PLL regulators in MDP driver

The MDP4 driver tries to request and set voltages for regulators required
by the DSI PLLs.

Firstly, the MDP4 driver shouldn't manage the DSI regulators, this should
be handled in the DSI driver. Secondly, it shouldn't try to set a fixed
voltage for regulators. Voltage constraints should be specified on the
regulator via DT and managed by the regulator core.

Remove all the DSI PLL regulator related code from the MDP4 driver. It's
managed in the DSI driver for MSM8960/APQ8064 already.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/edp: Drop regulator_set_voltage call
Archit Taneja [Fri, 29 Apr 2016 09:49:36 +0000 (15:19 +0530)]
drm/msm/edp: Drop regulator_set_voltage call

The eDP driver tries to set a fixed voltage for one of its regulators(vdda)
before enabling it. This shouldn't be done by the driver, the voltage
constraints should be specified on the regulator via DT and managed by
the regulator core. A driver should call regulator_set_voltage only if
it needs to change the voltage during runtime. Drop the
regulator_set_voltage call. Mention in a comment the voltage that the
regulator expects.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/dsi: Fix regulator API abuse
Archit Taneja [Fri, 29 Apr 2016 09:49:35 +0000 (15:19 +0530)]
drm/msm/dsi: Fix regulator API abuse

The voltage changing code in this driver is broken and should be
removed.  The driver sets a single, exact voltage on probe.  Unless
there is a very good reason for this (which should be documented in
comments) constraints like this need to be set via the machine
constraints, voltage setting in a driver is expected to be used in cases
where the voltage varies at runtime.

In addition client drivers should almost never be calling
regulator_can_set_voltage(), if the device needs to set a voltage it
needs to set the voltage and the regulator core will handle the case
where the regulator is fixed voltage.  If the driver simply skips
setting the voltage if it doesn't have permission then it should just
not bother in the first place.

Originally authored by Mark Brown <broonie@kernel.org>

Remove the min/max voltage data entries per SoC managed by the driver.
These aren't needed as we don't try to set voltages any more. Mention in
comments the voltages that each regulator expects.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: Move call to PTR_ERR_OR_ZERO after reassignment
Vaishali Thakkar [Thu, 28 Apr 2016 13:22:49 +0000 (18:52 +0530)]
drm/msm: Move call to PTR_ERR_OR_ZERO after reassignment

Here, a location is reset to NULL before being passed to PTR_ERR.
So, PTR_ERR should be called before its argument is reassigned
to NULL. Further to simplify things use PTR_ERR_OR_ZERO instead
of PTR_ERR and IS_ERR.

Problem found using Coccinelle.

Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[fixed fmt string warning (s/%ld/%d/)]
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/mdp: Add support for more RGBX formats
Rob Herring [Mon, 11 Apr 2016 23:23:51 +0000 (18:23 -0500)]
drm/msm/mdp: Add support for more RGBX formats

Android needs XBGR8888 format. Add all the missing 32-bpp formats
without alpha for completeness.

Cc: Archit Taneja <architt@codeaurora.org>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm: msm: remove unused variable
Arnd Bergmann [Sat, 16 Apr 2016 20:41:46 +0000 (22:41 +0200)]
drm: msm: remove unused variable

A recent cleanup removed the only user of the 'kms' variable in
msm_preclose(), causing a harmless compiler warning:

drivers/gpu/drm/msm/msm_drv.c: In function 'msm_preclose':
drivers/gpu/drm/msm/msm_drv.c:468:18: error: unused variable 'kms' [-Werror=unused-variable]

This removes the variable as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 4016260ba47a ("drm/msm: fix bug after preclose removal")
Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: fix ->last_fence() after recover
Rob Clark [Thu, 17 Mar 2016 14:18:38 +0000 (10:18 -0400)]
drm/msm: fix ->last_fence() after recover

It is no longer true that we discard all in-flight submits on recover
(these days we only discard the first one that hung).  After the first
re-submitted batch completes it would overwrite the fence with a correct
value, but there would be a window of time which showed all re-submitted
batches as already complete.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: 'struct fence' conversion
Rob Clark [Tue, 15 Mar 2016 22:26:28 +0000 (18:26 -0400)]
drm/msm: 'struct fence' conversion

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: remove fence_cbs
Rob Clark [Wed, 16 Mar 2016 22:18:17 +0000 (18:18 -0400)]
drm/msm: remove fence_cbs

This was only used for atomic commit these days.  So instead just give
atomic it's own work-queue where we can do a block on each bo in turn.
Simplifies things a whole bunch and makes the 'struct fence' conversion
easier.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: introduce msm_fence_context
Rob Clark [Tue, 15 Mar 2016 21:22:13 +0000 (17:22 -0400)]
drm/msm: introduce msm_fence_context

Better encapsulate the per-timeline stuff into fence-context.  For now
there is just a single fence-context, but eventually we'll also have one
per-CRTC to enable fully explicit fencing.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: split locking and pinning BO's
Rob Clark [Mon, 14 Mar 2016 17:56:37 +0000 (13:56 -0400)]
drm/msm: split locking and pinning BO's

Split up locking and pinning buffers in the submit path.  This is needed
because we'll want to insert fencing in between the two steps.

This makes things end up looking more similar to etnaviv submit code
(which was originally modelled on the msm code but has already added
'struct fence' support).

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm/gpu: simplify tracking in-flight bo's
Rob Clark [Wed, 16 Mar 2016 20:07:38 +0000 (16:07 -0400)]
drm/msm/gpu: simplify tracking in-flight bo's

Since we already track the array of bo's in the submit object, just
unconditionally take and drop ref's per submit (rather than only taking
ref's if bo is not already active).  This simplifies later patches.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: split out timeout_to_jiffies helper
Rob Clark [Wed, 16 Mar 2016 18:57:22 +0000 (14:57 -0400)]
drm/msm: split out timeout_to_jiffies helper

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: use imported dmabuf's reservation object
Rob Clark [Wed, 16 Mar 2016 16:40:35 +0000 (12:40 -0400)]
drm/msm: use imported dmabuf's reservation object

This was always the intention, but somehow it was never wired up
properly.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: move fence code to it's own file
Rob Clark [Tue, 15 Mar 2016 19:35:08 +0000 (15:35 -0400)]
drm/msm: move fence code to it's own file

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agodrm/msm: move debugfs code to it's own file
Rob Clark [Wed, 16 Mar 2016 16:56:12 +0000 (12:56 -0400)]
drm/msm: move debugfs code to it's own file

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agoreservation: add reservation_object_get_excl_rcu()
Rob Clark [Thu, 31 Mar 2016 20:23:51 +0000 (16:23 -0400)]
reservation: add reservation_object_get_excl_rcu()

In the atomic modesetting path, each driver simply wants to grab a ref
to the exclusive fence from a reservation object to store in the incoming
drm_plane_state, without doing the whole RCU dance.  Since each driver
will need to do this, lets make a helper.

v2: rename to _rcu instead of _unlocked to be more consistent

Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
8 years agodrm/msm: make HDCP support optional
Rob Clark [Sun, 20 Mar 2016 14:16:29 +0000 (10:16 -0400)]
drm/msm: make HDCP support optional

It is already optional at runtime.  But this at least simplifies
backports to kernels without QCOM_SCM.

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agoMerge tag 'char-misc-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 7 May 2016 17:53:32 +0000 (10:53 -0700)]
Merge tag 'char-misc-4.6-rc7' of git://git./linux/kernel/git/gregkh/char-misc

Pull misc driver fixes from Gfreg KH:
 "Here are three small fixes for some driver problems that were
  reported.  Full details in the shortlog below.

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  nvmem: mxs-ocotp: fix buffer overflow in read
  Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()
  misc: mic: Fix for double fetch security bug in VOP driver

8 years agoMerge tag 'staging-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 7 May 2016 17:50:48 +0000 (10:50 -0700)]
Merge tag 'staging-4.6-rc7' of git://git./linux/kernel/git/gregkh/staging

Pull IIO driver fixes from Grek KH:
 "It's really just IIO drivers here, some small fixes that resolve some
  'crash on boot' errors that have shown up in the -rc series, and other
  bugfixes that are required.

  All have been in linux-next with no reported problems"

* tag 'staging-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  iio: imu: mpu6050: Fix name/chip_id when using ACPI
  iio: imu: mpu6050: fix possible NULL dereferences
  iio:adc:at91-sama5d2: Repair crash on module removal
  iio: ak8975: fix maybe-uninitialized warning
  iio: ak8975: Fix NULL pointer exception on early interrupt

8 years agoMerge tag 'usb-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 7 May 2016 17:47:03 +0000 (10:47 -0700)]
Merge tag 'usb-4.6-rc7' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some last-remaining fixes for USB drivers to resolve issues
  that have shown up in testing.  And two new device ids as well.

  All of these have been in linux-next with no reported issues"

* tag 'usb-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping"
  usb: musb: jz4740: fix error check of usb_get_phy()
  Revert "usb: musb: musb_host: Enable HCD_BH flag to handle urb return in bottom half"
  usb: musb: gadget: nuke endpoint before setting its descriptor to NULL
  USB: serial: cp210x: add Straizona Focusers device ids
  USB: serial: cp210x: add ID for Link ECU

8 years agoMerge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm
Linus Torvalds [Sat, 7 May 2016 15:27:35 +0000 (08:27 -0700)]
Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
 "These are a number of updates to fix a few problems found in the ARM
  nommu code over the last couple of years, caused mostly by changes on
  the mmu side"

* 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 8573/1: domain: move {set,get}_domain under config guard
  ARM: 8572/1: nommu: change memory reserve for the vectors
  ARM: 8571/1: nommu: fix PMSAv7 setup

8 years agoMerge tag 'media/v4.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sat, 7 May 2016 15:17:45 +0000 (08:17 -0700)]
Merge tag 'media/v4.6-5' of git://git./linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

  - deadlock fixes on driver probe at exynos4-is and s43-camif drivers

  - a build breakage if media controller is enabled and USB or PCI is
   built as module.

* tag 'media/v4.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] media-device: fix builds when USB or PCI is compiled as module
  [media] media: s3c-camif: fix deadlock on driver probe()
  [media] media: exynos4-is: fix deadlock on driver probe

8 years agoMerge branch 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Sat, 7 May 2016 15:13:42 +0000 (08:13 -0700)]
Merge branch 'for-4.6-fixes' of git://git./linux/kernel/git/tj/libata

Pull libata fixes from Tejun Heo:
 "An ahci driver addition and updates to ahci port enable handling for
  some platform devices"

* 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  ata: add AMD Seattle platform driver
  ARM: dts: apq8064: add ahci ports-implemented mask
  ata: ahci-platform: Add ports-implemented DT bindings.
  libahci: save port map for forced port map

8 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
Linus Torvalds [Sat, 7 May 2016 15:10:08 +0000 (08:10 -0700)]
Merge tag 'for-linus' of git://git./linux/kernel/git/dledford/rdma

Pull rdma fix from Doug Ledford:
 "Fix for max sector calculation in iSER"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
  IB/iser: Fix max_sectors calculation

8 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 6 May 2016 20:08:35 +0000 (13:08 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull writeback fix from Jens Axboe:
 "Just a single fix for domain aware writeback, fixing a regression that
  can cause balance_dirty_pages() to keep looping while not getting any
  work done"

* 'for-linus' of git://git.kernel.dk/linux-block:
  writeback: Fix performance regression in wb_over_bg_thresh()

8 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 6 May 2016 19:59:27 +0000 (12:59 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "This contains two fixes: a boot fix for older SGI/UV systems, and an
  APIC calibration fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO
  x86/platform/UV: Bring back the call to map_low_mmrs in uv_system_init

8 years agoMerge tag 'pm+acpi-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 6 May 2016 18:58:45 +0000 (11:58 -0700)]
Merge tag 'pm+acpi-4.6-rc7' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management and ACPI fixes from Rafael Wysocki:
 "Fixes for problems introduced or discovered recently (intel_pstate,
  sti-cpufreq, ARM64 cpuidle, Operating Performance Points framework,
  generic device properties framework) and one fix for a hotplug-related
  deadlock in ACPICA that's been there forever, but is nasty enough.

  Specifics:

   - Fix for a recent regression in the intel_pstate driver causing it
     to fail to restore the HWP (HW-managed P-states) configuration of
     the boot CPU after suspend-to-RAM (Rafael Wysocki).

   - Fix for two recent regressions in the intel_pstate driver, one that
     can trigger a divide by zero if the driver is accessed via sysfs
     before it manages to take the first sample and one causing it to
     fail to update a structure field used in a trace point, so the
     information coming from it is less useful (Rafael Wysocki).

   - Fix for a problem in the sti-cpufreq driver introduced during the
     4.5 cycle that causes it to break CPU PM in multi-platform kernels
     by registering cpufreq-dt (which subsequently doesn't work)
     unconditionally and preventing the driver that would actually work
     from registering (Sudeep Holla).

   - Stable-candidate fix for an ARM64 cpuidle issue causing idle state
     usage counters to be incorrectly updated for idle states that were
     not entered due to errors (James Morse).

   - Fix for a recently introduced issue in the OPP (Operating
     Performance Points) framework causing it to print bogus error
     messages for missing optional regulators (Viresh Kumar).

   - Fix for a recently introduced issue in the generic device
     properties framework that may cause it to attempt to dereferece and
     invalid pointer in some cases (Heikki Krogerus).

   - Fix for a deadlock in the ACPICA core that may be triggered by
     device (eg Thunderbolt) hotplug (Prarit Bhargava)"

* tag 'pm+acpi-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / OPP: Remove useless check
  ACPICA: Dispatcher: Update thread ID for recursive method calls
  intel_pstate: Fix intel_pstate_get()
  cpufreq: intel_pstate: Fix HWP on boot CPU after system resume
  cpufreq: st: enable selective initialization based on the platform
  ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value
  device property: Avoid potential dereferences of invalid pointers