Loading drivers/media/platform/msm/sde/rotator/sde_rotator_core.c +2 −6 Original line number Diff line number Diff line Loading @@ -708,17 +708,13 @@ static int sde_rotator_map_and_check_data(struct sde_rot_entry *entry) } /* if error during map, the caller will release the data */ ret = sde_mdp_data_map(&entry->src_buf, true, DMA_TO_DEVICE, sde_mdp_is_ubwc_format(in_fmt) || sde_mdp_is_tilea5x_format(in_fmt)); ret = sde_mdp_data_map(&entry->src_buf, true, DMA_TO_DEVICE); if (ret) { SDEROT_ERR("source buffer mapping failed ret:%d\n", ret); goto end; } ret = sde_mdp_data_map(&entry->dst_buf, true, DMA_FROM_DEVICE, sde_mdp_is_ubwc_format(out_fmt) || sde_mdp_is_tilea5x_format(out_fmt)); ret = sde_mdp_data_map(&entry->dst_buf, true, DMA_FROM_DEVICE); if (ret) { SDEROT_ERR("destination buffer mapping failed ret:%d\n", ret); goto end; Loading drivers/media/platform/msm/sde/rotator/sde_rotator_util.c +18 −7 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <linux/regulator/consumer.h> #include <media/msm_media_info.h> #include <linux/videodev2.h> #include <linux/ion.h> #include "sde_rotator_util.h" #include "sde_rotator_smmu.h" Loading Loading @@ -868,13 +869,14 @@ static int sde_mdp_get_img(struct sde_fb_data *img, } static int sde_mdp_map_buffer(struct sde_mdp_img_data *data, bool rotator, int dir, bool skip_sync) int dir) { int ret = -EINVAL; int domain; struct scatterlist *sg; unsigned int i; struct sg_table *table; unsigned long flags = 0; if (data->addr && data->len) return 0; Loading @@ -894,9 +896,19 @@ static int sde_mdp_map_buffer(struct sde_mdp_img_data *data, bool rotator, */ data->srcp_attachment->dma_map_attrs |= DMA_ATTR_DELAYED_UNMAP; if (skip_sync) if (data->srcp_dma_buf && data->srcp_dma_buf->ops && data->srcp_dma_buf->ops->get_flags) { if (data->srcp_dma_buf->ops->get_flags( data->srcp_dma_buf, &flags) == 0) { if ((flags & ION_FLAG_CACHED) == 0) { SDEROT_DBG("dmabuf is uncached type\n"); data->srcp_attachment->dma_map_attrs |= DMA_ATTR_SKIP_CPU_SYNC; } } } if (sde_mdp_is_map_needed(data)) { data->srcp_table = Loading Loading @@ -1016,8 +1028,7 @@ static int sde_mdp_data_get(struct sde_mdp_data *data, return rc; } int sde_mdp_data_map(struct sde_mdp_data *data, bool rotator, int dir, bool skip_sync) int sde_mdp_data_map(struct sde_mdp_data *data, bool rotator, int dir) { int i, rc = 0; Loading @@ -1025,7 +1036,7 @@ int sde_mdp_data_map(struct sde_mdp_data *data, bool rotator, int dir, return -EINVAL; for (i = 0; i < data->num_planes; i++) { rc = sde_mdp_map_buffer(&data->p[i], rotator, dir, skip_sync); rc = sde_mdp_map_buffer(&data->p[i], rotator, dir); if (rc) { SDEROT_ERR("failed to map buf p=%d\n", i); while (i > 0) { Loading drivers/media/platform/msm/sde/rotator/sde_rotator_util.h +1 −2 Original line number Diff line number Diff line Loading @@ -194,8 +194,7 @@ int sde_mdp_get_plane_sizes(struct sde_mdp_format_params *fmt, u32 w, u32 h, struct sde_mdp_plane_sizes *ps, u32 bwc_mode, bool rotation); int sde_mdp_data_map(struct sde_mdp_data *data, bool rotator, int dir, bool skip_sync); int sde_mdp_data_map(struct sde_mdp_data *data, bool rotator, int dir); int sde_mdp_data_check(struct sde_mdp_data *data, struct sde_mdp_plane_sizes *ps, Loading Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_core.c +2 −6 Original line number Diff line number Diff line Loading @@ -708,17 +708,13 @@ static int sde_rotator_map_and_check_data(struct sde_rot_entry *entry) } /* if error during map, the caller will release the data */ ret = sde_mdp_data_map(&entry->src_buf, true, DMA_TO_DEVICE, sde_mdp_is_ubwc_format(in_fmt) || sde_mdp_is_tilea5x_format(in_fmt)); ret = sde_mdp_data_map(&entry->src_buf, true, DMA_TO_DEVICE); if (ret) { SDEROT_ERR("source buffer mapping failed ret:%d\n", ret); goto end; } ret = sde_mdp_data_map(&entry->dst_buf, true, DMA_FROM_DEVICE, sde_mdp_is_ubwc_format(out_fmt) || sde_mdp_is_tilea5x_format(out_fmt)); ret = sde_mdp_data_map(&entry->dst_buf, true, DMA_FROM_DEVICE); if (ret) { SDEROT_ERR("destination buffer mapping failed ret:%d\n", ret); goto end; Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_util.c +18 −7 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <linux/regulator/consumer.h> #include <media/msm_media_info.h> #include <linux/videodev2.h> #include <linux/ion.h> #include "sde_rotator_util.h" #include "sde_rotator_smmu.h" Loading Loading @@ -868,13 +869,14 @@ static int sde_mdp_get_img(struct sde_fb_data *img, } static int sde_mdp_map_buffer(struct sde_mdp_img_data *data, bool rotator, int dir, bool skip_sync) int dir) { int ret = -EINVAL; int domain; struct scatterlist *sg; unsigned int i; struct sg_table *table; unsigned long flags = 0; if (data->addr && data->len) return 0; Loading @@ -894,9 +896,19 @@ static int sde_mdp_map_buffer(struct sde_mdp_img_data *data, bool rotator, */ data->srcp_attachment->dma_map_attrs |= DMA_ATTR_DELAYED_UNMAP; if (skip_sync) if (data->srcp_dma_buf && data->srcp_dma_buf->ops && data->srcp_dma_buf->ops->get_flags) { if (data->srcp_dma_buf->ops->get_flags( data->srcp_dma_buf, &flags) == 0) { if ((flags & ION_FLAG_CACHED) == 0) { SDEROT_DBG("dmabuf is uncached type\n"); data->srcp_attachment->dma_map_attrs |= DMA_ATTR_SKIP_CPU_SYNC; } } } if (sde_mdp_is_map_needed(data)) { data->srcp_table = Loading Loading @@ -1016,8 +1028,7 @@ static int sde_mdp_data_get(struct sde_mdp_data *data, return rc; } int sde_mdp_data_map(struct sde_mdp_data *data, bool rotator, int dir, bool skip_sync) int sde_mdp_data_map(struct sde_mdp_data *data, bool rotator, int dir) { int i, rc = 0; Loading @@ -1025,7 +1036,7 @@ int sde_mdp_data_map(struct sde_mdp_data *data, bool rotator, int dir, return -EINVAL; for (i = 0; i < data->num_planes; i++) { rc = sde_mdp_map_buffer(&data->p[i], rotator, dir, skip_sync); rc = sde_mdp_map_buffer(&data->p[i], rotator, dir); if (rc) { SDEROT_ERR("failed to map buf p=%d\n", i); while (i > 0) { Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_util.h +1 −2 Original line number Diff line number Diff line Loading @@ -194,8 +194,7 @@ int sde_mdp_get_plane_sizes(struct sde_mdp_format_params *fmt, u32 w, u32 h, struct sde_mdp_plane_sizes *ps, u32 bwc_mode, bool rotation); int sde_mdp_data_map(struct sde_mdp_data *data, bool rotator, int dir, bool skip_sync); int sde_mdp_data_map(struct sde_mdp_data *data, bool rotator, int dir); int sde_mdp_data_check(struct sde_mdp_data *data, struct sde_mdp_plane_sizes *ps, Loading