drm/msm/dpu: Remove num_enc from topology struct in favour of num_dsc
authorMarijn Suijten <marijn.suijten@somainline.org>
Wed, 21 Dec 2022 23:19:41 +0000 (00:19 +0100)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 12 Jan 2023 19:45:17 +0000 (21:45 +0200)
Downstream calls this num_enc yet the DSC patches introduced a new
num_dsc struct member, leaving num_enc effectively unused.

Fixes: 7e9cc175b159 ("drm/msm/disp/dpu1: Add support for DSC in topology")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/515688/
Link: https://lore.kernel.org/r/20221221231943.1961117-7-marijn.suijten@somainline.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
drivers/gpu/drm/msm/msm_drv.h

index 9c6817b5a19439e6125d6d2a418befa1799eca57..a158cd502d3870b41cdb32f89d8572b9965dfb67 100644 (file)
@@ -579,19 +579,18 @@ static struct msm_display_topology dpu_encoder_get_topology(
                        topology.num_dspp = topology.num_lm;
        }
 
-       topology.num_enc = 0;
        topology.num_intf = intf_count;
 
        if (dpu_enc->dsc) {
-               /* In case of Display Stream Compression (DSC), we would use
-                * 2 encoders, 2 layer mixers and 1 interface
+               /*
+                * In case of Display Stream Compression (DSC), we would use
+                * 2 DSC encoders, 2 layer mixers and 1 interface
                 * this is power optimal and can drive up to (including) 4k
                 * screens
                 */
-               topology.num_enc = 2;
                topology.num_dsc = 2;
-               topology.num_intf = 1;
                topology.num_lm = 2;
+               topology.num_intf = 1;
        }
 
        return topology;
index f388ce4fb8e3ae23aaf16e1c3b93e041b4f80323..b6090a837779784ae4c0a0d18303694cd1b06de6 100644 (file)
@@ -548,8 +548,8 @@ static int _dpu_rm_populate_requirements(
 {
        reqs->topology = req_topology;
 
-       DRM_DEBUG_KMS("num_lm: %d num_enc: %d num_intf: %d\n",
-                     reqs->topology.num_lm, reqs->topology.num_enc,
+       DRM_DEBUG_KMS("num_lm: %d num_dsc: %d num_intf: %d\n",
+                     reqs->topology.num_lm, reqs->topology.num_dsc,
                      reqs->topology.num_intf);
 
        return 0;
index 2dd342e49de685edbc3793c6899034edd3a69039..8b911728a9007c8914c7d1c360bd89a5ac320a52 100644 (file)
@@ -83,14 +83,12 @@ enum msm_event_wait {
 /**
  * struct msm_display_topology - defines a display topology pipeline
  * @num_lm:       number of layer mixers used
- * @num_enc:      number of compression encoder blocks used
  * @num_intf:     number of interfaces the panel is mounted on
  * @num_dspp:     number of dspp blocks used
  * @num_dsc:      number of Display Stream Compression (DSC) blocks used
  */
 struct msm_display_topology {
        u32 num_lm;
-       u32 num_enc;
        u32 num_intf;
        u32 num_dspp;
        u32 num_dsc;