@@ -3,6 +3,7 @@ config DRM_GMA500
tristate "Intel GMA500/600/3600/3650 KMS Framebuffer"
depends on DRM && PCI && X86 && MMU
select DRM_KMS_HELPER
+ select DRM_GMA500_FBDEV_EMULATION if DRM_FBDEV_EMULATION
select I2C
select I2C_ALGOBIT
# GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915
@@ -15,3 +16,10 @@ config DRM_GMA500
Say yes for an experimental 2D KMS framebuffer driver for the
Intel GMA500 (Poulsbo), Intel GMA600 (Moorestown/Oak Trail) and
Intel GMA3600/3650 (Cedar Trail).
+
+config DRM_GMA500_FBDEV_EMULATION
+ bool
+ depends on DRM_GMA500
+ select FB_CFB_COPYAREA
+ select FB_CFB_FILLRECT
+ select FB_CFB_IMAGEBLIT
@@ -38,6 +38,6 @@ gma500_gfx-y += \
psb_irq.o
gma500_gfx-$(CONFIG_ACPI) += opregion.o
-gma500_gfx-$(CONFIG_DRM_FBDEV_EMULATION) += fbdev.o
+gma500_gfx-$(CONFIG_DRM_GMA500_FBDEV_EMULATION) += fbdev.o
obj-$(CONFIG_DRM_GMA500) += gma500_gfx.o
@@ -5,6 +5,7 @@
*
**************************************************************************/
+#include <linux/fb.h>
#include <linux/pfn_t.h>
#include <drm/drm_crtc_helper.h>
@@ -136,11 +137,9 @@ static const struct fb_ops psb_fbdev_fb_ops = {
.owner = THIS_MODULE,
DRM_FB_HELPER_DEFAULT_OPS,
.fb_setcolreg = psb_fbdev_fb_setcolreg,
- .fb_read = drm_fb_helper_cfb_read,
- .fb_write = drm_fb_helper_cfb_write,
- .fb_fillrect = drm_fb_helper_cfb_fillrect,
- .fb_copyarea = drm_fb_helper_cfb_copyarea,
- .fb_imageblit = drm_fb_helper_cfb_imageblit,
+ .fb_fillrect = cfb_fillrect,
+ .fb_copyarea = cfb_copyarea,
+ .fb_imageblit = cfb_imageblit,
.fb_mmap = psb_fbdev_fb_mmap,
.fb_destroy = psb_fbdev_fb_destroy,
};
@@ -612,7 +612,7 @@ struct drm_framebuffer *psb_framebuffer_create(struct drm_device *dev,
struct drm_gem_object *obj);
/* fbdev */
-#if defined(CONFIG_DRM_FBDEV_EMULATION)
+#if defined(CONFIG_DRM_GMA500_FBDEV_EMULATION)
void psb_fbdev_setup(struct drm_psb_private *dev_priv);
#else
static inline void psb_fbdev_setup(struct drm_psb_private *dev_priv)
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Gma500 does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. Add CONFIG_DRM_GMA500_FBDEV_EMULATION to select the necessary Kconfig options automatically. Make fbdev emulation depend on the new config option. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirely. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> --- drivers/gpu/drm/gma500/Kconfig | 8 ++++++++ drivers/gpu/drm/gma500/Makefile | 2 +- drivers/gpu/drm/gma500/fbdev.c | 9 ++++----- drivers/gpu/drm/gma500/psb_drv.h | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-)