diff options
| author | Lakshmi Narayana Kalavala <lkalaval@codeaurora.org> | 2018-02-28 18:10:47 -0800 |
|---|---|---|
| committer | Lakshmi Narayana Kalavala <lkalaval@codeaurora.org> | 2018-03-08 13:07:48 -0800 |
| commit | 47f361f8fc23f2592c290cbdf2dd15c27f2084dc (patch) | |
| tree | e19e353366c8c8b3987f40a08bec83a18ac61d04 /drivers/gpu/drm | |
| parent | 4f2aa096ba1682fcd002613c6cb1550476008da1 (diff) | |
drm/msm: move display and event threads to realtime priority
Display thread processes the work assigned by HAL for
screen update. Current logic selects the thread priority
to default and causes the frame drop. This patch moves
the display thread to realtime priority to process the display
work items at realtime. Event thread must follow the
display thread priority to avoid frame_pending counters
beyond 2.
Change-Id: I9154b749550cee52da1d16d22a8418676325e769
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Diffstat (limited to 'drivers/gpu/drm')
| -rw-r--r-- | drivers/gpu/drm/msm/msm_drv.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 043fdb712723..b57663013dcb 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -439,6 +439,7 @@ static int msm_load(struct drm_device *dev, unsigned long flags) struct msm_kms *kms; struct sde_dbg_power_ctrl dbg_power_ctrl = { NULL }; int ret, i; + struct sched_param param; priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (!priv) { @@ -532,7 +533,12 @@ static int msm_load(struct drm_device *dev, unsigned long flags) goto fail; } } - + /** + * 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; /* initialize commit thread structure */ for (i = 0; i < priv->num_crtcs; i++) { priv->disp_thread[i].crtc_id = priv->crtcs[i]->base.id; @@ -543,6 +549,11 @@ static int msm_load(struct drm_device *dev, unsigned long flags) &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->dev, "failed to create kthread\n"); |
