Change queue/pipe split between amdkfd and amdgpu

2017-02-03 Thread Andres Rodriguez
The current queue/pipe split policy is for amdgpu to take the first pipe of MEC0 and leave the rest for amdkfd to use. This policy is taken as an assumption in a few areas of the implementation. This patch series aims to allow for flexible/tunable queue/pipe split policies between kgd and kfd. It

[PATCH 02/13] drm/amdgpu: doorbell registers need only be set once

2017-02-03 Thread Andres Rodriguez
The CP_MEC_DOORBELL_RANGE_* and CP_PQ_STATUS.DOORBELL_ENABLE registers are not HQD specific. They only need to be set once if at least 1 pipe requested doorbell support. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/d

Re: Change queue/pipe split between amdkfd and amdgpu

2017-02-08 Thread Andres Rodriguez
, Felix On 17-02-03 11:51 PM, Andres Rodriguez wrote: The current queue/pipe split policy is for amdgpu to take the first pipe of MEC0 and leave the rest for amdkfd to use. This policy is taken as an assumption in a few areas of the implementation. This patch series aims to allow for flexible

Re: [PATCH 02/13] drm/amdgpu: doorbell registers need only be set once

2017-02-08 Thread Andres Rodriguez
On 2017-02-06 03:31 AM, Christian König wrote: Am 04.02.2017 um 05:51 schrieb Andres Rodriguez: The CP_MEC_DOORBELL_RANGE_* and CP_PQ_STATUS.DOORBELL_ENABLE registers are not HQD specific. They only need to be set once if at least 1 pipe requested doorbell support. Signed-off-by: Andres

Re: Change queue/pipe split between amdkfd and amdgpu

2017-02-08 Thread Andres Rodriguez
Thank you Oded. - Andres On 2017-02-08 02:32 PM, Oded Gabbay wrote: On Wed, Feb 8, 2017 at 6:23 PM, Andres Rodriguez <andre...@gmail.com> wrote: Hey Felix, Thanks for the pointer to the ROCm mqd commit. I like that the workarounds are easy to spot. I'll add that to a new patch seri

Re: [PATCH] autodetect path to libdrm

2017-02-05 Thread Andres Rodriguez
Hey Tom, Overall in cmake calling pkg_check_modules() directly is usually not a good practice. The common approach is to have a file in cmake/modules/Find$(name).cmake that takes care of everything. For example, you could use this FindLibdrm.cmake from the KDE project:

Re: [RFC]: More robust build sys for UMR

2017-02-05 Thread Andres Rodriguez
Hey Tom, It's great to see umr make it to the public. I've given it a quick spin and it is pretty awesome, although I don't have much time this weekend to play with it. Wanted to weigh in my 2c regarding cmake. Some of the things I like about cmake: * Compatible with out of tree builds by

[PATCH 13/13] drm/amdgpu: new queue policy, take first 2 queues of each pipe

2017-02-03 Thread Andres Rodriguez
goes from 1 pipe to 4 pipes, i.e. from 1 compute threads to 4 amdkfd goes from 3 pipe to 4 pipes, i.e. from 3 compute threads to 4 Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- 2 files chan

[PATCH 10/13] drm/amdkfd: allow split HQD split on per-queue granularity

2017-02-03 Thread Andres Rodriguez
Update the KGD to KFD interface to allow sharing pipes with queue granularity instead of pipe granularity. This allows for more interesting pipe/queue splits. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 22 - drivers/g

[PATCH 08/13] drm/radeon: take ownership of pipe initialization

2017-02-03 Thread Andres Rodriguez
Take ownership of pipe initialization away from KFD. Note that hpd_eop_gpu_addr was already large enough to accomodate all pipes. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/radeon/cik.c| 27 ++- drivers/gpu/drm/radeon/radeon

[PATCH 05/13] drm/amdgpu: unify MQD programming sequence for kfd and amdgpu

2017-02-03 Thread Andres Rodriguez
Use the same gfx_*_mqd_commit function for kfd and amdgpu codepaths. This removes the last duplicates of this programming sequence. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 51 ++- drivers/gpu/drm/amd/

[PATCH 06/13] drm/amdgpu: rename rdev to adev

