Christian König
056472f1d1
drm/amdgpu: use explicit limit for VRAM<->GTT moves
...
Use an explicit limit when moving things around to
force address space allocation.
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 >
2016-09-14 15:10:46 -04:00
Christian König
08291c5c2e
drm/amdgpu: use explicit GTT limit for evictions
...
This way the address space gets allocated immediately.
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 >
2016-09-14 15:10:45 -04:00
Christian König
78ab0a38bf
drm/amdgpu: unbind GTT only when it is bound
...
Doesn't make much sense to clear the GTT when it was never filled.
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 >
2016-09-14 15:10:44 -04:00
Christian König
9702d40dd3
drm/amdgpu: add AMDGPU_BO_INVALID_OFFSET
...
An invalid offset to be used by custom VRAM/GGT manager when we
don't have an offset for an BO.
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 >
2016-09-14 15:10:44 -04:00
Christian König
aa29040b43
drm/amdgpu: validate size and offset of user fence BO
...
We need to validate the offset to make sure that we don't write after the BO.
Additional to that a page should be enough and can make address space
handling much easier.
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 >
2016-09-14 15:10:43 -04:00
Christian König
283cde69aa
drm/ttm: rework handling of private mem types
...
Instead of keeping a bunch of potentially unused flags, just define
the start for private memory types and remove the rest.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:42 -04:00
Christian König
5d98d0bcff
drm/ttm: use ffs in ttm_mem_type_from_place
...
A bit pointless to search for the first bit set manually.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:41 -04:00
Alex Deucher
5756b1558e
drm/radeon: handle runtime pm in fbcon (v2)
...
Ported from nouveau.
v2: re-enable runtime autosuspend in the error case
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:41 -04:00
Alex Deucher
7c1fa1db54
drm/amdgpu: handle runtime pm in fbcon (v2)
...
Ported from nouveau.
v2: re-enable runtime autosuspend in the error case
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:40 -04:00
Alex Deucher
6861c837e2
drm/amdgpu/si/dpm: fix symbol conflicts with radeon
...
Acked-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:40 -04:00
Alex Deucher
a104777732
drm/amdgpu/si/dpm: make a bunch of things static
...
remnants of the port from radeon.
Acked-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:39 -04:00
Baoyou Xie
5cd92f86f0
drm/amd/powerplay/polaris10: mark symbols static where possible
...
We get a few warnings when building kernel with W=1:
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/polaris10_clockpowergating.c:34:5: warning: no previous prototype
for 'polaris10_phm_powerup_uvd' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/polaris10_thermal.c:428:5: warning: no previous prototype
for 'tf_polaris10_thermal_setup_fan_table' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/polaris10_hwmgr.c:125:31: warning: no previous prototype
for 'cast_phw_polaris10_power_state' [-Wmissing-prototypes]
....
In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:39 -04:00
Baoyou Xie
812a4654bb
drm/amd/powerplay/fiji: mark symbols static where possible
...
We get a few warnings when building kernel with W=1:
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_hwmgr.c:1633:9: warning: no previous prototype
for 'fiji_get_voltage_index' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_hwmgr.c:5412:5: warning: no previous prototype
for 'fiji_check_states_equal' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/fiji_thermal.c:424:5: warning: no previous prototype
for 'tf_fiji_thermal_setup_fan_table' [-Wmissing-prototypes]
....
In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:38 -04:00
Baoyou Xie
761c2e8205
drm/amdgpu: mark symbols static where possible
...
We get a few warnings when building kernel with W=1:
drivers/gpu/drm/amd/amdgpu/cz_smc.c:51:5: warning: no previous prototype for 'cz_send_msg_to_smc_async' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/cz_smc.c:143:5: warning: no previous prototype for 'cz_write_smc_sram_dword' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/iceland_smc.c:124:6: warning: no previous prototype for 'iceland_start_smc' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:3926:6: warning: no previous prototype for 'gfx_v8_0_rlc_stop' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c:94:6: warning: no previous prototype for 'amdgpu_job_free_cb' [-Wmissing-prototypes]
....
In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:37 -04:00
Baoyou Xie
9ca91fdd13
drm/amdgpu: add missing header dependencies
...
We get a few warnings when building kernel with W=1:
drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c:113:6: warning: no previous prototype for 'amdgpu_pll_compute' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/cz_smc.c:38:10: warning: no previous prototype for 'cz_get_argument' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/cz_smc.c:302:5: warning: no previous prototype for 'cz_smu_start' [-Wmissing-prototypes]
....
In fact, these functions are declared in
drivers/gpu/drm/amd/amdgpu/atombios_i2c.h
drivers/gpu/drm/amd/amdgpu/amdgpu_pll.h
drivers/gpu/drm/amd/amdgpu/cz_dpm.h
drivers/gpu/drm/amd/amdgpu/vi_dpm.h.
So this patch adds missing header dependencies.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:37 -04:00
Edward O'Callaghan
efdf7a9319
amd/powerplay: use kmemdup instead of kmalloc + memcpy
...
Save a few clocks by replacing calls to kmalloc followed by memcpy
with a single call to kmemdup.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:36 -04:00
Rex Zhu
41698abb4d
drm/amd/powerplay: delete duplicated function and definition.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:36 -04:00
Rex Zhu
00d57e6d6c
drm/amd/powerplay: move smu related variable definitions to smumgr.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:35 -04:00
Rex Zhu
026c881046
drm/amd/powerplay: wrap get evv voltage functions
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:35 -04:00
Rex Zhu
8bea2527fa
drm/amd/powerplay: add helper function to get voltage id in votage table
...
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:34 -04:00
Rex Zhu
9597f40365
drm/amd/powerplay: initialize platform caps in hwmgr_init.
...
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:34 -04:00
Rex Zhu
5141e9d2f7
drm/amd/powerplay: add module parameter to mask pp features
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-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 >
2016-09-14 15:10:33 -04:00
Rex Zhu
6429fb6685
drm/amd/powerplay: add feature flags in hwmgr to enable/disable special features.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-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 >
2016-09-14 15:10:33 -04:00
Rex Zhu
c63e2d4c65
drm/amd/powerplay: mark symbols static where possible on tonga/iceland.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:32 -04:00
Huang Rui
e9d035eca4
drm/amdgpu: use error label to handle exceptional case
...
Use error label to decrease global item unref and make codes more
readable.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:32 -04:00
Flora Cui
441f90ecf5
drm/amdgpu: update gart_pin_size if bo is in GTT
...
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 >
2016-09-14 15:10:31 -04:00
Christian König
c855e25090
drm/amdgpu: bind GTT on demand
...
We don't really need the GTT table any more most of the time. So bind it
only on demand.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:30 -04:00
Christian König
71c76a086f
drm/amdgpu: fix GTT offset handling
...
Otherwise we run into problems on 32bit systems with more than 4GB GART.
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 >
2016-09-14 15:10:30 -04:00
Huang Rui
d28d6e6fa5
drm: modify drm_global_item_ref to avoid two times of writing ref->object
...
In previous drm_global_item_ref, there are two times of writing
ref->object if item->refcount is 0. So this patch does a minor update
to put alloc and init ref firstly, and then to modify the item of glob
array. Use "else" to avoid two times of writing ref->object. It can
make the code logic more clearly.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:29 -04:00
Monk Liu
753ad49c9f
drm/amdgpu:implement CONTEXT_CONTROL (v5)
...
v1:
for gfx8, use CONTEXT_CONTROL package to dynamically
skip preamble CEIB and other load_xxx command in sequence.
v2:
support GFX7 as well.
remove cntxcntl in compute ring funcs because CPC doesn't
support this packet.
v3: fix reduntant judgement in cntxcntl.
v4: some cleanups, don't change cs_submit()
v5: keep old MESA supported & bump up KMS version.
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Ack-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:29 -04:00
Rex Zhu
1db422de72
drm/amd/powerplay: declare functions instand of include header file.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:28 -04:00
Rex Zhu
519df8a6f2
drm/amd/powerplay: calculate flexible array member's address.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:28 -04:00
Michel Dänzer
e7b54945f5
drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stop
...
Without this, we were only ever using the first 256MB of VRAM.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97593
Tested-by: Konstantin A. Lepikhov <lakostis@altlinux.org >
Tested-by: Arek Ruśniak <arek.rusi@gmail.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:27 -04:00
Junwei Zhang
8640faed5a
drm/amdgpu: free the BO in kernel by helper amdgpu_bo_free_kernel()
...
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:27 -04:00
Junwei Zhang
aa1d562e64
drm/amdgpu: add a new helper to free a BO in kernel allocations
...
Free the BO allocated by amdgpu_bo_create_kernel()
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:26 -04:00
Tom St Denis
ad2473af27
drm/amd/amdgpu: Fix return values in SI DPM code
...
Fix a couple of spots where errors were not returned as
well as add some error messages to
si_patch_dependency_based_on_leakage() which were not being
read.
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 >
2016-09-14 15:10:26 -04:00
Huang Rui
fd5065584d
drm/amdgpu: move some release handles into fail labels (v2)
...
Clean up the codes to move the release handles into fail labels.
v2: squash in Christian's regression fix
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:25 -04:00
Tom St Denis
f166d9f297
drm/amd/amdgpu: Remove double lock from gfx v6
...
The function gfx_v6_0_get_cu_info() was taking the
grbm_idx_mutex which was then taken by a dependent
function gfx_v6_0_get_cu_active_bitmap().
This patch removes the select from the parent function
to avoid the double lock.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 09:43:41 -04:00
Tom St Denis
075719c3cb
drm/amd/amdgpu: Convert messages in gmc v6 to dev_*()
...
Make the kernel log messaging more consistent and use the
dev_*() functions instead of a mix of DRM_*() and printk().
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 >
2016-09-14 09:43:40 -04:00
Tom St Denis
e5c5304f13
drm/amd/amdgpu: Comment out currently unused SI DPM struct
...
The tahiti_le structure is not currently used. Comment it out
to avoid warnings.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 09:43:40 -04:00
Tom St Denis
f80c738c61
drm/amd/amdgpu: Tidy up SI SMC code (v2)
...
As well as merge SMC clock functions into one to reduce LOC.
v2: Fix swapped ck enable bit
bug: https://bugs.freedesktop.org/show_bug.cgi?id=97801
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 09:43:39 -04:00
Ville Syrjälä
ea54ff4008
drm/i915: Ignore OpRegion panel type except on select machines
...
Turns out
commit a05628195a ("drm/i915: Get panel_type from OpRegion panel
details") has regressed quite a few machines. So it looks like we
can't use the panel type from OpRegion on all systems, and yet we
absolutely must use it on some specific systems.
Despite trying, I was unable to find any automagic way to determine
if the OpRegion panel type is respectable or not. The only glimmer
of hope I had was bit 8 in the SCIC response, but that turned out to
not work either (it was always 0 on both types of systems).
So, to fix the regressions without breaking the machine we know to need
the OpRegion panel type, let's just add a quirk for this. Only specific
machines known to require the OpRegion panel type will therefore use
it. Everyone else will fall bck to the VBT panel type.
The only known machine so far is a "Conrac GmbH IX45GM2". The PCI
subsystem ID on this machine is just a generic 8086:2a42, so of no use.
Instead we'll go with a DMI match.
I suspect we can now also revert
commit aeddda06c1 ("drm/i915: Ignore panel type from OpRegion on SKL")
but let's leave that to a separate patch.
v2: Do the DMI match in the opregion code directly, as dev_priv->quirks
gets populated too late
Cc: Rob Kramer <rob@solution-space.com >
Cc: Martin van Es <martin@mrvanes.com >
Cc: Andrea Arcangeli <aarcange@redhat.com >
Cc: Dave Airlie <airlied@linux.ie >
Cc: Marco Krüger <krgsch@gmail.com >
Cc: Sean Greenslade <sean@seangreenslade.com >
Cc: Trudy Tective <bertslany@gmail.com >
Cc: Robin Müller <rm1990@gmx.de >
Cc: Alexander Kobel <a-kobel@a-kobel.de >
Cc: Alexey Shumitsky <alexey.shumitsky@gmail.com >
Cc: Emil Andersen Lauridsen <mine809@gmail.com >
Cc: oceans112@gmail.com
Cc: James Hogan <james@albanarts.com >
Cc: James Bottomley <James.Bottomley@HansenPartnership.com >
Cc: stable@vger.kernel.org
References: https://lists.freedesktop.org/archives/intel-gfx/2016-August/105545.html
References: https://lists.freedesktop.org/archives/dri-devel/2016-August/116888.html
References: https://lists.freedesktop.org/archives/intel-gfx/2016-June/098826.html
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94825
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97060
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97443
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97363
Fixes: a05628195a ("drm/i915: Get panel_type from OpRegion panel details")
Tested-by: Marco Krüger <krgsch@gmail.com >
Tested-by: Alexey Shumitsky <alexey.shumitsky@gmail.com >
Tested-by: Sean Greenslade <sean@seangreenslade.com >
Tested-by: Emil Andersen Lauridsen <mine809@gmail.com >
Tested-by: Robin Müller <rm1990@gmx.de >
Tested-by: oceans112@gmail.com
Tested-by: Rob Kramer <rob@solution-space.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1473758539-21565-1-git-send-email-ville.syrjala@linux.intel.com
References: http://patchwork.freedesktop.org/patch/msgid/1473602239-15855-1-git-send-email-adrienverge@gmail.com
Acked-by: Jani Nikula <jani.nikula@intel.com >
(cherry picked from commit c8ebfad7a0 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2016-09-14 11:25:05 +03:00
Rodrigo Vivi
86dfb76cba
Revert "drm/i915/psr: Make idle_frames sensible again"
...
This reverts
commit 1c80c25fb6
Author: Daniel Vetter <daniel.vetter@ffwll.ch >
Date: Wed May 18 18:47:12 2016 +0200
drm/i915/psr: Make idle_frames sensible again
There are panels that needs 4 idle frames before entering PSR,
but VBT is unproperly set.
Also lately it was identified that idle frame count calculated at HW
can be off by 1, what makes the minimum of 2, at least.
Without the current vbt+1 we are with the risk of having HW calculating
0 idle frames and entering PSR when it shouldn't. Regardless the lack
of link training.
[Jani: there is some disagreement on the explanation, but the commit
regresses so revert it is.]
References: http://marc.info/?i=20160904191153.GA2328@light.dominikbrodowski.net
Cc: Dominik Brodowski <linux@dominikbrodowski.net >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Fixes: 1c80c25fb6 ("drm/i915/psr: Make idle_frames sensible again")
Cc: drm-intel-fixes@lists.freedesktop.org # v4.8-rc1+
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1473295351-8766-1-git-send-email-rodrigo.vivi@intel.com
(cherry picked from commit 40918e0bb8 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2016-09-14 11:24:58 +03:00
Chris Wilson
74712339a4
drm/i915: Restore lost "Initialized i915" welcome message
...
A side effect of removing the midlayer from driver loading was the loss
of a useful message announcing to userspace that i915 had successfully
started, e.g.:
[drm] Initialized i915 1.6.0 20160425 for 0000:00:02.0 on minor 0
Reported-by: Timo Aaltonen <tjaalton@ubuntu.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Fixes: 8f460e2c78 ("drm/i915: Demidlayer driver loading")
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: drm-intel-fixes@lists.freedesktop.org
Link: http://patchwork.freedesktop.org/patch/msgid/20160825072314.17402-1-chris@chris-wilson.co.uk
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
(cherry picked from commit bc5ca47c0a )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2016-09-14 11:23:46 +03:00
Ville Syrjälä
c8ebfad7a0
drm/i915: Ignore OpRegion panel type except on select machines
...
Turns out
commit a05628195a ("drm/i915: Get panel_type from OpRegion panel
details") has regressed quite a few machines. So it looks like we
can't use the panel type from OpRegion on all systems, and yet we
absolutely must use it on some specific systems.
Despite trying, I was unable to find any automagic way to determine
if the OpRegion panel type is respectable or not. The only glimmer
of hope I had was bit 8 in the SCIC response, but that turned out to
not work either (it was always 0 on both types of systems).
So, to fix the regressions without breaking the machine we know to need
the OpRegion panel type, let's just add a quirk for this. Only specific
machines known to require the OpRegion panel type will therefore use
it. Everyone else will fall bck to the VBT panel type.
The only known machine so far is a "Conrac GmbH IX45GM2". The PCI
subsystem ID on this machine is just a generic 8086:2a42, so of no use.
Instead we'll go with a DMI match.
I suspect we can now also revert
commit aeddda06c1 ("drm/i915: Ignore panel type from OpRegion on SKL")
but let's leave that to a separate patch.
v2: Do the DMI match in the opregion code directly, as dev_priv->quirks
gets populated too late
Cc: Rob Kramer <rob@solution-space.com >
Cc: Martin van Es <martin@mrvanes.com >
Cc: Andrea Arcangeli <aarcange@redhat.com >
Cc: Dave Airlie <airlied@linux.ie >
Cc: Marco Krüger <krgsch@gmail.com >
Cc: Sean Greenslade <sean@seangreenslade.com >
Cc: Trudy Tective <bertslany@gmail.com >
Cc: Robin Müller <rm1990@gmx.de >
Cc: Alexander Kobel <a-kobel@a-kobel.de >
Cc: Alexey Shumitsky <alexey.shumitsky@gmail.com >
Cc: Emil Andersen Lauridsen <mine809@gmail.com >
Cc: oceans112@gmail.com
Cc: James Hogan <james@albanarts.com >
Cc: James Bottomley <James.Bottomley@HansenPartnership.com >
Cc: stable@vger.kernel.org
References: https://lists.freedesktop.org/archives/intel-gfx/2016-August/105545.html
References: https://lists.freedesktop.org/archives/dri-devel/2016-August/116888.html
References: https://lists.freedesktop.org/archives/intel-gfx/2016-June/098826.html
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94825
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97060
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97443
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97363
Fixes: a05628195a ("drm/i915: Get panel_type from OpRegion panel details")
Tested-by: Marco Krüger <krgsch@gmail.com >
Tested-by: Alexey Shumitsky <alexey.shumitsky@gmail.com >
Tested-by: Sean Greenslade <sean@seangreenslade.com >
Tested-by: Emil Andersen Lauridsen <mine809@gmail.com >
Tested-by: Robin Müller <rm1990@gmx.de >
Tested-by: oceans112@gmail.com
Tested-by: Rob Kramer <rob@solution-space.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1473758539-21565-1-git-send-email-ville.syrjala@linux.intel.com
References: http://patchwork.freedesktop.org/patch/msgid/1473602239-15855-1-git-send-email-adrienverge@gmail.com
Acked-by: Jani Nikula <jani.nikula@intel.com >
2016-09-14 10:35:00 +03:00
Rodrigo Vivi
40918e0bb8
Revert "drm/i915/psr: Make idle_frames sensible again"
...
This reverts
commit 1c80c25fb6
Author: Daniel Vetter <daniel.vetter@ffwll.ch >
Date: Wed May 18 18:47:12 2016 +0200
drm/i915/psr: Make idle_frames sensible again
There are panels that needs 4 idle frames before entering PSR,
but VBT is unproperly set.
Also lately it was identified that idle frame count calculated at HW
can be off by 1, what makes the minimum of 2, at least.
Without the current vbt+1 we are with the risk of having HW calculating
0 idle frames and entering PSR when it shouldn't. Regardless the lack
of link training.
[Jani: there is some disagreement on the explanation, but the commit
regresses so revert it is.]
References: http://marc.info/?i=20160904191153.GA2328@light.dominikbrodowski.net
Cc: Dominik Brodowski <linux@dominikbrodowski.net >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Fixes: 1c80c25fb6 ("drm/i915/psr: Make idle_frames sensible again")
Cc: drm-intel-fixes@lists.freedesktop.org # v4.8-rc1+
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1473295351-8766-1-git-send-email-rodrigo.vivi@intel.com
2016-09-13 11:57:53 +03:00
Navare, Manasi D
2686ebfdf7
drm/i915: Add support for Kabylake to function obtaining shared PLL
...
This adds support for KBL in the new function added in commit ID:
commit <f169660ed4e57a03e6f6ed07fe192dbcb7687a0d> that returns a
shared pll in case of DDI platforms.
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1473728663-14355-1-git-send-email-manasi.d.navare@intel.com
2016-09-12 22:06:08 -07:00
Dave Airlie
8506912b96
Merge branch 'drm-tda998x-devel' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-next
...
This adds the ASoC codec interfaces for TDA998x HDMI audio from
Jyri Sarha.
* 'drm-tda998x-devel' of git://git.armlinux.org.uk/~rmk/linux-arm:
ARM: dts: am335x-boneblack: Add HDMI audio support
drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding
drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata
2016-09-13 10:28:17 +10:00
Dave Airlie
b4eac5465b
Merge tag 'sunxi-drm-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next
...
Allwinner DRM changes for 4.9
This tag adds the support of a new SoC to sun4i-drm (the Allwinner A33),
and the usual few fixes and enhancements
* tag 'sunxi-drm-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux :
drm/sun4i: add missing header dependencies
drm/sun4i: Add a DRC driver
drm/sun4i: backend: Handle the SAT
drm/sun4i: support A33 tcon
drm/sun4i: support TCONs without channel 1
drm/sun4i: Clear encoder->bridge if a bridge is not found
drm/sun4i: rgb: add missing calls to drm_panel_{prepare,unprepare}
drm/sun4i: Remove redundant dev_err call in sun4i_tcon_init_regmap()
drm/sun4i: Add bridge support
drm/sun4i: Move panel retrieval in RGB connector
drm/sun4i: Store TCON's device structure pointer
2016-09-13 10:24:52 +10:00
Dave Airlie
1f8ee720ce
Merge tag 'topic/drm-misc-2016-09-08' of git://anongit.freedesktop.org/drm-intel into drm-next
...
* tag 'topic/drm-misc-2016-09-08' of git://anongit.freedesktop.org/drm-intel:
drm: Fix error path in drm_mode_page_flip_ioctl()
Revert "drm: Unify handling of blob and object properties"
drm/udl: implement usb_driver suspend/resume.
drm: fix signed integer overflow
drm/atomic: Reject properties not part of the object.
drm/doc: Add a few words on validation with IGT
2016-09-13 10:19:38 +10:00