Loading drivers/gpu/drm/msm/msm_drv.c +24 −0 Original line number Diff line number Diff line Loading @@ -521,6 +521,7 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) struct msm_kms *kms; struct sde_dbg_power_ctrl dbg_power_ctrl = { 0 }; int ret, i; struct sched_param param; ddev = drm_dev_alloc(drv, dev); if (!ddev) { Loading Loading @@ -624,6 +625,12 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) } ddev->mode_config.funcs = &mode_config_funcs; /** * this priority was found during empiric testing to have appropriate * realtime scheduling to process display updates and interact with * other real time and normal priority task */ param.sched_priority = 16; for (i = 0; i < priv->num_crtcs; i++) { /* initialize display thread */ Loading @@ -634,6 +641,11 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) kthread_run(kthread_worker_fn, &priv->disp_thread[i].worker, "crtc_commit:%d", priv->disp_thread[i].crtc_id); ret = sched_setscheduler(priv->disp_thread[i].thread, SCHED_FIFO, ¶m); if (ret) pr_warn("display thread priority update failed: %d\n", ret); if (IS_ERR(priv->disp_thread[i].thread)) { dev_err(dev, "failed to create crtc_commit kthread\n"); Loading @@ -648,6 +660,18 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) kthread_run(kthread_worker_fn, &priv->event_thread[i].worker, "crtc_event:%d", priv->event_thread[i].crtc_id); /** * event thread should also run at same priority as disp_thread * because it is handling frame_done events. A lower priority * event thread and higher priority disp_thread can causes * frame_pending counters beyond 2. This can lead to commit * failure at crtc commit level. */ ret = sched_setscheduler(priv->event_thread[i].thread, SCHED_FIFO, ¶m); if (ret) pr_warn("display event thread priority update failed: %d\n", ret); if (IS_ERR(priv->event_thread[i].thread)) { dev_err(dev, "failed to create crtc_event kthread\n"); Loading Loading
drivers/gpu/drm/msm/msm_drv.c +24 −0 Original line number Diff line number Diff line Loading @@ -521,6 +521,7 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) struct msm_kms *kms; struct sde_dbg_power_ctrl dbg_power_ctrl = { 0 }; int ret, i; struct sched_param param; ddev = drm_dev_alloc(drv, dev); if (!ddev) { Loading Loading @@ -624,6 +625,12 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) } ddev->mode_config.funcs = &mode_config_funcs; /** * this priority was found during empiric testing to have appropriate * realtime scheduling to process display updates and interact with * other real time and normal priority task */ param.sched_priority = 16; for (i = 0; i < priv->num_crtcs; i++) { /* initialize display thread */ Loading @@ -634,6 +641,11 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) kthread_run(kthread_worker_fn, &priv->disp_thread[i].worker, "crtc_commit:%d", priv->disp_thread[i].crtc_id); ret = sched_setscheduler(priv->disp_thread[i].thread, SCHED_FIFO, ¶m); if (ret) pr_warn("display thread priority update failed: %d\n", ret); if (IS_ERR(priv->disp_thread[i].thread)) { dev_err(dev, "failed to create crtc_commit kthread\n"); Loading @@ -648,6 +660,18 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) kthread_run(kthread_worker_fn, &priv->event_thread[i].worker, "crtc_event:%d", priv->event_thread[i].crtc_id); /** * event thread should also run at same priority as disp_thread * because it is handling frame_done events. A lower priority * event thread and higher priority disp_thread can causes * frame_pending counters beyond 2. This can lead to commit * failure at crtc commit level. */ ret = sched_setscheduler(priv->event_thread[i].thread, SCHED_FIFO, ¶m); if (ret) pr_warn("display event thread priority update failed: %d\n", ret); if (IS_ERR(priv->event_thread[i].thread)) { dev_err(dev, "failed to create crtc_event kthread\n"); Loading