[Freedreno] [PATCH] drm/msm/dpu: Avoid ABBA deadlock between IRQ modules

2021-06-09 Thread Bjorn Andersson
Handling of the interrupt callback lists is done in dpu_core_irq.c, under the "cb_lock" spinlock. When these operations results in the need for enableing or disabling the IRQ in the hardware the code jumps to dpu_hw_interrupts.c, which protects its operations with "irq_lock" spinlock. When an inte

Re: [Freedreno] [PATCH v3 2/3] dt-bindings: msm: dsi: document phy-type property for 7nm dsi phy

2021-06-09 Thread Rob Herring
On Tue, Jun 08, 2021 at 03:53:28PM -0400, Jonathan Marek wrote: > Document a new phy-type property which will be used to determine whether > the phy should operate in D-PHY or C-PHY mode. > > Signed-off-by: Jonathan Marek > --- > .../devicetree/bindings/display/msm/dsi-phy-7nm.yaml | 4

Re: [Freedreno] [PATCH v4 6/6] drm/msm: devcoredump iommu fault support

2021-06-09 Thread Rob Clark
On Tue, Jun 8, 2021 at 8:20 AM Jordan Crouse wrote: > > On Tue, Jun 01, 2021 at 03:47:25PM -0700, Rob Clark wrote: > > From: Rob Clark > > > > Wire up support to stall the SMMU on iova fault, and collect a devcore- > > dump snapshot for easier debugging of faults. > > > > Currently this is a6xx-o

Re: [Freedreno] [PATCH v4 5/6] drm/msm: Add crashdump support for stalled SMMU

2021-06-09 Thread Rob Clark
On Tue, Jun 8, 2021 at 8:12 AM Jordan Crouse wrote: > > On Tue, Jun 01, 2021 at 03:47:24PM -0700, Rob Clark wrote: > > From: Rob Clark > > > > For collecting devcoredumps with the SMMU stalled after an iova fault, > > we need to skip the parts of the GPU state which are normally collected > > wit

[Freedreno] [RFC 6/6] drm/msm/kms: drop set_encoder_mode callback

2021-06-09 Thread Dmitry Baryshkov
set_encoder_mode callback is completely unused now. Drop it from msm_kms_func(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_kms.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h index 086a2d59b8c8..9484e8b62630

[Freedreno] [RFC 4/6] drm/msm/dp: stop calling set_encoder_mode callback

2021-06-09 Thread Dmitry Baryshkov
None of the display drivers now implement set_encoder_mode callback. Stop calling it from the modeset init code. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/d

[Freedreno] [RFC 5/6] drm/msm/dsi: stop calling set_encoder_mode callback

2021-06-09 Thread Dmitry Baryshkov
None of the display drivers now implement set_encoder_mode callback. Stop calling it from the modeset init code. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.c | 2 -- drivers/gpu/drm/msm/dsi/dsi.h | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 12 ---

[Freedreno] [RFC 2/6] drm/msm/dpu: support setting up two independent DSI connectors

2021-06-09 Thread Dmitry Baryshkov
Move setting up encoders from set_encoder_mode to _dpu_kms_initialize_dsi() / _dpu_kms_initialize_displayport(). This allows us to support not only "single DSI" and "dual DSI" but also "two independent DSI" configurations. In future this would also help adding support for multiple DP connectors. S

[Freedreno] [RFC 3/6] drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init

2021-06-09 Thread Dmitry Baryshkov
Move a call to mdp5_encoder_set_intf_mode() after msm_dsi_modeset_init(), removing set_encoder_mode callback. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/mdp5

[Freedreno] [RFC 1/6] drm/msm/dsi: add two helper functions

2021-06-09 Thread Dmitry Baryshkov
Add two helper functions to be used by display drivers for setting up encoders. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.c | 6 ++ drivers/gpu/drm/msm/dsi/dsi_manager.c | 14 ++ drivers/gpu/drm/msm/msm_drv.h | 12 ++-- 3 files chang

[Freedreno] [RFC 0/6] drm/msm/dpu: add support for idependent DSI config

2021-06-09 Thread Dmitry Baryshkov
This patchseries adds support for independent DSI config to DPU1 display subdriver. This results in ability to drop one of msm_kms_funcs callbacks. This code was tested on RB5 (dpu, dsi). Neither DP nor MDP5 changes were tested (thus the RFC tag). ___

[Freedreno] [PATCH] drm/msm/dsi: do not enable PHYs when called for the slave DSI interface

2021-06-09 Thread Dmitry Baryshkov
Move the call to dsi_mgr_phy_enable after checking whether the DSI interface is slave, so that PHY enablement happens together with the host enablement. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_manager.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff -

[Freedreno] [PATCH v4] drm/msm/dsi: add continuous clock support for 7nm PHY

2021-06-09 Thread Dmitry Baryshkov
Unlike previous generations, 7nm PHYs are required to collaborate with the host for conitnuos clock mode. Add changes neccessary to enable continuous clock mode in the 7nm DSI PHYs. Signed-off-by: Dmitry Baryshkov --- Chanes since v3: - Invert the DSI_LANE_CTRL_HS_REQ_SEL_PHY bit logic, as noted

Re: [Freedreno] [PATCH v3 1/3] dt-bindings: msm: dsi: add missing 7nm bindings

2021-06-09 Thread Rob Herring
On Tue, 08 Jun 2021 15:53:27 -0400, Jonathan Marek wrote: > These got lost when going from .txt to .yaml bindings, add them back. > > Signed-off-by: Jonathan Marek > --- > .../bindings/display/msm/dsi-phy-7nm.yaml | 66 +++ > 1 file changed, 66 insertions(+) > create mode 10

Re: [Freedreno] [PATCH] drm/msm/dsi: Stash away calculated vco frequency on recalc

2021-06-09 Thread Dmitry Baryshkov
On 09/06/2021 01:11, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2021-06-08 14:41:21) Hi Stephen, On 08/06/2021 22:55, Stephen Boyd wrote: A problem was reported on CoachZ devices where the display wouldn't come up, or it would be distorted. It turns out that the PLL code here wasn't getting

