From: Inki Dae <inki.dae@samsung.com>
To: Shuah Khan <shuahkh@osg.samsung.com>,
jy0922.shim@samsung.com, sw0312.kim@samsung.com,
kyungmin.park@samsung.com, airlied@linux.ie, kgene@kernel.org,
k.kozlowski@samsung.com
Cc: linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem
Date: Thu, 11 Aug 2016 07:59:57 +0900 [thread overview]
Message-ID: <57ABB1ED.1080301@samsung.com> (raw)
In-Reply-To: <1470850251-9150-1-git-send-email-shuahkh@osg.samsung.com>
Hi Shuah,
2016년 08월 11일 02:30에 Shuah Khan 이(가) 쓴 글:
> Fix exynos_drm_gem_create_ioctl() attempts to allocate non-contiguous GEM
> memory without IOMMU. In this case, there is no point in attempting to
DRM gem can be used for Non-DRM drivers such as GPU, V4L2 based Multimedia device and other DMA devices.
Even though IOMMU support is disabled, other framework based DMA drivers can use IOMMU - i.e., GPU driver -
and they can use non-contiguous GEM buffer through UMM. (DMABUF)
So GEM allocation type is not dependent on IOMMU.
Thanks,
Inki Dae
> allocate non-contiguous memory, only to return error during the next step
> from exynos_drm_framebuffer_init() which leads to display manager failing
> to start.
>
> Check if non-contiguous GEM memory is requested without IOMMU. If so,
> allocate contiguous GEM memory to help display manager start.
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_gem.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
> index 4c4cb0e..4719116 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
> @@ -266,6 +266,20 @@ int exynos_drm_gem_create_ioctl(struct drm_device *dev, void *data,
> struct exynos_drm_gem *exynos_gem;
> int ret;
>
> + /*
> + * Check if non-contiguous GEM memory is requested without IOMMU.
> + * If so, allocate contiguous GEM memory.
> + *
> + * There is no point in attempting to allocate non-contiguous memory,
> + * only to return error from exynos_drm_framebuffer_init() which leads
> + * to display manager failing to start.
> + */
> + if (!is_drm_iommu_supported(dev) &&
> + (args->flags & EXYNOS_BO_NONCONTIG)) {
> + args->flags &= ~EXYNOS_BO_NONCONTIG;
> + args->flags |= EXYNOS_BO_CONTIG;
> + }
> +
> exynos_gem = exynos_drm_gem_create(dev, args->flags, args->size);
> if (IS_ERR(exynos_gem))
> return PTR_ERR(exynos_gem);
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: inki.dae@samsung.com (Inki Dae)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem
Date: Thu, 11 Aug 2016 07:59:57 +0900 [thread overview]
Message-ID: <57ABB1ED.1080301@samsung.com> (raw)
In-Reply-To: <1470850251-9150-1-git-send-email-shuahkh@osg.samsung.com>
Hi Shuah,
2016? 08? 11? 02:30? Shuah Khan ?(?) ? ?:
> Fix exynos_drm_gem_create_ioctl() attempts to allocate non-contiguous GEM
> memory without IOMMU. In this case, there is no point in attempting to
DRM gem can be used for Non-DRM drivers such as GPU, V4L2 based Multimedia device and other DMA devices.
Even though IOMMU support is disabled, other framework based DMA drivers can use IOMMU - i.e., GPU driver -
and they can use non-contiguous GEM buffer through UMM. (DMABUF)
So GEM allocation type is not dependent on IOMMU.
Thanks,
Inki Dae
> allocate non-contiguous memory, only to return error during the next step
> from exynos_drm_framebuffer_init() which leads to display manager failing
> to start.
>
> Check if non-contiguous GEM memory is requested without IOMMU. If so,
> allocate contiguous GEM memory to help display manager start.
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_gem.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
> index 4c4cb0e..4719116 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
> @@ -266,6 +266,20 @@ int exynos_drm_gem_create_ioctl(struct drm_device *dev, void *data,
> struct exynos_drm_gem *exynos_gem;
> int ret;
>
> + /*
> + * Check if non-contiguous GEM memory is requested without IOMMU.
> + * If so, allocate contiguous GEM memory.
> + *
> + * There is no point in attempting to allocate non-contiguous memory,
> + * only to return error from exynos_drm_framebuffer_init() which leads
> + * to display manager failing to start.
> + */
> + if (!is_drm_iommu_supported(dev) &&
> + (args->flags & EXYNOS_BO_NONCONTIG)) {
> + args->flags &= ~EXYNOS_BO_NONCONTIG;
> + args->flags |= EXYNOS_BO_CONTIG;
> + }
> +
> exynos_gem = exynos_drm_gem_create(dev, args->flags, args->size);
> if (IS_ERR(exynos_gem))
> return PTR_ERR(exynos_gem);
>
WARNING: multiple messages have this Message-ID (diff)
From: Inki Dae <inki.dae@samsung.com>
To: Shuah Khan <shuahkh@osg.samsung.com>,
jy0922.shim@samsung.com, sw0312.kim@samsung.com,
kyungmin.park@samsung.com, airlied@linux.ie, kgene@kernel.org,
k.kozlowski@samsung.com
Cc: dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem
Date: Thu, 11 Aug 2016 07:59:57 +0900 [thread overview]
Message-ID: <57ABB1ED.1080301@samsung.com> (raw)
In-Reply-To: <1470850251-9150-1-git-send-email-shuahkh@osg.samsung.com>
Hi Shuah,
2016년 08월 11일 02:30에 Shuah Khan 이(가) 쓴 글:
> Fix exynos_drm_gem_create_ioctl() attempts to allocate non-contiguous GEM
> memory without IOMMU. In this case, there is no point in attempting to
DRM gem can be used for Non-DRM drivers such as GPU, V4L2 based Multimedia device and other DMA devices.
Even though IOMMU support is disabled, other framework based DMA drivers can use IOMMU - i.e., GPU driver -
and they can use non-contiguous GEM buffer through UMM. (DMABUF)
So GEM allocation type is not dependent on IOMMU.
Thanks,
Inki Dae
> allocate non-contiguous memory, only to return error during the next step
> from exynos_drm_framebuffer_init() which leads to display manager failing
> to start.
>
> Check if non-contiguous GEM memory is requested without IOMMU. If so,
> allocate contiguous GEM memory to help display manager start.
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_gem.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
> index 4c4cb0e..4719116 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
> @@ -266,6 +266,20 @@ int exynos_drm_gem_create_ioctl(struct drm_device *dev, void *data,
> struct exynos_drm_gem *exynos_gem;
> int ret;
>
> + /*
> + * Check if non-contiguous GEM memory is requested without IOMMU.
> + * If so, allocate contiguous GEM memory.
> + *
> + * There is no point in attempting to allocate non-contiguous memory,
> + * only to return error from exynos_drm_framebuffer_init() which leads
> + * to display manager failing to start.
> + */
> + if (!is_drm_iommu_supported(dev) &&
> + (args->flags & EXYNOS_BO_NONCONTIG)) {
> + args->flags &= ~EXYNOS_BO_NONCONTIG;
> + args->flags |= EXYNOS_BO_CONTIG;
> + }
> +
> exynos_gem = exynos_drm_gem_create(dev, args->flags, args->size);
> if (IS_ERR(exynos_gem))
> return PTR_ERR(exynos_gem);
>
next prev parent reply other threads:[~2016-08-10 22:59 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20160810214111epcas1p4dd2a581353b550a1992fc7695e846da7@epcas1p4.samsung.com>
2016-08-10 17:30 ` [PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem Shuah Khan
2016-08-10 17:30 ` Shuah Khan
2016-08-10 17:30 ` Shuah Khan
2016-08-10 17:41 ` Javier Martinez Canillas
2016-08-10 17:41 ` Javier Martinez Canillas
2016-08-10 17:41 ` Javier Martinez Canillas
2016-08-10 22:59 ` Inki Dae [this message]
2016-08-10 22:59 ` Inki Dae
2016-08-10 22:59 ` Inki Dae
2016-08-10 23:05 ` Shuah Khan
2016-08-10 23:05 ` Shuah Khan
2016-08-12 17:28 ` Shuah Khan
2016-08-12 17:28 ` Shuah Khan
2016-08-12 17:52 ` Shuah Khan
2016-08-12 17:52 ` Shuah Khan
2016-08-16 4:40 ` Inki Dae
2016-08-16 4:40 ` Inki Dae
2016-08-16 4:40 ` Inki Dae
2016-10-12 23:11 ` Shuah Khan
2016-10-12 23:11 ` Shuah Khan
2016-10-12 23:11 ` Shuah Khan
2016-10-12 23:15 ` Shuah Khan
2016-10-12 23:15 ` Shuah Khan
2016-10-17 19:45 ` exynos-drm: display manager fails " Shuah Khan
2016-10-19 16:23 ` Tobias Jakobi
2016-10-19 16:23 ` Tobias Jakobi
2016-10-19 16:23 ` Tobias Jakobi
2016-10-19 22:56 ` Shuah Khan
2016-10-19 22:56 ` Shuah Khan
2016-10-19 14:16 ` [PATCH] exynos-drm: Fix display manager failing " Inki Dae
2016-10-19 14:16 ` Inki Dae
2016-10-19 14:16 ` Inki Dae
2016-10-19 22:27 ` Shuah Khan
2016-10-19 22:27 ` Shuah Khan
2016-10-25 16:37 ` Shuah Khan
2016-10-25 16:37 ` Shuah Khan
2016-10-25 17:57 ` Tobias Jakobi
2016-10-25 17:57 ` Tobias Jakobi
2016-10-25 17:57 ` Tobias Jakobi
2016-10-25 18:53 ` Shuah Khan
2016-10-25 18:53 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57ABB1ED.1080301@samsung.com \
--to=inki.dae@samsung.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=jy0922.shim@samsung.com \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=shuahkh@osg.samsung.com \
--cc=sw0312.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.