Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit. Fix it by replacing with scnprintf().
Also adjust the size argument passed to scnprintf() so that it really
cuts off at the right remaining buffer length
BTW, please ignore the subject prefix '[1/5]', which was added
mistakenly while extracting a patch from the commit list.
This is a single patch.
thanks,
Takashi
On Wed, 11 Mar 2020 08:29:04 +0100,
Takashi Iwai wrote:
>
> Since snprintf() returns the would-be-output size instead of the
> actual
[AMD Public Use]
Reviewed-by: Guchun Chen
Regards,
Guchun
-Original Message-
From: Stanley.Yang
Sent: Wednesday, March 11, 2020 2:38 PM
To: amd-gfx@lists.freedesktop.org
Cc: Zhang, Hawking ; Chen, Guchun ;
Li, Dennis ; Clements, John ; Yang,
Stanley
Subject: [PATCH] drm/amdgpu: us
This can fix the baco reset failure seen on Navi10.
And this should be a low risk fix as the same sequence
is already used for system suspend/resume.
Change-Id: Idb4d02c5fcbbd5b7817195ee04c7af34c346a053
Signed-off-by: Evan Quan
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4
1 file chan
There is a new fallthrough pseudo-keyword macro that can be used
to replace the various /* fallthrough */ style comments that are
used to indicate a case label code block is intended to fallthrough
to the next case label block.
See commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough'
pse
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link:
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches
---
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 ++--
drivers/gpu/drm/amd/d
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link:
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 2 +-
1 file changed, 1 inse
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link:
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 +++---
1 file changed, 3 ins
The runtime pm is verified as working now
on navi12.
Change-Id: I20393633678297308c9651237bbfdc854a3cff94
Signed-off-by: Evan Quan
---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
b/drivers/
[AMD Official Use Only - Internal Distribution Only]
ping
From: Zhu, James
Sent: Monday, March 9, 2020 12:57 PM
To: amd-gfx@lists.freedesktop.org
Cc: Zhu, James ; Koenig, Christian
Subject: [PATCH v3 1/4] drm/amdgpu/vcn: fix race condition issue for vcn start
Am 11.03.20 um 12:30 schrieb Zhu, James:
[AMD Official Use Only - Internal Distribution Only]
ping
*From:* Zhu, James
*Sent:* Monday, March 9, 2020 12:57 PM
*To:* amd-gfx@lists.freedesktop.org
*Cc:* Zhu, James ; Koenig
[AMD Public Use]
Reviewed-by: Alex Deucher
From: amd-gfx on behalf of Evan Quan
Sent: Wednesday, March 11, 2020 4:18 AM
To: amd-gfx@lists.freedesktop.org
Cc: Quan, Evan
Subject: [PATCH] drm/amdgpu: add fbdev suspend/resume on gpu reset
This can fix the baco
[AMD Public Use]
Reviewed-by: Alex Deucher
From: Quan, Evan
Sent: Wednesday, March 11, 2020 6:56 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander ; Quan, Evan
Subject: [PATCH] drm/amdgpu: reenable runtime pm on navi12
The runtime pm is verified as
[AMD Official Use Only - Internal Distribution Only]
Hi Evan,
Does this patch also fix the baco failure on Navi14 with display connected?
BR,
Xiaojie
From: amd-gfx on behalf of Evan Quan
Sent: Wednesday, March 11, 2020 4:18 PM
To: amd-gfx@lists.freede
On 2020-03-11 7:38 a.m., Christian König wrote:
Am 11.03.20 um 12:30 schrieb Zhu, James:
[AMD Official Use Only - Internal Distribution Only]
ping
*From:* Zhu, James
*Sent:* Monday, March 9, 2020 12:57 PM
*To:* amd-gf
Fix race condition issue when multiple vcn starts are called.
v2: Removed checking the return value of cancel_delayed_work_sync()
to prevent possible races here.
v3: Add total_submission_cnt to avoid gate power unexpectedly.
v4: Remove extra counter check, and reduce counter before idle
work sch
Couldn't only rely on enc fence to decide switching to dpg unpaude mode.
Since a enc thread may not schedule a fence in time during multiple
threads running situation.
v3: 1. Rename enc_submission_cnt to dpg_enc_submission_cnt
2. Add dpg_enc_submission_cnt check in idle_work_handler
v4: Remo
Am 11.03.20 um 15:15 schrieb James Zhu:
Fix race condition issue when multiple vcn starts are called.
v2: Removed checking the return value of cancel_delayed_work_sync()
to prevent possible races here.
v3: Add total_submission_cnt to avoid gate power unexpectedly.
v4: Remove extra counter chec
Fix race condition issue when multiple vcn starts are called.
v2: Removed checking the return value of cancel_delayed_work_sync()
to prevent possible races here.
v3: Add total_submission_cnt to avoid gate power unexpectedly.
v4: Remove extra counter check, and reduce counter before idle
work sch
Am 11.03.20 um 16:04 schrieb James Zhu:
Fix race condition issue when multiple vcn starts are called.
v2: Removed checking the return value of cancel_delayed_work_sync()
to prevent possible races here.
v3: Add total_submission_cnt to avoid gate power unexpectedly.
v4: Remove extra counter chec
On Tue, Mar 10, 2020 at 8:53 AM Tom St Denis wrote:
>
> The offset into the array was specified in bytes but should
> be in terms of 32-bit words. Also prevent large reads that
> would also cause a buffer overread.
>
> Signed-off-by: Tom St Denis
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_debugf
On 2020-03-11 11:16 a.m., Alex Deucher wrote:
On Tue, Mar 10, 2020 at 8:53 AM Tom St Denis wrote:
The offset into the array was specified in bytes but should
be in terms of 32-bit words. Also prevent large reads that
would also cause a buffer overread.
Signed-off-by: Tom St Denis
---
dri
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This modifies the entity's sched_list
to a sched_list consist of only one drm scheduler.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 25 ++
Implement drm_sched_entity_num_jobs() so that drm drivers can
query number of jobs in an entity.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/scheduler/sched_entity.c | 15 +++
include/drm/gpu_scheduler.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/drivers/g
On 3/11/20 1:18 PM, Nirmoy Das wrote:
Implement drm_sched_entity_num_jobs() so that drm drivers can
query number of jobs in an entity.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/scheduler/sched_entity.c | 15 +++
include/drm/gpu_scheduler.h | 1 +
2 files chan
On 3/11/20 6:23 PM, Andrey Grodzovsky wrote:
On 3/11/20 1:18 PM, Nirmoy Das wrote:
Implement drm_sched_entity_num_jobs() so that drm drivers can
query number of jobs in an entity.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/scheduler/sched_entity.c | 15 +++
include/drm/gpu_
Am 11.03.20 um 18:58 schrieb Nirmoy:
On 3/11/20 6:23 PM, Andrey Grodzovsky wrote:
On 3/11/20 1:18 PM, Nirmoy Das wrote:
Implement drm_sched_entity_num_jobs() so that drm drivers can
query number of jobs in an entity.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/scheduler/sched_entity.c |
Am 11.03.20 um 18:18 schrieb Nirmoy Das:
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This modifies the entity's sched_list
to a sched_list consist of only one drm scheduler.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 +
dr
On 3/11/20 7:03 PM, Christian König wrote:
Am 11.03.20 um 18:18 schrieb Nirmoy Das:
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This modifies the entity's sched_list
to a sched_list consist of only one drm scheduler.
Signed-off-by: Nirmoy Das
---
driver
From: Jason Gunthorpe
The hmm_range_fault() flow is fairly complicated. The scheme allows the
caller to specify if it needs a usable result for each page, or if it only
needs the current page table status filled in. This mixture of behavior is
useful for a caller that wants to build a 'prefetch a
From: Jason Gunthorpe
The intention with this code is to determine if the caller required the
pages to be valid, and if so, then take some action to make them valid.
The action varies depending on the page type.
In all cases, if the caller doesn't ask for the page, then
hmm_range_fault() should
From: Jason Gunthorpe
All success exit paths from the walker functions must set the pfns array.
A migration entry with no required fault is a HMM_PFN_NONE return, just
like the pte case.
Fixes: d08faca018c4 ("mm/hmm: properly handle migration pmd")
Signed-off-by: Jason Gunthorpe
---
mm/hmm.c
From: Jason Gunthorpe
The pgmap is held in the hmm_vma_walk variable in hope of speeding up
future get_dev_pagemap() calls by hitting the same pointer. The algorithm
doesn't actually care about how long the pgmap is held for.
Move the put of the cached pgmap to after the walk is completed and de
From: Jason Gunthorpe
All return paths that do EFAULT must call hmm_range_need_fault() to
determine if the user requires this page to be valid.
If the page cannot be made valid if the user later requires it, due to vma
flags in this case, then the return should be HMM_PFN_ERROR.
Fixes: a3e0d41c
From: Jason Gunthorpe
Currently if a special PTE is encountered hmm_range_fault() immediately
returns EFAULT and sets the HMM_PFN_SPECIAL error output (which nothing
uses).
EFAULT should only be returned after testing with hmm_pte_need_fault().
Also pte_devmap() and pte_special() are exclusive,
From: Jason Gunthorpe
This eventually calls into handle_mm_fault() which is a sleeping function.
Release the lock first.
hmm_vma_walk_hole() does not touch the contents of the PUD, so it does not
need the lock.
Fixes: 3afc423632a1 ("mm: pagewalk: add p4d_entry() and pgd_entry()")
Cc: Steven Pri
From: Jason Gunthorpe
Many of the direct returns of error skipped doing the pte_unmap(). All non
zero exit paths must unmap the pte.
The pte_unmap() is split unnaturally like this because some of the error
exit paths trigger a sleep and must release the lock before sleeping.
Fixes: 992de9a8b751
From: Jason Gunthorpe
hmm_range_fault() should never return 0 if the caller requested a valid
page, but the pfns output for that page would be HMM_PFN_ERROR.
hmm_pte_need_fault() must always be called before setting HMM_PFN_ERROR to
detect if the page is in faulting mode or not.
Fix two cases i
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This patch modifies entity's
sched_list to a sched_list consist of only one drm scheduler.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This patch modifies entity's
sched_list to a sched_list consist of only one drm scheduler.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
On 3/11/20 4:00 PM, Nirmoy Das wrote:
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This patch modifies entity's
sched_list to a sched_list consist of only one drm scheduler.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4
On 3/11/20 4:00 PM, Andrey Grodzovsky wrote:
On 3/11/20 4:00 PM, Nirmoy Das wrote:
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This patch modifies entity's
sched_list to a sched_list consist of only one drm scheduler.
Signed-off-by: Nirmoy Das
---
driv
On 2020-03-11 4:00 p.m., Nirmoy Das wrote:
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This patch modifies entity's
sched_list to a sched_list consist of only one drm scheduler.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4
On 3/11/20 9:02 PM, Andrey Grodzovsky wrote:
On 3/11/20 4:00 PM, Andrey Grodzovsky wrote:
On 3/11/20 4:00 PM, Nirmoy Das wrote:
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This patch modifies entity's
sched_list to a sched_list consist of only one drm sc
On 3/11/20 9:14 PM, James Zhu wrote:
On 2020-03-11 4:00 p.m., Nirmoy Das wrote:
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This patch modifies entity's
sched_list to a sched_list consist of only one drm scheduler.
Signed-off-by: Nirmoy Das
---
drivers
The offset into the array was specified in bytes but should
be in terms of 32-bit words. Also prevent large reads that
would also cause a buffer overread.
v2: Read from correct offset from internal storage buffer.
Signed-off-by: Tom St Denis
Acked-by: Christian König
---
drivers/gpu/drm/amd/
Hi Alex,
I sent out a v2 of the patch to the list that also addresses the fact we
were reading from the wrong offset from the internal buffer.
This entry was really only tested with offset==0 which is why this
didn't come up until now that people want those trap registers :-)
Tom
On 2020-0
On 3/11/20 4:32 PM, Nirmoy wrote:
On 3/11/20 9:02 PM, Andrey Grodzovsky wrote:
On 3/11/20 4:00 PM, Andrey Grodzovsky wrote:
On 3/11/20 4:00 PM, Nirmoy Das wrote:
VCN HW doesn't support dynamic load balance on multiple
instances for a context. This patch modifies entity's
sched_list to a s
Couldn't only rely on enc fence to decide switching to dpg unpaude mode.
Since a enc thread may not schedule a fence in time during multiple
threads running situation.
v3: 1. Rename enc_submission_cnt to dpg_enc_submission_cnt
2. Add dpg_enc_submission_cnt check in idle_work_handler
v4: Remo
Add vcn harware and firmware synchronization to fix race condition
issue among vcn driver, hardware and firmware under DPG mode
Signed-off-by: James Zhu
---
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/vc
Fix race condition issue when multiple vcn starts are called.
v2: Removed checking the return value of cancel_delayed_work_sync()
to prevent possible races here.
v3: Add total_submission_cnt to avoid gate power unexpectedly.
v4: Remove extra counter check, and reduce counter before idle
work sch
Add vcn harware and firmware synchronization to fix race condition
issue among vcn driver, hardware and firmware under DPG mode.
Signed-off-by: James Zhu
Reviewed-by: Leo Liu
---
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 16
1 file changed, 16 insertions(+)
diff --git a/drivers/
On 3/11/20 9:35 PM, Andrey Grodzovsky wrote:
On 3/11/20 4:32 PM, Nirmoy wrote:
On 3/11/20 9:02 PM, Andrey Grodzovsky wrote:
On 3/11/20 4:00 PM, Andrey Grodzovsky wrote:
On 3/11/20 4:00 PM, Nirmoy Das wrote:
VCN HW doesn't support dynamic load balance on multiple
instances for a context.
On Wed, Mar 11, 2020 at 4:33 PM Tom St Denis wrote:
>
> The offset into the array was specified in bytes but should
> be in terms of 32-bit words. Also prevent large reads that
> would also cause a buffer overread.
>
> v2: Read from correct offset from internal storage buffer.
>
> Signed-off-by:
On 2020-03-11 12:51 a.m., Joe Perches wrote:
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link:
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
The link seems to be broken. This one works:
https://lore.kernel.
On 3/11/20 11:34 AM, Jason Gunthorpe wrote:
From: Jason Gunthorpe
Many of the direct returns of error skipped doing the pte_unmap(). All non
zero exit paths must unmap the pte.
The pte_unmap() is split unnaturally like this because some of the error
exit paths trigger a sleep and must releas
On Wed, 2020-03-11 at 17:50 -0400, Felix Kuehling wrote:
> On 2020-03-11 12:51 a.m., Joe Perches wrote:
> > Convert the various uses of fallthrough comments to fallthrough;
> >
> > Done via script
> > Link:
> > https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.j
On 3/11/20 11:35 AM, Jason Gunthorpe wrote:
From: Jason Gunthorpe
The intention with this code is to determine if the caller required the
pages to be valid, and if so, then take some action to make them valid.
The action varies depending on the page type.
In all cases, if the caller doesn't
On 3/11/20 11:35 AM, Jason Gunthorpe wrote:
From: Jason Gunthorpe
hmm_range_fault() should never return 0 if the caller requested a valid
page, but the pfns output for that page would be HMM_PFN_ERROR.
hmm_pte_need_fault() must always be called before setting HMM_PFN_ERROR to
detect if the p
On 3/11/20 11:35 AM, Jason Gunthorpe wrote:
From: Jason Gunthorpe
Currently if a special PTE is encountered hmm_range_fault() immediately
returns EFAULT and sets the HMM_PFN_SPECIAL error output (which nothing
uses).
EFAULT should only be returned after testing with hmm_pte_need_fault().
Al
On 3/11/20 11:35 AM, Jason Gunthorpe wrote:
From: Jason Gunthorpe
The pgmap is held in the hmm_vma_walk variable in hope of speeding up
future get_dev_pagemap() calls by hitting the same pointer. The algorithm
doesn't actually care about how long the pgmap is held for.
Move the put of the ca
On 3/11/20 11:35 AM, Jason Gunthorpe wrote:
From: Jason Gunthorpe
This eventually calls into handle_mm_fault() which is a sleeping function.
Release the lock first.
hmm_vma_walk_hole() does not touch the contents of the PUD, so it does not
need the lock.
Fixes: 3afc423632a1 ("mm: pagewalk:
On 3/11/20 11:35 AM, Jason Gunthorpe wrote:
From: Jason Gunthorpe
All success exit paths from the walker functions must set the pfns array.
A migration entry with no required fault is a HMM_PFN_NONE return, just
like the pte case.
Fixes: d08faca018c4 ("mm/hmm: properly handle migration pmd"
On 3/11/20 11:35 AM, Jason Gunthorpe wrote:
From: Jason Gunthorpe
All return paths that do EFAULT must call hmm_range_need_fault() to
determine if the user requires this page to be valid.
If the page cannot be made valid if the user later requires it, due to vma
flags in this case, then the
Hi Dave, Daniel,
Fixes for 5.6.
The following changes since commit 513dc792d6060d5ef572e43852683097a8420f56:
vgacon: Fix a UAF in vgacon_invert_region (2020-03-06 21:06:34 +0100)
are available in the Git repository at:
git://people.freedesktop.org/~agd5f/linux tags/amd-drm-fixes-5.6-2020-0
When sram ecc is disabled by vbios, ras initialization
process in the corrresponding IPs that suppport sram ecc
needs to be skipped. So update ras support capability
accordingly on top of this configuration. This capability
will block further ras operations to the unsupported IPs.
v2: check HBM EC
Memory ecc check including HBM and SRAM has been done
in ras init function for vega20 and arcturus. So remove
it from gmc module, only keep this check for vega10.
Suggested-by: Hawking Zhang
Signed-off-by: Guchun Chen
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 +++---
1 file changed
Have not tried Navi14 yet. But likely it can fix that baco failure.
At least it can fix the baco issue of Navi10 which is very similar as Navi14's.
Regards,
Evan
-Original Message-
From: Yuan, Xiaojie
Sent: Wednesday, March 11, 2020 10:10 PM
To: Quan, Evan ; amd-gfx@lists.freedesktop.org
[AMD Official Use Only - Internal Distribution Only]
Hi Guchun,
It seems to me we still have redundant function call in
amdgpu_ras_check_supported. The atomfirmware interfaces are possibly invoked
twice?
As I listed the steps in last thread, we can assume hw_supported to 0 or
0xfff either
[AMD Official Use Only - Internal Distribution Only]
I think we can merge the patch with first one as they are all refine current
logic for querying ras capability.
Regards,
Hawking
-Original Message-
From: Chen, Guchun
Sent: Thursday, March 12, 2020 10:55
To: amd-gfx@lists.freedeskto
[AMD Public Use]
Thanks for your suggestion, Hawking.
I will send one patch v3 to target this.
Regards,
Guchun
-Original Message-
From: Zhang, Hawking
Sent: Thursday, March 12, 2020 11:13 AM
To: Chen, Guchun ; amd-gfx@lists.freedesktop.org; Li,
Dennis ; Zhou1, Tao ; Clements, John
S
RAS support capability needs to be updated on top of different
memeory ECC enablement, and remove redundant memory ecc check
in gmc module for vega20 and arcturus.
v2: check HBM ECC enablement and set ras mask accordingly.
v3: avoid to invoke atomfirmware interface to query twice.
Suggested-by: H
[AMD Official Use Only - Internal Distribution Only]
+ if (!r) {
+ DRM_INFO("SRAM ECC is not present.\n");
+ } else {
+ DRM_INFO("SRAM ECC is active.\n");
}
{} is not needed. With that fixed, the patch is
Rev
73 matches
Mail list logo