All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/17][KERNEL] drm: add the base source of the Poulsbo (psb) 2D X11 driver
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 02/17][KERNEL] drm-psb: remove the package Makefile and replace it with the kernel Makefile tom.zanussi
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

The complete source of the base (unpatched) psb-kernel-source Poky
package, moved into the kernel tree so it can be build as a
first-class citizen instead of as an external module.  Subsequent
patches will remove the unnecessary parts.

The code here is all the code contained in this tarball:

https://launchpad.net/~gma500/+archive/ppa/+files/
	psb-kernel-source_4.42.0-0ubuntu2~1010um5.tar.gz

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/Config.in                      |   17 +
 drivers/gpu/drm-psb/Doxyfile                       | 1161 +++
 drivers/gpu/drm-psb/GPLv2_License.txt              |  341 +
 drivers/gpu/drm-psb/Kconfig                        |  103 +
 drivers/gpu/drm-psb/Makefile                       |  367 +
 drivers/gpu/drm-psb/Makefile.kernel                |   76 +
 drivers/gpu/drm-psb/Module.symvers                 |  339 +
 drivers/gpu/drm-psb/README.drm                     |   25 +
 drivers/gpu/drm-psb/ati_pcigart.c                  |  411 +
 drivers/gpu/drm-psb/create_linux_pci_lists.sh      |   40 +
 drivers/gpu/drm-psb/debian/changelog               |   82 +
 drivers/gpu/drm-psb/debian/compat                  |    1 +
 drivers/gpu/drm-psb/debian/control                 |   16 +
 drivers/gpu/drm-psb/debian/copyright               |   53 +
 drivers/gpu/drm-psb/debian/dirs                    |    1 +
 drivers/gpu/drm-psb/debian/dkms.conf.in            |   10 +
 drivers/gpu/drm-psb/debian/patches/00list          |   16 +
 .../gpu/drm-psb/debian/patches/01_2.6.32.dpatch    |   43 +
 .../drm-psb/debian/patches/02_agp_memory.dpatch    |   40 +
 drivers/gpu/drm-psb/debian/patches/03_devt.dpatch  |   20 +
 .../gpu/drm-psb/debian/patches/04_drmpsb.dpatch    |   38 +
 .../drm-psb/debian/patches/05_edid-crash.dpatch    |   19 +
 .../drm-psb/debian/patches/06_i2c-intelfb.dpatch   |   20 +
 .../drm-psb/debian/patches/07_current_euid.dpatch  |   20 +
 .../gpu/drm-psb/debian/patches/08_irqreturn.dpatch |   23 +
 .../drm-psb/debian/patches/10_change_prefix.dpatch |10351 ++++++++++++++++++++
 .../debian/patches/11_psb-Declare-firmware.dpatch  |   34 +
 ...sking-for-debug-is-an-error-I-want-to-be.dpatch |   35 +
 .../debian/patches/13_psb-Fix-framebuffer.dpatch   |   94 +
 drivers/gpu/drm-psb/debian/patches/2.6.34.dpatch   |   26 +
 .../gpu/drm-psb/debian/patches/acpi-video.dpatch   |   28 +
 .../gpu/drm-psb/debian/patches/rt-kernel.dpatch    |   67 +
 drivers/gpu/drm-psb/debian/patches/use_udev.dpatch |   36 +
 drivers/gpu/drm-psb/debian/postinst                |   74 +
 drivers/gpu/drm-psb/debian/postrm                  |   33 +
 drivers/gpu/drm-psb/debian/prerm                   |   28 +
 drivers/gpu/drm-psb/debian/psb-kernel-headers.dirs |    1 +
 .../gpu/drm-psb/debian/psb-kernel-headers.install  |    1 +
 .../gpu/drm-psb/debian/psb-kernel-headers.postrm   |   15 +
 .../gpu/drm-psb/debian/psb-kernel-headers.preinst  |   18 +
 drivers/gpu/drm-psb/debian/rules                   |   39 +
 drivers/gpu/drm-psb/drm.h                          | 1192 +++
 drivers/gpu/drm-psb/drmP.h                         | 1332 +++
 drivers/gpu/drm-psb/drm_agpsupport.c               |  652 ++
 drivers/gpu/drm-psb/drm_auth.c                     |  189 +
 drivers/gpu/drm-psb/drm_bo.c                       | 2668 +++++
 drivers/gpu/drm-psb/drm_bo_lock.c                  |  189 +
 drivers/gpu/drm-psb/drm_bo_move.c                  |  597 ++
 drivers/gpu/drm-psb/drm_bufs.c                     | 1609 +++
 drivers/gpu/drm-psb/drm_compat.c                   |  778 ++
 drivers/gpu/drm-psb/drm_compat.h                   |  383 +
 drivers/gpu/drm-psb/drm_context.c                  |  472 +
 drivers/gpu/drm-psb/drm_core.h                     |   35 +
 drivers/gpu/drm-psb/drm_crtc.c                     | 2169 ++++
 drivers/gpu/drm-psb/drm_crtc.h                     |  592 ++
 drivers/gpu/drm-psb/drm_dma.c                      |  179 +
 drivers/gpu/drm-psb/drm_drawable.c                 |  192 +
 drivers/gpu/drm-psb/drm_drv.c                      |  695 ++
 drivers/gpu/drm-psb/drm_edid.c                     |  519 +
 drivers/gpu/drm-psb/drm_edid.h                     |  179 +
 drivers/gpu/drm-psb/drm_fb.c                       |  436 +
 drivers/gpu/drm-psb/drm_fence.c                    |  832 ++
 drivers/gpu/drm-psb/drm_fops.c                     |  532 +
 drivers/gpu/drm-psb/drm_hashtab.c                  |  202 +
 drivers/gpu/drm-psb/drm_hashtab.h                  |   67 +
 drivers/gpu/drm-psb/drm_internal.h                 |   40 +
 drivers/gpu/drm-psb/drm_ioc32.c                    | 1073 ++
 drivers/gpu/drm-psb/drm_ioctl.c                    |  347 +
 drivers/gpu/drm-psb/drm_irq.c                      |  463 +
 drivers/gpu/drm-psb/drm_lock.c                     |  393 +
 drivers/gpu/drm-psb/drm_memory.c                   |  343 +
 drivers/gpu/drm-psb/drm_memory.h                   |   61 +
 drivers/gpu/drm-psb/drm_memory_debug.c             |  403 +
 drivers/gpu/drm-psb/drm_memory_debug.h             |  379 +
 drivers/gpu/drm-psb/drm_mm.c                       |  296 +
 drivers/gpu/drm-psb/drm_modes.c                    |  560 ++
 drivers/gpu/drm-psb/drm_object.c                   |  294 +
 drivers/gpu/drm-psb/drm_objects.h                  |  721 ++
 drivers/gpu/drm-psb/drm_os_linux.h                 |  146 +
 drivers/gpu/drm-psb/drm_pci.c                      |  177 +
 drivers/gpu/drm-psb/drm_pciids.h                   |  511 +
 drivers/gpu/drm-psb/drm_pciids.txt                 |  490 +
 drivers/gpu/drm-psb/drm_proc.c                     |  646 ++
 drivers/gpu/drm-psb/drm_regman.c                   |  200 +
 drivers/gpu/drm-psb/drm_sarea.h                    |   84 +
 drivers/gpu/drm-psb/drm_scatter.c                  |  219 +
 drivers/gpu/drm-psb/drm_sman.c                     |  353 +
 drivers/gpu/drm-psb/drm_sman.h                     |  176 +
 drivers/gpu/drm-psb/drm_stub.c                     |  325 +
 drivers/gpu/drm-psb/drm_sysfs.c                    |  211 +
 drivers/gpu/drm-psb/drm_ttm.c                      |  430 +
 drivers/gpu/drm-psb/drm_vm.c                       | 1143 +++
 drivers/gpu/drm-psb/drm_vm_nopage_compat.c         |  279 +
 drivers/gpu/drm-psb/i915_buffer.c                  |  286 +
 drivers/gpu/drm-psb/i915_compat.c                  |  204 +
 drivers/gpu/drm-psb/i915_dma.c                     | 1324 +++
 drivers/gpu/drm-psb/i915_drm.h                     |  366 +
 drivers/gpu/drm-psb/i915_drv.c                     |  607 ++
 drivers/gpu/drm-psb/i915_drv.h                     |  795 ++
 drivers/gpu/drm-psb/i915_fence.c                   |  293 +
 drivers/gpu/drm-psb/i915_init.c                    |  329 +
 drivers/gpu/drm-psb/i915_ioc32.c                   |  223 +
 drivers/gpu/drm-psb/i915_irq.c                     |  781 ++
 drivers/gpu/drm-psb/i915_mem.c                     |  386 +
 drivers/gpu/drm-psb/i915_reg.h                     |  487 +
 drivers/gpu/drm-psb/intel_crt.c                    |  242 +
 drivers/gpu/drm-psb/intel_display.c                | 1472 +++
 drivers/gpu/drm-psb/intel_drv.h                    |   91 +
 drivers/gpu/drm-psb/intel_fb.c                     |  653 ++
 drivers/gpu/drm-psb/intel_i2c.c                    |  190 +
 drivers/gpu/drm-psb/intel_lvds.c                   |  941 ++
 drivers/gpu/drm-psb/intel_lvds.h                   |  174 +
 drivers/gpu/drm-psb/intel_modes.c                  |   60 +
 drivers/gpu/drm-psb/intel_sdvo.c                   | 4043 ++++++++
 drivers/gpu/drm-psb/intel_sdvo_regs.h              |  580 ++
 drivers/gpu/drm-psb/intel_setup.c                  |   18 +
 drivers/gpu/drm-psb/psb_buffer.c                   |  425 +
 drivers/gpu/drm-psb/psb_detear.c                   |   39 +
 drivers/gpu/drm-psb/psb_detear.h                   |   47 +
 drivers/gpu/drm-psb/psb_drm.h                      |  395 +
 drivers/gpu/drm-psb/psb_drv.c                      | 1030 ++
 drivers/gpu/drm-psb/psb_drv.h                      |  819 ++
 drivers/gpu/drm-psb/psb_fb.c                       | 1351 +++
 drivers/gpu/drm-psb/psb_fence.c                    |  285 +
 drivers/gpu/drm-psb/psb_gtt.c                      |  234 +
 drivers/gpu/drm-psb/psb_i2c.c                      |  181 +
 drivers/gpu/drm-psb/psb_irq.c                      |  435 +
 drivers/gpu/drm-psb/psb_mmu.c                      | 1034 ++
 drivers/gpu/drm-psb/psb_msvdx.c                    |  681 ++
 drivers/gpu/drm-psb/psb_msvdx.h                    |  564 ++
 drivers/gpu/drm-psb/psb_msvdxinit.c                |  625 ++
 drivers/gpu/drm-psb/psb_reg.h                      |  562 ++
 drivers/gpu/drm-psb/psb_regman.c                   |  175 +
 drivers/gpu/drm-psb/psb_reset.c                    |  374 +
 drivers/gpu/drm-psb/psb_scene.c                    |  531 +
 drivers/gpu/drm-psb/psb_scene.h                    |  112 +
 drivers/gpu/drm-psb/psb_schedule.c                 | 1465 +++
 drivers/gpu/drm-psb/psb_schedule.h                 |  177 +
 drivers/gpu/drm-psb/psb_setup.c                    |   17 +
 drivers/gpu/drm-psb/psb_sgx.c                      | 1454 +++
 drivers/gpu/drm-psb/psb_xhw.c                      |  629 ++
 141 files changed, 69801 insertions(+), 0 deletions(-)
 create mode 100644 drivers/gpu/drm-psb/Config.in
 create mode 100644 drivers/gpu/drm-psb/Doxyfile
 create mode 100644 drivers/gpu/drm-psb/GPLv2_License.txt
 create mode 100644 drivers/gpu/drm-psb/Kconfig
 create mode 100644 drivers/gpu/drm-psb/Makefile
 create mode 100644 drivers/gpu/drm-psb/Makefile.kernel
 create mode 100644 drivers/gpu/drm-psb/Module.markers
 create mode 100644 drivers/gpu/drm-psb/Module.symvers
 create mode 100644 drivers/gpu/drm-psb/README.drm
 create mode 100644 drivers/gpu/drm-psb/ati_pcigart.c
 create mode 100644 drivers/gpu/drm-psb/create_linux_pci_lists.sh
 create mode 100644 drivers/gpu/drm-psb/debian/changelog
 create mode 100644 drivers/gpu/drm-psb/debian/compat
 create mode 100644 drivers/gpu/drm-psb/debian/control
 create mode 100644 drivers/gpu/drm-psb/debian/copyright
 create mode 100644 drivers/gpu/drm-psb/debian/dirs
 create mode 100644 drivers/gpu/drm-psb/debian/dkms.conf.in
 create mode 100644 drivers/gpu/drm-psb/debian/patches/00list
 create mode 100755 drivers/gpu/drm-psb/debian/patches/01_2.6.32.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/02_agp_memory.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/03_devt.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/04_drmpsb.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/05_edid-crash.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/06_i2c-intelfb.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/07_current_euid.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/08_irqreturn.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/10_change_prefix.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/11_psb-Declare-firmware.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/12_psb-If-not-asking-for-debug-is-an-error-I-want-to-be.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/13_psb-Fix-framebuffer.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/2.6.34.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/acpi-video.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/rt-kernel.dpatch
 create mode 100755 drivers/gpu/drm-psb/debian/patches/use_udev.dpatch
 create mode 100644 drivers/gpu/drm-psb/debian/postinst
 create mode 100644 drivers/gpu/drm-psb/debian/postrm
 create mode 100644 drivers/gpu/drm-psb/debian/prerm
 create mode 100644 drivers/gpu/drm-psb/debian/psb-kernel-headers.dirs
 create mode 100644 drivers/gpu/drm-psb/debian/psb-kernel-headers.install
 create mode 100644 drivers/gpu/drm-psb/debian/psb-kernel-headers.postrm
 create mode 100644 drivers/gpu/drm-psb/debian/psb-kernel-headers.preinst
 create mode 100755 drivers/gpu/drm-psb/debian/rules
 create mode 100644 drivers/gpu/drm-psb/drm.h
 create mode 100644 drivers/gpu/drm-psb/drmP.h
 create mode 100644 drivers/gpu/drm-psb/drm_agpsupport.c
 create mode 100644 drivers/gpu/drm-psb/drm_auth.c
 create mode 100644 drivers/gpu/drm-psb/drm_bo.c
 create mode 100644 drivers/gpu/drm-psb/drm_bo_lock.c
 create mode 100644 drivers/gpu/drm-psb/drm_bo_move.c
 create mode 100644 drivers/gpu/drm-psb/drm_bufs.c
 create mode 100644 drivers/gpu/drm-psb/drm_compat.c
 create mode 100644 drivers/gpu/drm-psb/drm_compat.h
 create mode 100644 drivers/gpu/drm-psb/drm_context.c
 create mode 100644 drivers/gpu/drm-psb/drm_core.h
 create mode 100644 drivers/gpu/drm-psb/drm_crtc.c
 create mode 100644 drivers/gpu/drm-psb/drm_crtc.h
 create mode 100644 drivers/gpu/drm-psb/drm_dma.c
 create mode 100644 drivers/gpu/drm-psb/drm_drawable.c
 create mode 100644 drivers/gpu/drm-psb/drm_drv.c
 create mode 100644 drivers/gpu/drm-psb/drm_edid.c
 create mode 100644 drivers/gpu/drm-psb/drm_edid.h
 create mode 100644 drivers/gpu/drm-psb/drm_fb.c
 create mode 100644 drivers/gpu/drm-psb/drm_fence.c
 create mode 100644 drivers/gpu/drm-psb/drm_fops.c
 create mode 100644 drivers/gpu/drm-psb/drm_hashtab.c
 create mode 100644 drivers/gpu/drm-psb/drm_hashtab.h
 create mode 100644 drivers/gpu/drm-psb/drm_internal.h
 create mode 100644 drivers/gpu/drm-psb/drm_ioc32.c
 create mode 100644 drivers/gpu/drm-psb/drm_ioctl.c
 create mode 100644 drivers/gpu/drm-psb/drm_irq.c
 create mode 100644 drivers/gpu/drm-psb/drm_lock.c
 create mode 100644 drivers/gpu/drm-psb/drm_memory.c
 create mode 100644 drivers/gpu/drm-psb/drm_memory.h
 create mode 100644 drivers/gpu/drm-psb/drm_memory_debug.c
 create mode 100644 drivers/gpu/drm-psb/drm_memory_debug.h
 create mode 100644 drivers/gpu/drm-psb/drm_mm.c
 create mode 100644 drivers/gpu/drm-psb/drm_modes.c
 create mode 100644 drivers/gpu/drm-psb/drm_object.c
 create mode 100644 drivers/gpu/drm-psb/drm_objects.h
 create mode 100644 drivers/gpu/drm-psb/drm_os_linux.h
 create mode 100644 drivers/gpu/drm-psb/drm_pci.c
 create mode 100644 drivers/gpu/drm-psb/drm_pciids.h
 create mode 100644 drivers/gpu/drm-psb/drm_pciids.txt
 create mode 100644 drivers/gpu/drm-psb/drm_proc.c
 create mode 100644 drivers/gpu/drm-psb/drm_regman.c
 create mode 100644 drivers/gpu/drm-psb/drm_sarea.h
 create mode 100644 drivers/gpu/drm-psb/drm_scatter.c
 create mode 100644 drivers/gpu/drm-psb/drm_sman.c
 create mode 100644 drivers/gpu/drm-psb/drm_sman.h
 create mode 100644 drivers/gpu/drm-psb/drm_stub.c
 create mode 100644 drivers/gpu/drm-psb/drm_sysfs.c
 create mode 100644 drivers/gpu/drm-psb/drm_ttm.c
 create mode 100644 drivers/gpu/drm-psb/drm_vm.c
 create mode 100644 drivers/gpu/drm-psb/drm_vm_nopage_compat.c
 create mode 100644 drivers/gpu/drm-psb/i915_buffer.c
 create mode 100644 drivers/gpu/drm-psb/i915_compat.c
 create mode 100644 drivers/gpu/drm-psb/i915_dma.c
 create mode 100644 drivers/gpu/drm-psb/i915_drm.h
 create mode 100644 drivers/gpu/drm-psb/i915_drv.c
 create mode 100644 drivers/gpu/drm-psb/i915_drv.h
 create mode 100644 drivers/gpu/drm-psb/i915_fence.c
 create mode 100644 drivers/gpu/drm-psb/i915_init.c
 create mode 100644 drivers/gpu/drm-psb/i915_ioc32.c
 create mode 100644 drivers/gpu/drm-psb/i915_irq.c
 create mode 100644 drivers/gpu/drm-psb/i915_mem.c
 create mode 100644 drivers/gpu/drm-psb/i915_reg.h
 create mode 100644 drivers/gpu/drm-psb/intel_crt.c
 create mode 100644 drivers/gpu/drm-psb/intel_display.c
 create mode 100644 drivers/gpu/drm-psb/intel_drv.h
 create mode 100644 drivers/gpu/drm-psb/intel_fb.c
 create mode 100644 drivers/gpu/drm-psb/intel_i2c.c
 create mode 100644 drivers/gpu/drm-psb/intel_lvds.c
 create mode 100644 drivers/gpu/drm-psb/intel_lvds.h
 create mode 100644 drivers/gpu/drm-psb/intel_modes.c
 create mode 100644 drivers/gpu/drm-psb/intel_sdvo.c
 create mode 100644 drivers/gpu/drm-psb/intel_sdvo_regs.h
 create mode 100644 drivers/gpu/drm-psb/intel_setup.c
 create mode 100644 drivers/gpu/drm-psb/psb_buffer.c
 create mode 100644 drivers/gpu/drm-psb/psb_detear.c
 create mode 100644 drivers/gpu/drm-psb/psb_detear.h
 create mode 100644 drivers/gpu/drm-psb/psb_drm.h
 create mode 100644 drivers/gpu/drm-psb/psb_drv.c
 create mode 100644 drivers/gpu/drm-psb/psb_drv.h
 create mode 100644 drivers/gpu/drm-psb/psb_fb.c
 create mode 100644 drivers/gpu/drm-psb/psb_fence.c
 create mode 100644 drivers/gpu/drm-psb/psb_gtt.c
 create mode 100644 drivers/gpu/drm-psb/psb_i2c.c
 create mode 100644 drivers/gpu/drm-psb/psb_irq.c
 create mode 100644 drivers/gpu/drm-psb/psb_mmu.c
 create mode 100644 drivers/gpu/drm-psb/psb_msvdx.c
 create mode 100644 drivers/gpu/drm-psb/psb_msvdx.h
 create mode 100644 drivers/gpu/drm-psb/psb_msvdxinit.c
 create mode 100644 drivers/gpu/drm-psb/psb_reg.h
 create mode 100644 drivers/gpu/drm-psb/psb_regman.c
 create mode 100644 drivers/gpu/drm-psb/psb_reset.c
 create mode 100644 drivers/gpu/drm-psb/psb_scene.c
 create mode 100644 drivers/gpu/drm-psb/psb_scene.h
 create mode 100644 drivers/gpu/drm-psb/psb_schedule.c
 create mode 100644 drivers/gpu/drm-psb/psb_schedule.h
 create mode 100644 drivers/gpu/drm-psb/psb_setup.c
 create mode 100644 drivers/gpu/drm-psb/psb_sgx.c
 create mode 100644 drivers/gpu/drm-psb/psb_xhw.c

[patch too large to post, see git branch]


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 02/17][KERNEL] drm-psb: remove the package Makefile and replace it with the kernel Makefile
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
  2012-03-14  3:57 ` [PATCH 01/17][KERNEL] drm: add the base source of the Poulsbo (psb) 2D X11 driver tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 03/17][KERNEL] drm: apply psb-kernel-source package's build.patch tom.zanussi
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

The default Makefile is meant for building the modules externally.
Replace it with the normal kernel Makefile (Makefile.kernel).

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/Makefile        |  433 ++++++-----------------------------
 drivers/gpu/drm-psb/Makefile.kernel |   76 ------
 2 files changed, 71 insertions(+), 438 deletions(-)
 delete mode 100644 drivers/gpu/drm-psb/Makefile.kernel

diff --git a/drivers/gpu/drm-psb/Makefile b/drivers/gpu/drm-psb/Makefile
index ffb397e..702bf28 100644
--- a/drivers/gpu/drm-psb/Makefile
+++ b/drivers/gpu/drm-psb/Makefile
@@ -1,367 +1,76 @@
-# Makefile -- For the Direct Rendering Manager module (drm)
 #
-# Based on David Woodhouse's mtd build.
-#
-# Modified to handle the DRM requirements and builds on a wider range of
-# platforms in a flexible way by David Dawes.  It's not clear, however,
-# that this approach is simpler than the old one.
-#
-# The purpose of this Makefile is to handle setting up everything
-# needed for an out-of-kernel source build.  Makefile.kernel contains
-# everything required for in-kernel source builds.  It is included into
-# this file, so none of that should be duplicated here.
-#
-# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux,v 1.40 2003/08/17 17:12:25 dawes Exp $
-#
-
-#
-# By default, the build is done against the running linux kernel source.
-# To build against a different kernel source tree, set LINUXDIR:
-#
-#    make LINUXDIR=/path/to/kernel/source
-
-#
-# To build only some modules, either set DRM_MODULES to the list of modules,
-# or specify the modules as targets:
+# Makefile for the drm device driver.  This driver provides support for the
+# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
 #
-#    make r128.o radeon.o
-#
-# or:
+# Based on David Woodhouse's mtd build.
 #
-#    make DRM_MODULES="r128 radeon"
+# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.18 2003/08/16 17:59:17 dawes Exp $
 #
 
-SHELL=/bin/sh
-
-.SUFFIXES:
-
-ifndef LINUXDIR
-RUNNING_REL := $(shell uname -r)
-
-LINUXDIR := $(shell if [ -e /lib/modules/$(RUNNING_REL)/source ]; then \
-		 echo /lib/modules/$(RUNNING_REL)/source; \
-		 else echo /lib/modules/$(RUNNING_REL)/build; fi)
-endif
-
-ifndef O
-O := $(shell if [ -e /lib/modules/$(RUNNING_REL)/build ]; then \
-		 echo /lib/modules/$(RUNNING_REL)/build; \
-		 else echo ""; fi)
-#O := $(LINUXDIR)
-endif
-
-ifdef ARCH
-MACHINE := $(ARCH)
-else
-MACHINE := $(shell uname -m)
-endif
-
-# Modules for all architectures
-MODULE_LIST := drm.o tdfx.o r128.o radeon.o mga.o sis.o savage.o via.o \
-               mach64.o nv.o nouveau.o psb.o xgi.o
-
-# Modules only for ix86 architectures
-ifneq (,$(findstring 86,$(MACHINE)))
-ARCHX86 := 1
-MODULE_LIST += i810.o i915.o
-endif
-
-ifneq (,$(findstring sparc64,$(MACHINE)))
-ARCHSPARC64 := 1
-#MODULE_LIST += ffb.o
-endif
-
-DRM_MODULES ?= $(MODULE_LIST)
-
-# These definitions are for handling dependencies in the out of kernel build.
-
-DRMHEADERS =    drmP.h drm_compat.h drm_os_linux.h drm.h drm_sarea.h
-COREHEADERS =   drm_core.h drm_sman.h drm_hashtab.h 
-
-TDFXHEADERS =   tdfx_drv.h $(DRMHEADERS)
-R128HEADERS =   r128_drv.h r128_drm.h $(DRMHEADERS)
-RADEONHEADERS = radeon_drv.h radeon_drm.h r300_reg.h $(DRMHEADERS)
-MGAHEADERS =    mga_drv.h mga_drm.h mga_ucode.h $(DRMHEADERS)
-I810HEADERS =   i810_drv.h i810_drm.h $(DRMHEADERS)
-I915HEADERS =   i915_drv.h i915_drm.h $(DRMHEADERS)
-SISHEADERS=     sis_drv.h sis_drm.h drm_hashtab.h drm_sman.h $(DRMHEADERS)
-SAVAGEHEADERS=  savage_drv.h savage_drm.h $(DRMHEADERS)
-VIAHEADERS =	via_drm.h via_drv.h via_3d_reg.h via_verifier.h $(DRMHEADERS)
-MACH64HEADERS = mach64_drv.h mach64_drm.h $(DRMHEADERS)
-NVHEADERS =     nv_drv.h $(DRMHEADERS)
-FFBHEADERS = 	ffb_drv.h $(DRMHEADERS)
-NOUVEAUHEADERS = nouveau_drv.h nouveau_drm.h nouveau_reg.h $(DRMHEADERS)
-PSBHEADERS=    psb_drv.h psb_drm.h psb_reg.h psb_kreg.h psb_scene.h \
-	psb_schedule.h psb_detear.h $(DRMHEADERS)
-XGIHEADERS = xgi_cmdlist.h xgi_drv.h xgi_misc.h xgi_regs.h $(DRMHEADERS)
-
-PROGS = dristat drmstat
-
-CLEANFILES = *.o *.ko $(PROGS) .depend .*.flags .*.d .*.cmd *.mod.c .tmp_versions
-
-# VERSION is not defined from the initial invocation.  It is defined when
-# this Makefile is invoked from the kernel's root Makefile.
-
-ifndef VERSION
-
-ifdef RUNNING_REL
-
-# SuSE has the version.h and autoconf.h headers for the current kernel
-# in /boot as /boot/vmlinuz.version.h and /boot/vmlinuz.autoconf.h.
-# Check these first to see if they match the running kernel.
-
-BOOTVERSION_PREFIX = /boot/vmlinuz.
-
-V := $(shell if [ -f $(BOOTVERSION_PREFIX)version.h ]; then \
-	grep UTS_RELEASE $(BOOTVERSION_PREFIX)version.h | \
-	cut -d' ' -f3; fi)
-
-ifeq ($(V),"$(RUNNING_REL)")
-HEADERFROMBOOT := 1
-GETCONFIG := MAKEFILES=$(shell pwd)/.config
-HAVECONFIG := y
-endif
-
-# On Red Hat we need to check if there is a .config file in the kernel
-# source directory.  If there isn't, we need to check if there's a
-# matching file in the configs subdirectory.
-
-ifneq ($(HAVECONFIG),y)
-HAVECONFIG := $(shell if [ -e $(LINUXDIR)/.config ]; then echo y; fi)
-endif
-
-ifneq ($(HAVECONFIG),y)
-REL_BASE := $(shell echo $(RUNNING_REL) | sed 's/-.*//')
-REL_TYPE := $(shell echo $(RUNNING_REL) | sed 's/[0-9.-]//g')
-ifeq ($(REL_TYPE),)
-RHCONFIG := configs/kernel-$(REL_BASE)-$(MACHINE).config
-else
-RHCONFIG := configs/kernel-$(REL_BASE)-$(MACHINE)-$(REL_TYPE).config
-endif
-HAVECONFIG := $(shell if [ -e $(LINUXDIR)/$(RHCONFIG) ]; then echo y; fi)
-ifneq ($(HAVECONFIG),y)
-RHCONFIG :=
-endif
-endif
-
-ifneq ($(HAVECONFIG),y)
-ifneq ($(0),$(LINUXDIR))
-GETCONFIG += O=$(O)
-endif
-HAVECONFIG := $(shell if [ -e $(O)/.config ]; then echo y; fi)
-endif
-
-ifneq ($(HAVECONFIG),y)
-$(error Cannot find a kernel config file)
-endif
-
-endif
-
-CLEANCONFIG := $(shell if cmp -s $(LINUXDIR)/.config .config; then echo y; fi)
-ifeq ($(CLEANCONFIG),y)
-CLEANFILES += $(LINUXDIR)/.config .config $(LINUXDIR)/tmp_include_depends
-endif
-
-all: modules
-
-modules: includes
-	+make -C $(LINUXDIR) $(GETCONFIG) SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
-
-ifeq ($(HEADERFROMBOOT),1)
-
-BOOTHEADERS = version.h autoconf.h
-BOOTCONFIG = .config
-
-CLEANFILES += $(BOOTHEADERS) $(BOOTCONFIG)
-
-includes:: $(BOOTHEADERS) $(BOOTCONFIG)
-
-version.h: $(BOOTVERSION_PREFIX)version.h
-	rm -f $@
-	ln -s $< $@
-
-autoconf.h: $(BOOTVERSION_PREFIX)autoconf.h
-	rm -f $@
-	ln -s $< $@
-
-.config: $(BOOTVERSION_PREFIX)config
-	rm -f $@
-	ln -s $< $@
-endif
-
-# This prepares an unused Red Hat kernel tree for the build.
-ifneq ($(RHCONFIG),)
-includes:: $(LINUXDIR)/.config $(LINUXDIR)/tmp_include_depends .config
-
-$(LINUXDIR)/.config: $(LINUXDIR)/$(RHCONFIG)
-	rm -f $@
-	ln -s $< $@
-
-.config: $(LINUXDIR)/$(RHCONFIG)
-	rm -f $@
-	ln -s $< $@
-
-$(LINUXDIR)/tmp_include_depends:
-	echo all: > $@
-endif
-
-# Make sure that the shared source files are linked into this directory.
-
-
-SHAREDDIR := .
-
-ifeq ($(shell if [ -d $(SHAREDDIR) ]; then echo y; fi),y)
-includes::  drm_pciids.h
-
-drm_pciids.h: $(SHAREDDIR)/drm_pciids.txt
-	sh ./create_linux_pci_lists.sh < $(SHAREDDIR)/drm_pciids.txt
-else
-includes::
-
-endif
-
-clean cleandir:
-	rm -rf $(CLEANFILES)
-
-$(MODULE_LIST)::
-	make DRM_MODULES=$@ modules
-
-# Build test utilities
-
-PRGCFLAGS = $(CFLAGS) -g -ansi -pedantic -DPOSIX_C_SOURCE=199309L \
-	    -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE \
-	    -I. -I../../..
-
-DRMSTATLIBS = -L../../.. -L.. -ldrm -lxf86_os \
-	      -L../../../../dummylib -ldummy -lm
-
-programs: $(PROGS)
-
-dristat: dristat.c
-	$(CC) $(PRGCFLAGS) $< -o $@
-
-drmstat: drmstat.c
-	$(CC) $(PRGCFLAGS) $< -o $@ $(DRMSTATLIBS)
-
-install:
-	make -C $(LINUXDIR) $(GETCONFIG) SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules_install
-
-else
-
-# Check for kernel versions that we don't support.
-
-BELOW26 := $(shell if [ $(VERSION) -lt 2 -o $(PATCHLEVEL) -lt 6 ]; then \
-		echo y; fi)
-
-ifeq ($(BELOW26),y)
-$(error Only 2.6.x and later kernels are supported \
-	($(VERSION).$(PATCHLEVEL).$(SUBLEVEL)))
-endif
-
-ifdef ARCHX86
-ifndef CONFIG_X86_CMPXCHG
-$(error CONFIG_X86_CMPXCHG needs to be enabled in the kernel)
-endif
-endif
-
-# This needs to go before all other include paths.
-CC += -I$(DRMSRCDIR)
-
-# Check for PAGE_AGP definition
-PAGE_AGP := $(shell cat $(LINUXDIR)/include/asm/agp.h 2>/dev/null | \
-		grep -c PAGE_AGP)
-
-ifneq ($(PAGE_AGP),0)
-EXTRA_CFLAGS += -DHAVE_PAGE_AGP
-endif
-
-# Start with all modules turned off.
-CONFIG_DRM_GAMMA := n
-CONFIG_DRM_TDFX := n
-CONFIG_DRM_MGA := n
-CONFIG_DRM_I810 := n
-CONFIG_DRM_R128 := n
-CONFIG_DRM_RADEON := n
-CONFIG_DRM_I915 := n
-CONFIG_DRM_SIS := n
-CONFIG_DRM_FFB := n
-CONFIG_DRM_SAVAGE := n
-CONFIG_DRM_VIA := n
-CONFIG_DRM_MACH64 := n
-CONFIG_DRM_NV := n
-CONFIG_DRM_NOUVEAU := n
-CONFIG_DRM_PSB := n
-CONFIG_DRM_XGI := n
-
-# Enable module builds for the modules requested/supported.
-
-ifneq (,$(findstring tdfx,$(DRM_MODULES)))
-CONFIG_DRM_TDFX := m
-endif
-ifneq (,$(findstring r128,$(DRM_MODULES)))
-CONFIG_DRM_R128 := m
-endif
-ifneq (,$(findstring radeon,$(DRM_MODULES)))
-CONFIG_DRM_RADEON := m
-endif
-ifneq (,$(findstring sis,$(DRM_MODULES)))
-CONFIG_DRM_SIS := m
-endif
-ifneq (,$(findstring via,$(DRM_MODULES)))
-CONFIG_DRM_VIA := m
-endif
-ifneq (,$(findstring mach64,$(DRM_MODULES)))
-CONFIG_DRM_MACH64 := m
-endif
-ifneq (,$(findstring ffb,$(DRM_MODULES)))
-CONFIG_DRM_FFB := m
-endif
-ifneq (,$(findstring savage,$(DRM_MODULES)))
-CONFIG_DRM_SAVAGE := m
-endif
-ifneq (,$(findstring mga,$(DRM_MODULES)))
-CONFIG_DRM_MGA := m
-endif
-ifneq (,$(findstring nv,$(DRM_MODULES)))
-CONFIG_DRM_NV := m
-endif
-ifneq (,$(findstring nouveau,$(DRM_MODULES)))
-CONFIG_DRM_NOUVEAU := m
-endif
-ifneq (,$(findstring xgi,$(DRM_MODULES)))
-CONFIG_DRM_XGI := m
-endif
-
-# These require AGP support
-
-ifneq (,$(findstring i810,$(DRM_MODULES)))
-CONFIG_DRM_I810 := m
-endif
-ifneq (,$(findstring i915,$(DRM_MODULES)))
-CONFIG_DRM_I915 := m
-endif
-ifneq (,$(findstring psb,$(DRM_MODULES)))
-CONFIG_DRM_PSB := m
-endif
-include $(DRMSRCDIR)/Makefile.kernel
-
-# Depencencies
-$(drm-objs):	$(DRMHEADERS) $(COREHEADERS)
-$(tdfx-objs):	$(TDFXHEADERS)
-$(r128-objs):	$(R128HEADERS)
-$(mga-objs):	$(MGAHEADERS)
-$(i810-objs):	$(I810HEADERS)
-$(i915-objs):	$(I915HEADERS)
-$(radeon-objs):	$(RADEONHEADERS)
-$(sis-objs):	$(SISHEADERS)
-$(ffb-objs):	$(FFBHEADERS)
-$(savage-objs): $(SAVAGEHEADERS)
-$(via-objs):	$(VIAHEADERS)
-$(mach64-objs): $(MACH64HEADERS)
-$(nv-objs):     $(NVHEADERS)
-$(nouveau-objs): $(NOUVEAUHEADERS)
-$(psb-objs):   $(PSBHEADERS)
-$(xgi-objs):    $(XGIHEADERS)
-
-endif
-
+drm-objs    := drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \
+		drm_drv.o drm_fops.o drm_ioctl.o drm_irq.o \
+		drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
+		drm_sysfs.o drm_pci.o drm_agpsupport.o drm_scatter.o \
+		drm_memory_debug.o ati_pcigart.o drm_sman.o \
+		drm_hashtab.o drm_mm.o drm_object.o drm_compat.o \
+	        drm_fence.o drm_ttm.o drm_bo.o drm_bo_move.o drm_crtc.o \
+		drm_edid.o drm_modes.o drm_bo_lock.o drm_regman.o drm_vm_nopage_compat.o
+tdfx-objs   := tdfx_drv.o
+r128-objs   := r128_drv.o r128_cce.o r128_state.o r128_irq.o
+mga-objs    := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o
+i810-objs   := i810_drv.o i810_dma.o
+i915-objs   := i915_drv.o i915_dma.o i915_irq.o i915_mem.o i915_fence.o \
+		i915_buffer.o intel_setup.o intel_i2c.o i915_init.o intel_fb.o \
+		i915_compat.o
+nouveau-objs := nouveau_drv.o nouveau_state.o nouveau_fifo.o nouveau_mem.o \
+		nouveau_object.o nouveau_irq.o nouveau_notifier.o nouveau_swmthd.o \
+		nouveau_sgdma.o nouveau_dma.o nouveau_buffer.o nouveau_fence.o \
+		nv04_timer.o \
+		nv04_mc.o nv40_mc.o nv50_mc.o \
+		nv04_fb.o nv10_fb.o nv40_fb.o \
+		nv04_fifo.o nv10_fifo.o nv40_fifo.o nv50_fifo.o \
+		nv04_graph.o nv10_graph.o nv20_graph.o \
+		nv40_graph.o nv50_graph.o \
+		nv04_instmem.o nv50_instmem.o
+radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o r300_cmdbuf.o radeon_fence.o radeon_buffer.o
+sis-objs    := sis_drv.o sis_mm.o
+ffb-objs    := ffb_drv.o ffb_context.o
+savage-objs := savage_drv.o savage_bci.o savage_state.o
+via-objs    := via_irq.o via_drv.o via_map.o via_mm.o via_dma.o via_verifier.o \
+		via_video.o via_dmablit.o via_fence.o via_buffer.o
+mach64-objs := mach64_drv.o mach64_dma.o mach64_irq.o mach64_state.o
+nv-objs := nv_drv.o
+psb-objs    := psb_drv.o psb_mmu.o psb_sgx.o psb_irq.o psb_fence.o \
+		psb_buffer.o psb_gtt.o psb_setup.o psb_i2c.o psb_fb.o \
+		psb_schedule.o psb_scene.o psb_reset.o \
+		psb_regman.o psb_xhw.o psb_msvdx.o psb_msvdxinit.o \
+		psb_detear.o
+xgi-objs    := xgi_cmdlist.o xgi_drv.o xgi_fb.o xgi_misc.o xgi_pcie.o \
+		xgi_fence.o
+
+ifeq ($(CONFIG_COMPAT),y)
+drm-objs    += drm_ioc32.o
+radeon-objs += radeon_ioc32.o
+mga-objs    += mga_ioc32.o
+r128-objs   += r128_ioc32.o
+i915-objs   += i915_ioc32.o
+nouveau-objs += nouveau_ioc32.o
+xgi-objs    += xgi_ioc32.o
+endif
+
+obj-m			+= drm.o
+obj-$(CONFIG_DRM_TDFX)	+= tdfx.o
+obj-$(CONFIG_DRM_R128)	+= r128.o
+obj-$(CONFIG_DRM_RADEON)+= radeon.o
+obj-$(CONFIG_DRM_MGA)	+= mga.o
+obj-$(CONFIG_DRM_I810)	+= i810.o
+obj-$(CONFIG_DRM_I915)	+= i915.o
+obj-$(CONFIG_DRM_SIS)   += sis.o
+obj-$(CONFIG_DRM_FFB)   += ffb.o
+obj-$(CONFIG_DRM_SAVAGE)+= savage.o
+obj-$(CONFIG_DRM_VIA)   += via.o
+obj-$(CONFIG_DRM_MACH64)+= mach64.o
+obj-$(CONFIG_DRM_NV)    += nv.o
+obj-$(CONFIG_DRM_NOUVEAU) += nouveau.o
+obj-$(CONFIG_DRM_PSB)   += psb.o
+obj-$(CONFIG_DRM_XGI)   += xgi.o
diff --git a/drivers/gpu/drm-psb/Makefile.kernel b/drivers/gpu/drm-psb/Makefile.kernel
deleted file mode 100644
index 702bf28..0000000
--- a/drivers/gpu/drm-psb/Makefile.kernel
+++ /dev/null
@@ -1,76 +0,0 @@
-#
-# Makefile for the drm device driver.  This driver provides support for the
-# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
-#
-# Based on David Woodhouse's mtd build.
-#
-# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.18 2003/08/16 17:59:17 dawes Exp $
-#
-
-drm-objs    := drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \
-		drm_drv.o drm_fops.o drm_ioctl.o drm_irq.o \
-		drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
-		drm_sysfs.o drm_pci.o drm_agpsupport.o drm_scatter.o \
-		drm_memory_debug.o ati_pcigart.o drm_sman.o \
-		drm_hashtab.o drm_mm.o drm_object.o drm_compat.o \
-	        drm_fence.o drm_ttm.o drm_bo.o drm_bo_move.o drm_crtc.o \
-		drm_edid.o drm_modes.o drm_bo_lock.o drm_regman.o drm_vm_nopage_compat.o
-tdfx-objs   := tdfx_drv.o
-r128-objs   := r128_drv.o r128_cce.o r128_state.o r128_irq.o
-mga-objs    := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o
-i810-objs   := i810_drv.o i810_dma.o
-i915-objs   := i915_drv.o i915_dma.o i915_irq.o i915_mem.o i915_fence.o \
-		i915_buffer.o intel_setup.o intel_i2c.o i915_init.o intel_fb.o \
-		i915_compat.o
-nouveau-objs := nouveau_drv.o nouveau_state.o nouveau_fifo.o nouveau_mem.o \
-		nouveau_object.o nouveau_irq.o nouveau_notifier.o nouveau_swmthd.o \
-		nouveau_sgdma.o nouveau_dma.o nouveau_buffer.o nouveau_fence.o \
-		nv04_timer.o \
-		nv04_mc.o nv40_mc.o nv50_mc.o \
-		nv04_fb.o nv10_fb.o nv40_fb.o \
-		nv04_fifo.o nv10_fifo.o nv40_fifo.o nv50_fifo.o \
-		nv04_graph.o nv10_graph.o nv20_graph.o \
-		nv40_graph.o nv50_graph.o \
-		nv04_instmem.o nv50_instmem.o
-radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o r300_cmdbuf.o radeon_fence.o radeon_buffer.o
-sis-objs    := sis_drv.o sis_mm.o
-ffb-objs    := ffb_drv.o ffb_context.o
-savage-objs := savage_drv.o savage_bci.o savage_state.o
-via-objs    := via_irq.o via_drv.o via_map.o via_mm.o via_dma.o via_verifier.o \
-		via_video.o via_dmablit.o via_fence.o via_buffer.o
-mach64-objs := mach64_drv.o mach64_dma.o mach64_irq.o mach64_state.o
-nv-objs := nv_drv.o
-psb-objs    := psb_drv.o psb_mmu.o psb_sgx.o psb_irq.o psb_fence.o \
-		psb_buffer.o psb_gtt.o psb_setup.o psb_i2c.o psb_fb.o \
-		psb_schedule.o psb_scene.o psb_reset.o \
-		psb_regman.o psb_xhw.o psb_msvdx.o psb_msvdxinit.o \
-		psb_detear.o
-xgi-objs    := xgi_cmdlist.o xgi_drv.o xgi_fb.o xgi_misc.o xgi_pcie.o \
-		xgi_fence.o
-
-ifeq ($(CONFIG_COMPAT),y)
-drm-objs    += drm_ioc32.o
-radeon-objs += radeon_ioc32.o
-mga-objs    += mga_ioc32.o
-r128-objs   += r128_ioc32.o
-i915-objs   += i915_ioc32.o
-nouveau-objs += nouveau_ioc32.o
-xgi-objs    += xgi_ioc32.o
-endif
-
-obj-m			+= drm.o
-obj-$(CONFIG_DRM_TDFX)	+= tdfx.o
-obj-$(CONFIG_DRM_R128)	+= r128.o
-obj-$(CONFIG_DRM_RADEON)+= radeon.o
-obj-$(CONFIG_DRM_MGA)	+= mga.o
-obj-$(CONFIG_DRM_I810)	+= i810.o
-obj-$(CONFIG_DRM_I915)	+= i915.o
-obj-$(CONFIG_DRM_SIS)   += sis.o
-obj-$(CONFIG_DRM_FFB)   += ffb.o
-obj-$(CONFIG_DRM_SAVAGE)+= savage.o
-obj-$(CONFIG_DRM_VIA)   += via.o
-obj-$(CONFIG_DRM_MACH64)+= mach64.o
-obj-$(CONFIG_DRM_NV)    += nv.o
-obj-$(CONFIG_DRM_NOUVEAU) += nouveau.o
-obj-$(CONFIG_DRM_PSB)   += psb.o
-obj-$(CONFIG_DRM_XGI)   += xgi.o
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 03/17][KERNEL] drm: apply psb-kernel-source package's build.patch
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
  2012-03-14  3:57 ` [PATCH 01/17][KERNEL] drm: add the base source of the Poulsbo (psb) 2D X11 driver tom.zanussi
  2012-03-14  3:57 ` [PATCH 02/17][KERNEL] drm-psb: remove the package Makefile and replace it with the kernel Makefile tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 04/17][KERNEL] drm: intel_ldvs.c: add missing arg to backlight_device_register() call tom.zanussi
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5830 bytes --]

From: Tom Zanussi <tom.zanussi@intel.com>

Build mods required for compilation.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/drm_agpsupport.c |    2 +-
 drivers/gpu/drm-psb/drm_edid.c       |    3 ++-
 drivers/gpu/drm-psb/drm_memory.c     |    4 ++--
 drivers/gpu/drm-psb/drm_os_linux.h   |    6 ------
 drivers/gpu/drm-psb/drm_ttm.c        |    2 ++
 drivers/gpu/drm-psb/drm_vm.c         |    4 ++--
 drivers/gpu/drm-psb/intel_lvds.c     |    1 +
 drivers/gpu/drm-psb/psb_drv.c        |    4 +++-
 drivers/gpu/drm-psb/psb_drv.h        |    2 +-
 9 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm-psb/drm_agpsupport.c b/drivers/gpu/drm-psb/drm_agpsupport.c
index a1af119..8b739d2 100644
--- a/drivers/gpu/drm-psb/drm_agpsupport.c
+++ b/drivers/gpu/drm-psb/drm_agpsupport.c
@@ -524,7 +524,7 @@ static int drm_agp_populate(struct drm_ttm_backend *backend,
 	DRM_DEBUG("Current page count is %ld\n", (long) mem->page_count);
 	mem->page_count = 0;
 	for (cur_page = pages; cur_page < last_page; ++cur_page)
-		mem->pages[mem->page_count++] = phys_to_gart(page_to_phys(*cur_page));
+		mem->pages[mem->page_count++] = page_to_phys(*cur_page);
 	agp_be->mem = mem;
 	return 0;
 }
diff --git a/drivers/gpu/drm-psb/drm_edid.c b/drivers/gpu/drm-psb/drm_edid.c
index 6307cdc..54d27c6 100644
--- a/drivers/gpu/drm-psb/drm_edid.c
+++ b/drivers/gpu/drm-psb/drm_edid.c
@@ -11,6 +11,7 @@
 #include "drm_edid.h"
 
 #include <acpi/acpi_drivers.h>
+#include <linux/i2c.h>
 
 /* Valid EDID header has these bytes */
 static u8 edid_header[] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 };
@@ -39,7 +40,7 @@ int drm_get_acpi_edid(char *method, char *edid, ssize_t length)
 	if (obj && obj->type == ACPI_TYPE_BUFFER)
 		memcpy(edid, obj->buffer.pointer, obj->buffer.length);
 	else {
-		printk(KERN_ERR PREFIX "Invalid _DDC data\n");
+		printk(KERN_ERR "Invalid _DDC data\n");
 		status = -EFAULT;
 		kfree(obj);
 	}
diff --git a/drivers/gpu/drm-psb/drm_memory.c b/drivers/gpu/drm-psb/drm_memory.c
index becca1e..c890499 100644
--- a/drivers/gpu/drm-psb/drm_memory.c
+++ b/drivers/gpu/drm-psb/drm_memory.c
@@ -264,9 +264,9 @@ static void *agp_remap(unsigned long offset, unsigned long size,
 		return NULL;
 
 	phys_addr_map =
-	    agpmem->memory->memory + (offset - agpmem->bound) / PAGE_SIZE;
+	    agpmem->memory->pages + (offset - agpmem->bound) / PAGE_SIZE;
 	for (i = 0; i < num_pages; ++i)
-		page_map[i] = pfn_to_page(phys_addr_map[i] >> PAGE_SHIFT);
+                page_map[i] = phys_addr_map[i];
 	addr = vmap(page_map, num_pages, VM_IOREMAP, PAGE_AGP);
 	vfree(page_map);
 
diff --git a/drivers/gpu/drm-psb/drm_os_linux.h b/drivers/gpu/drm-psb/drm_os_linux.h
index f52f0eb..ac5051b 100644
--- a/drivers/gpu/drm-psb/drm_os_linux.h
+++ b/drivers/gpu/drm-psb/drm_os_linux.h
@@ -50,12 +50,6 @@
 
 /** IRQ handler arguments and return type and values */
 #define DRM_IRQ_ARGS		int irq, void *arg
-/** backwards compatibility with old irq return values */
-#ifndef IRQ_HANDLED
-typedef void irqreturn_t;
-#define IRQ_HANDLED		/* nothing */
-#define IRQ_NONE		/* nothing */
-#endif
 
 /** AGP types */
 #if __OS_HAS_AGP
diff --git a/drivers/gpu/drm-psb/drm_ttm.c b/drivers/gpu/drm-psb/drm_ttm.c
index e0afb04..8aa3947 100644
--- a/drivers/gpu/drm-psb/drm_ttm.c
+++ b/drivers/gpu/drm-psb/drm_ttm.c
@@ -28,6 +28,8 @@
  * Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com>
  */
 
+#include "linux/spinlock.h"
+#include "asm/agp.h"
 #include "drmP.h"
 
 static void drm_ttm_ipi_handler(void *null)
diff --git a/drivers/gpu/drm-psb/drm_vm.c b/drivers/gpu/drm-psb/drm_vm.c
index 5baefee..7adbf7b 100644
--- a/drivers/gpu/drm-psb/drm_vm.c
+++ b/drivers/gpu/drm-psb/drm_vm.c
@@ -145,13 +145,13 @@ static int drm_do_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 		 * Get the page, inc the use count, and return it
 		 */
 		offset = (baddr - agpmem->bound) >> PAGE_SHIFT;
-		page = virt_to_page(__va(agpmem->memory->memory[offset]));
+		page = agpmem->memory->pages[offset];
 		get_page(page);
 		vmf->page = page;
 
 		DRM_DEBUG
 		    ("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n",
-		     baddr, __va(agpmem->memory->memory[offset]), offset,
+		     baddr, agpmem->memory->pages[offset], offset,
 		     page_count(page));
 		return 0;
 	}
diff --git a/drivers/gpu/drm-psb/intel_lvds.c b/drivers/gpu/drm-psb/intel_lvds.c
index 208f3ad..16fbd79 100644
--- a/drivers/gpu/drm-psb/intel_lvds.c
+++ b/drivers/gpu/drm-psb/intel_lvds.c
@@ -29,6 +29,7 @@
 
 #include <linux/i2c.h>
 #include <linux/backlight.h>
+#include <linux/i2c.h>
 #include "drm_crtc.h"
 #include "drm_edid.h"
 #include "intel_lvds.h"
diff --git a/drivers/gpu/drm-psb/psb_drv.c b/drivers/gpu/drm-psb/psb_drv.c
index 2a2e8d4..794c180 100644
--- a/drivers/gpu/drm-psb/psb_drv.c
+++ b/drivers/gpu/drm-psb/psb_drv.c
@@ -34,8 +34,10 @@
 #include <linux/cpu.h>
 #include <linux/notifier.h>
 #include <linux/fb.h>
+#include "linux/spinlock.h"
+#include "asm/agp.h"
 
-int drm_psb_debug = 0;
+int drm_psb_debug = 255;
 EXPORT_SYMBOL(drm_psb_debug);
 static int drm_psb_trap_pagefaults = 0;
 static int drm_psb_clock_gating = 0;
diff --git a/drivers/gpu/drm-psb/psb_drv.h b/drivers/gpu/drm-psb/psb_drv.h
index f2c2657..ad0c36c 100644
--- a/drivers/gpu/drm-psb/psb_drv.h
+++ b/drivers/gpu/drm-psb/psb_drv.h
@@ -808,7 +808,7 @@ extern int drm_psb_detear;
 #define PSB_DEBUG(_flag, _fmt, _arg...)					\
 	do {								\
 	  if (unlikely((_flag) & drm_psb_debug))			\
-			printk(KERN_DEBUG				\
+			printk(KERN_ERR				\
 			       "[psb:0x%02x:%s] " _fmt , _flag,	\
 			       __FUNCTION__ , ##_arg);			\
 	} while (0)
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 04/17][KERNEL] drm: intel_ldvs.c: add missing arg to backlight_device_register() call
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (2 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 03/17][KERNEL] drm: apply psb-kernel-source package's build.patch tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 05/17][KERNEL] emenlow: switch to psb tom.zanussi
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

backlight_device_register() added a backlight_props param - give it
another arg to keep it happy.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/intel_lvds.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm-psb/intel_lvds.c b/drivers/gpu/drm-psb/intel_lvds.c
index 16fbd79..a778436 100644
--- a/drivers/gpu/drm-psb/intel_lvds.c
+++ b/drivers/gpu/drm-psb/intel_lvds.c
@@ -801,8 +801,10 @@ void intel_lvds_init(struct drm_device *dev)
 	}
 
 	if ((blc_type == BLC_I2C_TYPE) || (blc_type == BLC_PWM_TYPE)){	
+		struct backlight_properties props;
+		memset(&props, 0, sizeof(struct backlight_properties));
 		/* add /sys/class/backlight interface as standard */
-		psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops);
+		psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops, &props);
 		if (psbbl_device){
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
 			down(&psbbl_device->sem);
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 05/17][KERNEL] emenlow: switch to psb
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (3 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 04/17][KERNEL] drm: intel_ldvs.c: add missing arg to backlight_device_register() call tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 06/17][KERNEL] drm: Fix psb ioctl assignment tom.zanussi
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

Use drm-psb instead of drm for emenlow.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/Makefile  |    2 +-
 drivers/video/Kconfig |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/Makefile b/drivers/gpu/Makefile
index cc92778..7585044 100644
--- a/drivers/gpu/Makefile
+++ b/drivers/gpu/Makefile
@@ -1 +1 @@
-obj-y			+= drm/ vga/ stub/
+obj-y			+= drm-psb/ vga/ stub/
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index d83e967..f6fe3bd 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -19,7 +19,7 @@ source "drivers/char/agp/Kconfig"
 
 source "drivers/gpu/vga/Kconfig"
 
-source "drivers/gpu/drm/Kconfig"
+source "drivers/gpu/drm-psb/Kconfig"
 
 source "drivers/gpu/stub/Kconfig"
 
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 06/17][KERNEL] drm: Fix psb ioctl assignment
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (4 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 05/17][KERNEL] emenlow: switch to psb tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 07/17][KERNEL] drm-psb: remove BKL remnants tom.zanussi
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

Replace drm_ioctl with drm_unlocked_ioctl.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/drm_drv.c |    2 ++
 drivers/gpu/drm-psb/psb_drv.c |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm-psb/drm_drv.c b/drivers/gpu/drm-psb/drm_drv.c
index b34f2e5..573427b 100644
--- a/drivers/gpu/drm-psb/drm_drv.c
+++ b/drivers/gpu/drm-psb/drm_drv.c
@@ -663,7 +663,9 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 		   ((ioctl->flags & DRM_MASTER) && !file_priv->master)) {
 		retcode = -EACCES;
 	} else {
+		lock_kernel();
 		retcode = func(dev, kdata, file_priv);
+		unlock_kernel();
 	}
 
 	if ((retcode == 0) && (cmd & IOC_OUT)) {
diff --git a/drivers/gpu/drm-psb/psb_drv.c b/drivers/gpu/drm-psb/psb_drv.c
index 794c180..67486c0 100644
--- a/drivers/gpu/drm-psb/psb_drv.c
+++ b/drivers/gpu/drm-psb/psb_drv.c
@@ -984,7 +984,7 @@ static struct drm_driver driver = {
 		 .owner = THIS_MODULE,
 		 .open = drm_open,
 		 .release = psb_release,
-		 .ioctl = drm_ioctl,
+		 .unlocked_ioctl = drm_unlocked_ioctl,
 		 .mmap = drm_mmap,
 		 .poll = psb_poll,
 		 .fasync = drm_fasync,
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 07/17][KERNEL] drm-psb: remove BKL remnants
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (5 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 06/17][KERNEL] drm: Fix psb ioctl assignment tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 08/17][KERNEL] drm-psb: update spinlock initializers tom.zanussi
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

replace lock/unlock_kernel with the drm_global_mutex from 3.0.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/drmP.h       |    3 ++-
 drivers/gpu/drm-psb/drm_drv.c    |    4 ++--
 drivers/gpu/drm-psb/drm_fops.c   |   10 ++++++----
 drivers/gpu/drm-psb/drm_ioc32.c  |    4 ++--
 drivers/gpu/drm-psb/i915_ioc32.c |    4 ++--
 5 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm-psb/drmP.h b/drivers/gpu/drm-psb/drmP.h
index 2449fe0..3cca5fe 100644
--- a/drivers/gpu/drm-psb/drmP.h
+++ b/drivers/gpu/drm-psb/drmP.h
@@ -51,7 +51,6 @@
 #include <linux/pci.h>
 #include <linux/version.h>
 #include <linux/sched.h>
-#include <linux/smp_lock.h>	/* For (un)lock_kernel */
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #include <linux/i2c.h>
@@ -953,6 +952,8 @@ extern long drm_compat_ioctl(struct file *filp,
 
 extern int drm_lastclose(struct drm_device *dev);
 
+extern struct mutex drm_global_mutex;
+
 				/* Device support (drm_fops.h) */
 extern int drm_open(struct inode *inode, struct file *filp);
 extern int drm_stub_open(struct inode *inode, struct file *filp);
diff --git a/drivers/gpu/drm-psb/drm_drv.c b/drivers/gpu/drm-psb/drm_drv.c
index 573427b..472859b 100644
--- a/drivers/gpu/drm-psb/drm_drv.c
+++ b/drivers/gpu/drm-psb/drm_drv.c
@@ -663,9 +663,9 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 		   ((ioctl->flags & DRM_MASTER) && !file_priv->master)) {
 		retcode = -EACCES;
 	} else {
-		lock_kernel();
+		mutex_lock(&drm_global_mutex);
 		retcode = func(dev, kdata, file_priv);
-		unlock_kernel();
+		mutex_unlock(&drm_global_mutex);
 	}
 
 	if ((retcode == 0) && (cmd & IOC_OUT)) {
diff --git a/drivers/gpu/drm-psb/drm_fops.c b/drivers/gpu/drm-psb/drm_fops.c
index 51a7905..8132c54 100644
--- a/drivers/gpu/drm-psb/drm_fops.c
+++ b/drivers/gpu/drm-psb/drm_fops.c
@@ -38,6 +38,8 @@
 #include "drm_sarea.h"
 #include <linux/poll.h>
 
+DEFINE_MUTEX(drm_global_mutex);
+
 static int drm_open_helper(struct inode *inode, struct file *filp,
 			   struct drm_device * dev);
 
@@ -379,7 +381,7 @@ int drm_release(struct inode *inode, struct file *filp)
 	struct drm_device *dev = file_priv->head->dev;
 	int retcode = 0;
 
-	lock_kernel();
+	mutex_lock(&drm_global_mutex);
 
 	DRM_DEBUG("open_count = %d\n", dev->open_count);
 
@@ -500,16 +502,16 @@ int drm_release(struct inode *inode, struct file *filp)
 			DRM_ERROR("Device busy: %d %d\n",
 				  atomic_read(&dev->ioctl_count), dev->blocked);
 			spin_unlock(&dev->count_lock);
-			unlock_kernel();
+			mutex_unlock(&drm_global_mutex);
 			return -EBUSY;
 		}
 		spin_unlock(&dev->count_lock);
-		unlock_kernel();
+		mutex_unlock(&drm_global_mutex);
 		return drm_lastclose(dev);
 	}
 	spin_unlock(&dev->count_lock);
 
-	unlock_kernel();
+	mutex_unlock(&drm_global_mutex);
 
 	return retcode;
 }
diff --git a/drivers/gpu/drm-psb/drm_ioc32.c b/drivers/gpu/drm-psb/drm_ioc32.c
index 0188154..0de3c82 100644
--- a/drivers/gpu/drm-psb/drm_ioc32.c
+++ b/drivers/gpu/drm-psb/drm_ioc32.c
@@ -1061,12 +1061,12 @@ long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 
 	fn = drm_compat_ioctls[nr];
 
-	lock_kernel();		/* XXX for now */
+	mutex_lock(&drm_global_lock);
 	if (fn != NULL)
 		ret = (*fn)(filp, cmd, arg);
 	else
 		ret = drm_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
-	unlock_kernel();
+	mutex_unlock(&drm_global_lock);
 
 	return ret;
 }
diff --git a/drivers/gpu/drm-psb/i915_ioc32.c b/drivers/gpu/drm-psb/i915_ioc32.c
index 11dee03..5fb6892 100644
--- a/drivers/gpu/drm-psb/i915_ioc32.c
+++ b/drivers/gpu/drm-psb/i915_ioc32.c
@@ -212,12 +212,12 @@ long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 	if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(i915_compat_ioctls))
 		fn = i915_compat_ioctls[nr - DRM_COMMAND_BASE];
 
-	lock_kernel();		/* XXX for now */
+	mutex_lock(&drm_global_lock);
 	if (fn != NULL)
 		ret = (*fn)(filp, cmd, arg);
 	else
 		ret = drm_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
-	unlock_kernel();
+	mutex_unlock(&drm_global_lock);
 
 	return ret;
 }
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 08/17][KERNEL] drm-psb: update spinlock initializers
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (6 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 07/17][KERNEL] drm-psb: remove BKL remnants tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 09/17][KERNEL] drm-psb: remove call to agp_flush_chipset tom.zanussi
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

Update SPIN_LOCK_UNLOCKED users to __ form.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/drm_compat.h       |    2 +-
 drivers/gpu/drm-psb/drm_memory.c       |    2 +-
 drivers/gpu/drm-psb/drm_memory_debug.c |    2 +-
 drivers/gpu/drm-psb/drm_memory_debug.h |    2 +-
 drivers/gpu/drm-psb/psb_drv.c          |    2 +-
 drivers/gpu/drm-psb/psb_reset.c        |    2 +-
 drivers/gpu/drm-psb/psb_schedule.c     |    2 +-
 drivers/gpu/drm-psb/psb_sgx.c          |    2 +-
 drivers/gpu/drm-psb/psb_xhw.c          |    2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm-psb/drm_compat.h b/drivers/gpu/drm-psb/drm_compat.h
index 4895635..d24421c 100644
--- a/drivers/gpu/drm-psb/drm_compat.h
+++ b/drivers/gpu/drm-psb/drm_compat.h
@@ -140,7 +140,7 @@ static __inline__ void *kcalloc(size_t nmemb, size_t size, int flags)
 #endif
 
 #ifndef DEFINE_SPINLOCK
-#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
+#define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
 #endif
 
 /* old architectures */
diff --git a/drivers/gpu/drm-psb/drm_memory.c b/drivers/gpu/drm-psb/drm_memory.c
index c890499..207e8cb 100644
--- a/drivers/gpu/drm-psb/drm_memory.c
+++ b/drivers/gpu/drm-psb/drm_memory.c
@@ -44,7 +44,7 @@ static struct {
 	uint64_t high_threshold;
 	uint64_t emer_threshold;
 } drm_memctl = {
-	.lock = SPIN_LOCK_UNLOCKED
+  .lock = __SPIN_LOCK_UNLOCKED(drm_memctl.lock)
 };
 
 int drm_alloc_memctl(size_t size)
diff --git a/drivers/gpu/drm-psb/drm_memory_debug.c b/drivers/gpu/drm-psb/drm_memory_debug.c
index c196ee2..2091844 100644
--- a/drivers/gpu/drm-psb/drm_memory_debug.c
+++ b/drivers/gpu/drm-psb/drm_memory_debug.c
@@ -44,7 +44,7 @@ typedef struct drm_mem_stats {
 	unsigned long bytes_freed;
 } drm_mem_stats_t;
 
-static spinlock_t drm_mem_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t drm_mem_lock = __SPIN_LOCK_UNLOCKED(drm_mem_lock);
 static unsigned long drm_ram_available = 0;	/* In pages */
 static unsigned long drm_ram_used = 0;
 static drm_mem_stats_t drm_mem_stats[] = {
diff --git a/drivers/gpu/drm-psb/drm_memory_debug.h b/drivers/gpu/drm-psb/drm_memory_debug.h
index b055ac0..433bdcb 100644
--- a/drivers/gpu/drm-psb/drm_memory_debug.h
+++ b/drivers/gpu/drm-psb/drm_memory_debug.h
@@ -42,7 +42,7 @@ typedef struct drm_mem_stats {
 	unsigned long bytes_freed;
 } drm_mem_stats_t;
 
-static spinlock_t drm_mem_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t drm_mem_lock = __SPIN_LOCK_UNLOCKED(drm_mem_lock);
 static unsigned long drm_ram_available = 0;	/* In pages */
 static unsigned long drm_ram_used = 0;
 static drm_mem_stats_t drm_mem_stats[] =
diff --git a/drivers/gpu/drm-psb/psb_drv.c b/drivers/gpu/drm-psb/psb_drv.c
index 67486c0..471481e 100644
--- a/drivers/gpu/drm-psb/psb_drv.c
+++ b/drivers/gpu/drm-psb/psb_drv.c
@@ -341,7 +341,7 @@ static int psb_do_init(struct drm_device *dev)
 		     _PSB_CC_REVISION_DESIGNER_SHIFT);
 	}
 
-	dev_priv->irqmask_lock = SPIN_LOCK_UNLOCKED;
+	dev_priv->irqmask_lock = __SPIN_LOCK_UNLOCKED(dev_priv->irqmask_lock);
 	dev_priv->fence0_irq_on = 0;
 
 	tt_pages = (pg->gatt_pages < PSB_TT_PRIV0_PLIMIT) ?
diff --git a/drivers/gpu/drm-psb/psb_reset.c b/drivers/gpu/drm-psb/psb_reset.c
index bfe8c49..a259890 100644
--- a/drivers/gpu/drm-psb/psb_reset.c
+++ b/drivers/gpu/drm-psb/psb_reset.c
@@ -352,7 +352,7 @@ void psb_watchdog_init(struct drm_psb_private *dev_priv)
 	struct timer_list *wt = &dev_priv->watchdog_timer;
 	unsigned long irq_flags;
 
-	dev_priv->watchdog_lock = SPIN_LOCK_UNLOCKED;
+	dev_priv->watchdog_lock = __SPIN_LOCK_UNLOCKED(dev_priv->watchdog_lock);
 	spin_lock_irqsave(&dev_priv->watchdog_lock, irq_flags);
 	init_timer(wt);
 	INIT_WORK(&dev_priv->watchdog_wq, &psb_reset_wq);
diff --git a/drivers/gpu/drm-psb/psb_schedule.c b/drivers/gpu/drm-psb/psb_schedule.c
index 959f8f9..2827802 100644
--- a/drivers/gpu/drm-psb/psb_schedule.c
+++ b/drivers/gpu/drm-psb/psb_schedule.c
@@ -1087,7 +1087,7 @@ int psb_scheduler_init(struct drm_device *dev, struct psb_scheduler *scheduler)
 	memset(scheduler, 0, sizeof(*scheduler));
 	scheduler->dev = dev;
 	mutex_init(&scheduler->task_wq_mutex);
-	scheduler->lock = SPIN_LOCK_UNLOCKED;
+	scheduler->lock = __SPIN_LOCK_UNLOCKED(scheduler->lock);
 	scheduler->idle = 1;
 
 	INIT_LIST_HEAD(&scheduler->ta_queue);
diff --git a/drivers/gpu/drm-psb/psb_sgx.c b/drivers/gpu/drm-psb/psb_sgx.c
index 3027113..e5645f5 100644
--- a/drivers/gpu/drm-psb/psb_sgx.c
+++ b/drivers/gpu/drm-psb/psb_sgx.c
@@ -301,7 +301,7 @@ int psb_emit_2d_copy_blit(struct drm_device *dev,
 
 void psb_init_2d(struct drm_psb_private *dev_priv)
 {
-	dev_priv->sequence_lock = SPIN_LOCK_UNLOCKED;
+	dev_priv->sequence_lock = __SPIN_LOCK_UNLOCKED(dev_priv->sequence_lock);
 	psb_reset(dev_priv, 1);
 	dev_priv->mmu_2d_offset = dev_priv->pg->gatt_start;
 	PSB_WSGX32(dev_priv->mmu_2d_offset, PSB_CR_BIF_TWOD_REQ_BASE);
diff --git a/drivers/gpu/drm-psb/psb_xhw.c b/drivers/gpu/drm-psb/psb_xhw.c
index 6470ec0..e363b50 100644
--- a/drivers/gpu/drm-psb/psb_xhw.c
+++ b/drivers/gpu/drm-psb/psb_xhw.c
@@ -401,7 +401,7 @@ int psb_xhw_init(struct drm_device *dev)
 	unsigned long irq_flags;
 
 	INIT_LIST_HEAD(&dev_priv->xhw_in);
-	dev_priv->xhw_lock = SPIN_LOCK_UNLOCKED;
+	dev_priv->xhw_lock = __SPIN_LOCK_UNLOCKED(dev_priv->xhw_lock);
 	atomic_set(&dev_priv->xhw_client, 0);
 	init_waitqueue_head(&dev_priv->xhw_queue);
 	init_waitqueue_head(&dev_priv->xhw_caller_queue);
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 09/17][KERNEL] drm-psb: remove call to agp_flush_chipset
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (7 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 08/17][KERNEL] drm-psb: update spinlock initializers tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 10/17][KERNEL] drm-psb: remove includes of nonexistent i2c-id.h tom.zanussi
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

agp_flush_chipset was removed because intel drm calls the chipset
functions directly, and psb doesn't implement a chipset_flush()
function anyway.  Leave drm_agp_flush_chipset exported for modules
that might be expecting it to be there though.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/drm_agpsupport.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm-psb/drm_agpsupport.c b/drivers/gpu/drm-psb/drm_agpsupport.c
index 8b739d2..c0dbab7 100644
--- a/drivers/gpu/drm-psb/drm_agpsupport.c
+++ b/drivers/gpu/drm-psb/drm_agpsupport.c
@@ -644,7 +644,6 @@ EXPORT_SYMBOL(drm_agp_init_ttm);
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
 void drm_agp_flush_chipset(struct drm_device *dev)
 {
-	agp_flush_chipset(dev->agp->bridge);
 }
 EXPORT_SYMBOL(drm_agp_flush_chipset);
 #endif
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 10/17][KERNEL] drm-psb: remove includes of nonexistent i2c-id.h
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (8 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 09/17][KERNEL] drm-psb: remove call to agp_flush_chipset tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 11/17][KERNEL] drm-psb: remove assigment to deprecated i2c_adapter.id tom.zanussi
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

i2c-id.h is gone, don't include it.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/intel_drv.h |    1 -
 drivers/gpu/drm-psb/intel_i2c.c |    1 -
 drivers/gpu/drm-psb/psb_i2c.c   |    1 -
 3 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm-psb/intel_drv.h b/drivers/gpu/drm-psb/intel_drv.h
index d3b7cb7..d05d533 100644
--- a/drivers/gpu/drm-psb/intel_drv.h
+++ b/drivers/gpu/drm-psb/intel_drv.h
@@ -7,7 +7,6 @@
 #define __INTEL_DRV_H__
 
 #include <linux/i2c.h>
-#include <linux/i2c-id.h>
 #include <linux/i2c-algo-bit.h>
 #include "drm_crtc.h"
 
diff --git a/drivers/gpu/drm-psb/intel_i2c.c b/drivers/gpu/drm-psb/intel_i2c.c
index efcbf65..4104c95 100644
--- a/drivers/gpu/drm-psb/intel_i2c.c
+++ b/drivers/gpu/drm-psb/intel_i2c.c
@@ -29,7 +29,6 @@
  */
 
 #include <linux/i2c.h>
-#include <linux/i2c-id.h>
 #include <linux/i2c-algo-bit.h>
 #include "drmP.h"
 #include "drm.h"
diff --git a/drivers/gpu/drm-psb/psb_i2c.c b/drivers/gpu/drm-psb/psb_i2c.c
index 5a80243..69def5b 100644
--- a/drivers/gpu/drm-psb/psb_i2c.c
+++ b/drivers/gpu/drm-psb/psb_i2c.c
@@ -29,7 +29,6 @@
  */
 
 #include <linux/i2c.h>
-#include <linux/i2c-id.h>
 #include <linux/i2c-algo-bit.h>
 #include "drmP.h"
 #include "drm.h"
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 11/17][KERNEL] drm-psb: remove assigment to deprecated i2c_adapter.id
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (9 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 10/17][KERNEL] drm-psb: remove includes of nonexistent i2c-id.h tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 12/17][KERNEL] drm-psb: use console_lock/unlock() tom.zanussi
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

i2c_adapter.id has been removed and it's not used by anything, so
remove it.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/intel_i2c.c |    4 ----
 drivers/gpu/drm-psb/psb_i2c.c   |    1 -
 2 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm-psb/intel_i2c.c b/drivers/gpu/drm-psb/intel_i2c.c
index 4104c95..ba257e3 100644
--- a/drivers/gpu/drm-psb/intel_i2c.c
+++ b/drivers/gpu/drm-psb/intel_i2c.c
@@ -139,10 +139,6 @@ struct intel_i2c_chan *intel_i2c_create(struct drm_device *dev, const u32 reg,
 	chan->reg = reg;
 	snprintf(chan->adapter.name, I2C_NAME_SIZE, "intel drm %s", name);
 	chan->adapter.owner = THIS_MODULE;
-#ifndef I2C_HW_B_INTELFB
-#define I2C_HW_B_INTELFB I2C_HW_B_I810
-#endif
-	chan->adapter.id = I2C_HW_B_INTELFB;
 	chan->adapter.algo_data	= &chan->algo;
 	chan->adapter.dev.parent = &dev->pdev->dev;
 	chan->algo.setsda = set_data;
diff --git a/drivers/gpu/drm-psb/psb_i2c.c b/drivers/gpu/drm-psb/psb_i2c.c
index 69def5b..804292a 100644
--- a/drivers/gpu/drm-psb/psb_i2c.c
+++ b/drivers/gpu/drm-psb/psb_i2c.c
@@ -136,7 +136,6 @@ struct intel_i2c_chan *intel_i2c_create(struct drm_device *dev,
 	chan->reg = reg;
 	snprintf(chan->adapter.name, I2C_NAME_SIZE, "intel drm %s", name);
 	chan->adapter.owner = THIS_MODULE;
-	chan->adapter.id = I2C_HW_B_INTELFB;
 	chan->adapter.algo_data = &chan->algo;
 	chan->adapter.dev.parent = &dev->pdev->dev;
 	chan->algo.setsda = set_data;
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2
@ 2012-03-14  3:57 tom.zanussi
  2012-03-14  3:57 ` [PATCH 01/17][KERNEL] drm: add the base source of the Poulsbo (psb) 2D X11 driver tom.zanussi
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

