]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
8 years agoDRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd
Stephen Chandler Paul [Fri, 21 Aug 2015 18:16:12 +0000 (14:16 -0400)]
DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd

Most of the time this isn't an issue since hotplugging an adaptor will
trigger a crtc mode change which in turn, causes the driver to probe
every DisplayPort for a dpcd. However, in cases where hotplugging
doesn't cause a mode change (specifically when one unplugs a monitor
from a DisplayPort connector, then plugs that same monitor back in
seconds later on the same port without any other monitors connected), we
never probe for the dpcd before starting the initial link training. What
happens from there looks like this:

- GPU has only one monitor connected. It's connected via
  DisplayPort, and does not go through an adaptor of any sort.

- User unplugs DisplayPort connector from GPU.

- Change in HPD is detected by the driver, we probe every
  DisplayPort for a possible connection.

- Probe the port the user originally had the monitor connected
  on for it's dpcd. This fails, and we clear the first (and only
  the first) byte of the dpcd to indicate we no longer have a
  dpcd for this port.

- User plugs the previously disconnected monitor back into the
  same DisplayPort.

- radeon_connector_hotplug() is called before everyone else,
  and tries to handle the link training. Since only the first
  byte of the dpcd is zeroed, the driver is able to complete
  link training but does so against the wrong dpcd, causing it
  to initialize the link with the wrong settings.

- Display stays blank (usually), dpcd is probed after the
  initial link training, and the driver prints no obvious
  messages to the log.

In theory, since only one byte of the dpcd is chopped off (specifically,
the byte that contains the revision information for DisplayPort), it's
not entirely impossible that this bug may not show on certain monitors.
For instance, the only reason this bug was visible on my ASUS PB238
monitor was due to the fact that this monitor using the enhanced framing
symbol sequence, the flag for which is ignored if the radeon driver
thinks that the DisplayPort version is below 1.1.

Signed-off-by: Stephen Chandler Paul <cpaul@redhat.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
8 years agodrm/amdgpu: fix CS error handling v2
Christian König [Tue, 18 Aug 2015 19:09:33 +0000 (21:09 +0200)]
drm/amdgpu: fix CS error handling v2

Stop double freeing the the BO list by pulling the content
of amdgpu_cs_parser_prepare_job() into the IOCTL function again.

v2: better commit message

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: fix zeroing all IB fields manually v2
Christian König [Tue, 18 Aug 2015 16:23:16 +0000 (18:23 +0200)]
drm/amdgpu: fix zeroing all IB fields manually v2

The problem now is that we don't necessarily call amdgpu_ib_get()
in some error paths and so work with uninitialized data.

Better require that the memory is already zeroed.

v2: better commit message

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: free the job immediately after dispatching it
Christian König [Tue, 18 Aug 2015 13:30:26 +0000 (15:30 +0200)]
drm/amdgpu: free the job immediately after dispatching it

Fixes a whole bunch of lockdep warnings.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: use a spinlock instead of a mutex for the rq
Christian König [Tue, 18 Aug 2015 12:41:25 +0000 (14:41 +0200)]
drm/amdgpu: use a spinlock instead of a mutex for the rq

More appropriate and fixes some nasty lockdep warnings.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: don't need to use bo_list_clone any more
Chunming Zhou [Tue, 18 Aug 2015 08:25:46 +0000 (16:25 +0800)]
drm/amdgpu: don't need to use bo_list_clone any more

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: some clean up for cs_ioctl
Chunming Zhou [Tue, 18 Aug 2015 08:19:13 +0000 (16:19 +0800)]
drm/amdgpu: some clean up for cs_ioctl

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: prepare job should be common code path
Chunming Zhou [Tue, 18 Aug 2015 08:12:15 +0000 (16:12 +0800)]
drm/amdgpu: prepare job should be common code path

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: abstract amdgpu_job for scheduler
Chunming Zhou [Tue, 18 Aug 2015 07:16:40 +0000 (15:16 +0800)]
drm/amdgpu: abstract amdgpu_job for scheduler

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: bump the DRM version for new allowed mem-mapped registers
Marek Olšák [Tue, 18 Aug 2015 21:58:47 +0000 (23:58 +0200)]
drm/amdgpu: bump the DRM version for new allowed mem-mapped registers

