[PATCH v4 3/3] drm/i915/display: Configure HDMI2.1 Pcon for FRL only if Src-Ctl mode is available

2021-03-22 Thread Ankit Nautiyal
Add the check if source control mode is supported by the PCON, before starting configuring PCON for FRL training, as per spec VESA DP2.0-HDMI2.1 PCON Draft-1 Sec-7. v2: Added spec details for the change. (Uma) Signed-off-by: Ankit Nautiyal Reviewed-by: Uma Shankar --- drivers/gpu/drm/i915/disp

Re: [PATCH 3/3] drm/ttm: switch to per device LRU lock

2021-03-22 Thread Huang Rui
On Fri, Mar 19, 2021 at 08:10:21PM +0800, Christian König wrote: > Am 19.03.21 um 05:32 schrieb Huang Rui: > > On Thu, Mar 18, 2021 at 08:47:19PM +0800, Christian König wrote: > >> Instead of having a global lock. > >> > >> Signed-off-by: Christian König > >> --- > >> drivers/gpu/drm/amd/amdgpu/

Re: [PATCH v2 3/3] drm/tilcdc: fix pixel clock setting warning message

2021-03-22 Thread Tomi Valkeinen
On 21/03/2021 10:31, Dario Binacchi wrote: The warning message did not printed the LCD pixel clock rate but the LCD clock divisor input rate. As a consequence, the required and real pixel clock rates are now passed to the tilcdc_pclk_diff(). Signed-off-by: Dario Binacchi --- Changes in v2: -

Re: [PATCH v2 0/3] drm/tilcdc: fix LCD pixel clock setting

2021-03-22 Thread Tomi Valkeinen
On 21/03/2021 21:08, Jyri Sarha wrote: On 2021-03-21 10:31, Dario Binacchi wrote: The series was born from a patch to fix the LCD pixel clock setting. Two additional patches have been added to this. One renames a misleading variable name that was probably the cause of the bug and the other fixes

Re: [PATCH v2] drm/radeon: don't evict if not initialized

2021-03-22 Thread Christian König
Am 21.03.21 um 16:19 schrieb Tong Zhang: TTM_PL_VRAM may not initialized at all when calling radeon_bo_evict_vram(). We need to check before doing eviction. [2.160837] BUG: kernel NULL pointer dereference, address: 0020 [2.161212] #PF: supervisor read access in kernel mode [

Re: [RFC PATCH 2/2] mm,drm/ttm: Use VM_PFNMAP for TTM vmas

2021-03-22 Thread Christian König
Am 21.03.21 um 19:45 schrieb Thomas Hellström (Intel): To block fast gup we need to make sure TTM ptes are always special. With MIXEDMAP we, on architectures that don't support pte_special, insert normal ptes, but OTOH on those architectures, fast is not supported. At the same time, the function

Re: [RFC PATCH 2/2] mm,drm/ttm: Use VM_PFNMAP for TTM vmas

2021-03-22 Thread Intel
Hi! On 3/22/21 8:47 AM, Christian König wrote: Am 21.03.21 um 19:45 schrieb Thomas Hellström (Intel): To block fast gup we need to make sure TTM ptes are always special. With MIXEDMAP we, on architectures that don't support pte_special, insert normal ptes, but OTOH on those architectures, fast

[PATCH] drm/amd/pm/powerplay/smumgr/smu7_smumgr: Fix some typo error

2021-03-22 Thread samirweng1979
From: wengjianfeng change 'addres' to 'address' Signed-off-by: wengjianfeng --- drivers/gpu/drm/amd/pm/powerplay/smumgr/smu7_smumgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/pm/powerpla

Re: [RESEND 00/53] Rid GPU from W=1 warnings

2021-03-22 Thread Lee Jones
On Fri, 19 Mar 2021, Daniel Vetter wrote: > On Fri, Mar 19, 2021 at 08:24:07AM +, Lee Jones wrote: > > On Thu, 18 Mar 2021, Daniel Vetter wrote: > > > > > On Wed, Mar 17, 2021 at 9:32 PM Daniel Vetter wrote: > > > > > > > > On Wed, Mar 17, 2021 at 9:17 AM Lee Jones wrote: > > > > > > > > >

Re: [PATCH] drm/imx/dcss: Use device_get_match_data()

2021-03-22 Thread Laurentiu Palcu
Hi Fabio, On Mon, Mar 15, 2021 at 09:38:11AM -0300, Fabio Estevam wrote: > The retrieval of driver data can be a bit simplified by using > device_get_match_data(), so switch to it. > > Signed-off-by: Fabio Estevam Reviewed-by: Laurentiu Palcu > --- > drivers/gpu/drm/imx/dcss/dcss-dev.c | 9 +

[PATCH] drm/omap: dsi: Add missing IRQF_ONESHOT

2021-03-22 Thread Yang Li
fixed the following coccicheck: ./drivers/gpu/drm/omapdrm/dss/dsi.c:4329:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT Reported-by: Abaci Robot Signed-off-by: Yang Li --- d

