[PATCH v2] drm/i915: Invoke BXT _DSM to enable MUX on HP Workstation laptops

2021-04-22 Thread Kai-Heng Feng
On HP Fury G7 Workstations, graphics output is re-routed from Intel GFX to discrete GFX after S3. This is not desirable, because userspace will treat connected display as a new one, losing display settings. The expected behavior is to let discrete GFX drives all external displays. The platform

Re: [PATCH] vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV

2021-04-22 Thread Zhenyu Wang
On 2021.04.22 10:58:10 -0300, Jason Gunthorpe wrote: > On Thu, Apr 22, 2021 at 03:35:33PM +0200, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > The Kconfig dependency is incomplete since DRM_I915_GVT is a 'bool' > > symbol that depends on the 'tristate' VFIO_MDEV. This allows a > >

Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini

2021-04-22 Thread Lyude Paul
On Thu, 2021-04-22 at 18:33 -0400, Lyude Paul wrote: > OK - talked with Ville a bit on this and did some of my own research, I > actually think that moving i2c to drm_dp_aux_init() is the right decision > for > the time being. The reasoning behind this being that as shown by my previous > work of

[git pull] drm fixes for 5.12 final

2021-04-22 Thread Dave Airlie
Hi Linus, Just some small i915 and amdgpu fixes this week, Should be all until you open the merge window. Regards, Dave. drm-fixes-2021-04-23: drm fixes for 5.12 final amdgpu: - Fix gpuvm page table update issue - Modifier fixes - Register fix for dimgrey cavefish i915: - GVT's BDW regression

[PATCH] SPI: meson-spifc add missed calls to remove function

2021-04-22 Thread Artem Lapkin
Problem: rmmod meson_gx_mmc - not stable without spi_master_suspend call and we can get stuck when try unload this module rmmod meson_gx_mmc ... [ 421.108614] Deleting MTD partitions on "spi0.0": [ 424.219862] spi_master spi0: Failed to power device: -13 ... lsmod | grep spi spi_meson_spifc

Re: [PATCH v5 16/16] of: Add plumbing for restricted DMA pool

2021-04-22 Thread Claire Chang
On Thu, Apr 22, 2021 at 4:17 PM Claire Chang wrote: > > If a device is not behind an IOMMU, we look up the device node and set > up the restricted DMA when the restricted-dma-pool is presented. > > Signed-off-by: Claire Chang > --- > drivers/of/address.c| 25 + >

Re: [PATCH v2 04/10] drm/amdgpu: Simplify AQL queue mapping

2021-04-22 Thread Zeng, Oak
Regards, Oak On 2021-04-21, 9:31 PM, "amd-gfx on behalf of Felix Kuehling" wrote: Do AQL queue double-mapping with a single attach call. That will make it easier to create per-GPU BOs later, to be shared between the two BO VA mappings on the same GPU. Freeing the

Re: [PATCH] drm/mediatek: clear pending flag when cmdq packet is done.

2021-04-22 Thread CK Hu
Hi, Hsin-yi: On Thu, 2021-04-22 at 19:10 +0800, Hsin-Yi Wang wrote: > From: CK Hu > > In cmdq mode, packet may be flushed before it is executed, so > the pending flag should be cleared after cmdq packet is done. > > Signed-off-by: CK Hu > Signed-off-by: Hsin-Yi Wang > --- >

Re: [PATCH v6 1/4] mfd: rt4831: Adds support for Richtek RT4831

2021-04-22 Thread ChiYuan Huang
Hi, Lee: ChiYuan Huang 於 2021年4月19日 週一 下午5:55寫道: > > Lee Jones 於 2021年4月19日 週一 下午3:24寫道: > > > > On Mon, 19 Apr 2021, Lee Jones wrote: > > > > > On Mon, 19 Apr 2021, Lee Jones wrote: > > > > > > > On Mon, 19 Apr 2021, ChiYuan Huang wrote: > > > > > > > > > Hi, Linux mfd reviewers: > > > > >

Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini

2021-04-22 Thread Lyude Paul
OK - talked with Ville a bit on this and did some of my own research, I actually think that moving i2c to drm_dp_aux_init() is the right decision for the time being. The reasoning behind this being that as shown by my previous work of fixing drivers that call drm_dp_aux_register() too early - it

Re: [RFC PATCH 1/3] dt-bindings: display: simple: Add the panel on sc7180-trogdor-pompom

2021-04-22 Thread Doug Anderson
Hi, On Mon, Mar 29, 2021 at 9:25 AM Doug Anderson wrote: > > Hi, > > On Thu, Mar 25, 2021 at 5:09 PM Rob Herring wrote: > > > > On Tue, Mar 16, 2021 at 02:08:19PM -0700, Douglas Anderson wrote: > > > The sc7180-trogdor-pompom board might be attached to any number of a > > > pile of eDP panels.

Re: [PATCH][next] drm/amdkfd: remove redundant initialization to variable r

