[PATCH] drm/amdgpu/display: fix compile error

2019-10-16 Thread Chen Wandun
From: Chenwandun drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:1913:48: error: struct dc_crtc_timing_flags has no member named DSC if (res_ctx->pipe_ctx[i].stream->timing.flags.DSC) ^ drivers/gpu/drm/amd/amdgpu/../display/dc/dc

[PATCH] drm/amd/display: Modify display link stream setup sequence.

2019-10-16 Thread Liu, Zhan
From: Zhan Liu [Why] When a specific kind of connector is detected, DC needs to set the attribute of the stream. This step needs to be done before enabling link, or some bugs (e.g. display won't light up) will be observed. [How] Setting the attribute of the stream first, then enabling stream. S

[PATCH] drm/amd/powerplay: add lock protection for swSMU APIs

2019-10-16 Thread Quan, Evan
This is a quick and low risk fix. Those APIs which are exposed to other IPs or to support sysfs/hwmon interfaces or DAL will have lock protection. Meanwhile no lock protection is enforced for swSMU internal used APIs. Future optimization is needed. Change-Id: I8392652c9da1574a85acd9b171f04380f3630

RE: [PATCH] drm/amdgpu: disable c-states on xgmi perfmons

2019-10-16 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: Kim, Jonathan > Sent: 2019年10月17日 10:06 > To: amd-gfx@lists.freedesktop.org > Cc: Kuehling, Felix ; Quan, Evan > ; Kim, Jonathan ; Kim, > Jonathan > Subject: [PATCH] drm/amdgpu: disable c-states on xgmi perfmons > > read or writes to

[pull] amdgpu, radeon drm-fixes-5.4

2019-10-16 Thread Alex Deucher
Hi Dave, Daniel, A few fixes for 5.4. Nothing too major. The following changes since commit 083164dbdb17c5ea4ad92c1782b59c9d75567790: drm/amdgpu: fix memory leak (2019-10-09 11:45:59 -0500) are available in the Git repository at: git://people.freedesktop.org/~agd5f/linux tags/drm-fixes-5.

RE: [PATCH] drm/amdgpu: disable c-states on xgmi perfmons

2019-10-16 Thread Kim, Jonathan
Thanks Evan. Resent with fixes. -Original Message- From: Quan, Evan Sent: Wednesday, October 16, 2019 9:34 PM To: Kim, Jonathan ; amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix Subject: RE: [PATCH] drm/amdgpu: disable c-states on xgmi perfmons Hi Jonathan, At default, vega20 still

[PATCH] drm/amdgpu: disable c-states on xgmi perfmons

2019-10-16 Thread Kim, Jonathan
read or writes to df registers when gpu df is in c-states will result in hang. df c-states should be disabled prior to read or writes then re-enabled after read or writes. v2: use old powerplay routines for vega20 Change-Id: I6d5a83e4fe13e29c73dfb03a94fe7c611e867fec Signed-off-by: Jonathan Kim

RE: [PATCH] drm/amdgpu: disable c-states on xgmi perfmons

2019-10-16 Thread Quan, Evan
Hi Jonathan, At default, vega20 still takes old powerplay routines. So, this will not work on Vega20. As proposed before, the logics similar as below should be used: / if (is_support_sw_smu(adev)) {

RE: [PATCH] drm/amdgpu: disable c-states on xgmi perfmons

2019-10-16 Thread Kim, Jonathan
+ Felix -Original Message- From: Kim, Jonathan Sent: Wednesday, October 16, 2019 8:49 PM To: amd-gfx@lists.freedesktop.org Cc: felix.keuhl...@amd.com; Quan, Evan ; Kim, Jonathan ; Kim, Jonathan Subject: [PATCH] drm/amdgpu: disable c-states on xgmi perfmons read or writes to df registe

[PATCH] drm/amdgpu: disable c-states on xgmi perfmons

2019-10-16 Thread Kim, Jonathan
read or writes to df registers when gpu df is in c-states will result in hang. df c-states should be disabled prior to read or writes then re-enabled after read or writes. Change-Id: I6d5a83e4fe13e29c73dfb03a94fe7c611e867fec Signed-off-by: Jonathan Kim --- drivers/gpu/drm/amd/amdgpu/df_v3_6.c |

Re: AMDGPU and 16B stack alignment

2019-10-16 Thread Nick Desaulniers
On Wed, Oct 16, 2019 at 11:55 AM Arvind Sankar wrote: > > On Tue, Oct 15, 2019 at 06:51:26PM -0700, Nick Desaulniers wrote: > > On Tue, Oct 15, 2019 at 1:26 PM Arvind Sankar wrote: > > > > > > On Tue, Oct 15, 2019 at 11:05:56AM -0700, Nick Desaulniers wrote: > > > > Hmmm...I would have liked to r

[PATCH 2/3] drm/amdgpu: fix stack alignment ABI mismatch for GCC 7.1+

2019-10-16 Thread Nick Desaulniers
GCC earlier than 7.1 errors when compiling code that makes use of `double`s and sets a stack alignment outside of the range of [2^4-2^12]: $ cat foo.c double foo(double x, double y) { return x + y; } $ gcc-4.9 -mpreferred-stack-boundary=3 foo.c error: -mpreferred-stack-boundary=3 is not between

[PATCH 0/3] drm/amdgpu: fix stack alignment ABI mismatch

2019-10-16 Thread Nick Desaulniers
The x86 kernel is compiled with an 8B stack alignment via `-mpreferred-stack-boundary=3` for GCC since 3.6-rc1 via commit d9b0cde91c60 ("x86-64, gcc: Use -mpreferred-stack-boundary=3 if supported") or `-mstack-alignment=8` for Clang. Parts of the AMDGPU driver are compiled with 16B stack alignment

[PATCH 3/3] drm/amdgpu: enable -msse2 for GCC 7.1+ users

2019-10-16 Thread Nick Desaulniers
A final attempt at enabling sse2 for GCC users. Orininally attempted in: commit 10117450735c ("drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines") Reverted due to "reported instability" in: commit 193392ed9f69 ("Revert "drm/amd/display: add -msse2 to

[PATCH 1/3] drm/amdgpu: fix stack alignment ABI mismatch for Clang

2019-10-16 Thread Nick Desaulniers
The x86 kernel is compiled with an 8B stack alignment via `-mpreferred-stack-boundary=3` for GCC since 3.6-rc1 via commit d9b0cde91c60 ("x86-64, gcc: Use -mpreferred-stack-boundary=3 if supported") or `-mstack-alignment=8` for Clang. Parts of the AMDGPU driver are compiled with 16B stack alignment

[ANNOUNCE] libdrm 2.4.100

2019-10-16 Thread Marek Olšák
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Anusha Srivatsa (1): intel: sync i915_pciids.h with kernel Emil Velikov (1): *-symbols-check: use normal shell over bash Eric Engestrom (7): xf86drm: dedupe `#define`s xf86drm: use max size of drm node name instead of arbit

Re: AMDGPU and 16B stack alignment

2019-10-16 Thread Arvind Sankar
On Tue, Oct 15, 2019 at 06:51:26PM -0700, Nick Desaulniers wrote: > On Tue, Oct 15, 2019 at 1:26 PM Arvind Sankar wrote: > > > > On Tue, Oct 15, 2019 at 11:05:56AM -0700, Nick Desaulniers wrote: > > > Hmmm...I would have liked to remove it outright, as it is an ABI > > > mismatch that is likely to

Re: [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DSC_SUPPORT=n

2019-10-16 Thread Mikita Lipski
Reviewed-by: Mikita Lipski On 16.10.2019 12:13, Alex Deucher wrote: > Add proper config check. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_

Re: [PATCH -next] drm/amd/display: Make dc_link_detect_helper static

2019-10-16 Thread Alex Deucher
On Wed, Oct 16, 2019 at 8:29 AM YueHaibing wrote: > > Fix sparse warning: > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:746:6: > warning: symbol 'dc_link_detect_helper' was not declared. Should it be > static? > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing Applied. tha

Re: [PATCH hmm 00/15] Consolidate the mmu notifier interval_tree and locking

2019-10-16 Thread Jason Gunthorpe
On Wed, Oct 16, 2019 at 10:58:02AM +0200, Christian König wrote: > Am 15.10.19 um 20:12 schrieb Jason Gunthorpe: > > From: Jason Gunthorpe > > > > 8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1, > > scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where >

[PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DSC_SUPPORT=n

2019-10-16 Thread Alex Deucher
Add proper config check. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 914e378bcda4..

Re: [PATCH 1/3] drm/amdgpu/uvd6: fix allocation size in enc ring test (v2)

2019-10-16 Thread James Zhu
Reviewed-by: James Zhu for this series Tested-by: James Zhu for this series James On 2019-10-15 6:18 p.m., Alex Deucher wrote: > We need to allocate a large enough buffer for the > session info, otherwise the IB test can overwrite > other memory. > > v2: - session info is 128K according to mesa

Re: linux-next: Tree for Oct 16 (amd display)

2019-10-16 Thread Randy Dunlap
On 10/15/19 10:17 PM, Stephen Rothwell wrote: > Hi all, > > Changes since 20191015: > on x86_64: ../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c: In function ‘dcn20_populate_dml_pipes_from_context’: ../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:1913:48:

Re: [PATCH] drm/amdgpu/psp: add psp memory training implementation(v3)

2019-10-16 Thread Tuikov, Luben
Reviewed-by: Luben Tuikov On 2019-10-15 23:56, Tianci Yin wrote: > From: "Tianci.Yin" > > add memory training implementation code to save resume time. > > Change-Id: I625794a780b11d824ab57ef39cc33b872c6dc6c9 > Reviewed-by: Alex Deucher > Signed-off-by: Tianci.Yin > --- > drivers/gpu/drm/amd

[PATCH v3] drm/amd/display: Add MST atomic routines

2019-10-16 Thread mikita.lipski
From: Mikita Lipski - Adding encoder atomic check to find vcpi slots for a connector - Using DRM helper functions to calculate PBN - Adding connector atomic check to release vcpi slots if connector loses CRTC - Calculate PBN and VCPI slots only once during atomic check and store them on crtc_sta

[RFC] drm: Add AMD GFX9+ format modifiers.

2019-10-16 Thread Bas Nieuwenhuizen
This adds initial format modifiers for AMD GFX9 and newer GPUs. This is particularly useful to determine if we can use DCC, and whether we need an extra display compatible DCC metadata plane. Design decisions: - Always expose a single plane This way everything works correctly with images

Re: [PATCH] drm/amdgpu: fix amdgpu trace event print string format error

2019-10-16 Thread Koenig, Christian
Hi Kevin, do you have other better way to do it? Not of hand, but maybe check the trace documentation if there is any better approach. If you can't find anything the patch is Reviewed-by: Christian König . Regards, Christian. Am 16.10.19 um 15:30 schrieb Wang,

Re: [PATCH] drm/amdgpu: fix amdgpu trace event print string format error

2019-10-16 Thread Wang, Kevin(Yang)
Hi Chris, You said that this kind of scene also existed in other source code, these has same method. in amdgpu_trace.h file, this usage case is exits in amdgpu driver. likes TRACE_EVENT(amdgpu_cs_ioctl) -> timeline : TP_printk("sched_job=%llu, timeline=%s, context=%u, seqno=%u, ring_

Re: [PATCH 1/3] drm/amdgpu/uvd:Add uvd enc session bo

2019-10-16 Thread James Zhu
Thanks for your comments! Alex has a new patch submit, I am verifying it. Thanks! James Zhu On 2019-10-16 4:59 a.m., Christian König wrote: > Am 16.10.19 um 00:08 schrieb Zhu, James: >> Add uvd enc session bo for uvd encode IB test. >> >> Signed-off-by: James Zhu >> --- >>   drivers/gpu/drm/am

Re: [PATCH] drm/amdgpu/psp: declare PSP TA firmware

2019-10-16 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of chen gong Sent: Tuesday, October 15, 2019 10:48 PM To: amd-gfx@lists.freedesktop.org Cc: Lakha, Bhawanpreet ; Gong, Curry Subject: [PATCH] drm/amdgpu/psp: declare PSP TA firmware Add PSP TA firmware declar

Re: [PATCH] drm/amdgpu: fix amdgpu trace event print string format error

2019-10-16 Thread Koenig, Christian
Hi Kevin, well that copies the string into the ring buffer every time the trace event is called which is not necessary a good idea for a constant string. Can't we avoid that somehow? Thanks, Christian. Am 16.10.19 um 14:01 schrieb Wang, Kevin(Yang): add @Koenig, Christian

Re: [PATCH] drm/amdgpu: fix amdgpu trace event print string format error

2019-10-16 Thread Wang, Kevin(Yang)
add @Koenig, Christian, could you help me review it? Best Regards, Kevin From: Wang, Kevin(Yang) Sent: Wednesday, October 16, 2019 11:06 AM To: amd-gfx@lists.freedesktop.org Cc: Wang, Kevin(Yang) Subject: [PATCH] drm/amdgpu: fix

[PATCH v4 07/11] drm/ttm: rename ttm_fbdev_mmap

2019-10-16 Thread Gerd Hoffmann
Rename ttm_fbdev_mmap to ttm_bo_mmap_obj. Move the vm_pgoff sanity check to amdgpu_bo_fbdev_mmap (only ttm_fbdev_mmap user in tree). The ttm_bo_mmap_obj function can now be used to map any buffer object. This allows to implement &drm_gem_object_funcs.mmap in gem ttm helpers. v3: patch added to s

[PATCH -next] drm/amd/display: Make dc_link_detect_helper static

2019-10-16 Thread YueHaibing
Fix sparse warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:746:6: warning: symbol 'dc_link_detect_helper' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 ++- 1 file changed, 2 inse

Re: TTM refcount problem.

2019-10-16 Thread Christian König
Am 16.10.19 um 12:09 schrieb Bas Nieuwenhuizen: On Mon, Jul 29, 2019 at 11:32 AM Christian König wrote: Is this a known issue? No, that looks like a new one to me. Is that somehow reproducible? I tried finding a reliable reproducer (only Vulkan CTS runs uncommonly caught it), but could not f

Re: TTM refcount problem.

2019-10-16 Thread Bas Nieuwenhuizen
On Mon, Jul 29, 2019 at 11:32 AM Christian König wrote: > > > Is this a known issue? > No, that looks like a new one to me. > > Is that somehow reproducible? I tried finding a reliable reproducer (only Vulkan CTS runs uncommonly caught it), but could not find anything better. However this issue

RE: [PATCH] drm/amd/powerplay: bug fix for memory clock request from display

2019-10-16 Thread Xiao, Jack
Reviewed-by: Jack Xiao -Original Message- From: amd-gfx On Behalf Of Kenneth Feng Sent: Wednesday, October 16, 2019 4:58 PM To: amd-gfx@lists.freedesktop.org Cc: Feng, Kenneth Subject: [PATCH] drm/amd/powerplay: bug fix for memory clock request from display In some cases, display fixe

RE: [PATCH] drm/amdgpu/powerplay: implement interface pp_power_profile_mode

2019-10-16 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: Liang, Prike > Sent: 2019年10月16日 16:24 > To: amd-gfx@lists.freedesktop.org > Cc: Quan, Evan ; Huang, Ray > ; Liang, Prike > Subject: [PATCH] drm/amdgpu/powerplay: implement interface > pp_power_profile_mode > > implement get_power_pro

Re: [PATCH 1/3] drm/amdgpu/uvd6: fix allocation size in enc ring test (v2)

2019-10-16 Thread Christian König
Am 16.10.19 um 00:18 schrieb Alex Deucher: We need to allocate a large enough buffer for the session info, otherwise the IB test can overwrite other memory. v2: - session info is 128K according to mesa - use the same session info for create and destroy Bug: https://bugzilla.kernel.org/show

Re: [PATCH 3/3] drm/amdgpu/uvd:Allocate enc session bo for uvd7.0 ring IB test

2019-10-16 Thread Christian König
Am 16.10.19 um 00:08 schrieb Zhu, James: Allocate 256K enc session bo for uvd6.0 ring IB test to fix S3 resume corruption issue. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gp

Re: [PATCH 1/3] drm/amdgpu/uvd:Add uvd enc session bo

2019-10-16 Thread Christian König
Am 16.10.19 um 00:08 schrieb Zhu, James: Add uvd enc session bo for uvd encode IB test. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_uv

[PATCH] drm/amd/powerplay: bug fix for memory clock request from display

2019-10-16 Thread Kenneth Feng
In some cases, display fixes memory clock frequency to a high value rather than the natural memory clock switching. When we comes back from s3 resume, the request from display is not reset, this causes the bug which makes the memory clock goes into a low value. Then due to the insuffcient memory cl

Re: [PATCH hmm 00/15] Consolidate the mmu notifier interval_tree and locking

2019-10-16 Thread Christian König
Am 15.10.19 um 20:12 schrieb Jason Gunthorpe: From: Jason Gunthorpe 8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1, scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where they only use invalidate_range_start/end and immediately check the invalidating ra

[PATCH] drm/amdgpu/powerplay: implement interface pp_power_profile_mode

2019-10-16 Thread Liang, Prike
implement get_power_profile_mode for getting power profile mode status. Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c b/drivers/gpu/drm/amd/

Re: [PATCH hmm 08/15] xen/gntdev: Use select for DMA_SHARED_BUFFER

2019-10-16 Thread Jürgen Groß
On 15.10.19 20:12, Jason Gunthorpe wrote: From: Jason Gunthorpe DMA_SHARED_BUFFER can not be enabled by the user (it represents a library set in the kernel). The kconfig convention is to use select for such symbols so they are turned on implicitly when the user enables a kconfig that needs them

Re: [PATCH hmm 08/15] xen/gntdev: Use select for DMA_SHARED_BUFFER

2019-10-16 Thread Oleksandr Andrushchenko
On 10/16/19 8:11 AM, Jürgen Groß wrote: > On 15.10.19 20:12, Jason Gunthorpe wrote: >> From: Jason Gunthorpe >> >> DMA_SHARED_BUFFER can not be enabled by the user (it represents a >> library >> set in the kernel). The kconfig convention is to use select for such >> symbols so they are turned on

Re: [PATCH] drm/amdgpu: always reset asic when going into suspend

2019-10-16 Thread Daniel Drake
On Wed, Oct 16, 2019 at 2:43 AM Alex Deucher wrote: > Is s2idle actually powering down the GPU? My understanding is that s2idle (at a high level) just calls all devices suspend routines and then puts the CPU into its deepest running state. So if there is something special to be done to power off