GitHub/mt8127/android_kernel_alcatel_ttab.git
12 years agodrm/i810: cleanup reclaim_buffers
Daniel Vetter [Tue, 25 Oct 2011 21:51:24 +0000 (23:51 +0200)]
drm/i810: cleanup reclaim_buffers

My dear old i815 always hits the deadlocked on reclaim_buffers
warning. Switch over to the idlelock duct-tape on hope that
works better. I've fired up my i815 and now closing glxgears doesn't
take 5 seconds anymore. \o/

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm: kill drm_sman
Daniel Vetter [Tue, 25 Oct 2011 21:19:27 +0000 (23:19 +0200)]
drm: kill drm_sman

No longer used.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/sis: use drm_mm instead of drm_sman
Daniel Vetter [Wed, 26 Oct 2011 20:22:59 +0000 (22:22 +0200)]
drm/sis: use drm_mm instead of drm_sman

v2: Smash compile fix from Tormod Volden <debian.tormod@gmail.com> for
CONFIG_FB_SIS on top of this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/via: use drm_mm instead of drm_sman
Daniel Vetter [Wed, 26 Oct 2011 20:21:13 +0000 (22:21 +0200)]
drm/via: use drm_mm instead of drm_sman

To make the transition in a piece-wise and bisectable way possible,
I've hijacked the ->owner_list from drm_sman. While transitioning, the
list_add was done by the driver, while the list_del was still done by
the dying sman code.

Now that we are in full control of ->owner_list, do the list_del
ourselves.

v2: Better explain the list_del trickery as suggested by Chris Wilson.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/sman: kill user_hash_tab
Daniel Vetter [Tue, 25 Oct 2011 20:33:37 +0000 (22:33 +0200)]
drm/sman: kill user_hash_tab

No longer used.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/sis: track user->memblock mapping with idr
Daniel Vetter [Tue, 25 Oct 2011 16:00:41 +0000 (18:00 +0200)]
drm/sis: track user->memblock mapping with idr

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/via: track user->memblock mapping with idr
Daniel Vetter [Tue, 25 Oct 2011 15:55:31 +0000 (17:55 +0200)]
drm/via: track user->memblock mapping with idr

Massive indirection through a hashtable for a simple key->pointer
look-up actually just adds bloat.

v2: Drop the misleading comment noted by Chris Wilson.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/sman: rip out owner tracking
Daniel Vetter [Wed, 26 Oct 2011 20:28:07 +0000 (22:28 +0200)]
drm/sman: rip out owner tracking

In contrast to kms drivers, sis/via _always_ associated a buffer with
a drm fd. So by the time we reach lastclose, all open drm fds are gone
and with them their associated objects.

So when sis/via call drm_sman_cleanup in their lastclose funcs, that
will free 0 objects.

The owner tracking now serves no purpose at all, hence rip it ou. We
can't kill the corresponding fields in struct drm_memblock_item yet
because we hijack these in the new driver private owner tracking. But
now that drm_sman.c doesn't touch ->owner_list anymore, we need to
kill the list_move hack and properly add the item to the file_priv
list.

Also leave the list_del(&obj->owner_list) in drm_sman_free for the
moment, it will move to the drivers when sman disappears completely.

v2: Remove the redundant INIT_LIST_HEAD as noted by Chris Wilson

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/sman: kill owner tracking interface functions
Daniel Vetter [Tue, 25 Oct 2011 14:39:59 +0000 (16:39 +0200)]
drm/sman: kill owner tracking interface functions

These are now unused.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/via: track obj->drm_fd relations in the driver
Daniel Vetter [Tue, 25 Oct 2011 14:32:45 +0000 (16:32 +0200)]
drm/via: track obj->drm_fd relations in the driver

Exactly like the previous patch for sis.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/sis: track obj->drm_fd relations in the driver
Daniel Vetter [Tue, 25 Oct 2011 14:32:34 +0000 (16:32 +0200)]
drm/sis: track obj->drm_fd relations in the driver

By attach a driver private struct to each open drm fd.

Because we steal the owner_list from drm_sman until things settle,
use list_move instead of list_add.

This requires to export a drm_sman function temporarily before
drm_sman will die for real completely.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoMerge remote-tracking branch 'pfdo/drm-fixes' into drm-core-next
Dave Airlie [Wed, 21 Dec 2011 09:50:56 +0000 (09:50 +0000)]
Merge remote-tracking branch 'pfdo/drm-fixes' into drm-core-next

-next reported a messy merge, so I've merged my upstream pull into
my -next tree.

Conflicts:
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

12 years agoMerge branch 'exynos-drm-next' of git://git.infradead.org/users/kmpark/linux-samsung...
Dave Airlie [Wed, 21 Dec 2011 07:58:08 +0000 (07:58 +0000)]
Merge branch 'exynos-drm-next' of git://git.infradead.org/users/kmpark/linux-samsung into drm-core-next

* 'exynos-drm-next' of git://git.infradead.org/users/kmpark/linux-samsung:
  drm/exynos: Add plane support with fimd
  drm/exynos: add runtime pm feature for fimd
  drm/exynos: updated crtc and encoder dpms framework.
  drm/exynos: Use struct drm_mode_fb_cmd2
  drm/exynos: Fix compile errors

12 years agodrm/exynos: Add plane support with fimd
Joonyoung Shim [Thu, 8 Dec 2011 08:54:07 +0000 (17:54 +0900)]
drm/exynos: Add plane support with fimd

The exynos fimd supports 5 window overlays. Only one window overlay of
fimd is used by the crtc, so we need plane feature to use the rest
window overlays.

This creates one ioctl exynos specific - DRM_EXYNOS_PLANE_SET_ZPOS, it
is the ioctl to decide for user to assign which window overlay.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: add runtime pm feature for fimd
Joonyoung Shim [Fri, 9 Dec 2011 07:52:11 +0000 (16:52 +0900)]
drm/exynos: add runtime pm feature for fimd

This adds runtime PM feature for fimd. The runtime PM functions control
clocks for fimd and prevent to access the register of fimd for vblank
when clock is turned off by suspend of runtime PM.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: updated crtc and encoder dpms framework.
Inki Dae [Tue, 6 Dec 2011 02:06:54 +0000 (11:06 +0900)]
drm/exynos: updated crtc and encoder dpms framework.

With DPMS ON and OFF requests, crtc dpms would be in charge of
just only device power such as fimd or hdmi and encoder dpms
in charge of device setting(mode setting and register updating)
and also lcd panel and digital TV power.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Use struct drm_mode_fb_cmd2
Joonyoung Shim [Thu, 8 Dec 2011 06:05:19 +0000 (15:05 +0900)]
drm/exynos: Use struct drm_mode_fb_cmd2

The exynos drm also should use struct drm_mode_fb_cmd2 by changes of
308e5bcbdb10452e8aba31aa21432fb67ee46d72 commit(drm: add an fb creation
ioctl that takes a pixel format v5).

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Fix compile errors
Joonyoung Shim [Thu, 8 Dec 2011 06:00:20 +0000 (15:00 +0900)]
drm/exynos: Fix compile errors

This compile errors occur by changes of
e08e96de986ceb2c6b683df0bd0c4ddd4f91dcfd commit, so exynos drm should
apply this changes.

  CC      drivers/gpu/drm/exynos/exynos_drm_drv.o