2021-04-22 Thread Felix Kuehling
Am 2021-04-22 um 8:44 a.m. schrieb Colin King: > From: Colin Ian King > > The variable r is being initialized with a value that is never read > and it is being updated later with a new value. The initialization is > redundant and can be removed. > > Addresses-Coverity: ("Unused value") >

Re: [PATCH][next] drm/amdkfd: fix uint32 variable compared to less than zero

2021-04-22 Thread Felix Kuehling
Am 2021-04-22 um 8:31 a.m. schrieb Colin King: > From: Colin Ian King > > Currently the call to kfd_process_gpuidx_from_gpuid is returning an > int value and this is being assigned to a uint32_t variable gpuidx > and this is being checked for a negative error return which is always > going to be

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Rewrite CL/CTG L-shaped memory detection

2021-04-22 Thread Ville Syrjälä
On Thu, Apr 22, 2021 at 11:49:43AM +0200, Daniel Vetter wrote: > On Wed, Apr 21, 2021 at 06:34:01PM +0300, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > Currently we try to detect a symmetric memory configurations > > using a magic DCC2_MODIFIED_ENHANCED_DISABLE bit. That bit is > >

[PATCH v2] drm/amd/amdgpu/amdgpu_drv.c: Replace drm_modeset_lock_all with drm_modeset_lock

2021-04-22 Thread Fabio M. De Francesco
drm_modeset_lock_all() is not needed here, so it is replaced with drm_modeset_lock(). The crtc list around which we are looping never changes, therefore the only lock we need is to protect access to crtc->state. Suggested-by: Daniel Vetter Suggested-by: Matthew Wilcox Signed-off-by: Fabio M. De

[PATCH v2 1/1] drm/doc: document drm_mode_get_plane

2021-04-22 Thread Leandro Ribeiro
Add a small description and document struct fields of drm_mode_get_plane. Signed-off-by: Leandro Ribeiro --- include/uapi/drm/drm_mode.h | 16 1 file changed, 16 insertions(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index

[PATCH v2 0/1] Document drm_mode_get_plane

2021-04-22 Thread Leandro Ribeiro
This is a follow up of the patchset "Document how userspace should use plane format list and IN_FORMATS": https://lists.freedesktop.org/archives/dri-devel/2021-April/302433.html The first patch of the series ("drm/doc: document drm_mode_get_plane") is still useful, although the other commit of

[PATCH] drm/drm_file.c: Define drm_send_event_helper() as 'static'

2021-04-22 Thread Fabio M. De Francesco
drm_send_event_helper() has not prototype, it has internal linkage and therefore it should be defined with storage class 'static'. Signed-off-by: Fabio M. De Francesco --- drivers/gpu/drm/drm_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_file.c

Re: [PATCH] drm/ttm: fix error handling if no BO can be swapped out v4

2021-04-22 Thread Zack Rusin
On 4/22/21 7:57 AM, Christian König wrote: From: Shiwu Zhang In case that all pre-allocated BOs are busy, just continue to populate BOs since likely half of system memory in total is still free. v4 (chk): fix code moved to VMWGFX as well Signed-off-by: Shiwu Zhang Reviewed-by: Christian

Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini

2021-04-22 Thread Lyude Paul
On Tue, 2021-04-20 at 02:16 +0300, Ville Syrjälä wrote: > > The init vs. register split is intentional. Registering the thing > and allowing userspace access to it before the rest of the driver > is ready isn't particularly great. For a while now we've tried to > move towards an architecture

Re: [PATCH v2 3/3] drm/msm/dpu: hw_blk: make dpu_hw_blk empty opaque structure

2021-04-22 Thread kernel test robot
Hi Dmitry, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20210422] [also build test ERROR on v5.12-rc8] [cannot apply to linus/master v5.12-rc8 v5.12-rc7 v5.12-rc6] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

Re: [PATCH] drm/amd/amdgpu/amdgpu_drv.c: Replace drm_modeset_lock_all with drm_modeset_lock

2021-04-22 Thread Matthew Wilcox
On Thu, Apr 22, 2021 at 05:59:51PM +0200, Fabio M. De Francesco wrote: > - drm_modeset_lock_all(drm_dev); > - > drm_for_each_crtc(crtc, drm_dev) { > + drm_modeset_lock(>mutex, NULL); > if (crtc->state->active) { >

Re: [PULL] drm-misc-next-fixes

2021-04-22 Thread Alex Deucher
On Thu, Apr 22, 2021 at 12:33 PM Maxime Ripard wrote: > > Hi Dave, Daniel, > > Here's this week drm-misc-next-fixes PR, for the next merge window > Can we also cherry-pick this patch: https://cgit.freedesktop.org/drm/drm-misc/commit/?id=d510c88cfbb294d2b1e2d0b71576e9b79d0e2e83 It should have

[PULL] drm-misc-next-fixes

2021-04-22 Thread Maxime Ripard
Hi Dave, Daniel, Here's this week drm-misc-next-fixes PR, for the next merge window Thanks! Maxime drm-misc-next-fixes-2021-04-22: A few fixes for the next merge window, with some build fixes for anx7625 and lt8912b bridges, incorrect error handling for lt8912b and TTM, and one fix for TTM page

Re: [PATCH V2 1/2] dt-bindings: drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 bindings

2021-04-22 Thread Marek Vasut
On 4/22/21 10:43 AM, Jagan Teki wrote: [...] diff --git a/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi83.yaml b/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi83.yaml new file mode 100644 index ..42d11b46a1eb --- /dev/null +++

Re: [PATCH V2 1/2] dt-bindings: drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 bindings

2021-04-22 Thread Marek Vasut
On 4/22/21 10:38 AM, Neil Armstrong wrote: [...] + port@1: +type: object +additionalProperties: false + +description: + Video port for LVDS output (panel or bridge). + +properties: + reg: +const: 1 + + endpoint: +

[PATCH] drm/i915: Invoke BXT _DSM to enable MUX on HP Workstation laptops

2021-04-22 Thread Kai-Heng Feng
On HP Fury G7 Workstations, graphics output is re-routed from Intel GFX to discrete GFX after S3. This is not desirable, because userspace will treat connected display as a new one, losing display settings. The expected behavior is to let discrete GFX drives all external displays. The platform

[PATCH] drm/amd/amdgpu/amdgpu_drv.c: Replace drm_modeset_lock_all with drm_modeset_lock

2021-04-22 Thread Fabio M. De Francesco
drm_modeset_lock_all() is not needed here, so it is replaced with drm_modeset_lock(). The crtc list around which we are looping never changes, therefore the only lock we need is to protect access to crtc->state. Suggested-by: Daniel Vetter Suggested-by: Matthew Wilcox Signed-off-by: Fabio M. De

[PULL] drm-intel-fixes

2021-04-22 Thread Rodrigo Vivi
Hi Dave and Daniel, One GVT fix and one display link training fix targeting stable 5.11. Here goes drm-intel-fixes-2021-04-22: - GVT's BDW regression fix for cmd parser (Zhenyu) - Fix modesetting in case of unexpected AUX timeouts (Imre) Thanks, Rodrigo. The following changes since commit

[PATCH] drm/i915: Make preempt timeout for banned contexts configurable

2021-04-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin When we ban a context, for instance when userspace marked itself as non- persistent and has exited, we apply a 1ms grace period after which any belonging workload still on the GPU (did not preempt) will be forcibly terminated (using engine reset). For some workloads period

Re: [PATCH] drm/ttm: remove special handling for non GEM drivers

2021-04-22 Thread Zack Rusin
On 4/22/21 7:59 AM, Christian König wrote: Zack or Roland any objections to this? There shouldn't be any functional change. Sorry, that looks good. I wanted us to add gem support for a while now, this just adds more reasons to do it for next merge window. Reviewed-by: Zack Rusin

Re: [PATCH] vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV

2021-04-22 Thread Jani Nikula
Cc: gvt list & maintainers On Thu, 22 Apr 2021, Jason Gunthorpe wrote: > On Thu, Apr 22, 2021 at 03:35:33PM +0200, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> The Kconfig dependency is incomplete since DRM_I915_GVT is a 'bool' >> symbol that depends on the 'tristate' VFIO_MDEV. This

Re: [PATCH v5] dma-buf: Add DmaBufTotal counter in meminfo

2021-04-22 Thread Peter.Enderborg
On 4/22/21 10:06 AM, Mike Rapoport wrote: > On Wed, Apr 21, 2021 at 05:35:57PM +, peter.enderb...@sony.com wrote: >> On 4/21/21 5:31 PM, Mike Rapoport wrote: >>> On Wed, Apr 21, 2021 at 10:37:11AM +, peter.enderb...@sony.com wrote: On 4/21/21 11:15 AM, Daniel Vetter wrote: > We

Re: [PATCH] vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV

2021-04-22 Thread Jason Gunthorpe
On Thu, Apr 22, 2021 at 03:35:33PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The Kconfig dependency is incomplete since DRM_I915_GVT is a 'bool' > symbol that depends on the 'tristate' VFIO_MDEV. This allows a > configuration with VFIO_MDEV=m, DRM_I915_GVT=y and DRM_I915=y that >

Re: [PATCH 1/2] vfio/pci: remove vfio_pci_nvlink2

2021-04-22 Thread Jason Gunthorpe
On Thu, Apr 22, 2021 at 11:49:31PM +1000, Michael Ellerman wrote: > Alex Williamson writes: > > On Mon, 12 Apr 2021 19:41:41 +1000 > > Michael Ellerman wrote: > > > >> Alex Williamson writes: > >> > On Fri, 26 Mar 2021 07:13:10 +0100 > >> > Christoph Hellwig wrote: > >> > > >> >> This driver

Re: [PATCH 1/2] vfio/pci: remove vfio_pci_nvlink2

2021-04-22 Thread Michael Ellerman
Alex Williamson writes: > On Mon, 12 Apr 2021 19:41:41 +1000 > Michael Ellerman wrote: > >> Alex Williamson writes: >> > On Fri, 26 Mar 2021 07:13:10 +0100 >> > Christoph Hellwig wrote: >> > >> >> This driver never had any open userspace (which for VFIO would include >> >> VM kernel drivers)

[PATCH] vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV

2021-04-22 Thread Arnd Bergmann
From: Arnd Bergmann The Kconfig dependency is incomplete since DRM_I915_GVT is a 'bool' symbol that depends on the 'tristate' VFIO_MDEV. This allows a configuration with VFIO_MDEV=m, DRM_I915_GVT=y and DRM_I915=y that causes a link failure: x86_64-linux-ld: drivers/gpu/drm/i915/gvt/gvt.o: in

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Rewrite CL/CTG L-shaped memory detection

2021-04-22 Thread Ville Syrjälä
On Thu, Apr 22, 2021 at 11:49:43AM +0200, Daniel Vetter wrote: > On Wed, Apr 21, 2021 at 06:34:01PM +0300, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > Currently we try to detect a symmetric memory configurations > > using a magic DCC2_MODIFIED_ENHANCED_DISABLE bit. That bit is > >

[PATCH v2 2/3] drm/msm/dpu: drop dpu_hw_blk_destroy function

2021-04-22 Thread Dmitry Baryshkov
The dpu_hw_blk_destroy() function is empty, so we can drop it now. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c | 13 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 2 --

[PATCH v2 1/3] drm/msm/dpu: remove unused dpu_hw_blk features

2021-04-22 Thread Dmitry Baryshkov
Remove all unused dpu_hw_blk features and functions: - dpu_hw_blk_get()/_put() and respective refcounting, - global list of all dpu_hw_blk instances, - dpu_hw_blk_ops and empty implementation inside each hw_blk subdriver. This leaves dpu_hw_blk as a placeholder with just type and index.

[PATCH v2 3/3] drm/msm/dpu: hw_blk: make dpu_hw_blk empty opaque structure

2021-04-22 Thread Dmitry Baryshkov
The code does not really use dpu_hw_blk fields, so drop them, making dpu_hw_blk empty structure. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c| 24 ---

[PATCH v2 0/3] drm/msm/dpu: simplify dpu_hw_blk handling

2021-04-22 Thread Dmitry Baryshkov
Drop most of "extra" features of dpu_hw_blk. Changes since v1: - Make dpu_hw_blk an empty structure - Split this into separate patchset Dmitry Baryshkov (3): drm/msm/dpu: remove unused dpu_hw_blk features drm/msm/dpu:

[PATCH][next] drm/amdkfd: remove redundant initialization to variable r

2021-04-22 Thread Colin King
From: Colin Ian King The variable r is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

Re: [PATCH 1/2] coda: fix reference counting in coda_file_mmap error path

2021-04-22 Thread Christian König
Hi Jan, Am 22.04.21 um 14:27 schrieb Jan Harkes: Looks good to me. I'm also maintaining an out of tree coda module build that people sometimes use, which has workarounds for differences between the various kernel versions. Do you have a reference to the corresponding mmap_region change? If

[PATCH][next] drm/amdkfd: fix uint32 variable compared to less than zero

2021-04-22 Thread Colin King
From: Colin Ian King Currently the call to kfd_process_gpuidx_from_gpuid is returning an int value and this is being assigned to a uint32_t variable gpuidx and this is being checked for a negative error return which is always going to be false. Fix this by making gpuidx an int32_t. This makes

Re: [PATCH 27/40] drm/ttm/ttm_device: Demote kernel-doc abuses

2021-04-22 Thread Christian König
Am 20.04.21 um 10:53 schrieb Daniel Vetter: On Fri, Apr 16, 2021 at 05:32:52PM +0200, Christian König wrote: Am 16.04.21 um 16:37 schrieb Lee Jones: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/ttm/ttm_device.c:42: warning: Function parameter or member

Re: [PATCH v2] drm/bridge: nwl-dsi: Get MIPI DSI controller and PHY ready in ->mode_set()

2021-04-22 Thread Neil Armstrong
Hi, On 22/04/2021 11:31, Liu Ying wrote: > Hi Neil, > > On Thu, 2021-04-22 at 10:48 +0200, Neil Armstrong wrote: >> Hi, >> >> On 22/04/2021 07:14, Liu Ying wrote: >>> Some MIPI DSI panel drivers like 'raydium,rm68200' send >>> MIPI_DCS_SET_DISPLAY_ON commands in panel_funcs->prepare(), which >>>

Re: [PATCH] drm/ttm: remove special handling for non GEM drivers

2021-04-22 Thread Christian König
Zack or Roland any objections to this? There shouldn't be any functional change. Thanks, Christian. Am 19.04.21 um 11:28 schrieb Christian König: vmwgfx is the only driver actually using this. Move the handling into the driver instead. Signed-off-by: Christian König ---

[PATCH] drm/ttm: fix error handling if no BO can be swapped out v4

2021-04-22 Thread Christian König
From: Shiwu Zhang In case that all pre-allocated BOs are busy, just continue to populate BOs since likely half of system memory in total is still free. v4 (chk): fix code moved to VMWGFX as well Signed-off-by: Shiwu Zhang Reviewed-by: Christian König Signed-off-by: Christian König ---

Re: [PATCH v2 10/10] drm/amdgpu: Move dmabuf attach/detach to backend_(un)bind

2021-04-22 Thread Christian König
Am 22.04.21 um 03:30 schrieb Felix Kuehling: The dmabuf attachment should be updated by moving the SG BO to DOMAIN_CPU and back to DOMAIN_GTT. This does not necessarily invoke the populate/unpopulate callbacks. Do this in backend_bind/unbind instead. Signed-off-by: Felix Kuehling

Re: [PATCH v3] drm/ttm: fix error handling if no BO can be swapped out

2021-04-22 Thread Christian König
Am 22.04.21 um 12:25 schrieb Shiwu Zhang: In case that all pre-allocated BOs are busy, just continue to populate I'm not a native speaker of English either, but I think that should read "previously allocated". BOs since likely half of system memory in total is still free. Signed-off-by:

[PATCH] drm/mediatek: clear pending flag when cmdq packet is done.

2021-04-22 Thread Hsin-Yi Wang
From: CK Hu In cmdq mode, packet may be flushed before it is executed, so the pending flag should be cleared after cmdq packet is done. Signed-off-by: CK Hu Signed-off-by: Hsin-Yi Wang --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 56 +---

Re: [PATCH v2] drm/ttm: fix error handling if no BO can be swapped out

2021-04-22 Thread Christian König
Am 22.04.21 um 11:52 schrieb Daniel Vetter: On Thu, Apr 22, 2021 at 04:37:49PM +0800, Shiwu Zhang wrote: Signed-off-by: Shiwu Zhang Cc: sta...@vger.kernel.org or at least Fixes: tag? The code in question is only in drm-misc-next currently and won't go upstream before 5.14. Zero length

Re: [PATCH 1/2] drm: Rename DP_PSR_SELECTIVE_UPDATE to better mach eDP spec

2021-04-22 Thread Mun, Gwan-gyeong
The changed name looks more accurate to the edp 1.4b spec. Looks good to me. Reviewed-by: Gwan-gyeong Mun On Wed, 2021-04-21 at 15:02 -0700, José Roberto de Souza wrote: > DP_PSR_EN_CFG bit 5 aka "Selective Update Region Scan Line Capture > Indication" in eDP spec has a ambiguous name, so

Re: [PATCH] efifb: Check efifb_pci_dev before using it

2021-04-22 Thread Sudeep Holla
On Wed, Apr 14, 2021 at 8:20 AM Alex Deucher wrote: > > On Tue, Apr 13, 2021 at 2:37 PM Daniel Vetter wrote: > > > > On Tue, Apr 13, 2021 at 8:02 PM Alex Deucher wrote: > > > > > > On Tue, Apr 13, 2021 at 1:05 PM Kai-Heng Feng > > > wrote: > > > > > > > > On some platforms like Hyper-V and

[PATCH v3] drm/ttm: fix error handling if no BO can be swapped out

2021-04-22 Thread Shiwu Zhang
In case that all pre-allocated BOs are busy, just continue to populate BOs since likely half of system memory in total is still free. Signed-off-by: Shiwu Zhang --- drivers/gpu/drm/ttm/ttm_device.c | 2 +- drivers/gpu/drm/ttm/ttm_tt.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)

RE: [PATCH v2] drm/ttm: fix error handling if no BO can be swapped out

2021-04-22 Thread Zhang, Morris
[AMD Official Use Only - Internal Distribution Only] Alright, Thanks again! --Brs, Morris Zhang MLSE Linux ML SRDC Ext. 25147 -Original Message- From: Koenig, Christian Sent: Thursday, April 22, 2021 5:22 PM To: Zhang, Morris ; dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2]

