Re: [PATCH] drm/amdgpu: add AMDGPU_IB_FLAG_GET_START_SYNCOBJ to expose scheduled fence

2019-01-29 Thread Christian König
Am 28.01.19 um 22:52 schrieb Marek Olšák: From: Marek Olšák Normal syncobjs signal when an IB finishes. Start syncobjs signal when an IB starts. That approach has quite a number of problems (for example you can't allocate memory at this point). Better add a flag that we should only sync on

[PATCH 3/3] drm/amdgpu: Add command to override the context priority.

2019-01-29 Thread Bas Nieuwenhuizen
Given a master fd we can then override the priority of the context in another fd. Using these overrides was recommended by Christian instead of trying to submit from a master fd, and I am adding a way to override a single context instead of the entire process so we can only upgrade a single Vulkan

[PATCH 2/3] drm/amdgpu: Check if fd really is an amdgpu fd.

2019-01-29 Thread Bas Nieuwenhuizen
Otherwise we interpret the file private data as drm & amdgpu data while it might not be, possibly allowing one to get memory corruption. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 16 driver

[PATCH 1/3] drm/amdgpu: Fix entities for disabled HW blocks.

2019-01-29 Thread Bas Nieuwenhuizen
If we have some disabled HW blocks (say VCN), then the rings are not initialized. This reuslts in entities that refer to uninitialized rqs (runqueues?). In normal usage this does not result in issues because userspace generally knows to ignore the unsupported blocks, but e.g. setting the prioritie

Re: [PATCH 1/3] drm/amdgpu: Fix entities for disabled HW blocks.

2019-01-29 Thread Christian König
Am 29.01.19 um 11:20 schrieb Bas Nieuwenhuizen: If we have some disabled HW blocks (say VCN), then the rings are not initialized. This reuslts in entities that refer to uninitialized rqs (runqueues?). In normal usage this does not result in issues because userspace generally knows to ignore the

Re: [PATCH 1/3] drm/amdgpu: Fix entities for disabled HW blocks.

2019-01-29 Thread Bas Nieuwenhuizen
On Tue, Jan 29, 2019 at 11:33 AM Christian König wrote: > > Am 29.01.19 um 11:20 schrieb Bas Nieuwenhuizen: > > If we have some disabled HW blocks (say VCN), then the rings are > > not initialized. This reuslts in entities that refer to uninitialized > > rqs (runqueues?). > > > > In normal usage t

[PATCH 1/3] drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install

2019-01-29 Thread Daniel Vetter
If a non-legacy driver calls these it's valid to assume there is interrupt support. The flag is really only needed for legacy drivers, which control IRQ enabling/disabling through the DRM_IOCTL_CONTROL legacy IOCTL. Also remove all the flag usage from non-legacy drivers. v2: Review from Emil: - i

Re: [PATCH 1/3] drm/amdgpu: Fix entities for disabled HW blocks.

2019-01-29 Thread Koenig, Christian
Am 29.01.19 um 11:41 schrieb Bas Nieuwenhuizen: > On Tue, Jan 29, 2019 at 11:33 AM Christian König > wrote: >> Am 29.01.19 um 11:20 schrieb Bas Nieuwenhuizen: >>> If we have some disabled HW blocks (say VCN), then the rings are >>> not initialized. This reuslts in entities that refer to uninitiali

Re: [PATCH] drm/amdgpu: add AMDGPU_IB_FLAG_GET_START_SYNCOBJ to expose scheduled fence

2019-01-29 Thread Marek Olšák
On Tue, Jan 29, 2019, 3:01 AM Christian König < ckoenig.leichtzumer...@gmail.com wrote: > Am 28.01.19 um 22:52 schrieb Marek Olšák: > > From: Marek Olšák > > > > Normal syncobjs signal when an IB finishes. Start syncobjs signal when > > an IB starts. > > That approach has quite a number of proble

regression in dcn linked to -msse2

2019-01-29 Thread StDenis, Tom
Testing with the new 5.0.0-rc1 amd-staging-drm-next branch results in this commit causing the attached lockup on init with my Raven + Polaris system: 10117450735c7a7c0858095fb46a860e7037cb9a is the first bad commit commit 10117450735c7a7c0858095fb46a860e7037cb9a Author: ndesaulni...@google.com

Re: [PATCH] drm/amdgpu: add AMDGPU_IB_FLAG_GET_START_SYNCOBJ to expose scheduled fence

2019-01-29 Thread Koenig, Christian
Am 29.01.19 um 14:32 schrieb Marek Olšák: On Tue, Jan 29, 2019, 3:01 AM Christian König mailto:ckoenig.leichtzumer...@gmail.com> wrote: Am 28.01.19 um 22:52 schrieb Marek Olšák: > From: Marek Olšák mailto:marek.ol...@amd.com>> > > Normal syncobjs signal when an IB finishes. Start syncobjs signa

Re: regression in dcn linked to -msse2

2019-01-29 Thread Deucher, Alexander
See: https://bugs.freedesktop.org/show_bug.cgi?id=109487 From: amd-gfx on behalf of StDenis, Tom Sent: Tuesday, January 29, 2019 8:44:03 AM To: Wentland, Harry; amd-gfx mailing list Cc: Deucher, Alexander Subject: regression in dcn linked to -msse2 Testing wi

Re: [PATCH] drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines

2019-01-29 Thread Alex Deucher
On Fri, Jan 25, 2019 at 10:29 AM Wentland, Harry wrote: > > On 2019-01-24 7:52 p.m., ndesaulni...@google.com wrote: > > arch/x86/Makefile disables SSE and SSE2 for the whole kernel. The > > AMDGPU drivers modified in this patch re-enable SSE but not SSE2. Turn > > on SSE2 to support emitting dou

[PATCH] Revert "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"

2019-01-29 Thread Alex Deucher
This reverts commit 10117450735c7a7c0858095fb46a860e7037cb9a. Causes a crash. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=109487 Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org # 4.19 --- drivers/gpu/drm/amd/display/dc/calcs/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dml/Makef

Re: [PATCH] Revert "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"

2019-01-29 Thread Alex Deucher
On Tue, Jan 29, 2019 at 12:38 PM Greg KH wrote: > > On Tue, Jan 29, 2019 at 11:57:25AM -0500, Alex Deucher wrote: > > This reverts commit 10117450735c7a7c0858095fb46a860e7037cb9a. > > $ git show 10117450735c7a7c0858095fb46a860e7037cb9a > fatal: bad object 10117450735c7a7c0858095fb46a860e7037cb9a

Re: [PATCH] Revert "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"

2019-01-29 Thread Greg KH
On Tue, Jan 29, 2019 at 11:57:25AM -0500, Alex Deucher wrote: > This reverts commit 10117450735c7a7c0858095fb46a860e7037cb9a. $ git show 10117450735c7a7c0858095fb46a860e7037cb9a fatal: bad object 10117450735c7a7c0858095fb46a860e7037cb9a odd... ___ amd

Re: [PATCH] Revert "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"

2019-01-29 Thread Wentland, Harry
On 2019-01-29 11:57 a.m., Alex Deucher wrote: > This reverts commit 10117450735c7a7c0858095fb46a860e7037cb9a. > > Causes a crash. > > Bug: https://bugs.freedesktop.org/show_bug.cgi?id=109487 > Signed-off-by: Alex Deucher > Cc: sta...@vger.kernel.org # 4.19 Thanks for finding and reverting. Rev

Re: [PATCH] drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines

2019-01-29 Thread Guenter Roeck
On Tue, Jan 29, 2019 at 10:30:31AM -0500, Alex Deucher wrote: > On Fri, Jan 25, 2019 at 10:29 AM Wentland, Harry > wrote: > > > > On 2019-01-24 7:52 p.m., ndesaulni...@google.com wrote: > > > arch/x86/Makefile disables SSE and SSE2 for the whole kernel. The > > > AMDGPU drivers modified in this

Re: [PATCH] drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines

2019-01-29 Thread Wentland, Harry
On 2019-01-29 1:56 p.m., Guenter Roeck wrote: > On Tue, Jan 29, 2019 at 10:30:31AM -0500, Alex Deucher wrote: >> On Fri, Jan 25, 2019 at 10:29 AM Wentland, Harry >> wrote: >>> >>> On 2019-01-24 7:52 p.m., ndesaulni...@google.com wrote: arch/x86/Makefile disables SSE and SSE2 for the whole ke

Re: [PATCH] drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines

2019-01-29 Thread Nick Desaulniers
Suggestions: 1. revert patch 2. get me the disassembly from gcc of the translation unit in question. 3. land patch that adds clang guards or something different based on 2. Revert first; ask questions later. On Tue, Jan 29, 2019 at 11:01 AM Wentland, Harry wrote: > > On 2019-01-29 1:56 p.m., Gue

[PATCH] drm/amd/display: Fix fclk idle state

2019-01-29 Thread Roman.Li
From: Roman Li [Why] The earlier change 'Fix 6x4K displays' led to fclk value idling at higher DPM level. [How] Apply the fix only to respective multi-display configuration. Signed-off-by: Roman Li --- drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c | 10 +- 1 file changed, 9 inserti

Re: [PATCH] drm/amd/display: Fix fclk idle state

2019-01-29 Thread Deucher, Alexander
Acked-by: Alex Deucher From: amd-gfx on behalf of roman...@amd.com Sent: Tuesday, January 29, 2019 3:16:53 PM To: amd-gfx@lists.freedesktop.org; Xu, Feifei; Quan, Evan Cc: Chan, Carl; Wentland, Harry; Li, Roman Subject: [PATCH] drm/amd/display: Fix fclk idle st

[PATCH] drm/amd/display: Clean up coding style violations

2019-01-29 Thread David Francis
Some of the grandfathered amd display code does not follow Linux coding style and emits warnings or errors on checkpatch No functional changes here - just cleanup Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 96 +-- 1 file changed, 47 insertio

Re: [PATCH] drm/amd/display: Clean up coding style violations

2019-01-29 Thread Alex Deucher
On Tue, Jan 29, 2019 at 4:03 PM David Francis wrote: > > Some of the grandfathered amd display code does not follow > Linux coding style and emits warnings or errors on checkpatch > > No functional changes here - just cleanup > > Signed-off-by: David Francis Acked-by: Alex Deucher > --- > ...

Re: [PATCH] drm/amdgpu: add AMDGPU_IB_FLAG_GET_START_SYNCOBJ to expose scheduled fence

2019-01-29 Thread Marek Olšák
On Tue, Jan 29, 2019 at 3:01 AM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 28.01.19 um 22:52 schrieb Marek Olšák: > > From: Marek Olšák > > > > Normal syncobjs signal when an IB finishes. Start syncobjs signal when > > an IB starts. > > That approach has quite a number of pro

Re: [PATCH 1/4] drm/amd/powerplay: support enabled ppfeatures retrieving and setting

2019-01-29 Thread Kuehling, Felix
On 2019-01-14 5:01 a.m., Evan Quan wrote: > + features_to_disable = > + (features_enabled ^ new_ppfeature_masks) & features_enabled; > + features_to_enable = > + (features_enabled ^ new_ppfeature_masks) ^ features_to_disable; This is confusing and unnecessarily com

Re: [PATCH] drm/amdgpu: csa_vaddr should not larger than AMDGPU_GMC_HOLE_START

2019-01-29 Thread Kuehling, Felix
On 2019-01-21 4:55 a.m., Koenig, Christian wrote: > Am 21.01.19 um 05:35 schrieb Liu, Monk: >> >> > Actually that's not so crazy at all. See the ATC uses the CPU page >> tables to provide parts of the virtual GPU address space. >> >>   >> >> So aperture 0->hole-start will be translated **not** by G

[PATCH v2 1/4] drm/sched: Fix entities with 0 rqs.

2019-01-29 Thread Bas Nieuwenhuizen
Some blocks in amdgpu can have 0 rqs. Job creation already fails with -ENOENT when entity->rq is NULL, so jobs cannot be pushed. Without a rq there is no scheduler to pop jobs, and rq selection already does the right thing with a list of length 0. So the operations we need to fix are: - Creatio

[PATCH v2 3/4] drm/amdgpu: Check if fd really is an amdgpu fd.

2019-01-29 Thread Bas Nieuwenhuizen
Otherwise we interpret the file private data as drm & amdgpu data while it might not be, possibly allowing one to get memory corruption. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 16 driver

[PATCH v2 2/4] drm/amdgpu: Only add rqs for initialized rings.

2019-01-29 Thread Bas Nieuwenhuizen
I don't see another way to figure out if a ring is initialized if the hardware block might not be initialized. Entities have been fixed up to handle num_rqs = 0. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 11 --- 1 file changed, 8 insertions(+), 3 del

[PATCH v2 4/4] drm/amdgpu: Add command to override the context priority.

2019-01-29 Thread Bas Nieuwenhuizen
Given a master fd we can then override the priority of the context in another fd. Using these overrides was recommended by Christian instead of trying to submit from a master fd, and I am adding a way to override a single context instead of the entire process so we can only upgrade a single Vulkan

[PATCH] drm/amdgpu: tighten gpu_recover in mailbox_flr to avoid duplicate recover in sriov

2019-01-29 Thread wentalou
sriov's gpu_recover inside xgpu_ai_mailbox_flr_work would cause duplicate recover in TDR. TDR's gpu_recover would be triggered by amdgpu_job_timedout, that could avoid vk-cts failure by unexpected recover. Change-Id: I840dfc145e4e1be9ece6eac8d9f3501da9b28ebf Signed-off-by: wentalou --- drivers/