Commit graph

162 commits

Author SHA1 Message Date
Alan Cox
cf9f115559 gma500: Fix up suspend/resume
This isn't ideal as we could do with deferring the power on a lot more on
Oaktrail and Medfield. We can't however do that without fixing other things
first.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-26 10:46:44 -07:00
Alan Cox
2a30cda7af gma500: Fix backlight crash
Initial changes to get backlight behaviour we want and to fix backlight crashes
on suspend/resume paths.

[Note: on some boxes this will now produce a warning about the backlight, this
 isn't a regression it's an unfixed but non harmful case I still need to nail]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-26 10:46:44 -07:00
Alan Cox
d921b0b765 gma500: kill bogus code
During the power split ups and work a chunk of code escaped into the
Poulsbo code path which it isn't for. On some devices such as the Dell
mini-10 this causes problems.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-26 10:46:43 -07:00
Akshay Joshi
6cee1f8344 gma500: Convert spaces to tabs in accel_2d.c.
Convert the spaces within the accel_2d.c file to tabs in order to comply
with the coding style of the kernel.

Signed-off-by: Akshay Joshi <me@akshayjoshi.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-26 10:46:43 -07:00
Alan Cox
6b8402b5fe gma500: do a pass over the FIXME tags
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-26 10:46:43 -07:00
Patrik Jakobsson
0a0691a20d gma500: Add VBLANK support for Poulsbo hardware
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-26 10:46:42 -07:00
Patrik Jakobsson
24dd55b4ee gma500: Don't enable MSI on Poulsbo
Chipset reports MSI capabilities for Poulsbo even though it isn't really there.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-26 10:46:42 -07:00
Patrik Jakobsson
ee8cc854e6 gma500: Only register interrupt handler for poulsbo hardware
First step in adding proper irq handling. We'll start with poulsbo support so
make sure other chips don't touch drm_irq_install().

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-26 10:46:42 -07:00
Alan Cox
c3585aa91a gma500: kill MIPI interface types
Kirill Shutemov found problems with the non-upstream IMG driver where the
use of extra DRM encoder/connector types caused random crashes when the DRM
layer tried to display their matching name. This removes the MIPI types
matching the changes Pauli Nieminen made to the non upstream driver set.

As Pauli points out:
" MIPI (or DSI) is protocol specification on top of LVDS serial bus. That
 makes it resonable to call MIPI connectors and encoders LVDS."

(and indeed they may also be HDMI convertors or similar when we want to
 report a more useful to end user result)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-16 07:22:16 -07:00
Alan Cox
ab04fc5890 gma500: Fix clashes with DRM updates
The private object support has migrated from gma500 into the DRM core,
remove our now clashing copy.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-09 08:34:50 -07:00
Stephen Rothwell
243dd2809a gma500: udelay(20000) it too long again
so replace it with mdelay(20).

Fixes build error:

  ERROR: "__bad_udelay" [drivers/staging/gma500/psb_gfx.ko] undefined!

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-26 11:55:14 -07:00
Linus Torvalds
1380516599 Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (741 commits)
  staging:iio:meter:ade7753 should be 16 bit read not 8 bit for mode register.
  staging:iio:kfifo_buf fix double initialization of the ring device structure.
  staging:iio:accel:lis3l02dq: fix incorrect pointer passed to spi_set_drvdata.
  staging:iio:imu fix missing register table index for some channels
  spectra: enable device before poking it
  staging: rts_pstor: Fix a miswriting
  staging/lirc_bt829: Return -ENODEV when no hardware is found.
  staging/lirc_parallel: remove pointless prototypes.
  staging/lirc_parallel: fix panic on rmmod
  staging:iio:adc:ad7476: Incorrect pointer into spi_set_drvdata.
  Staging: zram: Fix kunmapping order
  Revert "gma500: Fix dependencies"
  gma500: Add medfield header
  gma500: wire up the mrst i2c bus from chip_info
  gma500: Fix DPU build
  gma500: Clean up the DPU config and make it runtime
  gma500: resync with Medfield progress
  gma500: Use the mrst helpers and power control for mode commit
  gma500@ Fix backlight range error
  gma500: More Moorestown muddle meddling means MM maybe might modeset
  ...

Fix up fairly trivial conflicts all over, mostly due to header file
cleanup conflicts, but some deleted files and some just context changes:
 - Documentation/feature-removal-schedule.txt
 - drivers/staging/bcm/headers.h
 - drivers/staging/brcm80211/brcmfmac/dhd_linux.c
 - drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
 - drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
 - drivers/staging/brcm80211/brcmfmac/wl_iw.c
 - drivers/staging/et131x/et131x_netdev.c
 - drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
 - drivers/staging/rtl8192e/r8192E.h
 - drivers/staging/usbip/userspace/src/utils.h