2017-02-03 Thread Andres Rodriguez
Rename straggler instances of r(adeon)dev to a(mdgpu)dev Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 70 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 14 +++--- drivers/gpu/drm/amd/amdgpu/gfx_

[PATCH 11/13] drm/amdgpu: remove duplicate magic constants from amdgpu_amdkfd_gfx*.c

2017-02-03 Thread Andres Rodriguez
This information is already available in adev. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 12 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 12 ++-- 2 files changed, 12 insertions(+), 12 del

[PATCH 09/13] drm/amdgpu: allow split of queues with kfd at queue granularity

2017-02-03 Thread Andres Rodriguez
Previously the queue/pipe split with kfd operated with pipe granularity. This patch allows amdgpu to take ownership of an arbitrary set of queues. It also consolidates the last few magic numbers in the compute initialization process into mec_init. Signed-off-by: Andres Rodriguez <an

[PATCH 12/13] drm/amdgpu: allocate queues horizontally across pipes

2017-02-03 Thread Andres Rodriguez
-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 13 ++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 78 +++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 83 +-- 3 files changed, 109 insertions(+), 65 del

[PATCH 04/13] drm/amdgpu: remove duplicate definition of cik_mqd

2017-02-03 Thread Andres Rodriguez
The gfxv7 contains a slightly different version of cik_mqd called bonaire_mqd. This can introduce subtle bugs if fixes are not applied in both places. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 135 ++

Re: [PATCH] autodetect path to libdrm

2017-02-05 Thread Andres Rodriguez
wholesale rip off KDE since their license (appears to be BSDish) is different. I may just clone the one Edward provided as you suggested instead. Tom ---- *From:* Andres Rodriguez <andre...@gmail.com> *Sent:* Sunday, Feb

Re: [PATCH] Autodetect libdrm path (v2)

2017-02-05 Thread Andres Rodriguez
Reviewed-by: Andres Rodriguez<andre...@gmail.com> On 2/5/2017 5:24 PM, Tom St Denis wrote: (v2): Use findLibDRM script instead of directly finding path Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- CMakeLists.txt | 3 +++ cmake_modules/FindLibDR

Re: [PATCH] drm/amdgpu: trace amdgpu_job fence details

2017-02-23 Thread Andres Rodriguez
On 2017-02-23 02:46 PM, Andres Rodriguez wrote: On 2017-02-23 03:20 AM, Christian König wrote: Am 23.02.2017 um 00:47 schrieb Andres Rodriguez: This trace is intended to provide the required information to associate the completion of an amdgpu_job with its corresponding dma_fence_

[PATCH 1/2] drm/amdgpu: make trace format uniform csv name=value

2017-02-24 Thread Andres Rodriguez
Most of the traces have uniform format except for two of them. Having all the traces match makes it simple to run awk on the ftrace output. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[PATCH 2/2] drm/amdgpu: trace fence details in amdgpu_sched_run_job

2017-02-24 Thread Andres Rodriguez
This information is intended to provide the required data to associate amdgpu tracepoints with their corresponding dma_fence_* events. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 11 +-- 1 file changed, 9 insertions(+), 2 del

Re: [PATCH] drm/amdgpu: trace amdgpu_job fence details

2017-02-24 Thread Andres Rodriguez
On 2017-02-24 03:13 AM, Christian König wrote: Am 23.02.2017 um 21:48 schrieb Andres Rodriguez: On 2017-02-23 02:46 PM, Andres Rodriguez wrote: On 2017-02-23 03:20 AM, Christian König wrote: Am 23.02.2017 um 00:47 schrieb Andres Rodriguez: This trace is intended to provide the required

Associate dma_fence and amdpgu tracepoints

2017-02-24 Thread Andres Rodriguez
This patch series is an meant to supersede: drm/amdgpu: trace amdgpu_job fence details It uses a different approach of tracking through the scheduler fence instead of the amdgpu job fence. The difference between using these two fences account for a maximum of 1us of latency as measured by

Re: [PATCH 2/2] drm/amdgpu: trace fence details in amdgpu_sched_run_job

2017-02-25 Thread Andres Rodriguez
On Feb 25, 2017 4:40 AM, "Christian König" <deathsim...@vodafone.de> wrote: Am 24.02.2017 um 19:20 schrieb Andres Rodriguez: > This information is intended to provide the required data to associate > amdgpu tracepoints with their corresponding dma_fence_* events. >

[PATCH] drm/amdgpu: trace amdgpu_job fence details

2017-02-22 Thread Andres Rodriguez
This trace is intended to provide the required information to associate the completion of an amdgpu_job with its corresponding dma_fence_* tracepoints. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 ++ drivers/gpu/drm/amd/

Re: [PATCH umr] Allow * for ipname in --read/--write/--write-bit

2017-02-23 Thread Andres Rodriguez
On 2017-02-23 09:46 AM, Tom St Denis wrote: To simplify scripting you can now use * for ipnames as well. Thanks for the patch, this change is very welcome. Signed-off-by: Tom St Denis --- doc/umr.1 | 6 ++- src/app/main.c| 5 ++- src/app/scan.c|

Re: Change queue/pipe split between amdkfd and amdgpu

2017-02-10 Thread Andres Rodriguez
160389] ---[ end trace f6a8177c7119c1f5 ]--- [ 163.160390] Fixing recursive fault but reboot is needed! On Thu, Feb 9, 2017 at 10:38 PM, Andres Rodriguez <andre...@gmail.com> wrote: Hey Oded, Sorry to be a nuisance, but if you have everything still setup could you give this fix a quick go?

[PATCH 21/22] drm/amdgpu: condense mqd programming sequence

2017-02-28 Thread Andres Rodriguez
The MQD structure matches the reg layout. Take advantage of this to simplify HQD programming. Note that the ACTIVE field still needs to be programmed last. Suggested-by: Felix Kuehling <felix.kuehl...@amd.com> Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/dr

[PATCH 22/22] drm/amdgpu: workaround tonga HW bug in HQD programming sequence

2017-02-28 Thread Andres Rodriguez
repository: https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver.git CC: Jay Cornwall <jay.cornw...@amd.com> Suggested-by: Felix Kuehling <felix.kuehl...@amd.com> Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++-

[PATCH 20/22] drm/amdgpu: implement ring set_priority for gfx_v8 compute

2017-02-28 Thread Andres Rodriguez
further latency, we reserve CUs 2+ for high priority compute on-demand. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c

[PATCH 17/22] drm/amdgpu: implement lru amdgpu_queue_mgr policy for compute

2017-02-28 Thread Andres Rodriguez
. In order to better distribute work across multiple HW queues, we adopt a policy to map the usermode ring ids to the LRU HW queue. This fixes a large majority of multi-app compute workloads sharing the same HW queue, even though 7 other queues are available. Signed-off-by: Andres Rodriguez <an

[PATCH 04/22] drm/amdgpu: remove duplicate definition of cik_mqd

2017-02-28 Thread Andres Rodriguez
The gfxv7 contains a slightly different version of cik_mqd called bonaire_mqd. This can introduce subtle bugs if fixes are not applied in both places. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 135 ++

[PATCH 08/22] drm/radeon: take ownership of pipe initialization

2017-02-28 Thread Andres Rodriguez
Take ownership of pipe initialization away from KFD. Note that hpd_eop_gpu_addr was already large enough to accomodate all pipes. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/radeon/cik.c| 27 ++- drivers/gpu/drm/radeon/radeon

[PATCH 06/22] drm/amdgpu: rename rdev to adev

2017-02-28 Thread Andres Rodriguez
Rename straggler instances of r(adeon)dev to a(mdgpu)dev Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 70 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 14 +++--- drivers/gpu/drm/amd/amdgpu/gfx_

[PATCH 05/22] drm/amdgpu: unify MQD programming sequence for kfd and amdgpu

2017-02-28 Thread Andres Rodriguez
Use the same gfx_*_mqd_commit function for kfd and amdgpu codepaths. This removes the last duplicates of this programming sequence. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 51 ++- drivers/gpu/drm/amd/

Add support for high priority scheduling in amdgpu

2017-02-28 Thread Andres Rodriguez
This patch series introduces a mechanism that allows users with sufficient privileges to categorize their work as "high priority". A userspace app can create a high priority amdgpu context, where any work submitted to this context will receive preferential treatment over any other work. High

[PATCH 02/22] drm/amdgpu: doorbell registers need only be set once v2

2017-02-28 Thread Andres Rodriguez
The CP_MEC_DOORBELL_RANGE_* and CP_PQ_STATUS.DOORBELL_ENABLE registers are not HQD specific. They only need to be set once if at least 1 pipe requested doorbell support. v2: move doorbell_enable to amdgpu_gfx instead of amdgpu_device Signed-off-by: Andres Rodriguez <andre...@gmail.

[PATCH 07/22] drm/amdgpu: take ownership of per-pipe configuration

2017-02-28 Thread Andres Rodriguez
Make amdgpu the owner of all per-pipe state of the HQDs. This change will allow us to split the queues between kfd and amdgpu with a queue granularity instead of pipe granularity. This patch fixes kfd allocating an HDP_EOP region for its 3 pipes which goes unused. Signed-off-by: Andres

[PATCH 13/22] drm/amdgpu: allocate queues horizontally across pipes

2017-02-28 Thread Andres Rodriguez
-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 13 ++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 78 +++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 83 +-- 3 files changed, 109 insertions(+), 65 del

[PATCH 03/22] drm/amdgpu: detect timeout error when deactivating hqd

2017-02-28 Thread Andres Rodriguez
Handle HQD deactivation timeouts instead of ignoring them. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/d

[PATCH 14/22] drm/amdgpu: new queue policy, take first 2 queues of each pipe

2017-02-28 Thread Andres Rodriguez
goes from 1 pipe to 4 pipes, i.e. from 1 compute threads to 4 amdkfd goes from 3 pipe to 4 pipes, i.e. from 3 compute threads to 4 Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- 2 files chan

[PATCH 16/22] drm/amdgpu: add a mechanism to untie user ring ids from kernel ring ids

2017-02-28 Thread Andres Rodriguez
multiple rings. Userspace clients are unable to check whether a specific resource is in use by a different client. Therefore, it is up to the kernel driver to make the optimal choice. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- d

[PATCH 01/22] drm/amdgpu: refactor MQD/HQD initialization

2017-02-28 Thread Andres Rodriguez
updated to deal with the new code structure. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 447 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 417 +++ 2 files changed, 387 insertions(+

[PATCH 11/22] drm/amdkfd: allow split HQD on per-queue granularity v3

2017-02-28 Thread Andres Rodriguez
com> Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 22 - drivers/gpu/drm/amd/amdkfd/kfd_device.c| 4 + .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 100 ++--- .../gpu/dr

[PATCH 18/22] drm/amdgpu: add flag for high priority contexts v4

2017-02-28 Thread Andres Rodriguez
of _NORMAL _HIGH for backwards compatibility v4: Validate usermode priority and store it Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 41 +++ drivers/gpu/d

[PATCH 09/22] drm/amdgpu: allow split of queues with kfd at queue granularity

2017-02-28 Thread Andres Rodriguez
Previously the queue/pipe split with kfd operated with pipe granularity. This patch allows amdgpu to take ownership of an arbitrary set of queues. It also consolidates the last few magic numbers in the compute initialization process into mec_init. Signed-off-by: Andres Rodriguez <an

[PATCH 12/22] drm/amdgpu: remove duplicate magic constants from amdgpu_amdkfd_gfx*.c

2017-02-28 Thread Andres Rodriguez
This information is already available in adev. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 12 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 12 ++-- 2 files changed, 12 insertions(+), 12 del

[PATCH 15/22] drm/amdgpu: add hw_ip member to amdgpu_ring

2017-02-28 Thread Andres Rodriguez
Keep track of a ring's HW IP block so we can identify it later. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 5 +++-- drivers/gpu/drm/amd/amdgpu/cik_sdma.c| 2 +- drivers/gpu/d

[PATCH 04/22] drm/amdgpu: remove duplicate definition of cik_mqd

2017-03-01 Thread Andres Rodriguez
The gfxv7 contains a slightly different version of cik_mqd called bonaire_mqd. This can introduce subtle bugs if fixes are not applied in both places. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 135 ++

[PATCH 18/22] drm/amdgpu: add framework for HW specific priority settings v2

2017-03-01 Thread Andres Rodriguez
() can now be populated to take care of the HW specific programming sequence for priority changes. v2: set priority before emitting IB, and take a ref on amdgpu_job Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +- drivers/gpu/drm/amd/

[PATCH 10/22] drm/amdgpu: teach amdgpu how to enable interrupts for any pipe

2017-03-01 Thread Andres Rodriguez
The current implementation is hardcoded to enable ME1/PIPE0 interrupts only. This patch allows amdgpu to enable interrupts for any pipe of ME1. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 48 +-- drive

[PATCH 16/22] drm/amdgpu: implement lru amdgpu_queue_mgr policy for compute v2

2017-03-01 Thread Andres Rodriguez
f ring->hw_ip Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 52 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_r

[PATCH 22/22] drm/amdgpu: workaround tonga HW bug in HQD programming sequence

2017-03-01 Thread Andres Rodriguez
repository: https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver.git CC: Jay Cornwall <jay.cornw...@amd.com> Suggested-by: Felix Kuehling <felix.kuehl...@amd.com> Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++-

[PATCH 15/22] drm/amdgpu: add a mechanism to untie user ring ids from kernel ring ids

2017-03-01 Thread Andres Rodriguez
that support multiple rings. Userspace clients are unable to check whether a specific resource is in use by a different client. Therefore, it is up to the kernel driver to make the optimal choice. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/Makefile

[PATCH 20/22] drm/amdgpu: implement ring set_priority for gfx_v8 compute v2

2017-03-01 Thread Andres Rodriguez
further latency, we reserve CUs 2+ for high priority compute on-demand. v2: fix srbm_select to ring->queue and use ring->funcs->type Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 11/22] drm/amdkfd: allow split HQD on per-queue granularity v4