Used by mesa, etc. for profiling.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoMerge branch 'drm-next-fsl-dcu' of https://github.com/Jianwei-Wang/linux-drm-fsl...
Dave Airlie [Thu, 20 Aug 2015 04:11:17 +0000 (14:11 +1000)]
Merge branch 'drm-next-fsl-dcu' of https://github.com/Jianwei-Wang/linux-drm-fsl-dcu into drm-next

Merge Freescale DCU FRM driver.

* 'drm-next-fsl-dcu' of https://github.com/Jianwei-Wang/linux-drm-fsl-dcu:
  MAINTAINERS: Add Freescale DCU DRM driver maintainer
  devicetree: Add NEC to the vendor-prefix list
  drm/layerscape: Add Freescale DCU DRM driver

8 years agoMAINTAINERS: Add Freescale DCU DRM driver maintainer
Jianwei Wang [Thu, 20 Aug 2015 02:26:33 +0000 (22:26 -0400)]
MAINTAINERS: Add Freescale DCU DRM driver maintainer

Add Alison and myself as maintainers of the Freescale DCU DRM driver.

Signed-off-by: Alison Wang <b18965@freescale.com>
Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
Signed-off-by: Jianwei Wang <jianwei.wang.chn@gmail.com>
8 years agodevicetree: Add NEC to the vendor-prefix list
Jianwei Wang [Thu, 20 Aug 2015 02:24:45 +0000 (22:24 -0400)]
devicetree: Add NEC to the vendor-prefix list

NEC represent NEC LCD Technologies, Ltd.

Signed-off-by: Alison Wang <b18965@freescale.com>
Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
Signed-off-by: Jianwei Wang <jianwei.wang.chn@gmail.com>
8 years agodrm/layerscape: Add Freescale DCU DRM driver
Jianwei Wang [Thu, 20 Aug 2015 02:19:49 +0000 (22:19 -0400)]
drm/layerscape: Add Freescale DCU DRM driver

This patch add support for Two Dimensional Animation and Compositing
Engine (2D-ACE) on the Freescale SoCs.

2D-ACE is a Freescale display controller. 2D-ACE describes
the functionality of the module extremely well its name is a value
that cannot be used as a token in programming languages.
Instead the valid token "DCU" is used to tag the register names and
function names.

The Display Controller Unit (DCU) module is a system master that
fetches graphics stored in internal or external memory and displays
them on a TFT LCD panel. A wide range of panel sizes is supported
and the timing of the interface signals is highly configurable.
Graphics are read directly from memory and then blended in real-time,
which allows for dynamic content creation with minimal CPU
intervention.

The features:
(1) Full RGB888 output to TFT LCD panel.
(2) Blending of each pixel using up to 4 source layers
dependent
on size of panel.
(3) Each graphic layer can be placed with one pixel resolution
in either axis.
(4) Each graphic layer support RGB565 and RGB888 direct colors
without alpha channel and BGRA8888 BGRA4444 ARGB1555 direct
colors
with an alpha channel and YUV422 format.
(5) Each graphic layer support alpha blending with 8-bit
resolution.
This is a simplified version, only one primary plane, one
framebuffer, one crtc, one connector and one encoder for TFT
LCD panel.

Signed-off-by: Alison Wang <b18965@freescale.com>
Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
Signed-off-by: Jianwei Wang <jianwei.wang.chn@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agoMerge branch 'drm-atmel-hlcdc-devel' of https://github.com/bbrezillon/linux-at91...
Dave Airlie [Thu, 20 Aug 2015 00:35:29 +0000 (10:35 +1000)]
Merge branch 'drm-atmel-hlcdc-devel' of https://github.com/bbrezillon/linux-at91 into drm-next

The following PR add support for 3 more atmel SoCs and for some missing
features (new input formats and PRIME support).

* 'drm-atmel-hlcdc-devel' of https://github.com/bbrezillon/linux-at91:
  drm: atmel-hlcdc: add support for sama5d4 SoCs
  drm: atmel-hlcdc: add support for at91sam9n12 SoC
  drm: atmel-hlcdc: add support for at91sam9x5 SoCs
  drm: atmel-hlcdc: add RGB565 and RGB444 output support
  drm: atmel-hlcdc: add the missing DRM_ATOMIC flag
  drm: atmel-hlcdc: add PRIME support

