RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Add Felix and Shaoyun -Original Message- From: Yintian Tao Sent: 2020年4月22日 12:42 To: Koenig, Christian ; Liu, Monk Cc: amd-gfx@lists.freedesktop.org; Tao, Yintian Subject: [PATCH] drm/amdgpu: refine kiq access register According to the current kiq access register method, there will b

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
BUG_ON(in_interrupt()); That won't work like this. The KIQ is also used in interrupt context in the driver, that's why we used spin_lock_irqsave(). And I would either say that we should use the trick with the NOP to reserve space on the ring buffer or call amdgpu_device_wb_get() for each read

Re: [PATCH] amdgpu: fixes memleak issue when init failed

2020-04-22 Thread Christian König
Am 22.04.20 um 02:56 schrieb 赵军奎: 发件人:"Christian König" 发送日期:2020-04-21 22:53:47 收件人:"赵军奎" 抄送人:Alex Deucher ,"David (ChunMing) Zhou" ,David Airlie ,Daniel Vetter ,Tom St Denis ,Ori Messinger ,Sam Ravnborg ,amd-gfx@lists.freedesktop.org,dri-de...@lists.freedesktop.org,linux-ker...@vger.kernel

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian > BUG_ON(in_interrupt()); That won't work like this. The KIQ is also used in interrupt context in the driver, that's why we used spin_lock_irqsave(). [yttao]: According to the current drm-next code, I have not find where to access register through KIQ. And you need

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
Am 22.04.20 um 09:35 schrieb Tao, Yintian: Hi Christian BUG_ON(in_interrupt()); That won't work like this. The KIQ is also used in interrupt context in the driver, that's why we used spin_lock_irqsave(). [yttao]: According to the current drm-next code, I have not find where to access regis

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Please see inline comments. -Original Message- From: Christian König Sent: 2020年4月22日 15:40 To: Tao, Yintian ; Koenig, Christian ; Liu, Monk ; Liu, Shaoyun ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register Am

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
Am 22.04.20 um 09:49 schrieb Tao, Yintian: Hi Christian Please see inline comments. -Original Message- From: Christian König Sent: 2020年4月22日 15:40 To: Tao, Yintian ; Koenig, Christian ; Liu, Monk ; Liu, Shaoyun ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Please see inline comments -Original Message- From: Koenig, Christian Sent: 2020年4月22日 15:54 To: Tao, Yintian ; Liu, Monk ; Liu, Shaoyun ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register Am 22.04.20 um 09:49

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
Am 22.04.20 um 10:06 schrieb Tao, Yintian: Hi Christian Please see inline comments -Original Message- From: Koenig, Christian Sent: 2020年4月22日 15:54 To: Tao, Yintian ; Liu, Monk ; Liu, Shaoyun ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refin

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Please see inline comments. -Original Message- From: Koenig, Christian Sent: 2020年4月22日 16:23 To: Tao, Yintian ; Liu, Monk ; Liu, Shaoyun ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register Am 22.04.20 um 10:06

[PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Yintian Tao
According to the current kiq access register method, there will be race condition when using KIQ to read register if multiple clients want to read at same time just like the expample below: 1. client-A start to read REG-0 throguh KIQ 2. client-A poll the seqno-0 3. client-B start to read REG-1 thro

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
Am 22.04.20 um 11:29 schrieb Yintian Tao: According to the current kiq access register method, there will be race condition when using KIQ to read register if multiple clients want to read at same time just like the expample below: 1. client-A start to read REG-0 throguh KIQ 2. client-A poll the

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Can you help answer the questions below? Thanks in advance. -Original Message- From: Koenig, Christian Sent: 2020年4月22日 19:03 To: Tao, Yintian ; Liu, Monk ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register Am

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
Am 22.04.20 um 13:49 schrieb Tao, Yintian: Hi Christian Can you help answer the questions below? Thanks in advance. -Original Message- From: Koenig, Christian Sent: 2020年4月22日 19:03 To: Tao, Yintian ; Liu, Monk ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH]

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Please see inline commetns. -Original Message- From: Koenig, Christian Sent: 2020年4月22日 19:57 To: Tao, Yintian ; Liu, Monk ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register Am 22.04.20 um 13:49 schrieb Tao, Y

[PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Yintian Tao
According to the current kiq read register method, there will be race condition when using KIQ to read register if multiple clients want to read at same time just like the expample below: 1. client-A start to read REG-0 throguh KIQ 2. client-A poll the seqno-0 3. client-B start to read REG-1 throug

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
Am 22.04.20 um 14:20 schrieb Tao, Yintian: Hi Christian Please see inline commetns. -Original Message- From: Koenig, Christian Sent: 2020年4月22日 19:57 To: Tao, Yintian ; Liu, Monk ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access r

[PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Yintian Tao
According to the current kiq read register method, there will be race condition when using KIQ to read register if multiple clients want to read at same time just like the expample below: 1. client-A start to read REG-0 throguh KIQ 2. client-A poll the seqno-0 3. client-B start to read REG-1 throug

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Thanks, I got it. I will send another patch for the KIQ overrun problem Best Regards Yintian Tao -Original Message- From: Koenig, Christian Sent: 2020年4月22日 20:33 To: Tao, Yintian ; Liu, Monk ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/am

Re: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Christian König
Am 22.04.20 um 14:36 schrieb Yintian Tao: According to the current kiq read register method, there will be race condition when using KIQ to read register if multiple clients want to read at same time just like the expample below: 1. client-A start to read REG-0 throguh KIQ 2. client-A poll the se

Re: [PATCH hmm 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault

2020-04-22 Thread Jason Gunthorpe
On Wed, Apr 22, 2020 at 08:03:29AM +0200, Christoph Hellwig wrote: > > > On Tue, Apr 21, 2020 at 09:21:46PM -0300, Jason Gunthorpe wrote: > > +void nouveau_hmm_convert_pfn(struct nouveau_drm *drm, struct hmm_range > > *range, > > +u64 *ioctl_addr) > > { > > unsigned

[PATCH] drm/amdgpu: Init data to avoid oops while reading pp_num_states.

2020-04-22 Thread limingyu
For chip like CHIP_OLAND with si enabled(amdgpu.si_support=1), the amdgpu will expose pp_num_states to the /sys directory. In this moment, read the pp_num_states file will excute the amdgpu_get_pp_num_states func. In our case, the data hasn't been initialized, so the kernel will access some ilegal

Re: [PATCH] drm/amdgpu: put the audio codec into suspend state before gpu reset V2

2020-04-22 Thread Alex Deucher
On Tue, Apr 21, 2020 at 10:42 PM Evan Quan wrote: > > At default, the autosuspend delay of audio controller is 3S. If the > gpu reset is triggered within 3S(after audio controller idle), > the audio controller may be unable into suspended state. Then > the sudden gpu reset will cause some audio er

Re: [PATCH] drm: amd/display: fix Kconfig help text

2020-04-22 Thread Harry Wentland
On 2020-04-21 7:34 p.m., Randy Dunlap wrote: > From: Randy Dunlap > > Fix help text: indent one tab + 2 spaces; end a sentence with a > period; and collapse short lines of text to one line. > > Fixes: 23c61b4599c4 ("drm/amd: Fix Kconfig indentation") > Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc di

[PATCH] drm/amdgpu: protect kiq overrun

2020-04-22 Thread Yintian Tao
Wait for the oldest to be signaled to make sure there will be no kiq overrun. Signed-off-by: Yintian Tao --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 8 - .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 8 - drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 30 +++

RE: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Liu, Shaoyun
[AMD Official Use Only - Internal Distribution Only] Hi ,Yintian & Christian I still don't understand why we need this complicated change here . Why can not just allocate few more extra space in the ring for each read and use the space to store the output value ? Regards Shaoyun.liu

[PATCH] drm/amdgpu: protect kiq overrun

2020-04-22 Thread Yintian Tao
Wait for the oldest sequence on the kiq ring to be signaled in order to make sure there will be no kiq overrun. v2: remove unused the variable and correct kiq max_sub_num value Signed-off-by: Yintian Tao --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 6 .../gpu/drm/amd/amdgpu/amd

Re: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Christian König
Hi Shaoyun, the ring buffer is usually filled with command and not read results. Allocating extra space would only work if we use the special NOP command and that is way more complicated and fragile than just using the wb functions which where made for this stuff. Regards, Christian. Am 22.

RE: [PATCH] drm/amdgpu: protect kiq overrun

2020-04-22 Thread Liu, Shaoyun
[AMD Official Use Only - Internal Distribution Only] I think each kiq operation will call ring_alloc for the package space , why not just check whether this allocation is succeed or not ? Shaoyun.liu -Original Message- From: amd-gfx On Behalf Of Yintian Tao Sent: Wednesday, Apri

Re: [PATCH] drm/amdgpu: protect kiq overrun

2020-04-22 Thread Christian König
The amdgpu_ring_alloc() function checks if the requested number of DW don't exceed the maximum submission size. It does NOT check if there is enough room on the ring. That would require MMIO access and that is what we want to avoid. Regards, Christian. Am 22.04.20 um 16:54 schrieb Liu, Shaoy

RE: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Liu, Shaoyun
[AMD Official Use Only - Internal Distribution Only] Usually doesn't means we can not do it . I feel this proposal is the simplest and clean . But anyway this is just my suggestion. Regards Shaoyun.liu -Original Message- From: Koenig, Christian Sent: Wednesday, April 22, 2020 10:5

RE: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Tao, Yintian
Hi Shaoyun There is one rare corner case which will raise problem when using ring buffer to store value. It is assumed there are only total four slots at KIQ ring buffer. And these four slots are fulfilled with command to read registers. Slot-A Slot-B Slot-C Slot-D And they are waiting for

Re: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Christian König
Yeah, we discussed that approach as well. But both Yintian and I agreed that this is the simpler solution. Regards, Christian. Am 22.04.20 um 16:59 schrieb Liu, Shaoyun: [AMD Official Use Only - Internal Distribution Only] Usually doesn't means we can not do it . I feel this proposal is th

RE: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Liu, Shaoyun
[AMD Official Use Only - Internal Distribution Only] This is the issue you try to solve with your second patch (protect kiq overrun) . For current patch , if you store the output value in each ring buffer itself , each kiq operation will be atomic and self contain . Shaoyun.liu -Origin

RE: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Tao, Yintian
Hi Shaoyun No, the second patch can't solve this rare case because only Slot-D is signaled and the Slot-A can be overwritten. The second patch think the sequence is signaled the Slot-A buffer can be freed. if you store the output value in each ring buffer itself , each kiq operation will b

RE: [PATCH] drm/amdgpu: protect kiq overrun

2020-04-22 Thread Liu, Shaoyun
[AMD Official Use Only - Internal Distribution Only] I always has an impression for each submission, once the ring be allocated , before the fence be signed , this ring space will always be reserved . If this can not be guaranteed , it sound a big issue to me . Can't we check the rptr wr

RE: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Tao, Yintian
Add more Especially for the multi-VF environment, we have to wait through msleep() instead udeay. Because the max udelay time is 15VF * 6ms(world-switch) = 90ms. -Original Message- From: amd-gfx On Behalf Of Tao, Yintian Sent: 2020年4月22日 23:43 To: Liu, Shaoyun ; Koenig, Christian ; L

RE: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Liu, Shaoyun
[AMD Official Use Only - Internal Distribution Only] OK, I see, the submission it self be signaled so the ring space for this submission will be re-use by other submission , but the CPU still not read the out put value yet. Thanks Shaoyun.liu -Original Message- From: Tao, Yintian

RE: [PATCH] amdgpu: fixes memleak issue when init failed

2020-04-22 Thread Ruhl, Michael J
>-Original Message- >From: dri-devel On Behalf Of >Bernard Zhao >Sent: Tuesday, April 21, 2020 7:17 AM >To: Alex Deucher ; Christian König >; David (ChunMing) Zhou >; David Airlie ; Daniel Vetter >; Tom St Denis ; Ori Messinger >; Sam Ravnborg ; Bernard >Zhao ; amd-gfx@lists.freedesktop.or

RE: [PATCH] drm/amdgpu: request reg_val_offs each kiq read reg

2020-04-22 Thread Tao, Yintian
Hi Shaoyun Yes, you are right. It is the rare corner case. Best Regards Yintian Tao -Original Message- From: Liu, Shaoyun Sent: 2020年4月22日 23:51 To: Tao, Yintian ; Koenig, Christian ; Liu, Monk ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdgpu: re

Re: [PATCH hmm 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault

2020-04-22 Thread Felix Kuehling
[+Philip Yang] Am 2020-04-21 um 8:21 p.m. schrieb Jason Gunthorpe: > From: Jason Gunthorpe > > Presumably the intent here was that hmm_range_fault() could put the data > into some HW specific format and thus avoid some work. However, nothing > actually does that, and it isn't clear how anything a

Re: [PATCH] amdgpu: fixes memleak issue when init failed

2020-04-22 Thread Christian König
Am 22.04.20 um 17:51 schrieb Ruhl, Michael J: -Original Message- From: dri-devel On Behalf Of Bernard Zhao Sent: Tuesday, April 21, 2020 7:17 AM To: Alex Deucher ; Christian König ; David (ChunMing) Zhou ; David Airlie ; Daniel Vetter ; Tom St Denis ; Ori Messinger ; Sam Ravnborg ; Berna

Re: [PATCH] drm/amdgpu: protect kiq overrun

2020-04-22 Thread Christian König
Can't we check the rptr write back to determine the available room in the ring_alloc ? We removed that a couple of years ago. One reason for this is that checking the rptr each time is quite a huge overhead since it is an MMIO register. The other reason is that the rptr is no longer a sec

Re: [PATCH] drm/amdgpu: protect kiq overrun

2020-04-22 Thread Christian König
Am 22.04.20 um 16:50 schrieb Yintian Tao: Wait for the oldest sequence on the kiq ring to be signaled in order to make sure there will be no kiq overrun. v2: remove unused the variable and correct kiq max_sub_num value First of all this should probably be added to the fence handling code

Re: [PATCH hmm 0/5] Adjust hmm_range_fault() API

2020-04-22 Thread Ralph Campbell
On 4/21/20 5:21 PM, Jason Gunthorpe wrote: From: Jason Gunthorpe The API is a bit complicated for the uses we actually have, and disucssions for simplifying have come up a number of times. This small series removes the customizable pfn format and simplifies the return code of hmm_range_fault

Re: [PATCH] drm: amd/display: fix Kconfig help text

2020-04-22 Thread Alex Deucher
On Wed, Apr 22, 2020 at 10:00 AM Harry Wentland wrote: > > On 2020-04-21 7:34 p.m., Randy Dunlap wrote: > > From: Randy Dunlap > > > > Fix help text: indent one tab + 2 spaces; end a sentence with a > > period; and collapse short lines of text to one line. > > > > Fixes: 23c61b4599c4 ("drm/amd: F

Re: [PATCH] drm: amdgpu: fix kernel-doc struct warning

2020-04-22 Thread Alex Deucher
On Tue, Apr 21, 2020 at 10:34 AM Christian König wrote: > > Am 21.04.20 um 16:33 schrieb Christian König: > > Am 20.04.20 um 03:50 schrieb Randy Dunlap: > >> Fix a kernel-doc warning of missing struct field desription: > >> > >> ../drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:92: warning: Function > >>

Re: [PATCH] drm/amdgpu: Init data to avoid oops while reading pp_num_states.

2020-04-22 Thread Alex Deucher
On Wed, Apr 22, 2020 at 9:13 AM limingyu wrote: > > For chip like CHIP_OLAND with si enabled(amdgpu.si_support=1), > the amdgpu will expose pp_num_states to the /sys directory. > In this moment, read the pp_num_states file will excute the > amdgpu_get_pp_num_states func. In our case, the data hasn

[PATCH 00/19] DC Patches 20 April 2020

2020-04-22 Thread Aurabindo Pillai
This DC patchset brings improvements in multiple areas. In summary, we hightlight: * DC version 3.2.83.1 * Enhancements and refactoring in DMUB * Improvments for DCN2, backlight and others __ Anthony Koo (1): drm/amd/display: clean up some header paths Aric Cyr (4): drm/amd/display: 3.2.82

[PATCH 04/19] drm/amd/display: clean up some header paths

2020-04-22 Thread Aurabindo Pillai
From: Anthony Koo [Why] Some include paths don't need to have relative paths And some types missing [How] make some changes to headers and modify include path Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h

[PATCH 01/19] drm/amd/display: 3.2.82

2020-04-22 Thread Aurabindo Pillai
From: Aric Cyr Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 5432ca1657b1..84

[PATCH 02/19] drm/amd/display: Do not disable pipe split if mode is not supported

2020-04-22 Thread Aurabindo Pillai
From: Sung Lee [WHY] If mode is not supported, pipe split should not be disabled. This may cause more modes to fail. [HOW] Check for mode support before disabling pipe split. This commit was previously reverted as it was thought to have problems, but those issues have been resolved. Signed-off

[PATCH 06/19] drm/amd/display: check if REFCLK_CNTL register is present

2020-04-22 Thread Aurabindo Pillai
From: Dmytro Laktyushkin Check before programming the register since it isn't present on all IPs using this code. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 3 ++- 1 file changed, 2 inserti

[PATCH 03/19] drm/amd/display: Fix DMUB meta offset for new load method

2020-04-22 Thread Aurabindo Pillai
From: Nicholas Kazlauskas [Why] The new metadata offset is located at the end of the firmware binary without any additional padding. Firmware state is currently larger than 1024 bytes so new firmware state will hang when trying to access any data above 1024 bytes. [How] Specify the correct offs

[PATCH 12/19] drm/amd/display: Pass command instead of header into DMUB service

2020-04-22 Thread Aurabindo Pillai
From: Nicholas Kazlauskas [Why] We read memory that we shouldn't be touching if the struct isn't a full union dmub_rb_cmd. [How] Fix up all the callers and functions that take in the dmub_cmd_header to use the dmub_rb_cmd instead. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Ack

[PATCH 11/19] drm/amd/display: Update downspread percent to match spreadsheet for DCN2.1

2020-04-22 Thread Aurabindo Pillai
From: Sung Lee [WHY] The downspread percentage was copied over from a previous version of the display_mode_lib spreadsheet. This value has been updated, and the previous value is too high to allow for such modes as 4K120hz. The new value is sufficient for such modes. [HOW] Update the value in dc

[PATCH 13/19] drm/amd/display: Add panel cntl id for set backlight level.

2020-04-22 Thread Aurabindo Pillai
From: Yongqiang Sun [Why & How] Add panel cntl instance when calling set backlight. Signed-off-by: Yongqiang Sun Reviewed-by: Anthony Koo Acked-by: Aurabindo Pillai Acked-by: Tony Cheng --- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- drivers/gpu/drm/amd/display/dc/core/dc_li

[PATCH 05/19] drm/amd/display: Add DML variable for future asics

2020-04-22 Thread Aurabindo Pillai
From: Joshua Aberback Signed-off-by: Joshua Aberback Reviewed-by: Dmytro Laktyushkin Reviewed-by: Jun Lei Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 1 + drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 1 + drivers/gpu/drm/amd/displ

[PATCH 10/19] drm/amd/display: Defer cursor update around VUPDATE for all ASIC

2020-04-22 Thread Aurabindo Pillai
From: Nicholas Kazlauskas [Why] Fixes the following scenario: - Flip has been prepared sometime during the frame, update pending - Cursor update happens right when VUPDATE would happen - OPTC lock acquired, VUPDATE is blocked until next frame - Flip is delayed potentially infinitely With the ig

[PATCH 14/19] drm/amd/display: Add dummy p-state latency bounding box override

2020-04-22 Thread Aurabindo Pillai
From: Joshua Aberback [Why] For debugging, it can be useful to be able to modify the dummy p-state latency, this will make it easier to do so. Signed-off-by: Joshua Aberback Reviewed-by: Wesley Chalmers Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dc.h | 1

[PATCH 08/19] drm/amd/display: Fail validation if building scaling params fails

2020-04-22 Thread Aurabindo Pillai
From: Sung Lee [WHY & HOW] If building scaling parameters fails, validation should also fail. Signed-off-by: Sung Lee Reviewed-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai --- .../drm/amd/display/dc/dcn20/dcn20_resource.c| 16 ++-- .../drm/amd/display/dc/dcn20/dcn20_reso

[PATCH 18/19] drm/amd/display: 3.2.83

2020-04-22 Thread Aurabindo Pillai
From: Aric Cyr Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index b4aeb5d8a818..89

[PATCH 16/19] drm/amd/display: Internal refactoring to abstract color caps

2020-04-22 Thread Aurabindo Pillai
From: Krunoslav Kovac [Why&How] modules/color calculates various colour operations which are translated to abstracted HW. DCE 5-12 had almost no important changes, but starting with DCN1, every new generation comes with fairly major differences in color pipeline. We would hack it with some DCN ch

[PATCH 07/19] drm/amd/display: fix rn soc bb update

2020-04-22 Thread Aurabindo Pillai
From: Dmytro Laktyushkin Currently RN SOC bounding box update assumes we will get at least 2 clock states from SMU. This isn't always true and because of special casing on first clock state we end up with low disp, dpp, dsc and phy clocks. This change removes the special casing allowing the firs

[PATCH 15/19] drm/amd/display: Add set backlight to hw sequencer.

2020-04-22 Thread Aurabindo Pillai
From: Yongqiang Sun [Why & How] Add set backlight to hw sequencer, dmu communication will be handled in hw sequencer for new asics. Signed-off-by: Yongqiang Sun Reviewed-by: Anthony Koo Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 35 ++- ...

[PATCH 09/19] drm/amd/display: Change viewport limit to 12 for DCN2

2020-04-22 Thread Aurabindo Pillai
From: Sung Lee [WHY & HOW] Viewport limit was set to 16 pixels due to an issue with MPO on small viewports. This restriction does not apply and the viewport limit can now be lowered. Signed-off-by: Sung Lee Reviewed-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/di

[PATCH 17/19] drm/amd/display: Use cursor locking to prevent flip delays

2020-04-22 Thread Aurabindo Pillai
From: Aric Cyr [Why] Current locking scheme for cursor can result in a flip missing its vsync, deferring it for one or more vsyncs. Result is a potential for stuttering when cursor is moved. [How] Use cursor update lock so that flips are not blocked while cursor is being programmed. Signed-off

[PATCH 19/19] drm/amd/display: 3.2.83.1

2020-04-22 Thread Aurabindo Pillai
From: Aric Cyr Update firmware blobs Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h

[pull] amdgpu drm-fixes-5.7

2020-04-22 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.7. The following changes since commit 4da858c086433cd012c0bb16b5921f6fafe3f803: Merge branch 'linux-5.7' of git://github.com/skeggsb/linux into drm-fixes (2020-04-16 15:40:02 +1000) are available in the Git repository at: git://people.freedesktop.org/~agd5f/li

[PATCH v2] drm/amdkfd: Track GPU memory utilization per process

2020-04-22 Thread Mukul Joshi
Track GPU VRAM usage on a per process basis and report it through sysfs. v2: - Handle AMDGPU BO-specific details in amdgpu_amdkfd_gpuvm_free_memory_of_gpu(). - Return size of VRAM BO being freed from amdgpu_amdkfd_gpuvm_free_memory_of_gpu(). - Do not consider imported memory

RE: [PATCH] drm/amdgpu: protect kiq overrun

2020-04-22 Thread Tao, Yintian
Hi Christian Ok , I got it. The real max number can be submitted to kiq ring buffer is 1024. If we use the num_fneces_mask value then the max submission number will be reduced to 512, do you think whether it is ok? Best Regards Yintian Tao -Original Message- From: Koenig, Christian

[PATCH] drm/amdgpu: protect ring overrun

2020-04-22 Thread Yintian Tao
Wait for the oldest sequence on the ring to be signaled in order to make sure there will be no command overrun. Signed-off-by: Yintian Tao --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 17 +++-- drivers/gpu/drm/amd/amdgpu/amdg