Re: [PATCH 0/3] Use implicit kref infra

2020-09-01 Thread Pan, Xinhui
> 2020年9月2日 11:46,Tuikov, Luben 写道: > > On 2020-09-01 21:42, Pan, Xinhui wrote: >> If you take a look at the below function, you should not use driver's >> release to free adev. As dev is embedded in adev. > > Do you mean "look at the function below", using "below" as an adverb? > "below" is

Re: [PATCH 0/3] Use implicit kref infra

2020-09-01 Thread Luben Tuikov
On 2020-09-01 21:42, Pan, Xinhui wrote: > If you take a look at the below function, you should not use driver's release > to free adev. As dev is embedded in adev. Do you mean "look at the function below", using "below" as an adverb? "below" is not an adjective. I know dev is embedded in

Re: [PATCH v2 2/4] drm/vc4: hdmi: Add pixel bvb clock control

2020-09-01 Thread Hoegeun Kwon
Hi Chanwoo, On 9/1/20 1:27 PM, Chanwoo Choi wrote: > Hi Hoegeun, > > It looks good to me. But, just one comment. > > On 9/1/20 1:07 PM, Hoegeun Kwon wrote: >> There is a problem that the output does not work at a resolution >> exceeding FHD. To solve this, we need to adjust the bvb clock at a >>

Re: linux-next: manual merge of the drm-misc tree with Linus' tree

2020-09-01 Thread Stephen Rothwell
Hi all, On Wed, 26 Aug 2020 10:01:13 +1000 Stephen Rothwell wrote: > > Hi all, > > Today's linux-next merge of the drm-misc tree got conflicts in: > > drivers/video/fbdev/arcfb.c > drivers/video/fbdev/atmel_lcdfb.c > drivers/video/fbdev/savage/savagefb_driver.c > > between commit: > >

Re: linux-next: build failure after merge of the drm-misc tree

2020-09-01 Thread Stephen Rothwell
Hi all, On Wed, 26 Aug 2020 10:55:47 +1000 Stephen Rothwell wrote: > > After merging the drm-misc tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > drivers/gpu/drm/qxl/qxl_display.c: In function > 'qxl_display_read_client_monitors_config': >

Re: [PATCH 0/3] Use implicit kref infra

2020-09-01 Thread Pan, Xinhui
If you take a look at the below function, you should not use driver's release to free adev. As dev is embedded in adev. 809 static void drm_dev_release(struct kref *ref) 810 { 811 struct drm_device *dev = container_of(ref, struct drm_device, ref); 812 813 if

[PATCH 3/3] drm/amdgpu: Remove superfluous NULL check

2020-09-01 Thread Luben Tuikov
The DRM device is a static member of the amdgpu device structure and as such always exists, so long as the PCI and thus the amdgpu device exist. Signed-off-by: Luben Tuikov --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH 0/3] Use implicit kref infra

2020-09-01 Thread Luben Tuikov
Use the implicit kref infrastructure to free the container struct amdgpu_device, container of struct drm_device. First, in drm_dev_register(), do not indiscriminately warn when a DRM driver hasn't opted for managed.final_kfree, but instead check if the driver has provided its own "release"

[PATCH 2/3] drm/amdgpu: Remove drmm final free

2020-09-01 Thread Luben Tuikov
The amdgpu driver implements its own DRM driver release function which naturally frees the container struct amdgpu_device of the DRM device, on a "final" kref-put, i.e. when the kref transitions from non-zero to 0. Signed-off-by: Luben Tuikov --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 --

[PATCH 1/3] drm: No warn for drivers who provide release

2020-09-01 Thread Luben Tuikov
Drivers usually allocate their container struct at PCI probe time, then call drm_dev_init(), which initializes the contained DRM dev kref to 1. A DRM driver may provide their own kref release method, which frees the container object, the container of the DRM device, on the last "put" which

Re: [PATCH v2 1/4] drm/of: Change the prototype of drm_of_lvds_get_dual_link_pixel_order

2020-09-01 Thread Laurent Pinchart
Hi Maxime, On Tue, Sep 01, 2020 at 03:23:40PM +0200, Maxime Ripard wrote: > On Mon, Aug 31, 2020 at 11:28:52PM +0300, Laurent Pinchart wrote: > > On Thu, Jul 30, 2020 at 11:35:01AM +0200, Maxime Ripard wrote: > > > The drm_of_lvds_get_dual_link_pixel_order() function took so far the > > >

Re: [PATCH v9 12/32] drm: msm: fix common struct sg_table related issues

