The error path from gtt_alloc returns NULL not a ptr error. The underlying
fail is caused by a bug in the size calculation. With these two fixed it
passes kmstest, although it's not really doing anything useful yet.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Route everything via the proper DRM layer calls. This fixes the crash in
plymouth and is also necessary to begin supporting libkms.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is another small step towards getting Moorestown/Oaktrail support to
work but for Moorestown at least we still need to sort out GEM backed base
framebuffer, which means figuring out why GEM explodes early on at the
moment.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
For Moorestown at least we may not have stolen RAM with which to back the
initial framebuffer. Allow a GEM backing.
At this point we should have all the bits in place needed to make it work once
it has been debugged.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Do a first pass over the cursor code and rework it to use GEM objects for
the cursor buffer as we need.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There are two chunks of code we need to do this. The first one is the code
to insert and remove the pages from the GART, the second is the code to build
page table lists from the GEM object. Surprisingly this latter one doesn't seem
to have a nice GEM helper.
While we are at it we can begin dismantling the semi redundant struct pg,
and finish pruning out the old now unused gtt code as well as the last bits
of helper glue from the old driver base.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This puts in place the infrastructure for GEM allocators. Our implementation
is fairly simplistic at this point and we don't deal with things like
evicting objects from the GART to make space, nor compaction.
We extent our gtt_range struct to include a GEM object and that allows GEM
to do all the handle management and most of the memory mapping work for us.
This patch also doesn't load GEM pages into the GART so the GEM side isn't
very useful. Before we can do that a fair bit of work is needed reworking the
internal GTT code.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We will will need this for doing a GEM allocator. It should also avoid any
crashes with the current code if the stolen area is too small.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Now we can do allocations we need to shuffle the fb resource into the fb so
we can one day have multiple frame buffer objects.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
At the moment we don't do any page backing for the GTT so only the stolen
area pages will actually work. That is fine for our initial framebuffer and
a bit of testing but will need resolution (including alternate mmap methods
and the like for s/g areas) eventually.
Rather than use some of the overcomplex stuff in the DRM we use the existing
Linux resource allocators to hand out framebuffers and the like. This also has
the nice result that /proc/iomem shows the allocations.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The current bl code checks for backlight types and warns if they are not
properly set. Set ours to avoid the warning spew
(This one alone is probably 2.6.39 candidate)
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Go through the remaining ioctls and check they make sense
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This was done to handle a number of conflicts, the majority of which
were caused by the big "fix spelling issues" patch.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Well one of them anyway - not yet sure why the other fails
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2D accel still doesn't work but now it doesn't crash either
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Zap... bang
And take out a few more variables that are now dead
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The patch below removes an extra semi-colon from various parts
of the kernel. Please have a look when you have time, and let
me know if its legit or not.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We are not using TTM, we are not going to use TTM either
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We don't need the 3D validation stuff so it and all the related gunge can
depart. While we are at it prune some unused definitions.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The camera interface is also not covered (and we won't be using TTM anyway
even if it ever re-emerges) so it to can go
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
RAR registers are used on MID platforms for various protected video
playback activities using video playback engines we don't support.
So Rasputin can keep his Rars
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Grovel the firmware via the Moorestown interfaces and read the other bits
off the fuses.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
For Moorestown we want to use the mrst LVDS setup not the Poulsbo setup
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Build the new files now all the changes they need are present. They won't
yet be used but the plumbing is next step.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Moorestown needs somewhere to stash various pipe config registers and the
firmware and fuse configurations
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We have a set of firmware passed descriptors and things we need to grovel
through for video configuration. This differs from the setup for the PC
style Poulsbo hardware.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We need these as they are also used by the Moorestown LVDS display support.
Make the various needed symbols visible in the headers
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add the new files needed for the GMA500 driver to support Moorestown LVDS
displays. Don't wire them in yet.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The Moorestown systems have some graphics differences we care about and some
we don't need to.
To start with it has a single pipe and that pipe can be used for LVDS
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch will fix following compilation error:
drivers/staging/gma500/psb_drv.c:1635: error: unknown field ‘pci_driver’ specified in initializer
drivers/staging/gma500/psb_drv.c:1636: error: unknown field ‘name’ specified in initializer
drivers/staging/gma500/psb_drv.c:1636: warning: initialization from incompatible pointer type
drivers/staging/gma500/psb_drv.c:1637: error: unknown field ‘id_table’ specified in initializer
drivers/staging/gma500/psb_drv.c:1637: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1637: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c:1638: error: unknown field ‘resume’ specified in initializer
drivers/staging/gma500/psb_drv.c:1638: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1638: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c:1639: error: unknown field ‘suspend’ specified in initializer
drivers/staging/gma500/psb_drv.c:1639: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1639: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c:1640: error: unknown field ‘probe’ specified in initializer
drivers/staging/gma500/psb_drv.c:1640: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1640: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c:1641: error: unknown field ‘remove’ specified in initializer
drivers/staging/gma500/psb_drv.c:1641: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1641: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c:1643: error: unknown field ‘driver’ specified in initializer
drivers/staging/gma500/psb_drv.c:1643: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1643: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c: In function ‘psb_init’:
drivers/staging/gma500/psb_drv.c:1664: error: implicit declaration of function ‘drm_init’
drivers/staging/gma500/psb_drv.c: In function ‘psb_exit’:
drivers/staging/gma500/psb_drv.c:1669: error: implicit declaration of function ‘drm_exit’
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove all sorts of bits we can get rid of. We are now a very simple KMS
driver relying on the stolen memory for our framebuffer base (which is for
the moment hardcoded).
To support multiple frame buffers and some accel bits we will need some kind
of memory allocator, possibly a minimal use of GEM.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
These gotos were swapped. In the original code, the first would result
in a NULL dereference and the second would result in a memory leak.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>