Re: [PATCH] drm/fourcc: add Vivante TS modifiers

2021-03-22 Thread Christian Gmeiner
Am Sa., 20. März 2021 um 20:11 Uhr schrieb Daniel Vetter : > > On Sat, Mar 20, 2021 at 10:28 AM Christian Gmeiner > wrote: > > > > Hi Lucas > > > > Am Fr., 19. März 2021 um 20:06 Uhr schrieb Lucas Stach > > : > > > > > > Vivante TS (tile-status) buffer modifiers. They can be combined with all >

[v1] drm/msm/disp/dpu1: icc path needs to be set before dpu runtime resume

2021-03-22 Thread Kalyan Thota
From: Kalyan Thota DPU runtime resume will request for a min vote on the AXI bus as it is a necessary step before turning ON the AXI clock. The change does below 1) Move the icc path set before requesting runtime get_sync. 2) remove the dependency of hw catalog for min ib vote as it is initializ

Re: [PATCH v6 1/8] mm: Remove special swap entry functions

2021-03-22 Thread Alistair Popple
On Monday, 15 March 2021 6:27:57 PM AEDT Christoph Hellwig wrote: > On Fri, Mar 12, 2021 at 07:38:44PM +1100, Alistair Popple wrote: > > Remove the migration and device private entry_to_page() and > > entry_to_pfn() inline functions and instead open code them directly. > > This results in shorter c

Re: [PATCH] drm/fourcc: add Vivante TS modifiers

2021-03-22 Thread Lucas Stach
Hi Christian, Am Montag, dem 22.03.2021 um 09:54 +0100 schrieb Christian Gmeiner: > Am Sa., 20. März 2021 um 20:11 Uhr schrieb Daniel Vetter : > > > > On Sat, Mar 20, 2021 at 10:28 AM Christian Gmeiner > > wrote: > > > > > > Hi Lucas > > > > > > Am Fr., 19. März 2021 um 20:06 Uhr schrieb Lucas

Re: [PATCH] drm/imx/dcss: Use device_get_match_data()

2021-03-22 Thread Ying Liu
Hi Fabio, On Mon, Mar 15, 2021 at 8:38 PM Fabio Estevam wrote: > > The retrieval of driver data can be a bit simplified by using > device_get_match_data(), so switch to it. > > Signed-off-by: Fabio Estevam > --- > drivers/gpu/drm/imx/dcss/dcss-dev.c | 9 + > 1 file changed, 1 insertion(

Re: [PATCH v6 8/8] nouveau/svm: Implement atomic SVM access

2021-03-22 Thread Alistair Popple
On Monday, 15 March 2021 6:51:13 PM AEDT Christoph Hellwig wrote: > > - /*XXX: atomic? */ > > - return (fa->access == 0 || fa->access == 3) - > > - (fb->access == 0 || fb->access == 3); > > + /* Atomic access (2) has highest priority */ > > + return (-1*(fa->access == 2) + (fa->acc

[Bug 206475] amdgpu under load drop signal to monitor until hard reset

2021-03-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206475 Marco (rodomar...@protonmail.com) changed: What|Removed |Added Status|REOPENED|RESOLVED Reso

Re: [PATCH v6 2/5] drm/bridge: anx7625: fix not correct return value

2021-03-22 Thread Robert Foss
Hey Xin, This patch looks good to me. Reviewed-by: Robert Foss On Fri, 19 Mar 2021 at 07:33, Xin Ji wrote: > > At some time, the original code may return non zero value, force return 0 > if operation finished. > > Signed-off-by: Xin Ji > --- > drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++

Re: [PATCH] drm/radeon/ttm: Fix memory leak userptr pages

2021-03-22 Thread Daniel Gomez
On Fri, 19 Mar 2021 at 21:29, Felix Kuehling wrote: > > This caused a regression in kfdtest in a large-buffer stress test after > memory allocation for user pages fails: I'm sorry to hear that. BTW, I guess you meant amdgpu leak patch and not this one. Just some background for the mem leak patch

Re: [PATCH] drm: xlnx: zynqmp: release reset to DP controller before accessing DP registers

2021-03-22 Thread quanyang.wang
Hi Laurent, On 3/21/21 4:08 AM, Laurent Pinchart wrote: Hi Quanyang, Thank you for the patch. On Sat, Mar 20, 2021 at 04:37:39PM +0800, quanyang.w...@windriver.com wrote: From: Quanyang Wang When insmod zynqmp-dpsub.ko after rmmod it, system will hang with the error log as below: root@xili

[PATCH v3 0/2] gpu: drm: add driver for ili9361 panel

2021-03-22 Thread Daniel Mack
This is v3 of the series. Changelog: v2 -> v3: * Turn Documentation into yaml format Daniel Mack (2): dt-bindings: display: add bindings for newhaven,1.8-128160EF drm/tiny: add driver for newhaven,1.8-128160EF .../bindings/display/ilitek,ili9163.yaml | 70 ++ drivers/gpu/

[PATCH v3 1/2] dt-bindings: display: add bindings for newhaven, 1.8-128160EF

2021-03-22 Thread Daniel Mack
This adds documentation for a new ILI9163 based, SPI connected display. Signed-off-by: Daniel Mack --- .../bindings/display/ilitek,ili9163.yaml | 70 +++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ilitek,ili9163.yaml diff

[PATCH v3 2/2] drm/tiny: add driver for newhaven,1.8-128160EF

2021-03-22 Thread Daniel Mack
This patch adds support for Newhaven's NHD-1.8-128160EF display, featuring an Ilitek ILI9163 controller. Signed-off-by: Daniel Mack Acked-by: Daniel Vetter --- drivers/gpu/drm/tiny/Kconfig | 13 ++ drivers/gpu/drm/tiny/Makefile | 1 + drivers/gpu/drm/tiny/ili9163.c | 224 +

Re: [PATCH] gpu/drm/msm: fix shutdown hook in case GPU components failed to bind

2021-03-22 Thread Dmitry Baryshkov
On Fri, 19 Mar 2021 at 19:25, Fabio Estevam wrote: > > On Fri, Mar 19, 2021 at 12:13 PM Fabio Estevam wrote: > > > Thanks for the feedback. > > I will follow the same approach for fixing the suspend/resume path then. > > > > Let me test it and then I will re-submit Dmitry's patch and the one > >

Re: [RFC PATCH 05/11] drm/bridge: ti-sn65dsi86: Wrap panel with panel-bridge

2021-03-22 Thread Jagan Teki
On Mon, Mar 22, 2021 at 8:32 AM Laurent Pinchart wrote: > > To simplify interfacing with the panel, wrap it in a panel-bridge and > let the DRM bridge helpers handle chaining of operations. > > This also prepares for support of DRM_BRIDGE_ATTACH_NO_CONNECTOR, which > requires all components in the

Re: [PATCH v6 5/8] mm: Device exclusive memory access

2021-03-22 Thread Alistair Popple
On Monday, 15 March 2021 6:42:45 PM AEDT Christoph Hellwig wrote: > > +Not all devices support atomic access to system memory. To support atomic > > +operations to a shared virtual memory page such a device needs access to that > > +page which is exclusive of any userspace access from the CPU. The

Re: [PATCH V2] drm/bridge: lvds-codec: Add support for pixel data sampling edge select

2021-03-22 Thread Marek Vasut
On 3/22/21 2:14 AM, Laurent Pinchart wrote: Hi Marek, Hi, [...] diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml index e5e3c72630cf..399a6528780a 100644 --- a/Documentation/devicetree/bindings/di

Re: [RFC PATCH 02/11] drm/bridge: ti-sn65dsi86: Make enable GPIO optional

2021-03-22 Thread Jagan Teki
On Mon, Mar 22, 2021 at 8:32 AM Laurent Pinchart wrote: > > The enable signal may not be controllable by the kernel. Make it > optional. > > Signed-off-by: Laurent Pinchart > --- Reviewed-by: Jagan Teki ___ dri-devel mailing list dri-devel@lists.freed

Re: [RFC PATCH 01/11] dt-bindings: drm/bridge: ti-sn65dsi8: Make enable GPIO optional

2021-03-22 Thread Jagan Teki
On Mon, Mar 22, 2021 at 8:32 AM Laurent Pinchart wrote: > > The SN65DSI86 EN pin can be hardwired to a high level, or connected to a > global reset signal, not controllable by the kernel. Make it optional in > those cases. > > Signed-off-by: Laurent Pinchart > --- Reviewed-by: Jagan Teki __

[PATCH v5 1/2] dt-bindings: display: bridge: Add Chipone ICN6211 bindings

2021-03-22 Thread Jagan Teki
ICN6211 is MIPI-DSI to RGB Converter bridge from Chipone. It has a flexible configuration of MIPI DSI signal input and produces RGB565, RGB666, RGB888 output format. Add dt-bingings for it. Signed-off-by: Jagan Teki Reviewed-by: Robert Foss Reviewed-by: Rob Herring --- Changes for v5: - rebas

[PATCH v5 2/2] drm: bridge: Add Chipone ICN6211 MIPI-DSI to RGB bridge

2021-03-22 Thread Jagan Teki
ICN6211 is MIPI-DSI to RGB Converter bridge from Chipone. It has a flexible configuration of MIPI DSI signal input and produce RGB565, RGB666, RGB888 output format. Add bridge driver for it. Signed-off-by: Jagan Teki Reviewed-by: Robert Foss --- Changes for v5: - rebase drm-misc-next - collect

Re: [PATCH] drm/radeon/ttm: Fix memory leak userptr pages

2021-03-22 Thread Christian König
Hi Daniel, Am 22.03.21 um 10:38 schrieb Daniel Gomez: On Fri, 19 Mar 2021 at 21:29, Felix Kuehling wrote: This caused a regression in kfdtest in a large-buffer stress test after memory allocation for user pages fails: I'm sorry to hear that. BTW, I guess you meant amdgpu leak patch and not th

Re: [PATCH V2] drm/bridge: lvds-codec: Add support for pixel data sampling edge select

2021-03-22 Thread Laurent Pinchart
Hi Marek, (CC'ing Ron and the DT mailing list for the DT discussion) On Mon, Mar 22, 2021 at 11:29:04AM +0100, Marek Vasut wrote: > On 3/22/21 2:14 AM, Laurent Pinchart wrote: > > Hi Marek, > > Hi, > > [...] > > >> diff --git > >> a/Documentation/devicetree/bindings/display/bridge/lvds-codec.

Re: [PATCH] drm/radeon/ttm: Fix memory leak userptr pages

2021-03-22 Thread Daniel Gomez
On Mon, 22 Mar 2021 at 11:34, Christian König wrote: > > Hi Daniel, > > Am 22.03.21 um 10:38 schrieb Daniel Gomez: > > On Fri, 19 Mar 2021 at 21:29, Felix Kuehling wrote: > >> This caused a regression in kfdtest in a large-buffer stress test after > >> memory allocation for user pages fails: > >

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Drop I915_CONTEXT_PARAM_RINGSIZE

2021-03-22 Thread Matthew Auld
On Sat, 20 Mar 2021 at 14:48, Jason Ekstrand wrote: > > On Fri, Mar 19, 2021 at 5:39 PM Jason Ekstrand wrote: > > > > This reverts commit 88be76cdafc7e60e2e4ed883bfe7e8dd7f35fa3a. This API > > has never been used by any real userspace. > > After further digging, there is a compute-runtime PR for

[PATCH 1/2] fbdev: omapfb: avoid -Wempty-body warning

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann Building with 'make W=1' shows a few harmless warnings: drivers/video/fbdev/omap2/omapfb/omapfb-main.c: In function 'omapfb_calc_addr': drivers/video/fbdev/omap2/omapfb/omapfb-main.c:823:56: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]

[PATCH 2/2] vgaarb: avoid -Wempty-body warnings

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann Building with W=1 shows a few warnings for an empty macro: drivers/gpu/drm/qxl/qxl_drv.c: In function 'qxl_pci_probe': drivers/gpu/drm/qxl/qxl_drv.c:131:50: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 131 | vga_put(pdev

[PATCH 01/44] drm/amdgpu: replace per_device_list by array

2021-03-22 Thread Felix Kuehling
From: Alex Sierra Remove per_device_list from kfd_process and replace it with a kfd_process_device pointers array of MAX_GPU_INSTANCES size. This helps to manage the kfd_process_devices binded to a specific kfd_process. Also, functions used by kfd_chardev to iterate over the list were removed, si

[PATCH 00/44] Add HMM-based SVM memory manager to KFD v2

2021-03-22 Thread Felix Kuehling
Since the last patch series I sent on Jan 6 a lot has changed. Patches 1-33 are the cleaned up, rebased on amd-staging-drm-next 5.11 version from about a week ago. The remaining 11 patches are current work-in-progress with further cleanup and fixes. MMU notifiers and CPU page faults now can split

[PATCH 07/44] drm/amdkfd: validate svm range system memory

2021-03-22 Thread Felix Kuehling
From: Philip Yang Use HMM to get system memory pages address, which will be used to map to GPUs or migrate to vram. Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 103 ++- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 4 +

[PATCH 12/44] drm/amdkfd: add xnack enabled flag to kfd_process

2021-03-22 Thread Felix Kuehling
From: Alex Sierra This flag is useful at cpu invalidation page table decision. Between select queue eviction or page fault. Signed-off-by: Alex Sierra Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 4 +++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 36 +++

[PATCH 06/44] drm/amdgpu: add common HMM get pages function

2021-03-22 Thread Felix Kuehling
From: Philip Yang Move the HMM get pages function from amdgpu_ttm and to amdgpu_mn. This common function will be used by new svm APIs. Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 83 + drivers/gpu/drm/amd/amdgp

[PATCH 10/44] drm/amdkfd: map svm range to GPUs

2021-03-22 Thread Felix Kuehling
Use amdgpu_vm_bo_update_mapping to update GPU page table to map or unmap svm range system memory pages address to GPUs. Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 395 +-- drivers/gpu/dr

[PATCH 04/44] drm/amdkfd: register svm range

2021-03-22 Thread Felix Kuehling
From: Philip Yang svm range structure stores the range start address, size, attributes, flags, prefetch location and gpu bitmap which indicates which GPU this range maps to. Same virtual address is shared by CPU and GPUs. Process has svm range list which uses both interval tree and list to store

[PATCH 08/44] drm/amdkfd: deregister svm range

2021-03-22 Thread Felix Kuehling
From: Philip Yang When application explicitly call unmap or unmap from mmput when application exit, driver will receive MMU_NOTIFY_UNMAP event to remove svm range from process svms object tree and list first, unmap from GPUs (in the following patch). Split the svm ranges to handle partial unmapp

[PATCH 09/44] drm/amdgpu: export vm update mapping interface

2021-03-22 Thread Felix Kuehling
From: Philip Yang It will be used by kfd to map svm range to GPU, because svm range does not have amdgpu_bo and bo_va, cannot use amdgpu_bo_update interface, use amdgpu vm update interface directly. Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH 17/44] drm/amdkfd: copy memory through gart table

2021-03-22 Thread Felix Kuehling
From: Philip Yang Use sdma linear copy to migrate data between ram and vram. The sdma linear copy command uses kernel buffer function queue to access system memory through gart table. Use reserved gart table window 0 to map system page address, and vram page address is direct mapping. Use the sa

[PATCH 05/44] drm/amdkfd: add svm ioctl GET_ATTR op

2021-03-22 Thread Felix Kuehling
From: Philip Yang Get the intersection of attributes over all memory in the given range Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 164 +++ 1 file changed, 164 insertions(+) diff --gi

[PATCH 03/44] drm/amdkfd: add svm ioctl API

2021-03-22 Thread Felix Kuehling
From: Philip Yang Add svm (shared virtual memory) ioctl data structure and API definition. The svm ioctl API is designed to be extensible in the future. All operations are provided by a single IOCTL to preserve ioctl number space. The arguments structure ends with a variable size array of attrib

[PATCH 15/44] drm/amdkfd: validate vram svm range from TTM

2021-03-22 Thread Felix Kuehling
If svm range perfetch location is not zero, use TTM to alloc amdgpu_bo vram nodes to validate svm range, then map vram nodes to GPUs. Use offset to sub allocate from the same amdgpu_bo to handle overlap vram range while adding new range or unmapping range. svm_bo has ref count to trace the shared

[PATCH 13/44] drm/amdkfd: add ioctl to configure and query xnack retries

2021-03-22 Thread Felix Kuehling
From: Alex Sierra Xnack retries are used for page fault recovery. Some AMD chip families support continuously retry while page table entries are invalid. The driver must handle the page fault interrupt and fill in a valid entry for the GPU to continue. This ioctl allows to enable/disable XNACK r

[PATCH 23/44] drm/amdkfd: SVM API call to restore page tables

2021-03-22 Thread Felix Kuehling
From: Alex Sierra Use SVM API to restore page tables when retry fault and compute context are enabled. Signed-off-by: Alex Sierra Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/

[PATCH 02/44] drm/amdkfd: helper to convert gpu id and idx

2021-03-22 Thread Felix Kuehling
From: Alex Sierra svm range uses gpu bitmap to store which GPU svm range maps to. Application pass driver gpu id to specify GPU, the helper is needed to convert gpu id to gpu bitmap idx. Access through kfd_process_device pointers array from kfd_process. Signed-off-by: Alex Sierra Signed-off-by

[PATCH 18/44] drm/amdkfd: HMM migrate ram to vram

2021-03-22 Thread Felix Kuehling
Register svm range with same address and size but perferred_location is changed from CPU to GPU or from GPU to CPU, trigger migration the svm range from ram to vram or from vram to ram. If svm range prefetch location is GPU with flags KFD_IOCTL_SVM_FLAG_HOST_ACCESS, validate the svm range on ram f

[PATCH 21/44] drm/amdgpu: enable 48-bit IH timestamp counter

2021-03-22 Thread Felix Kuehling
From: Alex Sierra By default this timestamp is 32 bit counter. It gets overflowed in around 10 minutes. Change-Id: I7c46604b0272dcfd1ce24351437c16fe53dca0ab Signed-off-by: Alex Sierra Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 1 + 1 file changed, 1 insertion(+)

[PATCH 14/44] drm/amdkfd: register HMM device private zone

2021-03-22 Thread Felix Kuehling
From: Philip Yang Register vram memory as MEMORY_DEVICE_PRIVATE type resource, to allocate vram backing pages for page migration. Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 4 + drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +

[PATCH 16/44] drm/amdkfd: support xgmi same hive mapping

2021-03-22 Thread Felix Kuehling
From: Philip Yang amdgpu_gmc_get_vm_pte use bo_va->is_xgmi same hive information to set pte flags to update GPU mapping. Add local structure variable bo_va, and update bo_va.is_xgmi, pass it to mapping->bo_va while mapping to GPU. Assuming xgmi pstate is hi after boot. Signed-off-by: Philip Yan

[PATCH 26/44] drm/amdkfd: add svm_bo eviction mechanism support

2021-03-22 Thread Felix Kuehling
svm_bo eviction mechanism is different from regular BOs. Every SVM_BO created contains one eviction fence and one worker item for eviction process. SVM_BOs can be attached to one or more pranges. For SVM_BO eviction mechanism, TTM will start to call enable_signal callback for every SVM_BO until VRA

[PATCH 27/44] drm/amdgpu: svm bo enable_signal call condition

2021-03-22 Thread Felix Kuehling
From: Alex Sierra [why] To support svm bo eviction mechanism. [how] If the BO crated has AMDGPU_AMDKFD_CREATE_SVM_BO flag set, enable_signal callback will be called inside amdgpu_evict_flags. This also causes gutting of the BO by removing all placements, so that TTM won't actually do an eviction

[PATCH 24/44] drm/amdkfd: add svm_bo reference for eviction fence

2021-03-22 Thread Felix Kuehling
From: Alex Sierra [why] As part of the SVM functionality, the eviction mechanism used for SVM_BOs is different. This mechanism uses one eviction fence per prange, instead of one fence per kfd_process. [how] A svm_bo reference to amdgpu_amdkfd_fence to allow differentiate between SVM_BO or regula

[PATCH 20/44] drm/amdkfd: invalidate tables on page retry fault

2021-03-22 Thread Felix Kuehling
GPU page tables are invalidated by unmapping prange directly at the mmu notifier, when page fault retry is enabled through amdgpu_noretry global parameter. The restore page table is performed at the page fault handler. If xnack is on, we update GPU mappings after migration to avoid unnecessary GPU

[PATCH 25/44] drm/amdgpu: add param bit flag to create SVM BOs

2021-03-22 Thread Felix Kuehling
From: Alex Sierra Add CREATE_SVM_BO define bit for SVM BOs. Another define flag was moved to concentrate these KFD type flags in one include file. Signed-off-by: Alex Sierra Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 7 ++- drivers/gpu/drm/amd/amd

[PATCH 29/44] drm/amdgpu: reserve fence slot to update page table

2021-03-22 Thread Felix Kuehling
From: Philip Yang Forgot to reserve a fence slot to use sdma to update page table, cause below kernel BUG backtrace to handle vm retry fault while application is exiting. [ 133.048143] kernel BUG at /home/yangp/git/compute_staging/kernel/drivers/dma-buf/dma-resv.c:281! [ 133.048487] Workqueue

[PATCH 28/44] drm/amdgpu: add svm_bo eviction to enable_signal cb

2021-03-22 Thread Felix Kuehling
From: Alex Sierra Add to amdgpu_amdkfd_fence.enable_signal callback, support for svm_bo fence eviction. Signed-off-by: Alex Sierra Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a

[PATCH 11/44] drm/amdkfd: svm range eviction and restore

2021-03-22 Thread Felix Kuehling
HMM interval notifier callback notify CPU page table will be updated, stop process queues if the updated address belongs to svm range registered in process svms objects tree. Scheduled restore work to update GPU page table using new pages address in the updated svm range. The restore worker flushe

[PATCH 19/44] drm/amdkfd: HMM migrate vram to ram

2021-03-22 Thread Felix Kuehling
If CPU page fault happens, HMM pgmap_ops callback migrate_to_ram start migrate memory from vram to ram in steps: 1. migrate_vma_pages get vram pages, and notify HMM to invalidate the pages, HMM interval notifier callback evict process queues 2. Allocate system memory pages 3. Use svm copy memory t

[PATCH 22/44] drm/amdkfd: page table restore through svm API

2021-03-22 Thread Felix Kuehling
Page table restore implementation in SVM API. This is called from the fault handler at amdgpu_vm. To update page tables through the page fault retry IH. Signed-off-by: Alex Sierra Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 69 +++

[PATCH 30/44] drm/amdkfd: refine migration policy with xnack on

2021-03-22 Thread Felix Kuehling
With xnack on, GPU vm fault handler decide the best restore location, then migrate range to the best restore location and update GPU mapping to recover the GPU vm fault. Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_migra

[PATCH 31/44] drm/amdkfd: add svm range validate timestamp

2021-03-22 Thread Felix Kuehling
With xnack on, add validate timestamp in order to handle GPU vm fault from multiple GPUs. If GPU retry fault need migrate the range to the best restore location, use range validate timestamp to record system timestamp after range is restored to update GPU page table. Because multiple pages of sam

[PATCH 37/44] drm/amdkfd: Fix svm_bo_list locking in eviction worker

2021-03-22 Thread Felix Kuehling
Take the svm_bo_list spin lock when iterating of the range list during eviction. Change-Id: I979d959e06c32e114cea8d151933b8ee7455627e Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/dr

[PATCH 36/44] drm/amdkfd: Fix spurious restore failures

2021-03-22 Thread Felix Kuehling
Restore can appear to fail if the svms->evicted counter changes before the function can acquire the necessary locks. Re-read the counter after acquiring the lock to minimize the chances of having to reschedule the worker. Change-Id: I236b912bddf106583be264abde2f6bd1a5d5a083 Signed-off-by: Felix Ku

[PATCH 40/44] drm/amdkfd: Return pdd from kfd_process_device_from_gduid

2021-03-22 Thread Felix Kuehling
This saves callers from looking up the pdd with a linear search later. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 8 +++- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 10 - drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 51 +++- 3 files change

[PATCH 41/44] drm/amdkfd: Remove broken deferred mapping

2021-03-22 Thread Felix Kuehling
Mapping without validation is broken. Also removed saving the pages from the last migration. They may be invalidated without an MMU notifier to catch it, so let the next proper validation take care of it. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 14 ---

[PATCH 38/44] drm/amdkfd: Simplify split_by_granularity

2021-03-22 Thread Felix Kuehling
svm_range_split_by_granularity always added the parent range and only the parent range to the update list for the caller to add it to the deferred work list. So just do that in the caller unconditionally and eliminate the update_list parameter. Split the range so that the original prange is always

[PATCH 42/44] drm/amdkfd: Allow invalid pages in migration.src

2021-03-22 Thread Felix Kuehling
This can happen when syste memory page were never allocated. Skip them during the migration. 0-initialize the BO. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 50 ++-- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/

[PATCH 39/44] drm/amdkfd: Point out several race conditions

2021-03-22 Thread Felix Kuehling
There are several race conditions with XNACK enabled. For now just some FIXME comments with ideas how to fix it. Change-Id: If0abab6dcb8f4e95c9d8820f6c569263eda29a89 Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 5 + drivers/gpu/drm/amd/amdkfd/kfd_svm.c |

[PATCH 32/44] drm/amdkfd: multiple gpu migrate vram to vram

2021-03-22 Thread Felix Kuehling
If prefetch range to gpu with acutal location is another gpu, or GPU retry fault restore pages to migrate the range with acutal location is gpu, then migrate from one gpu to another gpu. Use system memory as bridge because sdma engine may not able to access another gpu vram, use sdma of source gpu

[PATCH 43/44] drm/amdkfd: Correct locking during migration and mapping

2021-03-22 Thread Felix Kuehling
This fixes potential race conditions between any code that validates and maps SVM ranges and MMU notifiers. The whole sequence is encapsulated in svm_range_validate_and_map. The page_addr and hmm_range structures are not useful outside that function, so they were removed from struct svm_range. Val

[PATCH 33/44] drm/amdkfd: Add SVM API support capability bits

2021-03-22 Thread Felix Kuehling
From: Philip Yang SVMAPISupported property added to HSA_CAPABILITY, the value match HSA_CAPABILITY defined in Thunk spec: SVMAPISupported: it will not be supported on older kernels that don't have HMM or on systems with GFXv8 or older GPUs without support for 48-bit virtual addresses. CoherentH

[PATCH 35/44] drm/amdkfd: Call mutex_destroy

2021-03-22 Thread Felix Kuehling
Destroy SVM-related mutexes correctly. Change-Id: I85da30b1b0dce72433e6d3b507cb0b55b83b433c Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c

[PATCH 44/44] drm/amdkfd: Nested locking and invalidation of child ranges

2021-03-22 Thread Felix Kuehling
This allows validation of child ranges, so the GPU page fault handler can be more light-weight. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 8 + drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 40 +--- 2 files changed, 37 insertions(+), 11 del

[PATCH 34/44] drm/amdkfd: Fix dma unmapping

2021-03-22 Thread Felix Kuehling
Don't dma_unmap in unmap_from_gpu. The dma_addr arrays are protected by the migrate_mutex, which we cannot hold when unmapping in MMU notifiers. Instead dma_unmap and free dma_addr arrays whenever the pages_array is invalidated: when migrating to VRAM and when re-validating RAM. Freeing dma_addr

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Drop the CONTEXT_CLONE API

2021-03-22 Thread Tvrtko Ursulin
On 19/03/2021 22:38, Jason Ekstrand wrote: This API allows one context to grab bits out of another context upon creation. It can be used as a short-cut for setparam(getparam()) for things like I915_CONTEXT_PARAM_VM. However, it's never been used by any real userspace. It's used by a few IGT

[PATCH] drm/ttm: stop warning on TT shrinker failure v2

2021-03-22 Thread Christian König
Don't print a warning when we fail to allocate a page for swapping things out. v2: only stop the warning Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_tt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.

Re: [PATCH] drm/fourcc: add Vivante TS modifiers

2021-03-22 Thread Lucas Stach
Hi Simon, Am Freitag, dem 19.03.2021 um 19:52 + schrieb Simon Ser: > On Friday, March 19th, 2021 at 8:06 PM, Lucas Stach > wrote: > > > +/* > > + * Vivante TS (tile-status) buffer modifiers. They can be combined with > > all of > > + * the color buffer tiling modifiers defined above. When

[PATCH] amdgpu: avoid incorrect %hu format string

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann clang points out that the %hu format string does not match the type of the variables here: drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:263:7: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] ver

Re: [PATCH] amdgpu: avoid incorrect %hu format string

2021-03-22 Thread Christian König
Am 22.03.21 um 12:54 schrieb Arnd Bergmann: From: Arnd Bergmann clang points out that the %hu format string does not match the type of the variables here: drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:263:7: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Drop I915_CONTEXT_PARAM_RINGSIZE

2021-03-22 Thread Jani Nikula
On Sat, 20 Mar 2021, Jason Ekstrand wrote: > This reverts commit 88be76cdafc7e60e2e4ed883bfe7e8dd7f35fa3a. This API Small nit, I think it would be useful to reference commits with the citation style: 88be76cdafc7 ("drm/i915: Allow userspace to specify ringsize on construction") I use this

[PATCH] drm/msm/dpu: Fix a typo

2021-03-22 Thread Bhaskar Chowdhury
s/poiner/pointer/ Signed-off-by: Bhaskar Chowdhury --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h index d6717d6672f7..a448eb039334 100644 --- a/dr

Re: [PATCH] drivers: gpu: Remove duplicate include of amdgpu_hdp.h

2021-03-22 Thread Christian König
Am 22.03.21 um 13:02 schrieb Wan Jiabing: amdgpu_hdp.h has been included at line 91, so remove the duplicate include. Signed-off-by: Wan Jiabing Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amd

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Implement SINGLE_TIMELINE with a syncobj

2021-03-22 Thread Tvrtko Ursulin
On 19/03/2021 22:38, Jason Ekstrand wrote: I'd love to delete the SINGLE_TIMELINE API because it leaks an implementation detail of contexts through to the API and is something that userspace can do itself, trivially. Unfortunately, it's used by the media driver so we can't do that. We can, ho

[PATCH] video: mmp: Few typo fixes

2021-03-22 Thread Bhaskar Chowdhury
s/configed/configured/ s/registed/registered/ s/defintions/definitions/ Signed-off-by: Bhaskar Chowdhury --- include/video/mmp_disp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/video/mmp_disp.h b/include/video/mmp_disp.h index 77252cb46361..ea8b4331b7a1 1

[PATCH v3 4/6] drm/i915: Request watchdog infrastructure

2021-03-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Prepares the plumbing for setting request/fence expiration time. All code is put in place but is never activeted due yet missing ability to actually configure the timer. Outline of the basic operation: A timer is started when request is ready for execution. If the request c

Re: [PATCH 29/44] drm/amdgpu: reserve fence slot to update page table

2021-03-22 Thread Christian König
Am 22.03.21 um 11:58 schrieb Felix Kuehling: From: Philip Yang Forgot to reserve a fence slot to use sdma to update page table, cause below kernel BUG backtrace to handle vm retry fault while application is exiting. [ 133.048143] kernel BUG at /home/yangp/git/compute_staging/kernel/drivers

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure v2

2021-03-22 Thread Daniel Vetter
On Mon, Mar 22, 2021 at 12:22 PM Christian König wrote: > > Don't print a warning when we fail to allocate a page for swapping things out. > > v2: only stop the warning > > Signed-off-by: Christian König Reviewed-by: Daniel Vetter It is kinda surprising that page allocator warns here even thou

Re: ✗ Fi.CI.IGT: failure for Default request/fence expiry + watchdog (rev3)

2021-03-22 Thread Tvrtko Ursulin
On 19/03/2021 01:17, Patchwork wrote: Okay with 20s default expiration the hangcheck tests on Tigerlake pass and we are left with these failures: IGT changes Possible regressions * igt@gem_ctx_ringsize@idle@bcs0: o shard-skl: PASS

Re: ✗ Fi.CI.IGT: failure for Default request/fence expiry + watchdog (rev3)

2021-03-22 Thread Daniel Vetter
On Mon, Mar 22, 2021 at 01:37:58PM +, Tvrtko Ursulin wrote: > > On 19/03/2021 01:17, Patchwork wrote: > > Okay with 20s default expiration the hangcheck tests on Tigerlake pass and > we are left with these failures: > > > IGT changes > > > > > > Possible regressions > > > >

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-22 Thread Daniel Vetter
On Sun, Mar 21, 2021 at 03:18:28PM +0100, Christian König wrote: > Am 20.03.21 um 14:17 schrieb Daniel Vetter: > > On Sat, Mar 20, 2021 at 10:04 AM Christian König > > wrote: > > > Am 19.03.21 um 20:06 schrieb Daniel Vetter: > > > > On Fri, Mar 19, 2021 at 07:53:48PM +0100, Christian König wrote:

[PATCH][next] drm/amd/display: Fix sizeof arguments in bw_calcs_init()

2021-03-22 Thread Gustavo A. R. Silva
The wrong sizeof values are currently being used as arguments to kzalloc(). Fix this by using the right arguments *dceip and *vbios, correspondingly. Addresses-Coverity-ID: 1502901 ("Wrong sizeof argument") Fixes: fca1e079055e ("drm/amd/display/dc/calcs/dce_calcs: Remove some large variables fro

  1   2   3   >