Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dabedac9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: fix issue preventing cursor_buf address to be stored"

parents 715e5eac 127ee0d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ struct mdss_smmu_ops {
	void (*smmu_unmap_dma_buf)(struct sg_table *table, int domain,
			int dir, struct dma_buf *dma_buf);
	int (*smmu_dma_alloc_coherent)(struct device *dev, size_t size,
			dma_addr_t *phys, dma_addr_t *iova, void *cpu_addr,
			dma_addr_t *phys, dma_addr_t *iova, void **cpu_addr,
			gfp_t gfp, int domain);
	void (*smmu_dma_free_coherent)(struct device *dev, size_t size,
			void *cpu_addr, dma_addr_t phys, dma_addr_t iova,
+3 −3
Original line number Diff line number Diff line
@@ -4658,7 +4658,7 @@ static int mdss_mdp_hw_cursor_pipe_update(struct msm_fb_data_type *mfd,
	if (!mfd->cursor_buf && (cursor->set & FB_CUR_SETIMAGE)) {
		ret = mdss_smmu_dma_alloc_coherent(&pdev->dev,
			cursor_frame_size, (dma_addr_t *) &mfd->cursor_buf_phys,
			&mfd->cursor_buf_iova, mfd->cursor_buf,
			&mfd->cursor_buf_iova, &mfd->cursor_buf,
			GFP_KERNEL, MDSS_IOMMU_DOMAIN_UNSECURE);
		if (ret) {
			pr_err("can't allocate cursor buffer rc:%d\n", ret);
@@ -4846,7 +4846,7 @@ static int mdss_mdp_hw_cursor_update(struct msm_fb_data_type *mfd,
	if (!mfd->cursor_buf && (cursor->set & FB_CUR_SETIMAGE)) {
		ret = mdss_smmu_dma_alloc_coherent(&pdev->dev,
			cursor_frame_size, (dma_addr_t *) &mfd->cursor_buf_phys,
			&mfd->cursor_buf_iova, mfd->cursor_buf,
			&mfd->cursor_buf_iova, &mfd->cursor_buf,
			GFP_KERNEL, MDSS_IOMMU_DOMAIN_UNSECURE);
		if (ret) {
			pr_err("can't allocate cursor buffer rc:%d\n", ret);
@@ -4894,7 +4894,7 @@ static int mdss_mdp_hw_cursor_update(struct msm_fb_data_type *mfd,

	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON);

	if (cursor->set & FB_CUR_SETIMAGE) {
	if (mfd->cursor_buf && (cursor->set & FB_CUR_SETIMAGE)) {
		u32 cursor_addr;
		ret = copy_from_user(mfd->cursor_buf, img->data,
				     img->width * img->height * 4);
+3 −3
Original line number Diff line number Diff line
@@ -323,7 +323,7 @@ static void mdss_smmu_unmap_dma_buf_v2(struct sg_table *table, int domain,
 * bank device
 */
static int mdss_smmu_dma_alloc_coherent_v2(struct device *dev, size_t size,
		dma_addr_t *phys, dma_addr_t *iova, void *cpu_addr,
		dma_addr_t *phys, dma_addr_t *iova, void **cpu_addr,
		gfp_t gfp, int domain)
{
	struct mdss_smmu_client *mdss_smmu = mdss_smmu_get_cb(domain);
@@ -332,8 +332,8 @@ static int mdss_smmu_dma_alloc_coherent_v2(struct device *dev, size_t size,
		return -EINVAL;
	}

	cpu_addr = dma_alloc_coherent(mdss_smmu->dev, size, iova, gfp);
	if (!cpu_addr) {
	*cpu_addr = dma_alloc_coherent(mdss_smmu->dev, size, iova, gfp);
	if (!*cpu_addr) {
		pr_err("dma alloc coherent failed!\n");
		return -ENOMEM;
	}
+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ static inline void mdss_smmu_unmap_dma_buf(struct sg_table *table, int domain,
}

static inline int mdss_smmu_dma_alloc_coherent(struct device *dev, size_t size,
		dma_addr_t *phys, dma_addr_t *iova, void *cpu_addr,
		dma_addr_t *phys, dma_addr_t *iova, void **cpu_addr,
		gfp_t gfp, int domain)
{
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();