2020-09-01 Thread Rob Clark
On Tue, Sep 1, 2020 at 12:14 PM Robin Murphy wrote: > > On 2020-08-26 07:32, Marek Szyprowski wrote: > > The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function > > returns the number of the created entries in the DMA address space. > > However the subsequent calls to the

[PATCH v4] drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps

2020-09-01 Thread Lyude Paul
Not entirely sure why this never came up when I originally tested this (maybe some BIOSes already have this setup?) but the ->caps_init vfunc appears to cause the display engine to throw an exception on driver init, at least on my ThinkPad P72: nouveau :01:00.0: disp: chid 0 mthd 008c data

[PATCH v3] drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps

2020-09-01 Thread Lyude Paul
Not entirely sure why this never came up when I originally tested this (maybe some BIOSes already have this setup?) but the ->caps_init vfunc appears to cause the display engine to throw an exception on driver init, at least on my ThinkPad P72: nouveau :01:00.0: disp: chid 0 mthd 008c data

Re: [PATCH v9 11/32] drm: mediatek: use common helper for extracting pages array

2020-09-01 Thread Chun-Kuang Hu
Robin Murphy 於 2020年9月2日 週三 上午2:55寫道: > > On 2020-08-26 07:32, Marek Szyprowski wrote: > > Use common helper for converting a sg_table object into struct > > page pointer array. > > Reviewed-by: Robin Murphy > > Side note: is mtk_drm_gem_prime_vmap() missing a call to > sg_free_table(sgt) before

Re: [PATCH v9 10/32] drm: mediatek: use common helper for a scatterlist contiguity check

2020-09-01 Thread Chun-Kuang Hu
Hi, Marek: Marek Szyprowski 於 2020年8月26日 週三 下午2:35寫道: > > Use common helper for checking the contiguity of the imported dma-buf and > do this check before allocating resources, so the error path is simpler. > Acked-by: Chun-Kuang Hu > Signed-off-by: Marek Szyprowski > --- >

Re: [PATCH 2/2] drm/msm: Drop debug print in _dpu_crtc_setup_lm_bounds()

2020-09-01 Thread abhinavk
On 2020-09-01 14:59, Stephen Boyd wrote: This function is called quite often if you have a blinking cursor on the screen, hello page flip. Let's drop this debug print here because it means enabling the print via the module parameter starts to spam the debug console. Cc: Abhinav Kumar Cc:

Re: [PATCH 1/2] drm/msm: Avoid div-by-zero in dpu_crtc_atomic_check()

2020-09-01 Thread abhinavk
On 2020-09-01 14:59, Stephen Boyd wrote: The cstate->num_mixers member is only set to a non-zero value once dpu_encoder_virt_mode_set() is called, but the atomic check function can be called by userspace before that. Let's avoid the div-by-zero here and inside _dpu_crtc_setup_lm_bounds() by

Re: [Nouveau] [PATCH 1/2] drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps

2020-09-01 Thread Lyude Paul
On Mon, 2020-08-31 at 14:26 +1000, Ben Skeggs wrote: > On Wed, 26 Aug 2020 at 02:52, Lyude Paul wrote: > > On Tue, 2020-08-25 at 08:28 +1000, Ben Skeggs wrote: > > > On Tue, 25 Aug 2020 at 04:33, Lyude Paul wrote: > > > > Not entirely sure why this never came up when I originally tested this > >

Re: [PATCH 3/3] drm/amdgpu: Embed drm_device into amdgpu_device (v2)

2020-09-01 Thread Luben Tuikov
On 2020-09-01 9:49 a.m., Alex Deucher wrote: > On Tue, Sep 1, 2020 at 3:44 AM Daniel Vetter wrote: >> >> On Wed, Aug 19, 2020 at 01:00:42AM -0400, Luben Tuikov wrote: >>> a) Embed struct drm_device into struct amdgpu_device. >>> b) Modify the inline-f drm_to_adev() accordingly. >>> c) Modify the

[PATCH v5 3/3] xen: add helpers to allocate unpopulated memory

2020-09-01 Thread Roger Pau Monne
To be used in order to create foreign mappings. This is based on the ZONE_DEVICE facility which is used by persistent memory devices in order to create struct pages and kernel virtual mappings for the IOMEM areas of such devices. Note that on kernels without support for ZONE_DEVICE Xen will

Re: [PATCH v5 3/3] xen: add helpers to allocate unpopulated memory