8 years agoMerge branch 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Wed, 19 Aug 2015 23:40:49 +0000 (09:40 +1000)]
Merge branch 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux into drm-next

amdgpu and radeon changes for 4.3. Highlights:
- Fiji support for amdgpu.
- CGS support for amdgpu.  This is a new driver
  internal cross-component API.
- Initial GPU scheduler for amdgpu.  Still disabled
  by default.
- Lots of bug fixes and optimizations

* 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux: (130 commits)
  drm/amdgpu: wait on page directory changes. v2
  drm/amdgpu: Select BACKLIGHT_LCD_SUPPORT
  drm/radeon: Select BACKLIGHT_LCD_SUPPORT
  drm/amdgpu: cleanup sheduler rq handling v2
  drm/amdgpu: move prepare work out of scheduler to cs_ioctl
  drm/amdgpu: fix unnecessary wake up
  drm/amdgpu: fix duplicated mapping invoke bug
  drm/amdgpu: drop bo_list_clone when no scheduler
  drm/amdgpu: disable GPU reset by default
  drm/amdgpu: fix type mismatch error
  drm/amdgpu: add reference for **fence
  drm/amdgpu: fix waiting for all fences before flipping
  drm/amdgpu: fix UVD return code checking
  drm/amdgpu: remove scheduler fence list v2
  drm/amdgpu: remove amd_sched_wait_emit v2
  drm/amdgpu: remove unecessary scheduler fence callbacks
  drm/amdgpu: fix scheduler fence implementation
  drm/amdgpu: don't grab dev->struct_mutex in pm functions
  drm/amdgpu: Don't take dev->struct_mutex in bo_force_delete
  drm/radeon: Don't take dev->struct_mutex in pm functions
  ...

8 years agodrm: atmel-hlcdc: add support for sama5d4 SoCs
Boris Brezillon [Wed, 7 Jan 2015 09:25:41 +0000 (10:25 +0100)]
drm: atmel-hlcdc: add support for sama5d4 SoCs

Describe capabilities of the HLCDC IP found on sama5d4 SoCs and add a
new entry to the atmel_hlcdc_of_match table.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agodrm: atmel-hlcdc: add support for at91sam9n12 SoC
Boris Brezillon [Wed, 7 Jan 2015 09:12:41 +0000 (10:12 +0100)]
drm: atmel-hlcdc: add support for at91sam9n12 SoC

Describe capabilities of the HLCDC IP found on at91sam9n12 SoC and add a
new entry to the atmel_hlcdc_of_match table.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agodrm: atmel-hlcdc: add support for at91sam9x5 SoCs
Boris Brezillon [Wed, 7 Jan 2015 08:30:20 +0000 (09:30 +0100)]
drm: atmel-hlcdc: add support for at91sam9x5 SoCs

Describe capabilities of the HLCDC IP found on at91sam9x5 SoCs and add a
new entry to the atmel_hlcdc_of_match table.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agodrm: atmel-hlcdc: add RGB565 and RGB444 output support
Boris Brezillon [Tue, 6 Jan 2015 10:18:09 +0000 (11:18 +0100)]
drm: atmel-hlcdc: add RGB565 and RGB444 output support

The HLCDC IP supports RGB565 and RGB444 output formats.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agodrm: atmel-hlcdc: add the missing DRM_ATOMIC flag
Boris Brezillon [Fri, 31 Jul 2015 13:10:26 +0000 (15:10 +0200)]
drm: atmel-hlcdc: add the missing DRM_ATOMIC flag

The atmel-hlcdc driver already supports atomic operations, add the
missing DRM_ATOMIC flag to expose the atomic features to userspace.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agodrm: atmel-hlcdc: add PRIME support
Boris Brezillon [Mon, 20 Apr 2015 11:43:26 +0000 (13:43 +0200)]
drm: atmel-hlcdc: add PRIME support

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agodrm/amdgpu: wait on page directory changes. v2
Bas Nieuwenhuizen [Fri, 14 Aug 2015 18:08:40 +0000 (20:08 +0200)]
drm/amdgpu: wait on page directory changes. v2

Pagetables can be moved and therefore the page directory update can be necessary
for the current cs even if none of the the bo's are moved. In that scenario
there is no fence between the sdma0 and gfx ring, so we add one.

