dma-buf: suppress warnings for direct dma clients

Client with direct dma will have multiple dma buffer segments.
Warning is raised as partial cmo only supported with one segment.
Suppress these warnings as this is known limitation.

Change-Id: Ie534b2b11121e60bf87f671b14ea1b1fd57633af
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
This commit is contained in:
Srinivasarao Pathipati 2022-02-14 01:30:02 +05:30
commit ccc854ca55
2 changed files with 10 additions and 6 deletions

View file

@ -360,9 +360,11 @@ static int mem_buf_sgl_sync_range(struct device *dev, struct scatterlist *sgl,
break;
if (i > 0) {
pr_warn_ratelimited("Partial cmo only supported with 1 segment\n"
"is dma_set_max_seg_size being set on dev:%s\n",
dev_name(dev));
if (get_dma_ops(dev)) {
pr_warn_ratelimited("Partial cmo only supported with 1 segment\n"
"is dma_set_max_seg_size being set on dev:%s\n",
dev_name(dev));
}
return -EINVAL;
}
}

View file

@ -500,9 +500,11 @@ static int ion_sgl_sync_range(struct device *dev, struct scatterlist *sgl,
break;
if (i > 0) {
pr_warn_ratelimited("Partial cmo only supported with 1 segment\n"
"is dma_set_max_seg_size being set on dev:%s\n",
dev_name(dev));
if (get_dma_ops(dev)) {
pr_warn_ratelimited("Partial cmo only supported with 1 segment\n"
"is dma_set_max_seg_size being set on dev:%s\n",
dev_name(dev));
}
return -EINVAL;
}
}