2020-09-01 Thread Roger Pau Monné
On Tue, Sep 01, 2020 at 10:33:26AM +0200, Roger Pau Monne wrote: > +static int fill_list(unsigned int nr_pages) > +{ > + struct dev_pagemap *pgmap; > + void *vaddr; > + unsigned int i, alloc_pages = round_up(nr_pages, PAGES_PER_SECTION); > + int nid, ret; > + > + pgmap =

RE: [Intel-gfx] [PATCH v9 08/32] drm: i915: fix common struct sg_table related issues

2020-09-01 Thread Ruhl, Michael J
>-Original Message- >From: Robin Murphy >Sent: Tuesday, September 1, 2020 3:54 PM >To: Ruhl, Michael J ; Marek Szyprowski >; dri-devel@lists.freedesktop.org; >io...@lists.linux-foundation.org; linaro-mm-...@lists.linaro.org; linux- >ker...@vger.kernel.org >Cc: Bartlomiej Zolnierkiewicz ;

Re: [PATCH v9 31/32] media: pci: fix common ALSA DMA-mapping related codes

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:33, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that dma_map_sg returns the numer of the created entries in the DMA address space. However the subsequent calls to dma_sync_sg_for_{device,cpu} and dma_unmap_sg must be called with the original number of

Re: [PATCH v9 32/32] videobuf2: use sgtable-based scatterlist wrappers

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:33, Marek Szyprowski wrote: Use recently introduced common wrappers operating directly on the struct sg_table objects and scatterlist page iterators to make the code a bit more compact, robust, easier to follow and copy/paste safe. No functional change, because the code already

Re: [PATCH v9 30/32] samples: vfio-mdev/mbochs: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:33, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [PATCH v9 29/32] rapidio: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:33, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [PATCH v9 28/32] misc: fastrpc: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:33, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [PATCH v9 24/32] drm: host1x: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:33, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [PATCH v9 18/32] drm: tegra: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:33, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [PATCH v9 17/32] drm: rockchip: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:33, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [Intel-gfx] [PATCH v9 08/32] drm: i915: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-09-01 20:38, Ruhl, Michael J wrote: -Original Message- From: Intel-gfx On Behalf Of Marek Szyprowski Sent: Wednesday, August 26, 2020 2:33 AM To: dri-devel@lists.freedesktop.org; io...@lists.linux-foundation.org; linaro-mm-...@lists.linaro.org; linux-ker...@vger.kernel.org Cc:

RE: [Intel-gfx] [PATCH v9 08/32] drm: i915: fix common struct sg_table related issues

2020-09-01 Thread Ruhl, Michael J
>-Original Message- >From: Intel-gfx On Behalf Of >Marek Szyprowski >Sent: Wednesday, August 26, 2020 2:33 AM >To: dri-devel@lists.freedesktop.org; io...@lists.linux-foundation.org; >linaro-mm-...@lists.linaro.org; linux-ker...@vger.kernel.org >Cc: Bartlomiej Zolnierkiewicz ; David Airlie

Re: [PATCH v9 16/32] drm: rockchip: use common helper for a scatterlist contiguity check

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:33, Marek Szyprowski wrote: Use common helper for checking the contiguity of the imported dma-buf. Reviewed-by: Robin Murphy Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 19 +-- 1 file changed, 1 insertion(+), 18

Re: [PATCH v9 14/32] drm: omapdrm: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [PATCH 3/3] drm/ttm: remove io_reserve_lru handling v2

2020-09-01 Thread kernel test robot
o use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Christian-K-nig/drm-ttm-make-sure-that-we-always-zero-init-mem-bus-v2/20200901-230736 base:b36c969764ab12faebb74711c942fa3e6eaf1e96 config: x86_64-randconfig-a006-20200901 (att

Re: [PATCH v9 13/32] drm: omapdrm: use common helper for extracting pages array

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/omapdrm/omap_gem.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git

Re: [PATCH v9 12/32] drm: msm: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

[Bug 203905] amdgpu:actual_brightness has unreal/wrong value

2020-09-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203905 --- Comment #14 from Xia Mu (mu.xia...@gmail.com) --- The bug should be fixed in 5.9.0-0.rc3. I tested it on my laptop with AMD Ryzen 7 PRO 4750U CPU with Renoir GPU. -- You are receiving this mail because: You are watching the assignee of the

Re: [PATCH v9 11/32] drm: mediatek: use common helper for extracting pages array

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: Use common helper for converting a sg_table object into struct page pointer array. Reviewed-by: Robin Murphy Side note: is mtk_drm_gem_prime_vmap() missing a call to sg_free_table(sgt) before its kfree(sgt)? Signed-off-by: Marek Szyprowski

Re: [PATCH v9 10/32] drm: mediatek: use common helper for a scatterlist contiguity check

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: Use common helper for checking the contiguity of the imported dma-buf and do this check before allocating resources, so the error path is simpler. Reviewed-by: Robin Murphy Signed-off-by: Marek Szyprowski ---

Re: [PATCH v9 08/32] drm: i915: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [PATCH v9 05/32] drm: etnaviv: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [PATCH v9 04/32] drm: armada: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [PATCH 4/5] drm_dp_cec: add plumbing in preparation for MST support

2020-09-01 Thread Lyude Paul
Super minor nitpicks: On Tue, 2020-09-01 at 16:22 +1000, Sam McNally wrote: > From: Hans Verkuil > > Signed-off-by: Hans Verkuil > [sa...@chromium.org: > - rebased > - removed polling-related changes > - moved the calls to drm_dp_cec_(un)set_edid() into the next patch > ] > Signed-off-by:

Re: [PATCH] drm/tve200: Stabilize enable/disable

2020-09-01 Thread Daniel Vetter
On Tue, Sep 1, 2020 at 7:52 PM Linus Walleij wrote: > > On Thu, Aug 20, 2020 at 10:32 PM Linus Walleij > wrote: > > > The TVE200 will occasionally print a bunch of lost interrupts > > and similar dmesg messages, sometimes during boot and sometimes > > after disabling and coming back to

Re: [PATCH] drm/dp: start using more of the extended receiver caps

2020-09-01 Thread Jani Nikula
On Tue, 01 Sep 2020, Lyude Paul wrote: > On Tue, 2020-09-01 at 15:32 +0300, Jani Nikula wrote: >> In the future, we'll be needing more of the extended receiver capability >> field starting at DPCD address 0x2200. (Specifically, we'll need main >> link channel coding cap for DP 2.0.) Start using

Re: [PATCH 0/4] drm/panel: s6e63m0: Add DSI transport

2020-09-01 Thread Linus Walleij
On Thu, Aug 27, 2020 at 11:04 AM Linus Walleij wrote: > On Tue, Aug 18, 2020 at 7:10 PM Sam Ravnborg wrote: > > > How does this patchset relate to the patchset posted by Paul? > > https://lore.kernel.org/dri-devel/20200727164613.19744-1-p...@crapouillou.net/ > > Not much. S6E63M0 uses "spi" as

Re: [PATCH] drm/tve200: Stabilize enable/disable

2020-09-01 Thread Linus Walleij
On Thu, Aug 20, 2020 at 10:32 PM Linus Walleij wrote: > The TVE200 will occasionally print a bunch of lost interrupts > and similar dmesg messages, sometimes during boot and sometimes > after disabling and coming back to enablement. This is probably > because the hardware is left in an unknown

Re: [PATCH] drm/dp: start using more of the extended receiver caps

2020-09-01 Thread Lyude Paul
On Tue, 2020-09-01 at 15:32 +0300, Jani Nikula wrote: > In the future, we'll be needing more of the extended receiver capability > field starting at DPCD address 0x2200. (Specifically, we'll need main > link channel coding cap for DP 2.0.) Start using it now to not miss out > later on. > > Cc:

