Re: [Freedreno] [PATCH v3 17/21] drm/msm/dpu: Describe TEAR interrupt registers for DSI interfaces

2023-04-26 Thread Marijn Suijten
On 2023-04-26 03:05:12, Dmitry Baryshkov wrote: > On 26/04/2023 02:06, Marijn Suijten wrote: > > All SoCs since DPU 5.0.0 have the tear interrupt registers moved out of > > the PINGPONG block and into the INTF block. Wire up the IRQ register > > masks in the interrupt table for enabling, reading a

Re: [Freedreno] [PATCH v3 17/21] drm/msm/dpu: Describe TEAR interrupt registers for DSI interfaces

2023-04-26 Thread Dmitry Baryshkov
On 26/04/2023 10:16, Marijn Suijten wrote: On 2023-04-26 03:05:12, Dmitry Baryshkov wrote: On 26/04/2023 02:06, Marijn Suijten wrote: All SoCs since DPU 5.0.0 have the tear interrupt registers moved out of the PINGPONG block and into the INTF block. Wire up the IRQ register masks in the interr

Re: [Freedreno] [PATCH v1 1/5] drm/msm/dpu: add support for DSC encoder v1.2 engine

2023-04-26 Thread Kuogee Hsieh
On 4/20/2023 4:54 PM, Dmitry Baryshkov wrote: On 21/04/2023 02:25, Kuogee Hsieh wrote: Add support for DSC 1.2 by providing the necessary hooks to program the DPU DSC 1.2 encoder. Signed-off-by: Kuogee Hsieh ---   drivers/gpu/drm/msm/Makefile   |   1 +   drivers/gpu/drm/msm/d

Re: [Freedreno] [PATCH v3 06/21] drm/msm/dpu: Use V2 DITHER PINGPONG sub-block in SM8[34]50/SC8280XP

2023-04-26 Thread Abhinav Kumar
On 4/25/2023 4:05 PM, Marijn Suijten wrote: According to downstream sources this DITHER sub-block sits at an offset of 0xe0 with version 0x2. The PP_BLK_DITHER macro is _not_ used as downstream still says the size of the PINGPONG block is 0xd4 and not 0. the PINGPONG block size is 0x0

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

2023-04-26 Thread Doug Anderson
Hi, On Wed, Apr 19, 2023 at 8:43 AM Mark Yacoub wrote: > > Hi all, > This is v10 of the HDCP patches. The patches are authored by Sean Paul. > I rebased and addressed the review comments in v6-v10. > > Main change in v10 is handling the kernel test bot warnings. > > Patches 1-4 focus on moving th

Re: [Freedreno] [PATCH 1/3] drm/msm/dpu: drop SSPP's SRC subblock

2023-04-26 Thread Jeykumar Sankaran
On 4/21/2023 5:08 PM, Dmitry Baryshkov wrote: The src_blk declares a lame copy of main SSPP register space. It's offset is always 0. It's length has been fixed to 0x150, while SSPP's length is now correct. Drop the src_blk and access SSPP registers without additional subblock lookup. Signed-o

Re: [Freedreno] [PATCH 2/3] drm/msm/dpu: access QSEED registers directly

2023-04-26 Thread Jeykumar Sankaran
On 4/21/2023 5:08 PM, Dmitry Baryshkov wrote: Stop using _sspp_subblk_offset() to get offset of the scaler_blk. Inline this function and use ctx->cap->sblk->scaler_blk.base directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 27 +++--

Re: [Freedreno] [PATCH 3/3] drm/msm/dpu: access CSC/CSC10 registers directly

2023-04-26 Thread Jeykumar Sankaran
On 4/21/2023 5:08 PM, Dmitry Baryshkov wrote: Stop using _sspp_subblk_offset() to get offset of the csc_blk. Inline this function and use ctx->cap->sblk->csc_blk.base directly. As this was the last user, drop _sspp_subblk_offset() too. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/m

[Freedreno] [PATCH] drm/syncobj: Add deadline support for syncobj waits

2023-04-26 Thread Rob Clark
From: Rob Clark Add a new flag to let userspace provide a deadline as a hint for syncobj and timeline waits. This gives a hint to the driver signaling the backing fences about how soon userspace needs it to compete work, so it can addjust GPU frequency accordingly. An immediate deadline can be

