Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-29 Thread Rob Clark
On Mon, Nov 16, 2020 at 9:55 AM Jonathan Marek wrote: > > On 11/16/20 12:50 PM, Rob Clark wrote: > > On Mon, Nov 16, 2020 at 9:33 AM Christoph Hellwig wrote: > >> > >> On Sat, Nov 14, 2020 at 03:07:20PM -0500, Jonathan Marek wrote: > >>> qcom's vulkan driver has nonCoherentAtomSize=1, and it

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-16 Thread Jonathan Marek
On 11/16/20 12:50 PM, Rob Clark wrote: On Mon, Nov 16, 2020 at 9:33 AM Christoph Hellwig wrote: On Sat, Nov 14, 2020 at 03:07:20PM -0500, Jonathan Marek wrote: qcom's vulkan driver has nonCoherentAtomSize=1, and it looks like dma_sync_single_for_cpu() does deal in some way with the partial

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-16 Thread Rob Clark
On Mon, Nov 16, 2020 at 9:33 AM Christoph Hellwig wrote: > > On Sat, Nov 14, 2020 at 03:07:20PM -0500, Jonathan Marek wrote: > > qcom's vulkan driver has nonCoherentAtomSize=1, and it looks like > > dma_sync_single_for_cpu() does deal in some way with the partial cache line > > case, although I'm

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-16 Thread Christoph Hellwig
On Sat, Nov 14, 2020 at 03:07:20PM -0500, Jonathan Marek wrote: > qcom's vulkan driver has nonCoherentAtomSize=1, and it looks like > dma_sync_single_for_cpu() does deal in some way with the partial cache line > case, although I'm not sure that means we can have a nonCoherentAtomSize=1. No, it

Re: [Freedreno] [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-16 Thread Jordan Crouse
On Sat, Nov 14, 2020 at 11:39:45AM -0800, Rob Clark wrote: > On Sat, Nov 14, 2020 at 10:58 AM Jonathan Marek wrote: > > > > On 11/14/20 1:46 PM, Rob Clark wrote: > > > On Sat, Nov 14, 2020 at 8:24 AM Christoph Hellwig wrote: > > >> > > >> On Sat, Nov 14, 2020 at 10:17:12AM -0500, Jonathan Marek

Re: [Freedreno] [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-16 Thread Jordan Crouse
On Sat, Nov 14, 2020 at 10:17:12AM -0500, Jonathan Marek wrote: > This makes it possible to use the non-coherent cached MSM_BO_CACHED mode, > which otherwise doesn't provide any method for cleaning/invalidating the > cache to sync with the device. > > Signed-off-by: Jonathan Marek > --- >

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-14 Thread Rob Clark
On Sat, Nov 14, 2020 at 12:10 PM Jonathan Marek wrote: > > On 11/14/20 2:39 PM, Rob Clark wrote: > > On Sat, Nov 14, 2020 at 10:58 AM Jonathan Marek wrote: > >> > >> On 11/14/20 1:46 PM, Rob Clark wrote: > >>> On Sat, Nov 14, 2020 at 8:24 AM Christoph Hellwig wrote: > > On Sat, Nov

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-14 Thread Jonathan Marek
On 11/14/20 2:39 PM, Rob Clark wrote: On Sat, Nov 14, 2020 at 10:58 AM Jonathan Marek wrote: On 11/14/20 1:46 PM, Rob Clark wrote: On Sat, Nov 14, 2020 at 8:24 AM Christoph Hellwig wrote: On Sat, Nov 14, 2020 at 10:17:12AM -0500, Jonathan Marek wrote: +void msm_gem_sync_cache(struct

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-14 Thread Rob Clark
On Sat, Nov 14, 2020 at 10:58 AM Jonathan Marek wrote: > > On 11/14/20 1:46 PM, Rob Clark wrote: > > On Sat, Nov 14, 2020 at 8:24 AM Christoph Hellwig wrote: > >> > >> On Sat, Nov 14, 2020 at 10:17:12AM -0500, Jonathan Marek wrote: > >>> +void msm_gem_sync_cache(struct drm_gem_object *obj,

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-14 Thread Jonathan Marek
On 11/14/20 1:46 PM, Rob Clark wrote: On Sat, Nov 14, 2020 at 8:24 AM Christoph Hellwig wrote: On Sat, Nov 14, 2020 at 10:17:12AM -0500, Jonathan Marek wrote: +void msm_gem_sync_cache(struct drm_gem_object *obj, uint32_t flags, + size_t range_start, size_t range_end) +{ +

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-14 Thread Rob Clark
On Sat, Nov 14, 2020 at 8:24 AM Christoph Hellwig wrote: > > On Sat, Nov 14, 2020 at 10:17:12AM -0500, Jonathan Marek wrote: > > +void msm_gem_sync_cache(struct drm_gem_object *obj, uint32_t flags, > > + size_t range_start, size_t range_end) > > +{ > > + struct msm_gem_object

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-14 Thread Christoph Hellwig
On Sat, Nov 14, 2020 at 10:17:12AM -0500, Jonathan Marek wrote: > +void msm_gem_sync_cache(struct drm_gem_object *obj, uint32_t flags, > + size_t range_start, size_t range_end) > +{ > + struct msm_gem_object *msm_obj = to_msm_bo(obj); > + struct device *dev =

[RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-14 Thread Jonathan Marek
This makes it possible to use the non-coherent cached MSM_BO_CACHED mode, which otherwise doesn't provide any method for cleaning/invalidating the cache to sync with the device. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/msm_drv.c | 21 +

[PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-06 Thread Jonathan Marek
This makes it possible to use the non-coherent cached MSM_BO_CACHED mode, which otherwise doesn't provide any method for cleaning/invalidating the cache to sync with the device. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/msm_drv.c | 21 +