Re: [PATCH v9 03/32] drm: core: fix common struct sg_table related issues

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the

Re: [PATCH v9 01/32] drm: prime: add common helper to check scatterlist contiguity

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: It is a common operation done by DRM drivers to check the contiguity of the DMA-mapped buffer described by a scatterlist in the sg_table object. Let's add a common helper for this operation. I still think this could be hoisted even further out to

Re: [PATCH v9 02/32] drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

2020-09-01 Thread Robin Murphy
On 2020-08-26 07:32, Marek Szyprowski wrote: Replace the current hand-crafted code for extracting pages and DMA addresses from the given scatterlist by the much more robust code based on the generic scatterlist iterators and recently introduced sg_table-based wrappers. The resulting code is

[PATCH v16 20/20] arm: dts: qcom: sc7180: Set the compatible string for the GPU SMMU

2020-09-01 Thread Rob Clark
From: Rob Clark Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Rob Clark --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v16 11/20] drm/msm: Show process names in gem_describe

2020-09-01 Thread Rob Clark
From: Rob Clark In $debugfs/gem we already show any vma(s) associated with an object. Also show process names if the vma's address space is a per-process address space. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/msm_drv.c |

[PATCH v16 19/20] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-09-01 Thread Rob Clark
From: Jordan Crouse Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 9 +

