[PATCH] drm/amdgpu: Fix comments error in sdma_v4_1_update_power_gating

2018-09-24 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index 9da4a1b..517a721 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++

Re: [PATCH] drm/amd/powerplay: Change id parameter type in pp_atomfwctrl_get_clk_information_by_clkid

2018-09-24 Thread Alex Deucher
On Mon, Sep 24, 2018 at 6:07 PM Nick Desaulniers wrote: > > On Fri, Sep 21, 2018 at 2:01 PM Nathan Chancellor > wrote: > > > > Clang generates warnings when one enumerated type is implicitly > > converted to another. > > > > drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c:532:57: >

Re: [PATCH] drm/amd/display: Change status's type in aux_reply_transaction_data

2018-09-24 Thread Nick Desaulniers
On Fri, Sep 21, 2018 at 2:55 PM Nathan Chancellor wrote: > > Clang warns when one enumerated type is implicitly converted to another. > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:315:19: warning: > implicit conversion from enumeration type 'enum > aux_channel_operation_result' to

Re: [PATCH] drm/amd/display: Change status's type in aux_reply_transaction_data

2018-09-24 Thread Nathan Chancellor
On Mon, Sep 24, 2018 at 03:07:16PM -0700, Nick Desaulniers wrote: > On Fri, Sep 21, 2018 at 2:55 PM Nathan Chancellor > wrote: > > > > Clang warns when one enumerated type is implicitly converted to another. > > > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:315:19: warning: > >

Re: [PATCH] drm/amd/powerplay: Change id parameter type in pp_atomfwctrl_get_clk_information_by_clkid

2018-09-24 Thread Nick Desaulniers
On Fri, Sep 21, 2018 at 2:01 PM Nathan Chancellor wrote: > > Clang generates warnings when one enumerated type is implicitly > converted to another. > > drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c:532:57: > warning: implicit conversion from enumeration type 'enum >

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Mon, Sep 24, 2018 at 10:35 PM Jason Gunthorpe wrote: > On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote: > > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > > > On Fri, Sep 14, 2018 at 09:57:48PM +0100,

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Jason Gunthorpe
On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote: > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > > > On Fri, Sep 14, 2018 at 01:35:06PM

Re: [PATCH v2 2/3] drm: Add variable refresh property to DRM CRTC

2018-09-24 Thread Ville Syrjälä
On Mon, Sep 24, 2018 at 03:06:02PM -0400, Kazlauskas, Nicholas wrote: > On 09/24/2018 02:38 PM, Ville Syrjälä wrote: > > On Mon, Sep 24, 2018 at 02:15:36PM -0400, Nicholas Kazlauskas wrote: > >> Variable refresh rate algorithms have typically been enabled only > >> when the display is covered by a

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > > On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > > > > > > > Acked-by: Darren Hart (VMware) > >

[PATCH] drm/amdgpu: Move fence SW fallback warning.

2018-09-24 Thread Andrey Grodzovsky
Only print the warning if there was actually some fence processed from the SW fallback timer. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 17 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 4

Re: [PATCH v2 2/3] drm: Add variable refresh property to DRM CRTC

2018-09-24 Thread Kazlauskas, Nicholas
On 09/24/2018 02:38 PM, Ville Syrjälä wrote: On Mon, Sep 24, 2018 at 02:15:36PM -0400, Nicholas Kazlauskas wrote: Variable refresh rate algorithms have typically been enabled only when the display is covered by a single source of content. This patch introduces a new default CRTC property that

Re: [PATCH v2 2/3] drm: Add variable refresh property to DRM CRTC

2018-09-24 Thread Ville Syrjälä
On Mon, Sep 24, 2018 at 02:15:36PM -0400, Nicholas Kazlauskas wrote: > Variable refresh rate algorithms have typically been enabled only > when the display is covered by a single source of content. > > This patch introduces a new default CRTC property that helps > hint to the driver when the CRTC

