Daniel Vetter
91e976777d
drm/amd|radeon: Drop drm_vblank_cleanup
...
Both drivers shut down all crtc beforehand already, which will shut up
any pending vblank (the only thing vblank_cleanup really does is
disable the disable timer). Hence we don't need this here and can
remove it.
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-2-daniel.vetter@ffwll.ch
2017-06-23 11:08:44 +02:00
Christian König
6e3f187cc0
drm/amdgpu: fix over allocating of IRQ sources
...
We need an array of pointers to IRQ sources, not an array of sources.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-06 13:27:20 -04:00
Christian König
cef105f7dc
drm/amdgpu: add IV trace point
...
This allows us to grab IVs without spamming the log.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:54:37 -04:00
Alex Deucher
d766e6a393
drm/amdgpu: switch ih handling to two levels (v3)
...
Newer asics have a two levels of irq ids now:
client id - the IP
src id - the interrupt src within the IP
v2: integrated Christian's comments.
v3: fix rebase fail in SI and CIK
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:37 -04:00
Daniel Vetter
2babdc850c
drm/radeon|amdgpu: Remove redundant num_connectors check
...
The list walk will shortcircuit anyway.
Cc: Alex Deucher <alexdeucher@gmail.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20161213230814.19598-4-daniel.vetter@ffwll.ch
2016-12-18 14:18:12 +01:00
Christian König
3b1c9036a6
drm/amdgpu: remove amdgpu_irq_get_delayed
...
Not used any more.
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-11-23 15:08:43 -05:00
Alex Deucher
e8d7515a98
drm/amdgpu: cancel reset work on fini
...
Cancel any pending reset work when we tear down the driver.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-10-24 16:59:55 -04:00
Chunming Zhou
0eaeb070ed
drm/amdgpu: add amdgpu_irq_gpu_reset_resume_helper
...
irq need to update when gpu reset happens.
Signed-off-by: Chunming Zhou <David1.Zhou@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 >
2016-07-07 14:54:48 -04:00
Daniel Vetter
fcee59065e
drm: Nuke ->vblank_disable_allowed
...
This was added in
commit 0a3e67a4ca
Author: Jesse Barnes <jbarnes@virtuousgeek.org >
Date: Tue Sep 30 12:14:26 2008 -0700
drm: Rework vblank-wait handling to allow interrupt reduction.
to stay backwards-compatible with old UMS code that didn't even tell
the kernel when it did a modeset, so that the kernel could
save/restore vblank counters. At worst this means vblanks will be
somewhat funky on a setup that very likely no one still runs.
So let's just nuke it.
Plan B would be to set it unconditionally in drm_vblank_init for kms
drivers, instead of in each driver separately. So if this patch breaks
anything please only restore the hunks in drmP.h and drm_irq.c, plus
add a check for DRIVER_MODESET in drm_vblank_init.
Stumbled over this in a discussion on irc with Chris.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Liviu Dudau <liviu.dudau@arm.com >
Cc: Russell King <rmk+kernel@arm.linux.org.uk >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Eric Anholt <eric@anholt.net >
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Cc: Inki Dae <inki.dae@samsung.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Mark Yao <mark.yao@rock-chips.com >
Cc: Sascha Hauer <s.hauer@pengutronix.de >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Liviu Dudau <Liviu.Dudau@arm.com >
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2016-05-21 07:03:31 +10:00
Nils Wallménius
f498d9ed26
drm/amd: Mark some tables as const
...
This patch marks some compile-time constant tables 'const'.
The tables marked in this patch are the low hanging fruit
where little other changes were necesary to avoid casting
away constness etc. Also mark some tables that are private
to a file as static.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:20:00 -04:00
Michel Dänzer
354edd8e94
drm/amdgpu: Set vblank_disable_allowed = true
...
Without this, since the conversion from drm_vblank_pre/post_modeset to
drm_vblank_on/off, the vblank interrupt could never be disabled after
userspace triggered enabling it.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-04-01 10:08:34 -04:00
Dave Airlie
e9c5e7402d
drm/amdgpu: add missing irq.h include
...
this fixes the build on arm.
Signed-off-by: Dave Airlie <airlied@redhat.com >
2016-01-14 08:07:55 +10:00
Alex Deucher
5f2323658e
drm/amdgpu: add irq domain support
...
Hardware blocks on the GPU like ACP generate interrupts in
the GPU interrupt controller, but are driven by a separate
driver. Add an irq domain to the GPU driver so that
blocks like ACP can register a Linux interrupt.
Acked-by: Dave Airlie <airlied@redhat.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-01-11 09:52:57 -05:00
Alex Deucher
5a6adfa20b
drm/amdgpu: Fix max_vblank_count value for current display engines
...
The value was much too low, which could cause the userspace visible
vblank counter to move backwards when the hardware counter wrapped
around.
Ported from radeon commit:
b0b9bb4dd5
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2015-09-23 17:23:42 -04:00
Alex Deucher
0cf3be2178
drm/amdgpu: Implement irq interfaces for CGS
...
This implements the irq src registrar.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:09 -04:00
Alex Deucher
9e14c65c57
drm/amdgpu: take the mode_config mutex when handling hpds
...
Since we may modify display state.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-06-03 21:03:39 -04:00
Alex Deucher
d38ceaf99e
drm/amdgpu: add core driver (v4)
...
This adds the non-asic specific core driver code.
v2: remove extra kconfig option
v3: implement minor fixes from Fengguang Wu
v4: fix cast in amdgpu_ucode.c
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-06-03 21:03:15 -04:00