diff options
| author | Xiaoming Zhou <zhoux@codeaurora.org> | 2015-02-09 13:50:10 -0500 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:37:46 -0700 |
| commit | 8ca8a77ffe0a647513d22bb95294ad5e162f4e46 (patch) | |
| tree | e2a4b565b05aad46ca7036e17a3d31e8ab27d0b2 /drivers | |
| parent | 3a7f63f73a4c1d716e7e779bb0d762c8f79cc47d (diff) | |
msm: mdss: allow null commit for wifi display aotmic commit
Client may use null commit to clean-up h/w resources. This is
to enable null commit for wifi display atomic commit use case.
Change-Id: Id1048049c0b747833a2b871bd9becf1ff04e44c1
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_layer.c | 38 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_wfd.c | 4 |
2 files changed, 20 insertions, 22 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_layer.c b/drivers/video/fbdev/msm/mdss_mdp_layer.c index 955d193eeb27..7ec739dc92b5 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_layer.c +++ b/drivers/video/fbdev/msm/mdss_mdp_layer.c @@ -1200,9 +1200,9 @@ int mdss_mdp_layer_pre_commit_wfd(struct msm_fb_data_type *mfd, { int rc, count; struct mdss_overlay_private *mdp5_data; - struct mdss_mdp_wfd *wfd; - struct mdp_output_layer *output_layer; - struct mdss_mdp_wfd_data *data; + struct mdss_mdp_wfd *wfd = NULL; + struct mdp_output_layer *output_layer = NULL; + struct mdss_mdp_wfd_data *data = NULL; struct sync_fence *fence = NULL; struct msm_sync_pt_data *sync_pt_data = NULL; @@ -1216,24 +1216,21 @@ int mdss_mdp_layer_pre_commit_wfd(struct msm_fb_data_type *mfd, return -ENODEV; } - if (!commit->output_layer) { - pr_err("no output layer defined\n"); - return -EINVAL; - } + if (commit->output_layer) { + wfd = mdp5_data->wfd; + output_layer = commit->output_layer; - wfd = mdp5_data->wfd; - output_layer = commit->output_layer; - - data = mdss_mdp_wfd_add_data(wfd, output_layer); - if (IS_ERR_OR_NULL(data)) - return PTR_ERR(data); + data = mdss_mdp_wfd_add_data(wfd, output_layer); + if (IS_ERR_OR_NULL(data)) + return PTR_ERR(data); - if (output_layer->buffer.fence >= 0) { - fence = sync_fence_fdget(output_layer->buffer.fence); - if (!fence) { - pr_err("fail to get output buffer fence\n"); - rc = -EINVAL; - goto fence_get_err; + if (output_layer->buffer.fence >= 0) { + fence = sync_fence_fdget(output_layer->buffer.fence); + if (!fence) { + pr_err("fail to get output buffer fence\n"); + rc = -EINVAL; + goto fence_get_err; + } } } @@ -1257,7 +1254,8 @@ input_layer_err: if (fence) sync_fence_put(fence); fence_get_err: - mdss_mdp_wfd_remove_data(wfd, data); + if (data) + mdss_mdp_wfd_remove_data(wfd, data); return rc; } diff --git a/drivers/video/fbdev/msm/mdss_mdp_wfd.c b/drivers/video/fbdev/msm/mdss_mdp_wfd.c index a6f276ec57e8..5a7214561ed6 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_wfd.c +++ b/drivers/video/fbdev/msm/mdss_mdp_wfd.c @@ -316,9 +316,9 @@ int mdss_mdp_wfd_kickoff(struct mdss_mdp_wfd *wfd, mutex_lock(&wfd->lock); if (list_empty(&wfd->data_queue)) { - pr_err("no output buffer\n"); + pr_debug("no output buffer\n"); mutex_unlock(&wfd->lock); - return -EINVAL; + return 0; } wfd_data = list_first_entry(&wfd->data_queue, struct mdss_mdp_wfd_data, next); |
