[Freedreno] [PATCH RESEND 09/10] drm/msm/dpu: Fix writeback compile macros

Sean Paul seanpaul at chromium.org
Wed Feb 21 15:18:37 UTC 2018


From: Jeykumar Sankaran <jsanka at codeaurora.org>

The writeback config gates were too aggressive and blocked out all
encoder initialization. Reduce the scope of the gating to just exclude
writeback initialization

Signed-off-by: Jeykumar Sankaran <jsanka at codeaurora.org>
[seanpaul fixed commit msg and reduced to one block inside the function]
Signed-off-by: Sean Paul <seanpaul at chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 6f1688786838..3d168fa09f3f 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -3441,7 +3441,6 @@ static void dpu_encoder_early_unregister(struct drm_encoder *encoder)
 	_dpu_encoder_destroy_debugfs(encoder);
 }
 
-#ifdef CONFIG_DRM_MSM_WRITEBACK
 static int dpu_encoder_virt_add_phys_encs(
 		u32 display_caps,
 		struct dpu_encoder_virt *dpu_enc,
@@ -3494,6 +3493,7 @@ static int dpu_encoder_virt_add_phys_encs(
 static int dpu_encoder_virt_add_phys_enc_wb(struct dpu_encoder_virt *dpu_enc,
 		struct dpu_enc_phys_init_params *params)
 {
+#ifdef CONFIG_DRM_MSM_WRITEBACK
 	struct dpu_encoder_phys *enc = NULL;
 
 	if (!dpu_enc) {
@@ -3519,10 +3519,9 @@ static int dpu_encoder_virt_add_phys_enc_wb(struct dpu_encoder_virt *dpu_enc,
 
 	dpu_enc->phys_encs[dpu_enc->num_phys_encs] = enc;
 	++dpu_enc->num_phys_encs;
-
+#endif
 	return 0;
 }
-#endif
 
 static int dpu_encoder_setup_display(struct dpu_encoder_virt *dpu_enc,
 				 struct dpu_kms *dpu_kms,
@@ -3625,7 +3624,6 @@ static int dpu_encoder_setup_display(struct dpu_encoder_virt *dpu_enc,
 			}
 		}
 
-#ifdef CONFIG_DRM_MSM_WRITEBACK
 		if (!ret) {
 			if (intf_type == INTF_WB)
 				ret = dpu_encoder_virt_add_phys_enc_wb(dpu_enc,
@@ -3639,7 +3637,6 @@ static int dpu_encoder_setup_display(struct dpu_encoder_virt *dpu_enc,
 				DPU_ERROR_ENC(dpu_enc,
 						"failed to add phys encs\n");
 		}
-#endif
 	}
 
 	for (i = 0; i < dpu_enc->num_phys_encs; i++) {
-- 
2.16.1.291.g4437f3f132-goog



More information about the Freedreno mailing list