drivers/gpu/drm/exynos/exynos_drm_drv.c:185: warning: braces around scalar initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:185: warning: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:186: error: field name not in record or union initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:186: error: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:186: warning: initialization from incompatible pointer type
drivers/gpu/drm/exynos/exynos_drm_drv.c:187: error: field name not in record or union initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:187: error: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:187: warning: excess elements in scalar initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:187: warning: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:188: error: field name not in record or union initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:188: error: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:188: warning: excess elements in scalar initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:188: warning: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:189: error: field name not in record or union initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:189: error: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:189: warning: excess elements in scalar initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:189: warning: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:190: error: field name not in record or union initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:190: error: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:190: warning: excess elements in scalar initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:190: warning: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:191: error: field name not in record or union initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:191: error: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:191: warning: excess elements in scalar initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:191: warning: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:192: error: field name not in record or union initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:192: error: (near initialization for 'exynos_drm_driver.fops')
drivers/gpu/drm/exynos/exynos_drm_drv.c:192: warning: excess elements in scalar initializer
drivers/gpu/drm/exynos/exynos_drm_drv.c:192: warning: (near initialization for 'exynos_drm_driver.fops')
make[4]: *** [drivers/gpu/drm/exynos/exynos_drm_drv.o] Error 1
make[3]: *** [drivers/gpu/drm/exynos] Error 2
make[2]: *** [drivers/gpu/drm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm: Add drm_format_num_planes() utility function
Ville Syrjälä [Mon, 19 Dec 2011 22:33:24 +0000 (00:33 +0200)]
drm: Add drm_format_num_planes() utility function

This function returns the number of planes used by a specific pixel
format.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rob Clark <rob.clark@linaro.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: call connector dpms fxn, when setting config
Rob Clark [Thu, 15 Dec 2011 20:53:24 +0000 (14:53 -0600)]
drm: call connector dpms fxn, when setting config

Call connector->funcs->dpms(DPMS_ON) rather than just setting
connector->dpms = DPMS_ON.  This ensures that if the connector
has something to do to enable the output (rather than just using
drm_helper_connector_dpms helper directly), that this happens
at bootup.  This solves an issue with connectors not getting
enabled from fbcon_init() when the driver is loaded.

Signed-off-by: Rob Clark <rob@ti.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: don't use 0 bpc for adjusting hdmi clock
Dave Airlie [Tue, 20 Dec 2011 11:44:30 +0000 (11:44 +0000)]
drm/radeon/kms: don't use 0 bpc for adjusting hdmi clock

If the bpc is set from the connector is 0, we then use it later to adjust
in a special case the HDMI pixel clock, however if the bpc is 0, we end up
passing a 0 pixel clock into the code.

I'm not sure if this is the correct answer or if we should avoid the HDMI
clock adjustment for 0 values.

This fixes a divide by 0 on my Llano system with a HDMI monitor and hdmi
audio enabled.

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoMerge branch 'drm-radeon-next' of ../drm-radeon-next into drm-core-next
Dave Airlie [Tue, 20 Dec 2011 19:53:44 +0000 (19:53 +0000)]
Merge branch 'drm-radeon-next' of ../drm-radeon-next into drm-core-next

* 'drm-radeon-next' of ../drm-radeon-next:
  drm/radeon: introduce a sub allocator and convert ib pool to it v4
  drm/radeon/kms: add support for per-ring fence interrupts
  drm/radeon/kms: add cayman specific fence_ring_emit
  drm/radeon/kms: add some new ring params to better handle other ring types
  drm/radeon: improve radeon_test_syncing function
  drm/radeon: precompute fence cpu/gpu addr once v3
  drm/radeon: move ring debugfs into radeon_ring.c
  drm/radeon: rename struct radeon_cp to radeon_ring
  drm/radeon: disable compute rings on cayman for now
  drm/radeon: add radeon_fence_count_emited function
  drm/radeon: make some asic pointers per ring
  drm/radeon: Add radeon_test_syncing function v2
  drm/radeon: make cp variable an array
  drm/radeon: make ring rptr and wptr register offsets variable
  drm/radeon: make all functions work with multiple rings.
  drm/radeon/kms: add support for semaphores v3
  drm/radeon/kms: add support for multiple fence queues v2
  drm/radeon: fix a spelling mistake
  drm/radeon: no need to check all relocs for duplicates
  drm/radeon: fix debugfs handling v3

12 years agodrm/radeon: introduce a sub allocator and convert ib pool to it v4
Jerome Glisse [Tue, 15 Nov 2011 16:48:34 +0000 (11:48 -0500)]
drm/radeon: introduce a sub allocator and convert ib pool to it v4

Somewhat specializaed sub-allocator designed to perform sub-allocation
for command buffer not only for current cs ioctl but for future command
submission ioctl as well. Patch also convert current ib pool to use
the sub allocator. Idea is that ib poll buffer can be share with other
command buffer submission not having 64K granularity.

v2 Harmonize pool handling and add suspend/resume callback to pin/unpin
sa bo (tested on rv280, rv370, r420, rv515, rv610, rv710, redwood, cayman,
rs480, rs690, rs880)
v3 Simplify allocator
v4 Fix radeon_ib_get error path to properly free fence

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: add support for per-ring fence interrupts
Alex Deucher [Fri, 18 Nov 2011 01:13:28 +0000 (20:13 -0500)]
drm/radeon/kms: add support for per-ring fence interrupts

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: add cayman specific fence_ring_emit
Alex Deucher [Thu, 17 Nov 2011 19:57:50 +0000 (14:57 -0500)]
drm/radeon/kms: add cayman specific fence_ring_emit

cayman is wb only and doesn't have a VC.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: add some new ring params to better handle other ring types
Alex Deucher [Thu, 17 Nov 2011 19:25:56 +0000 (14:25 -0500)]
drm/radeon/kms: add some new ring params to better handle other ring types

Some rptr/wptrs fields have different offsets and not all rings are pm4
so add a new nop field.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: improve radeon_test_syncing function
Christian König [Thu, 17 Nov 2011 14:22:44 +0000 (15:22 +0100)]
drm/radeon: improve radeon_test_syncing function

Also test multiple waits on the same semaphore.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: precompute fence cpu/gpu addr once v3
Jerome Glisse [Sun, 20 Nov 2011 20:45:34 +0000 (20:45 +0000)]
drm/radeon: precompute fence cpu/gpu addr once v3

Add a start fence driver helper function which will be call
once for each ring and will compute cpu/gpu addr for fence
depending on wether to use wb buffer or scratch reg.

This patch replace initialize fence driver separately which
was broken in regard of GPU lockup. The fence list for created,
emited, signaled must be initialize once and only from the
asic init callback not from the startup call back which is
call from the gpu reset.

v2: With this in place we no longer need to know the number of
    rings in fence_driver_init, also writing to the scratch reg
    before knowing its offset is a bad idea.

v3: rebase on top of change to previous patch in the serie

Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: move ring debugfs into radeon_ring.c
Christian König [Mon, 24 Oct 2011 15:08:44 +0000 (17:08 +0200)]
drm/radeon: move ring debugfs into radeon_ring.c

Those debugfs files aren't r600 specific, so they
shouldn't be in r600.c. Move them to radeon_ring.c
and also add functionality to dump CP1 & CP2 ring
informations.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: rename struct radeon_cp to radeon_ring
Christian König [Sun, 23 Oct 2011 10:56:27 +0000 (12:56 +0200)]
drm/radeon: rename struct radeon_cp to radeon_ring

That naming seems to make more sense, since we not
only want to run PM4 rings with it.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: disable compute rings on cayman for now
Christian König [Thu, 20 Oct 2011 10:47:13 +0000 (12:47 +0200)]
drm/radeon: disable compute rings on cayman for now

Disable the additional compute rings on cayman
until their setup is fully implemented.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: add radeon_fence_count_emited function
Christian König [Thu, 20 Oct 2011 10:38:09 +0000 (12:38 +0200)]
drm/radeon: add radeon_fence_count_emited function

Split counting of emited fences out of power
management into a seperate function.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: make some asic pointers per ring
Christian König [Wed, 19 Oct 2011 17:02:21 +0000 (19:02 +0200)]
drm/radeon: make some asic pointers per ring

Emitting fences, semaphores and ib works differently
on different ring, so its is easier to maintain
separate functions for each ring.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: Add radeon_test_syncing function v2
Christian König [Tue, 27 Sep 2011 10:31:00 +0000 (12:31 +0200)]
drm/radeon: Add radeon_test_syncing function v2

Tests syncing between all rings by using
semaphores and fences.

v2: use radeon_testing as a bit flag rather than on/off switch
    this allow to test for one thing at a time (bo_move or semaphore
    test). It kind of break the usage if user wheren't using 1
    for bo move test but as it's a test feature i believe it's ok.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: make cp variable an array
Christian König [Thu, 13 Oct 2011 11:19:22 +0000 (13:19 +0200)]
drm/radeon: make cp variable an array

Replace cp, cp1 and cp2 members with just an array
of radeon_cp structs.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: make ring rptr and wptr register offsets variable
Christian König [Thu, 13 Oct 2011 10:48:45 +0000 (12:48 +0200)]
drm/radeon: make ring rptr and wptr register offsets variable

Every ring seems to have the concept of read and
write pointers. Make the register offset variable
so we can use the functions for different types of rings.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: make all functions work with multiple rings.
Christian König [Fri, 23 Sep 2011 13:11:23 +0000 (15:11 +0200)]
drm/radeon: make all functions work with multiple rings.

Give all asic and radeon_ring_* functions a
radeon_cp parameter, so they know the ring to work with.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: add support for semaphores v3
Christian König [Thu, 15 Sep 2011 17:02:22 +0000 (19:02 +0200)]
drm/radeon/kms: add support for semaphores v3

They are used to sync between rings, while fences
sync between a ring and the cpu.

v2 Fix radeon_semaphore_driver_fini when no semaphore were
allocated.

v3 Initialize list early on to avoid issue in case or early
error

Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: add support for multiple fence queues v2
Alex Deucher [Thu, 25 Aug 2011 17:39:48 +0000 (13:39 -0400)]
drm/radeon/kms: add support for multiple fence queues v2

For supporting multiple CP ring buffers, async DMA
engines and UVD.  We still need a way to synchronize
between engines.

v2 initialize unused fence driver ring to avoid issue in
   suspend/unload

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: fix a spelling mistake
Christian König [Mon, 24 Oct 2011 13:05:29 +0000 (15:05 +0200)]
drm/radeon: fix a spelling mistake

Better fix it before this obvious typo spreads even more.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: no need to check all relocs for duplicates
Christian König [Mon, 24 Oct 2011 12:59:17 +0000 (14:59 +0200)]
drm/radeon: no need to check all relocs for duplicates

Only check the previously checked relocs for
duplicates. Also leaving the handle uninitialized
isn't such a good idea.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon: fix debugfs handling v3
Christian König [Mon, 24 Oct 2011 12:54:54 +0000 (14:54 +0200)]
drm/radeon: fix debugfs handling v3

Having registered debugfs files globally causes
the files to not show up on the second, third
etc.. card in the system.

v2: fix crash on module unloading
v3: fix space indentation

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500/oaktrail: panel display quality fix
Alan Cox [Tue, 20 Dec 2011 15:58:44 +0000 (15:58 +0000)]
gma500/oaktrail: panel display quality fix

The GCT setup was used on Moorestown. The Oaktrail version uses a normal PC
interface. That means we must also honour the dither info from the BIOS
data.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Oaktrail fixes
Alan Cox [Tue, 20 Dec 2011 15:58:29 +0000 (15:58 +0000)]
gma500: Oaktrail fixes

The move to connectors breaks Oaktrail again if we have memory poisoning
enabled. Fix this.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoMerge tag 'v3.2-rc6' of /home/airlied/devel/kernel/linux-2.6 into drm-core-next
Dave Airlie [Tue, 20 Dec 2011 14:43:53 +0000 (14:43 +0000)]
Merge tag 'v3.2-rc6' of /home/airlied/devel/kernel/linux-2.6 into drm-core-next

Merge in the upstream tree to bring in the mainline fixes.

Conflicts:
drivers/gpu/drm/exynos/exynos_drm_fbdev.c
drivers/gpu/drm/nouveau/nouveau_sgdma.c

12 years agogma500: Final enables for Oaktrail
Alan Cox [Mon, 19 Dec 2011 21:06:35 +0000 (21:06 +0000)]
gma500: Final enables for Oaktrail

This switches the ifdef to match the Kconfig so that Oaktrail probing occurs
and adds some additional minor bulletproofing.

Tested on a Fujtisu Stylistic Q550 internal display. HDMI might work but that
remains to be seen.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: SDVO DDC bus guessing isn't working so hardcode it instead
Patrik Jakobsson [Mon, 19 Dec 2011 21:41:45 +0000 (21:41 +0000)]
gma500: SDVO DDC bus guessing isn't working so hardcode it instead

We currently don't have support for parsing SDVO mappings from BIOS so we're
guessing the bus switch parameter. This isn't working so hardcode it to a
configuration known to work on most poulsbo hardware.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Convert Oaktrail to work with new output handling
Patrik Jakobsson [Mon, 19 Dec 2011 21:41:33 +0000 (21:41 +0000)]
gma500: Convert Oaktrail to work with new output handling

Replace psb_intel_output with psb_intel_encoder and psb_intel_connector

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
[Changed Moorestown reference to Oaktrail]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Convert Cedarview to work with new output handling
Patrik Jakobsson [Mon, 19 Dec 2011 21:41:22 +0000 (21:41 +0000)]
gma500: Convert Cedarview to work with new output handling

Replace psb_intel_output with psb_intel_encoder and psb_intel_connector.
Things will need to be cleaned up and tested so consider this an initial
patch for Cedarview.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Replace SDVO code with slightly modified version from i915
Patrik Jakobsson [Mon, 19 Dec 2011 21:41:10 +0000 (21:41 +0000)]
gma500: Replace SDVO code with slightly modified version from i915

Our current SDVO implementation is not working properly, so replace it with
a modified version of the i915. Further testing and debugging is needed to make
sure we can handle the different SDVO setups and wiring.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Add support for Intel GMBUS
Patrik Jakobsson [Mon, 19 Dec 2011 21:40:58 +0000 (21:40 +0000)]
gma500: Add support for Intel GMBUS

Before we integrate the new SDVO code we need GMBUS support

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Convert PSB LVDS to new output handling
Patrik Jakobsson [Mon, 19 Dec 2011 21:40:45 +0000 (21:40 +0000)]
gma500: Convert PSB LVDS to new output handling

LVDS for PSB now uses psb_intel_encoder and psb_intel_connectors instead of
psb_intel_output. i2c_bus and ddc_bus are moved to lvds_priv. There was also a
pointer to mode_dev (for no obvious reason) that we now get directly from
dev_priv.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Fix encoder type checking for connectors
Patrik Jakobsson [Mon, 19 Dec 2011 21:40:33 +0000 (21:40 +0000)]
gma500: Fix encoder type checking for connectors

Fix cases where we need to know what encoder type is behind a given connector.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Remove psb_intel_output from ddc_probe and ddc_get_modes
Patrik Jakobsson [Mon, 19 Dec 2011 21:40:05 +0000 (21:40 +0000)]
gma500: Remove psb_intel_output from ddc_probe and ddc_get_modes

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Initial support for our encoder and connector structs
Patrik Jakobsson [Mon, 19 Dec 2011 21:39:53 +0000 (21:39 +0000)]
gma500: Initial support for our encoder and connector structs

First step towards adding i915 alike encoder and connector abstractions. This
will make life easier when adding i915 output code into our driver. It also
removes the old psb_intel_output struct.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agostaging/gma500: fixup staging code to build following core changes.
Dave Airlie [Tue, 20 Dec 2011 10:22:18 +0000 (10:22 +0000)]
staging/gma500: fixup staging code to build following core changes.

This just fixes up the staging code to keep building.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Replace pitch with pitches[] in drm_framebuffer
Ville Syrjälä [Mon, 19 Dec 2011 22:06:49 +0000 (00:06 +0200)]
drm: Replace pitch with pitches[] in drm_framebuffer

Otherwise each driver would need to keep the information inside
their own framebuffer object structure. Also add offsets[]. BOs
on the other hand are driver specific, so those can be kept in
driver specific structures.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Check that the requested pixel format is valid
Ville Syrjälä [Mon, 19 Dec 2011 22:06:48 +0000 (00:06 +0200)]
drm: Check that the requested pixel format is valid

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: plane: Check that the fb pixel format is supported by the plane
Ville Syrjälä [Mon, 19 Dec 2011 22:06:47 +0000 (00:06 +0200)]
drm: plane: Check that the fb pixel format is supported by the plane

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: plane: Make 'formats' parameter to drm_plane_init() const
Ville Syrjälä [Mon, 19 Dec 2011 22:06:46 +0000 (00:06 +0200)]
drm: plane: Make 'formats' parameter to drm_plane_init() const

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: plane: Check crtc coordinates against integer overflows in setplane ioctl
Ville Syrjälä [Mon, 19 Dec 2011 22:06:45 +0000 (00:06 +0200)]
drm: plane: Check crtc coordinates against integer overflows in setplane ioctl

Help drivers a little by guaranteeing that crtc_x+crtc_w and
crtc_y+crtc_h don't overflow.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: plane: Check source coordinates
Ville Syrjälä [Mon, 19 Dec 2011 22:06:44 +0000 (00:06 +0200)]
drm: plane: Check source coordinates

Make sure the source coordinates stay within the buffer.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: plane: Clear plane.crtc and plane.fb after disable_plane()
Ville Syrjälä [Mon, 19 Dec 2011 22:06:43 +0000 (00:06 +0200)]
drm: plane: Clear plane.crtc and plane.fb after disable_plane()

These are the only indication to user space that the plane was disabled.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Fix __user sparse warnings
Ville Syrjälä [Mon, 19 Dec 2011 22:06:42 +0000 (00:06 +0200)]
drm: Fix __user sparse warnings

Several pointers and casts were missing __user annotations.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: plane: mutex_unlock() was missing
Ville Syrjälä [Mon, 19 Dec 2011 22:06:41 +0000 (00:06 +0200)]
drm: plane: mutex_unlock() was missing

Unlock the mode_config mutex if drm_plane_init() fails.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: fourcc: Use __u32 instead of u32
Ville Syrjälä [Mon, 19 Dec 2011 22:06:40 +0000 (00:06 +0200)]
drm: fourcc: Use __u32 instead of u32

drm_fourcc.h can be included from user space so use the appropriate types.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Install drm_fourcc.h
Ville Syrjälä [Mon, 19 Dec 2011 22:06:39 +0000 (00:06 +0200)]
drm: Install drm_fourcc.h

Userspace needs this header.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Add a missing ')'
Ville Syrjälä [Mon, 19 Dec 2011 22:06:38 +0000 (00:06 +0200)]
drm: Add a missing ')'

The code happened to compile because the flag wasn't actually used yet.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/intel: Fix initialization if startup happens in interlaced mode [v2]
Christian Schmidt [Mon, 19 Dec 2011 19:03:33 +0000 (20:03 +0100)]
drm/intel: Fix initialization if startup happens in interlaced mode [v2]

My EFI BIOS starts the graphics card up in my projector's preferred EDID
mode, 1080@60i. The Intel driver does not clear all the interlaced bits.

This patch introduces a new PIPECONF_INTERLACE_MASK define and uses it
to restore progressive mode.

Signed-of-by: Christian Schmidt <schmidt@digadd.de>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoFix wrong assumptions in cea_for_each_detailed_block v2
Christian Schmidt [Mon, 19 Dec 2011 19:03:43 +0000 (20:03 +0100)]
Fix wrong assumptions in cea_for_each_detailed_block v2

The current logic misunderstands the spec about CEA 18byte descriptors.
First, the spec doesn't state "detailed timing descriptors" but "18 byte
descriptors", so any data record could be stored, mixed timings and
other data, just as in the standard EDID.
Second, the lower four bit of byte 3 of the CEA record do not contain
the number of descriptors, but "the total number of DTDs defining native
formats in the whole EDID [...], starting with the first DTD in the DTD
list (which starts in the base EDID block)." A device can of course
support non-native formats.

As such the number can't be used to determine n, and the existing code
will filter non-timing 18byte descriptors anyway.

Signed-off-by: Christian Schmidt <schmidt@digadd.de>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm_edid_to_eld: check for CEA data blocks only from structure revision 3 on
Christian Schmidt [Mon, 19 Dec 2011 19:03:38 +0000 (20:03 +0100)]
drm_edid_to_eld: check for CEA data blocks only from structure revision 3 on

CEA datablocks are only defined from revision 3 onwards. Only check for
them if the revision says so.

Signed-of-by: Christian Schmidt <schmidt@digadd.de>
Tested-by: James Cloos <cloos@jhcloos.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/edid: support CEA video modes.
Christian Schmidt [Mon, 19 Dec 2011 14:53:16 +0000 (14:53 +0000)]
drm/edid: support CEA video modes.

TFT/plasma televisions and projectors have become commonplace, and so
has the use of PCs to drive them. Add the video modes specified by an
EDID's CEA extension to the mode database for a connector.

Before:
[    1.158869] [drm:drm_mode_debug_printmodeline], Modeline
19:"1920x1080i" 0 74250 1920 2448 2492 2640 1080 1084 1094 1125 0x40 0x15
[    1.158875] [drm:drm_mode_debug_printmodeline], Modeline
18:"1920x1080i" 0 74250 1920 2008 2052 2200 1080 1084 1094 1125 0x48 0x15
[    1.158882] [drm:drm_mode_debug_printmodeline], Modeline
20:"1920x1080" 24 74250 1920 2558 2602 2750 1080 1084 1089 1125 0x40 0x5

After:
[    1.144175] [drm:drm_mode_debug_printmodeline], Modeline
22:"1920x1080" 0 74250 1920 2448 2492 2640 1080 1084 1094 1125 0x40 0x15
[    1.144179] [drm:drm_mode_debug_printmodeline], Modeline
21:"1920x1080" 0 74250 1920 2008 2052 2200 1080 1084 1094 1125 0x48 0x15
[    1.144187] [drm:drm_mode_debug_printmodeline], Modeline
30:"1920x1080" 50 148500 1920 2448 2492 2640 1080 1084 1089 1125 0x40 0x5
[    1.144190] [drm:drm_mode_debug_printmodeline], Modeline
29:"1920x1080" 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0x5
[    1.144192] [drm:drm_mode_debug_printmodeline], Modeline
25:"1920x1080" 24 74250 1920 2558 2602 2750 1080 1084 1089 1125 0x40 0x5
[    1.144195] [drm:drm_mode_debug_printmodeline], Modeline
24:"1280x720" 50 74250 1280 1720 1760 1980 720 725 730 750 0x40 0x5
[    1.144198] [drm:drm_mode_debug_printmodeline], Modeline
23:"1280x720" 60 74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
[    1.144201] [drm:drm_mode_debug_printmodeline], Modeline 27:"720x576"
50 27000 720 732 796 864 576 581 586 625 0x40 0xa
[    1.144203] [drm:drm_mode_debug_printmodeline], Modeline 26:"720x480"
60 27000 720 736 798 858 480 489 495 525 0x40 0xa
[    1.144206] [drm:drm_mode_debug_printmodeline], Modeline 28:"640x480"
60 25175 640 656 752 800 480 490 492 525 0x40 0xa

Signed-off-by: Christian Schmidt <schmidt@digadd.de>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: Clip cliprects against screen boundaries in present and dirty
Jakob Bornecrantz [Mon, 28 Nov 2011 12:19:15 +0000 (13:19 +0100)]
vmwgfx: Clip cliprects against screen boundaries in present and dirty

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: Resend the cursor after legacy modeset
Jakob Bornecrantz [Mon, 28 Nov 2011 12:19:14 +0000 (13:19 +0100)]
vmwgfx: Resend the cursor after legacy modeset

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: Do better culling of presents
Jakob Bornecrantz [Mon, 28 Nov 2011 12:19:13 +0000 (13:19 +0100)]
vmwgfx: Do better culling of presents

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: Refactor kms code to use vmw_user_lookup_handle helper
Jakob Bornecrantz [Mon, 28 Nov 2011 12:19:12 +0000 (13:19 +0100)]
vmwgfx: Refactor kms code to use vmw_user_lookup_handle helper

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: Add helper function to get surface or dmabuf
Jakob Bornecrantz [Mon, 28 Nov 2011 12:19:11 +0000 (13:19 +0100)]
vmwgfx: Add helper function to get surface or dmabuf

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: Refactor cursor update
Jakob Bornecrantz [Mon, 28 Nov 2011 12:19:10 +0000 (13:19 +0100)]
vmwgfx: Refactor cursor update

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: Remove dmabuf check in present ioctl
Jakob Bornecrantz [Mon, 28 Nov 2011 12:19:09 +0000 (13:19 +0100)]
vmwgfx: Remove dmabuf check in present ioctl

Doesn't protect any error code and only gets in the way of debugging.

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: Use the revised fifo hw version register when present
Thomas Hellstrom [Mon, 28 Nov 2011 12:19:08 +0000 (13:19 +0100)]
vmwgfx: Use the revised fifo hw version register when present

The driver implements the needed resource management required
to use that register.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Sun, 18 Dec 2011 22:28:31 +0000 (14:28 -0800)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (22 commits)
  [SCSI] fcoe: fix fcoe in a DCB environment by adding DCB notifiers to set skb priority
  [SCSI] bnx2i: Fixed kernel panic caused by unprotected task->sc->request deref
  [SCSI] qla4xxx: check for failed conn setup
  [SCSI] qla4xxx: a small loop fix
  [SCSI] qla4xxx: fix flash/ddb support
  [SCSI] zfcp: return early from slave_destroy if slave_alloc returned early
  [SCSI] fcoe: Fix preempt count leak in fcoe_filter_frames()
  [SCSI] qla2xxx: Update version number to 8.03.07.12-k.
  [SCSI] qla2xxx: Submit all chained IOCBs for passthrough commands on request queue 0.
  [SCSI] qla2xxx: Correct fc_host port_state display.
  [SCSI] qla2xxx: Disable generating pause frames when firmware hang detected for ISP82xx.
  [SCSI] qla2xxx: Clear mailbox busy flag during premature mailbox completion for ISP82xx.
  [SCSI] qla2xxx: Encapsulate prematurely completing mailbox commands during ISP82xx firmware hang.
  [SCSI] qla2xxx: Display IPE error message for ISP82xx.
  [SCSI] qla2xxx: Return the correct value for a mailbox command if 82xx is in reset recovery.
  [SCSI] qla2xxx: Enable Minidump by default with default capture mask 0x1f.
  [SCSI] qla2xxx: Stop unconditional completion of mailbox commands issued in interrupt mode during firmware hang.
  [SCSI] qla2xxx: Revert back the request queue mapping to request queue 0.
  [SCSI] qla2xxx: Don't call alloc_fw_dump for ISP82XX.
  [SCSI] qla2xxx: Check for SCSI status on underruns.
  ...

12 years agoMerge branch 'for-linus/i2c-32-rc6' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Sun, 18 Dec 2011 22:14:46 +0000 (14:14 -0800)]
Merge branch 'for-linus/i2c-32-rc6' of git://git.fluff.org/bjdooks/linux

* 'for-linus/i2c-32-rc6' of git://git.fluff.org/bjdooks/linux:
  i2c-eg20t: correct the driver init order of pch_i2c_probe()
  I2C: OMAP: fix FIFO usage for OMAP4
  i2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio
  i2c: i2c-s3c2410: Add a cpu_relax() to busy wait for bus idle

12 years agopci: Fix hotplug of Express Module with pci bridges
Yinghai Lu [Sun, 18 Dec 2011 02:33:37 +0000 (18:33 -0800)]
pci: Fix hotplug of Express Module with pci bridges

I noticed that hotplug of one setup does not work with recent change in
pci tree.

After checking the bridge conf setup, I noticed that the bridges get
assigned but do not get enabled.

The reason is the following commit, while simply ignores bridge
resources when enabling a pci device:

| commit bbef98ab0f019f1b0c25c1acdf1683c68933d41b
| Author: Ram Pai <linuxram@us.ibm.com>
| Date:   Sun Nov 6 10:33:10 2011 +0800
|
|    PCI: defer enablement of SRIOV BARS
|...
|    NOTE: Note, there is subtle change in the pci_enable_device() API.  Any
|    driver that depends on SRIOV BARS to be enabled in pci_enable_device()
|    can fail.

Put back bridge resource and ROM resource checking to fix the problem.