v2 (chk): rebased

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Select BACKLIGHT_LCD_SUPPORT
Thierry Reding [Fri, 14 Aug 2015 10:50:12 +0000 (12:50 +0200)]
drm/amdgpu: Select BACKLIGHT_LCD_SUPPORT

Explicitly select BACKLIGHT_LCD_SUPPORT to satisfy the direct dependency
of BACKLIGHT_CLASS_DEVICE.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/radeon: Select BACKLIGHT_LCD_SUPPORT
Thierry Reding [Fri, 14 Aug 2015 10:50:11 +0000 (12:50 +0200)]
drm/radeon: Select BACKLIGHT_LCD_SUPPORT

Explicitly select BACKLIGHT_LCD_SUPPORT to satisfy the direct dependency
of BACKLIGHT_CLASS_DEVICE.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: cleanup sheduler rq handling v2
Christian König [Wed, 12 Aug 2015 09:46:04 +0000 (11:46 +0200)]
drm/amdgpu: cleanup sheduler rq handling v2

Rework run queue implementation, especially remove the odd list handling.

v2: cleanup the code only, no algorithem change.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: move prepare work out of scheduler to cs_ioctl
Chunming Zhou [Fri, 14 Aug 2015 06:55:27 +0000 (14:55 +0800)]
drm/amdgpu: move prepare work out of scheduler to cs_ioctl

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: fix unnecessary wake up
Chunming Zhou [Thu, 13 Aug 2015 05:04:06 +0000 (13:04 +0800)]
drm/amdgpu: fix unnecessary wake up

decrease CPU extra overhead.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: fix duplicated mapping invoke bug
monk.liu [Fri, 14 Aug 2015 05:36:41 +0000 (13:36 +0800)]
drm/amdgpu: fix duplicated mapping invoke bug

fix the bug that there is duplicated bo_update_mapping issued

Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agodrm/amdgpu: drop bo_list_clone when no scheduler
monk.liu [Thu, 13 Aug 2015 08:19:54 +0000 (16:19 +0800)]
drm/amdgpu: drop bo_list_clone when no scheduler

bo_list_clone() will take a lot of time when bo_list hold too much
elements, like above 7000

Signed-off-by: Monk.Liu <monk.liu@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
8 years agodrm/amdgpu: disable GPU reset by default
Alex Deucher [Thu, 13 Aug 2015 17:20:20 +0000 (13:20 -0400)]
drm/amdgpu: disable GPU reset by default

It's not validated yet and causes more harm than good.
Avoids spurious resets.

Reviewed-by: Leo Liu <leo.liu@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 type mismatch error
monk.liu [Wed, 12 Aug 2015 09:56:52 +0000 (17:56 +0800)]
drm/amdgpu: fix type mismatch error

remaining timeout returned by amdgpu_fence_wait_any can be larger than
max int value, thus the truncated 32 bit value in r ends up being
negative while its original long value is positive.

Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
8 years agodrm/amdgpu: add reference for **fence
Chunming Zhou [Wed, 12 Aug 2015 04:58:31 +0000 (12:58 +0800)]
drm/amdgpu: add reference for **fence

fix fence is released when pass to **fence sometimes.
add reference for it.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: fix waiting for all fences before flipping
Christian König [Tue, 11 Aug 2015 15:29:52 +0000 (17:29 +0200)]
drm/amdgpu: fix waiting for all fences before flipping

Otherwise we might see corruption.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: fix UVD return code checking
Christian König [Tue, 11 Aug 2015 14:35:54 +0000 (16:35 +0200)]
drm/amdgpu: fix UVD return code checking

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-and-Reviewed-by: Leo Liu <leo.liu@amd.com>
8 years agodrm/amdgpu: remove scheduler fence list v2
Christian König [Mon, 10 Aug 2015 12:16:24 +0000 (14:16 +0200)]
drm/amdgpu: remove scheduler fence list v2

Unused and missing proper locking.

v2: add locking comment to commit message.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
8 years agodrm/amdgpu: remove amd_sched_wait_emit v2
Christian König [Mon, 10 Aug 2015 12:04:12 +0000 (14:04 +0200)]
drm/amdgpu: remove amd_sched_wait_emit v2

Not used any more.

