Re: [PATCH 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg*

From: Jordan Crouse
Date: Mon Nov 26 2018 - 13:46:39 EST


On Thu, Nov 22, 2018 at 03:37:54PM +0530, Vivek Gautam wrote:
> Hi Tomasz, Jordan,
>
>
> On 11/21/2018 9:18 AM, Tomasz Figa wrote:

> >
> >>>+ for_each_sg(msm_obj->sgt->sgl, s,
> >>>+ msm_obj->sgt->nents, i)
> >>>+ sg_dma_address(s) = sg_phys(s);
> >>>+
> >>I'm wondering - wouldn't we want to do this association for cached buffers to so
> >>we could sync them correctly in cpu_prep and cpu_fini? Maybe it wouldn't hurt
> >>to put this association in the main path (obviously the sync should stay inside
> >>the conditional for uncached buffers).
> >>
>
> Sure, I will move this out of the conditional check.
>
> >I guess it wouldn't hurt indeed. Note that cpu_prep/fini seem to be
> >missing the sync call currently.
>
> I can't say I understand the usage of cpu_prep and cpu_fini(). But I can add
> the necessary support if you can point me in the right direction.

Not needed for this iteration. We don't have support in those functions for
cached buffers right now so continuing to not support it wouldn't hurt.

Jordan
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project