Re: [PATCH v2] drm/ttm: fix error handling if no BO can be swapped out

2021-04-22 Thread Daniel Vetter
On Thu, Apr 22, 2021 at 04:37:49PM +0800, Shiwu Zhang wrote: > Signed-off-by: Shiwu Zhang Cc: sta...@vger.kernel.org or at least Fixes: tag? Zero length commit message for something that claims to be a bugfix is probably too short :-) -Daniel > --- > drivers/gpu/drm/ttm/ttm_device.c | 2 +- >

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Rewrite CL/CTG L-shaped memory detection

2021-04-22 Thread Daniel Vetter
On Wed, Apr 21, 2021 at 06:34:01PM +0300, Ville Syrjala wrote: > From: Ville Syrjälä > > Currently we try to detect a symmetric memory configurations > using a magic DCC2_MODIFIED_ENHANCED_DISABLE bit. That bit is > either only set on a very specific subset of machines or it > just does not

Re: [PATCH v3 1/2] drm/amd/amdgpu/amdgpu_drv.c: Replace drm_modeset_lock_all() with drm_modeset_lock_all_ctx()

2021-04-22 Thread Daniel Vetter
On Wed, Apr 21, 2021 at 01:37:15PM +0200, Fabio M. De Francesco wrote: > Replace the deprecated API with new helpers, according to the > TODO list of the DRM subsystem. > > In this first patch drm_modeset_lock_all() is replaced with > drm_modeset_lock_all_ctx(). Unlike drm_modeset_lock_all(), >