Hi Bruce,

Please pull this patchset into linux-yocto-3.2,
standard/default/emenlow.

Thanks,

Tom

The following changes since commit 764090858adaa214395b3667fe1929892c2083f7:
  Darren Hart (1):
        pch_uart: Use existing default_baud in setup_console

are available in the git repository at:

  git://git.yoctoproject.org/linux-yocto-2.6.37-contrib.git tzanussi/standard/default/emenlow-3.2
  http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-2.6.37-contrib/log/?h=tzanussi/standard/default/emenlow-3.2

Tom Zanussi (17):
  drm: add the base source of the Poulsbo (psb) 2D X11 driver
  drm-psb: remove the package Makefile and replace it with the kernel
    Makefile
  drm: apply psb-kernel-source package's build.patch
  drm: intel_ldvs.c: add missing arg to backlight_device_register()
    call
  emenlow: switch to psb
  drm: Fix psb ioctl assignment
  drm-psb: remove BKL remnants
  drm-psb: update spinlock initializers
  drm-psb: remove call to agp_flush_chipset
  drm-psb: remove includes of nonexistent i2c-id.h
  drm-psb: remove assigment to deprecated i2c_adapter.id
  drm-psb: use console_lock/unlock()
  drm-psb: add DRM_UNLOCKED flag
  drm-psb: mark unlocked ioctls
  drm-psb: initialize backlight type
  drm-psb: fix ioremap calls
  drm-psb: change udelay to mdelay in intel_wait_for_vblank()