2017-03-01 Thread Andres Rodriguez
() Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 22 - drivers/gpu/drm/amd/amdkfd/kfd_device.c| 4 + .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 100 ++--- .../gpu/drm/amd/

[PATCH 17/22] drm/amdgpu: add parameter to allocate high priority contexts v5

2017-03-01 Thread Andres Rodriguez
of _NORMAL _HIGH for backwards compatibility v4: Validate usermode priority and store it v5: Move priority validation into amdgpu_ctx_ioctl(), headline reword Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/

[PATCH 03/22] drm/amdgpu: detect timeout error when deactivating hqd

2017-03-01 Thread Andres Rodriguez
Handle HQD deactivation timeouts instead of ignoring them. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/d

[PATCH 02/22] drm/amdgpu: doorbell registers need only be set once v2

2017-03-01 Thread Andres Rodriguez
The CP_MEC_DOORBELL_RANGE_* and CP_PQ_STATUS.DOORBELL_ENABLE registers are not HQD specific. They only need to be set once if at least 1 pipe requested doorbell support. v2: move doorbell_enable to amdgpu_gfx instead of amdgpu_device Signed-off-by: Andres Rodriguez <andre...@gmail.

[PATCH 21/22] drm/amdgpu: condense mqd programming sequence

2017-03-01 Thread Andres Rodriguez
The MQD structure matches the reg layout. Take advantage of this to simplify HQD programming. Note that the ACTIVE field still needs to be programmed last. Suggested-by: Felix Kuehling <felix.kuehl...@amd.com> Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/dr

[PATCH 05/22] drm/amdgpu: unify MQD programming sequence for kfd and amdgpu

2017-03-01 Thread Andres Rodriguez
Use the same gfx_*_mqd_commit function for kfd and amdgpu codepaths. This removes the last duplicates of this programming sequence. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 51 ++- drivers/gpu/drm/amd/

[PATCH 01/22] drm/amdgpu: refactor MQD/HQD initialization