[PATCH v16 13/20] iommu/arm-smmu: Add support for split pagetables

2020-09-01 Thread Rob Clark
From: Jordan Crouse Enable TTBR1 for a context bank if IO_PGTABLE_QUIRK_ARM_TTBR1 is selected by the io-pgtable configuration. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 19 +++

[PATCH v16 14/20] iommu/arm-smmu: Prepare for the adreno-smmu implementation

2020-09-01 Thread Rob Clark
From: Jordan Crouse Do a bit of prep work to add the upcoming adreno-smmu implementation. Add an hook to allow the implementation to choose which context banks to allocate. Move some of the common structs to arm-smmu.h in anticipation of them being used by the implementations and update some

[PATCH v16 10/20] drm/msm/a6xx: Add support for per-instance pagetables

2020-09-01 Thread Rob Clark
From: Jordan Crouse Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 63 +++

[PATCH v16 15/20] iommu/arm-smmu: Constify some helpers

2020-09-01 Thread Rob Clark
From: Rob Clark Sprinkle a few `const`s where helpers don't need write access. Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/iommu/arm/arm-smmu/arm-smmu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h

[PATCH v16 18/20] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-09-01 Thread Rob Clark
From: Jordan Crouse Every Qcom Adreno GPU has an embedded SMMU for its own use. These devices depend on unique features such as split pagetables, different stall/halt requirements and other settings. Identify them with a compatible string so that they can be identified in the arm-smmu

[PATCH v16 16/20] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-09-01 Thread Rob Clark
From: Jordan Crouse Add a special implementation for the SMMU attached to most Adreno GPU target triggered from the qcom,adreno-smmu compatible string. The new Adreno SMMU implementation will enable split pagetables (TTBR1) for the domain attached to the GPU device (SID 0) and hard code it

[PATCH v16 17/20] iommu/arm-smmu: Add a way for implementations to influence SCTLR

2020-09-01 Thread Rob Clark
From: Rob Clark For the Adreno GPU's SMMU, we want SCTLR.HUPCF set to ensure that pending translations are not terminated on iova fault. Otherwise a terminated CP read could hang the GPU by returning invalid command-stream data. Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson ---

[PATCH v16 12/20] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-09-01 Thread Rob Clark
From: Jordan Crouse Construct the io-pgtable config before calling the implementation specific init_context function and pass it so the implementation specific function can get a chance to change it before the io-pgtable is created. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark

[PATCH v16 08/20] drm/msm: Add support to create a local pagetable

2020-09-01 Thread Rob Clark
From: Jordan Crouse Add support to create a io-pgtable for use by targets that support per-instance pagetables. In order to support per-instance pagetables the GPU SMMU device needs to have the qcom,adreno-smmu compatible string and split pagetables enabled. Signed-off-by: Jordan Crouse

[PATCH v16 09/20] drm/msm: Add support for private address space instances

2020-09-01 Thread Rob Clark
From: Jordan Crouse Add support for allocating private address space instances. Targets that support per-context pagetables should implement their own function to allocate private address spaces. The default will return a pointer to the global address space. Signed-off-by: Jordan Crouse

[PATCH v16 07/20] drm/msm: Set the global virtual address range from the IOMMU domain

2020-09-01 Thread Rob Clark
From: Jordan Crouse Use the aperture settings from the IOMMU domain to set up the virtual address range for the GPU. This allows us to transparently deal with IOMMU side features (like split pagetables). Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson ---

[PATCH v16 03/20] drm/msm/gpu: Add dev_to_gpu() helper

2020-09-01 Thread Rob Clark
From: Rob Clark In a later patch, the drvdata will not directly be 'struct msm_gpu *', so add a helper to reduce the churn. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/adreno/adreno_device.c | 10 --

[PATCH v16 01/20] drm/msm: Remove dangling submitqueue references

2020-09-01 Thread Rob Clark
From: Rob Clark Currently it doesn't matter, since we free the ctx immediately. But when we start refcnt'ing the ctx, we don't want old dangling list entries to hang around. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson ---

[PATCH v16 06/20] drm/msm: Drop context arg to gpu->submit()

2020-09-01 Thread Rob Clark
From: Jordan Crouse Now that we can get the ctx from the submitqueue, the extra arg is redundant. Signed-off-by: Jordan Crouse [split out of previous patch to reduce churny noise] Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12

[PATCH v16 04/20] drm/msm: Set adreno_smmu as gpu's drvdata

2020-09-01 Thread Rob Clark
From: Rob Clark This will be populated by adreno-smmu, to provide a way for coordinating enabling/disabling TTBR0 translation. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 --

