kernel.git
10 years agoRemove 'vram_base'
Thomas White [Sat, 22 Aug 2009 16:27:22 +0000 (17:27 +0100)]
Remove 'vram_base'

This isn't needed any more.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoRelease mapping resources when deleting a GEM object
Thomas White [Sat, 22 Aug 2009 16:26:32 +0000 (17:26 +0100)]
Release mapping resources when deleting a GEM object

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoZero VRAM before passing to userspace
Thomas White [Sat, 22 Aug 2009 16:25:31 +0000 (17:25 +0100)]
Zero VRAM before passing to userspace

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoInitial buffer wait/IRQ stuff
Thomas White [Thu, 20 Aug 2009 16:27:15 +0000 (17:27 +0100)]
Initial buffer wait/IRQ stuff

IRQ stuff brought across from earlier work by Andreas.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoMove glamo_ioctl_gem_wait_rendering() to glamo-cmdq.c
Thomas White [Wed, 19 Aug 2009 16:42:57 +0000 (17:42 +0100)]
Move glamo_ioctl_gem_wait_rendering() to glamo-cmdq.c

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFormatting fussiness
Thomas White [Wed, 19 Aug 2009 16:19:06 +0000 (17:19 +0100)]
Formatting fussiness

10 years agoRemove KMS function announcements
Thomas White [Tue, 18 Aug 2009 23:08:59 +0000 (00:08 +0100)]
Remove KMS function announcements

I'm happy with how this works, now.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoRemove CmdQ wrap-around printk
Thomas White [Tue, 18 Aug 2009 22:11:19 +0000 (23:11 +0100)]
Remove CmdQ wrap-around printk

This works - no need for the message any more.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoUnlock mutex on unsuccessful mmap
Thomas White [Sun, 16 Aug 2009 17:01:52 +0000 (18:01 +0100)]
Unlock mutex on unsuccessful mmap

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFormatting
Thomas White [Sun, 16 Aug 2009 17:00:14 +0000 (18:00 +0100)]
Formatting

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoRemove unused snippet
Thomas White [Sun, 16 Aug 2009 16:59:26 +0000 (17:59 +0100)]
Remove unused snippet

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoMerge branch 'drm-tracking' of git+ssh://git-weiss@git.bitwiz.org.uk/srv/git-public...
Thomas White [Tue, 11 Aug 2009 18:16:22 +0000 (19:16 +0100)]
Merge branch 'drm-tracking' of git+ssh://git-weiss@git.bitwiz.org.uk/srv/git-public/kernel into drm-tracking

10 years agoUpdate licence boilerplate
Thomas White [Thu, 30 Jul 2009 11:09:37 +0000 (12:09 +0100)]
Update licence boilerplate

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoTidy up, and remove debug
Thomas White [Thu, 6 Aug 2009 16:09:21 +0000 (17:09 +0100)]
Tidy up, and remove debug

Tidy up a few lines, and remove debug lines which would slow us down.
Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoPut the mutex functions the right way round
Thomas White [Wed, 5 Aug 2009 23:01:01 +0000 (00:01 +0100)]
Put the mutex functions the right way round

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoioremap() the framebuffer properly
Thomas White [Tue, 4 Aug 2009 21:24:49 +0000 (22:24 +0100)]
ioremap() the framebuffer properly

This fixes the glamo-kms-fb initialisation to ioremap() the proper address for the
framebuffer, rather than just assuming it's at the start of the VRAM.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoTidy up initialisation
Thomas White [Tue, 4 Aug 2009 20:48:16 +0000 (21:48 +0100)]
Tidy up initialisation

Fix label usage, making a compiler warning go away in the process.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoKeep glamo-kms-fb off the hardware registers
Thomas White [Tue, 4 Aug 2009 20:34:34 +0000 (21:34 +0100)]
Keep glamo-kms-fb off the hardware registers

This removes the last remaining instance of glamo-kms-fb touching Glamo's
registers directly.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoCopyright and debug
Thomas White [Tue, 4 Aug 2009 19:59:00 +0000 (20:59 +0100)]
Copyright and debug

Update the copyright notice to include proper BSD credit for the memory mapping
in glamo-buffer.c.

Also removes some superfluous debug messages.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoTake FB allocation back down to the minimum
Thomas White [Tue, 4 Aug 2009 19:42:22 +0000 (20:42 +0100)]
Take FB allocation back down to the minimum