^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 12/17][KERNEL] drm-psb: use console_lock/unlock()
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (10 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 11/17][KERNEL] drm-psb: remove assigment to deprecated i2c_adapter.id tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 13/17][KERNEL] drm-psb: add DRM_UNLOCKED flag tom.zanussi
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

The acquire/release_console_sem() functions were renamed to
console_lock/unlock(), so change the calls.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/psb_fb.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm-psb/psb_fb.c b/drivers/gpu/drm-psb/psb_fb.c
index 72d1d14..5b612b8 100644
--- a/drivers/gpu/drm-psb/psb_fb.c
+++ b/drivers/gpu/drm-psb/psb_fb.c
@@ -874,9 +874,9 @@ int psbfb_kms_off_ioctl(struct drm_device *dev, void *data,
 {
 	int ret;
 
-	acquire_console_sem();
+	console_lock();
 	ret = psbfb_kms_off(dev, 0);
-	release_console_sem();
+	console_unlock();
 
 	return ret;
 }
@@ -953,9 +953,9 @@ int psbfb_kms_on_ioctl(struct drm_device *dev, void *data,
 {
 	int ret;
 
-	acquire_console_sem();
+	console_lock();
 	ret = psbfb_kms_on(dev, 0);
-	release_console_sem();
+	console_unlock();
 #ifdef SII_1392_WA
 	if((SII_1392 != 1) || (drm_psb_no_fb==0))
 		drm_disable_unused_functions(dev);
@@ -967,16 +967,16 @@ int psbfb_kms_on_ioctl(struct drm_device *dev, void *data,
 
 void psbfb_suspend(struct drm_device *dev)
 {
-	acquire_console_sem();
+	console_lock();
 	psbfb_kms_off(dev, 1);
-	release_console_sem();
+	console_unlock();
 }
 
 void psbfb_resume(struct drm_device *dev)
 {
-	acquire_console_sem();
+	console_lock();
 	psbfb_kms_on(dev, 1);
-	release_console_sem();
+	console_unlock();
 #ifdef SII_1392_WA
 	if((SII_1392 != 1) || (drm_psb_no_fb==0))
 		drm_disable_unused_functions(dev);
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 13/17][KERNEL] drm-psb: add DRM_UNLOCKED flag
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (11 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 12/17][KERNEL] drm-psb: use console_lock/unlock() tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 14/17][KERNEL] drm-psb: mark unlocked ioctls tom.zanussi
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

Add DRM_UNLOCKED to allow us to call handlers that do their own
locking without the global lock.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/drmP.h    |    1 +
 drivers/gpu/drm-psb/drm_drv.c |   10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm-psb/drmP.h b/drivers/gpu/drm-psb/drmP.h
index 3cca5fe..9d5bb5c 100644
--- a/drivers/gpu/drm-psb/drmP.h
+++ b/drivers/gpu/drm-psb/drmP.h
@@ -309,6 +309,7 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
 #define DRM_AUTH        0x1
 #define DRM_MASTER      0x2
 #define DRM_ROOT_ONLY   0x4
+#define DRM_UNLOCKED    0x8
 
 struct drm_ioctl_desc {
 	unsigned int cmd;
diff --git a/drivers/gpu/drm-psb/drm_drv.c b/drivers/gpu/drm-psb/drm_drv.c
index 472859b..396dcda 100644
--- a/drivers/gpu/drm-psb/drm_drv.c
+++ b/drivers/gpu/drm-psb/drm_drv.c
@@ -663,9 +663,13 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 		   ((ioctl->flags & DRM_MASTER) && !file_priv->master)) {
 		retcode = -EACCES;
 	} else {
-		mutex_lock(&drm_global_mutex);
-		retcode = func(dev, kdata, file_priv);
-		mutex_unlock(&drm_global_mutex);
+		if (ioctl->flags & DRM_UNLOCKED)
+			retcode = func(dev, kdata, file_priv);
+		else {
+			mutex_lock(&drm_global_mutex);
+			retcode = func(dev, kdata, file_priv);
+			mutex_unlock(&drm_global_mutex);
+		}
 	}
 
 	if ((retcode == 0) && (cmd & IOC_OUT)) {
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 14/17][KERNEL] drm-psb: mark unlocked ioctls
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (12 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 13/17][KERNEL] drm-psb: add DRM_UNLOCKED flag tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 15/17][KERNEL] drm-psb: initialize backlight type tom.zanussi
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

Mark the ioctls that already do their own locking DRM_UNLOCKED.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/drm_drv.c |   24 ++++++++++++------------
 drivers/gpu/drm-psb/psb_drv.c |   10 +++++-----
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm-psb/drm_drv.c b/drivers/gpu/drm-psb/drm_drv.c
index 396dcda..30af3fa 100644
--- a/drivers/gpu/drm-psb/drm_drv.c
+++ b/drivers/gpu/drm-psb/drm_drv.c
@@ -117,18 +117,18 @@ static struct drm_ioctl_desc drm_ioctls[] = {
 	DRM_IOCTL_DEF(DRM_IOCTL_SG_FREE, drm_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 	DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank, 0),
 	DRM_IOCTL_DEF(DRM_IOCTL_UPDATE_DRAW, drm_update_drawable_info, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETOUTPUT, drm_mode_getoutput, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_SETCRTC, drm_mode_setcrtc, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_ADDFB, drm_mode_addfb, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_RMFB, drm_mode_rmfb, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETFB, drm_mode_getfb, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_ADDMODE, drm_mode_addmode_ioctl, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_RMMODE, drm_mode_rmmode_ioctl, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_ATTACHMODE, drm_mode_attachmode_ioctl, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_DETACHMODE, drm_mode_detachmode_ioctl, DRM_MASTER|DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPROPERTY, drm_mode_getproperty_ioctl, DRM_MASTER | DRM_ROOT_ONLY),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETOUTPUT, drm_mode_getoutput, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_SETCRTC, drm_mode_setcrtc, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_ADDFB, drm_mode_addfb, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_RMFB, drm_mode_rmfb, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETFB, drm_mode_getfb, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_ADDMODE, drm_mode_addmode_ioctl, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_RMMODE, drm_mode_rmmode_ioctl, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_ATTACHMODE, drm_mode_attachmode_ioctl, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_DETACHMODE, drm_mode_detachmode_ioctl, DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPROPERTY, drm_mode_getproperty_ioctl, DRM_MASTER | DRM_ROOT_ONLY|DRM_UNLOCKED),
 
 	DRM_IOCTL_DEF(DRM_IOCTL_MM_INIT, drm_mm_init_ioctl,
 		      DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
diff --git a/drivers/gpu/drm-psb/psb_drv.c b/drivers/gpu/drm-psb/psb_drv.c
index 471481e..3873c7e 100644
--- a/drivers/gpu/drm-psb/psb_drv.c
+++ b/drivers/gpu/drm-psb/psb_drv.c
@@ -100,15 +100,15 @@ static struct pci_device_id pciidlist[] = {
 #define DRM_PSB_KMS_ON_IOCTL	DRM_IO(DRM_PSB_KMS_ON)
 
 static struct drm_ioctl_desc psb_ioctls[] = {
-	DRM_IOCTL_DEF(DRM_PSB_CMDBUF_IOCTL, psb_cmdbuf_ioctl, DRM_AUTH),
+	DRM_IOCTL_DEF(DRM_PSB_CMDBUF_IOCTL, psb_cmdbuf_ioctl, DRM_AUTH|DRM_UNLOCKED),
 	DRM_IOCTL_DEF(DRM_PSB_XHW_INIT_IOCTL, psb_xhw_init_ioctl,
 		      DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_PSB_XHW_IOCTL, psb_xhw_ioctl, DRM_AUTH),
+	DRM_IOCTL_DEF(DRM_PSB_XHW_IOCTL, psb_xhw_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_UNLOCKED),
 	DRM_IOCTL_DEF(DRM_PSB_SCENE_UNREF_IOCTL, drm_psb_scene_unref_ioctl,
-		      DRM_AUTH),
+		      DRM_AUTH|DRM_UNLOCKED),
 	DRM_IOCTL_DEF(DRM_PSB_KMS_OFF_IOCTL, psbfb_kms_off_ioctl,
-		      DRM_ROOT_ONLY),
-	DRM_IOCTL_DEF(DRM_PSB_KMS_ON_IOCTL, psbfb_kms_on_ioctl, DRM_ROOT_ONLY),
+		      DRM_ROOT_ONLY|DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_PSB_KMS_ON_IOCTL, psbfb_kms_on_ioctl, DRM_ROOT_ONLY|DRM_UNLOCKED),
 	DRM_IOCTL_DEF(DRM_PSB_HW_INFO_IOCTL, psb_hw_info_ioctl, DRM_AUTH),
 };
 static int psb_max_ioctl = DRM_ARRAY_SIZE(psb_ioctls);
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 15/17][KERNEL] drm-psb: initialize backlight type
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (13 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 14/17][KERNEL] drm-psb: mark unlocked ioctls tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 16/17][KERNEL] drm-psb: fix ioremap calls tom.zanussi
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

