disp: msm: sde: use pp dsc api only if hw supports
This change checks the capabilities of pingpong block to check if it needs to call the pingpong api to enable or disable the dsc. Certain hw versions do not have support in pingpong block to enable/disable the dsc instead the dsc block itself have the hooks to control the DSC. Change-Id: I17dd45479cc33ff2e81f6a6e5a5a8704562dfd24 Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
This commit is contained in:
@@ -2161,7 +2161,9 @@ static void sde_encoder_virt_mode_set(struct drm_encoder *drm_enc,
|
||||
|
||||
/* Get PP for DSC configuration */
|
||||
for (i = 0; i < MAX_CHANNELS_PER_ENC; i++) {
|
||||
sde_enc->hw_dsc_pp[i] = NULL;
|
||||
struct sde_hw_pingpong *pp = NULL;
|
||||
unsigned long features = 0;
|
||||
|
||||
if (!sde_enc->hw_dsc[i])
|
||||
continue;
|
||||
|
||||
@@ -2169,8 +2171,13 @@ static void sde_encoder_virt_mode_set(struct drm_encoder *drm_enc,
|
||||
request_hw.type = SDE_HW_BLK_PINGPONG;
|
||||
if (!sde_rm_request_hw_blk(&sde_kms->rm, &request_hw))
|
||||
break;
|
||||
sde_enc->hw_dsc_pp[i] =
|
||||
(struct sde_hw_pingpong *) request_hw.hw;
|
||||
pp = (struct sde_hw_pingpong *) request_hw.hw;
|
||||
features = pp->ops.get_hw_caps(pp);
|
||||
|
||||
if (test_bit(SDE_PINGPONG_DSC, &features))
|
||||
sde_enc->hw_dsc_pp[i] = pp;
|
||||
else
|
||||
sde_enc->hw_dsc_pp[i] = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < sde_enc->num_phys_encs; i++) {
|
||||
|
Referens i nytt ärende
Block a user