v2: remove amd_sched_emit as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: remove unecessary scheduler fence callbacks
Christian König [Mon, 10 Aug 2015 12:20:55 +0000 (14:20 +0200)]
drm/amdgpu: remove unecessary scheduler fence callbacks

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: fix scheduler fence implementation
Christian König [Mon, 10 Aug 2015 15:27:23 +0000 (17:27 +0200)]
drm/amdgpu: fix scheduler fence implementation

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: don't grab dev->struct_mutex in pm functions
Daniel Vetter [Thu, 9 Jul 2015 21:32:50 +0000 (23:32 +0200)]
drm/amdgpu: don't grab dev->struct_mutex in pm functions

Similar to radeon, except that amdgpu doesn't even use struct_mutex to
protect anything like the shared z buffer (sane gpu architecture,
yay!). And the code already grabs the globa adev->ring_lock, so this
code can't race with itself. Which makes struct_mutex completely
redundnant. Remove it.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Don't take dev->struct_mutex in bo_force_delete
Daniel Vetter [Thu, 9 Jul 2015 21:32:49 +0000 (23:32 +0200)]
drm/amdgpu: Don't take dev->struct_mutex in bo_force_delete

It really doesn't protect anything which doesn't have other locks
already. Also this is run from driver unload code so not much need for
locks anyway.

Same changes as for radeon really.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/radeon: Don't take dev->struct_mutex in pm functions
Daniel Vetter [Thu, 9 Jul 2015 21:32:48 +0000 (23:32 +0200)]
drm/radeon: Don't take dev->struct_mutex in pm functions

We already grab 2 device-global locks (write-sema rdev->pm.mclk_lock
and rdev->ring_lock), adding another global mutex won't serialize this
code more. And since there's really nothing interesting that gets
protected in radeon by dev->struct mutex (we only have the global z
buffer owners and it's still serializing gem bo destruction in the drm
core - which is irrelevant since radeon uses ttm anyway internally)
this doesn't add protection. Remove it.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/radeon: Don't take dev->struct_mutex in bo_force_delete
Daniel Vetter [Thu, 9 Jul 2015 21:32:47 +0000 (23:32 +0200)]
drm/radeon: Don't take dev->struct_mutex in bo_force_delete

It really doesn't protect anything which doesn't have other locks
already. Also this is run from driver unload code so not much need for
locks anyway.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: remove VI hw bug workaround v3
Christian König [Fri, 7 Aug 2015 18:22:40 +0000 (20:22 +0200)]
drm/amdgpu: remove VI hw bug workaround v3

The workaround simply doesn't work because VM mappings
are controlled by userspace not the kernel.

Additional to that this is just a performance problem
which happens if you have holes in your VM mapping.

v2: adjust virtual addr alignment as well.
v3: fix trivial warning

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com> (v1)
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> (v2)
8 years agodrm/amdgpu: cleanup amdgpu_fence_ring_wait_seq
Christian König [Fri, 7 Aug 2015 14:15:36 +0000 (16:15 +0200)]
drm/amdgpu: cleanup amdgpu_fence_ring_wait_seq

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: remove duplicate amdgpu_fence_process implementation
Christian König [Fri, 7 Aug 2015 13:57:21 +0000 (15:57 +0200)]
drm/amdgpu: remove duplicate amdgpu_fence_process implementation

Looks like that somehow got missed while during porting the radeon changes.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: remove amdgpu_fence_wait
Christian König [Fri, 7 Aug 2015 11:53:36 +0000 (13:53 +0200)]
drm/amdgpu: remove amdgpu_fence_wait

It was just a wrapper for fence_wait anyway.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: use the reservation obj wait for the UVD msg
Christian König [Thu, 6 Aug 2015 18:44:47 +0000 (20:44 +0200)]
drm/amdgpu: use the reservation obj wait for the UVD msg

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: remove amdgpu_fence_signaled
Christian König [Thu, 6 Aug 2015 15:49:25 +0000 (17:49 +0200)]
drm/amdgpu: remove amdgpu_fence_signaled

The common kernel function does the same thing.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amd: add scheduler fence implementation (v2)
Chunming Zhou [Sun, 2 Aug 2015 03:18:04 +0000 (11:18 +0800)]
drm/amd: add scheduler fence implementation (v2)

scheduler fence is based on kernel fence framework.

v2: squash in Christian's build fix

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: use kernel submit helper in vm
Chunming Zhou [Mon, 3 Aug 2015 04:57:31 +0000 (12:57 +0800)]
drm/amdgpu: use kernel submit helper in vm

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: use amd_sched_job in its backend ops
Chunming Zhou [Thu, 6 Aug 2015 07:19:12 +0000 (15:19 +0800)]
drm/amdgpu: use amd_sched_job in its backend ops

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: cleanup and fix scheduler fence handling v2
Christian König [Wed, 5 Aug 2015 19:22:10 +0000 (21:22 +0200)]
drm/amdgpu: cleanup and fix scheduler fence handling v2

v2: rebased

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: merge amd_sched_entity and amd_context_entity v2
Christian König [Wed, 5 Aug 2015 16:33:21 +0000 (18:33 +0200)]
drm/amdgpu: merge amd_sched_entity and amd_context_entity v2

Avoiding a couple of casts.

v2: rename c_entity to entity as well

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: fix coding style in a couple of places
Christian König [Wed, 5 Aug 2015 16:18:52 +0000 (18:18 +0200)]
drm/amdgpu: fix coding style in a couple of places

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>
8 years agodrm/amdgpu: remove unused parent entity
Christian König [Wed, 5 Aug 2015 16:11:14 +0000 (18:11 +0200)]
drm/amdgpu: remove unused parent entity

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>
8 years agodrm/amdgpu: process sched job exactly triggered by fence signal
Chunming Zhou [Wed, 5 Aug 2015 11:52:14 +0000 (19:52 +0800)]
drm/amdgpu: process sched job exactly triggered by fence signal

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agoRevert "drm/amdgpu: return new seq_no for amd_sched_push_job"
Chunming Zhou [Wed, 5 Aug 2015 11:07:08 +0000 (19:07 +0800)]
Revert "drm/amdgpu: return new seq_no for amd_sched_push_job"

This reverts commit d1d33da8eb86b8ca41dd9ed95738030df5267b95.

Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Conflicts:
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

8 years agodrm/amdgpu: cleanup amdgpu_ctx inti/fini v2
Christian König [Tue, 4 Aug 2015 15:51:05 +0000 (17:51 +0200)]
drm/amdgpu: cleanup amdgpu_ctx inti/fini v2

Cleanup the kernel context handling.

v2: rebased

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
8 years agodrm/amdgpu: stop leaking the ctx id into the scheduler v2
Christian König [Tue, 4 Aug 2015 14:58:36 +0000 (16:58 +0200)]
drm/amdgpu: stop leaking the ctx id into the scheduler v2

Id's are for the IOCTL ABI only.

v2: remove tgid as well

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: cleanup ctx_mgr init/fini
Christian König [Tue, 4 Aug 2015 14:20:31 +0000 (16:20 +0200)]
drm/amdgpu: cleanup ctx_mgr init/fini

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: fix bo list handling in CS
Christian König [Tue, 4 Aug 2015 09:54:48 +0000 (11:54 +0200)]
drm/amdgpu: fix bo list handling in CS

We didn't initialized the mutex in the cloned bo list resulting in nice
warnings from lockdep. Also fixes error handling in this function.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: reorder the code to avoid forward declerations
Christian König [Mon, 3 Aug 2015 18:39:12 +0000 (20:39 +0200)]
drm/amdgpu: reorder the code to avoid forward declerations

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: move sched job process from isr to fence callback
Chunming Zhou [Tue, 4 Aug 2015 03:30:09 +0000 (11:30 +0800)]
drm/amdgpu: move sched job process from isr to fence callback

This way can avoid interrupt lost, and can process sched job exactly.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
8 years agodrm/amdgpu: add amd_sched_next_queued_seq function
Jammy Zhou [Mon, 3 Aug 2015 02:27:57 +0000 (10:27 +0800)]
drm/amdgpu: add amd_sched_next_queued_seq function

This function is used to get the next queued sequence number

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: make last_handled_seq atomic
Jammy Zhou [Fri, 31 Jul 2015 09:54:29 +0000 (17:54 +0800)]
drm/amdgpu: make last_handled_seq atomic

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add amd_sched_commit
Jammy Zhou [Fri, 31 Jul 2015 09:18:15 +0000 (17:18 +0800)]
drm/amdgpu: add amd_sched_commit

This function is to update last_emitted_v_seq and wake up the waiters.

It should be called by driver in the run_job backend function

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: return new seq_no for amd_sched_push_job
Jammy Zhou [Fri, 31 Jul 2015 08:47:28 +0000 (16:47 +0800)]
drm/amdgpu: return new seq_no for amd_sched_push_job

