Skip to contentSkip to conversation

drm/cma: use prim helpers instead GEM CMA specific dma_buf functionality

PATCH Superseded Joonyoung Shim 2 participants 4 messages Jun 12, 2013 – Jun 19, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover drm/cma: use prim helpers instead GEM CMA specific dma_buf functionality

Hi,

GEM CMA supports dma_buf but it needs GEM CMA specific functionality for dma_buf. We can use prime helpers for dma_buf by commit 89177644a7b6306e6084a89eab7e290f4bfef397 "drm: add prime helpers", so this patchset is to replace from using GEM CMA specific functions to using prime helpers.

Thanks.

Joonyoung Shim (3):
drm: add mmap function to prime helpers
drm/cma: add low-level hook functions to use prime helpers drm/cma: remove GEM CMA specific dma_buf functionality

 drivers/gpu/drm/drm_gem_cma_helper.c | 291 
+++++------------------------------
 drivers/gpu/drm/drm_prime.c          |   5 +-
 include/drm/drmP.h                   |   2 +
 include/drm/drm_gem_cma_helper.h     |  13 +-
 4 files changed, 56 insertions(+), 255 deletions(-)
#1 lore raw

Hi Joonyoung,

Thank you for the patches. I'll try to review and test them next week.

Quoted 20 lines · On Wednesday 12 June 2013 22:16:14 Joonyoung Shim wrote:

Hi,

GEM CMA supports dma_buf but it needs GEM CMA specific functionality for dma_buf. We can use prime helpers for dma_buf by commit 89177644a7b6306e6084a89eab7e290f4bfef397 "drm: add prime helpers", so this patchset is to replace from using GEM CMA specific functions to using prime helpers.

Thanks.

Joonyoung Shim (3):
drm: add mmap function to prime helpers
drm/cma: add low-level hook functions to use prime helpers drm/cma: remove GEM CMA specific dma_buf functionality

  drivers/gpu/drm/drm_gem_cma_helper.c | 291 ++++---------------------------
  drivers/gpu/drm/drm_prime.c          |   5 +-
  include/drm/drmP.h                   |   2 +
  include/drm/drm_gem_cma_helper.h     |  13 +-
  4 files changed, 56 insertions(+), 255 deletions(-)
Signature · 3 lines
Regards,

Laurent Pinchart
#2 lore raw
In reply to Joonyoung Shim

Hi Joonyoung,

Quoted 7 lines · On Wednesday 12 June 2013 22:16:14 Joonyoung Shim wrote:

Hi,

GEM CMA supports dma_buf but it needs GEM CMA specific functionality for dma_buf. We can use prime helpers for dma_buf by commit 89177644a7b6306e6084a89eab7e290f4bfef397 "drm: add prime helpers", so this patchset is to replace from using GEM CMA specific functions to using prime helpers.

Overall this looks good to me, except the that prime helpers don't cache mappings, unlike the current implementation in the GEM CMA helpers. Could that be fixed in the prime helpers first ?

Quoted 12 lines

Thanks.

Joonyoung Shim (3):
drm: add mmap function to prime helpers
drm/cma: add low-level hook functions to use prime helpers drm/cma: remove GEM CMA specific dma_buf functionality

  drivers/gpu/drm/drm_gem_cma_helper.c | 291 ++++---------------------------
  drivers/gpu/drm/drm_prime.c          |   5 +-
  include/drm/drmP.h                   |   2 +
  include/drm/drm_gem_cma_helper.h     |  13 +-
  4 files changed, 56 insertions(+), 255 deletions(-)
Signature · 3 lines
Regards,

Laurent Pinchart
#3 lore raw
Quoted 5 lines · Laurent Pinchart

Hi Joonyoung,

Quoted 2 lines · On Wednesday 12 June 2013 22:16:14 Joonyoung Shim wrote:

Hi,

Quoted 8 lines
Quoted 5 lines

GEM CMA supports dma_buf but it needs GEM CMA specific functionality for dma_buf. We can use prime helpers for dma_buf by commit 89177644a7b6306e6084a89eab7e290f4bfef397 "drm: add prime helpers", so this patchset is to replace from using GEM CMA specific functions to using prime helpers.

Overall this looks good to me, except the that prime helpers don't cache mappings, unlike the current implementation in the GEM CMA helpers. Could that be fixed in the prime helpers first ?

Right, i will update it first.

Thanks.