Re: [PATCH] drm: bridge: adv7511: Add check for mipi_dsi_driver_register

2022-05-31 Thread Laurent Pinchart
Hi Jiasheng, Thank you for the patch. On Wed, Jun 01, 2022 at 10:48:22AM +0800, Jiasheng Jiang wrote: > As mipi_dsi_driver_register could return error if fails, > it should be better to check the return value and return error > if fails. > > Fixes: 1e4d58cd7f88 ("drm/bridge: adv7533: Create a MI

Re: [Intel-gfx] [PATCH v2 2/6] drm/i915/xehp: Drop GETPARAM lookups of I915_PARAM_[SUB]SLICE_MASK

2022-05-31 Thread Lionel Landwerlin
On 17/05/2022 06:20, Matt Roper wrote: Slice/subslice/EU information should be obtained via the topology queries provided by the I915_QUERY interface; let's turn off support for the old GETPARAM lookups on Xe_HP and beyond where we can't return meaningful values. The slice mask lookup is meaning

[PATCH] MAINTAINERS: rectify entries for ARM DRM DRIVERS after dt conversion

2022-05-31 Thread Lukas Bulwahn
The three commits: 36fd2a65bcaf ("dt-bindings: display: convert Arm HDLCD to DT schema") 0f6983509ea1 ("dt-bindings: display: convert Arm Komeda to DT schema") 2c8b082a3ab1 ("dt-bindings: display: convert Arm Mali-DP to DT schema") convert the arm display dt-bindings, arm,*.txt to arm,*.yam

RE: [PATCH] BACKPORT: drm/amdgpu/disply: set num_crtc earlier

2022-05-31 Thread Lin, Tsung-hua (Ryan)
[AMD Official Use Only - General] Hi Greg, Thanks for your advice. I have modified the commit and submitted it to Gerrit and it's under code review now. Many thanks, Ryan Lin. -Original Message- From: Greg KH Sent: Monday, May 30, 2022 9:05 PM To: Lin, Tsung-hua (Ryan) Cc: Li, Leon

[PATCH v2 2/2] drm/meson: encoder_hdmi: Fix refcount leak in meson_encoder_hdmi_init

2022-05-31 Thread Miaoqian Lin
of_graph_get_remote_node() returns remote device nodepointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: e67f6037ae1b ("drm/meson: split out encoder from meson_dw_hdmi") Signed-off-by: Miaoqian Lin --- changes in

[PATCH v2 1/2] drm/meson: encoder_cvbs: Fix refcount leak in meson_encoder_cvbs_init

2022-05-31 Thread Miaoqian Lin
of_graph_get_remote_node() returns remote device nodepointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 318ba02cd8a8 ("drm/meson: encoder_cvbs: switch to bridge with ATTACH_NO_CONNECTOR") Signed-off-by: Miaoqian

[PATCH v2 0/2] drm/meson: Fix refcount leak

2022-05-31 Thread Miaoqian Lin
The following patchset fix two refcount leak bugs. The cause of the bugs are missing of_node_put() after of_graph_get_remote_node(). changes in v2: - patch#2:Fixed patch in meson_encoder_hdmi_init, call of_node_put() after of_find_device_by_node() and error paths before that. noted by Marti

Re: [PATCH v2] drm/msm/dpu: Move min BW request and full BW disable back to mdss

2022-05-31 Thread Stephen Boyd
Quoting Douglas Anderson (2022-05-31 16:01:26) > In commit a670ff578f1f ("drm/msm/dpu: always use mdp device to scale > bandwidth") we fully moved interconnect stuff to the DPU driver. This > had no change for sc7180 but _did_ have an impact for other SoCs. It > made them match the sc7180 scheme. >

[PATCH] drm: bridge: adv7511: Add check for mipi_dsi_driver_register

2022-05-31 Thread Jiasheng Jiang
As mipi_dsi_driver_register could return error if fails, it should be better to check the return value and return error if fails. Fixes: 1e4d58cd7f88 ("drm/bridge: adv7533: Create a MIPI DSI device") Signed-off-by: Jiasheng Jiang --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 +++-- 1

[PATCH] drm/panel/raspberrypi-touchscreen: Add check for mipi_dsi_driver_register

2022-05-31 Thread Jiasheng Jiang
As mipi_dsi_driver_register could return error if fails, it should be better to check the return value and return error if fails. Fixes: 2f733d6194bd ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.") Signed-off-by: Jiasheng Jiang --- drivers/gpu/drm/panel/panel-raspberrypi-touchsc

RE: [PATCH v2 3/4] soc: visconti: Add Toshiba Visconti AFFINE image processing accelerator

2022-05-31 Thread yuji2.ishikawa
Hi, Hans, With your advice for DNN accelerator, I prepared some description of AFFINE IPA and its usage. Handling memory blocks for Visconti5 accelerators (same description for DNN accelerator) Visconti5 Image-Processing-Accelerators do not have fine grained IOMMU, as CPU have. Therefore

RE: [PATCH 0/4] Add Toshiba Visconti DNN image processing accelerator driver

2022-05-31 Thread yuji2.ishikawa
Hi Hans, Thank you for your advice. I prepared some description of DNN accelerator and its usage. Handling memory blocks for Visconti5 accelerators Visconti5 Image-Processing-Accelerators do not have fine grained IOMMU, as CPU have. Therefore, memory region to be passed to the accelerators

Re: [Freedreno] [PATCH v2] drm/msm/dpu: Move min BW request and full BW disable back to mdss

2022-05-31 Thread Jessica Zhang
On 5/31/2022 4:01 PM, Douglas Anderson wrote: In commit a670ff578f1f ("drm/msm/dpu: always use mdp device to scale bandwidth") we fully moved interconnect stuff to the DPU driver. This had no change for sc7180 but _did_ have an impact for other SoCs. It made them match the sc7180 scheme. Unfo

[RFC PATCH 5/5] drm/amdgpu: Add option to disable implicit sync for a context.

2022-05-31 Thread Bas Nieuwenhuizen
This changes all BO usages in a submit to BOOKKEEP instead of READ, which effectively disables implicit sync for these submits. This is configured at a context level using the existing IOCTL. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 13 ++ drivers/g

[RFC PATCH 4/5] drm/amdgpu: Refactor amdgpu_vm_get_pd_bo.

2022-05-31 Thread Bas Nieuwenhuizen
We want to take only a BOOKKEEP usage for contexts that are not implicitly synced. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +-

[RFC PATCH 1/5] drm/ttm: Refactor num_shared into usage.

2022-05-31 Thread Bas Nieuwenhuizen
So that the driver can set some BOOKKEEP for explicit sync. Maybe some of the existing places would already make sense for that, but I targeted this for no functional changes. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 10 +- drivers/gpu/drm/

[RFC PATCH 3/5] drm/amdgpu: Allow explicit sync for VM ops.

2022-05-31 Thread Bas Nieuwenhuizen
This should be okay because moves themselves use KERNEL usage and hence still sync with BOOKKEEP usage. Then any later submits still wait on any pending VM operations. (i.e. we only made VM ops not wait on BOOKKEEP submits, not the other way around) Signed-off-by: Bas Nieuwenhuizen --- drivers

[RFC PATCH 2/5] drm/amdgpu: Add separate mode for syncing DMA_RESV_USAGE_BOOKKEEP.

2022-05-31 Thread Bas Nieuwenhuizen
To prep for allowing different sync modes in a follow-up patch. Signed-off-by: Bas Nieuwenhuizen --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 +++ drivers/gpu/

[RFC PATCH 0/5] Add option to disable implicit sync for userspace submits.

2022-05-31 Thread Bas Nieuwenhuizen
This adds a context option to use DMA_RESV_USAGE_BOOKKEEP for userspace submissions, based on Christians TTM work. Disabling implicit sync is something we've wanted in radv for a while for resolving some corner cases. A more immediate thing that would be solved here is avoiding a bunch of impli

Re: [PATCH v2] drm/msm/dpu: Move min BW request and full BW disable back to mdss

2022-05-31 Thread Abhinav Kumar
Hi Doug On 5/31/2022 4:01 PM, Douglas Anderson wrote: In commit a670ff578f1f ("drm/msm/dpu: always use mdp device to scale bandwidth") we fully moved interconnect stuff to the DPU driver. This had no change for sc7180 but _did_ have an impact for other SoCs. It made them match the sc7180 scheme.

[PATCH v2] drm/msm/dpu: Move min BW request and full BW disable back to mdss

2022-05-31 Thread Douglas Anderson
In commit a670ff578f1f ("drm/msm/dpu: always use mdp device to scale bandwidth") we fully moved interconnect stuff to the DPU driver. This had no change for sc7180 but _did_ have an impact for other SoCs. It made them match the sc7180 scheme. Unfortunately, the sc7180 scheme seems like it was a bi

Re: [RESEND 06/14] dt-bindings: mfd: Add Mediatek MT6370 binding

2022-05-31 Thread Rob Herring
On Tue, 31 May 2022 19:18:52 +0800, ChiaEn Wu wrote: > From: ChiYuan Huang > > Add Mediatek MT6370 binding documentation. > > Signed-off-by: ChiYuan Huang > --- > .../bindings/mfd/mediatek,mt6370.yaml | 282 ++ > .../dt-bindings/iio/adc/mediatek,mt6370_adc.h | 18 ++ >

Re: [RESEND 04/14] dt-bindings: leds: Add Mediatek MT6370 flashlight binding

2022-05-31 Thread Rob Herring
On Tue, 31 May 2022 19:18:50 +0800, ChiaEn Wu wrote: > From: Alice Chen > > Add Mediatek MT6370 flashlight binding documentation > > Signed-off-by: Alice Chen > --- > .../leds/mediatek,mt6370-flashlight.yaml | 48 +++ > 1 file changed, 48 insertions(+) > create mode 10064

Re: [RESEND 03/14] dt-bindings: leds: mt6370: Add Mediatek mt6370 indicator

2022-05-31 Thread Rob Herring
On Tue, 31 May 2022 19:18:49 +0800, ChiaEn Wu wrote: > From: ChiYuan Huang > > Add Mediatek mt6370 indicator documentation. > > Signed-off-by: ChiYuan Huang > --- > .../leds/mediatek,mt6370-indicator.yaml | 57 +++ > 1 file changed, 57 insertions(+) > create mode 100644

Re: Per file OOM badness

2022-05-31 Thread Alex Deucher
+ dri-devel On Tue, May 31, 2022 at 6:00 AM Christian König wrote: > > Hello everyone, > > To summarize the issue I'm trying to address here: Processes can allocate > resources through a file descriptor without being held responsible for it. > > Especially for the DRM graphics driver subsystem th

Re: [PATCH] drm/msm: less magic numbers in msm_mdss_enable

2022-05-31 Thread Abhinav Kumar
On 5/31/2022 5:18 AM, Dmitry Baryshkov wrote: Replace magic register writes in msm_mdss_enable() with version that contains less magic and more variable names that can be traced back to the dpu_hw_catalog or the downstream dtsi files. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm

Re: [PATCH] drm/msm/dpu: Move min BW request and full BW disable back to mdss

2022-05-31 Thread Doug Anderson
Hi, On Tue, May 31, 2022 at 2:29 PM Abhinav Kumar wrote: > > > @@ -136,6 +178,13 @@ static int msm_mdss_enable(struct msm_mdss *msm_mdss) > > { > > int ret; > > > > + /* > > + * Several components have AXI clocks that can only be turned on if > > + * the interconnect is enab

Re: [Intel-gfx] [PATCH 2/2] drm/i915/pvc: Add initial PVC workarounds

2022-05-31 Thread Matt Atwood
On Fri, May 27, 2022 at 09:33:48AM -0700, Matt Roper wrote: > From: Stuart Summers > > Bspec: 64027 Reviewed-by: Matt Atwood > Signed-off-by: Stuart Summers > Signed-off-by: Matt Roper > --- > drivers/gpu/drm/i915/gt/intel_engine_regs.h | 5 +- > drivers/gpu/drm/i915/gt/intel_gt_regs.h |

Re: [Intel-gfx] [PATCH 1/2] drm/i915/pvc: Extract stepping information from PCI revid

2022-05-31 Thread Matt Atwood
On Fri, May 27, 2022 at 09:33:47AM -0700, Matt Roper wrote: > For PVC, the base die and compute tile have separate stepping values > that we need to track; we'll use the existing graphics_step field to > represent the compute tile stepping and add a new 'basedie_step' field. > > Unlike past platfo

Re: [PATCH] drm/msm/dpu: Move min BW request and full BW disable back to mdss

2022-05-31 Thread Abhinav Kumar
Hi Doug On 5/31/2022 7:28 AM, Douglas Anderson wrote: In commit a670ff578f1f ("drm/msm/dpu: always use mdp device to scale bandwidth") we fully moved interconnect stuff to the DPU driver. This had no change for sc7180 but _did_ have an impact for other SoCs. It made them match the sc7180 scheme.

Re: [PATCH] drm/amdgpu: make gfx_v11_0_rlc_stop static

2022-05-31 Thread Alex Deucher
Applied. Thanks! Alex On Sun, May 29, 2022 at 7:50 AM sunliming wrote: > > This symbol is not used outside of gfx_v11_0.c, so marks it static. > > Fixes the following w1 warning: > > drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:1945:6: warning: no previous > prototype for function 'gfx_v11_0_rlc_stop

Re: [PATCH] drm/amdgpu: fix a missing break in gfx_v11_0_handle_priv_fault

2022-05-31 Thread Alex Deucher
Applied. Thanks! On Sun, May 29, 2022 at 7:50 AM sunliming wrote: > > Fixes the following w1 warning: > > drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:5873:2: warning: unannotated > fall-through between switch labels [-Wimplicit-fallthrough]. > > Reported-by: kernel test robot > Signed-off-by: sunlim

Re: [PATCH] drm/msm: Ensure mmap offset is initialized

2022-05-31 Thread Dmitry Baryshkov
On Tue, 31 May 2022 at 23:37, Rob Clark wrote: > > On Tue, May 31, 2022 at 1:34 PM Dmitry Baryshkov > wrote: > > > > On Tue, 31 May 2022 at 23:08, Rob Clark wrote: > > > > > > From: Rob Clark > > > > > > If a GEM object is allocated, and then exported as a dma-buf fd which is > > > mmap'd befor

Re: [PATCH v3 3/4] drm/bridge: Add devm_drm_bridge_add()

2022-05-31 Thread Doug Anderson
Maxime, On Mon, May 23, 2022 at 10:00 AM Doug Anderson wrote: > > Hi, > > On Sat, May 21, 2022 at 2:17 AM Maxime Ripard wrote: > > > > Hi, > > > > On Tue, May 10, 2022 at 12:29:43PM -0700, Douglas Anderson wrote: > > > This adds a devm managed version of drm_bridge_add(). Like other > > > "devm"

Re: [PATCH v3 0/4] drm/dp: Make DP AUX bus usage easier; use it on ps8640

2022-05-31 Thread Doug Anderson
Hi, On Tue, May 10, 2022 at 12:30 PM Douglas Anderson wrote: > > This patch is v3 of the first 2 patches from my RFC series ("drm/dp: > Improvements > for DP AUX channel") [1]. I've broken the series in two so we can make > progress on the two halves separately. > > v2 of this series tries to in

Re: [PATCH 14/14] dt-bindings: mfd: Add Mediatek MT6370 binding documentation

2022-05-31 Thread Krzysztof Kozlowski
On 31/05/2022 12:28, ChiaEn Wu wrote: > From: ChiYuan Huang > > Add Mediatek MT6370 binding documentation. Subject: same as previous patches. > > Signed-off-by: ChiYuan Huang > --- > .../bindings/mfd/mediatek,mt6370.yaml | 282 ++ > .../dt-bindings/iio/adc/mediatek,mt

Re: [PATCH 12/14] dt-bindings: leds: Add Mediatek MT6370 flashlight binding documentation

2022-05-31 Thread Krzysztof Kozlowski
On 31/05/2022 12:42, ChiaEn Wu wrote: > From: Alice Chen > Subject - same comment as previous #10 patch. > Add Mediatek MT6370 flashlight binding documentation > > Signed-off-by: Alice Chen > --- > .../leds/mediatek,mt6370-flashlight.yaml | 48 +++ > 1 file changed, 48 i

Re: [PATCH 11/14] dt-bindings: leds: mt6370: Add Mediatek mt6370 indicator documentation

2022-05-31 Thread Krzysztof Kozlowski
On 31/05/2022 12:42, ChiaEn Wu wrote: > From: ChiYuan Huang > > Add Mediatek mt6370 indicator documentation. > > Signed-off-by: ChiYuan Huang > --- > .../leds/mediatek,mt6370-indicator.yaml | 57 +++ > 1 file changed, 57 insertions(+) > create mode 100644 > Documentatio

Re: [PATCH] drm/msm: Ensure mmap offset is initialized

2022-05-31 Thread Rob Clark
On Tue, May 31, 2022 at 1:34 PM Dmitry Baryshkov wrote: > > On Tue, 31 May 2022 at 23:08, Rob Clark wrote: > > > > From: Rob Clark > > > > If a GEM object is allocated, and then exported as a dma-buf fd which is > > mmap'd before or without the GEM buffer being directly mmap'd, the > > vma_node

Re: [PATCH] drm/msm/dpu: Fix pointer dereferenced before checking

2022-05-31 Thread Rob Clark
On Mon, May 30, 2022 at 12:34 AM Haowen Bai wrote: > > The ctx->hw is dereferencing before null checking, so move > it after checking. > > Signed-off-by: Haowen Bai > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drive

Re: [PATCH] drm/msm: Ensure mmap offset is initialized

2022-05-31 Thread Dmitry Baryshkov
On Tue, 31 May 2022 at 23:08, Rob Clark wrote: > > From: Rob Clark > > If a GEM object is allocated, and then exported as a dma-buf fd which is > mmap'd before or without the GEM buffer being directly mmap'd, the > vma_node could be unitialized. This leads to a situation where the CPU > mapping

Re: [PATCH 10/14] dt-bindings: power: supply: Add Mediatek MT6370 Charger binding documentation

2022-05-31 Thread Krzysztof Kozlowski
On 31/05/2022 12:42, ChiaEn Wu wrote: > From: ChiaEn Wu > Subject - remove "binding documentation". It's already implied by prefix. > Add Mediatek MT6370 Charger binding documentation. > > Signed-off-by: ChiaEn Wu > --- > .../power/supply/mediatek,mt6370-charger.yaml | 60 +++

[PATCH] drm/msm: Ensure mmap offset is initialized

2022-05-31 Thread Rob Clark
From: Rob Clark If a GEM object is allocated, and then exported as a dma-buf fd which is mmap'd before or without the GEM buffer being directly mmap'd, the vma_node could be unitialized. This leads to a situation where the CPU mapping is not correctly torn down in drm_vma_node_unmap(). Fixes: e

Re: [PATCH 2/2] drm/meson: encoder_hdmi: Fix refcount leak in meson_encoder_hdmi_init

2022-05-31 Thread Martin Blumenstingl
Hello, first of all: thank you for spotting this and sending a patch! On Tue, May 31, 2022 at 4:49 PM Miaoqian Lin wrote: [...] > diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.c > b/drivers/gpu/drm/meson/meson_encoder_hdmi.c > index 5e306de6f485..f3341458f8b7 100644 > --- a/drivers/gpu/

[PATCH v5 12/13] tools: add hmm gup tests for device coherent type

2022-05-31 Thread Alex Sierra
The intention is to test hmm device coherent type under different get user pages paths. Also, test gup with FOLL_LONGTERM flag set in device coherent pages. These pages should get migrated back to system memory. Signed-off-by: Alex Sierra Reviewed-by: Alistair Popple --- tools/testing/selftests

[PATCH v5 11/13] tools: update test_hmm script to support SP config

2022-05-31 Thread Alex Sierra
Add two more parameters to set spm_addr_dev0 & spm_addr_dev1 addresses. These two parameters configure the start SP addresses for each device in test_hmm driver. Consequently, this configures zone device type as coherent. Signed-off-by: Alex Sierra Acked-by: Felix Kuehling Reviewed-by: Alistair

[PATCH v5 09/13] lib: add support for device coherent type in test_hmm

2022-05-31 Thread Alex Sierra
Device Coherent type uses device memory that is coherently accesible by the CPU. This could be shown as SP (special purpose) memory range at the BIOS-e820 memory enumeration. If no SP memory is supported in system, this could be faked by setting CONFIG_EFI_FAKE_MEMMAP. Currently, test_hmm only sup

[PATCH v5 10/13] tools: update hmm-test to support device coherent type

2022-05-31 Thread Alex Sierra
Test cases such as migrate_fault and migrate_multiple, were modified to explicit migrate from device to sys memory without the need of page faults, when using device coherent type. Snapshot test case updated to read memory device type first and based on that, get the proper returned results migrat

[PATCH v5 13/13] tools: add selftests to hmm for COW in device memory

2022-05-31 Thread Alex Sierra
The objective is to test device migration mechanism in pages marked as COW, for private and coherent device type. In case of writing to COW private page(s), a page fault will migrate pages back to system memory first. Then, these pages will be duplicated. In case of COW device coherent type, pages

[PATCH v5 07/13] lib: test_hmm add ioctl to get zone device type

2022-05-31 Thread Alex Sierra
new ioctl cmd added to query zone device type. This will be used once the test_hmm adds zone device coherent type. Signed-off-by: Alex Sierra Acked-by: Felix Kuehling Reviewed-by: Alistair Poppple Signed-off-by: Christoph Hellwig --- lib/test_hmm.c | 11 +-- lib/test_hmm_uapi.h |

[PATCH v5 08/13] lib: test_hmm add module param for zone device type

2022-05-31 Thread Alex Sierra
In order to configure device coherent in test_hmm, two module parameters should be passed, which correspond to the SP start address of each device (2) spm_addr_dev0 & spm_addr_dev1. If no parameters are passed, private device type is configured. Signed-off-by: Alex Sierra Acked-by: Felix Kuehling

[PATCH v5 06/13] drm/amdkfd: add SPM support for SVM

2022-05-31 Thread Alex Sierra
When CPU is connected throug XGMI, it has coherent access to VRAM resource. In this case that resource is taken from a table in the device gmc aperture base. This resource is used along with the device type, which could be DEVICE_PRIVATE or DEVICE_COHERENT to create the device page map region. Also

[PATCH v5 03/13] mm: add device coherent vma selection for memory migration

2022-05-31 Thread Alex Sierra
This case is used to migrate pages from device memory, back to system memory. Device coherent type memory is cache coherent from device and CPU point of view. Signed-off-by: Alex Sierra Acked-by: Felix Kuehling Reviewed-by: Alistair Poppple Signed-off-by: Christoph Hellwig --- include/linux/m

[PATCH v5 05/13] mm/gup: migrate device coherent pages when pinning instead of failing

2022-05-31 Thread Alex Sierra
From: Alistair Popple Currently any attempts to pin a device coherent page will fail. This is because device coherent pages need to be managed by a device driver, and pinning them would prevent a driver from migrating them off the device. However this is no reason to fail pinning of these pages.

[PATCH v5 04/13] mm: remove the vma check in migrate_vma_setup()

2022-05-31 Thread Alex Sierra
From: Alistair Popple migrate_vma_setup() checks that a valid vma is passed so that the page tables can be walked to find the pfns associated with a given address range. However in some cases the pfns are already known, such as when migrating device coherent pages during pin_user_pages() meaning

[PATCH v5 02/13] mm: handling Non-LRU pages returned by vm_normal_pages

2022-05-31 Thread Alex Sierra
With DEVICE_COHERENT, we'll soon have vm_normal_pages() return device-managed anonymous pages that are not LRU pages. Although they behave like normal pages for purposes of mapping in CPU page, and for COW. They do not support LRU lists, NUMA migration or THP. We also introduced a FOLL_LRU flag th

[PATCH v5 01/13] mm: add zone device coherent type memory support

2022-05-31 Thread Alex Sierra
Device memory that is cache coherent from device and CPU point of view. This is used on platforms that have an advanced system bus (like CAPI or CXL). Any page of a process can be migrated to such memory. However, no one should be allowed to pin such memory so that it can always be evicted. Signed

[PATCH v5 00/13] Add MEMORY_DEVICE_COHERENT for coherent device memory mapping

2022-05-31 Thread Alex Sierra
This is our MEMORY_DEVICE_COHERENT patch series rebased and updated for current 5.18.0 Changes since the last version: - Fixed problems with migration during long-term pinning in get_user_pages - Open coded vm_normal_lru_pages as suggested in previous code review - Update hmm_gup_test with more ge

Re: [PATCH 1/2] drm/meson: encoder_cvbs: Fix refcount leak in meson_encoder_cvbs_init

2022-05-31 Thread Martin Blumenstingl
On Tue, May 31, 2022 at 4:49 PM Miaoqian Lin wrote: > > of_graph_get_remote_node() returns remote device nodepointer with > refcount incremented, we should use of_node_put() on it when done. > Add missing of_node_put() to avoid refcount leak. > > Fixes: 318ba02cd8a8 ("drm/meson: encoder_cvbs: swit

[Bug 213145] AMDGPU resets, timesout and crashes after "*ERROR* Waiting for fences timed out!"

2022-05-31 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213145 --- Comment #18 from Eric Wheeler (bugzilla-ker...@z.ewheeler.org) --- Nix, did you try Linux 5.18? It worked for me... -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the

Re: [PATCH v4 07/13] lib: test_hmm add ioctl to get zone device type

2022-05-31 Thread Sierra Guiza, Alejandro (Alex)
On 5/31/2022 12:31 PM, Andrew Morton wrote: On Tue, 31 May 2022 10:56:23 -0500 Alex Sierra wrote: new ioctl cmd added to query zone device type. This will be used once the test_hmm adds zone device coherent type. @@ -1026,6 +1027,15 @@ static int dmirror_snapshot(struct dmirror *dmirror,

Re: [PATCH] drm/nouveau/fifo/gv100-: set gv100_fifo_runlist storage-class to static

2022-05-31 Thread Lyude Paul
Reviewed-by: Lyude Paul Will push to the appropriate branch in a moment On Sat, 2022-05-28 at 10:18 -0400, Tom Rix wrote: > sparse reports > drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c:56:1: warning: symbol > 'gv100_fifo_runlist' was not declared. Should it be static? > > gv100_fifo_runlis

Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-05-31 Thread José Expósito
Hi Daniel, Thanks for looking into the patch and for your comments. On Mon, May 30, 2022 at 03:57:56PM -0700, Daniel Latypov wrote: > A few initial notes: > a) normally, `select`ing other kconfigs is discouraged. It's not > explicitly called out in > https://www.kernel.org/doc/html/latest/dev-too

Re: [PATCH v3] dma-buf: Add a capabilities directory

2022-05-31 Thread Greg KH
On Tue, May 31, 2022 at 07:53:50AM -0500, Jason Ekstrand wrote: > On Mon, 2022-05-30 at 10:26 +0200, Greg KH wrote: > > On Mon, May 30, 2022 at 08:15:04AM +, Simon Ser wrote: > > > On Monday, May 30th, 2022 at 09:20, Greg KH > > > wrote: > > > > > > > > > +static struct attribute *dma_buf_cap

[Bug 205089] amdgpu : drm:amdgpu_cs_ioctl : Failed to initialize parser -125

2022-05-31 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205089 --- Comment #46 from Luke A. Guest (lagu...@archeia.com) --- Can confirm, for my case, emerge -av @mesa (where @mesa is libdrm, mes and mesa-tools from git HEAD) fixes it. -- You may reply to this email to add a comment. You are receiving this

Re: [PATCH] drm/msm/dpu: Remove unused code

2022-05-31 Thread Abhinav Kumar
On 5/24/2022 1:14 AM, Jiapeng Chong wrote: Eliminate the follow clang warning: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:544:33: warning: variable ‘mode’ set but not used [-Wunused-but-set-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Fixes: 3177589c6e93("drm/msm/dpu

[RESEND 06/14] dt-bindings: mfd: Add Mediatek MT6370 binding

2022-05-31 Thread ChiaEn Wu
From: ChiYuan Huang Add Mediatek MT6370 binding documentation. Signed-off-by: ChiYuan Huang --- .../bindings/mfd/mediatek,mt6370.yaml | 282 ++ .../dt-bindings/iio/adc/mediatek,mt6370_adc.h | 18 ++ include/dt-bindings/mfd/mediatek,mt6370.h | 83 ++ 3 files ch

[RESEND 07/14] mfd: mt6370: Add Mediatek MT6370 support

2022-05-31 Thread ChiaEn Wu
From: ChiYuan Huang Add Mediatek MT6370 MFD support. Signed-off-by: ChiYuan Huang --- drivers/mfd/Kconfig | 13 +++ drivers/mfd/Makefile | 1 + drivers/mfd/mt6370.c | 273 +++ 3 files changed, 287 insertions(+) create mode 100644 drivers/mfd/mt6370.

[RESEND 03/14] dt-bindings: leds: mt6370: Add Mediatek mt6370 indicator

2022-05-31 Thread ChiaEn Wu
From: ChiYuan Huang Add Mediatek mt6370 indicator documentation. Signed-off-by: ChiYuan Huang --- .../leds/mediatek,mt6370-indicator.yaml | 57 +++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/mediatek,mt6370-indicator.yaml

[RESEND 01/14] dt-bindings: usb: Add Mediatek MT6370 TCPC binding

2022-05-31 Thread ChiaEn Wu
From: ChiYuan Huang Add Mediatek MT6370 TCPC binding documentation. Signed-off-by: ChiYuan Huang --- .../bindings/usb/mediatek,mt6370-tcpc.yaml| 35 +++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mediatek,mt6370-tcpc.yaml di

[RESEND 02/14] dt-bindings: power: supply: Add Mediatek MT6370 Charger binding

2022-05-31 Thread ChiaEn Wu
From: ChiaEn Wu Add Mediatek MT6370 Charger binding documentation. Signed-off-by: ChiaEn Wu --- .../power/supply/mediatek,mt6370-charger.yaml | 60 +++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/mediatek,mt6370-charger.y

[RESEND 10/14] iio: adc: mt6370: Add Mediatek MT6370 support

2022-05-31 Thread ChiaEn Wu
From: ChiaEn Wu Add Mediatek MT6370 ADC support. Signed-off-by: ChiaEn Wu --- drivers/iio/adc/Kconfig | 9 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/mt6370-adc.c | 257 +++ 3 files changed, 267 insertions(+) create mode 100644 drivers/iio/

[RESEND 12/14] leds: mt6370: Add Mediatek MT6370 Indicator support

2022-05-31 Thread ChiaEn Wu
From: Alice Chen Add Mediatek MT6370 Indicator support Signed-off-by: Alice Chen --- drivers/leds/Kconfig | 11 + drivers/leds/Makefile | 1 + drivers/leds/leds-mt6370.c | 994 + 3 files changed, 1006 insertions(+) create mode 100644 drivers/l

[RESEND 14/14] video: backlight: mt6370: Add Mediatek MT6370 support

2022-05-31 Thread ChiaEn Wu
From: ChiaEn Wu Add Mediatek MT6370 Backlight support. Signed-off-by: ChiaEn Wu --- drivers/video/backlight/Kconfig| 8 + drivers/video/backlight/Makefile | 1 + drivers/video/backlight/mt6370-backlight.c | 338 + 3 files changed, 347 insertions(+)

[RESEND 09/14] regulator: mt6370: Add mt6370 DisplayBias and VibLDO support

2022-05-31 Thread ChiaEn Wu
From: ChiYuan Huang Add mt6370 DisplayBias and VibLDO support. Signed-off-by: ChiYuan Huang --- drivers/regulator/Kconfig| 8 + drivers/regulator/Makefile | 1 + drivers/regulator/mt6370-regulator.c | 389 +++ 3 files changed, 398 insertions(+)

[RESEND 13/14] leds: flashlight: mt6370: Add Mediatek MT6370 flashlight support

2022-05-31 Thread ChiaEn Wu
From: Alice Chen Add Mediatek MT6370 flashlight support Signed-off-by: Alice Chen --- drivers/leds/flash/Kconfig | 9 + drivers/leds/flash/Makefile| 1 + drivers/leds/flash/leds-mt6370-flash.c | 665 + 3 files changed, 675 insertions(+) crea

[RESEND 11/14] power: supply: mt6370: Add Mediatek MT6370 charger driver

2022-05-31 Thread ChiaEn Wu
From: ChiaEn Wu Add Mediatek MT6370 charger driver Signed-off-by: ChiaEn Wu --- drivers/power/supply/Kconfig | 11 + drivers/power/supply/Makefile |1 + drivers/power/supply/mt6370-charger.c | 1132 + 3 files changed, 1144 insertions(+) create mo

[RESEND 04/14] dt-bindings: leds: Add Mediatek MT6370 flashlight binding

2022-05-31 Thread ChiaEn Wu
From: Alice Chen Add Mediatek MT6370 flashlight binding documentation Signed-off-by: Alice Chen --- .../leds/mediatek,mt6370-flashlight.yaml | 48 +++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/mediatek,mt6370-flashlight.ya

[RESEND 08/14] usb: typec: tcpci_mt6370: Add Mediatek MT6370 tcpci driver

2022-05-31 Thread ChiaEn Wu
From: ChiYuan Huang Add chip level mt6370 tcpci driver. Signed-off-by: ChiYuan Huang --- drivers/usb/typec/tcpm/Kconfig| 8 + drivers/usb/typec/tcpm/Makefile | 1 + drivers/usb/typec/tcpm/tcpci_mt6370.c | 212 ++ 3 files changed, 221 insertions(+) cre

[RESEND 00/14] Add Mediatek MT6370 PMIC support

2022-05-31 Thread ChiaEn Wu
From: ChiaEn Wu Sorry, for the patch dependency, we resend this patch series and we're sorry for any inconvenience that we may have caused. This patch series add Mediatek MT6370 PMIC support. The MT6370 is a highly-integrated smart power management IC, which includes a single cell Li-Ion/Li-Polym

[RESEND 05/14] dt-bindings: backlight: Add Mediatek MT6370 backlight binding

2022-05-31 Thread ChiaEn Wu
From: ChiYuan Huang Add mt6370 backlight binding documentation. Signed-off-by: ChiYuan Huang --- .../backlight/mediatek,mt6370-backlight.yaml | 110 ++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backl

Re: [PATCH v3] dma-buf: Add a capabilities directory

2022-05-31 Thread Jason Ekstrand
On Mon, 2022-05-30 at 10:26 +0200, Greg KH wrote: > On Mon, May 30, 2022 at 08:15:04AM +, Simon Ser wrote: > > On Monday, May 30th, 2022 at 09:20, Greg KH > > wrote: > > > > > > > +static struct attribute *dma_buf_caps_attrs[] = { > > > > > +   &dma_buf_sync_file_import_export_attr.attr,

Re: [PATCH] drm/msm/dpu: Fix pointer dereferenced before checking

2022-05-31 Thread Abhinav Kumar
On 5/29/2022 7:19 PM, Haowen Bai wrote: The phys_enc->wb_idx is dereferencing before null checking, so move it after checking. Signed-off-by: Haowen Bai Fixes: d7d0e73f7de33 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback") Reviewed-by: Abhinav Kumar --- drivers/gpu/d

Re: How should "max bpc" KMS property work?

2022-05-31 Thread Ville Syrjälä
On Wed, May 25, 2022 at 01:36:47PM +0300, Pekka Paalanen wrote: > On Wed, 25 May 2022 09:23:51 + > Simon Ser wrote: > > > On Wednesday, May 25th, 2022 at 10:35, Michel Dänzer > > wrote: > > > > > > Mind that "max bpc" is always in auto. It's only an upper limit, with > > > > the assumption

Re: [PATCH v4 07/13] lib: test_hmm add ioctl to get zone device type

2022-05-31 Thread Andrew Morton
On Tue, 31 May 2022 10:56:23 -0500 Alex Sierra wrote: > new ioctl cmd added to query zone device type. This will be > used once the test_hmm adds zone device coherent type. > > @@ -1026,6 +1027,15 @@ static int dmirror_snapshot(struct dmirror *dmirror, > return ret; > } > > +static int

Re: [RFC V3 2/2] drm/i915/vrr: Set drm crtc vrr_enabled property

2022-05-31 Thread Navare, Manasi
On Tue, May 17, 2022 at 12:56:36PM +0530, Bhanuprakash Modem wrote: > This function sets the vrr_enabled property for crtc based > on the platform support and the request from userspace. > > V2: Check for platform support before updating the prop. > V3: Don't attach vrr_enabled prop, as it is alre

Re: [RFC V3 1/2] drm/vrr: Attach vrr_enabled property to the drm crtc

2022-05-31 Thread Navare, Manasi
On Tue, May 17, 2022 at 12:56:35PM +0530, Bhanuprakash Modem wrote: > Modern display hardware is capable of supporting variable refresh rates. > This patch introduces helpers to attach and set "vrr_enabled" property > on the crtc to allow userspace to query VRR enabled status on that crtc. > > Ato

Re: [PATCH] drm/edid: ignore the CEA modes not defined in CEA-861-D

2022-05-31 Thread Ville Syrjälä
On Tue, May 31, 2022 at 06:34:21PM +0800, William Tseng wrote: > This is a workaround for HDMI 1.4 sink which has a CEA mode with higher vic > than what is defined in CEA-861-D. > > As an example, a HDMI 1.4 sink has the video format 2560x1080p to be > displayed and the video format is indicated b

Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")

2022-05-31 Thread Linus Torvalds
On Tue, May 31, 2022 at 1:04 AM Arnd Bergmann wrote: > > As an experiment: what kind of results would we get when looking > for packed structures and unions that contain any of these: Yeah, any atomics or locks should always be aligned, and won't even work (or might be *very* slow) on multiple ar

[Bug 205089] amdgpu : drm:amdgpu_cs_ioctl : Failed to initialize parser -125

2022-05-31 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205089 --- Comment #45 from Alex Deucher (alexdeuc...@gmail.com) --- The "Failed to initialize parser -125!" error message is a generic symptom of a GPU hang and reset. The actual cause of the GPU hang is very likely different for everyone. The issue i

[PATCH v4 09/13] lib: add support for device coherent type in test_hmm

2022-05-31 Thread Alex Sierra
Device Coherent type uses device memory that is coherently accesible by the CPU. This could be shown as SP (special purpose) memory range at the BIOS-e820 memory enumeration. If no SP memory is supported in system, this could be faked by setting CONFIG_EFI_FAKE_MEMMAP. Currently, test_hmm only sup

[PATCH v4 13/13] tools: add selftests to hmm for COW in device memory

2022-05-31 Thread Alex Sierra
The objective is to test device migration mechanism in pages marked as COW, for private and coherent device type. In case of writing to COW private page(s), a page fault will migrate pages back to system memory first. Then, these pages will be duplicated. In case of COW device coherent type, pages

[PATCH v4 08/13] lib: test_hmm add module param for zone device type

2022-05-31 Thread Alex Sierra
In order to configure device coherent in test_hmm, two module parameters should be passed, which correspond to the SP start address of each device (2) spm_addr_dev0 & spm_addr_dev1. If no parameters are passed, private device type is configured. Signed-off-by: Alex Sierra Acked-by: Felix Kuehling

[PATCH v4 10/13] tools: update hmm-test to support device coherent type

2022-05-31 Thread Alex Sierra
Test cases such as migrate_fault and migrate_multiple, were modified to explicit migrate from device to sys memory without the need of page faults, when using device coherent type. Snapshot test case updated to read memory device type first and based on that, get the proper returned results migrat

[PATCH v4 11/13] tools: update test_hmm script to support SP config

2022-05-31 Thread Alex Sierra
Add two more parameters to set spm_addr_dev0 & spm_addr_dev1 addresses. These two parameters configure the start SP addresses for each device in test_hmm driver. Consequently, this configures zone device type as coherent. Signed-off-by: Alex Sierra Acked-by: Felix Kuehling Reviewed-by: Alistair

[PATCH v4 12/13] tools: add hmm gup tests for device coherent type

2022-05-31 Thread Alex Sierra
The intention is to test hmm device coherent type under different get user pages paths. Also, test gup with FOLL_LONGTERM flag set in device coherent pages. These pages should get migrated back to system memory. Signed-off-by: Alex Sierra Reviewed-by: Alistair Popple --- tools/testing/selftests

[PATCH v4 07/13] lib: test_hmm add ioctl to get zone device type

2022-05-31 Thread Alex Sierra
new ioctl cmd added to query zone device type. This will be used once the test_hmm adds zone device coherent type. Signed-off-by: Alex Sierra Acked-by: Felix Kuehling Reviewed-by: Alistair Poppple Signed-off-by: Christoph Hellwig --- lib/test_hmm.c | 23 +-- lib/test_

[PATCH v4 05/13] mm/gup: migrate device coherent pages when pinning instead of failing

2022-05-31 Thread Alex Sierra
From: Alistair Popple Currently any attempts to pin a device coherent page will fail. This is because device coherent pages need to be managed by a device driver, and pinning them would prevent a driver from migrating them off the device. However this is no reason to fail pinning of these pages.

[PATCH v4 06/13] drm/amdkfd: add SPM support for SVM

2022-05-31 Thread Alex Sierra
When CPU is connected throug XGMI, it has coherent access to VRAM resource. In this case that resource is taken from a table in the device gmc aperture base. This resource is used along with the device type, which could be DEVICE_PRIVATE or DEVICE_COHERENT to create the device page map region. Also

[PATCH v4 00/13] Add MEMORY_DEVICE_COHERENT for coherent device memory mapping

2022-05-31 Thread Alex Sierra
This is our MEMORY_DEVICE_COHERENT patch series rebased and updated for current 5.18.0 Changes since the last version: - Fixed problems with migration during long-term pinning in get_user_pages - Open coded vm_normal_lru_pages as suggested in previous code review - Update hmm_gup_test with more ge

  1   2   >