disp: msm: Update dsc 422 and 420 encoding settings

Update dsc configuration and pps programming for 422 and
420 encoding as per the DSC hardware spec.

Change-Id: I4251614cdcd550ed724b1d0dba4846cada4b5392
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Dieser Commit ist enthalten in:
Prabhanjan Kandula
2021-07-15 11:25:11 -07:00
Ursprung 5ae2fa9ac8
Commit d5390da6c7
3 geänderte Dateien mit 34 neuen und 9 gelöschten Zeilen

Datei anzeigen

@@ -130,6 +130,7 @@ static void sde_hw_dsc_config(struct sde_hw_dsc *hw_dsc,
u32 idx;
u32 data = 0;
u32 slice_count_per_enc;
u32 bpp;
if (!hw_dsc || !dsc)
return;
@@ -170,8 +171,14 @@ static void sde_hw_dsc_config(struct sde_hw_dsc *hw_dsc,
data |= BIT(21);
}
bpp = dsc->config.bits_per_pixel;
/* as per hw requirement bpp should be programmed
* twice the actual value in case of 420 or 422 encoding
*/
if (dsc->config.native_422 || dsc->config.native_420)
bpp = 2 * bpp;
data |= (dsc->config.block_pred_enable ? 1 : 0) << 20;
data |= (dsc->config.bits_per_pixel << 10);
data |= (bpp << 10);
data |= (dsc->config.line_buf_depth & 0xf) << 6;
data |= dsc->config.convert_rgb << 4;
data |= dsc->config.bits_per_component & 0xf;