2011-07-25 23:26:34 -07:00
Stephen Rothwell
933b44732c gma500: udlay(20000) is too large
So use mdelay(20) instead.  Fixes this build error:

  ERROR: "__bad_udelay" [drivers/staging/gma500/psb_gfx.ko] undefined!

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-24 20:42:47 -07:00
Greg Kroah-Hartman
7453ea886e Revert "gma500: Fix dependencies"
This reverts commit 66dca5178c.  It caused
build errors on some platforms:

drivers/video/Kconfig:36:error: recursive dependency detected!
drivers/video/Kconfig:36:       symbol FB is selected by DRM_KMS_HELPER
drivers/gpu/drm/Kconfig:22:     symbol DRM_KMS_HELPER is selected by DRM_PSB
drivers/staging/gma500/Kconfig:1:       symbol DRM_PSB depends on ACPI_VIDEO

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-17 11:13:39 +02:00
Alan Cox
c06d495892 gma500: Add medfield header
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-16 09:05:38 +02:00
Alan Cox
1e18d178ac gma500: wire up the mrst i2c bus from chip_info
We did the groundwork earlier now we can use it

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:12:15 +02:00
Alan Cox
c603685443 gma500: Fix DPU build
Fix up the merge build

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:12:15 +02:00
Alan Cox
3a970ac1b1 gma500: Clean up the DPU config and make it runtime
We really don't want this all done by ifdeffery - and this isn't any need
as it's fairly easy to sort out.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:08 +02:00
Alan Cox
3caa89e933 gma500: resync with Medfield progress
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:08 +02:00
Alan Cox
f75c7538c5 gma500: Use the mrst helpers and power control for mode commit
We want to hit the MM panel backlight when appropriate

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:08 +02:00
Alan Cox
83c871ee2b gma500@ Fix backlight range error
If we go out of range we break the pm counts on the error path

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:08 +02:00
Alan Cox
f642062fc7 gma500: More Moorestown muddle meddling means MM maybe might modeset
There are a least three different species we need to deal with and right
now it seems the only way to sort them out is via DMI. Encapsulate the
entire pile somewhere private and out of the way.

Hopefully a saner method will emerge later.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:08 +02:00
Alan Cox
1e585b52fd gma500: Add the Oaktrail HDMI support
This differs enough from the Cedarview HDMI sufficiently to want to keep
them separated.

We need to sort out the power management for Oaktrail/Moorestown in order
to plumb this lot into the register handling logic.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:08 +02:00
Alan Cox
80e2f055e0 gma500: Fix cdv warning on unused variable
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:07 +02:00
Octavian Purdila
6e4b308a28 gma500: skip getting modes via DDC on Moorestown
Moorestown does not have a DDC bus, skip getting modes via DDC. This
fixes the following bug:

