[Freedreno] [bug report] drm/msm/dpu: add HDMI output support
Dan Carpenter
dan.carpenter at linaro.org
Tue May 23 07:36:23 UTC 2023
Hello Dmitry Baryshkov,
The patch ea767bb1752f: "drm/msm/dpu: add HDMI output support" from
Apr 15, 2023, leads to the following Smatch static checker warning:
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:647 _dpu_kms_initialize_hdmi()
error: uninitialized symbol 'i'.
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
620 static int _dpu_kms_initialize_hdmi(struct drm_device *dev,
621 struct msm_drm_private *priv,
622 struct dpu_kms *dpu_kms)
623 {
624 struct drm_encoder *encoder = NULL;
625 struct msm_display_info info;
626 int rc;
627 int i;
628
629 if (!priv->hdmi)
630 return 0;
631
632 encoder = dpu_encoder_init(dev, DRM_MODE_ENCODER_TMDS);
633 if (IS_ERR(encoder)) {
634 DPU_ERROR("encoder init failed for HDMI display\n");
635 return PTR_ERR(encoder);
636 }
637
638 memset(&info, 0, sizeof(info));
639 rc = msm_hdmi_modeset_init(priv->hdmi, dev, encoder);
640 if (rc) {
641 DPU_ERROR("modeset_init failed for DP, rc = %d\n", rc);
642 drm_encoder_cleanup(encoder);
643 return rc;
644 }
645
646 info.num_of_h_tiles = 1;
--> 647 info.h_tile_instance[0] = i;
^
Uninitialized.
648 info.intf_type = INTF_HDMI;
649 rc = dpu_encoder_setup(dev, encoder, &info);
650 if (rc) {
651 DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n",
652 encoder->base.id, rc);
653 return rc;
654 }
655
656 return 0;
657 }
regards,
dan carpenter
More information about the Freedreno
mailing list