[Freedreno] [PATCH -next v2] drm/msm: Use list_move_tail instead of list_del/list_add_tail in msm_gem.c

2021-06-09 Thread Baokun Li
Using list_move_tail() instead of list_del() + list_add_tail() in msm_gem.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li --- V1->V2: CC mailist drivers/gpu/drm/msm/msm_gem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drive

[Freedreno] [PATCH 7/9] drm/xen: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective xen functions are being removed. The file_operations structure fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: Thomas Zimmerm

[Freedreno] [PATCH 4/9] drm/msm: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective msm functions are being removed. The file_operations structure fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: Thomas Zimmerm

[Freedreno] [PATCH 9/9] drm: Update documentation and TODO of gem_prime_mmap hook

2021-06-09 Thread Thomas Zimmermann
The hook gem_prime_mmap in struct drm_driver is deprecated. Document the new requirements. Signed-off-by: Thomas Zimmermann --- Documentation/gpu/todo.rst | 11 --- include/drm/drm_drv.h | 11 +++ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Documentation/

[Freedreno] [PATCH 1/9] drm/etnaviv: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective etnaviv functions are being removed. The file_operations structure fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: Thomas Zim

[Freedreno] [PATCH 6/9] drm/vgem: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective vgem functions are being removed. The file_operations structure vgem_driver_fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: T

[Freedreno] [PATCH 8/9] drm/rockchip: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective rockchip functions are being removed. The file_operations structure fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: Thomas Zi

[Freedreno] [PATCH 2/9] drm/exynox: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective exynos functions are being removed. The file_operations structure exynos_drm_driver_fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-o

[Freedreno] [PATCH 3/9] drm/mediatek: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective mediatek functions are being removed. The file_operations structure fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: Thomas Zi

[Freedreno] [PATCH 0/9] drm: Implement gem_prime_mmap with drm_gem_prime_mmap()

2021-06-09 Thread Thomas Zimmermann
Replace all remaining implementations of struct drm_driver.gem_prime_mmap with use drm_gem_prime_mmap(). For each affected driver, put the mmap code into struct drm_gem_object_funcs.mmap. With the latter change in place, create struct file_operations via DEFINE_DRM_GEM_FOPS(). As next steps, remai

[Freedreno] [PATCH 5/9] drm/qxl: Remove empty qxl_gem_prime_mmap()

2021-06-09 Thread Thomas Zimmermann
The function qxl_gem_prime_mmap() returns an error. The two callers of gem_prime_mmap are drm_fbdev_fb_mmap() and drm_gem_dmabuf_mmap(), which both already handle NULL-callbacks with an error code. So clear gem_prime_mmap in qxl and remove qxl_gem_prime_mmap(). Signed-off-by: Thomas Zimmermann --