From: Sascha Hauer <s.hauer@pengutronix.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: kernel@pengutronix.de, dri-devel@lists.freedesktop.org,
Rob Clark <rob.clark@linaro.org>
Subject: Re: [PATCH] DRM: add drm gem CMA helper
Date: Wed, 30 May 2012 18:28:12 +0200 [thread overview]
Message-ID: <20120530162812.GL30400@pengutronix.de> (raw)
In-Reply-To: <7829358.GjfEKl07XY@avalon>
On Wed, May 30, 2012 at 05:40:13PM +0200, Laurent Pinchart wrote:
> Hi Sascha,
>
> Thank you for the patch. I've successfully tested the helper with the new SH
> Mobile DRM driver. Just a couple of comments below in addition to Lars'
> comments (this is not a full review, just details that caught my attention
> when comparing the code with my implementation, and trying to use it).
>
> > +/*
> > + * drm_gem_cma_mmap - (struct file_operation)->mmap callback function
> > + */
> > +int drm_gem_cma_mmap(struct file *filp, struct vm_area_struct *vma)
> > +{
> > + int ret;
> > +
> > + ret = drm_gem_mmap(filp, vma);
> > + if (ret)
> > + return ret;
> > +
> > + vma->vm_flags &= ~VM_PFNMAP;
> > + vma->vm_flags |= VM_MIXEDMAP;
>
> Why is this a mixed map ?
Honestly, I don't know. This is copied from the exynos driver. I don't
know much about these flags, so if you think something else is better
here than you're probably right ;)
>
> > +
> > + return ret;
> > +}
> > +EXPORT_SYMBOL_GPL(drm_gem_cma_mmap);
>
> My implementation maps the whole buffer in one go at mmap time, not page by
> page at page fault time. Isn't that more efficient when mapping frame buffer
> memory ?
I remember Alan has mentioned this in an earlier review. I'll update
the patch accordingly.
I will fix this and the other things you mentioned and repost.
Thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2012-05-30 16:28 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
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 [this message]
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=20120530162812.GL30400@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@pengutronix.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=rob.clark@linaro.org \
/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.