This doesn't work with the current 'standard' DDX, so there's no point trying
to make it work.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoImplement glamo_ioctl_gem_mmap(), properly this time
Thomas White [Wed, 29 Jul 2009 23:42:42 +0000 (00:42 +0100)]
Implement glamo_ioctl_gem_mmap(), properly this time

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoImplement glamo_crtc_mode_set_base()
Thomas White [Tue, 28 Jul 2009 23:36:55 +0000 (00:36 +0100)]
Implement glamo_crtc_mode_set_base()

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoSet minimum and maximum dimensions in mode config
Thomas White [Tue, 28 Jul 2009 23:35:42 +0000 (00:35 +0100)]
Set minimum and maximum dimensions in mode config

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoTidy up
Thomas White [Wed, 15 Jul 2009 19:46:56 +0000 (20:46 +0100)]
Tidy up

This just alters some formatting and removes old code.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoBring gta02_drm_config up to date with gta02_packaging_defconfig
Thomas White [Wed, 15 Jul 2009 16:45:54 +0000 (17:45 +0100)]
Bring gta02_drm_config up to date with gta02_packaging_defconfig

Signedy-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoMerge branch 'drm-kms' into drm-tracking
Thomas White [Wed, 15 Jul 2009 11:02:49 +0000 (12:02 +0100)]
Merge branch 'drm-kms' into drm-tracking

Conflicts:
drivers/mfd/glamo/glamo-cmdq.c
drivers/mfd/glamo/glamo-cmdq.h
drivers/mfd/glamo/glamo-drm-drv.c
drivers/mfd/glamo/glamo-drm-private.h

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoDe-bodge pixel clocks
Thomas White [Sat, 11 Jul 2009 22:24:49 +0000 (23:24 +0100)]
De-bodge pixel clocks

.. or re-bodge them, depending on your perspective.  This makes mode->clock
contain a value in Hz, in line with the KMS convention.  This is at the expense
of more calculations when generating the mode from the mach_info and when
setting the mode.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoDebug
Thomas White [Thu, 9 Jul 2009 00:03:13 +0000 (01:03 +0100)]
Debug

Just a little bit more debug information

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoExpose more memory via glamo-kms-fb
Thomas White [Wed, 8 Jul 2009 23:59:54 +0000 (00:59 +0100)]
Expose more memory via glamo-kms-fb

This increases the amount of memory exposed via the framebuffer.
This should eventually allow an fbdev-based DDX or a KMS DDX to
run on the same kernel, albeit suboptimally.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFix resume, part 2
Thomas White [Wed, 8 Jul 2009 23:58:03 +0000 (00:58 +0100)]
Fix resume, part 2

This removes a bogus check of var->pixclock.  With KMS, this value
is not relevant.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoFix resume, part 1
Thomas White [Mon, 6 Jul 2009 18:06:22 +0000 (19:06 +0100)]
Fix resume, part 1

This seems to fix the kernel-level suspend/resume.  There remains a problem
which causes Xorg to crash on resume.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoInitial suspend/resume
Thomas White [Thu, 2 Jul 2009 22:44:07 +0000 (23:44 +0100)]
Initial suspend/resume

Doesn't work yet...

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoMore whitespace
Thomas White [Thu, 2 Jul 2009 21:12:01 +0000 (22:12 +0100)]
More whitespace

Fix a whitespace error introduced by the earlier debug stuff.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoUpdate gta02_drm_defconfig
Thomas White [Thu, 2 Jul 2009 21:10:40 +0000 (22:10 +0100)]
Update gta02_drm_defconfig

Alter the "DRM defconfig" to match the packaging config with minimal
tweaks for DRM.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoWhitespace
Thomas White [Thu, 2 Jul 2009 21:07:40 +0000 (22:07 +0100)]
Whitespace

Fix trailing whitespace

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoAlter jbt6k74 state on DPMS
Thomas White [Wed, 1 Jul 2009 23:33:04 +0000 (00:33 +0100)]
Alter jbt6k74 state on DPMS

This uses the "stopgap" method implemented earlier.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoDo not switch the screen off when changing mode
Thomas White [Wed, 1 Jul 2009 23:04:26 +0000 (00:04 +0100)]
Do not switch the screen off when changing mode

...because the clock(s) must be running while we talk to the chip.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoRemove debug watchpoints
Thomas White [Wed, 1 Jul 2009 22:11:52 +0000 (23:11 +0100)]
Remove debug watchpoints

Finished with these now.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoFix scanout timings
Thomas White [Wed, 1 Jul 2009 22:10:25 +0000 (23:10 +0100)]
Fix scanout timings

This fixes the scanout timing conversion so that it works.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoNasty jbt stuff
Thomas White [Wed, 1 Jul 2009 18:17:21 +0000 (19:17 +0100)]
Nasty jbt stuff

This adds a stopgap measure to permit manipulation of the LCD controller
chip in the absence of an fb notifier chain.  It also adds some messing
around with the DPMS stuff.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoDebug
Thomas White [Wed, 1 Jul 2009 18:16:01 +0000 (19:16 +0100)]
Debug

This adds some register debugging watchpoints

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoCompatibility glamo-drm <---> glamo-fb
Thomas White [Wed, 1 Jul 2009 18:08:22 +0000 (19:08 +0100)]
Compatibility glamo-drm <---> glamo-fb

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoEnable the LCD engine
Thomas White [Tue, 30 Jun 2009 17:49:39 +0000 (18:49 +0100)]
Enable the LCD engine

Well, duh.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoWhitespace and debugging
Thomas White [Tue, 30 Jun 2009 17:00:23 +0000 (18:00 +0100)]
Whitespace and debugging

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoSet gdrm->dev
Thomas White [Tue, 30 Jun 2009 16:59:52 +0000 (17:59 +0100)]
Set gdrm->dev

This was uninitialised before.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoProgram the LCD registers
Thomas White [Tue, 30 Jun 2009 09:15:49 +0000 (10:15 +0100)]
Program the LCD registers

This also alters some debug lines.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoKMS bits and pieces
Thomas White [Sun, 28 Jun 2009 21:14:17 +0000 (22:14 +0100)]
KMS bits and pieces

This adds some missing bits and pieces to make most of the KMS
initialisation flow work.`

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoCall the helper init function
Thomas White [Fri, 26 Jun 2009 23:27:20 +0000 (00:27 +0100)]
Call the helper init function

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoMuppetry and comments, and other small things
Thomas White [Wed, 24 Jun 2009 18:23:51 +0000 (19:23 +0100)]
Muppetry and comments, and other small things

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoThis is not a PCI device
Thomas White [Wed, 24 Jun 2009 18:23:07 +0000 (19:23 +0100)]
This is not a PCI device

pdev -> platform_dev

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoRevert "Front buffer kludge"
Thomas White [Thu, 18 Jun 2009 11:01:47 +0000 (12:01 +0100)]
Revert "Front buffer kludge"

That wasn't the right way to go about this.  And it didn't compile.

This reverts commit d8e4b9ff4dc8bf57e53fa174f977c8fb00ec4e90.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoMore KMS plumbing
Thomas White [Wed, 17 Jun 2009 23:00:30 +0000 (00:00 +0100)]
More KMS plumbing

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoJust backing up progress (again)
Thomas White [Mon, 15 Jun 2009 00:21:30 +0000 (01:21 +0100)]
Just backing up progress (again)

Nearly there...

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoPlatform device bits in drm_stub.c
Thomas White [Sat, 13 Jun 2009 16:56:03 +0000 (17:56 +0100)]
Platform device bits in drm_stub.c

This adds some bits which were missed out before, necessary to
(amongst other things) get the DRM driver's "load" callback to
get called.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoFront buffer kludge
Thomas White [Thu, 11 Jun 2009 15:28:49 +0000 (16:28 +0100)]
Front buffer kludge

This makes the GEM "info" ioctl produce an object handle which can be used to refer
to the front buffer (i.e. screen pixmap) in Xorg or otherwise.  This is unfortunately
necessary since this memory is allocated in the kernel by the framebuffer driver, and
is not available to DRM until we move to KMS.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoJust backing up progress
Thomas White [Mon, 8 Jun 2009 19:21:01 +0000 (20:21 +0100)]
Just backing up progress

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoMerge branch 'andy-tracking' into drm-tracking
Thomas White [Mon, 8 Jun 2009 13:44:14 +0000 (14:44 +0100)]
Merge branch 'andy-tracking' into drm-tracking

11 years agoMerge branch 'drm-tracking-cleanup' into drm-tracking
Thomas White [Mon, 8 Jun 2009 13:42:36 +0000 (14:42 +0100)]
Merge branch 'drm-tracking-cleanup' into drm-tracking

11 years agoGlamo: Bugfix for wraparound in queue
Andreas Pokorny [Mon, 8 Jun 2009 13:03:49 +0000 (15:03 +0200)]
Glamo: Bugfix for wraparound in queue

The rest_size was treated like the count of words instead of
bytes. This code also switches to memcpy_toio.

Signed-off-by: Andreas Pokorny <andreas.pokorny@gmail.com>
11 years agoGlamo:Removing IRQ Experiments
Andreas Pokorny [Mon, 8 Jun 2009 12:30:03 +0000 (14:30 +0200)]
Glamo:Removing IRQ Experiments

Removed the isr and everything interrupt related. IRQ is not
needed for basic operation on the glamo cmdq. This code directly
updates the write pointer of the queue without any waits.

Signed-off-by: Andreas Pokorny <andreas.pokorny@gmail.com>
11 years agomore trial and error
Andreas Pokorny [Fri, 5 Jun 2009 15:50:03 +0000 (17:50 +0200)]
more trial and error

11 years agoremoved setting the CMDQ IRQ in the clear register - indents cleaned up
Andreas Pokorny [Fri, 5 Jun 2009 12:37:55 +0000 (14:37 +0200)]
removed setting the CMDQ IRQ in the clear register - indents cleaned up

11 years agoAdding Glamo CMDQ IRQ
Andreas Pokorny [Fri, 5 Jun 2009 12:00:22 +0000 (14:00 +0200)]
Adding Glamo CMDQ IRQ

    The code is still not functional, only the first set of commands get
    executed.

Signed-off-by: Andreas Pokorny <andreas.pokorny@gmail.com>
11 years agoGTA01, GTA02: remove RTC_DEBUG from defconfigs
Paul Fertser [Thu, 4 Jun 2009 20:01:15 +0000 (00:01 +0400)]
GTA01, GTA02: remove RTC_DEBUG from defconfigs

This option is meant for debugging and is not any more of interest to
ordinary users.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
11 years agoGTA01: disable android wakelocks
Paul Fertser [Thu, 4 Jun 2009 20:10:08 +0000 (00:10 +0400)]
GTA01: disable android wakelocks

Enabling wakelocks leads to immediate suspend after resume. See
ce6840da7184043a09dd57d4c201a32ef7b6c083 for clarifications.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
11 years agoGTA02: bq27000 report current charge
Paul Fertser [Thu, 4 Jun 2009 19:40:52 +0000 (23:40 +0400)]
GTA02: bq27000 report current charge

Using HAL for E's battery gadget highlighted an oddity: the kernel exposed
last full charge property but didn't expose current charge property. This
resulted in the wrong computation of current battery capacity by E's gadget
(and probably other programs as well).

This patch exposes a corresponding bq27000 register to make E battery
gadget happy (it is still not showing correct values because of bugs in HAL
resulting in 3 batteries (apm emulation and usb supply being bogus here)
instead of one).

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
11 years agoAdding IRQ to DRM CMDQ - not working
Andreas Pokorny [Wed, 3 Jun 2009 21:43:40 +0000 (23:43 +0200)]
Adding IRQ to DRM CMDQ - not working

11 years agoGlamo DRM: Adding a Semaphore and Spinlock
Andreas Pokorny [Wed, 3 Jun 2009 19:04:47 +0000 (21:04 +0200)]
Glamo DRM: Adding a Semaphore and Spinlock

    This is the first step towards the irq based update of the write
    pointer. With this revision the previous wait, and direct update is
    deactivated.

Signed-off-by: Andreas Pokorny <andreas.pokorny@gmail.com>
11 years agoKMS Skeleton Bits
Thomas White [Tue, 2 Jun 2009 23:42:45 +0000 (00:42 +0100)]
KMS Skeleton Bits

This adds more of the bare bones for KMS, to be fleshed out later.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoTidy up Kconfig
Thomas White [Tue, 2 Jun 2009 23:40:16 +0000 (00:40 +0100)]
Tidy up Kconfig

This just tidies up the Glamo Kconfig file a bit.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoReorganise memory map (again)
Thomas White [Tue, 2 Jun 2009 21:06:50 +0000 (22:06 +0100)]
Reorganise memory map (again)

This reuinites the "framebuffer" and "work" VRAM areas.  With KMS, both roles will be done
by one pool of memory.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoImprove battery status notification
Michael Trimarchi [Sat, 23 May 2009 20:54:00 +0000 (17:54 -0300)]
Improve battery status notification

This patch adds a call to cancel_delayed_work before a call
to schedule_delayed_work.

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
Signed-off-by: Daniel Willmann <daniel@totalueberwachung.de>
11 years agoInitial KMS stuff
Thomas White [Wed, 27 May 2009 21:14:11 +0000 (22:14 +0100)]
Initial KMS stuff

11 years agogta01: fix jbt6k74 spi registration
Paul Fertser [Sun, 24 May 2009 11:19:58 +0000 (15:19 +0400)]
gta01: fix jbt6k74 spi registration

Without this jbt6k74 is not seen by the system and consequently
display doesn't work with Qi.

Rebasing to .28 introduced a regression (probably in
a6af63e826b79ae1ba2d8cbfa66805cc2dfe367c) resulting in jbt6k74 no longer
manageable by the kernel. This was unnoticed before because u-boot does its
own LCM initialization. With Qi it resulted in a white screen.

This patch is fixing it by making spi host bus number (unspecified,
defaults to 0) and spi device (jbt6k74) bus number match.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
11 years agoImplement glamo_ioctl_gem_mmap
Thomas White [Fri, 22 May 2009 09:32:08 +0000 (10:32 +0100)]
Implement glamo_ioctl_gem_mmap

This implements the ioctl used for mapping GEM objects into memory.
This needs a unit test in glamo-dri-tests, but for the time being appears to
make X.org less segfaulty.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years ago Add a vbus polling function for use by the udc driver.
Mike Westerhof [Thu, 14 May 2009 01:15:54 +0000 (20:15 -0500)]
Add a vbus polling function for use by the udc driver.

Signed-off-by: Mike Westerhof <mwester@dls.net>
11 years ago This patch adds the option to poll vbus status to the s3c24xx udc driver.
Mike Westerhof [Thu, 14 May 2009 01:11:06 +0000 (20:11 -0500)]
This patch adds the option to poll vbus status to the s3c24xx udc driver.

    Machines that do not route the USB vbus signal to a GPIO can use this
    mechanism as an alternate way for the udc driver to detect the usb
    connect/disconnect state, which is useful (for example) to enable the
    link up/down state to be determined for the g_ether gadget.

Signed-off-by: Mike Westerhof <mwester@dls.net>
11 years agousb gadget: fix ethernet link reports to ethtool
Jonathan McDowell [Thu, 26 Mar 2009 07:45:27 +0000 (00:45 -0700)]
usb gadget: fix ethernet link reports to ethtool

The g_ether USB gadget driver currently decides whether or not there's a
link to report back for eth_get_link based on if the USB link speed is
set. The USB gadget speed is however often set even before the device is
enumerated. It seems more sensible to only report a "link" if we're
actually connected to a host that wants to talk to us. The patch below
does this for me - tested with the PXA27x UDC driver.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
11 years agoAvoid null pointer access on early call to pcf50633_mbc_get_status
Nelson Castillo [Fri, 15 May 2009 04:46:41 +0000 (23:46 -0500)]
Avoid null pointer access on early call to pcf50633_mbc_get_status

Avoid a kernel panic during an early call
to the pcf50633_mbc_get_status function.

11 years agoGlamo MFD: MFD_GLAMO_SPI_GPIO requires SPI_BITBANG to build
Rask Ingemann Lambertsen [Wed, 6 May 2009 00:41:24 +0000 (02:41 +0200)]
Glamo MFD: MFD_GLAMO_SPI_GPIO requires SPI_BITBANG to build

   This patch fixes a linking failure in the Glamo GPIO SPI bitbang support.

Signed-off-by: Rask Ingemann Lambertsen <rask@sygehus.dk>
11 years agoGlamo MFD: Fix indentation of Kconfig, convert spaces to tabs
Rask Ingemann Lambertsen [Wed, 6 May 2009 00:36:00 +0000 (02:36 +0200)]
Glamo MFD: Fix indentation of Kconfig, convert spaces to tabs

   This patch fixes some indentation which was off by one and converts
spaces to tabs.

Signed-off-by: Rask Ingemann Lambertsen <rask@sygehus.dk>
11 years agoBuffer relocation stuff
Thomas White [Wed, 6 May 2009 00:21:31 +0000 (01:21 +0100)]
Buffer relocation stuff

This allows command sequences to make use of buffer objects by providing
their GEM handles.

It also reorganises the code a bit, and adds a lot of missing security stuff.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoPatch up the memory management
Thomas White [Mon, 4 May 2009 23:36:22 +0000 (00:36 +0100)]
Patch up the memory management

This fixes things which were broken after the previous commit.
VRAM allocation now appears to work.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoAdd (untested) memory management
Thomas White [Mon, 4 May 2009 11:47:05 +0000 (12:47 +0100)]
Add (untested) memory management

This implements the GEM 'create' ioctl.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoCreate glamo-buffer.c
Thomas White [Sun, 3 May 2009 16:57:42 +0000 (17:57 +0100)]
Create glamo-buffer.c

This just creates a new file for the memory management stuff.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoReset command queue on resume
Thomas White [Sun, 3 May 2009 16:10:01 +0000 (17:10 +0100)]
Reset command queue on resume

Reinitialise the command queue on resume, so the fun can continue...

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoFix and/or remove debug
Thomas White [Sat, 2 May 2009 19:20:15 +0000 (20:20 +0100)]
Fix and/or remove debug

This removes a lot of debugging.  We can't afford to splurge out a
page of printk()s on every command submission.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoEnable GEN51_EN_DIV_GCLK
Thomas White [Sat, 2 May 2009 18:11:19 +0000 (19:11 +0100)]
Enable GEN51_EN_DIV_GCLK

We must enable the clock divider for the 2D engine in order for
anything interesting to happen.  Well, duh.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoReorder startup of engines
Thomas White [Sat, 2 May 2009 18:10:40 +0000 (19:10 +0100)]
Reorder startup of engines

This just moves the engine enabling calls around a bit.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoDebugging stuff
Thomas White [Sat, 2 May 2009 18:10:01 +0000 (19:10 +0100)]
Debugging stuff

This adds [glamo-drm] before the debugging messages.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoCommand queue fixes
Thomas White [Wed, 29 Apr 2009 00:51:34 +0000 (01:51 +0100)]
Command queue fixes

This still doesn't quite work...

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoGTA01: Add "present" property to power_supply
Nelson Castillo [Tue, 28 Apr 2009 23:58:05 +0000 (18:58 -0500)]
GTA01: Add "present" property to power_supply

Small patch to add /sys/class/power_supply/battery/present.
You must not run a GTA01 without battery thus it is always 1.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
11 years agoCall unbind() hook of the usb gadget so that it can properly release its resources
Timo Juhani Lindfors [Tue, 28 Apr 2009 17:22:46 +0000 (12:22 -0500)]
Call unbind() hook of the usb gadget so that it can properly release its resources

Call unbind() hook of the gadget so that it can properly release its
resources. This fixes bug http://docs.openmoko.org/trac/ticket/2240
("removing/reloading g_ether not working"). All other instances of
usb_gadget_unregister_driver in Linux already call unbind() so it is
bit odd s3c2410_udc.c did not do so.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
11 years agoImplement command queue reset
Thomas White [Tue, 28 Apr 2009 00:36:28 +0000 (01:36 +0100)]
Implement command queue reset

This implements resetting of the command queue engine.
Hint: Do this before trying to read registers.. :)

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoEnable MCLK divider
Thomas White [Tue, 28 Apr 2009 00:35:34 +0000 (01:35 +0100)]
Enable MCLK divider

This is just brought across from xf86-video-glamo

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoAllow command queue timeout
Thomas White [Tue, 28 Apr 2009 00:34:13 +0000 (01:34 +0100)]
Allow command queue timeout

This allows glamo_cmdq_wait() to timeout.
We will probably need to substitute this for something better later on, but for the
time being I wanted to avoid a deadlock if the command queue never cleared.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoTidy up, fix silly mistake, and enable command queue
Thomas White [Tue, 28 Apr 2009 00:28:18 +0000 (01:28 +0100)]
Tidy up, fix silly mistake, and enable command queue

Tidy up the code in glamodrm_probe by doing glamodrm->gdrm
Pass 'gdrm' to glamo_cmdq_init, not glamo_core (d'oh!)
Enable the command queue engine at the start

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoCopyright notice
Thomas White [Tue, 28 Apr 2009 00:25:29 +0000 (01:25 +0100)]
Copyright notice

This fixes the licence text at the top of glamo-cmdq.c, noting that code from
Xorg has been incorporated.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoBuild fixes
Thomas White [Tue, 28 Apr 2009 00:24:38 +0000 (01:24 +0100)]
Build fixes

This fixes up the Makefile so that the build actually works.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
11 years agoKernel handling of command queue
Thomas White [Sun, 26 Apr 2009 23:03:39 +0000 (00:03 +0100)]
Kernel handling of command queue

This adds handling of Glamo's ring buffer at the kernel level, to be accessed
via ioctl DRM_GLAMO_CMDBUF.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>