drm/exynos: Add fallback option to get non physically contiguous memory for gem_dumb_create
Subsystems (3)
PATCH 1/1 drm/exynos: Add fallback option to get non physically contiguous memory for gem_dumb_create
To address the case where physically contiguous memory MAY NOT be a mandatory requirement for framebuffer for the application calling exynos_drm_gem_dumb_create, the patch adds a feature to get non physically contiguous memory for framebuffer, if physically contiguous memory allocation fails and if IOMMU is supported.
--- drivers/gpu/drm/exynos/exynos_drm_gem.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/gpu/drm/exynos/exynos_drm_gem.c +13 -0
@@ -17,6 +17,7 @@#include "exynos_drm_drv.h" #include "exynos_drm_gem.h" #include "exynos_drm_buf.h" +#include "exynos_drm_iommu.h" static unsigned int convert_to_vm_err_msg (int msg) {
@@ -666,6 +667,18 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv, exynos_gem_obj =exynos_drm_gem_create (dev,EXYNOS_BO_CONTIG |EXYNOS_BO_WC , args->size); +/* +* If physically contiguous memory allocation fails and if IOMMU is +* supported then try to get buffer from non physically contiguous +* memory area. +*/ +if (IS_ERR (exynos_gem_obj) &&is_drm_iommu_supported (dev)) { +dev_warn (dev->dev,"contiguous FB allocation failed, falling back to non-contiguous\n" ); + exynos_gem_obj =exynos_drm_gem_create (dev, +EXYNOS_BO_NONCONTIG |EXYNOS_BO_WC , + args->size); + } +if (IS_ERR (exynos_gem_obj))return PTR_ERR (exynos_gem_obj);
Signature · 1 line
1.7.9.5
adding linux-samsung-soc mailing list and Dave Airlie.
Quoted 49 lines · Vikas Sajjan
To address the case where physically contiguous memory MAY NOT be a mandatory requirement for framebuffer for the application calling
exynos_drm_gem_dumb_create, the patch adds a feature to get non physically contiguous memory for framebuffer, if physically contiguous memory allocation fails and if IOMMU is supported.Signed-off-by Vikas Sajjan <[email protected]>Signed-off-by Arun Kumar <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_gem.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/exynos/exynos_drm_gem.c +13
-1@@ -17,6 +17,7 @@#include "exynos_drm_drv.h" #include "exynos_drm_gem.h" #include "exynos_drm_buf.h" +#include "exynos_drm_iommu.h" static unsigned int convert_to_vm_err_msg (int msg) {@@ -666,6 +667,18 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv, exynos_gem_obj =exynos_drm_gem_create (dev,EXYNOS_BO_CONTIG |EXYNOS_BO_WC , args->size); +/* +* If physically contiguous memory allocation fails and if IOMMU is +* supported then try to get buffer from non physically contiguous +* memory area. +*/ +if (IS_ERR (exynos_gem_obj) &&is_drm_iommu_supported (dev)) { +dev_warn (dev->dev,"contiguous FB allocation failed, falling back to non-contiguous\n" ); + exynos_gem_obj =exynos_drm_gem_create (dev, +EXYNOS_BO_NONCONTIG |EXYNOS_BO_WC , + args->size); + } +if (IS_ERR (exynos_gem_obj))return PTR_ERR (exynos_gem_obj); --1.7.9.5
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): 1377239706-17804-1-git-send-email-vikas.sajjan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Inki Dae
AppliedApplied.
Thanks,
Inki Dae
Quoted 10 lines
-----Original Message-----
From: Vikas Sajjan [mailto:[email protected]]
Sent: Friday, August 23, 2013 3:35 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; laurent.pinchart-ryLnwIuWjnjg/[email protected]; [email protected]; [email protected]
Subject: [PATCH] drm/exynos: Add fallback option to get non physically
contiguous memory forgem_dumb_create
Quoted 7 lines
To address the case where physically contiguous memory MAY NOT be a mandatory
requirement for framebuffer for the application callingexynos_drm_gem_dumb_create,
the patch adds a feature to get non physically contiguous memory for framebuffer,
if physically contiguous memory allocation fails and if IOMMU is
supported.
Quoted 43 lines
Signed-off-by Vikas Sajjan <[email protected]>Signed-off-by Arun Kumar <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_gem.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/exynos/exynos_drm_gem.c +13
-0@@ -17,6 +17,7 @@#include "exynos_drm_drv.h" #include "exynos_drm_gem.h" #include "exynos_drm_buf.h" +#include "exynos_drm_iommu.h" static unsigned int convert_to_vm_err_msg (int msg) {@@ -666,6 +667,18 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv, exynos_gem_obj =exynos_drm_gem_create (dev,EXYNOS_BO_CONTIG |EXYNOS_BO_WC , args->size); +/* +* If physically contiguous memory allocation fails and if IOMMU is +* supported then try to get buffer from non physically contiguous +* memory area. +*/ +if (IS_ERR (exynos_gem_obj) &&is_drm_iommu_supported (dev)) { + dev_warn(dev->dev, "contiguous FB allocation failed, falling back to non-contiguous\n"); + exynos_gem_obj = exynos_drm_gem_create(dev, +EXYNOS_BO_NONCONTIG |EXYNOS_BO_WC , + args->size); + } +if (IS_ERR (exynos_gem_obj))return
PTR_ERR(exynos_gem_obj);--
1.7.9.5
Thanks.
Quoted 67 lines · Inki Dae
Applied.
Thanks,
Inki DaeQuoted 10 lines
-----Original Message-----
From: Vikas Sajjan [mailto:[email protected]]
Sent: Friday, August 23, 2013 3:35 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH] drm/exynos: Add fallback option to get non physically contiguous memory forgem_dumb_createQuoted 7 lines
To address the case where physically contiguous memory MAY NOT be a mandatory
requirement for framebuffer for the application callingexynos_drm_gem_dumb_create,
the patch adds a feature to get non physically contiguous memory for framebuffer,
if physically contiguous memory allocation fails and if IOMMU issupported.
Quoted 43 lines
Signed-off-by Vikas Sajjan <[email protected]>Signed-off-by Arun Kumar <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_gem.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/exynos/exynos_drm_gem.c +13
-0@@ -17,6 +17,7 @@#include "exynos_drm_drv.h" #include "exynos_drm_gem.h" #include "exynos_drm_buf.h" +#include "exynos_drm_iommu.h" static unsigned int convert_to_vm_err_msg (int msg) {@@ -666,6 +667,18 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv, exynos_gem_obj =exynos_drm_gem_create (dev,EXYNOS_BO_CONTIG |EXYNOS_BO_WC , args->size); +/* +* If physically contiguous memory allocation fails and if IOMMU is +* supported then try to get buffer from non physically contiguous +* memory area. +*/ +if (IS_ERR (exynos_gem_obj) &&is_drm_iommu_supported (dev)) { + dev_warn(dev->dev, "contiguous FB allocation failed, falling back to non-contiguous\n"); + exynos_gem_obj = exynos_drm_gem_create(dev, +EXYNOS_BO_NONCONTIG |EXYNOS_BO_WC , + args->size); + } +if (IS_ERR (exynos_gem_obj))return PTR_ERR(exynos_gem_obj);--
1.7.9.5
Signature · 2 lines
Thanks and Regards Vikas Sajjan
Inki Dae
maintainerOne more thing, changed the subject to "Consider fallback option to allocation fail". The subject is too long :)
Thanks,
Inki Dae
Quoted 55 lines
-----Original Message-----
From: [email protected] [mailto:linux-samsung-soc- [email protected]] On Behalf Of Vikas Sajjan
Sent: Tuesday, August 27, 2013 12:05 PM
To: Inki Dae
Cc: DRI mailing list; kgene.kim; Sylwester Nawrocki; Rob Clark; Tomasz Figa; Laurent Pinchart; Patch Tracking; [email protected]; sunil joshi; [email protected]
Subject: Re: [PATCH] drm/exynos: Add fallback option to get non physically contiguous memory forgem_dumb_createThanks.
Quoted 41 lines · Inki Dae
Applied.
Thanks,
Inki DaeQuoted 10 lines
-----Original Message-----
From: Vikas Sajjan [mailto:[email protected]]
Sent: Friday, August 23, 2013 3:35 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH] drm/exynos: Add fallback option to get non physically contiguous memory forgem_dumb_createQuoted 7 lines
To address the case where physically contiguous memory MAY NOT be a mandatory
requirement for framebuffer for the application callingexynos_drm_gem_dumb_create,
the patch adds a feature to get non physically contiguous memory for framebuffer,
if physically contiguous memory allocation fails and if IOMMU issupported.
Quoted 18 lines
Signed-off-by Vikas Sajjan <[email protected]>Signed-off-by Arun Kumar <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_gem.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/exynos/exynos_drm_gem.c +1
-0@@ -17,6 +17,7 @@#include "exynos_drm_drv.h" #include "exynos_drm_gem.h" #include "exynos_drm_buf.h" +#include "exynos_drm_iommu.h"
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c int exynos_drm_gem_dumb_create(struct drm_file · line 670
Quoted 7 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c +0
-0static unsigned int convert_to_vm_err_msg (int msg) {@@ -666,6 +667,18 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv, exynos_gem_obj = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG | EXYNOS_BO_WC,
args->size);
Quoted 4 lines
Quoted 2 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c int exynos_drm_gem_dumb_create(struct drm_file · line 672
Quoted 2 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c +2
-0+/* +* If physically contiguous memory allocation fails and if IOMMU is
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/exynos/exynos_drm_gem.c +1
-0+* supported then try to get buffer from non physically
contiguous
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c int exynos_drm_gem_dumb_create(struct drm_file *file_priv,
Quoted 4 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c +4
-0+* memory area. +*/ +if (IS_ERR (exynos_gem_obj) &&is_drm_iommu_supported (dev)) { + dev_warn(dev->dev, "contiguous FB allocation failed,
falling
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c int exynos_drm_gem_dumb_create(struct drm_file · line 680
Quoted 3 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c +2
-0back to non-contiguous\n"); + exynos_gem_obj = exynos_drm_gem_create(dev, + EXYNOS_BO_NONCONTIG |
EXYNOS_BO_WC,
Quoted 20 lines
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c +3
-0+ args->size); + } +if (IS_ERR (exynos_gem_obj))return PTR_ERR(exynos_gem_obj);--
1.7.9.5--
Thanks and Regards
Vikas Sajjan
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung- soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
OK.
Quoted 106 lines · Inki Dae
One more thing, changed the subject to "Consider fallback option to allocation fail". The subject is too long :)
Thanks,
Inki DaeQuoted 55 lines
-----Original Message-----
From: [email protected] [mailto:linux-samsung-soc- [email protected]] On Behalf Of Vikas Sajjan
Sent: Tuesday, August 27, 2013 12:05 PM
To: Inki Dae
Cc: DRI mailing list; kgene.kim; Sylwester Nawrocki; Rob Clark; Tomasz Figa; Laurent Pinchart; Patch Tracking; [email protected]; sunil joshi; [email protected]
Subject: Re: [PATCH] drm/exynos: Add fallback option to get non physically contiguous memory forgem_dumb_createThanks.
Quoted 41 lines · Inki Dae
Applied.
Thanks,
Inki DaeQuoted 10 lines
-----Original Message-----
From: Vikas Sajjan [mailto:[email protected]]
Sent: Friday, August 23, 2013 3:35 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH] drm/exynos: Add fallback option to get non physically contiguous memory forgem_dumb_createQuoted 7 lines
To address the case where physically contiguous memory MAY NOT be a mandatory
requirement for framebuffer for the application callingexynos_drm_gem_dumb_create,
the patch adds a feature to get non physically contiguous memory for framebuffer,
if physically contiguous memory allocation fails and if IOMMU issupported.
Quoted 18 lines
Signed-off-by Vikas Sajjan <[email protected]>Signed-off-by Arun Kumar <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_gem.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/exynos/exynos_drm_gem.c +1
-0@@ -17,6 +17,7 @@#include "exynos_drm_drv.h" #include "exynos_drm_gem.h" #include "exynos_drm_buf.h" +#include "exynos_drm_iommu.h" Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c int exynos_drm_gem_dumb_create(struct drm_file · line 670
Quoted 7 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c +0
-0static unsigned int convert_to_vm_err_msg (int msg) {@@ -666,6 +667,18 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv, exynos_gem_obj = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG | EXYNOS_BO_WC,
args->size);Quoted 4 lines
Quoted 2 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c int exynos_drm_gem_dumb_create(struct drm_file · line 672
Quoted 2 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c +2
-0+/* +* If physically contiguous memory allocation fails and if IOMMU is
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/exynos/exynos_drm_gem.c +1
-0+* supported then try to get buffer from non physically contiguous
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c int exynos_drm_gem_dumb_create(struct drm_file *file_priv,
Quoted 4 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c +4
-0+* memory area. +*/ +if (IS_ERR (exynos_gem_obj) &&is_drm_iommu_supported (dev)) { + dev_warn(dev->dev, "contiguous FB allocation failed,falling
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c int exynos_drm_gem_dumb_create(struct drm_file · line 680
Quoted 3 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c +2
-0back to non-contiguous\n"); + exynos_gem_obj = exynos_drm_gem_create(dev, + EXYNOS_BO_NONCONTIG |
EXYNOS_BO_WC,Quoted 20 lines
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/exynos/exynos_drm_gem.c +3
-0+ args->size); + } +if (IS_ERR (exynos_gem_obj))return PTR_ERR(exynos_gem_obj);--
1.7.9.5--
Thanks and Regards
Vikas Sajjan
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung- soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Thanks and Regards Vikas Sajjan