From: Lars-Peter Clausen <lars@metafoo.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: dri-devel@lists.freedesktop.org, kernel@pengutronix.de,
Rob Clark <rob.clark@linaro.org>
Subject: Re: [PATCH] DRM: add drm gem CMA helper
Date: Tue, 29 May 2012 17:26:10 +0200 [thread overview]
Message-ID: <4FC4EA92.2070508@metafoo.de> (raw)
In-Reply-To: <4FC4E14C.90601@metafoo.de>
On 05/29/2012 04:46 PM, Lars-Peter Clausen wrote:
> On 05/29/2012 04:10 PM, 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.
>>
>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>> ---
>>
>> Lars-Peter, please let me know if this fits your needs or if you are missing
>> something.
>>
>
> Awesome :) The overall structure looks basically like what I had, so I can
> just use these functions as drop-in replacement. I had some minor
> differences in the implementation though. Comments inline.
Did some initial testing and it seems to work fine :)
>
>> drivers/gpu/drm/Kconfig | 6 +
>> drivers/gpu/drm/Makefile | 1 +
>> drivers/gpu/drm/drm_gem_cma_helper.c | 321 ++++++++++++++++++++++++++++++++++
>> include/drm/drm_gem_cma_helper.h | 47 +++++
>> 4 files changed, 375 insertions(+)
>> create mode 100644 drivers/gpu/drm/drm_gem_cma_helper.c
>> create mode 100644 include/drm/drm_gem_cma_helper.h
>>
>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
>> index e354bc0..f62717e 100644
>> --- a/drivers/gpu/drm/Kconfig
>> +++ b/drivers/gpu/drm/Kconfig
>> @@ -53,6 +53,12 @@ config DRM_TTM
>> GPU memory types. Will be enabled automatically if a device driver
>> uses it.
>>
>> +config DRM_GEM_CMA_HELPER
>> + tristate
>> + depends on DRM
>> + help
>> + Choose this if you need the GEM cma helper functions
>
> This shouldn't have a help text as it should be selected by the driver and
> not by the user. Also the 'depends on DRM' can go away, since it becomes
> meaningless if the symbol is not user-selectable.
>
Sorry, ignore that. I though it would appear in menuconfig if it had an help
text. But it needs to have a title. The "depends on" can still go away though.
>> +
>> +#define to_dma_alloc_gem_obj(x) \
>> + container_of(x, struct drm_gem_cma_obj, base)
This looks like it has been missed during some renaming. It should probably
be "to_drm_gem_cma_obj". And maybe make it an inline function.
Thanks,
- Lars
next prev parent reply other threads:[~2012-05-29 15:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 14:10 [PATCH] DRM: add drm gem CMA helper Sascha Hauer
2012-05-29 14:46 ` Lars-Peter Clausen
2012-05-29 15:26 ` Lars-Peter Clausen [this message]
2012-05-29 16:06 ` Sascha Hauer
2012-05-29 18:20 ` [PATCH 1/2] DRM: Add DRM kms/fb cma helper Lars-Peter Clausen
2012-05-29 18:20 ` [PATCH 2/2] DRM: imx: Use new fb cma helper functions Lars-Peter Clausen
2012-05-30 10:16 ` [PATCH 1/2] DRM: Add DRM kms/fb cma helper Sascha Hauer
2012-05-30 15:40 ` [PATCH] DRM: add drm gem CMA helper Laurent Pinchart
2012-05-30 16:28 ` Sascha Hauer
2012-05-31 9:41 ` Laurent Pinchart
-- strict thread matches above, loose matches on Subject: below --
2012-06-27 13:00 Sascha Hauer
2012-06-27 13:20 ` Laurent Pinchart
2012-06-27 13:43 ` Sascha Hauer
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=4FC4EA92.2070508@metafoo.de \
--to=lars@metafoo.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@pengutronix.de \
--cc=rob.clark@linaro.org \
--cc=s.hauer@pengutronix.de \
/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.