Re: [PATCH v2] drm/bridge: nwl-dsi: Get MIPI DSI controller and PHY ready in ->mode_set()

2021-04-22 Thread Liu Ying
Hi Neil, On Thu, 2021-04-22 at 10:48 +0200, Neil Armstrong wrote: > Hi, > > On 22/04/2021 07:14, Liu Ying wrote: > > Some MIPI DSI panel drivers like 'raydium,rm68200' send > > MIPI_DCS_SET_DISPLAY_ON commands in panel_funcs->prepare(), which > > requires the MIPI DSI controller and PHY to be

Re: [PATCH v2] drm/ttm: fix error handling if no BO can be swapped out

2021-04-22 Thread Christian König
Am 22.04.21 um 10:37 schrieb Shiwu Zhang: Signed-off-by: Shiwu Zhang --- drivers/gpu/drm/ttm/ttm_device.c | 2 +- drivers/gpu/drm/ttm/ttm_tt.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c

[PATCH v5 16/16] of: Add plumbing for restricted DMA pool

2021-04-22 Thread Claire Chang
If a device is not behind an IOMMU, we look up the device node and set up the restricted DMA when the restricted-dma-pool is presented. Signed-off-by: Claire Chang --- drivers/of/address.c| 25 + drivers/of/device.c | 3 +++ drivers/of/of_private.h | 5 + 3