Re: [PATCH v2 1/3] drm: Add variable refresh rate properties to connector

2018-09-24 Thread Ville Syrjälä
On Mon, Sep 24, 2018 at 02:15:35PM -0400, Nicholas Kazlauskas wrote: > Modern display hardware is capable of supporting variable refresh rates > and adaptive sync technologies. The properties for querying and > controlling these features should be exposed on the DRM connector. > > This patch

[PATCH v2 3/3] drm/amd/display: Set FreeSync state using DRM VRR properties

2018-09-24 Thread Nicholas Kazlauskas
The AMDGPU specific FreeSync properties and IOCTLs are dropped from amdgpu_dm in favor of the DRM variable refresh properties. The AMDGPU connector properties freesync_capable and freesync_enabled are mostly direct mappings to the DRM variable_refresh_capable and variable_refresh_enabled. The

[PATCH v2 2/3] drm: Add variable refresh property to DRM CRTC

2018-09-24 Thread Nicholas Kazlauskas
Variable refresh rate algorithms have typically been enabled only when the display is covered by a single source of content. This patch introduces a new default CRTC property that helps hint to the driver when the CRTC composition is suitable for variable refresh rate algorithms. Userspace can

[PATCH v2 1/3] drm: Add variable refresh rate properties to connector

2018-09-24 Thread Nicholas Kazlauskas
Modern display hardware is capable of supporting variable refresh rates and adaptive sync technologies. The properties for querying and controlling these features should be exposed on the DRM connector. This patch introduces two new properties for variable refresh rate support: -

[PATCH v2 0/3] A DRM API for adaptive sync and variable refresh rate support

2018-09-24 Thread Nicholas Kazlauskas
These patches are part of a proposed new interface for supporting variable refresh rate via DRM properties. === Changes from v1 === For drm: * The variable_refresh_capable property is now flagged as DRM_MODE_PROP_IMMUTABLE For drm/gpu/amd/display: * Patches no longer pull in IOCTL/FreeSync

Re: [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2

2018-09-24 Thread Christian König
Am 24.09.2018 um 17:32 schrieb Andrey Grodzovsky: On 09/24/2018 11:19 AM, Christian König wrote: Thanks. One more thing which came to my mind is that we might want to print the warning only when amdgpu_fence_process has actually done some processing. Otherwise we could get warnings for

Re: Improve reservation object shared slot function

2018-09-24 Thread Daniel Vetter
On Mon, Sep 24, 2018 at 05:16:50PM +0200, Christian König wrote: > Am 24.09.2018 um 17:03 schrieb Daniel Vetter: > > On Mon, Sep 24, 2018 at 01:58:12PM +0200, Christian König wrote: > > > The reservation object shared slot function only allowed to reserve one > > > slot at a time. > > > > > >

Re: [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2

2018-09-24 Thread Andrey Grodzovsky
On 09/24/2018 11:19 AM, Christian König wrote: Thanks. One more thing which came to my mind is that we might want to print the warning only when amdgpu_fence_process has actually done some processing. Otherwise we could get warnings for long running jobs. Do you mean that you want to

Re: [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2

2018-09-24 Thread Christian König
Thanks. One more thing which came to my mind is that we might want to print the warning only when amdgpu_fence_process has actually done some processing. Otherwise we could get warnings for long running jobs. Christian. Am 24.09.2018 um 17:14 schrieb Andrey Grodzovsky: P.S I pushed it.

Re: Improve reservation object shared slot function

2018-09-24 Thread Christian König
Am 24.09.2018 um 17:03 schrieb Daniel Vetter: On Mon, Sep 24, 2018 at 01:58:12PM +0200, Christian König wrote: The reservation object shared slot function only allowed to reserve one slot at a time. Improve that and allow to reserve multiple slots to support atomically submission to multiple

Re: [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2

2018-09-24 Thread Andrey Grodzovsky
P.S I pushed it. Thanks, Andrey On 09/24/2018 11:13 AM, Andrey Grodzovsky wrote: Reviewed-and-Tested-by: Andrey Grodzovsky Andrey On 09/24/2018 10:31 AM, Deucher, Alexander wrote: Acked-by: Alex Deucher

Re: [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2

2018-09-24 Thread Andrey Grodzovsky
Reviewed-and-Tested-by: Andrey Grodzovsky Andrey On 09/24/2018 10:31 AM, Deucher, Alexander wrote: Acked-by: Alex Deucher *From:* amd-gfx on behalf of Christian König *Sent:* Monday, September 24, 2018 8:10:22

Re: Improve reservation object shared slot function

2018-09-24 Thread Daniel Vetter
On Mon, Sep 24, 2018 at 01:58:12PM +0200, Christian König wrote: > The reservation object shared slot function only allowed to reserve one slot > at a time. > > Improve that and allow to reserve multiple slots to support atomically > submission to multiple engines. I think you can do this

Re: [PATCH 5/7] drm/amdgpu: always reserve two slots for the VM

2018-09-24 Thread Michel Dänzer
On 2018-09-24 1:58 p.m., Christian König wrote: > And drop the now superflous extra reservations. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 +- > 2 files changed, 5 insertions(+), 13

Re: [PATCH 3/7] drm/ttm: allow reserve more than one shared slot

2018-09-24 Thread Michel Dänzer
The shortlog should say "allow reserving more than one shared fence slot", same as patch 2. On 2018-09-24 1:58 p.m., Christian König wrote: > Let's support simultaneous submissions to multiple engines. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/ttm/ttm_execbuf_util.c | 6

[PATCH] drm/amd/display: move the nonblocking commit helpers appropriately

2018-09-24 Thread Shirish S
[Why] In multi-monitor scenario, if first crtc's flip done event occurs delayed (but within timeout), due to non-blocking design of commit_tail(), there are more than one commit's scheduled by the time the second crtc's wait_for_completion_timeout() is called in

[PATCH 4/9] drm/amdgpu: move more interrupt processing into amdgpu_irq.c

2018-09-24 Thread Christian König
Add a callback to amdgpu_ih_process to remove most of the IV logic. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 24 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 31

[PATCH 9/9] drm/amdgpu: enable IH ring 1 and ring 2

2018-09-24 Thread Christian König
The entries are ignored for now, but it at least stops crashing the hardware when somebody tries to push something to the other IH rings. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | 4 +- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 129

[PATCH 1/9] drm/amdgpu: drop extra newline in amdgpu_iv trace

2018-09-24 Thread Christian König
That is superflous here. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h index 2e87414422f9..e9bf70e2ac51

[PATCH 2/9] drm/amdgpu: make function pointers mandatory

2018-09-24 Thread Christian König
We always want those to be setup correctly. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 3 +-- drivers/gpu/drm/amd/amdgpu/cik_sdma.c| 20 drivers/gpu/drm/amd/amdgpu/cz_ih.c | 3 +-- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 3

[PATCH 8/9] drm/amdgpu: simplify IH programming

2018-09-24 Thread Christian König
Calculate all the addresses and pointers in amdgpu_ih.c Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 34 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 23 - drivers/gpu/drm/amd/amdgpu/cik_ih.c | 9 -

[PATCH 3/9] drm/amdgpu: cleanup amdgpu_ih.c

2018-09-24 Thread Christian König
Cleanup amdgpu_ih.c to be able to handle multiple interrupt rings. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 152 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-

[PATCH 6/9] drm/amdgpu: separate IH and IRQ funcs

2018-09-24 Thread Christian König
One for the ring buffer and one for the IV handling. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 11 --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | 11 ++- drivers/gpu/drm/amd/amdgpu/cik_ih.c

[PATCH 7/9] drm/amdgpu: add IH ring to ih_get_wptr/ih_set_rptr

2018-09-24 Thread Christian König
Let's start to support multiple rings. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 8 drivers/gpu/drm/amd/amdgpu/cik_ih.c | 16 +--- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 16

[PATCH 5/9] drm/amdgpu: move more defines into amdgpu_irq.h

2018-09-24 Thread Christian König
Everything that isn't related to the IH ring. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h| 22 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 10 - drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | 25

[PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2

2018-09-24 Thread Christian König
From: Andrey Grodzovsky Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN. v2: shorten the warnign message a bit and only re-activate the timer during processing if it was already activated before. Signed-off-by:

[PATCH 5/7] drm/amdgpu: always reserve two slots for the VM

2018-09-24 Thread Christian König
And drop the now superflous extra reservations. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 6/7] drm/amdgpu: always reserve one more shared slot for pipelines BO moves

2018-09-24 Thread Christian König
This allows us to drop the extra reserve in TTM. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 2/7] dma-buf: allow reserving more than one shared fence slot

2018-09-24 Thread Christian König
Let's support simultaneous submissions to multiple engines. Signed-off-by: Christian König --- drivers/dma-buf/reservation.c| 13 - drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-

[PATCH 3/7] drm/ttm: allow reserve more than one shared slot

2018-09-24 Thread Christian König
Let's support simultaneous submissions to multiple engines. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_execbuf_util.c | 6 -- include/drm/ttm/ttm_execbuf_util.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c

[PATCH 1/7] dma-buf: remove shared fence staging in reservation object

2018-09-24 Thread Christian König
No need for that any more. Just replace the list when there isn't enough room any more for the additional fence. Signed-off-by: Christian König --- drivers/dma-buf/reservation.c | 178 ++ include/linux/reservation.h | 4 - 2 files changed, 58

Improve reservation object shared slot function

2018-09-24 Thread Christian König
The reservation object shared slot function only allowed to reserve one slot at a time. Improve that and allow to reserve multiple slots to support atomically submission to multiple engines. Please comment and review, Christian. ___ amd-gfx mailing

[PATCH 4/7] drm/amdgpu: fix using shared fence for exported BOs

2018-09-24 Thread Christian König
It is perfectly possible that the BO list is created before the BO is exported. While at it cleanup setting shared to one instead of true. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 13 ++--- 2

[PATCH 7/7] drm/ttm: drop the extra reservation for pipelines BO moves

2018-09-24 Thread Christian König
The driver is now responsible to allocate enough shared slots. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 27 ++- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index

Re: [PATCH 5/6] drm/amdgpu: add timeline support in amdgpu CS

2018-09-24 Thread Christian König
Am 20.09.2018 um 13:03 schrieb Chunming Zhou: syncobj wait/signal operation is appending in command submission. Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 114 +++--

Re: [PATCH 4/6] drm: add timeline syncobj payload query ioctl

2018-09-24 Thread Christian König
Am 20.09.2018 um 13:03 schrieb Chunming Zhou: user mode can query timeline payload. Signed-off-by: Chunming Zhou --- drivers/gpu/drm/drm_internal.h | 2 ++ drivers/gpu/drm/drm_ioctl.c| 2 ++ drivers/gpu/drm/drm_syncobj.c | 53 ++

Re: [PATCH] drm/amdgpu: fix the page fault of raven2

2018-09-24 Thread Christian König
Am 24.09.2018 um 04:07 schrieb Huang Rui: While the apg_end address is 0x, if add 1 with it, the value will be overflow and roll back to 0. So when 0 is written to mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR, the system aperture is actually disabled. And so any access to vram will trigger a page

Re: [PATCH v2 3/6] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead

2018-09-24 Thread Jani Nikula
On Wed, 19 Sep 2018, Lyude Paul wrote: > Currently we set intel_connector->mst_port to NULL to signify that the > MST port has been removed from the system so that we can prevent further > action on the port such as connector probes, mode probing, etc. > However, we're going to need access to