It is clean to update last_queued_v_seq in the scheduler module

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: some code refinement v2
Jammy Zhou [Thu, 30 Jul 2015 09:19:52 +0000 (17:19 +0800)]
drm/amdgpu: some code refinement v2

Fix the code alignment, etc.

v2: rebase the code

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: fix null pointer by previous cleanup
Chunming Zhou [Mon, 3 Aug 2015 12:02:43 +0000 (20:02 +0800)]
drm/amdgpu: fix null pointer by previous cleanup

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: add kernel fence in ib_submit_kernel_helper
Chunming Zhou [Mon, 3 Aug 2015 03:43:19 +0000 (11:43 +0800)]
drm/amdgpu: add kernel fence in ib_submit_kernel_helper

every sbumission should be able to get a fence.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
8 years agodrm/amdgpu: use kernel fence for sdma ib test
Chunming Zhou [Mon, 3 Aug 2015 05:22:35 +0000 (13:22 +0800)]
drm/amdgpu: use kernel fence for sdma ib test

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
8 years agodrm/amdgpu: use kernel fence for gfx ib test
Chunming Zhou [Mon, 3 Aug 2015 05:19:43 +0000 (13:19 +0800)]
drm/amdgpu: use kernel fence for gfx ib test

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
8 years agodrm/amdgpu: use kernel fence in amdgpu_test
Chunming Zhou [Mon, 3 Aug 2015 08:19:29 +0000 (16:19 +0800)]
drm/amdgpu: use kernel fence in amdgpu_test

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
8 years agodrm/amdgpu: use kernel fence for vce ib test
Chunming Zhou [Mon, 3 Aug 2015 05:28:16 +0000 (13:28 +0800)]
drm/amdgpu: use kernel fence for vce ib test

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
8 years agodrm/amdgpu: change uvd ib test to use kernel fence directly
Chunming Zhou [Mon, 3 Aug 2015 05:11:04 +0000 (13:11 +0800)]
drm/amdgpu: change uvd ib test to use kernel fence directly

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
8 years agodrm/amdgpu: use kernel fence for last_pt_update
Chunming Zhou [Mon, 3 Aug 2015 10:19:38 +0000 (18:19 +0800)]
drm/amdgpu: use kernel fence for last_pt_update

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
8 years agodrm/amdgpu: use kernel fence diretly in amdgpu_bo_fence
Chunming Zhou [Mon, 3 Aug 2015 03:38:09 +0000 (11:38 +0800)]
drm/amdgpu: use kernel fence diretly in amdgpu_bo_fence

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
8 years agodrm/amdgpu: clean up amd sched wait_ts and wait_signal
Christian König [Fri, 31 Jul 2015 12:31:49 +0000 (14:31 +0200)]
drm/amdgpu: clean up amd sched wait_ts and wait_signal

Remove code not used at the moment.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: stop using addr to check for BO move v3
Christian König [Thu, 30 Jul 2015 09:53:42 +0000 (11:53 +0200)]
drm/amdgpu: stop using addr to check for BO move v3

It is theoretically possible that a swapped out BO gets the
same GTT address, but different backing pages while being swapped in.

Instead just use another VA state to note updated areas.
Ported from not upstream yet radeon commit with the same name.

v2: fix some bugs in the original implementation found in the radeon code.
v3: squash in VCE/UVD fix

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: move wait_queue_head from adev to ring (v2)
monk.liu [Thu, 30 Jul 2015 10:28:12 +0000 (18:28 +0800)]
drm/amdgpu: move wait_queue_head from adev to ring (v2)

thus unnecessary wake up could be avoid between rings
v2:
move wait_queue_head to fence_drv from ring

Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agodrm/amdgpu: re-implement fence_default_wait
monk.liu [Thu, 30 Jul 2015 10:26:18 +0000 (18:26 +0800)]
drm/amdgpu: re-implement fence_default_wait

use fence_wait_any to implement fence_default_wait

Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agodrm/amdgpu: new implement for fence_wait_any (v2)
monk.liu [Thu, 30 Jul 2015 07:19:05 +0000 (15:19 +0800)]
drm/amdgpu: new implement for fence_wait_any (v2)