Re: [Freedreno] [PATCH v3 06/21] drm/msm/dpu: Use V2 DITHER PINGPONG sub-block in SM8[34]50/SC8280XP

2023-04-26 Thread Marijn Suijten
On 2023-04-26 09:24:19, Abhinav Kumar wrote: > > > On 4/25/2023 4:05 PM, Marijn Suijten wrote: > > According to downstream sources this DITHER sub-block sits at an offset > > of 0xe0 with version 0x2. The PP_BLK_DITHER macro is _not_ used as > > downstream still says the size of the PINGPONG

Re: [Freedreno] [PATCH v3 06/21] drm/msm/dpu: Use V2 DITHER PINGPONG sub-block in SM8[34]50/SC8280XP

2023-04-26 Thread Abhinav Kumar
On 4/26/2023 12:08 PM, Marijn Suijten wrote: On 2023-04-26 09:24:19, Abhinav Kumar wrote: On 4/25/2023 4:05 PM, Marijn Suijten wrote: According to downstream sources this DITHER sub-block sits at an offset of 0xe0 with version 0x2. The PP_BLK_DITHER macro is _not_ used as downstream s

[Freedreno] [PATCH 1/4] drm/msm/dpu: remove DPU_DSPP_GC handling in dspp flush

2023-04-26 Thread Abhinav Kumar
Gamma correction blocks (GC) are not used today so lets remove the usage of DPU_DSPP_GC in the dspp flush to make it easier to remove GC from the catalog. We can add this back when GC is properly supported in DPU with one of the standard DRM properties. Signed-off-by: Abhinav Kumar Reviewed-by:

[Freedreno] [PATCH 2/4] drm/msm/dpu: remove DPU_DSPP_IGC handling in dspp flush

2023-04-26 Thread Abhinav Kumar
Inverse gamma correction blocks (IGC) are not used today so lets remove the usage of DPU_DSPP_IGC in the dspp flush to make it easier to remove IGC from the catalog. We can add this back when IGC is properly supported in DPU with one of the standard DRM properties. Signed-off-by: Abhinav Kumar -

[Freedreno] [PATCH 4/4] drm/msm/dpu: drop DSPP_MSM8998_MASK from hw catalog

2023-04-26 Thread Abhinav Kumar
Since GC and IGC masks have now been dropped DSPP_MSM8998_MASK is same as DSPP_SC7180_MASK. Since DSPP_SC7180_MASK is used more than DSPP_MSM8998_MASK, lets drop the latter. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 4 ++-- drivers/gpu/drm/msm/dis

[Freedreno] [PATCH 3/4] drm/msm/dpu: remove GC related code from dpu catalog

2023-04-26 Thread Abhinav Kumar
Since Gamma Correction (GC) block is currently unused, drop related code from the dpu hardware catalog otherwise this becomes a burden to carry across chipsets in the catalog. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230421224721.12738-2-quic_a

[Freedreno] [PATCH v2 1/4] drm/msm/dpu: remove DPU_DSPP_GC handling in dspp flush

2023-04-26 Thread Abhinav Kumar
Gamma correction blocks (GC) are not used today so lets remove the usage of DPU_DSPP_GC in the dspp flush to make it easier to remove GC from the catalog. We can add this back when GC is properly supported in DPU with one of the standard DRM properties. Signed-off-by: Abhinav Kumar Reviewed-by:

[Freedreno] [PATCH v2 3/4] drm/msm/dpu: remove GC related code from dpu catalog

2023-04-26 Thread Abhinav Kumar
Since Gamma Correction (GC) block is currently unused, drop related code from the dpu hardware catalog otherwise this becomes a burden to carry across chipsets in the catalog. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230421224721.12738-2-quic_a

[Freedreno] [PATCH v2 4/4] drm/msm/dpu: drop DSPP_MSM8998_MASK from hw catalog

2023-04-26 Thread Abhinav Kumar
Since GC and IGC masks have now been dropped DSPP_MSM8998_MASK is same as DSPP_SC7180_MASK. Since DSPP_SC7180_MASK is used more than DSPP_MSM8998_MASK, lets drop the latter. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 4 ++-- drivers/gpu/drm/msm/dis

[Freedreno] [PATCH v2 2/4] drm/msm/dpu: remove DPU_DSPP_IGC handling in dspp flush

2023-04-26 Thread Abhinav Kumar
Inverse gamma correction blocks (IGC) are not used today so lets remove the usage of DPU_DSPP_IGC in the dspp flush to make it easier to remove IGC from the catalog. We can add this back when IGC is properly supported in DPU with one of the standard DRM properties. Signed-off-by: Abhinav Kumar -

Re: [Freedreno] [PATCH 1/4] drm/msm/dpu: remove DPU_DSPP_GC handling in dspp flush

2023-04-26 Thread Abhinav Kumar
Sorry for the spam, this should have been v2, I have fixed that and resent this series. On 4/26/2023 12:20 PM, Abhinav Kumar wrote: Gamma correction blocks (GC) are not used today so lets remove the usage of DPU_DSPP_GC in the dspp flush to make it easier to remove GC from the catalog. We can

Re: [Freedreno] [PATCH v3 06/21] drm/msm/dpu: Use V2 DITHER PINGPONG sub-block in SM8[34]50/SC8280XP

2023-04-26 Thread Marijn Suijten
On 2023-04-26 12:11:39, Abhinav Kumar wrote: > > > On 4/26/2023 12:08 PM, Marijn Suijten wrote: > > On 2023-04-26 09:24:19, Abhinav Kumar wrote: > >> > >> > >> On 4/25/2023 4:05 PM, Marijn Suijten wrote: > >>> According to downstream sources this DITHER sub-block sits at an offset > >>> of 0xe0 w

[Freedreno] [PATCH v4 01/22] drm/msm/dpu: Remove unused INTF0 interrupt mask from SM6115/QCM2290

2023-04-26 Thread Marijn Suijten
Neither of these SoCs has INTF0, they only have a DSI interface on index 1. Stop enabling an interrupt that can't fire. Fixes: 3581b7062cec ("drm/msm/disp/dpu1: add support for display on SM6115") Fixes: 5334087ee743 ("drm/msm: add support for QCM2290 MDSS") Signed-off-by: Marijn Suijten Reviewe

[Freedreno] [PATCH v4 07/22] drm/msm/dpu: Set PINGPONG block length to zero for DPU >= 7.0.0

2023-04-26 Thread Marijn Suijten
Despite downstream DTS stating otherwise, the PINGPONG block has no registers starting with DPU revision 7.0.0. TEAR registers are gone since DPU 5.0.0 after being moved to the INTF block, and DSC registers are gone since 7.0.0, leaving only the dither sub-block. A future patch, part of the DSC 1

[Freedreno] [PATCH v4 06/22] drm/msm/dpu: Use V2 DITHER PINGPONG sub-block in SM8[34]50/SC8280XP

2023-04-26 Thread Marijn Suijten
According to downstream sources this DITHER sub-block sits at an offset of 0xe0 with version 0x2. The PP_BLK_DITHER macro is _not_ used as downstream still says the size of the PINGPONG block is 0xd4 and not 0. Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP") Fixes: 0e91bcbb0016 ("drm/

[Freedreno] [PATCH v4 02/22] drm/msm/dpu: Remove TE2 block and feature from DPU >= 5.0.0 hardware

2023-04-26 Thread Marijn Suijten
No hardware beyond kona (sm8250, DPU 6.0.0) defines the TE2 PINGPONG sub-block offset downstream, and according to insiders no DPU >= 5.0.0 hardware has support for it either. Especially since neither downstream nor upstream utilize these registers in any way, remove the erroneous specification fr

[Freedreno] [PATCH v4 04/22] drm/msm/dpu: Reindent REV_7xxx interrupt masks with tabs

2023-04-26 Thread Marijn Suijten
Use tabs for consistency with the other interrupt register definitions, rather than spaces. Fixes: ed6154a136e4 ("drm/msm/disp/dpu1: add intf offsets for SC7280 target") Fixes: 89688e2119b2 ("drm/msm/dpu: Add more of the INTF interrupt regions") Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280X

[Freedreno] [PATCH v4 00/22] drm/msm/dpu: Implement tearcheck support on INTF block

2023-04-26 Thread Marijn Suijten
Since DPU 5.0.0 the TEARCHECK registers and interrupts moved out of the PINGPONG block and into the INTF. Implement the necessary callbacks in the INTF block, and use these callbacks together with the INTF_TEAR interrupts. Additionally, disable previous register writes and remove unused interrupt

[Freedreno] [PATCH v4 03/22] drm/msm/dpu: Move non-MDP_TOP INTF_INTR offsets out of hwio header