If unset, props.type gets the value 0, which is no longer maps to a
valid type value, so initialize it explicitly.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/intel_lvds.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm-psb/intel_lvds.c b/drivers/gpu/drm-psb/intel_lvds.c
index a778436..9511c04 100644
--- a/drivers/gpu/drm-psb/intel_lvds.c
+++ b/drivers/gpu/drm-psb/intel_lvds.c
@@ -803,6 +803,7 @@ void intel_lvds_init(struct drm_device *dev)
 	if ((blc_type == BLC_I2C_TYPE) || (blc_type == BLC_PWM_TYPE)){	
 		struct backlight_properties props;
 		memset(&props, 0, sizeof(struct backlight_properties));
+		props.type = BACKLIGHT_RAW;
 		/* add /sys/class/backlight interface as standard */
 		psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops, &props);
 		if (psbbl_device){
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 16/17][KERNEL] drm-psb: fix ioremap calls
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (14 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 15/17][KERNEL] drm-psb: initialize backlight type tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-14  3:57 ` [PATCH 17/17][KERNEL] drm-psb: change udelay to mdelay in intel_wait_for_vblank() tom.zanussi
  2012-03-15 19:12 ` [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 Bruce Ashfield
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

Mapping the opregion non-cacheable fails, so use acpi_os_ioremap
instead.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/intel_lvds.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm-psb/intel_lvds.c b/drivers/gpu/drm-psb/intel_lvds.c
index 9511c04..218e895 100644
--- a/drivers/gpu/drm-psb/intel_lvds.c
+++ b/drivers/gpu/drm-psb/intel_lvds.c
@@ -36,6 +36,8 @@
 
 #include <acpi/acpi_drivers.h>
 
+#include <linux/acpi_io.h>
+
 int drm_intel_ignore_acpi = 0;
 MODULE_PARM_DESC(ignore_acpi, "Ignore ACPI");
 module_param_named(ignore_acpi, drm_intel_ignore_acpi, int, 0600);
@@ -673,7 +675,7 @@ void intel_lvds_init(struct drm_device *dev)
 		pci_read_config_dword(dev->pdev, 0xFC, &OpRegion_Phys);
 
 		//dev_OpRegion =  phys_to_virt(OpRegion_Phys);
-		dev_OpRegion = ioremap(OpRegion_Phys, OpRegion_Size);
+		dev_OpRegion = acpi_os_ioremap(OpRegion_Phys, OpRegion_Size);
 		dev_OpRegionSize = OpRegion_Size;
 
 		OpRegion = (OpRegionPtr) dev_OpRegion;
@@ -686,7 +688,7 @@ void intel_lvds_init(struct drm_device *dev)
 			dev_OpRegionSize = OpRegion_NewSize;
 			
 			iounmap(dev_OpRegion);
-			dev_OpRegion = ioremap(OpRegion_Phys, OpRegion_NewSize);
+			dev_OpRegion = acpi_os_ioremap(OpRegion_Phys, OpRegion_NewSize);
 		} else {
 			iounmap(dev_OpRegion);
 			dev_OpRegion = NULL;
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 17/17][KERNEL] drm-psb: change udelay to mdelay in intel_wait_for_vblank()
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (15 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 16/17][KERNEL] drm-psb: fix ioremap calls tom.zanussi
@ 2012-03-14  3:57 ` tom.zanussi
  2012-03-15 19:12 ` [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 Bruce Ashfield
  17 siblings, 0 replies; 19+ messages in thread
From: tom.zanussi @ 2012-03-14  3:57 UTC (permalink / raw)
  To: bruce.ashfield, yocto

From: Tom Zanussi <tom.zanussi@intel.com>

This fixes the compile error>

ERROR: "__bad_udelay" [drivers/gpu/drm-psb/psb.ko] undefined!

This is the same fix as in gma500:

  commit 243dd2809a5edd2e0e3e62781083aa44049af37d
  Author: Stephen Rothwell <sfr@canb.auug.org.au>
  Date:   Mon Jul 25 15:18:44 2011 +1000

    gma500: udelay(20000) it too long again

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 drivers/gpu/drm-psb/intel_display.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm-psb/intel_display.c b/drivers/gpu/drm-psb/intel_display.c
index f81cde3..d28051d 100644
--- a/drivers/gpu/drm-psb/intel_display.c
+++ b/drivers/gpu/drm-psb/intel_display.c
@@ -354,7 +354,7 @@ void
 intel_wait_for_vblank(struct drm_device *dev)
 {
 	/* Wait for 20ms, i.e. one cycle at 50hz. */
-	udelay(20000);
+	mdelay(20);
 }
 
 void
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2
  2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
                   ` (16 preceding siblings ...)
  2012-03-14  3:57 ` [PATCH 17/17][KERNEL] drm-psb: change udelay to mdelay in intel_wait_for_vblank() tom.zanussi
@ 2012-03-15 19:12 ` Bruce Ashfield
  17 siblings, 0 replies; 19+ messages in thread
From: Bruce Ashfield @ 2012-03-15 19:12 UTC (permalink / raw)
  To: tom.zanussi; +Cc: yocto

On 12-03-13 11:57 PM, tom.zanussi@intel.com wrote:
> From: Tom Zanussi<tom.zanussi@intel.com>
>
> Hi Bruce,
>
> Please pull this patchset into linux-yocto-3.2,
> standard/default/emenlow.

merged. I'm building this along with my other updates, will push
when they complete.

Bruce

>
> Thanks,
>
> Tom
>
> The following changes since commit 764090858adaa214395b3667fe1929892c2083f7:
>    Darren Hart (1):
>          pch_uart: Use existing default_baud in setup_console
>
> are available in the git repository at:
>
>    git://git.yoctoproject.org/linux-yocto-2.6.37-contrib.git tzanussi/standard/default/emenlow-3.2
>    http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-2.6.37-contrib/log/?h=tzanussi/standard/default/emenlow-3.2
>
> Tom Zanussi (17):
>    drm: add the base source of the Poulsbo (psb) 2D X11 driver
>    drm-psb: remove the package Makefile and replace it with the kernel
>      Makefile
>    drm: apply psb-kernel-source package's build.patch
>    drm: intel_ldvs.c: add missing arg to backlight_device_register()
>      call
>    emenlow: switch to psb
>    drm: Fix psb ioctl assignment
>    drm-psb: remove BKL remnants
>    drm-psb: update spinlock initializers
>    drm-psb: remove call to agp_flush_chipset
>    drm-psb: remove includes of nonexistent i2c-id.h
>    drm-psb: remove assigment to deprecated i2c_adapter.id
>    drm-psb: use console_lock/unlock()
>    drm-psb: add DRM_UNLOCKED flag
>    drm-psb: mark unlocked ioctls
>    drm-psb: initialize backlight type
>    drm-psb: fix ioremap calls
>    drm-psb: change udelay to mdelay in intel_wait_for_vblank()
>



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-03-15 19:12 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-14  3:57 [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 tom.zanussi
2012-03-14  3:57 ` [PATCH 01/17][KERNEL] drm: add the base source of the Poulsbo (psb) 2D X11 driver tom.zanussi
2012-03-14  3:57 ` [PATCH 02/17][KERNEL] drm-psb: remove the package Makefile and replace it with the kernel Makefile tom.zanussi
2012-03-14  3:57 ` [PATCH 03/17][KERNEL] drm: apply psb-kernel-source package's build.patch tom.zanussi
2012-03-14  3:57 ` [PATCH 04/17][KERNEL] drm: intel_ldvs.c: add missing arg to backlight_device_register() call tom.zanussi
2012-03-14  3:57 ` [PATCH 05/17][KERNEL] emenlow: switch to psb tom.zanussi
2012-03-14  3:57 ` [PATCH 06/17][KERNEL] drm: Fix psb ioctl assignment tom.zanussi
2012-03-14  3:57 ` [PATCH 07/17][KERNEL] drm-psb: remove BKL remnants tom.zanussi
2012-03-14  3:57 ` [PATCH 08/17][KERNEL] drm-psb: update spinlock initializers tom.zanussi
2012-03-14  3:57 ` [PATCH 09/17][KERNEL] drm-psb: remove call to agp_flush_chipset tom.zanussi
2012-03-14  3:57 ` [PATCH 10/17][KERNEL] drm-psb: remove includes of nonexistent i2c-id.h tom.zanussi
2012-03-14  3:57 ` [PATCH 11/17][KERNEL] drm-psb: remove assigment to deprecated i2c_adapter.id tom.zanussi
2012-03-14  3:57 ` [PATCH 12/17][KERNEL] drm-psb: use console_lock/unlock() tom.zanussi
2012-03-14  3:57 ` [PATCH 13/17][KERNEL] drm-psb: add DRM_UNLOCKED flag tom.zanussi
2012-03-14  3:57 ` [PATCH 14/17][KERNEL] drm-psb: mark unlocked ioctls tom.zanussi
2012-03-14  3:57 ` [PATCH 15/17][KERNEL] drm-psb: initialize backlight type tom.zanussi
2012-03-14  3:57 ` [PATCH 16/17][KERNEL] drm-psb: fix ioremap calls tom.zanussi
2012-03-14  3:57 ` [PATCH 17/17][KERNEL] drm-psb: change udelay to mdelay in intel_wait_for_vblank() tom.zanussi
2012-03-15 19:12 ` [PATCH 00/17][KERNEL] emenlow updates for linux-yocto 3.2 Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.