origninal method will sleep/schedule at the granurarity of HZ/2 and
based on seq signal method, the new implement is based on kernel fance
interface, no unnecessary schedule at all

v2: replace logic of original amdgpu_fence_wait_any

Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agodrm/amdgpu: use kernel fence interface when possible
monk.liu [Thu, 30 Jul 2015 06:56:18 +0000 (14:56 +0800)]
drm/amdgpu: use kernel fence interface when possible

Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agodrm/amdgpu: use scheduler for VCE ib test
Chunming Zhou [Fri, 3 Jul 2015 06:18:26 +0000 (14:18 +0800)]
drm/amdgpu: use scheduler for VCE ib test

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: use scheduler for UVD ib test
Chunming Zhou [Fri, 3 Jul 2015 06:08:18 +0000 (14:08 +0800)]
drm/amdgpu: use scheduler for UVD ib test

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: use gpu scheduler for sdma ib test
Chunming Zhou [Mon, 1 Jun 2015 07:33:20 +0000 (15:33 +0800)]
drm/amdgpu: use gpu scheduler for sdma ib test

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: Use gpu scheduler for gfx ring ib test
Chunming Zhou [Mon, 1 Jun 2015 07:16:03 +0000 (15:16 +0800)]
drm/amdgpu: Use gpu scheduler for gfx ring ib test

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: add helper function for kernel submission
Chunming Zhou [Wed, 29 Jul 2015 02:33:14 +0000 (10:33 +0800)]
drm/amdgpu: add helper function for kernel submission

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: fix seq in ctx_add_fence
Chunming Zhou [Thu, 30 Jul 2015 09:59:43 +0000 (17:59 +0800)]
drm/amdgpu: fix seq in ctx_add_fence

if enabling scheduler, then the queued seq is assigned
when pushing job before emitting job.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: wait forever for wait emit
Chunming Zhou [Tue, 28 Jul 2015 09:31:04 +0000 (17:31 +0800)]
drm/amdgpu: wait forever for wait emit

the job must be emitted by scheduler, otherwise scheduler is abnormal.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: add amdgpu.sched_hw_submission option
Jammy Zhou [Thu, 30 Jul 2015 08:44:05 +0000 (16:44 +0800)]
drm/amdgpu: add amdgpu.sched_hw_submission option

This option can be used to specify the max number of submissions in the
active HW queue. The default value is 2 now.

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: add amdgpu.sched_jobs option
Jammy Zhou [Thu, 30 Jul 2015 08:36:58 +0000 (16:36 +0800)]
drm/amdgpu: add amdgpu.sched_jobs option

This option can be used to specify the max job number in the job queue,
and it is 16 by default.

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: silent the message for GPU scheduler creation
Jammy Zhou [Thu, 30 Jul 2015 08:24:53 +0000 (16:24 +0800)]
drm/amdgpu: silent the message for GPU scheduler creation

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
8 years agodrm/amdgpu: fix syncing to VM updates
Christian König [Mon, 27 Jul 2015 13:40:35 +0000 (15:40 +0200)]
drm/amdgpu: fix syncing to VM updates

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add check for callback
Chunming Zhou [Tue, 28 Jul 2015 08:11:52 +0000 (16:11 +0800)]
drm/amdgpu: add check for callback

it is possible that the callback isn't defined sometimes.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
8 years agodrm/amdgpu: add enable_scheduler module option
Jammy Zhou [Wed, 27 May 2015 10:23:34 +0000 (18:23 +0800)]
drm/amdgpu: add enable_scheduler module option

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Acked-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
8 years agodrm/amdgpu: protect fence_process from multiple context
Chunming Zhou [Fri, 24 Jul 2015 02:49:47 +0000 (10:49 +0800)]
drm/amdgpu: protect fence_process from multiple context

fence_process may be called from kthread, user thread and interrupt context.
it is possible to called concurrently, then will wake up fence queue multiple times.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
8 years agodrm/amdgpu: add sched isr to fence process
Chunming Zhou [Tue, 21 Jul 2015 09:43:41 +0000 (17:43 +0800)]
drm/amdgpu: add sched isr to fence process

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
8 years agodrm/amdgpu: dispatch job for vm
Chunming Zhou [Tue, 21 Jul 2015 08:52:10 +0000 (16:52 +0800)]
drm/amdgpu: dispatch job for vm

use kernel context to submit command for vm

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Acked-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>