[PATCH v16 00/20] iommu/arm-smmu + drm/msm: per-process GPU pgtables

2020-09-01 Thread Rob Clark
From: Rob Clark NOTE: I have re-ordered the series, and propose that we could merge this series in the following order: 1) 01-11 - merge via drm / msm-next 2) 12-15 - merge via iommu, no dependency on msm-next pull req 3) 16-18 - patch 16 has a dependency on 02 and

[PATCH v16 02/20] drm/msm: Add private interface for adreno-smmu

2020-09-01 Thread Rob Clark
From: Rob Clark This interface will be used for drm/msm to coordinate with the qcom_adreno_smmu_impl to enable/disable TTBR0 translation. Once TTBR0 translation is enabled, the GPU's CP (Command Processor) will directly switch TTBR0 pgtables (and do the necessary TLB inv) synchronized to the

[PATCH v16 05/20] drm/msm: Add a context pointer to the submitqueue

2020-09-01 Thread Rob Clark
From: Jordan Crouse Each submitqueue is attached to a context. Add a pointer to the context to the submitqueue at create time and refcount it so that it stays around through the life of the queue. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by:

Re: [PATCH] drm: Parse Colorimetry data block from EDID

2020-09-01 Thread crj
Hi, 在 2020/9/1 3:53, Ville Syrjälä 写道: On Fri, Aug 28, 2020 at 09:07:13AM +0800, crj wrote: Hi Ville Syrjälä, 在 2020/8/27 18:57, Ville Syrjälä 写道: On Wed, Aug 26, 2020 at 10:23:28PM +0800, Algea Cao wrote: CEA 861.3 spec adds colorimetry data block for HDMI. Parsing the block to get the

Re: [PATCH] drm/radeon: Reset ASIC if suspend is not managed by platform firmware

2020-09-01 Thread Kai-Heng Feng
> On Sep 1, 2020, at 22:19, Alex Deucher wrote: > > On Tue, Sep 1, 2020 at 3:32 AM Kai-Heng Feng > wrote: >> >> Suspend with s2idle or by the following steps cause screen frozen: >> # echo devices > /sys/power/pm_test >> # echo freeze > /sys/power/mem >> >> [ 289.625461]

Re: [PATCH v4 62/78] drm/vc4: hdmi: Adjust HSM clock rate depending on pixel rate

2020-09-01 Thread Maxime Ripard
Hi Chanwoo, On Tue, Sep 01, 2020 at 01:36:17PM +0900, Chanwoo Choi wrote: > On 7/9/20 2:42 AM, Maxime Ripard wrote: > > The HSM clock needs to be setup at around 101% of the pixel rate. This > > was done previously by setting the clock rate to 163.7MHz at probe time and > > only check in

Re: [PATCH v8 06/17] pwm: lpss: Use pwm_lpss_restore() when restoring state on resume

2020-09-01 Thread Andy Shevchenko
On Mon, Aug 31, 2020 at 07:57:30PM +0200, Hans de Goede wrote: > On 8/31/20 3:15 PM, Thierry Reding wrote: > > On Mon, Aug 31, 2020 at 01:46:28PM +0200, Hans de Goede wrote: > > > On 8/31/20 1:10 PM, Thierry Reding wrote: > > > > On Sun, Aug 30, 2020 at 02:57:42PM +0200, Hans de Goede wrote: > > >

Re: [PATCH v2 1/4] drm/of: Change the prototype of drm_of_lvds_get_dual_link_pixel_order

2020-09-01 Thread Maxime Ripard
Hi Laurent, On Mon, Aug 31, 2020 at 11:28:52PM +0300, Laurent Pinchart wrote: > Hi Maxime, > > Thank you for the patch. > > On Thu, Jul 30, 2020 at 11:35:01AM +0200, Maxime Ripard wrote: > > The drm_of_lvds_get_dual_link_pixel_order() function took so far the > > device_node of the two ports

Re: [PATCH] Fix use after free in get_capset_info callback

2020-09-01 Thread Markus Elfring
> If a response to virtio_gpu_cmd_get_capset_info takes longer than > five seconds to return, the callback will access freed kernel memory > in vg->capsets. * Can another imperative wording become helpful for the change description? * How do you think about to mention the proposed addition of a

Re: [PATCH v4 62/78] drm/vc4: hdmi: Adjust HSM clock rate depending on pixel rate

