Re: [PATCH] DRM: add drm gem CMA helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lars,

Thanks for your quick comments.

On Tue, May 29, 2012 at 04:46:36PM +0200, Lars-Peter Clausen wrote:
> On 05/29/2012 04:10 PM, Sascha Hauer wrote:
> > 
> > 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.

The other helpers also have a depends on DRM in them. You are right,
it's quite meaningless. The only advantage I can think of is that it
would produce a 'has unmet direct dependencies' if someone outside DRM
would select this. I'll drop it.

> > +
> > +static const struct file_operations drm_gem_cma_fops = {
> > +	.mmap = drm_gem_cma_mmap_buffer,
> > +};
> 
> This and the function above seem to be unused. I think it's a relict from
> the old Exynos code.

Indeed. I wonder why my compiler hasn't warned me about this. Will
remove.

> 
> Do you think it makes sense to have generic vm_operations struct as well, I
> think it will look the same for most drivers:
> 
> struct vm_operations_struct drm_gem_cma_vm_ops = {
>     .fault = drm_gem_cma_fault,
>     .open = drm_gem_vm_open,
>     .close = drm_gem_vm_close,
> };

As we both can make use of this I'll add it. People who need something
else can still add their own vm_operations_struct.

I integrated your other comments, will repost tomorrow unless there are
more comments on this.

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 |
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux