diff options
author | John Keeping <john@metanate.com> | 2016-01-21 13:19:34 -0500 |
---|---|---|
committer | Mark Yao <mark.yao@rock-chips.com> | 2016-01-21 19:45:31 -0500 |
commit | f0442df2156a2171e40f1643c60103e6333f4e7e (patch) | |
tree | 63cb2b0159d62015e95c1d257458f55e1b8f2078 | |
parent | e3c4abdb3bc9b76bedd416ecc5c27633a2f8afed (diff) |
drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATION
If DRM_FBDEV_EMULATION is not selected in the config then we can save a
bit of space by not including the framebuffer code.
Signed-off-by: John Keeping <john@metanate.com>
-rw-r--r-- | drivers/gpu/drm/rockchip/Makefile | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile index a4e03bcde035..f6a809afceec 100644 --- a/drivers/gpu/drm/rockchip/Makefile +++ b/drivers/gpu/drm/rockchip/Makefile | |||
@@ -2,8 +2,9 @@ | |||
2 | # Makefile for the drm device driver. This driver provides support for the | 2 | # Makefile for the drm device driver. This driver provides support for the |
3 | # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. | 3 | # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. |
4 | 4 | ||
5 | rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o rockchip_drm_fbdev.o \ | 5 | rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \ |
6 | rockchip_drm_gem.o rockchip_drm_vop.o | 6 | rockchip_drm_gem.o rockchip_drm_vop.o |
7 | rockchipdrm-$(CONFIG_DRM_FBDEV_EMULATION) += rockchip_drm_fbdev.o | ||
7 | 8 | ||
8 | obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o | 9 | obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o |
9 | obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o | 10 | obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o |
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h index 50432e9b5b37..73718c5f5bbf 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h | |||
@@ -15,7 +15,18 @@ | |||
15 | #ifndef _ROCKCHIP_DRM_FBDEV_H | 15 | #ifndef _ROCKCHIP_DRM_FBDEV_H |
16 | #define _ROCKCHIP_DRM_FBDEV_H | 16 | #define _ROCKCHIP_DRM_FBDEV_H |
17 | 17 | ||
18 | #ifdef CONFIG_DRM_FBDEV_EMULATION | ||
18 | int rockchip_drm_fbdev_init(struct drm_device *dev); | 19 | int rockchip_drm_fbdev_init(struct drm_device *dev); |
19 | void rockchip_drm_fbdev_fini(struct drm_device *dev); | 20 | void rockchip_drm_fbdev_fini(struct drm_device *dev); |
21 | #else | ||
22 | static inline int rockchip_drm_fbdev_init(struct drm_device *dev) | ||
23 | { | ||
24 | return 0; | ||
25 | } | ||
26 | |||
27 | static inline void rockchip_drm_fbdev_fini(struct drm_device *dev) | ||
28 | { | ||
29 | } | ||
30 | #endif | ||
20 | 31 | ||
21 | #endif /* _ROCKCHIP_DRM_FBDEV_H */ | 32 | #endif /* _ROCKCHIP_DRM_FBDEV_H */ |