[Freedreno] [PATCH 6/6] drm/msm/dpu: drop compatibility INTR defines

2023-05-21 Thread Dmitry Baryshkov
While reworking interrupts masks, it was easier to keep old MDP_INTFn_7xxx_INTR and MDP_INTFn_7xxx_TEAR_INTR symbols. Now it is time to drop them and use unified symbol names. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 4 ++-- .../gpu/drm/msm/disp/

[Freedreno] [PATCH 5/6] drm/msm/dpu: drop now-unused mdss_irqs field from hw catalog

2023-05-21 Thread Dmitry Baryshkov
Now as the list of the interrupts is constructed from the catalog data, drop the mdss_irqs field from catalog. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h| 8 .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 9 - .../gpu/drm/msm/

[Freedreno] [PATCH 4/6] drm/msm/dpu: autodetect supported interrupts

2023-05-21 Thread Dmitry Baryshkov
Declaring the mask of supported interrupts proved to be error-prone. It is very easy to add a bit with no corresponding backing block or to miss the INTF TE bit. Replace this with looping over the enabled INTF blocks to setup the irq mask. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp

[Freedreno] [PATCH 1/6] drm/msm/dpu: don't set DPU_INTF_TE globally

2023-05-21 Thread Dmitry Baryshkov
Using BIT(DPU_INTF_TE) in INTF_SC7180_MASK (and by extension in INTF_SC7280_MASK) results in this bit (and corrsponding operations) being enabled for all interfaces, even the ones which do not have TE block. Move this bit setting to INTF_DSI_TE(), so that it is only enabled for those INTF blocks wh

[Freedreno] [PATCH 3/6] drm/msm/dpu: split interrupt address arrays

2023-05-21 Thread Dmitry Baryshkov
There is no point in having a single enum (and a single array) for both DPU < 7.0 and DPU >= 7.0 interrupt registers. Instead define a single enum and two IRQ address arrays. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h| 2 + .../gpu/drm/msm/disp/dpu1/dpu_h

[Freedreno] [PATCH 2/6] drm/msm/dpu: inline __intr_offset

2023-05-21 Thread Dmitry Baryshkov
Inline __intr_offset(), there is no point in having a separate oneline function for setting base block address. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/dis

[Freedreno] [PATCH 0/6] drm/msm/dpu: rework interrupt handling

2023-05-21 Thread Dmitry Baryshkov
Declaring the mask of supported interrupts proved to be error-prone. It is very easy to add a bit with no corresponding backing block or to miss the INTF TE bit. Replace this static configuration with the irq mask calculated from the HW catalog data. Dmitry Baryshkov (6): drm/msm/dpu: don't set

Re: [Freedreno] [PATCH 0/6] drm/msm/dpu: use UBWC data from MDSS driver

2023-05-21 Thread Dmitry Baryshkov
On 22/05/2023 00:50, Steev Klimaszewski wrote: Hi Dmitry On Sun, May 21, 2023 at 12:28 PM Dmitry Baryshkov wrote: Both DPU and MDSS programming requires knowledge of some of UBWC parameters. This results in duplication of UBWC data between MDSS and DPU drivers. To remove such duplication and

Re: [Freedreno] [PATCH 0/6] drm/msm/dpu: use UBWC data from MDSS driver

2023-05-21 Thread Steev Klimaszewski
Hi Dmitry On Sun, May 21, 2023 at 12:28 PM Dmitry Baryshkov wrote: > > Both DPU and MDSS programming requires knowledge of some of UBWC > parameters. This results in duplication of UBWC data between MDSS and > DPU drivers. To remove such duplication and make the driver more > error-prone, export

Re: [Freedreno] [PATCH v2 3/3] drm/msm/dpu: switch dpu_encoder to use drm_debugfs_add_file()

2023-05-21 Thread Marijn Suijten
On 2023-05-21 22:22:30, Dmitry Baryshkov wrote: > Use drm_debugfs_add_file() for encoder's status file. This changes the > name of the status file from encoder%d/status to just encoder%d. > > Signed-off-by: Dmitry Baryshkov Also nice that this is a managed variant so that we don't have to clean

Re: [Freedreno] [PATCH v2 2/3] drm/msm/dpu: drop (mostly) unused DPU_NAME_SIZE define

2023-05-21 Thread Marijn Suijten
On 2023-05-21 22:22:29, Dmitry Baryshkov wrote: > This define is used only in one place, in dpu_encoder debugfs code. > Inline the value and drop the define completely. > > Signed-off-by: Dmitry Baryshkov Even if this was a constant, always a fan of sizeof(name) versus assuming that name has som

Re: [Freedreno] [PATCH v2 1/3] drm/msm/dpu: drop dpu_encoder_phys_ops::late_register()

2023-05-21 Thread Marijn Suijten
On 2023-05-21 22:22:28, Dmitry Baryshkov wrote: > This callback has been unused since the driver being added. Drop it now. > > Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 --- > drivers/gpu/drm/msm/disp/dpu1/dpu_

[Freedreno] [PATCH v2 2/3] drm/msm/dpu: drop (mostly) unused DPU_NAME_SIZE define

2023-05-21 Thread Dmitry Baryshkov
This define is used only in one place, in dpu_encoder debugfs code. Inline the value and drop the define completely. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_pla

[Freedreno] [PATCH v2 1/3] drm/msm/dpu: drop dpu_encoder_phys_ops::late_register()

2023-05-21 Thread Dmitry Baryshkov
This callback has been unused since the driver being added. Drop it now. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 3 --- 2 files changed, 10 deletions(-) diff --git a/drivers/gpu/drm/msm/

[Freedreno] [PATCH v2 3/3] drm/msm/dpu: switch dpu_encoder to use drm_debugfs_add_file()

2023-05-21 Thread Dmitry Baryshkov
Use drm_debugfs_add_file() for encoder's status file. This changes the name of the status file from encoder%d/status to just encoder%d. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 40 ++--- 1 file changed, 11 insertions(+), 29 deletions(-) d

Re: [Freedreno] [PATCH 2/2] drm/msm/dpu: switch dpu_encoder to use drm_debugfs_add_file()

2023-05-21 Thread Dmitry Baryshkov
On 21/05/2023 22:21, Marijn Suijten wrote: On 2023-05-21 22:04:42, Dmitry Baryshkov wrote: Use drm_debugfs_add_file() for encoder's status file. This changes the name of the status file from encoder%d/status to just encoder%d. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1

Re: [Freedreno] [PATCH 2/2] drm/msm/dpu: switch dpu_encoder to use drm_debugfs_add_file()

2023-05-21 Thread Marijn Suijten
On 2023-05-21 22:04:42, Dmitry Baryshkov wrote: > Use drm_debugfs_add_file() for encoder's status file. This changes the > name of the status file from encoder%d/status to just encoder%d. > > Signed-off-by: Dmitry Baryshkov > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 40 ++-

Re: [Freedreno] [PATCH 1/2] drm/msm/dpu: drop SSPP register dumpers

2023-05-21 Thread Marijn Suijten
On 2023-05-21 20:12:00, Marijn Suijten wrote: > On 2023-05-21 20:21:46, Dmitry Baryshkov wrote: > > Drop SSPP-specifig debugfs register dumps in favour of using > > debugfs/dri/0/kms or devcoredump. > > > > Signed-off-by: Dmitry Baryshkov > > Reviewed-by: Marijn Suijten > > > --- > > drivers/

[Freedreno] [PATCH 2/2] drm/msm/dpu: switch dpu_encoder to use drm_debugfs_add_file()

2023-05-21 Thread Dmitry Baryshkov
Use drm_debugfs_add_file() for encoder's status file. This changes the name of the status file from encoder%d/status to just encoder%d. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 40 ++--- 1 file changed, 11 insertions(+), 29 deletions(-) d

[Freedreno] [PATCH 1/2] drm/msm/dpu: drop (mostly) unused DPU_NAME_SIZE define

2023-05-21 Thread Dmitry Baryshkov
This define is used only in one place, in dpu_encoder debugfs code. Inline the value and drop the define completely. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_pla

[Freedreno] [PATCH 0/2] drm/msm/dpu: yet another attempt at cleaning up encoder's debugfs

2023-05-21 Thread Dmitry Baryshkov
Simplify dpu_encoder slightly by using drm_debugfs_add_file(). Dmitry Baryshkov (2): drm/msm/dpu: drop (mostly) unused DPU_NAME_SIZE define drm/msm/dpu: switch dpu_encoder to use drm_debugfs_add_file() drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 40 ++--- drivers/gpu/drm/ms

Re: [Freedreno] [PATCH 2/2] drm/msm/dpu: drop debugfs regset32 support

2023-05-21 Thread Marijn Suijten
On 2023-05-21 20:21:47, Dmitry Baryshkov wrote: > Drop the custom DPU's dpu_debugfs_create_regset32() function. With the > SSPP user being gone, there is no need in this function. While we are at > it also drop unused debugfs declarations from dpu_kms.h. > > Signed-off-by: Dmitry Baryshkov Revie

Re: [Freedreno] [PATCH 1/2] drm/msm/dpu: drop SSPP register dumpers

2023-05-21 Thread Marijn Suijten
On 2023-05-21 20:21:46, Dmitry Baryshkov wrote: > Drop SSPP-specifig debugfs register dumps in favour of using > debugfs/dri/0/kms or devcoredump. > > Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 25 - >

[Freedreno] [PATCH] drm/drv: propagate errors from drm_modeset_register_all()

2023-05-21 Thread Dmitry Baryshkov
In case the drm_modeset_register_all() function fails, its error code will be ignored. Instead make the drm_dev_register() bail out in case of such an error. Fixes: 79190ea2658a ("drm: Add callbacks for late registering") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_drv.c | 10 +++

[Freedreno] [PATCH 2/2] drm/msm/dpu: drop debugfs regset32 support

2023-05-21 Thread Dmitry Baryshkov
Drop the custom DPU's dpu_debugfs_create_regset32() function. With the SSPP user being gone, there is no need in this function. While we are at it also drop unused debugfs declarations from dpu_kms.h. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 65 --

[Freedreno] [PATCH 1/2] drm/msm/dpu: drop SSPP register dumpers

2023-05-21 Thread Dmitry Baryshkov
Drop SSPP-specifig debugfs register dumps in favour of using debugfs/dri/0/kms or devcoredump. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 25 - 1 file changed, 25 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c b/

[Freedreno] [PATCH 6/6] drm/msm/dpu: drop UBWC configuration

2023-05-21 Thread Dmitry Baryshkov
As the DPU driver has switched to fetching data from MDSS driver, we can now drop the UBWC and highest_bank_bit parts of the DPU hw catalog. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 6 -- .../drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h| 6 -

[Freedreno] [PATCH 4/6] drm/msm/mdss: populate missing data

2023-05-21 Thread Dmitry Baryshkov
As we are going to use MDSS data for DPU programming, populate missing MDSS data. The UBWC 1.0 and no UBWC cases do not require MDSS programming, so skip them. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 21 +++-- 1 file changed, 19 insertions(+), 2 delet

[Freedreno] [PATCH 5/6] drm/msm/dpu: use MDSS data for programming SSPP

2023-05-21 Thread Dmitry Baryshkov
Switch to using data from MDSS driver to program the SSPP fetch and UBWC configuration. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 18 +++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 7 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c |

[Freedreno] [PATCH 2/6] drm/msm/mdss: rename ubwc_version to ubwc_enc_version

2023-05-21 Thread Dmitry Baryshkov
Rename the ubwc_version field to ubwc_enc_version, it denotes the version of the UBWC encoder, not the "UBWC version". Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/d

[Freedreno] [PATCH 3/6] drm/msm/mdss: export UBWC data

2023-05-21 Thread Dmitry Baryshkov
DPU programming requires knowledge of some of UBWC parameters. This results in duplication of UBWC data between MDSS and DPU drivers. Export the required data from MDSS driver. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 30 +- drivers/gpu/drm

[Freedreno] [PATCH 1/6] drm/msm/mdss: correct UBWC programming for SM8550

2023-05-21 Thread Dmitry Baryshkov
The SM8550 platform employs newer UBWC decoder, which requires slightly different programming. Fixes: a2f33995c19d ("drm/msm: mdss: add support for SM8550") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(

[Freedreno] [PATCH 0/6] drm/msm/dpu: use UBWC data from MDSS driver

2023-05-21 Thread Dmitry Baryshkov
Both DPU and MDSS programming requires knowledge of some of UBWC parameters. This results in duplication of UBWC data between MDSS and DPU drivers. To remove such duplication and make the driver more error-prone, export respective configuration from the MDSS driver and make DPU use it, instead of b

Re: [Freedreno] [PATCH v4 08/12] drm/msm/dpu: Add SM6375 support

2023-05-21 Thread Dmitry Baryshkov
On 19/05/2023 20:04, Konrad Dybcio wrote: Add basic SM6375 support to the DPU1 driver to enable display output. Signed-off-by: Konrad Dybcio --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h | 153 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 1 + driver

Re: [Freedreno] [PATCH v4 06/12] drm/msm/dpu: Add SM6350 support

2023-05-21 Thread Dmitry Baryshkov
On 19/05/2023 20:04, Konrad Dybcio wrote: Add SM6350 support to the DPU1 driver to enable display output. It's worth noting that one entry dpu_qos_lut_entry was trimmed off: {.fl = 0, .lut = 0x0011223344556677 }, due to the fact that newer SoCs dropped the .fl (fill level)-based logic and don'