2023-04-26 Thread Marijn Suijten
These offsets do not fall under the MDP TOP block and do not fit the comment right above. Move them to dpu_hw_interrupts.c next to the repsective MDP_INTF_x_OFF interrupt block offsets. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybc

[Freedreno] [PATCH v4 10/22] drm/msm/dpu: Sort INTF registers numerically

2023-04-26 Thread Marijn Suijten
A bunch of registers were appended at the end in e.g. commit 91143873a05d ("drm/msm/dpu: Add MISR register support for interface") rather than being inserted in a place that maintains numerical sorting: restore said numerical sorting. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Revi

[Freedreno] [PATCH v4 12/22] drm/msm/dpu: Drop unused poll_timeout_wr_ptr PINGPONG callback

2023-04-26 Thread Marijn Suijten
This callback was migrated from downstream when DPU1 was first introduced to mainline, but never used by any component. Drop it to save some lines and unnecessary confusion. Suggested-by: Dmitry Baryshkov Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov -

[Freedreno] [PATCH v4 05/22] drm/msm/dpu: Fix PP_BLK_DIPHER -> DITHER typo

2023-04-26 Thread Marijn Suijten
SM8550 exclusively has a DITHER sub-block inside the PINGPONG block and no other registers, hence the DITHER name of the macro and a corresponding PINGPONG block length of zero. However, the PP_BLK_ macro name was typo'd to DIPHER rather than DITHER. Fixes: efcd0107727c ("drm/msm/dpu: add support

[Freedreno] [PATCH v4 09/22] drm/msm/dpu: Remove extraneous register define indentation

2023-04-26 Thread Marijn Suijten
A bunch of registers are indented with two extra spaces, looking as if these are values corresponding to the previous register which is not the case, rather these are simply also register offsets and should only have a single space separating them and the #define keyword. Signed-off-by: Marijn Sui

[Freedreno] [PATCH v4 11/22] drm/msm/dpu: Take INTF index as parameter in interrupt register defines

2023-04-26 Thread Marijn Suijten
Instead of hardcoding many register defines for every INTF and AD4 index with a fixed stride, turn the defines into singular chunks of math that compute the address using the base and this fixed stride multiplied by the index given as argument to the definitions. MDP_SSPP_TOP0_OFF is dropped as th

[Freedreno] [PATCH v4 20/22] drm/msm/dpu: Merge setup_- and enable_tearcheck pingpong callbacks

2023-04-26 Thread Marijn Suijten
These functions are always called consecutively and are best bundled together for simplicity, especially when the same structure of callbacks will be replicated later on the interface block for INTF TE support. The enable_tearcheck(false) case is now replaced with a more obvious disable_tearcheck()

[Freedreno] [PATCH v4 15/22] drm/msm/dpu: Disable MDP vsync source selection on DPU 5.0.0 and above

2023-04-26 Thread Marijn Suijten
Since hardware revision 5.0.0 the TE configuration moved out of the PINGPONG block into the INTF block, including vsync source selection that was previously part of MDP top. Writing to the MDP_VSYNC_SEL register has no effect anymore and is omitted downstream via the DPU/SDE_MDP_VSYNC_SEL feature

[Freedreno] [PATCH v4 17/22] drm/msm/dpu: Factor out shared interrupt register in INTF_BLK macro

2023-04-26 Thread Marijn Suijten
As the INTF block is going to attain more interrupts that don't share the same MDP_SSPP_TOP0_INTR register, factor out the _reg argument for the caller to construct the right interrupt index (register and bit index) to not make the interrupt bit arguments depend on one of multiple interrupt registe

[Freedreno] [PATCH v4 08/22] drm/msm/dpu: Remove duplicate register defines from INTF

2023-04-26 Thread Marijn Suijten
The INTF_FRAME_LINE_COUNT_EN, INTF_FRAME_COUNT and INTF_LINE_COUNT registers are already defined higher up, in the right place when sorted numerically. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov

[Freedreno] [PATCH v4 13/22] drm/msm/dpu: Move autorefresh disable from CMD encoder to pingpong

2023-04-26 Thread Marijn Suijten
This autorefresh disable logic in the physical command-mode encoder consumes three callbacks to the pingpong block, and will explode in unnecessary complexity when the same callbacks need to be called on the interface block instead to accommodate INTF TE support. To clean this up, move the logic i

[Freedreno] [PATCH v4 16/22] drm/msm/dpu: Move dpu_hw_{tear_check, pp_vsync_info} to dpu_hw_mdss.h

2023-04-26 Thread Marijn Suijten
From: Konrad Dybcio Now that newer SoCs since DPU 5.0.0 manage tearcheck in the INTF instead of PINGPONG block, move the struct definition to a common file. Also, bring in documentation from msm-4.19 techpack while at it. Signed-off-by: Konrad Dybcio [Marijn: Also move dpu_hw_pp_vsync_info] Sig

[Freedreno] [PATCH v4 21/22] drm/msm/dpu: Implement tearcheck support on INTF block

2023-04-26 Thread Marijn Suijten
Since DPU 5.0.0 the TEARCHECK registers and interrupts moved out of the PINGPONG block and into the INTF. Implement the necessary callbacks in the INTF block, and use these callbacks together with the INTF_TEAR interrupts. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov --- drivers

[Freedreno] [PATCH v4 19/22] drm/msm/dpu: Add TEAR-READ-pointer interrupt to INTF block

2023-04-26 Thread Marijn Suijten
All SoCs since DPU 5.0.0 have the tear interrupt registers moved out of the PINGPONG block and into the INTF block. The new interrupts are described in dpu_hw_interrupts.c, now wire them up in individual SoC catalog files by setting the intr_tear_rd_ptr to the IRQ index spcified in the offset tabl

[Freedreno] [PATCH v4 22/22] drm/msm/dpu: Remove intr_rdptr from DPU >= 5.0.0 pingpong config

2023-04-26 Thread Marijn Suijten
Now that newer DPU platforms use a readpointer-done interrupt on the INTF block, stop providing the unused interrupt on the PINGPONG block. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 8 ++

[Freedreno] [PATCH v4 14/22] drm/msm/dpu: Disable pingpong TE on DPU 5.0.0 and above

2023-04-26 Thread Marijn Suijten
Since hardware revision 5.0.0 the TE configuration moved out of the PINGPONG block into the INTF block. Writing these registers has no effect, and is omitted downstream via the DPU/SDE_PINGPONG_TE feature flag. This flag is only added to PINGPONG blocks used by hardware prior to 5.0.0. The exist

[Freedreno] [PATCH v4 18/22] drm/msm/dpu: Describe TEAR interrupt registers for DSI interfaces

2023-04-26 Thread Marijn Suijten
All SoCs since DPU 5.0.0 have the tear interrupt registers moved out of the PINGPONG block and into the INTF block. Wire up the IRQ register masks in the interrupt table for enabling, reading and clearing them. Signed-off-by: Marijn Suijten --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c

Re: [Freedreno] [PATCH v4 02/22] drm/msm/dpu: Remove TE2 block and feature from DPU >= 5.0.0 hardware

2023-04-26 Thread Abhinav Kumar
On 4/26/2023 3:37 PM, Marijn Suijten wrote: No hardware beyond kona (sm8250, DPU 6.0.0) defines the TE2 PINGPONG sub-block offset downstream, and according to insiders no DPU >= 5.0.0 hardware has support for it either. Especially since neither downstream nor upstream utilize these registers

Re: [Freedreno] [PATCH v4 06/22] drm/msm/dpu: Use V2 DITHER PINGPONG sub-block in SM8[34]50/SC8280XP

2023-04-26 Thread Abhinav Kumar
On 4/26/2023 3:37 PM, Marijn Suijten wrote: According to downstream sources this DITHER sub-block sits at an offset of 0xe0 with version 0x2. The PP_BLK_DITHER macro is _not_ used as downstream still says the size of the PINGPONG block is 0xd4 and not 0. Fixes: 4a352c2fc15a ("drm/msm/dpu

Re: [Freedreno] [PATCH v4 07/22] drm/msm/dpu: Set PINGPONG block length to zero for DPU >= 7.0.0

2023-04-26 Thread Abhinav Kumar
On 4/26/2023 3:37 PM, Marijn Suijten wrote: Despite downstream DTS stating otherwise, the PINGPONG block has no registers starting with DPU revision 7.0.0. TEAR registers are gone since DPU 5.0.0 after being moved to the INTF block, and DSC registers are gone since 7.0.0, leaving only the dit