That should fix regression like BIOS does not assign correct resource to
bridge.

Discussion can be found at:
http://www.spinics.net/lists/linux-pci/msg12874.html

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoi2c-eg20t: correct the driver init order of pch_i2c_probe()
Feng Tang [Tue, 29 Nov 2011 07:19:10 +0000 (15:19 +0800)]
i2c-eg20t: correct the driver init order of pch_i2c_probe()

Before registering an adapter to i2c subsystem, we need make sure
driver is ready for incoming i2c xfer, becasue the i2c_add_adapter()
may trigger a i2c device driver's proble function which may start
some real i2c xfer. I met this issue when integrating a TSC2007 i2c
touch screen device with the i2c-eg20t driver.

This patch will call request_irq() and hw init before calling
i2c_add_adapter().

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
12 years agoI2C: OMAP: fix FIFO usage for OMAP4
Shubhrajyoti D [Tue, 6 Dec 2011 18:25:58 +0000 (10:25 -0800)]
I2C: OMAP: fix FIFO usage for OMAP4

Currently the fifo depth is set to zero for OMAP4 which disables
the FIFO usage. This patch enables the FIFO usage for I2C transactions
on OMAP4 also.

Tested on omap4430 and 3430.

Tested-and-Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
12 years agoi2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio
Tushar Behera [Fri, 9 Dec 2011 10:03:55 +0000 (15:33 +0530)]
i2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio

s3c24xx_i2c_parse_dt_gpio is called when cfg_gpio is not defined
in the platform data of the i2c device. When DT is not enabled,
the above function always returns -EINVAL. Since there can be
some i2c devices which don't need to configure any gpio lines,
the probe of such devices would fail here. Changing the default
return value to success would fix this issue.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
12 years agoi2c: i2c-s3c2410: Add a cpu_relax() to busy wait for bus idle
Mark Brown [Fri, 9 Dec 2011 12:55:03 +0000 (20:55 +0800)]
i2c: i2c-s3c2410: Add a cpu_relax() to busy wait for bus idle

Be a bit more friendly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
12 years agoMerge branches 'perf-urgent-for-linus' and 'sched-urgent-for-linus' of git://git...
Linus Torvalds [Sat, 17 Dec 2011 22:03:50 +0000 (14:03 -0800)]
Merge branches 'perf-urgent-for-linus' and 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf events: Fix ring_buffer_wakeup() brown paperbag bug

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Fix select_idle_sibling() regression in selecting an idle SMT sibling
  MAINTAINERS: Update tip.git related git trees

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
Linus Torvalds [Sat, 17 Dec 2011 18:40:51 +0000 (10:40 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci:
  PCI: Set device power state to PCI_D0 for device without native PM support
  PCI hotplug: Always allow acpiphp to handle non-PCIe bridges
  PCI: fix ats compile failure
  PCI: defer enablement of SRIOV BARS

12 years agoLinux 3.2-rc6
Linus Torvalds [Sat, 17 Dec 2011 02:36:26 +0000 (18:36 -0800)]
Linux 3.2-rc6

12 years agoRevert "drm/i915: fix infinite recursion on unbind due to ilk vt-d w/a"
Linus Torvalds [Fri, 16 Dec 2011 20:58:39 +0000 (12:58 -0800)]
Revert "drm/i915: fix infinite recursion on unbind due to ilk vt-d w/a"

This reverts commit eb1711bb94991e93669c5a1b5f84f11be2d51ea1.

It blows up the i915 seqno tracking, resulting in the

BUG_ON(seqno == 0);

in i915_wait_request() triggering, which will cause lock-ups.

See for example
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/903010
  https://lkml.org/lkml/2011/12/14/395

Reported-requested-and-tested-by: Dirk Hohndel <dirk@hohndel.org>
Reported-by: Richard Eames <Richard.Eames@flinders.edu.au>
Reported-by: Rocko Requin <rockorequin@hotmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Keith Packard <keithp@keithp.com>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Fri, 16 Dec 2011 20:26:26 +0000 (12:26 -0800)]
Merge git://git./linux/kernel/git/davem/sparc

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc32: Be less strict in matching %lo part of relocation.
  sbus: convert drivers/sbus/char/* to use module_platform_driver()
  bbc_i2c: Remove unneeded err variable
  sparc: Use kmemdup rather than duplicating its implementation

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 16 Dec 2011 20:17:32 +0000 (12:17 -0800)]
Merge git://git./linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  ipv6: Check dest prefix length on original route not copied one in rt6_alloc_cow().
  sch_gred: should not use GFP_KERNEL while holding a spinlock
  ipip, sit: copy parms.name after register_netdevice
  ipv6: Fix for adding multicast route for loopback device automatically.
  ssb: fix init regression with SoCs
  rtl8192{ce,cu,de,se}: avoid problems because of possible ERFOFF -> ERFSLEEP transition
  mac80211: fix another race in aggregation start
  fsl_pq_mdio: Clean up tbi address configuration
  ppp: fix pptp double release_sock in pptp_bind()
  net/fec: fix the use of pdev->id
  ath9k: fix check for antenna diversity support
  batman-adv: delete global entry in case of roaming
  batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM
  Bluetooth: Correct version check in hci_setup
  btusb: fix a memory leak in btusb_send_frame()
  Bluetooth: bnep: Fix module reference
  Bluetooth: cmtp: Fix module reference
  Bluetooth: btmrvl: support Marvell Bluetooth device SD8797

12 years agoMerge branches 'for-linus' and 'for-linus-3.2' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Fri, 16 Dec 2011 20:15:50 +0000 (12:15 -0800)]
Merge branches 'for-linus' and 'for-linus-3.2' of git://git./linux/kernel/git/mason/linux-btrfs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: unplug every once and a while
  Btrfs: deal with NULL srv_rsv in the delalloc inode reservation code
  Btrfs: only set cache_generation if we setup the block group
  Btrfs: don't panic if orphan item already exists
  Btrfs: fix leaked space in truncate
  Btrfs: fix how we do delalloc reservations and how we free reservations on error
  Btrfs: deal with enospc from dirtying inodes properly
  Btrfs: fix num_workers_starting bug and other bugs in async thread
  BTRFS: Establish i_ops before calling d_instantiate
  Btrfs: add a cond_resched() into the worker loop
  Btrfs: fix ctime update of on-disk inode
  btrfs: keep orphans for subvolume deletion
  Btrfs: fix inaccurate available space on raid0 profile
  Btrfs: fix wrong disk space information of the files
  Btrfs: fix wrong i_size when truncating a file to a larger size
  Btrfs: fix btrfs_end_bio to deal with write errors to a single mirror

* 'for-linus-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  btrfs: lower the dirty balance poll interval

12 years agoMerge branch 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux
Linus Torvalds [Fri, 16 Dec 2011 19:27:56 +0000 (11:27 -0800)]
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux

* 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux:
  drm/i915/dp: Dither down to 6bpc if it makes the mode fit
  drm/i915: enable semaphores on per-device defaults
  drm/i915: don't set unpin_work if vblank_get fails
  drm/i915: By default, enable RC6 on IVB and SNB when reasonable
  iommu: Export intel_iommu_enabled to signal when iommu is in use
  drm/i915/sdvo: Include LVDS panels for the IS_DIGITAL check
  drm/i915: prevent division by zero when asking for chipset power
  drm/i915: add PCH info to i915_capabilities
  drm/i915: set the right SDVO transcoder for CPT
  drm/i915: no-lvds quirk for ASUS AT5NM10T-I
  drm/i915: Treat pre-gen4 backlight duty cycle value consistently
  drm/i915: Hook up Ivybridge eDP
  drm/i915: add multi-threaded forcewake support

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 16 Dec 2011 19:14:42 +0000 (11:14 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: HDA: Use LPIB Position fix for Intel SCH Poulsbo
  ALSA: hda: fix mute led polarity for HP laptops with buggy BIOS
  ALSA: HDA: Set position fix to LPIB for an Atom/Poulsbo based device
  ASoC: Fix hx4700 error handling to free gpios if snd_soc_register_card fails
  ASoC: WM8958: correctly show firmware magic on mismatch
  ASoC: mxs: Add appropriate MODULE_ALIAS()
  ASoC: mxs: Add missing MODULE_LICENSE("GPL")
  ASoC: Fix WM8996 24.576MHz clock operation
  ASoC: Include linux/module.h for smdk2443_wm9710
  ASoC: Fix a typo in jive_wm8750
  ASoC: Fix build dependency for SND_SOC_JZ4740_CODEC
  ASoC: Include linux/io.h for jz4740 codec

12 years agoMerge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Fri, 16 Dec 2011 19:13:49 +0000 (11:13 -0800)]
Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6

* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
  gpio: Fix DA9052 GPIO build errors.
  gpio: mpc8xxx: don't allow input-only pins to be output for MPC5121
  gpio-ml-ioh: Add the irq_disable/irq_enable hooks for ml-ioh irq chip
  gpio-ml-ioh: fix a bug in the interrupt handler
  gpio: pl061: drop extra check for NULL platform_data

12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Fri, 16 Dec 2011 18:07:50 +0000 (10:07 -0800)]
Merge branch 'fixes' of git://git./linux/kernel/git/arm/arm-soc

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: OMAP: rx51: fix USB
  ARM: OMAP: mcbsp: Fix possible memory corruption
  arm/imx: fix power button on imx51 babbage board
  ARM: imx: fix cpufreq build errors
  ARM: mx5: add __initconst for fec pdata
  MXC PWM: should active during DOZE/WAIT/DBG mode
  ARM: EXYNOS: Fix build error without CONFIG_LOCAL_TIMERS
  ARM: EXYNOS: Fix for stall in case of cpu hotplug or sleep
  ARM: S5PV210: Set 1000ns as PWM backlight period on SMDKV210
  ARM: SAMSUNG: remove duplicated header include

12 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 16 Dec 2011 18:05:14 +0000 (10:05 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: don't kick empty queue in blk_drain_queue()
  block/swim3: Locking fixes
  loop: Fix discard_alignment default setting
  cfq-iosched: fix cfq_cic_link() race confition
  cfq-iosched: free cic_index if blkio_alloc_blkg_stats fails
  cciss: fix flush cache transfer length
  cciss: Add IRQF_SHARED back in for the non-MSI(X) interrupt handler
  loop: fix loop block driver discard and encryption comment
  block: initialize request_queue's numa node during

12 years agobtrfs: lower the dirty balance poll interval
Wu Fengguang [Fri, 16 Dec 2011 17:32:57 +0000 (12:32 -0500)]
btrfs: lower the dirty balance poll interval

Tests show that the original large intervals can easily make the dirty
limit exceeded on 100 concurrent dd's. So adapt to as large as the
next check point selected by the dirty throttling algorithm.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>