2017-03-01 Thread Andres Rodriguez
updated to deal with the new code structure. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 447 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 417 +++ 2 files changed, 387 insertions(+

[PATCH 14/22] drm/amdgpu: new queue policy, take first 2 queues of each pipe

2017-03-01 Thread Andres Rodriguez
goes from 1 pipe to 4 pipes, i.e. from 1 compute threads to 4 amdkfd goes from 3 pipe to 4 pipes, i.e. from 3 compute threads to 4 Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- 2 files chan

[PATCH 09/22] drm/amdgpu: allow split of queues with kfd at queue granularity

2017-03-01 Thread Andres Rodriguez
Previously the queue/pipe split with kfd operated with pipe granularity. This patch allows amdgpu to take ownership of an arbitrary set of queues. It also consolidates the last few magic numbers in the compute initialization process into mec_init. Signed-off-by: Andres Rodriguez <an

[PATCH 12/22] drm/amdgpu: remove duplicate magic constants from amdgpu_amdkfd_gfx*.c

2017-03-01 Thread Andres Rodriguez
This information is already available in adev. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 12 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 12 ++-- 2 files changed, 12 insertions(+), 12 del

[PATCH] Add support for high priority scheduling in amdgpu v2

2017-03-01 Thread Andres Rodriguez
Updated based on feedback from last review. One commit was dropped: [PATCH 15/22] drm/amdgpu: add hw_ip member to amdgpu_ring One new commit in this version: [PATCH 19/22] drm/amdgpu: make amdgpu_job refcounted ___ amd-gfx mailing list

[PATCH 13/22] drm/amdgpu: allocate queues horizontally across pipes

2017-03-01 Thread Andres Rodriguez
-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 13 ++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 78 +++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 83 +-- 3 files changed, 109 insertions(+), 65 del

[PATCH 08/22] drm/radeon: take ownership of pipe initialization

2017-03-01 Thread Andres Rodriguez
Take ownership of pipe initialization away from KFD. Note that hpd_eop_gpu_addr was already large enough to accomodate all pipes. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/radeon/cik.c| 27 ++- drivers/gpu/drm/radeon/radeon

[PATCH 19/22] drm/amdgpu: make amdgpu_job refcounted

2017-03-01 Thread Andres Rodriguez
The job structure is shared between multiple components, gpu_scheduler and amdgpu. Make each user hold its own reference to simplify resource free-ing. This will also be useful for adding extra callbacks on job completion. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/g

[PATCH 07/22] drm/amdgpu: take ownership of per-pipe configuration

2017-03-01 Thread Andres Rodriguez
Make amdgpu the owner of all per-pipe state of the HQDs. This change will allow us to split the queues between kfd and amdgpu with a queue granularity instead of pipe granularity. This patch fixes kfd allocating an HDP_EOP region for its 3 pipes which goes unused. Signed-off-by: Andres

Re: [PATCH 19/22] drm/amdgpu: add framework for HW specific priority settings

2017-03-01 Thread Andres Rodriguez
On 2017-03-01 12:44 PM, Andres Rodriguez wrote: On 2017-03-01 10:49 AM, Alex Deucher wrote: On Wed, Mar 1, 2017 at 2:27 AM, zhoucm1 <david1.z...@amd.com> wrote: On 2017年03月01日 06:14, Andres Rodriguez wrote: Add an initial framework for changing the HW priorities of rings. The fra

Re: Add support for high priority scheduling in amdgpu

2017-03-01 Thread Andres Rodriguez
a dumb mistake on my part. Probably got lucky that I was hitting queue 0 and also rebooting between tests. Regards, Andres -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Andres Rodriguez Sent: Tuesday, February 28, 2017 5:14 PM To: amd-gfx@list

Re: Add support for high priority scheduling in amdgpu

2017-03-01 Thread Andres Rodriguez
On 2017-03-01 12:13 PM, Andres Rodriguez wrote: On 3/1/2017 6:42 AM, Christian König wrote: Patches #1-#14 are Acked-by: Christian König <christian.koe...@amd.com>. Patch #15: Not sure if that is a good idea or not, need to take a closer look after digging through the rest. In g

Re: [PATCH 19/22] drm/amdgpu: add framework for HW specific priority settings

2017-03-01 Thread Andres Rodriguez
On 2017-03-01 10:49 AM, Alex Deucher wrote: On Wed, Mar 1, 2017 at 2:27 AM, zhoucm1 <david1.z...@amd.com> wrote: On 2017年03月01日 06:14, Andres Rodriguez wrote: Add an initial framework for changing the HW priorities of rings. The framework allows requesting priority changes for the li

Re: Add support for high priority scheduling in amdgpu

2017-03-01 Thread Andres Rodriguez
for either 1) refcounting the job structure, or 2) allocating a new piece of memory to store the callback parameters? Patches #20-#22 are Acked-by: Christian König <christian.koe...@amd.com>. Regards, Christian. Am 28.02.2017 um 23:14 schrieb Andres Rodriguez: This patch series introduc

Re: [PATCH 18/22] drm/amdgpu: add flag for high priority contexts v4

2017-03-01 Thread Andres Rodriguez
nailed down early and avoid changing. So any nitpicks here are more than welcome now (better than later :) ) On 28 February 2017 at 22:14, Andres Rodriguez <andre...@gmail.com> wrote: Add a new context creation parameter to express a global context priority. Contexts all

[PATCH 18/22] drm/amdgpu: add framework for HW specific priority settings v3

2017-03-02 Thread Andres Rodriguez
() can now be populated to take care of the HW specific programming sequence for priority changes. v2: set priority before emitting IB, and take a ref on amdgpu_job v3: use AMD_SCHED_PRIORITY_* instead of AMDGPU_CTX_PRIORITY_* Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/g

[PATCH 20/22] drm/amdgpu: implement ring set_priority for gfx_v8 compute v3

2017-03-02 Thread Andres Rodriguez
further latency, we reserve CUs 2+ for high priority compute on-demand. v2: fix srbm_select to ring->queue and use ring->funcs->type v3: use AMD_SCHED_PRIORITY_* instead of AMDGPU_CTX_PRIORITY_* Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH 22/22] drm/amdgpu: workaround tonga HW bug in HQD programming sequence

2017-03-02 Thread Andres Rodriguez
repository: https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver.git CC: Jay Cornwall <jay.cornw...@amd.com> Suggested-by: Felix Kuehling <felix.kuehl...@amd.com> Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++-

[PATCH 03/22] drm/amdgpu: detect timeout error when deactivating hqd

2017-03-02 Thread Andres Rodriguez
Handle HQD deactivation timeouts instead of ignoring them. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/d

[PATCH 13/22] drm/amdgpu: allocate queues horizontally across pipes

2017-03-02 Thread Andres Rodriguez
-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 13 ++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 78 +++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 83 +-- 3 files changed, 109 insertions(+), 65 del

[PATCH 10/22] drm/amdgpu: teach amdgpu how to enable interrupts for any pipe

2017-03-02 Thread Andres Rodriguez
The current implementation is hardcoded to enable ME1/PIPE0 interrupts only. This patch allows amdgpu to enable interrupts for any pipe of ME1. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 48 +-- drive

[PATCH 19/22] drm/amdgpu: make amdgpu_job refcounted

2017-03-02 Thread Andres Rodriguez
The job structure is shared between multiple components, gpu_scheduler and amdgpu. Make each user hold its own reference to simplify resource free-ing. This will also be useful for adding extra callbacks on job completion. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/g

[PATCH 08/22] drm/radeon: take ownership of pipe initialization

2017-03-02 Thread Andres Rodriguez
Take ownership of pipe initialization away from KFD. Note that hpd_eop_gpu_addr was already large enough to accomodate all pipes. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/radeon/cik.c| 27 ++- drivers/gpu/drm/radeon/radeon

[PATCH 05/22] drm/amdgpu: unify MQD programming sequence for kfd and amdgpu

2017-03-02 Thread Andres Rodriguez
Use the same gfx_*_mqd_commit function for kfd and amdgpu codepaths. This removes the last duplicates of this programming sequence. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 51 ++- drivers/gpu/drm/amd/

[PATCH 11/22] drm/amdkfd: allow split HQD on per-queue granularity v4

2017-03-02 Thread Andres Rodriguez
() Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 22 - drivers/gpu/drm/amd/amdkfd/kfd_device.c| 4 + .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 100 ++--- .../gpu/drm/amd/

[PATCH 14/22] drm/amdgpu: new queue policy, take first 2 queues of each pipe

2017-03-02 Thread Andres Rodriguez
goes from 1 pipe to 4 pipes, i.e. from 1 compute threads to 4 amdkfd goes from 3 pipe to 4 pipes, i.e. from 3 compute threads to 4 Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- 2 files chan

[PATCH 06/22] drm/amdgpu: rename rdev to adev

2017-03-02 Thread Andres Rodriguez
Rename straggler instances of r(adeon)dev to a(mdgpu)dev Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 70 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 14 +++--- drivers/gpu/drm/amd/amdgpu/gfx_

