[PATCH v2] DRM: add drm gem cma helper

2012-06-27 Thread Sascha Hauer
Hi Laurent, On Wed, Jun 27, 2012 at 01:38:39PM +0200, Laurent Pinchart wrote: > Hi Sascha, > > On Thursday 31 May 2012 10:08:54 Sascha Hauer wrote: > > Many embedded drm devices do not have a IOMMU and no dedicated > > memory for graphics. These devices use cma (Contiguous Memory > > Allocator) b

[PATCH v2] DRM: add drm gem cma helper

2012-06-27 Thread Laurent Pinchart
Hi Sascha, On Thursday 31 May 2012 10:08:54 Sascha Hauer wrote: > Many embedded drm devices do not have a IOMMU and no dedicated > memory for graphics. These devices use cma (Contiguous Memory > Allocator) backed graphics memory. This patch provides helper > functions to be able to share the code.

Re: [PATCH v2] DRM: add drm gem cma helper

2012-06-27 Thread Sascha Hauer
Hi Laurent, On Wed, Jun 27, 2012 at 01:38:39PM +0200, Laurent Pinchart wrote: > Hi Sascha, > > On Thursday 31 May 2012 10:08:54 Sascha Hauer wrote: > > Many embedded drm devices do not have a IOMMU and no dedicated > > memory for graphics. These devices use cma (Contiguous Memory > > Allocator) b

Re: [PATCH v2] DRM: add drm gem cma helper

2012-06-27 Thread Laurent Pinchart
Hi Sascha, On Thursday 31 May 2012 10:08:54 Sascha Hauer wrote: > Many embedded drm devices do not have a IOMMU and no dedicated > memory for graphics. These devices use cma (Contiguous Memory > Allocator) backed graphics memory. This patch provides helper > functions to be able to share the code.

[PATCH v2] DRM: add drm gem cma helper

2012-06-06 Thread Sascha Hauer
On Tue, Jun 05, 2012 at 10:54:10PM +0900, InKi Dae wrote: > 2012/6/5 Sascha Hauer : > > On Fri, Jun 01, 2012 at 12:29:47AM +0900, InKi Dae wrote: > >> Hi Sascha, > >> > >> >> +struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, > >> >> + ? ? ? ? ? ? unsigned int size) > >> >> +{ >

Re: [PATCH v2] DRM: add drm gem cma helper

2012-06-06 Thread Sascha Hauer
On Tue, Jun 05, 2012 at 10:54:10PM +0900, InKi Dae wrote: > 2012/6/5 Sascha Hauer : > > On Fri, Jun 01, 2012 at 12:29:47AM +0900, InKi Dae wrote: > >> Hi Sascha, > >> > >> >> +struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, > >> >> +             unsigned int size) > >> >> +{ >

[PATCH v2] DRM: add drm gem cma helper

2012-06-05 Thread InKi Dae
2012/6/5 Sascha Hauer : > On Fri, Jun 01, 2012 at 12:29:47AM +0900, InKi Dae wrote: >> Hi Sascha, >> >> >> +struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, >> >> + ? ? ? ? ? ? unsigned int size) >> >> +{ >> >> + ? ? struct drm_gem_cma_object *cma_obj; >> >> + ? ? struct drm_ge

[PATCH v2] DRM: add drm gem cma helper

2012-06-05 Thread Laurent Pinchart
Hi Sascha, On Tuesday 05 June 2012 09:49:48 Sascha Hauer wrote: > On Thu, May 31, 2012 at 11:36:15AM +0200, Laurent Pinchart wrote: > > Hi Sascha, > > > > > + depends on DRM > > > + help > > > + Choose this if you need the GEM cma helper functions > > > > I would put CMA in uppercase, but that

[PATCH v2] DRM: add drm gem cma helper

2012-06-05 Thread Sascha Hauer
On Fri, Jun 01, 2012 at 12:29:47AM +0900, InKi Dae wrote: > Hi Sascha, > > >> +struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, > >> + ? ? ? ? ? ? unsigned int size) > >> +{ > >> + ? ? struct drm_gem_cma_object *cma_obj; > >> + ? ? struct drm_gem_object *gem_obj; > >> + ? ? in

[PATCH v2] DRM: add drm gem cma helper

2012-06-05 Thread Sascha Hauer
On Thu, May 31, 2012 at 11:36:15AM +0200, Laurent Pinchart wrote: > Hi Sascha, > > > + depends on DRM > > + help > > + Choose this if you need the GEM cma helper functions > > I would put CMA in uppercase, but that's just nitpicking. > > BTW this helper is not strictly dedicated to CMA.

Re: [PATCH v2] DRM: add drm gem cma helper

2012-06-05 Thread InKi Dae
2012/6/5 Sascha Hauer : > On Fri, Jun 01, 2012 at 12:29:47AM +0900, InKi Dae wrote: >> Hi Sascha, >> >> >> +struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, >> >> +             unsigned int size) >> >> +{ >> >> +     struct drm_gem_cma_object *cma_obj; >> >> +     struct drm_ge

Re: [PATCH v2] DRM: add drm gem cma helper

2012-06-05 Thread Laurent Pinchart
Hi Sascha, On Tuesday 05 June 2012 09:49:48 Sascha Hauer wrote: > On Thu, May 31, 2012 at 11:36:15AM +0200, Laurent Pinchart wrote: > > Hi Sascha, > > > > > + depends on DRM > > > + help > > > + Choose this if you need the GEM cma helper functions > > > > I would put CMA in uppercase, but that

Re: [PATCH v2] DRM: add drm gem cma helper

2012-06-05 Thread Sascha Hauer
On Fri, Jun 01, 2012 at 12:29:47AM +0900, InKi Dae wrote: > Hi Sascha, > > >> +struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, > >> +             unsigned int size) > >> +{ > >> +     struct drm_gem_cma_object *cma_obj; > >> +     struct drm_gem_object *gem_obj; > >> +     in

Re: [PATCH v2] DRM: add drm gem cma helper

2012-06-05 Thread Sascha Hauer
On Thu, May 31, 2012 at 11:36:15AM +0200, Laurent Pinchart wrote: > Hi Sascha, > > > + depends on DRM > > + help > > + Choose this if you need the GEM cma helper functions > > I would put CMA in uppercase, but that's just nitpicking. > > BTW this helper is not strictly dedicated to CMA.

[PATCH v2] DRM: add drm gem cma helper

2012-06-04 Thread Lars-Peter Clausen
On 05/31/2012 10:08 AM, Sascha Hauer wrote: > [...] > diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c > new file mode 100644 > index 000..d8c0dc7 > --- /dev/null > +++ b/drivers/gpu/drm/drm_gem_cma_helper.c > @@ -0,0 +1,243 @@ > +/* > + * drm gem cma (co

Re: [PATCH v2] DRM: add drm gem cma helper

2012-06-04 Thread Lars-Peter Clausen
On 05/31/2012 10:08 AM, Sascha Hauer wrote: > [...] > diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c > new file mode 100644 > index 000..d8c0dc7 > --- /dev/null > +++ b/drivers/gpu/drm/drm_gem_cma_helper.c > @@ -0,0 +1,243 @@ > +/* > + * drm gem cma (co

[PATCH v2] DRM: add drm gem cma helper

2012-06-01 Thread InKi Dae
Hi Sascha, it's good try to avoid demand paging way by page fault handler. actually, we don't need demand paging way on non-iommu system. I looked into your previous patch and I realized that patch was based on old exynos driver. now patch looks almostly good to me and below is my comments minor.

[PATCH v2] DRM: add drm gem cma helper

2012-05-31 Thread Laurent Pinchart
Hi Sascha, Thanks for the patch. Here's a bit more extensive review. On Thursday 31 May 2012 10:08:54 Sascha Hauer wrote: > Many embedded drm devices do not have a IOMMU and no dedicated > memory for graphics. These devices use cma (Contiguous Memory > Allocator) backed graphics memory. This patc

[PATCH v2] DRM: add drm gem cma helper

2012-05-31 Thread Sascha Hauer
Many embedded drm devices do not have a IOMMU and no dedicated memory for graphics. These devices use cma (Contiguous Memory Allocator) backed graphics memory. This patch provides helper functions to be able to share the code. Signed-off-by: Sascha Hauer --- changes since v1: - map whole buffer

Re: [PATCH v2] DRM: add drm gem cma helper

2012-05-31 Thread InKi Dae
Hi Sascha, it's good try to avoid demand paging way by page fault handler. actually, we don't need demand paging way on non-iommu system. I looked into your previous patch and I realized that patch was based on old exynos driver. now patch looks almostly good to me and below is my comments minor.

Re: [PATCH v2] DRM: add drm gem cma helper

2012-05-31 Thread Laurent Pinchart
Hi Sascha, Thanks for the patch. Here's a bit more extensive review. On Thursday 31 May 2012 10:08:54 Sascha Hauer wrote: > Many embedded drm devices do not have a IOMMU and no dedicated > memory for graphics. These devices use cma (Contiguous Memory > Allocator) backed graphics memory. This patc

[PATCH v2] DRM: add drm gem cma helper

2012-05-31 Thread Sascha Hauer
Many embedded drm devices do not have a IOMMU and no dedicated memory for graphics. These devices use cma (Contiguous Memory Allocator) backed graphics memory. This patch provides helper functions to be able to share the code. Signed-off-by: Sascha Hauer --- changes since v1: - map whole buffer