Loading drivers/gpu/drm/msm/dp/dp_display.c +21 −0 Original line number Diff line number Diff line Loading @@ -910,6 +910,27 @@ static int dp_display_usbpd_configure_cb(struct device *dev) goto end; } /* * When dp is connected during boot, there is a chance that * configure_cb is called before drm probe is finished and * cause host_init failure. Here we poll the value of * poll_enabled and wait until drm driver is ready. */ if (!dp->dp_display.drm_dev->mode_config.poll_enabled) { const int poll_timeout = 10000; int i; for (i = 0; !dp->dp_display.drm_dev->mode_config.poll_enabled && i < poll_timeout; i++) usleep_range(1000, 1100); if (i == poll_timeout) { pr_err("driver is not loaded\n"); rc = -ENODEV; goto end; } } if (!dp->debug->sim_mode && !dp->parser->no_aux_switch && !dp->parser->gpio_aux_switch) { rc = dp->aux->aux_switch(dp->aux, true, dp->hpd->orientation); Loading Loading
drivers/gpu/drm/msm/dp/dp_display.c +21 −0 Original line number Diff line number Diff line Loading @@ -910,6 +910,27 @@ static int dp_display_usbpd_configure_cb(struct device *dev) goto end; } /* * When dp is connected during boot, there is a chance that * configure_cb is called before drm probe is finished and * cause host_init failure. Here we poll the value of * poll_enabled and wait until drm driver is ready. */ if (!dp->dp_display.drm_dev->mode_config.poll_enabled) { const int poll_timeout = 10000; int i; for (i = 0; !dp->dp_display.drm_dev->mode_config.poll_enabled && i < poll_timeout; i++) usleep_range(1000, 1100); if (i == poll_timeout) { pr_err("driver is not loaded\n"); rc = -ENODEV; goto end; } } if (!dp->debug->sim_mode && !dp->parser->no_aux_switch && !dp->parser->gpio_aux_switch) { rc = dp->aux->aux_switch(dp->aux, true, dp->hpd->orientation); Loading