2020-09-01 Thread Chanwoo Choi
Hi Maxime, On 9/1/20 6:45 PM, Maxime Ripard wrote: > Hi Chanwoo, > > On Tue, Sep 01, 2020 at 01:36:17PM +0900, Chanwoo Choi wrote: >> On 7/9/20 2:42 AM, Maxime Ripard wrote: >>> The HSM clock needs to be setup at around 101% of the pixel rate. This >>> was done previously by setting the clock

Re: [PATCH V2 3/8] drm/msm: Unconditionally call dev_pm_opp_of_remove_table()

2020-09-01 Thread Viresh Kumar
On 01-09-20, 15:15, Rajendra Nayak wrote: > > On 9/1/2020 2:08 PM, Viresh Kumar wrote: > > On 01-09-20, 13:01, Rajendra Nayak wrote: > > > So FWIU, dpu_unbind() gets called even when dpu_bind() fails for some > > > reason. > > > > Ahh, I see. > > > > > I tried to address that earlier [1] which

Re: [PATCH v4 03/78] drm/vc4: hvs: Boost the core clock during modeset

2020-09-01 Thread Chanwoo Choi
On 9/1/20 8:21 PM, Chanwoo Choi wrote: > Hi Maxime, > > On 7/9/20 2:41 AM, Maxime Ripard wrote: >> In order to prevent timeouts and stalls in the pipeline, the core clock >> needs to be maxed at 500MHz during a modeset on the BCM2711. >> >> Reviewed-by: Eric Anholt >> Signed-off-by: Maxime

Re: [PATCH v4 77/78] drm/vc4: drv: Support BCM2711

2020-09-01 Thread Maxime Ripard
Hi Dave, On Tue, Jul 28, 2020 at 04:30:16PM +0100, Dave Stevenson wrote: > > @@ -681,10 +684,14 @@ int vc4_kms_load(struct drm_device *dev) > > struct vc4_load_tracker_state *load_state; > > int ret; > > > > - /* Start with the load tracker enabled. Can be disabled through

Re: [PATCH] dma-buf: fix kernel-doc warning in dma-fence.c

2020-09-01 Thread Randy Dunlap
On 9/1/20 6:37 AM, Christian König wrote: > Am 01.09.20 um 15:32 schrieb Daniel Vetter: >> On Mon, Aug 31, 2020 at 12:02:03PM +0200, Christian König wrote: >>> Am 31.08.20 um 06:17 schrieb Randy Dunlap: Add @cookie to dma_fence_end_signalling() to prevent kernel-doc warning in

Re: [PATCH v4 75/78] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI controllers bindings

2020-09-01 Thread Maxime Ripard
Hi, On Tue, Sep 01, 2020 at 01:45:07PM +0900, Chanwoo Choi wrote: > Hi Maxime, > > On 7/9/20 2:42 AM, Maxime Ripard wrote: > > The HDMI controllers found in the BCM2711 SoC need some adjustments to the > > bindings, especially since the registers have been shuffled around in more > > register

Re: [PATCH V2 3/8] drm/msm: Unconditionally call dev_pm_opp_of_remove_table()

2020-09-01 Thread Viresh Kumar
On 01-09-20, 13:01, Rajendra Nayak wrote: > So FWIU, dpu_unbind() gets called even when dpu_bind() fails for some reason. Ahh, I see. > I tried to address that earlier [1] which I realized did not land. I don't think that patch was required, as you can call dev_pm_opp_put_clkname() multiple

Re: [PATCH v4 29/78] drm/vc4: crtc: Add a delay after disabling the PixelValve output

2020-09-01 Thread Maxime Ripard
Hi Stefan On Tue, Aug 25, 2020 at 11:30:58PM +0200, Stefan Wahren wrote: > Am 25.08.20 um 17:06 schrieb Maxime Ripard: > > Hi Stefan, > > > > On Wed, Jul 29, 2020 at 05:50:31PM +0200, Stefan Wahren wrote: > >> Am 29.07.20 um 16:42 schrieb Maxime Ripard: > >>> Hi, > >>> > >>> On Wed, Jul 29, 2020

Re: [PATCH v4 03/78] drm/vc4: hvs: Boost the core clock during modeset

2020-09-01 Thread Chanwoo Choi
Hi Maxime, On 7/9/20 2:41 AM, Maxime Ripard wrote: > In order to prevent timeouts and stalls in the pipeline, the core clock > needs to be maxed at 500MHz during a modeset on the BCM2711. > > Reviewed-by: Eric Anholt > Signed-off-by: Maxime Ripard > --- > drivers/gpu/drm/vc4/vc4_drv.h | 2 ++

Re: [PATCH v4 29/78] drm/vc4: crtc: Add a delay after disabling the PixelValve output

2020-09-01 Thread Stefan Wahren
Hi Maxime, Am 01.09.20 um 11:58 schrieb Maxime Ripard: > Hi Stefan > > On Tue, Aug 25, 2020 at 11:30:58PM +0200, Stefan Wahren wrote: >> Am 25.08.20 um 17:06 schrieb Maxime Ripard: >>> Hi Stefan, >>> >>> On Wed, Jul 29, 2020 at 05:50:31PM +0200, Stefan Wahren wrote: Am 29.07.20 um 16:42

Re: [PATCH] drm/radeon: Reset ASIC if suspend is not managed by platform firmware

2020-09-01 Thread Alex Deucher
On Tue, Sep 1, 2020 at 12:21 PM Kai-Heng Feng wrote: > > > > > On Sep 1, 2020, at 22:19, Alex Deucher wrote: > > > > On Tue, Sep 1, 2020 at 3:32 AM Kai-Heng Feng > > wrote: > >> > >> Suspend with s2idle or by the following steps cause screen frozen: > >> # echo devices > /sys/power/pm_test > >>

Re: [PATCH 06/19] drm/msm/gpu: add dev_to_gpu() helper

2020-09-01 Thread Rob Clark
On Mon, Aug 31, 2020 at 9:32 PM Bjorn Andersson wrote: > > On Thu 13 Aug 21:41 CDT 2020, Rob Clark wrote: > > > From: Rob Clark > > > > In a later patch, the drvdata will not directly be 'struct msm_gpu *', > > so add a helper to reduce the churn. > > > > Signed-off-by: Rob Clark > > --- > >

[PATCH 5.8 213/255] drm/modeset-lock: Take the modeset BKL for legacy drivers

2020-09-01 Thread Greg Kroah-Hartman
From: Daniel Vetter commit 77ef38574beb3e0b414db48e9c0f04633df68ba6 upstream. This fell off in the conversion in commit 9bcaa3fe58ab7559e71df798bcff6e0795158695 Author: Michal Orzel Date: Tue Apr 28 19:10:04 2020 +0200 drm: Replace drm_modeset_lock/unlock_all with

[PATCH 3/3] drm/msm/gpu: Add suspend/resume tracepoints

2020-09-01 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- I'm not sure if there is a better way to do no-arg tracepoints? The trace framework seems to go out of it's way to make this difficult. Or maybe there is a more obvious thing that I'm not seeing. drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4

[PATCH 2/3] drm/msm: Convert shrinker msgs to tracepoints

2020-09-01 Thread Rob Clark
From: Rob Clark This reduces the spam in dmesg when we start hitting the shrinker, and replaces it with something we can put on a timeline while profiling or debugging system issues. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_shrinker.c | 5 +++--

[PATCH 0/3] drm/msm: More GPU tracepoints

2020-09-01 Thread Rob Clark
From: Rob Clark Various extra tracepoints that I've been collecting. Rob Clark (3): drm/msm/gpu: Add GPU freq_change traces drm/msm: Convert shrinker msgs to tracepoints drm/msm/gpu: Add suspend/resume tracepoints drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 3 +

[PATCH 1/3] drm/msm/gpu: Add GPU freq_change traces

2020-09-01 Thread Rob Clark
From: Rob Clark Technically the GMU specific one is a bit redundant, but it was useful to track down a bug. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 3 +++ drivers/gpu/drm/msm/msm_gpu.c | 2 ++ drivers/gpu/drm/msm/msm_gpu_trace.h | 31

[PATCH 3/3] drm/ttm: remove io_reserve_lru handling v2

2020-09-01 Thread Christian König
From: Christian König That is not used any more. v2: keep the NULL checks in TTM. Signed-off-by: Christian König Acked-by: Daniel Vetter --- drivers/gpu/drm/ttm/ttm_bo.c | 34 + drivers/gpu/drm/ttm/ttm_bo_util.c | 113 +++--

[PATCH 2/3] drm/nouveau: move io_reserve_lru handling into the driver v5

2020-09-01 Thread Christian König
While working on TTM cleanups I've found that the io_reserve_lru used by Nouveau is actually not working at all. In general we should remove driver specific handling from the memory management, so this patch moves the io_reserve_lru handling into Nouveau instead. v2: don't call

[PATCH 1/3] drm/ttm: make sure that we always zero init mem.bus v2

2020-09-01 Thread Christian König
We are trying to remove the io_lru handling and depend on zero init base, offset and addr here. v2: init addr as well Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c

  1   2   >