diff options
author | Stefan Christ <contact@stefanchrist.eu> | 2016-09-29 22:48:37 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-10-04 08:23:16 +0200 |
commit | 74064893901ac5103cf101ecef5946e82b6ce9c6 (patch) | |
tree | 7001b17f1318ab877a73b3bf69c79eb1f5affd1c /include/drm | |
parent | 61802130d85fdaf9646340bf1cc64b3e06d0b19c (diff) | |
download | linux-74064893901ac5103cf101ecef5946e82b6ce9c6.tar.gz linux-74064893901ac5103cf101ecef5946e82b6ce9c6.tar.bz2 linux-74064893901ac5103cf101ecef5946e82b6ce9c6.zip |
drm/fb-helper: add DRM_FB_HELPER_DEFAULT_OPS for fb_ops
The define DRM_FB_HELPER_DEFAULT_OPS provides the drm_fb_helper default
implementations for functions in struct fb_ops. A drm driver can use it
like:
static struct fb_ops drm_fbdev_cma_ops = {
.owner = THIS_MODULE,
DRM_FB_HELPER_DEFAULT_OPS,
/* driver specific implementations */
};
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1475182136-15191-2-git-send-email-contact@stefanchrist.eu
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_fb_helper.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index e19458dd1a43..3c5f5992b96a 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h @@ -217,6 +217,19 @@ struct drm_fb_helper { bool delayed_hotplug; }; +/** + * @DRM_FB_HELPER_DEFAULT_OPS: + * + * Helper define to register default implementations of drm_fb_helper + * functions. To be used in struct fb_ops of drm drivers. + */ +#define DRM_FB_HELPER_DEFAULT_OPS \ + .fb_check_var = drm_fb_helper_check_var, \ + .fb_set_par = drm_fb_helper_set_par, \ + .fb_setcmap = drm_fb_helper_setcmap, \ + .fb_blank = drm_fb_helper_blank, \ + .fb_pan_display = drm_fb_helper_pan_display + #ifdef CONFIG_DRM_FBDEV_EMULATION void drm_fb_helper_prepare(struct drm_device *dev, struct drm_fb_helper *helper, const struct drm_fb_helper_funcs *funcs); |