Re: [PATCH 2/3] drm: fb_helper: implement ioctl FBIO_WAITFORVSYNC

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

 



Hi Daniel,

I finally found some time to look into this issue again.

On Fri, Jul 15, 2016 at 09:19:22AM +0200, Daniel Vetter wrote:
> <snippet>
> 
> To roll new vfuncs out consistently I think it'd be great to create a
> DRM_FB_HELPER_DEFAULT_OPS #define which sets all the fb_ops. Drivers can
> then overwrite just what they need, e.g.
> 
> static struct fb_ops drm_fbdev_cma_ops = {
> 	.owner		= THIS_MODULE,
> 	DRM_FB_HELPER_DEFAULT_OPS,
> 	.fb_mmap 	= drm_fb_cma_mmap,
> };
> 
> Maybe even include the .owner = THIS_MODULE line in the macro, but that
> might be too much magic and mislead people into reusing it when it's not
> the same module.
> 
> Of course this would be an additional (subsystem-wide) prep patch before
> this one here.
> -Daniel

Ok. This pattern seems like single inheritance in object-oriented programming
languages ;-) The define looks very reasonable since these drm helper functions
are used in lot of drivers.

I would also not include '.owner = THIS_MODULE' in the define, because it would
contain even more magic.

What is the preferred way for subsystem-wide patches? One big patch, one patch
per driver or group of drivers per patch?

Mit freundlichen Grüßen / Kind regards,
	Stefan Christ

> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://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