Re: [Freedreno] [PATCH v2] drm/msm/dp: add fail safe mode outside of event_mutex context

2022-04-11 Thread Stephen Boyd
Quoting Kuogee Hsieh (2022-04-08 14:04:54) > There is possible circular locking dependency detected on event_mutex > (see below logs). This is due to set fail safe mode is done at > dp_panel_read_sink_caps() within event_mutex scope. To break this > possible circular locking, this patch move

Re: [Freedreno] [PATCH] drm/msm/dp: stop event kernel thread when DP unbind

2022-04-11 Thread Stephen Boyd
Quoting Abhinav Kumar (2022-04-11 17:29:17) > > > On 4/11/2022 5:22 PM, Dmitry Baryshkov wrote: > > On 12/04/2022 03:21, Stephen Boyd wrote: > >> Quoting Kuogee Hsieh (2022-04-11 17:08:49) > >>> -   kthread_run(hpd_event_thread, dp_priv, "dp_hpd_handler"); > >>> +   dp_priv->ev_tsk =

Re: [Freedreno] [Intel-gfx] [PATCH v5 04/10] drm/hdcp: Expand HDCP helper library for enable/disable/check

2022-04-11 Thread kernel test robot
Hi Sean, I love your patch! Yet something to improve: [auto build test ERROR on drm-tip/drm-tip] [also build test ERROR on v5.18-rc2 next-20220411] [cannot apply to drm/drm-next drm-intel/for-linux-next robh/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note

Re: [Freedreno] [PATCH v5 10/10] drm/msm: Implement HDCP 1.x using the new drm HDCP helpers

2022-04-11 Thread kernel test robot
Hi Sean, I love your patch! Yet something to improve: [auto build test ERROR on drm-tip/drm-tip] [also build test ERROR on v5.18-rc2 next-20220411] [cannot apply to drm/drm-next drm-intel/for-linux-next robh/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note

Re: [Freedreno] [PATCH] drm/msm/dp: stop event kernel thread when DP unbind

2022-04-11 Thread Abhinav Kumar
On 4/11/2022 5:22 PM, Dmitry Baryshkov wrote: On 12/04/2022 03:21, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-04-11 17:08:49) Current DP driver implementation, event thread is kept running after DP display is unbind. This patch fix this problem by disabling DP irq and stop event thread

Re: [Freedreno] [PATCH] drm/msm/dp: stop event kernel thread when DP unbind

2022-04-11 Thread Dmitry Baryshkov
On 12/04/2022 03:21, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-04-11 17:08:49) Current DP driver implementation, event thread is kept running after DP display is unbind. This patch fix this problem by disabling DP irq and stop event thread to exit gracefully at dp_display_unbind(). Fixes:

Re: [Freedreno] [PATCH] drm/msm/dp: stop event kernel thread when DP unbind

2022-04-11 Thread Stephen Boyd
Quoting Kuogee Hsieh (2022-04-11 17:08:49) > Current DP driver implementation, event thread is kept running > after DP display is unbind. This patch fix this problem by disabling > DP irq and stop event thread to exit gracefully at dp_display_unbind(). > > Fixes: e91e3065a806 ("drm/msm/dp: Add DP

Re: [Freedreno] [PATCH v2] drm/msm: properly add and remove internal bridges

2022-04-11 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-04-11 16:49:53) > Add calls to drm_bridge_add()/drm_bridge_remove() DRM bridges created by > the driver. This fixes the following warning. > > WARNING: CPU: 0 PID: 1 at kernel/locking/mutex.c:579 __mutex_lock+0x840/0x9f4 > DEBUG_LOCKS_WARN_ON(lock->magic != lock) >

[Freedreno] [PATCH] drm/msm/dp: stop event kernel thread when DP unbind

2022-04-11 Thread Kuogee Hsieh
Current DP driver implementation, event thread is kept running after DP display is unbind. This patch fix this problem by disabling DP irq and stop event thread to exit gracefully at dp_display_unbind(). Fixes: e91e3065a806 ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets")

[Freedreno] [PATCH v2] drm/msm: properly add and remove internal bridges

2022-04-11 Thread Dmitry Baryshkov
Add calls to drm_bridge_add()/drm_bridge_remove() DRM bridges created by the driver. This fixes the following warning. WARNING: CPU: 0 PID: 1 at kernel/locking/mutex.c:579 __mutex_lock+0x840/0x9f4 DEBUG_LOCKS_WARN_ON(lock->magic != lock) Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not

[Freedreno] [PATCH v4 10/10] drm/msm: Add a way for userspace to allocate GPU iova

2022-04-11 Thread Rob Clark
From: Rob Clark The motivation at this point is mainly native userspace mesa driver in a VM guest. The one remaining synchronous "hotpath" is buffer allocation, because guest needs to wait to know the bo's iova before it can start emitting cmdstream/state that references the new bo. By

[Freedreno] [PATCH v4 09/10] drm/msm/gem: Add fenced vma unpin

2022-04-11 Thread Rob Clark
From: Rob Clark With userspace allocated iova (next patch), we can have a race condition where userspace observes the fence completion and deletes the vma before retire_submit() gets around to unpinning the vma. To handle this, add a fenced unpin which drops the refcount but tracks the fence,

[Freedreno] [PATCH v4 08/10] drm/msm/gem: Split vma lookup and pin

2022-04-11 Thread Rob Clark
From: Rob Clark This way we only lookup vma once per object per submit, for both the submit and retire path. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c| 60 +--- drivers/gpu/drm/msm/msm_gem.h| 9 +++--

[Freedreno] [PATCH v4 07/10] drm/msm/gem: Rework vma lookup and pin

2022-04-11 Thread Rob Clark
From: Rob Clark Combines duplicate vma lookup in the get_and_pin path. Signed-off-by: Rob Clark Reviewed-by: Dmitry Osipenko --- drivers/gpu/drm/msm/msm_gem.c | 50 ++- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git

[Freedreno] [PATCH v4 06/10] drm/msm: Drop msm_gem_iova()

2022-04-11 Thread Rob Clark
From: Rob Clark There was only a single user, which could just as easily stash the iova when pinning. v2: fix prepare->prepare->cleanup->cleanup sequences Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_fb.c | 20 ++--

[Freedreno] [PATCH v4 05/10] drm/msm/gem: Drop PAGE_SHIFT for address space mm

2022-04-11 Thread Rob Clark
From: Rob Clark Get rid of all the unnecessary conversion between address/size and page offsets. It just confuses things. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +- drivers/gpu/drm/msm/msm_gem.c | 5 ++---

[Freedreno] [PATCH v4 04/10] drm/msm/gem: Split out inuse helper

2022-04-11 Thread Rob Clark
From: Rob Clark Prep for a following patch, where it gets a bit more complicated. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 2 +- drivers/gpu/drm/msm/msm_gem.h | 1 + drivers/gpu/drm/msm/msm_gem_vma.c | 9 +++-- 3 files changed, 9 insertions(+), 3 deletions(-)

[Freedreno] [PATCH v4 02/10] drm/msm/gpu: Drop duplicate fence counter

2022-04-11 Thread Rob Clark
From: Rob Clark The ring seqno counter duplicates the fence-context last_fence counter. They end up getting incremented in lock-step, on the same scheduler thread, but the split just makes things less obvious. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +-

[Freedreno] [PATCH v4 03/10] drm/msm/gem: Convert some missed GEM_WARN_ON()s

2022-04-11 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_vma.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c index f914ddbaea89..64906594fc65 100644 ---

[Freedreno] [PATCH v4 01/10] drm/msm/gem: Move prototypes

2022-04-11 Thread Rob Clark
From: Rob Clark These belong more cleanly in the gem header. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.h | 23 --- drivers/gpu/drm/msm/msm_gem.h | 22 ++ 2 files changed, 22 insertions(+), 23 deletions(-)

[Freedreno] [PATCH v4 00/10] drm/msm: Userspace allocated GPU addresses

2022-04-11 Thread Rob Clark
From: Rob Clark The first six paches are various cleanups and simplifications. The next two get rid of redundant vma lookups in the submit and retire paths. Following that, fenced vma lets us indicate a fence value following which the vma is no longer used, which is needed because otherwise

[Freedreno] [PATCH v5 10/10] drm/msm: Implement HDCP 1.x using the new drm HDCP helpers

2022-04-11 Thread Sean Paul
From: Sean Paul This patch adds HDCP 1.x support to msm DP connectors using the new HDCP helpers. Cc: Stephen Boyd Cc: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-15-s...@poorly.run #v1 Link:

[Freedreno] [PATCH v5 09/10] arm64: dts: qcom: sc7180: Add support for HDCP in dp-controller

2022-04-11 Thread Sean Paul
From: Sean Paul This patch adds the register ranges required for HDCP key injection and HDCP TrustZone interaction as described in the dt-bindings for the sc7180 dp controller. Now that these are supported, change the compatible string to "dp-hdcp". Signed-off-by: Sean Paul Link:

[Freedreno] [PATCH v5 08/10] dt-bindings: msm/dp: Add bindings for HDCP registers

2022-04-11 Thread Sean Paul
From: Sean Paul This patch adds the bindings for the MSM DisplayPort HDCP registers which are required to write the HDCP key into the display controller as well as the registers to enable HDCP authentication/key exchange/encryption. We'll use a new compatible string for this since the fields

