[yocto] [PATCH 2/2] emgd/pvr: get it building with v3.4 kernel

nitin.a.kamble at intel.com nitin.a.kamble at intel.com
Mon Jul 16 07:22:25 PDT 2012


From: Nitin A Kamble <nitin.a.kamble at intel.com>

Add emgd config option (DRM_EGD) and modify Makefiles for in-tree
builds.

rebased to v3.4 code

Fix build errors caused by changes to kernel interfaces introduced by
linux 3.2 such as:

error: 'THIS_MODULE' undeclared here (not in a function)

due to a missing THIS_MODULE definition which can be found in linux/export.h.

It also fixes a ream of errors like:

error: expected ')' before string constant

due to missing MODULE_PARM_DESC definition which can be found in
linux/moduleparam.h, included by linux/module.h, needed also for
MODULE_AUTHOR, etc.

variable name "pitch" from drm_framebuffer structure has changed
to "pitches" array in v3.4 kernel soruces.

avoid errors like these:
emgd_fbcon.c:128:28: error: 'struct drm_framebuffer' has no member named 'pitch'

Signed-off-by: Tom Zanussi <tom.zanussi at intel.com>
Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
---
 drivers/gpu/drm/Kconfig                            |    9 ++++
 drivers/gpu/drm/Makefile                           |    1 +
 drivers/gpu/drm/emgd/Makefile                      |   40 ++------------------
 drivers/gpu/drm/emgd/emgd/drm/emgd_crtc.c          |    6 +-
 drivers/gpu/drm/emgd/emgd/drm/emgd_drv.c           |   31 ++++++++-------
 drivers/gpu/drm/emgd/emgd/drm/emgd_fb.c            |   12 +++---
 drivers/gpu/drm/emgd/emgd/drm/emgd_fbcon.c         |   17 +++++---
 drivers/gpu/drm/emgd/emgd/pal/lvds/lvds.c          |    1 +
 drivers/gpu/drm/emgd/emgd/video/msvdx/msvdx_init.c |    7 ++-
 .../drm/emgd/pvr/services4/srvkm/env/linux/event.c |    2 +
 .../emgd/pvr/services4/srvkm/env/linux/osfunc.c    |    2 +
 .../drm/emgd/pvr/services4/srvkm/env/linux/proc.h  |    3 +
 .../emgd/pvr/services4/srvkm/env/linux/pvr_drm.c   |   21 +++++-----
 drivers/gpu/drm/gma500/psb_intel_drv.h             |    2 +-
 14 files changed, 75 insertions(+), 79 deletions(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index e354bc0..8453304 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -179,6 +179,15 @@ config DRM_SAVAGE
 	  Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
 	  chipset. If M is selected the module will be called savage.
 
+config DRM_EGD
+       tristate "Intel EMGD"
+       depends on DRM
+       select DRM_KMS_HELPER
+       help
+         Choose this option if you have an EMGD-supported chipset
+         (Intel E6xx or System Controller Hub US15W/US15WP/WPT).
+         If M is selected the module will be called emgd.
+
 source "drivers/gpu/drm/exynos/Kconfig"
 
 source "drivers/gpu/drm/vmwgfx/Kconfig"
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index c20da5b..b15becd 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -42,4 +42,5 @@ obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
 obj-$(CONFIG_DRM_EXYNOS) +=exynos/
 obj-$(CONFIG_DRM_GMA500) += gma500/
 obj-$(CONFIG_DRM_UDL) += udl/
+obj-$(CONFIG_DRM_EGD)   +=emgd/
 obj-y			+= i2c/
diff --git a/drivers/gpu/drm/emgd/Makefile b/drivers/gpu/drm/emgd/Makefile
index c4bd102..a254d3c 100755
--- a/drivers/gpu/drm/emgd/Makefile
+++ b/drivers/gpu/drm/emgd/Makefile
@@ -24,10 +24,6 @@
 #----------------------------------------------------------------------------
 export EGD_TOPLEVEL = DRM Driver
 
-KERNELVER ?= $(shell uname -r)
-KERNELDIR ?= /lib/modules/$(KERNELVER)/build
-INSTALLDIR ?= /lib/modules/$(KERNELVER)/kernel/drivers/gpu/drm/emgd
-
 BLUE = \033[34m
 OFF = \033[0m
 BUILD ?= release
@@ -35,7 +31,7 @@ CONFIG_PVR_RELEASE ?= $(BUILD)
 CONFIG_DRM_EGD ?= m
 
 # Get the include paths pointed to the right place. 
-export  EMGD_MOD_DIR ?= $(CURDIR)
+export  EMGD_MOD_DIR ?= $(obj)
 
 BUILDDATE ?= $(shell date +%Y%m%d)
 
@@ -51,6 +47,7 @@ PROJECT_INCLUDES = \
 	   -I$(EMGD_MOD_DIR)/emgd/pal/ch7036 \
 	   -I$(EMGD_MOD_DIR)/emgd/drm \
 	   -I$(KERNELDIR)/include/drm \
+	   -Iinclude/drm \
 	   -I/usr/src/linux-headers-2.6.32-5-common/include/drm \
 	   -I$(EMGD_MOD_DIR)/pvr/include4 \
 	   -I$(EMGD_MOD_DIR)/pvr/services4/include \
@@ -121,6 +118,8 @@ ifeq ($(PDUMP),1)
 	EXTRA_CFLAGS += -DPDUMP=1
 endif
 
+ccflags-y += $(EXTRA_CFLAGS)
+
 EMGD_OBJS := \
 	emgd/drm/emgd_fb.o \
 	emgd/drm/emgd_fbcon.o \
@@ -299,34 +298,3 @@ ifeq ($(PDUMP),1)
 endif
 
 obj-$(CONFIG_DRM_EGD) += emgd.o
-
-all:: clean modules
-
-modules::
-	@echo $(CURDIR) -- $(CONFIG_PVR_RELEASE)
-	@echo "$(MAKE) -C $(KERNELDIR) M=$(CURDIR) modules"
-	@$(MAKE) -C $(KERNELDIR) M=$(CURDIR) modules
-
-clean::
-	@rm -f $(emgd-y)
-	@rm -f emgd.o emgd.mod.* emgd.ko Module.* modules.order
-	@find . -name "*.cmd" -exec rm '{}' \;
-
-install::
-	install -o root -g root -m 755 -d $(INSTALLDIR)
-	install -o root -g root -m 744 emgd.ko $(INSTALLDIR)
-	/sbin/depmod -a
-
-uninstall::
-	rmmod $(INSTALLDIR)/emgd.ko
-	rm -rf $(INSTALLDIR)/emgd.ko
-	/sbin/depmod -a
-
-debug::
-	export CONFIG_PVR_RELEASE=debug; $(MAKE) modules
-
-package:: clean
-	@echo -e "$(BLUE)Packaging $(EGD_TOPLEVEL)$(OFF)";
-	mkdir -p $(EGD_PKG)
-	tar -C $(EMGD_MOD_DIR) --exclude "CVS" -czf $(EGD_PKG)/emgd_drm.tgz *
-
diff --git a/drivers/gpu/drm/emgd/emgd/drm/emgd_crtc.c b/drivers/gpu/drm/emgd/emgd/drm/emgd_crtc.c
index 76e0235..12633d9 100644
--- a/drivers/gpu/drm/emgd/emgd/drm/emgd_crtc.c
+++ b/drivers/gpu/drm/emgd/emgd/drm/emgd_crtc.c
@@ -343,11 +343,11 @@ static int emgd_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
 
 	plane_fb_info->width          = fb->width;
 	plane_fb_info->height         = fb->height;
-	plane_fb_info->screen_pitch   = fb->pitch;
+	plane_fb_info->screen_pitch   = fb->pitches[0];
 	plane_fb_info->flags          = 0;
 	plane_fb_info->allocated      = 1;
 	plane_fb_info->fb_base_offset = emgd_fb->gtt_offset;
-	plane_fb_info->visible_offset = (y * fb->pitch) +
+	plane_fb_info->visible_offset = (y * fb->pitches[0]) +
 		(x * (fb->bits_per_pixel / 8));
 
 
@@ -828,7 +828,7 @@ void emgd_flip_worker(struct work_struct *w)
 		/* Rendering complete; program the plane registers */
 		igd_surface.flags        = IGD_SURFACE_DISPLAY;
 		igd_surface.offset       = crtc->newfb->gtt_offset;
-		igd_surface.pitch        = crtc->newfb->base.pitch;
+		igd_surface.pitch        = crtc->newfb->base.pitches[0];
 		igd_surface.width        = crtc->newfb->base.width;
 		igd_surface.height       = crtc->newfb->base.height;
 		igd_surface.pixel_format = IGD_PF_ARGB32;
diff --git a/drivers/gpu/drm/emgd/emgd/drm/emgd_drv.c b/drivers/gpu/drm/emgd/emgd/drm/emgd_drv.c
index 92f70a7..4bf32d8 100644
--- a/drivers/gpu/drm/emgd/emgd/drm/emgd_drv.c
+++ b/drivers/gpu/drm/emgd/emgd/drm/emgd_drv.c
@@ -38,6 +38,8 @@
 #include <drm/drm_crtc_helper.h>
 #include <linux/version.h>
 #include <linux/device.h>
+#include <linux/export.h>
+#include <linux/module.h>
 #include <drm/drm_pciids.h>
 #include <intelpci.h>
 #include "drm_emgd_private.h"
@@ -163,6 +165,20 @@ MODULE_PARM_DESC(debug_bc_ts, "Debug: Texture Stream");
 module_param_named(debug_bc_ts, emgd_debug_flag.hal.buf_class, short, 0600);
 #endif
 
+static const struct file_operations emgd_driver_fops = {
+	.owner   = THIS_MODULE,
+	.open    = drm_open,
+	.release = drm_release,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
+	.unlocked_ioctl   = drm_ioctl,
+#else
+	.ioctl   = drm_ioctl,
+#endif
+	.mmap    = emgd_mmap,
+	.poll    = drm_poll,
+	.fasync  = drm_fasync,
+	.read    = drm_read,
+};
 
 static struct drm_driver driver;  /* TODO: what? */
 
@@ -2377,20 +2393,7 @@ static struct drm_driver driver = {
 	.get_reg_ofs        = drm_core_get_reg_ofs,
 #endif
 	.ioctls             = emgd_ioctl,
-	.fops = {
-		.owner   = THIS_MODULE,
-		.open    = drm_open,
-		.release = drm_release,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
-		.unlocked_ioctl   = drm_ioctl,
-#else
-		.ioctl   = drm_ioctl,
-#endif
-		.mmap    = emgd_mmap,
-		.poll    = drm_poll,
-		.fasync  = drm_fasync,
-		.read    = drm_read,
-	},
+	.fops = &emgd_driver_fops,
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 	.pci_driver          = EMGD_PCI_DRIVER,
 #endif
diff --git a/drivers/gpu/drm/emgd/emgd/drm/emgd_fb.c b/drivers/gpu/drm/emgd/emgd/drm/emgd_fb.c
index 6e00b27..d75fe81 100644
--- a/drivers/gpu/drm/emgd/emgd/drm/emgd_fb.c
+++ b/drivers/gpu/drm/emgd/emgd/drm/emgd_fb.c
@@ -110,12 +110,12 @@ static void emgd_fbdev_destroy(drm_emgd_priv_t *priv);
  */
 int emgd_framebuffer_init(struct drm_device *dev,
 			emgd_framebuffer_t *emgd_fb,
-			struct drm_mode_fb_cmd *mode_cmd,
+			struct drm_mode_fb_cmd2 *mode_cmd,
 			unsigned long offset);
 static struct drm_framebuffer *emgd_user_framebuffer_create(
 								struct drm_device *dev,
 								struct drm_file *filp,
-								struct drm_mode_fb_cmd *r);
+								struct drm_mode_fb_cmd2 *r);
 RETURN_PROBE_TYPE  emgd_fb_probe(struct drm_device *dev);
 static int emgd_fb_panic(struct notifier_block *n,
 			unsigned long res,
@@ -815,7 +815,7 @@ EXPORT_SYMBOL(emgd_fb_probe);
 static struct drm_framebuffer *emgd_user_framebuffer_create(
 								struct drm_device *dev,
 								struct drm_file *filp,
-								struct drm_mode_fb_cmd *mode_cmd)
+								struct drm_mode_fb_cmd2 *mode_cmd)
 {
 	emgd_framebuffer_t *emgd_fb;
 	int                 ret;
@@ -830,7 +830,7 @@ static struct drm_framebuffer *emgd_user_framebuffer_create(
 
 	/* Create a framebuffer instance */
 	ret = emgd_framebuffer_init(dev, emgd_fb, mode_cmd,
-			(unsigned long)mode_cmd->handle);
+			(unsigned long)mode_cmd->handles[0]);
 	if (ret) {
 		EMGD_ERROR("Failed to create framebuffer instance.");
 		/* TODO: Free the allocation at mode_cmd->handle */
@@ -869,7 +869,7 @@ static struct drm_framebuffer *emgd_user_framebuffer_create(
  */
 int emgd_framebuffer_init(struct drm_device *dev,
 		emgd_framebuffer_t *emgd_fb,
-		struct drm_mode_fb_cmd *mode_cmd,
+		struct drm_mode_fb_cmd2 *mode_cmd,
 		unsigned long handle)
 {
 	drm_emgd_priv_t *dev_priv = NULL;
@@ -1165,7 +1165,7 @@ static int emgd_fb_create(emgd_fbdev_t *emgd_fbdev,
 	drm_emgd_priv_t        *priv    = emgd_fbdev->priv;
 	struct drm_device      *dev     = priv->ddev;
 	struct fb_info         *info    = NULL;
-	struct drm_mode_fb_cmd  mode_cmd;
+	struct drm_mode_fb_cmd2  mode_cmd;
 	struct drm_framebuffer *fb       = NULL;
 	igd_context_t          *context  = NULL;
 	int                     ret;
diff --git a/drivers/gpu/drm/emgd/emgd/drm/emgd_fbcon.c b/drivers/gpu/drm/emgd/emgd/drm/emgd_fbcon.c
index 5132d33..9a075e3 100644
--- a/drivers/gpu/drm/emgd/emgd/drm/emgd_fbcon.c
+++ b/drivers/gpu/drm/emgd/emgd/drm/emgd_fbcon.c
@@ -36,6 +36,7 @@
 #include <drmP.h>
 #include <drm_crtc_helper.h>
 #include <linux/vga_switcheroo.h>
+#include <linux/export.h>
 
 
 #include "user_config.h"
@@ -57,7 +58,7 @@ extern emgd_drm_config_t config_drm;
  */
 extern int emgd_framebuffer_init(struct drm_device *dev,
 			emgd_framebuffer_t *emgd_fb,
-			struct drm_mode_fb_cmd *mode_cmd,
+			struct drm_mode_fb_cmd2 *mode_cmd,
 			unsigned long handle);
 
 
@@ -124,7 +125,7 @@ static void fill_fix(emgd_fbdev_t *emgd_fbdev, struct fb_info *info)
 	info->fix.ywrapstep   = 0;
 	info->fix.accel       = FB_ACCEL_NONE;
 	info->fix.type_aux    = 0;
-	info->fix.line_length = fb->pitch;
+	info->fix.line_length = fb->pitches[0];
 }
 
 
@@ -246,7 +247,7 @@ static int alloc_initial_fb(emgd_fbdev_t *emgd_fbdev)
 	igd_context_t          *context;
 	int                     ret;
 	unsigned long           size;
-	struct drm_mode_fb_cmd  mode_cmd;
+	struct drm_mode_fb_cmd2  mode_cmd;
 
 	EMGD_TRACE_ENTER;
 
@@ -291,12 +292,14 @@ static int alloc_initial_fb(emgd_fbdev_t *emgd_fbdev)
 
 
 	/* Initialize emgd_framebuffer_t */
-	mode_cmd.handle = EMGD_INITIAL_FRAMEBUFFER;
-	mode_cmd.pitch  = priv->initfb_info.screen_pitch;
+	mode_cmd.handles[0] = EMGD_INITIAL_FRAMEBUFFER;
+	mode_cmd.pitches[0]  = priv->initfb_info.screen_pitch;
 	mode_cmd.width  = priv->initfb_info.width;
 	mode_cmd.height = priv->initfb_info.height;
-	mode_cmd.bpp    = IGD_PF_BPP(priv->initfb_info.pixel_format);
-	mode_cmd.depth  = mode_cmd.bpp;  /* Ok for 32bpp, may not work for 16bpp */
+	mode_cmd.pixel_format = drm_mode_legacy_fb_format(
+					IGD_PF_BPP(priv->initfb_info.pixel_format),
+					IGD_PF_BPP(priv->initfb_info.pixel_format)  /* Ok for 32bpp, may not work for 16bpp */
+					);
 
 	ret = emgd_framebuffer_init(dev, emgd_fbdev->emgd_fb, &mode_cmd,
 			EMGD_INITIAL_FRAMEBUFFER);
diff --git a/drivers/gpu/drm/emgd/emgd/pal/lvds/lvds.c b/drivers/gpu/drm/emgd/emgd/pal/lvds/lvds.c
index b67a992..a9dc56f 100644
--- a/drivers/gpu/drm/emgd/emgd/pal/lvds/lvds.c
+++ b/drivers/gpu/drm/emgd/emgd/pal/lvds/lvds.c
@@ -31,6 +31,7 @@
  *-----------------------------------------------------------------------------
  */
 #include <linux/kernel.h>
+#include <linux/bug.h>
 
 #include <config.h>
 #include <igd_pd.h>
diff --git a/drivers/gpu/drm/emgd/emgd/video/msvdx/msvdx_init.c b/drivers/gpu/drm/emgd/emgd/video/msvdx/msvdx_init.c
index 6591224..6f83bd9 100644
--- a/drivers/gpu/drm/emgd/emgd/video/msvdx/msvdx_init.c
+++ b/drivers/gpu/drm/emgd/emgd/video/msvdx/msvdx_init.c
@@ -58,6 +58,9 @@
 #include <general.h>
 #include <utils.h>
 #include <msvdx.h>
+#include <linux/export.h>
+#include <linux/module.h>
+
 
 #include <plb/regs.h>
 #include <plb/context.h>
@@ -916,7 +919,7 @@ int msvdx_init_plb(unsigned long base0, unsigned long base1,
     REGIO_WRITE_FIELD(reg_val, MSVDX_CORE_CR_FE_MSVDX_WDT_CONTROL, FE_WDT_ACTION0, 1);
     REGIO_WRITE_FIELD(reg_val, MSVDX_CORE_CR_FE_MSVDX_WDT_CONTROL, FE_WDT_CLEAR_SELECT, 1);
     REGIO_WRITE_FIELD(reg_val, MSVDX_CORE_CR_FE_MSVDX_WDT_CONTROL, FE_WDT_CLKDIV_SELECT, 7);
-    printk(KERN_INFO "CTL_MSG: WDT Control value = 0x%x", reg_val);
+    printk(KERN_INFO "CTL_MSG: WDT Control value = 0x%lx", reg_val);
     EMGD_WRITE32(0, mmio + MSVDX_CORE_CR_FE_MSVDX_WDT_COMPAREMATCH_OFFSET);
     EMGD_WRITE32(reg_val, mmio + MSVDX_CORE_CR_FE_MSVDX_WDT_CONTROL_OFFSET);
 
@@ -926,7 +929,7 @@ int msvdx_init_plb(unsigned long base0, unsigned long base1,
     REGIO_WRITE_FIELD(reg_val, MSVDX_CORE_CR_BE_MSVDX_WDT_CONTROL, BE_WDT_ACTION0, 1);
     REGIO_WRITE_FIELD(reg_val, MSVDX_CORE_CR_BE_MSVDX_WDT_CONTROL, BE_WDT_CLEAR_SELECT, 0xd);
     REGIO_WRITE_FIELD(reg_val, MSVDX_CORE_CR_BE_MSVDX_WDT_CONTROL, BE_WDT_CLKDIV_SELECT, 7);
-    printk(KERN_INFO "CTL_MSG: WDT Control value = 0x%x", reg_val);
+    printk(KERN_INFO "CTL_MSG: WDT Control value = 0x%lx", reg_val);
     EMGD_WRITE32(0, mmio + MSVDX_CORE_CR_BE_MSVDX_WDT_COMPAREMATCH_OFFSET);
     EMGD_WRITE32(reg_val, mmio + MSVDX_CORE_CR_BE_MSVDX_WDT_CONTROL_OFFSET);
 
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/event.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/event.c
index 85493c1..b3e01a3 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/event.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/event.c
@@ -24,8 +24,10 @@
 #include <asm/io.h>
 #include <asm/page.h>
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
 #include <asm/system.h>
 #endif
+#endif
 #include <linux/mm.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/osfunc.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/osfunc.c
index 60b8a69..dca185c 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/osfunc.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/osfunc.c
@@ -24,8 +24,10 @@
 #include <asm/io.h>
 #include <asm/page.h>
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0))
 #include <asm/system.h>
 #endif
+#endif
 #if defined(SUPPORT_CPU_CACHED_BUFFERS)
 #include <asm/cacheflush.h>
 #endif
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/proc.h b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/proc.h
index 7aa5424..07db3d7 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/proc.h
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/proc.h
@@ -23,7 +23,10 @@
 #ifndef __SERVICES_PROC_H__
 #define __SERVICES_PROC_H__
 
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
 #include <asm/system.h>
+#endif
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_drm.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_drm.c
index f31f989..be619af 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_drm.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_drm.c
@@ -238,6 +238,16 @@ struct drm_ioctl_desc sPVRDrmIoctls[] = {
 
 static IMG_INT pvr_max_ioctl = DRM_ARRAY_SIZE(sPVRDrmIoctls);
 
+static const struct file_operations pvr_driver_fops = {
+	.owner = THIS_MODULE,
+	.open = drm_open,
+	.release = drm_release,
+	.ioctl = drm_ioctl,
+	.mmap = PVRMMap,
+	.poll = drm_poll,
+	.fasync = drm_fasync,
+};
+
 static struct drm_driver sPVRDrmDriver =
 {
 	.driver_features = 0,
@@ -251,16 +261,7 @@ static struct drm_driver sPVRDrmDriver =
 	.get_map_ofs = drm_core_get_map_ofs,
 	.get_reg_ofs = drm_core_get_reg_ofs,
 	.ioctls = sPVRDrmIoctls,
-	.fops =
-	{
-		.owner = THIS_MODULE,
-		.open = drm_open,
-		.release = drm_release,
-		.ioctl = drm_ioctl,
-		.mmap = PVRMMap,
-		.poll = drm_poll,
-		.fasync = drm_fasync,
-	},
+	.fops = &pvr_driver_fops,
 	.pci_driver =
 	{
 		.name = PVR_DRM_NAME,
diff --git a/drivers/gpu/drm/gma500/psb_intel_drv.h b/drivers/gpu/drm/gma500/psb_intel_drv.h
index f40535e..303806d 100644
--- a/drivers/gpu/drm/gma500/psb_intel_drv.h
+++ b/drivers/gpu/drm/gma500/psb_intel_drv.h
@@ -265,7 +265,7 @@ extern int intelfb_remove(struct drm_device *dev,
 			  struct drm_framebuffer *fb);
 extern struct drm_framebuffer *psb_intel_framebuffer_create(struct drm_device
 							*dev, struct
-							drm_mode_fb_cmd
+							drm_mode_fb_cmd2
 							*mode_cmd,
 							void *mm_private);
 extern bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder,
-- 
1.7.3.4




More information about the yocto mailing list