MGS-3632-2: drm: imx: dcss: adjust DPR MAX_BYTES_PREQ depending on resolution
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Tue, 23 Jan 2018 07:49:31 +0000 (09:49 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Current setting uses a 256 bytes/request for anything less than 1080p.
This works when DTRC is not involved. However, with DTRC, the
MAX_BYTES_PREQ needs to be fine tuned a little.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
drivers/gpu/imx/dcss/dcss-dpr.c

index 26d3601..08df88f 100644 (file)
@@ -275,8 +275,8 @@ void dcss_dpr_set_res(struct dcss_soc *dcss, int ch_num, u32 xres, u32 yres)
                dcss_dpr_write(dpr, ch_num, pix_y_high,
                               DCSS_DPR_FRAME_1P_PIX_Y_CTRL + plane * gap);
 
-               dcss_dpr_write(dpr,
-                              ch_num, xres < 1920 ? 2 : xres > 1920 ? 6 : 5,
+               dcss_dpr_write(dpr, ch_num, xres < 640 ? 3 :
+                              xres < 1280 ? 4 : xres < 3840 ? 5 : 6,
                               DCSS_DPR_FRAME_1P_CTRL0 + plane * gap);
        }
 }