Skip to contentSkip to conversation

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

PATCH In review Joonyoung Shim 3 participants 7 messages Jun 28, 2013 – Jul 8, 2013

lore
Share & tools
lore
#0 lore raw

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

Hello,

This is the second version patchset.

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.

To Laurent,

It is merged a patch to cache mapping from DRM Prime, can this patchset get your ack?

Changes from v1:
- rebased from drm-next branch of git://people.freedesktop.org/~airlied/linux
- fix to check whether gem_prime_mmap field is NULL
from "drm: add mmap function to prime helpers" commit

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 | 293 
+++++------------------------------
 drivers/gpu/drm/drm_prime.c          |   8 +-
 include/drm/drmP.h                   |   2 +
 include/drm/drm_gem_cma_helper.h     |  13 +-
 4 files changed, 60 insertions(+), 256 deletions(-)
Acked-by on the v2 series
#1 lore raw

Hi Joonyoung,

Thank you for the patches.

Quoted 11 lines · On Friday 28 June 2013 14:24:43 Joonyoung Shim wrote:

Hello,

This is the second version patchset.

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.

Quoted 4 lines

To Laurent,

It is merged a patch to cache mapping from DRM Prime, can this patchset get your ack?

There you go (and sorry for the late reply)

By the way, between the initial version of the GEM CMA PRIME patch and the version that got merged in v3.10, commit 011c2282c74db120f01a8414edc66c3f217f5511 ("drm: prime: fix refcounting on the dmabuf import error path") was introduced. The GEM CMA PRIME code in v3.10 thus has a refcounting bug :-(

Should this patch set go to -stable, or should we cook up a special fix ?

Quoted 17 lines

Changes from v1:
- rebased from drm-next branch of
git://people.freedesktop.org/~airlied/linux
- fix to check whether gem_prime_mmap field is NULL from "drm: add mmap function to prime helpers" commit

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 | 293 ++++---------------------------
  drivers/gpu/drm/drm_prime.c          |   8 +-
  include/drm/drmP.h                   |   2 +
  include/drm/drm_gem_cma_helper.h     |  13 +-
  4 files changed, 60 insertions(+), 256 deletions(-)
Signature · 3 lines
Regards,

Laurent Pinchart
#2 lore raw
Quoted 24 lines · Laurent Pinchart

Hi Joonyoung,

Thank you for the patches.

Quoted 11 lines · On Friday 28 June 2013 14:24:43 Joonyoung Shim wrote:

Hello,

This is the second version patchset.

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.

Quoted 4 lines

To Laurent,

It is merged a patch to cache mapping from DRM Prime, can this patchset get your ack?

There you go (and sorry for the late reply)

Quoted 7 lines

By the way, between the initial version of the GEM CMA PRIME patch and the version that got merged in v3.10, commit 011c2282c74db120f01a8414edc66c3f217f5511 ("drm: prime: fix refcounting on the dmabuf import error path") was introduced. The GEM CMA PRIME code in v3.10 thus has a refcounting bug :-(

Should this patch set go to -stable, or should we cook up a special fix ?

I'm not sure it's better to choose which way.

Dave, how we should do about that problem?

#3 lore raw
Quoted 35 lines · Joonyoung Shim
Quoted 34 lines · Laurent Pinchart

Hi Joonyoung,

Thank you for the patches.

Quoted 12 lines · On Friday 28 June 2013 14:24:43 Joonyoung Shim wrote:

Hello,

This is the second version patchset.

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.

Quoted 4 lines

To Laurent,

It is merged a patch to cache mapping from DRM Prime, can this patchset get your ack?

There you go (and sorry for the late reply)

By the way, between the initial version of the GEM CMA PRIME patch and the version that got merged in v3.10, commit 011c2282c74db120f01a8414edc66c3f217f5511 ("drm: prime: fix refcounting on the
dmabuf import error path") was introduced. The GEM CMA PRIME code in v3.10 thus has a refcounting bug :-(

Quoted 6 lines
Quoted 1 line

Should this patch set go to -stable, or should we cook up a special fix ?

I'm not sure it's better to choose which way.

Dave, how we should do about that problem?

I think a special fix for stable once we get these merged to Linus.

Dave.

#4 lore raw
Quoted 33 lines · Dave Airlie
Quoted 32 lines · Joonyoung Shim
Quoted 31 lines · Laurent Pinchart

Hi Joonyoung,

Thank you for the patches.

Quoted 11 lines · On Friday 28 June 2013 14:24:43 Joonyoung Shim wrote:

Hello,

This is the second version patchset.

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.

Quoted 4 lines

To Laurent,

It is merged a patch to cache mapping from DRM Prime, can this patchset get your ack?

There you go (and sorry for the late reply)

By the way, between the initial version of the GEM CMA PRIME patch and the version that got merged in v3.10, commit 011c2282c74db120f01a8414edc66c3f217f5511 ("drm: prime: fix refcounting on the
dmabuf import error path") was introduced. The GEM CMA PRIME code in v3.10 thus has a refcounting bug :-(

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Should this patch set go to -stable, or should we cook up a special fix ?

I'm not sure it's better to choose which way.

Dave, how we should do about that problem?

I think a special fix for stable once we get these merged to Linus.

OK, i will post a patch for a special fix.

Thanks.

#5 lore raw

Hi Joonyoung,

Quoted 33 lines · On Friday 05 July 2013 15:30:25 Joonyoung Shim wrote:
Quoted 32 lines · Dave Airlie
Quoted 31 lines · Joonyoung Shim
Quoted 29 lines · Laurent Pinchart
Quoted 11 lines · On Friday 28 June 2013 14:24:43 Joonyoung Shim wrote:

Hello,

This is the second version patchset.

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.

Quoted 4 lines

To Laurent,

It is merged a patch to cache mapping from DRM Prime, can this patchset get your ack?

There you go (and sorry for the late reply)

By the way, between the initial version of the GEM CMA PRIME patch and the version that got merged in v3.10, commit 011c2282c74db120f01a8414edc66c3f217f5511 ("drm: prime: fix refcounting on the dmabuf import error path") was introduced. The GEM CMA PRIME code in v3.10 thus has a refcounting bug :-(

Should this patch set go to -stable, or should we cook up a special fix ?

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

I'm not sure it's better to choose which way.

Dave, how we should do about that problem?

I think a special fix for stable once we get these merged to Linus.

OK, i will post a patch for a special fix.

Thank you.

We need to fix the problem for v3.11 as well, by applying either this set or the fix you have just sent. I have no strong preference regarding which patches to pick.

Signature · 3 lines
Regards,

Laurent Pinchart
#6 lore raw
Quoted 36 lines · Laurent Pinchart

Hi Joonyoung,

Quoted 33 lines · On Friday 05 July 2013 15:30:25 Joonyoung Shim wrote:
Quoted 32 lines · Dave Airlie
Quoted 31 lines · Joonyoung Shim
Quoted 20 lines · Laurent Pinchart
Quoted 11 lines · On Friday 28 June 2013 14:24:43 Joonyoung Shim wrote:

Hello,

This is the second version patchset.

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.

Quoted 4 lines

To Laurent,

It is merged a patch to cache mapping from DRM Prime, can this patchset get your ack?

There you go (and sorry for the late reply)

Quoted 8 lines

By the way, between the initial version of the GEM CMA PRIME patch and the version that got merged in v3.10, commit 011c2282c74db120f01a8414edc66c3f217f5511 ("drm: prime: fix refcounting on the dmabuf import error path") was introduced. The GEM CMA PRIME code in v3.10 thus has a refcounting bug :-(

Should this patch set go to -stable, or should we cook up a special fix ?

I'm not sure it's better to choose which way.

Quoted 9 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line

Dave, how we should do about that problem?

I think a special fix for stable once we get these merged to Linus.

OK, i will post a patch for a special fix.

Thank you.

We need to fix the problem for v3.11 as well, by applying either this set or the fix you have just sent. I have no strong preference regarding which patches to pick.

I also don't care, but i can report v3 patchset based on a patch for a special fix for commit consistency.