[PATCH] Add support for high priority scheduling in amdgpu v2

2017-03-02 Thread Andres Rodriguez
Fixed incorrectly using AMDGPU_CTX_PRIORITY instead of AMD_SCHED_PRIORITY. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 09/22] drm/amdgpu: allow split of queues with kfd at queue granularity

2017-03-02 Thread Andres Rodriguez
Previously the queue/pipe split with kfd operated with pipe granularity. This patch allows amdgpu to take ownership of an arbitrary set of queues. It also consolidates the last few magic numbers in the compute initialization process into mec_init. Signed-off-by: Andres Rodriguez <an

[PATCH 01/22] drm/amdgpu: refactor MQD/HQD initialization

2017-03-02 Thread Andres Rodriguez
updated to deal with the new code structure. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 447 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 417 +++ 2 files changed, 387 insertions(+

[PATCH 17/22] drm/amdgpu: add parameter to allocate high priority contexts v6

2017-03-02 Thread Andres Rodriguez
of _NORMAL _HIGH for backwards compatibility v4: Validate usermode priority and store it v5: Move priority validation into amdgpu_ctx_ioctl(), headline reword v6: add UAPI note regarding priorities requiring CAP_SYS_ADMIN Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/d

[PATCH 21/22] drm/amdgpu: condense mqd programming sequence

2017-03-02 Thread Andres Rodriguez
The MQD structure matches the reg layout. Take advantage of this to simplify HQD programming. Note that the ACTIVE field still needs to be programmed last. Suggested-by: Felix Kuehling <felix.kuehl...@amd.com> Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/dr

[PATCH 15/22] drm/amdgpu: add a mechanism to untie user ring ids from kernel ring ids

2017-03-02 Thread Andres Rodriguez
that support multiple rings. Userspace clients are unable to check whether a specific resource is in use by a different client. Therefore, it is up to the kernel driver to make the optimal choice. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/Makefile

[PATCH 16/22] drm/amdgpu: implement lru amdgpu_queue_mgr policy for compute v2

2017-03-02 Thread Andres Rodriguez
f ring->hw_ip Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 52 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_r

[PATCH 07/22] drm/amdgpu: take ownership of per-pipe configuration

2017-03-02 Thread Andres Rodriguez
Make amdgpu the owner of all per-pipe state of the HQDs. This change will allow us to split the queues between kfd and amdgpu with a queue granularity instead of pipe granularity. This patch fixes kfd allocating an HDP_EOP region for its 3 pipes which goes unused. Signed-off-by: Andres

[PATCH 04/22] drm/amdgpu: remove duplicate definition of cik_mqd

2017-03-02 Thread Andres Rodriguez
The gfxv7 contains a slightly different version of cik_mqd called bonaire_mqd. This can introduce subtle bugs if fixes are not applied in both places. Signed-off-by: Andres Rodriguez <andre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 135 ++

Re: [PATCH] radv: Initial implementation of VK_EXT_queue_global_priority

2017-01-03 Thread Andres Rodriguez
/devinfo.html Although some of them seen to not apply anymore (radv code was tabs instead of 3 spaces). Thanks for taking the time to review :) Regards, Andres On Tue, Jan 3, 2017 at 9:22 PM, Andres Rodriguez <andre...@gmail.com> wrote: > This patch series implements VK_EXT_queue_global_priority,

Re: Shared semaphores for amdgpu

2017-01-05 Thread Andres Rodriguez
week. Best Regards, David *From:*Andres Rodriguez [mailto:andr...@valvesoftware.com] *Sent:* Thursday, January 5, 2017 12:10 PM *To:* Zhou, David(ChunMing) <david1.z...@amd.com>; Mao, David <david@amd.com>; Koenig, Christian <christian.koe...@amd.com> *Cc:* Pierre-Lou

Re: [PATCH] drm/amdgpu: add flag for high priority contexts

2017-01-05 Thread Andres Rodriguez
patchset when I get new data on that. Regards, Andres On 2017-01-05 02:15 AM, Michel Dänzer wrote: On 05/01/17 05:51 AM, Andres Rodriguez wrote: On 2017-01-04 06:54 AM, Mao, David wrote: Hi Andres, I did not follow the previous discussion, so please remind me if my questions have been covered

  1   2   3   4   5   >