[Freedreno] [PATCH] drm/msm/dp: Add missing drm_device backpointer

2021-06-24 Thread Bjorn Andersson
'6cba3fe43341 ("drm/dp: Add backpointer to drm_device in drm_dp_aux")' introduced a mandator drm_device backpointer in struct drm_dp_aux, but missed the msm DP driver. Fix this. Fixes: 6cba3fe43341 ("drm/dp: Add backpointer to drm_device in drm_dp_aux") Signed-off-by: Bjorn Andersson --- drivers

Re: [Freedreno] [PATCH 11/17] drm/msm/dpu: drop src_split and multirect check from dpu_crtc_atomic_check

2021-06-24 Thread kernel test robot
Hi Dmitry, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20210624] [also build test WARNING on v5.13-rc7] [cannot apply to linus/master v5.13-rc7 v5.13-rc6 v5.13-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [Freedreno] [PATCH v5 3/5] drm/msm: Improve the a6xx page fault handler

2021-06-24 Thread Bjorn Andersson
On Thu 10 Jun 16:44 CDT 2021, Rob Clark wrote: [..] > diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c > index 50d881794758..6975b95c3c29 100644 > --- a/drivers/gpu/drm/msm/msm_iommu.c > +++ b/drivers/gpu/drm/msm/msm_iommu.c > @@ -211,8 +211,17 @@ static int msm_fault_

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

2021-06-24 Thread Rob Herring
On Thu, Jun 17, 2021 at 10:43:34AM -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 > Reviewed-by: Laurent Pinchart > --- > .../devicetree/bindings/display/m

[Freedreno] [PATCH 17/17] drm/msm/dpu: switch into using virtual planes

2021-06-24 Thread Dmitry Baryshkov
This is a compile time #if for now, to be converted into proper module parameter (or dropped if there is no more need for that). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/msm/dis

[Freedreno] [PATCH 16/17] drm/msm/dpu: add support for virtualized planes

2021-06-24 Thread Dmitry Baryshkov
Add support for registering unified (virtualized) planes, allowing SSPP block to be allocated at runtime, during atomic_check. This allows one userspace to use any plane without caring if it supports scaler or YUV formats. The kernel space will select the appropriate SSPP pipe or return an error if

[Freedreno] [PATCH 15/17] drm/msm/dpu: add support for SSPP allocation to RM

2021-06-24 Thread Dmitry Baryshkov
Add support for handling and allocting SSPP blocks through the resource manager. Handling code is not converted to use it though. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 10 +++ drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 + drivers/gpu/drm/msm/disp

[Freedreno] [PATCH 14/17] drm/msm/dpu: do not limit the zpos property

2021-06-24 Thread Dmitry Baryshkov
Stop limiting zpos property values, we use normalized_zpos anyway. And nothing stops userspace from assigning several planes to a single zpos (it is a userspace bug, but the kernel is forgiving about it). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 11 +---

[Freedreno] [PATCH 11/17] drm/msm/dpu: drop src_split and multirect check from dpu_crtc_atomic_check

2021-06-24 Thread Dmitry Baryshkov
Neither source split nor multirect are properly supported at this moment. Both of these checks depend on zpos being equal for several planes (which is a clear userspace bug). Drop these checks to simplify dpu_crtc_atomic_check(). The actual support for either of these features is not removed from t

[Freedreno] [PATCH 10/17] drm/msm/dpu: simplify colorspace conversion setup

2021-06-24 Thread Dmitry Baryshkov
Simplify code surrounding CSC table setup. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 2 +- drive

[Freedreno] [PATCH 13/17] drm/msm/dpu: simplify DPU_SSPP features checks

2021-06-24 Thread Dmitry Baryshkov
Add DPU_SSPP_CSC_ANY denoting any CSC block. As we are at it, rewrite DPU_SSPP_SCALER (any scaler) to use BIT(x) instead of hand-coded bitshifts. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 16 +++- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c |

[Freedreno] [PATCH 12/17] drm/msm/dpu: add list of supported formats to the DPU caps

2021-06-24 Thread Dmitry Baryshkov
As we are going to add virtual planes, add the list of supported formats to the hw catalog entry. It will be used to setup universal planes, with later selecting a pipe depending on whether the YUV format is used for the framebuffer. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/d

[Freedreno] [PATCH 09/17] drm/msm/dpu: rip out debugfs support from dpu_plane

2021-06-24 Thread Dmitry Baryshkov
In preparations of virtualizing the dpu_plane rip out debugfs support from dpu_plane (as it is mostly used to expose plane's pipe registers). Also move disable_danger file to danger/ debugfs subdir where it belongs. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c |

[Freedreno] [PATCH 07/17] drm/msm/dpu: don't cache pipe->cap->features in dpu_plane

2021-06-24 Thread Dmitry Baryshkov
Do not cache hw_pipe's features in dpu_plane. Use pdpu->pipe_hw->cap->features directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/dri

[Freedreno] [PATCH 08/17] drm/msm/dpu: don't cache pipe->cap->sblk in dpu_plane

2021-06-24 Thread Dmitry Baryshkov
Do not cache hw_pipe's sblk in dpu_plane. Use pdpu->pipe_hw->cap->sblk directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/d

[Freedreno] [PATCH 06/17] drm/msm/dpu: move dpu_hw_pipe_cfg out of struct dpu_plane

2021-06-24 Thread Dmitry Baryshkov
struct dpu_hw_pipe_cfg represents an interim state during atomic update/color fill, so move it out of struct dpu_plane. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 91 --- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/driv

[Freedreno] [PATCH 03/17] drm/msm/dpu: drop pipe_name from struct dpu_plane

2021-06-24 Thread Dmitry Baryshkov
Use plane->name instead of artificial pipe_name. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index

[Freedreno] [PATCH 05/17] drm/msm/dpu: rip out master planes support

2021-06-24 Thread Dmitry Baryshkov
Master/virtual planes were used for multirect support. In preparation to reworking DPU planes, drop support for master planes (which was not used anyway). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 11 +--- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- d

[Freedreno] [PATCH 04/17] drm/msm/dpu: remove stage_cfg from struct dpu_crtc

2021-06-24 Thread Dmitry Baryshkov
The stage_cfg is not used outside of _dpu_crtc_blend_setup(), so remove the temporary config from global struct. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 11 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 2 -- 2 files changed, 6 insertions(+), 7 de

[Freedreno] [PATCH 02/17] drm/msm/dpu: remove pipe_qos_cfg from struct dpu_plane

2021-06-24 Thread Dmitry Baryshkov
The pipe_qos_cfg is used only in _dpu_plane_set_qos_ctrl(), so remove it from the dpu_plane struct and allocate it on stack when necessary. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 30 --- 1 file changed, 16 insertions(+), 14 deletions(-

[Freedreno] [PATCH 01/17] drm/msm/dpu: move LUT levels out of QOS config

2021-06-24 Thread Dmitry Baryshkov
LUT levels are setup outside of setup_qos_ctrl, so remove them from the struct dpu_hw_pipe_qos_cfg. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 15 --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 16 ++-- drivers/gpu/drm/msm/disp/dp

[Freedreno] [PATCH 00/17] drm/msm/dpu: switch dpu_plane to be virtual

2021-06-24 Thread Dmitry Baryshkov
As discussed on IRC, change dpu_plane implementation to be virtual: register unified planes and select backing SSPP block at runtime. In future this would allow implementing multirect (or wide planes) in a proper way, without requiring zpos hacks or additional userspace handling. The last patch ad

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

2021-06-24 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