[Freedreno] [PATCH v5 06/10] drm/i915/hdcp: Retain hdcp_capable return codes

2022-04-11 Thread Sean Paul
From: Sean Paul The shim functions return error codes, but they are discarded in intel_hdcp.c. This patch plumbs the return codes through so they are properly handled. Acked-by: Jani Nikula Signed-off-by: Sean Paul Link:

[Freedreno] [PATCH v5 05/10] drm/i915/hdcp: Consolidate HDCP setup/state cache

2022-04-11 Thread Sean Paul
From: Sean Paul Stick all of the setup for HDCP into a dedicated function. No functional change, but this will facilitate moving HDCP logic into helpers. Acked-by: Jani Nikula Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-6-s...@poorly.run

[Freedreno] [PATCH v5 04/10] drm/hdcp: Expand HDCP helper library for enable/disable/check

2022-04-11 Thread Sean Paul
From: Sean Paul This patch expands upon the HDCP helper library to manage HDCP enable, disable, and check. Previous to this patch, the majority of the state management and sink interaction is tucked inside the Intel driver with the understanding that once a new platform supported HDCP we could

[Freedreno] [PATCH v5 03/10] drm/hdcp: Update property value on content type and user changes

2022-04-11 Thread Sean Paul
From: Sean Paul This patch updates the connector's property value in 2 cases which were previously missed: 1- Content type changes. The value should revert back to DESIRED from ENABLED in case the driver must re-authenticate the link due to the new content type. 2- Userspace sets value

[Freedreno] [PATCH v5 02/10] drm/hdcp: Avoid changing crtc state in hdcp atomic check

2022-04-11 Thread Sean Paul
From: Sean Paul Instead of forcing a modeset in the hdcp atomic check, simply return true if the content protection value is changing and let the driver decide whether a modeset is required or not. Acked-by: Jani Nikula Signed-off-by: Sean Paul Link:

[Freedreno] [PATCH v5 01/10] drm/hdcp: Add drm_hdcp_atomic_check()

2022-04-11 Thread Sean Paul
From: Sean Paul This patch moves the hdcp atomic check from i915 to drm_hdcp so other drivers can use it. No functional changes, just cleaned up some of the code when moving it over. Acked-by: Jani Nikula Acked-by: Jani Nikula Reviewed-by: Abhinav Kumar Signed-off-by: Sean Paul Link:

[Freedreno] [PATCH v5 00/10] drm/hdcp: Pull HDCP auth/exchange/check into helpers

2022-04-11 Thread Sean Paul
From: Sean Paul Rebased set from November. Fixed a nit from Stephen in the msm patch and moved hdcp registers into the trogdor dtsi file to avoid differences with sc7180-based windows devices. The set is 4 patches lighter since some of the changes were accepted into msm. I'm still waiting for

Re: [Freedreno] [PATCH] drm/msm/gpu: Avoid -Wunused-function with !CONFIG_PM_SLEEP

2022-04-11 Thread Nathan Chancellor
On Mon, Apr 11, 2022 at 03:53:01AM +0300, Dmitry Baryshkov wrote: > On 30/03/2022 21:05, Nathan Chancellor wrote: > > When building with CONFIG_PM=y and CONFIG_PM_SLEEP=n (such as ARCH=riscv > > allmodconfig), the following warnings/errors occur: > > > >

[Freedreno] [PATCH v2] drm/msm/gpu: Avoid -Wunused-function with !CONFIG_PM_SLEEP

2022-04-11 Thread Nathan Chancellor
When building with CONFIG_PM=y and CONFIG_PM_SLEEP=n (such as ARCH=riscv allmodconfig), the following warnings/errors occur: drivers/gpu/drm/msm/adreno/adreno_device.c:679:12: error: 'adreno_system_resume' defined but not used [-Werror=unused-function] 679 | static int

[Freedreno] [PATCH v8 2/2] drm/msm/disp/dpu1: add inline rotation support for sc7280

2022-04-11 Thread Vinod Polimera
- Some DPU versions support inline rot90. It is supported only for limited amount of UBWC formats. - There are two versions of inline rotators, v1 (present on sm8250 and sm7250) and v2 (sc7280). These versions differ in the list of supported formats and in the scaler possibilities.

[Freedreno] [PATCH v8 1/2] drm/msm/disp/dpu1: add inline function to validate format support

2022-04-11 Thread Vinod Polimera
Check if the dpu format is supported or not using dpu_find_format. Co-developed-by: Kalyan Thota Signed-off-by: Kalyan Thota Signed-off-by: Vinod Polimera --- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h | 22 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 10 +++---

Re: [Freedreno] [PATCH] drm/msm: properly add and remove internal bridges

2022-04-11 Thread kernel test robot
Hi Dmitry, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on v5.18-rc2 next-20220411] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented