Re: [PATCH RFC 3/5] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/03/2023 02:45, Jessica Zhang wrote:


On 3/29/2023 4:31 PM, Dmitry Baryshkov wrote:
On 30/03/2023 02:18, Jessica Zhang wrote:
Signed-off-by: Jessica Zhang <quic_jesszhan@xxxxxxxxxxx>
---
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c
index 619926da1441..648c530b5d05 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c
@@ -3,6 +3,8 @@
   * Copyright (c) 2020-2022, Linaro Limited
   */
+#include <drm/display/drm_dsc_helper.h>
+
  #include "dpu_kms.h"
  #include "dpu_hw_catalog.h"
  #include "dpu_hwio.h"
@@ -102,7 +104,7 @@ static void dpu_hw_dsc_config(struct dpu_hw_dsc *hw_dsc,
      data |= dsc->final_offset;
      DPU_REG_WRITE(c, DSC_DSC_OFFSET, data);
-    det_thresh_flatness = 7 + 2 * (dsc->bits_per_component - 8);
+    det_thresh_flatness = drm_dsc_calculate_det_thresh_flatness(dsc);

But this changes the value! Compare:

bpc | old | new
8   | 7   | 2
10  | 11  | 8
12  | 15  | 256

If this is intentional, please state so and maybe add a Fixes tag.

Hi Dmitry,

Yep this was intentional to match downstream and the spec. Will add a fixes tag for this.

Good! I found corresponding change in msm-4.14, so now I understand why previously we had what we had.


Thanks,

Jessica Zhang



      data = det_thresh_flatness << 10;
      data |= dsc->flatness_max_qp << 5;
      data |= dsc->flatness_min_qp;


--
With best wishes
Dmitry


--
With best wishes
Dmitry




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux