[RESEND PATCH v4 2/2] drm/bridge: anx7625: disable regulators when power off

2021-03-31 Thread Hsin-Yi Wang
When suspending the driver, anx7625_power_standby() will be called to turn off reset-gpios and enable-gpios. However, power supplies are not disabled. To save power, the driver can get the power supply regulators and turn off them in anx7625_power_standby(). Signed-off-by: Hsin-Yi Wang

[RESEND PATCH v4 1/2] dt-bindings: drm/bridge: anx7625: Add power supplies

2021-03-31 Thread Hsin-Yi Wang
anx7625 requires 3 power supply regulators. Signed-off-by: Hsin-Yi Wang Reviewed-by: Rob Herring Reviewed-by: Robert Foss --- v3->v4: rebase to drm-misc/for-linux-next --- .../bindings/display/bridge/analogix,anx7625.yaml | 15 +++ 1 file changed, 15 insertions(+) diff --git

Re: [PATCH v7 3/8] mm/rmap: Split try_to_munlock from try_to_unmap

2021-03-31 Thread Alistair Popple
On Wednesday, 31 March 2021 10:57:46 PM AEDT Jason Gunthorpe wrote: > On Wed, Mar 31, 2021 at 03:15:47PM +1100, Alistair Popple wrote: > > On Wednesday, 31 March 2021 2:56:38 PM AEDT John Hubbard wrote: > > > On 3/30/21 3:56 PM, Alistair Popple wrote: > > > ... > > > >> +1 for renaming "munlock*"

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

2021-03-31 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

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

2021-03-31 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

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

2021-03-31 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 ---

[PATCH 34/34] drm/amdkfd: Add CONFIG_HSA_AMD_SVM

2021-03-31 Thread Felix Kuehling
Control whether to build SVM support into amdgpu with a Kconfig option. This makes it easier to disable it in production kernels if this new feature causes problems in production environments. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/Kconfig | 15 +++-

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

2021-03-31 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.

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

2021-03-31 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]

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

2021-03-31 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

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

2021-03-31 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

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

2021-03-31 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

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

2021-03-31 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 ++-

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

2021-03-31 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

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

2021-03-31 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 | 59

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

2021-03-31 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

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

2021-03-31 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

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

2021-03-31 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 19/34] drm/amdkfd: HMM migrate vram to ram

2021-03-31 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

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

2021-03-31 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

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

2021-03-31 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

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

2021-03-31 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

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

2021-03-31 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/amdkfd/Kconfig | 1 + drivers/gpu/drm/amd/amdkfd/Makefile | 3 +-

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

2021-03-31 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

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

2021-03-31 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

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

2021-03-31 Thread Felix Kuehling
From: Alex Sierra XNACK mode controls the SQ RETRY_DISABLE setting that determines, whether recoverable page faults can be supported on GFXv9 hardware. Only on Aldebaran we can support different processes running with different XNACK modes. On older chips all processes must use the same

[PATCH 11/34] drm/amdgpu: Enable retry faults unconditionally on Aldebaran

2021-03-31 Thread Felix Kuehling
This is needed to allow per-process XNACK mode selection in the SQ when booting with XNACK off by default. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Tested-by: Alex Sierra --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 8 ++--

[PATCH 10/34] drm/amdkfd: svm range eviction and restore

2021-03-31 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

[PATCH 08/34] drm/amdgpu: export vm update mapping interface

2021-03-31 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 ---

[PATCH 09/34] drm/amdkfd: map svm range to GPUs

2021-03-31 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 | 478 ++-

[PATCH 07/34] drm/amdkfd: deregister svm range

2021-03-31 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

[PATCH 06/34] drm/amdkfd: validate svm range system memory

2021-03-31 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 | 116 ++- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 18

[PATCH 05/34] drm/amdgpu: add common HMM get pages function

2021-03-31 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 +

[PATCH 03/34] drm/amdkfd: register svm range

2021-03-31 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

[PATCH 04/34] drm/amdkfd: add svm ioctl GET_ATTR op

2021-03-31 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

[PATCH 02/34] drm/amdkfd: add svm ioctl API

2021-03-31 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

[PATCH 01/34] drm/amdkfd: helper to convert gpu id and idx

2021-03-31 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

[PATCH 00/34] Add HMM-based SVM memory manager to KFD v3

2021-03-31 Thread Felix Kuehling
Since the last patch series on March 22, I integrated all fixes into the original patch series. An additonal fix was added for handling failed migrations during GPU page faults. (A bigger rework of migrations and VRAM mappings will come in the future.) Support for per-process XNACK mode selecation

RE: [PATCH 1/2] drm/virtio: Create Dumb BOs as guest Blobs

2021-03-31 Thread Kasireddy, Vivek
Hi Gerd, > > If support for Blob resources is available, then dumb BOs created by > > the driver can be considered as guest Blobs. And, for guest Blobs, > > there is no need to do any transfers or flushes > > No. VIRTGPU_BLOB_FLAG_USE_SHAREABLE means the host (aka device in virtio > terms)

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

2021-03-31 Thread Alistair Popple
On Thursday, 1 April 2021 11:48:13 AM AEDT Jason Gunthorpe wrote: > On Thu, Apr 01, 2021 at 11:45:57AM +1100, Alistair Popple wrote: > > On Thursday, 1 April 2021 12:46:04 AM AEDT Jason Gunthorpe wrote: > > > On Thu, Apr 01, 2021 at 12:27:52AM +1100, Alistair Popple wrote: > > > > On Thursday, 1

linux-next: manual merge of the drm-intel tree with the drm tree

2021-03-31 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the drm-intel tree got a conflict in: drivers/gpu/drm/i915/display/intel_display.c between commit: 1b321026e213 ("drm/i915: Pass ww ctx to intel_pin_to_display_plane") from the drm tree and commit: 61169987c4d9 ("drm/i915: Unify the FB and plane

Re: [PATCH 3/3] drm/mediatek: dpi: add bus format negociation

2021-03-31 Thread CK Hu
Hi, Jitao: On Tue, 2021-03-30 at 23:53 +0800, Jitao Shi wrote: > Add the atomic_get_output_bus_fmts, atomic_get_input_bus_fmts to negociate > the possible output and input formats for the current mode and monitor, > and use the negotiated formats in a basic atomic_check callback. > >

Re: [v1] drm/msm/disp/dpu1: fix warn stack reported during dpu resume

2021-03-31 Thread Dmitry Baryshkov
On 01/04/2021 01:47, Rob Clark wrote: On Wed, Mar 31, 2021 at 9:03 AM Dmitry Baryshkov wrote: On 31/03/2021 14:27, Kalyan Thota wrote: WARN_ON was introduced by the below commit to catch runtime resumes that are getting triggered before icc path was set. "drm/msm/disp/dpu1: icc path needs

Re:Re: [PATCH] drm/ttm: cleanup coding style a bit

2021-03-31 Thread Bernard
From: "Christian König" Date: 2021-03-31 21:15:22 To: Bernard Zhao ,Huang Rui ,David Airlie ,Daniel Vetter ,dri-devel@lists.freedesktop.org,linux-ker...@vger.kernel.org Cc: opensource.ker...@vivo.com Subject: Re: [PATCH] drm/ttm: cleanup coding style a bit>Am 31.03.21 um 15:12 schrieb

[PATCH 1/2] drm/msm/dpu: fill missing details in hw catalog for sdm845 and sm8[12]50

2021-03-31 Thread Dmitry Baryshkov
Fill clk_inefficiency_factor, bw_inefficiency_factor and min_prefill_lines in hw catalog data for sdm845 and sm8[12]50. Efficiency factors are blindly copied from sc7180 data, while min_prefill_lines is based on downstream display driver. Signed-off-by: Dmitry Baryshkov ---

[PATCH 2/2] drm/msm/dpu: always use mdp device to scale bandwidth

2021-03-31 Thread Dmitry Baryshkov
Currently DPU driver scales bandwidth and core clock for sc7180 only, while the rest of chips get static bandwidth votes. Make all chipsets scale bandwidth and clock per composition requirements like sc7180 does. Drop old voting path completely. Tested on RB3 (SDM845) and RB5 (SM8250).

[pull] amdgpu, amdkfd drm-fixes-5.12

2021-03-31 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.12. The following changes since commit 09d78dde88ef95a27b54a6e450ee700ccabdf39d: Merge tag 'drm-msm-fixes-2021-02-25' of https://gitlab.freedesktop.org/drm/msm into drm-fixes (2021-03-26 13:04:17 +1000) are available in the Git repository at:

[PATCH v2 4/4] drm/msm: Improved debugfs gem stats

2021-03-31 Thread Rob Clark
From: Rob Clark The last patch lost the breakdown of active vs inactive GEM objects in $debugfs/gem. But we can add some better stats to summarize not just active vs inactive, but also purgable/purged to make up for that. Signed-off-by: Rob Clark Tested-by: Douglas Anderson Reviewed-by:

[PATCH v2 3/4] drm/msm: Fix debugfs deadlock

2021-03-31 Thread Rob Clark
From: Rob Clark In normal cases the gem obj lock is acquired first before mm_lock. The exception is iterating the various object lists. In the shrinker path, deadlock is avoided by using msm_gem_trylock() and skipping over objects that cannot be locked. But for debugfs the straightforward

[PATCH v2 2/4] drm/msm: Avoid mutex in shrinker_count()

2021-03-31 Thread Rob Clark
From: Rob Clark When the system is under heavy memory pressure, we can end up with lots of concurrent calls into the shrinker. Keeping a running tab on what we can shrink avoids grabbing a lock in shrinker->count(), and avoids shrinker->scan() getting called when not profitable. Also, we can

[PATCH v2 1/4] drm/msm: Remove unused freed llist node

2021-03-31 Thread Rob Clark
From: Rob Clark Unused since commit c951a9b284b9 ("drm/msm: Remove msm_gem_free_work") Signed-off-by: Rob Clark Tested-by: Douglas Anderson --- drivers/gpu/drm/msm/msm_gem.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h

[PATCH v2 0/4] drm/msm: Shrinker (and related) fixes

2021-03-31 Thread Rob Clark
From: Rob Clark I've been spending some time looking into how things behave under high memory pressure. The first patch is a random cleanup I noticed along the way. The second improves the situation significantly when we are getting shrinker called from many threads in parallel. And the last

[PATCH v7] drm/loongson: Add DRM Driver for Loongson 7A1000 bridge chip

2021-03-31 Thread lichenyang
This patch adds an initial DRM driver for the Loongson LS7A1000 bridge chip(LS7A). The LS7A bridge chip contains two display controllers, support dual display output. The maximum support for each channel display is to 1920x1080@60Hz. At present, DC device detection and DRM driver registration are

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

2021-03-31 Thread Jason Gunthorpe
On Thu, Apr 01, 2021 at 11:45:57AM +1100, Alistair Popple wrote: > On Thursday, 1 April 2021 12:46:04 AM AEDT Jason Gunthorpe wrote: > > On Thu, Apr 01, 2021 at 12:27:52AM +1100, Alistair Popple wrote: > > > On Thursday, 1 April 2021 12:18:54 AM AEDT Jason Gunthorpe wrote: > > > > On Wed, Mar 31,

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

2021-03-31 Thread Alistair Popple
On Thursday, 1 April 2021 12:46:04 AM AEDT Jason Gunthorpe wrote: > On Thu, Apr 01, 2021 at 12:27:52AM +1100, Alistair Popple wrote: > > On Thursday, 1 April 2021 12:18:54 AM AEDT Jason Gunthorpe wrote: > > > On Wed, Mar 31, 2021 at 11:59:28PM +1100, Alistair Popple wrote: > > > > > > > I guess

Re: [PATCH 2/4] drm/msm: Avoid mutex in shrinker_count()

2021-03-31 Thread Rob Clark
On Wed, Mar 31, 2021 at 4:39 PM Doug Anderson wrote: > > Hi, > > On Wed, Mar 31, 2021 at 4:23 PM Rob Clark wrote: > > > > On Wed, Mar 31, 2021 at 3:44 PM Doug Anderson wrote: > > > > > > Hi, > > > > > > On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > > > > > > > @@ -818,11 +820,19 @@

Re: [PATCH 1/4] drm/msm: Remove unused freed llist node

2021-03-31 Thread Doug Anderson
Hi, On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > From: Rob Clark > > Unused since c951a9b284b907604759628d273901064c60d09f Not terribly important, but checkpatch always yells at me when I don't reference commits by saying: commit c951a9b284b9 ("drm/msm: Remove msm_gem_free_work") >

Re: [PATCH 0/4] drm/msm: Shrinker (and related) fixes

2021-03-31 Thread Doug Anderson
Hi, On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > From: Rob Clark > > I've been spending some time looking into how things behave under high > memory pressure. The first patch is a random cleanup I noticed along > the way. The second improves the situation significantly when we are >

Re: [PATCH 2/4] drm/msm: Avoid mutex in shrinker_count()

2021-03-31 Thread Doug Anderson
Hi, On Wed, Mar 31, 2021 at 4:23 PM Rob Clark wrote: > > On Wed, Mar 31, 2021 at 3:44 PM Doug Anderson wrote: > > > > Hi, > > > > On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > > > > > @@ -818,11 +820,19 @@ static void update_inactive(struct msm_gem_object > > > *msm_obj) > > >

Re: [PATCH 4/4] drm/msm: Improved debugfs gem stats

2021-03-31 Thread Doug Anderson
Hi, On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > From: Rob Clark > > The last patch lost the breakdown of active vs inactive GEM objects in > $debugfs/gem. But we can add some better stats to summarize not just > active vs inactive, but also purgable/purged to make up for that. > >

Re: [PATCH 3/4] drm/msm: Fix debugfs deadlock

2021-03-31 Thread Rob Clark
On Wed, Mar 31, 2021 at 4:13 PM Doug Anderson wrote: > > Hi, > > On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > > > @@ -111,23 +111,15 @@ static const struct file_operations msm_gpu_fops = { > > static int msm_gem_show(struct drm_device *dev, struct seq_file *m) > > { > > struct

Re: [PATCH 2/4] drm/msm: Avoid mutex in shrinker_count()

2021-03-31 Thread Rob Clark
On Wed, Mar 31, 2021 at 3:44 PM Doug Anderson wrote: > > Hi, > > On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > > > @@ -818,11 +820,19 @@ static void update_inactive(struct msm_gem_object > > *msm_obj) > > mutex_lock(>mm_lock); > > WARN_ON(msm_obj->active_count != 0); > >

Re: [PATCH 3/4] drm/msm: Fix debugfs deadlock

2021-03-31 Thread Doug Anderson
Hi, On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > @@ -111,23 +111,15 @@ static const struct file_operations msm_gpu_fops = { > static int msm_gem_show(struct drm_device *dev, struct seq_file *m) > { > struct msm_drm_private *priv = dev->dev_private; > - struct msm_gpu *gpu

Re: [PATCH 2/4] drm/msm: Avoid mutex in shrinker_count()

2021-03-31 Thread Doug Anderson
Hi, On Wed, Mar 31, 2021 at 3:14 PM Rob Clark wrote: > > @@ -818,11 +820,19 @@ static void update_inactive(struct msm_gem_object > *msm_obj) > mutex_lock(>mm_lock); > WARN_ON(msm_obj->active_count != 0); > > + if (msm_obj->dontneed) > +

Re: [v1] drm/msm/disp/dpu1: fix warn stack reported during dpu resume

2021-03-31 Thread Rob Clark
On Wed, Mar 31, 2021 at 9:03 AM Dmitry Baryshkov wrote: > > On 31/03/2021 14:27, Kalyan Thota wrote: > > WARN_ON was introduced by the below commit to catch runtime resumes > > that are getting triggered before icc path was set. > > > > "drm/msm/disp/dpu1: icc path needs to be set before dpu

[PATCH 4/4] drm/msm: Improved debugfs gem stats

2021-03-31 Thread Rob Clark
From: Rob Clark The last patch lost the breakdown of active vs inactive GEM objects in $debugfs/gem. But we can add some better stats to summarize not just active vs inactive, but also purgable/purged to make up for that. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fb.c | 3 ++-

[PATCH 1/4] drm/msm: Remove unused freed llist node

2021-03-31 Thread Rob Clark
From: Rob Clark Unused since c951a9b284b907604759628d273901064c60d09f Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index b3a0a880cbab..7a9107cf1818 100644 ---

[PATCH 2/4] drm/msm: Avoid mutex in shrinker_count()

2021-03-31 Thread Rob Clark
From: Rob Clark When the system is under heavy memory pressure, we can end up with lots of concurrent calls into the shrinker. Keeping a running tab on what we can shrink avoids grabbing a lock in shrinker->count(), and avoids shrinker->scan() getting called when not profitable. Also, we can

[PATCH 0/4] drm/msm: Shrinker (and related) fixes

2021-03-31 Thread Rob Clark
From: Rob Clark I've been spending some time looking into how things behave under high memory pressure. The first patch is a random cleanup I noticed along the way. The second improves the situation significantly when we are getting shrinker called from many threads in parallel. And the last

[PATCH 3/4] drm/msm: Fix debugfs deadlock

2021-03-31 Thread Rob Clark
From: Rob Clark In normal cases the gem obj lock is acquired first before mm_lock. The exception is iterating the various object lists. In the shrinker path, deadlock is avoided by using msm_gem_trylock() and skipping over objects that cannot be locked. But for debugfs the straightforward

Re: [PATCH v5 2/5] phy: Add LVDS configuration options

2021-03-31 Thread Kishon Vijay Abraham I
Hi, On 25/03/21 2:30 pm, Liu Ying wrote: > This patch allows LVDS PHYs to be configured through > the generic functions and through a custom structure > added to the generic union. > > The parameters added here are based on common LVDS PHY > implementation practices. The set of parameters >

Re: [pull] amdgpu, amdkfd, radeon drm-next-5.12

2021-03-31 Thread Dave Airlie
I think this is due to this pull, on arm32. /home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv.c: In function ‘dmub_srv_hw_init’: /home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv.c:519:44: warning: cast from pointer

Re: [PATCH v5 1/2] dt-bindings: usb: add analogix,anx7688.yaml

2021-03-31 Thread Laurent Pinchart
On Tue, Mar 30, 2021 at 05:14:44PM +0200, Enric Balletbo i Serra wrote: > On 30/3/21 15:35, Dafna Hirschfeld wrote: > > On 05.03.21 16:19, Laurent Pinchart wrote: > >> On Fri, Mar 05, 2021 at 04:14:03PM +0100, Dafna Hirschfeld wrote: > >>> On 05.03.21 15:34, Laurent Pinchart wrote: > On Fri,

Re: [PATCH 2/4] drm/amd/display: Add FPU event trace

2021-03-31 Thread kernel test robot
Hi Rodrigo, I love your patch! Yet something to improve: [auto build test ERROR on next-20210331] [cannot apply to linus/master v5.12-rc5 v5.12-rc4 v5.12-rc3 v5.12-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base

Re: [PATCH] fix NULL pointer deference crash

2021-03-31 Thread Dan Carpenter
Hi Hassan, url: https://github.com/0day-ci/linux/commits/Hassan-Shahbazi/fix-NULL-pointer-deference-crash/20210401-004543 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5e46d1b78a03d52306f21f77a4e4a144b6d31486 config: x86_64-randconfig-m001-20210330 (attached as

Re: [PATCH 2/4] drm/amd/display: Add FPU event trace

2021-03-31 Thread kernel test robot
Hi Rodrigo, I love your patch! Perhaps something to improve: [auto build test WARNING on next-20210331] [cannot apply to linus/master v5.12-rc5 v5.12-rc4 v5.12-rc3 v5.12-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

Re: [Freedreno] [PATCH v4 23/24] drm/msm/dsi: inline msm_dsi_phy_set_src_pll

2021-03-31 Thread abhinavk
On 2021-03-31 03:57, Dmitry Baryshkov wrote: The src_truthtable config is not used for some of phys, which use other means of configuring the master/slave usecases. Inline this function with the goal of removing src_pll_id argument in the next commit. Signed-off-by: Dmitry Baryshkov Tested-by:

Re: [Freedreno] [PATCH v4 24/24] drm/msm/dsi: stop passing src_pll_id to the phy_enable call

2021-03-31 Thread abhinavk
On 2021-03-31 03:57, Dmitry Baryshkov wrote: Phy driver already knows the source PLL id basing on the set usecase and the current PLL id. Stop passing it to the phy_enable call. As a reminder, dsi manager will always use DSI 0 as a clock master in a slave mode, so PLL 0 is always a

Re: [PATCH] /msm/adreno: fix different address spaces warning

2021-03-31 Thread kernel test robot
Hi Bernard, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.12-rc5 next-20210331] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented

[PATCH v2 2/2] drm/panel: simple: Add support for EDT ETM0350G0DH6 panel

2021-03-31 Thread Yunus Bas
From: Stefan Riedmueller This patch adds support for the EDT ETM0350G0DH6 3.5" (320x240) lcd panel to DRM simple panel driver. Signed-off-by: Stefan Riedmueller Signed-off-by: Yunus Bas --- Changes in v2: - Splitted dt-bindings to separate patch --- drivers/gpu/drm/panel/panel-simple.c | 29

[PATCH v2 1/2] drm/panel: simple: Add support for EDT ETMV570G2DHU panel

2021-03-31 Thread Yunus Bas
From: Stefan Riedmueller This patch adds support for the EDT ETMV570G2DHU 5.7" (640x480) lcd panel to DRM simple panel driver. Signed-off-by: Stefan Riedmueller Signed-off-by: Yunus Bas --- Changes in v2: - Splitted dt-bindings to separate patch --- drivers/gpu/drm/panel/panel-simple.c | 29

Re: [PATCH] /msm/adreno: fix different address spaces warning

2021-03-31 Thread kernel test robot
Hi Bernard, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.12-rc5 next-20210331] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented

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

2021-03-31 Thread Steev Klimaszewski
On 3/31/21 7:34 AM, kalya...@codeaurora.org wrote: > On 2021-03-31 00:04, Steev Klimaszewski wrote: >> On 3/22/21 4:17 AM, Kalyan Thota wrote: >>> 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

Re: [PATCH] fix NULL pointer deference crash

2021-03-31 Thread Greg KH
On Wed, Mar 31, 2021 at 07:34:29PM +0300, Hassan Shahbazi wrote: > The patch has fixed a NULL pointer deference crash in hiding the cursor. It > is verified by syzbot patch tester. > > Reported by: syzbot > https://syzkaller.appspot.com/bug?id=defb47bf56e1c14d5687280c7bb91ce7b608b94b > >

Re: [Freedreno] [PATCH v4 17/24] drm/msm/dsi: make save_state/restore_state callbacks accept msm_dsi_phy

2021-03-31 Thread abhinavk
On 2021-03-31 03:57, Dmitry Baryshkov wrote: Make save_state/restore callbacks accept struct msm_dsi_phy rather than struct msm_dsi_pll. This moves them to struct msm_dsi_phy_ops, allowing us to drop struct msm_dsi_pll_ops. Signed-off-by: Dmitry Baryshkov Tested-by: Stephen Boyd # on sc7180

Re: [PATCH 1/4] drm/amd/display: Introduce FPU directory inside DC

2021-03-31 Thread kernel test robot
Hi Rodrigo, I love your patch! Perhaps something to improve: [auto build test WARNING on next-20210331] [also build test WARNING on v5.12-rc5] [cannot apply to linus/master v5.12-rc5 v5.12-rc4 v5.12-rc3] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

[PATCH] amd/amdgpu: code refactoring to clean code style a bit

2021-03-31 Thread Bernard Zhao
Fix checkpatch.pl warning: Too many leading tabs - consider code refactoring WARNING: Too many leading tabs - consider code refactoring + for (j = 0; j < profile->ucLeakageBinNum; j++) { WARNING: Too many leading tabs - consider code refactoring +

[PATCH] /msm/adreno: fix different address spaces warning

2021-03-31 Thread Bernard Zhao
Fixes the following sparse warnings: drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:189:9:expected void [noderef] __iomem *addr drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:189:9:got void * drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:190:9: warning: incorrect type in argument 2 (different

[PATCH] fix NULL pointer deference crash

2021-03-31 Thread Hassan Shahbazi
The patch has fixed a NULL pointer deference crash in hiding the cursor. It is verified by syzbot patch tester. Reported by: syzbot https://syzkaller.appspot.com/bug?id=defb47bf56e1c14d5687280c7bb91ce7b608b94b Signed-off-by: Hassan Shahbazi --- drivers/video/fbdev/core/fbcon.c | 5 +++-- 1

[PATCH] drm/ttm: cleanup coding style a bit

2021-03-31 Thread Bernard Zhao
Fix sparse warning: drivers/gpu/drm/ttm/ttm_bo.c:52:1: warning: symbol 'ttm_global_mutex' was not declared. Should it be static? drivers/gpu/drm/ttm/ttm_bo.c:53:10: warning: symbol 'ttm_bo_glob_use_count' was not declared. Should it be static? Signed-off-by: Bernard Zhao ---

[PATCH] msm/disp: dpu_plane cleanup-coding-style-a-bit

2021-03-31 Thread Bernard Zhao
Fix sparse warning: drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1195:41: warning: Using plain integer as NULL pointer Signed-off-by: Bernard Zhao --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] drm/amd: use kmalloc_array over kmalloc with multiply

2021-03-31 Thread Bernard Zhao
Fix patch check warning: WARNING: Prefer kmalloc_array over kmalloc with multiply + buf = kmalloc(MAX_KFIFO_SIZE * sizeof(*buf), GFP_KERNEL); Signed-off-by: Bernard Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] drm/amd: cleanup coding style a bit

2021-03-31 Thread Bernard Zhao
Fix patch check warning: WARNING: suspect code indent for conditional statements (8, 17) + if (obj && obj->use < 0) { +DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name); WARNING: braces {} are not necessary for single statement blocks + if (obj &&

[PATCH] drm/nouveau: cleanup-coding-style-a-bit

2021-03-31 Thread Bernard Zhao
This change is to make the code a bit readable. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | 44 ++--- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c

Re: [PATCH v5 1/2] dt-bindings: usb: add analogix,anx7688.yaml

2021-03-31 Thread Dafna Hirschfeld
Hi, On 05.03.21 18:24, Ondřej Jirman wrote: Hello Dafna, On Fri, Mar 05, 2021 at 04:14:03PM +0100, Dafna Hirschfeld wrote: Hi On 05.03.21 15:34, Laurent Pinchart wrote: Hi Dafna, Thank you for the patch. On Fri, Mar 05, 2021 at 01:43:50PM +0100, Dafna Hirschfeld wrote: ANX7688 is a USB

Re: [PATCH v2 05/14] drm/bridge: ti-sn65dsi86: Move MIPI detach() / unregister() to detach()

2021-03-31 Thread Doug Anderson
Hi, On Wed, Mar 31, 2021 at 2:53 AM Andrzej Hajda wrote: > > > W dniu 30.03.2021 o 04:53, Douglas Anderson pisze: > > The register() / attach() for MIPI happen in the bridge's > > attach(). That means that the inverse belongs in the bridge's > > detach(). > > > As I commented in previous patch,

Re: [PATCH v2 0/8] drm/edid: overhaul displayid iterator

2021-03-31 Thread Jani Nikula
On Mon, 29 Mar 2021, Jani Nikula wrote: > v2 of [1], addressing Ville's review comments, and adding a couple of > extra patches on top. > > BR, > Jani. > > [1] https://patchwork.freedesktop.org/series/87802/ Pushed to drm-misc-next, with Ville's review and Maxime's IRC nod of approval. Thanks.

Re: [PATCH 16/18] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-31 Thread Robin Murphy
On 2021-03-16 15:38, Christoph Hellwig wrote: [...] diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index f1e38526d5bd40..996dfdf9d375dd 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++

Re: [PATCH 16/18] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-31 Thread Robin Murphy
On 2021-03-31 16:32, Will Deacon wrote: On Wed, Mar 31, 2021 at 02:09:37PM +0100, Robin Murphy wrote: On 2021-03-31 12:49, Will Deacon wrote: On Tue, Mar 30, 2021 at 05:28:19PM +0100, Robin Murphy wrote: On 2021-03-30 14:58, Will Deacon wrote: On Tue, Mar 30, 2021 at 02:19:38PM +0100, Robin

Re: [v1] drm/msm/disp/dpu1: fix warn stack reported during dpu resume

2021-03-31 Thread Dmitry Baryshkov
On 31/03/2021 14:27, Kalyan Thota wrote: WARN_ON was introduced by the below commit to catch runtime resumes that are getting triggered before icc path was set. "drm/msm/disp/dpu1: icc path needs to be set before dpu runtime resume" For the targets where the bw scaling is not enabled, this

  1   2   3   >