[PATCH v5 06/16] swiotlb: Add a new get_io_tlb_mem getter

2021-04-22 Thread Claire Chang
Add a new getter, get_io_tlb_mem, to help select the io_tlb_mem struct. The restricted DMA pool is preferred if available. Signed-off-by: Claire Chang --- include/linux/swiotlb.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h

[PATCH v5 12/16] dma-direct: Add a new wrapper __dma_direct_free_pages()

2021-04-22 Thread Claire Chang
Add a new wrapper __dma_direct_free_pages() that will be useful later for swiotlb_free(). Signed-off-by: Claire Chang --- kernel/dma/direct.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index

[PATCH v5 00/16] Restricted DMA

2021-04-22 Thread Claire Chang
This series implements mitigations for lack of DMA access control on systems without an IOMMU, which could result in the DMA accessing the system memory at unexpected times and/or unexpected addresses, possibly leading to data leakage or corruption. For example, we plan to use the PCI-e bus for

[PATCH v5 07/16] swiotlb: Update is_swiotlb_buffer to add a struct device argument

2021-04-22 Thread Claire Chang
Update is_swiotlb_buffer to add a struct device argument. This will be useful later to allow for restricted DMA pool. Signed-off-by: Claire Chang --- drivers/iommu/dma-iommu.c | 12 ++-- drivers/xen/swiotlb-xen.c | 2 +- include/linux/swiotlb.h | 6 +++--- kernel/dma/direct.c

[PATCH v5 04/16] swiotlb: Add DMA_RESTRICTED_POOL

2021-04-22 Thread Claire Chang
Add a new kconfig symbol, DMA_RESTRICTED_POOL, for restricted DMA pool. Signed-off-by: Claire Chang --- kernel/dma/Kconfig | 14 ++ 1 file changed, 14 insertions(+) diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig index 77b405508743..3e961dc39634 100644 --- a/kernel/dma/Kconfig

[PATCH v5 13/16] swiotlb: Add restricted DMA alloc/free support.

2021-04-22 Thread Claire Chang
Add the functions, swiotlb_{alloc,free} to support the memory allocation from restricted DMA pool. Signed-off-by: Claire Chang --- include/linux/swiotlb.h | 4 kernel/dma/swiotlb.c| 35 +-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git

[PATCH v5 10/16] swiotlb: Move alloc_size to find_slots

2021-04-22 Thread Claire Chang
Move the maintenance of alloc_size to find_slots for better code reusability later. Signed-off-by: Claire Chang --- kernel/dma/swiotlb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 96ff36d8ec53..b7d634d7a7eb

[PATCH v5 01/16] swiotlb: Fix the type of index

2021-04-22 Thread Claire Chang
Fix the type of index from unsigned int to int since find_slots() might return -1. Fixes: 0774983bc923 ("swiotlb: refactor swiotlb_tbl_map_single") Signed-off-by: Claire Chang --- kernel/dma/swiotlb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/dma/swiotlb.c

[PATCH v5 05/16] swiotlb: Add restricted DMA pool initialization

2021-04-22 Thread Claire Chang
Add the initialization function to create restricted DMA pools from matching reserved-memory nodes. Signed-off-by: Claire Chang --- include/linux/device.h | 4 +++ include/linux/swiotlb.h | 3 +- kernel/dma/swiotlb.c| 80 + 3 files changed, 86

[PATCH v5 02/16] swiotlb: Refactor swiotlb init functions

2021-04-22 Thread Claire Chang
Add a new function, swiotlb_init_io_tlb_mem, for the io_tlb_mem struct initialization to make the code reusable. Note that we now also call set_memory_decrypted in swiotlb_init_with_tbl. Signed-off-by: Claire Chang --- kernel/dma/swiotlb.c | 51 ++-- 1

[PATCH v5 09/16] swiotlb: Bounce data from/to restricted DMA pool if available

2021-04-22 Thread Claire Chang
Regardless of swiotlb setting, the restricted DMA pool is preferred if available. The restricted DMA pools provide a basic level of protection against the DMA overwriting buffer contents at unexpected times. However, to protect against general data leakage and system memory corruption, the system

[PATCH v5 14/16] dma-direct: Allocate memory from restricted DMA pool if available

2021-04-22 Thread Claire Chang
The restricted DMA pool is preferred if available. The restricted DMA pools provide a basic level of protection against the DMA overwriting buffer contents at unexpected times. However, to protect against general data leakage and system memory corruption, the system needs to provide a way to lock

[PATCH v5 15/16] dt-bindings: of: Add restricted DMA pool

2021-04-22 Thread Claire Chang
Introduce the new compatible string, restricted-dma-pool, for restricted DMA. One can specify the address and length of the restricted DMA memory region by restricted-dma-pool in the reserved-memory node. Signed-off-by: Claire Chang --- .../reserved-memory/reserved-memory.txt | 24

[PATCH v5 08/16] swiotlb: Update is_swiotlb_active to add a struct device argument

2021-04-22 Thread Claire Chang
Update is_swiotlb_active to add a struct device argument. This will be useful later to allow for restricted DMA pool. Signed-off-by: Claire Chang --- drivers/gpu/drm/i915/gem/i915_gem_internal.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c| 2 +- drivers/pci/xen-pcifront.c

Re: [PATCH 1/2] drm/msm/dp: service only one irq_hpd if there are multiple irq_hpd pending

2021-04-22 Thread aravindh
On 2021-04-21 10:26, khs...@codeaurora.org wrote: On 2021-04-20 15:01, Stephen Boyd wrote: Quoting Kuogee Hsieh (2021-04-16 13:27:57) Some dongle may generate more than one irq_hpd events in a short period of time. This patch will treat those irq_hpd events as single one and service only one

[PATCH v5 11/16] swiotlb: Refactor swiotlb_tbl_unmap_single

2021-04-22 Thread Claire Chang
Add a new function, release_slots, to make the code reusable for supporting different bounce buffer pools, e.g. restricted DMA pool. Signed-off-by: Claire Chang --- kernel/dma/swiotlb.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git

[PATCH v5 03/16] swiotlb: Refactor swiotlb_create_debugfs

2021-04-22 Thread Claire Chang
Split the debugfs creation to make the code reusable for supporting different bounce buffer pools, e.g. restricted DMA pool. Signed-off-by: Claire Chang --- kernel/dma/swiotlb.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/kernel/dma/swiotlb.c

Re: [PATCH v2 0/9] drm: Add privacy-screen class and connector properties

2021-04-22 Thread Simon Ser
On Thursday, April 22nd, 2021 at 10:54 AM, Hans de Goede wrote: > I guess Marco was waiting for the kernel bits too land before submitting > these, > but I agree that it would probably be good to have these submitted now, we > can mark them as WIP to avoid them getting merged before the kernel

Re: [PATCH v2 0/9] drm: Add privacy-screen class and connector properties

2021-04-22 Thread Hans de Goede
Hi, On 4/22/21 10:51 AM, Simon Ser wrote: > Hi, > > On Wednesday, April 21st, 2021 at 10:47 PM, Hans de Goede > wrote: > >> There now is GNOME userspace code using the new properties: >> https://hackmd.io/@3v1n0/rkyIy3BOw > > Thanks for working on this. > > Can these patches be submitted as

Re: [PATCH v2 0/9] drm: Add privacy-screen class and connector properties

2021-04-22 Thread Simon Ser
Hi, On Wednesday, April 21st, 2021 at 10:47 PM, Hans de Goede wrote: > There now is GNOME userspace code using the new properties: > https://hackmd.io/@3v1n0/rkyIy3BOw Thanks for working on this. Can these patches be submitted as merge requests against the upstream projects? It would be nice

Re: [PATCH v2] drm/bridge: nwl-dsi: Get MIPI DSI controller and PHY ready in ->mode_set()

2021-04-22 Thread Neil Armstrong
Hi, On 22/04/2021 07:14, Liu Ying wrote: > Some MIPI DSI panel drivers like 'raydium,rm68200' send > MIPI_DCS_SET_DISPLAY_ON commands in panel_funcs->prepare(), which > requires the MIPI DSI controller and PHY to be ready beforehand. > Without this patch, the nwl-dsi driver gets the MIPI DSI

Re: [PATCH 3/3] drm: drm_connector.c: Use tabs for code indents

2021-04-22 Thread Daniel Vetter
On Wed, Apr 21, 2021 at 08:42:49PM +0100, Beatriz Martins de Carvalho wrote: > Remove space and use tabs for indent the code to follow the > Linux kernel coding conventions. > Problem found by checkpatch > > Signed-off-by: Beatriz Martins de Carvalho > Both of your patch sets applied to

Re: [PATCH V2 1/2] dt-bindings: drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 bindings

2021-04-22 Thread Jagan Teki
On Thu, Apr 22, 2021 at 4:01 AM Marek Vasut wrote: > > Add DT binding document for TI SN65DSI83 and SN65DSI84 DSI to LVDS bridge. > > Signed-off-by: Marek Vasut > Cc: Douglas Anderson > Cc: Jagan Teki > Cc: Laurent Pinchart > Cc: Linus Walleij > Cc: Rob Herring > Cc: Sam Ravnborg > Cc:

RE: [PATCH] drm/ttm: fix error handling if no BO can be swapped out

2021-04-22 Thread Zhang, Morris
[AMD Official Use Only - Internal Distribution Only] Hi Chris, Yes. I'll rework the patch. Thanks for your comments. --Brs, Morris Zhang MLSE Linux ML SRDC Ext. 25147 -Original Message- From: Koenig, Christian Sent: Wednesday, April 21, 2021 9:34 PM To: Zhang, Morris ;

Re: [PATCH V2 1/2] dt-bindings: drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 bindings

2021-04-22 Thread Neil Armstrong
On 22/04/2021 00:31, Marek Vasut wrote: > Add DT binding document for TI SN65DSI83 and SN65DSI84 DSI to LVDS bridge. > > Signed-off-by: Marek Vasut > Cc: Douglas Anderson > Cc: Jagan Teki > Cc: Laurent Pinchart > Cc: Linus Walleij > Cc: Rob Herring > Cc: Sam Ravnborg > Cc: Stephen Boyd >

[PATCH v2] drm/ttm: fix error handling if no BO can be swapped out

2021-04-22 Thread Shiwu Zhang
Signed-off-by: Shiwu Zhang --- drivers/gpu/drm/ttm/ttm_device.c | 2 +- drivers/gpu/drm/ttm/ttm_tt.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c index 1f2024164d72..5dc92b056f0a 100644 ---

Re: [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser

2021-04-22 Thread Daniel Vetter
On Wed, Apr 21, 2021 at 04:39:10PM +0200, Maarten Lankhorst wrote: > Op 21-04-2021 om 16:32 schreef Daniel Vetter: > > On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst > > wrote: > >> Fixes the following htmldocs warnings: > >> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess

Re: [PATCH 2/2] ovl: fix reference counting in ovl_mmap error path

2021-04-22 Thread Daniel Vetter
On Wed, Apr 21, 2021 at 03:20:12PM +0200, Christian König wrote: > mmap_region() now calls fput() on the vma->vm_file. > > Fix this by using vma_set_file() so it doesn't need to be > handled manually here any more. > > Signed-off-by: Christian König > Fixes: 1527f926fd04 ("mm: mmap: fix fput in

Re: [PATCH 1/2] coda: fix reference counting in coda_file_mmap error path

2021-04-22 Thread Daniel Vetter
On Wed, Apr 21, 2021 at 03:20:11PM +0200, Christian König wrote: > mmap_region() now calls fput() on the vma->vm_file. > > So we need to drop the extra reference on the coda file instead of the > host file. > > Signed-off-by: Christian König > Fixes: 1527f926fd04 ("mm: mmap: fix fput in error

Re: [PATCH v3 1/2] dt-bindings: display: bridge: Add bindings for SN65DSI83/84/85

2021-04-22 Thread Jagan Teki
On Thu, Apr 22, 2021 at 4:04 AM Marek Vasut wrote: > > On 4/8/21 4:45 PM, Jagan Teki wrote: > > On Wed, Mar 24, 2021 at 7:26 PM Claudius Heine wrote: > >> > >> Hi Jagan, > >> > >> On 2021-02-14 18:44, Jagan Teki wrote: > >>> SN65DSI83/84/85 devices are MIPI DSI to LVDS based bridge > >>>

Re: [PATCH v5] dma-buf: Add DmaBufTotal counter in meminfo

2021-04-22 Thread Mike Rapoport
On Wed, Apr 21, 2021 at 05:35:57PM +, peter.enderb...@sony.com wrote: > On 4/21/21 5:31 PM, Mike Rapoport wrote: > > On Wed, Apr 21, 2021 at 10:37:11AM +, peter.enderb...@sony.com wrote: > >> On 4/21/21 11:15 AM, Daniel Vetter wrote: > >>> We need to understand what the "correct" value is.

[PATCH RESEND] drm: bridge: adv7511: Support I2S IEC958 encoded PCM format

2021-04-22 Thread Sia Jee Heng
Support IEC958 encoded PCM format for ADV7511 so that ADV7511 HDMI audio driver can accept the IEC958 data from the I2S input. Signed-off-by: Sia Jee Heng Reviewed-by: Robert Foss --- drivers/gpu/drm/bridge/adv7511/adv7511.h | 1 + drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 6