BUG: unable to handle kernel NULL pointer dereference at 00000010
IP: [<c1172ff7>] i2c_transfer+0x17/0xb0
*pde = 00000000
Oops: 0000 [#1]

Call Trace:
 [<c1153ae9>] drm_do_probe_ddc_edid+0x59/0x90
 [<c1153cb4>] drm_get_edid+0x24/0x250
 [<c11805d2>] psb_intel_ddc_get_modes+0x22/0x60
 [<c117fe11>] psb_intel_lvds_get_modes+0x21/0x80

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:07 +02:00
Octavian Purdila
173b3de9a5 gma500: fix compile warnings when CONFIG_BACKLIGHT_CLASS_DEVICE is not defined
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
[Fixed up for other changes, and tidied some existing variable names]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:07 +02:00
Alan Cox
3de78a9dbf gma500: Make crtc count a property of the device
Octavian Purdila posted a patch that sets num_crtc to 1 for Moorestown, but
Oaktrail has 2 so we need to split Oaktrail/Moorestown more sensibly, and
also cope with some other differences later on.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:07 +02:00
Octavian Purdila
a458ca1edc gma500: remove the legacy PM method
PCI core only prefer one of legacy PM and new PM. And since runtime pm
is implemented, which requires the new PM method, we should remove the
legacy PM method.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:07 +02:00
Alan Cox
7d7b7adf6b gma500: allow the creation of 'stolen' memory objects
For things like cursors and many kinds of framebuffer set up we are actually
best using the stolen memory when possible.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:06 +02:00
Alan Cox
7dfe43c52d gma500: add an mmap ioctl
This does the same as the dumb mmap but we want them separated in the ABI
in case a future extension to the dumb interface means we can't treat them
the same way.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:06 +02:00
Alan Cox
bd7b9f91dd gma500: Move the 2D operations into DRM
We currently have a test hack framebuffer mode ioctl, turn that into a DRM
interface.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:06 +02:00
Alan Cox
c5c44531ad gma500: Cursor interface
We need to provide an interface to create additional buffers for the cursor

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:06 +02:00
Alan Cox
66dca5178c gma500: Fix dependencies
ACPI Video is used by GMA500 so we need to depend upon it

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:01 +02:00
Alan Cox
78010c75d2 gma500: Sort out dither
Ubuntu users reported that dithering was not being set on Poulsbo, and they
have a point as we set one variable and check another which is never set.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Tested-by: Luca Forina <luca.forina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:00 +02:00
Alan Cox
f00dfacb51 gma500: don't dynamically allocate the psb_gtt struct
It's part of the psb_device so just make it part of the struct not a
pointer. This does cause a bit of noise shuffling indirections.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:00 +02:00
Alan Cox
18a4ca2a11 gma500: Final polish
This completes the clean up all the non Medfield C files to the point where
checkpatch approves of them barring some silly 80 column whining.

The Medfield stuff is still in a lot of flux but the rest is now ready for
general tidy and review.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-15 19:05:00 +02:00
Dan Carpenter
c3314080fe gma500: remove unneeded check in mdfld_crtc_mode_set()
The list cursor is never NULL in a list_for_each_entry() loop.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:45:00 -07:00
Dan Carpenter
d75758b3d1 gma500: reversed test in mdfld_dbi_dsr_exit()
We should only cleanup "dsr_info" if it's non-NULL obviously and not
the other way around.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:59 -07:00
Dan Carpenter
fc5ace7ed2 Staging: gma500: typo in array initialization
There is a comma missing here between the strings so they were
concatenated by mistake.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:59 -07:00
Alan Cox
983e4d3432 gma500: Fix unused variable in cdv support
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:58 -07:00
Alan Cox
9fce362385 gma500; clean mid files
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:58 -07:00
Alan Cox
e913972423 gma500: tidy the mrst files
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:57 -07:00
Alan Cox
0cf0db5e3d gma500: tidy up the CDV files
We are close to having PSB and CDV ready for moving from staging so it's
time to get the polish out.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:57 -07:00
Patrik Jakobsson
2b9428e203 gma500: Mask out bits not part of the page table base address
Otherwise we can't ioremap the gtt and the screen gets garbled.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:57 -07:00
Alan Cox
5ed836acd2 gma500: Fix symbol clash with i915
Randy Dunlap reports:
| when both CONFIG_DRM_I915=y and CONFIG_DRM_PSB=y:
| drivers/staging/built-in.o: In function `intel_opregion_init':
| (.text+0x47943): multiple definition of `intel_opregion_init'
| drivers/gpu/built-in.o:(.text+0x17277a): first defined here

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:57 -07:00
Alan Cox
75ec9bb006 gma500: psb_intel_lvds style
Fixed some stylistic uglies noticed while fixing the previous bug

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:56 -07:00
Alan Cox
d3cf695c58 gma500: Re-order checks and dereferences in psb_intel_lvds
Dan Carpenter reports:

Smatch complains about 6a7afe3acc "gma500: continue abstracting
platform specific code"

drivers/staging/gma500/psb_intel_lvds.c +579 psb_intel_lvds_set_property(7)
	warn: variable dereferenced before check 'encoder'

	--- a/drivers/staging/gma500/psb_intel_lvds.c
	+++ b/drivers/staging/gma500/psb_intel_lvds.c
	@@ -575,11 +575,12 @@ int psb_intel_lvds_set_property(struct drm_connector *connector,
					       struct drm_property *property,
					       uint64_t value)
	 {
	-       struct drm_encoder *pEncoder = connector->encoder;
	+       struct drm_encoder *encoder = connector->encoder;
	+       struct drm_psb_private *dev_priv = encoder->dev->dev_private;
						   ^^^^^^^^^^^^
dereference encoder here.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:56 -07:00
Jesper Juhl
fa3b1c8812 gma500: strip unneeded version headers
Remove unneeded version.h includes from drivers/staging/gma500/

It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/staging/gma500/.
This patch removes them.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
[updated for all th file cleanup and movement]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08 13:44:55 -07:00
Alan Cox
11aba30403 gma500: oops.. thou shalt stg add...
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 19:51:50 -07:00
Alan Cox
0ad91794cc gma500: Update the TODO list
This is now horribly out of date

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 19:51:49 -07:00