Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211370
b: refs/heads/master
c: c8d86d8
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Oct 7, 2010
1 parent 7951e8b commit a1142c6
Show file tree
Hide file tree
Showing 62 changed files with 460 additions and 234 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 430c62fb2948d964cf8dc7f3e2f69623c04ef62f
refs/heads/master: c8d86d8ac439ef6c9364bf0ba3a05a3f9a8e0dea
12 changes: 11 additions & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,16 @@ L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
S: Maintained
F: arch/arm/mach-s5p*/

ARM/SAMSUNG S5P SERIES FIMC SUPPORT
M: Kyungmin Park <kyungmin.park@samsung.com>
M: Sylwester Nawrocki <s.nawrocki@samsung.com>
L: linux-arm-kernel@lists.infradead.org
L: linux-media@vger.kernel.org
S: Maintained
F: arch/arm/plat-s5p/dev-fimc*
F: arch/arm/plat-samsung/include/plat/*fimc*
F: drivers/media/video/s5p-fimc/

ARM/SHMOBILE ARM ARCHITECTURE
M: Paul Mundt <lethal@linux-sh.org>
M: Magnus Damm <magnus.damm@gmail.com>
Expand Down Expand Up @@ -2535,7 +2545,7 @@ S: Supported
F: drivers/scsi/gdt*

GENERIC GPIO I2C DRIVER
M: Haavard Skinnemoen <hskinnemoen@atmel.com>
M: Haavard Skinnemoen <hskinnemoen@gmail.com>
S: Supported
F: drivers/i2c/busses/i2c-gpio.c
F: include/linux/i2c-gpio.h
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/i915/intel_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ int intel_fbdev_destroy(struct drm_device *dev,

drm_framebuffer_cleanup(&ifb->base);
if (ifb->obj) {
drm_gem_object_handle_unreference(ifb->obj);
drm_gem_object_unreference(ifb->obj);
ifb->obj = NULL;
}

return 0;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *nfbdev)

if (nouveau_fb->nvbo) {
nouveau_bo_unmap(nouveau_fb->nvbo);
drm_gem_object_handle_unreference_unlocked(nouveau_fb->nvbo->gem);
drm_gem_object_unreference_unlocked(nouveau_fb->nvbo->gem);
nouveau_fb->nvbo = NULL;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_notifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ nouveau_notifier_takedown_channel(struct nouveau_channel *chan)
mutex_lock(&dev->struct_mutex);
nouveau_bo_unpin(chan->notifier_bo);
mutex_unlock(&dev->struct_mutex);
drm_gem_object_handle_unreference_unlocked(chan->notifier_bo->gem);
drm_gem_object_unreference_unlocked(chan->notifier_bo->gem);
drm_mm_takedown(&chan->notifier_heap);
}
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/radeon/radeon_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ static void radeonfb_destroy_pinned_object(struct drm_gem_object *gobj)
radeon_bo_unpin(rbo);
radeon_bo_unreserve(rbo);
}
drm_gem_object_handle_unreference(gobj);
drm_gem_object_unreference_unlocked(gobj);
}

Expand Down
83 changes: 71 additions & 12 deletions trunk/drivers/gpu/drm/ttm/ttm_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,43 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
return ret;
}

/**
* Call bo::reserved and with the lru lock held.
* Will release GPU memory type usage on destruction.
* This is the place to put in driver specific hooks.
* Will release the bo::reserved lock and the
* lru lock on exit.
*/

static void ttm_bo_cleanup_memtype_use(struct ttm_buffer_object *bo)
{
struct ttm_bo_global *glob = bo->glob;

if (bo->ttm) {

/**
* Release the lru_lock, since we don't want to have
* an atomic requirement on ttm_tt[unbind|destroy].
*/

spin_unlock(&glob->lru_lock);
ttm_tt_unbind(bo->ttm);
ttm_tt_destroy(bo->ttm);
bo->ttm = NULL;
spin_lock(&glob->lru_lock);
}

if (bo->mem.mm_node) {
drm_mm_put_block(bo->mem.mm_node);
bo->mem.mm_node = NULL;
}

atomic_set(&bo->reserved, 0);
wake_up_all(&bo->event_queue);
spin_unlock(&glob->lru_lock);
}


/**
* If bo idle, remove from delayed- and lru lists, and unref.
* If not idle, and already on delayed list, do nothing.
Expand All @@ -456,6 +493,7 @@ static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo, bool remove_all)
int ret;

spin_lock(&bo->lock);
retry:
(void) ttm_bo_wait(bo, false, false, !remove_all);

if (!bo->sync_obj) {
Expand All @@ -464,31 +502,52 @@ static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo, bool remove_all)
spin_unlock(&bo->lock);

spin_lock(&glob->lru_lock);
put_count = ttm_bo_del_from_lru(bo);
ret = ttm_bo_reserve_locked(bo, false, !remove_all, false, 0);

/**
* Someone else has the object reserved. Bail and retry.
*/

ret = ttm_bo_reserve_locked(bo, false, false, false, 0);
BUG_ON(ret);
if (bo->ttm)
ttm_tt_unbind(bo->ttm);
if (unlikely(ret == -EBUSY)) {
spin_unlock(&glob->lru_lock);
spin_lock(&bo->lock);
goto requeue;
}

/**
* We can re-check for sync object without taking
* the bo::lock since setting the sync object requires
* also bo::reserved. A busy object at this point may
* be caused by another thread starting an accelerated
* eviction.
*/

if (unlikely(bo->sync_obj)) {
atomic_set(&bo->reserved, 0);
wake_up_all(&bo->event_queue);
spin_unlock(&glob->lru_lock);
spin_lock(&bo->lock);
if (remove_all)
goto retry;
else
goto requeue;
}

put_count = ttm_bo_del_from_lru(bo);

if (!list_empty(&bo->ddestroy)) {
list_del_init(&bo->ddestroy);
++put_count;
}
if (bo->mem.mm_node) {
drm_mm_put_block(bo->mem.mm_node);
bo->mem.mm_node = NULL;
}
spin_unlock(&glob->lru_lock);

atomic_set(&bo->reserved, 0);
ttm_bo_cleanup_memtype_use(bo);

while (put_count--)
kref_put(&bo->list_kref, ttm_bo_ref_bug);

return 0;
}

requeue:
spin_lock(&glob->lru_lock);
if (list_empty(&bo->ddestroy)) {
void *sync_obj = bo->sync_obj;
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/i2c/busses/i2c-cpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,11 @@ static int __devinit cpm_i2c_probe(struct platform_device *ofdev,
dev_dbg(&ofdev->dev, "hw routines for %s registered.\n",
cpm->adap.name);

/*
* register OF I2C devices
*/
of_i2c_register_devices(&cpm->adap);

return 0;
out_shut:
cpm_i2c_shutdown(cpm);
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/i2c/busses/i2c-ibm_iic.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,9 @@ static int __devinit iic_probe(struct platform_device *ofdev,
dev_info(&ofdev->dev, "using %s mode\n",
dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)");

/* Now register all the child nodes */
of_i2c_register_devices(adap);

return 0;

error_cleanup:
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/i2c/busses/i2c-mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ static int __devinit fsl_i2c_probe(struct platform_device *op,
dev_err(i2c->dev, "failed to add adapter\n");
goto fail_add;
}
of_i2c_register_devices(&i2c->adap);

return result;

Expand Down
12 changes: 8 additions & 4 deletions trunk/drivers/i2c/busses/i2c-pca-isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ static int pca_isa_readbyte(void *pd, int reg)

static int pca_isa_waitforcompletion(void *pd)
{
long ret = ~0;
unsigned long timeout;
long ret;

if (irq > -1) {
ret = wait_event_timeout(pca_wait,
Expand All @@ -81,11 +81,15 @@ static int pca_isa_waitforcompletion(void *pd)
} else {
/* Do polling */
timeout = jiffies + pca_isa_ops.timeout;
while (((pca_isa_readbyte(pd, I2C_PCA_CON)
& I2C_PCA_CON_SI) == 0)
&& (ret = time_before(jiffies, timeout)))
do {
ret = time_before(jiffies, timeout);
if (pca_isa_readbyte(pd, I2C_PCA_CON)
& I2C_PCA_CON_SI)
break;
udelay(100);
} while (ret);
}

return ret > 0;
}

Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/i2c/busses/i2c-pca-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ static void i2c_pca_pf_writebyte32(void *pd, int reg, int val)
static int i2c_pca_pf_waitforcompletion(void *pd)
{
struct i2c_pca_pf_data *i2c = pd;
long ret = ~0;
unsigned long timeout;
long ret;

if (i2c->irq) {
ret = wait_event_timeout(i2c->wait,
Expand All @@ -90,10 +90,13 @@ static int i2c_pca_pf_waitforcompletion(void *pd)
} else {
/* Do polling */
timeout = jiffies + i2c->adap.timeout;
while (((i2c->algo_data.read_byte(i2c, I2C_PCA_CON)
& I2C_PCA_CON_SI) == 0)
&& (ret = time_before(jiffies, timeout)))
do {
ret = time_before(jiffies, timeout);
if (i2c->algo_data.read_byte(i2c, I2C_PCA_CON)
& I2C_PCA_CON_SI)
break;
udelay(100);
} while (ret);
}

return ret > 0;
Expand Down
54 changes: 24 additions & 30 deletions trunk/drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <linux/init.h>
#include <linux/idr.h>
#include <linux/mutex.h>
#include <linux/of_i2c.h>
#include <linux/of_device.h>
#include <linux/completion.h>
#include <linux/hardirq.h>
Expand Down Expand Up @@ -197,11 +196,12 @@ static int i2c_device_pm_suspend(struct device *dev)
{
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;

if (pm_runtime_suspended(dev))
return 0;

if (pm)
return pm->suspend ? pm->suspend(dev) : 0;
if (pm) {
if (pm_runtime_suspended(dev))
return 0;
else
return pm->suspend ? pm->suspend(dev) : 0;
}

return i2c_legacy_suspend(dev, PMSG_SUSPEND);
}
Expand All @@ -216,24 +216,19 @@ static int i2c_device_pm_resume(struct device *dev)
else
ret = i2c_legacy_resume(dev);

if (!ret) {
pm_runtime_disable(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
}

return ret;
}

static int i2c_device_pm_freeze(struct device *dev)
{
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;

if (pm_runtime_suspended(dev))
return 0;

if (pm)
return pm->freeze ? pm->freeze(dev) : 0;
if (pm) {
if (pm_runtime_suspended(dev))
return 0;
else
return pm->freeze ? pm->freeze(dev) : 0;
}

return i2c_legacy_suspend(dev, PMSG_FREEZE);
}
Expand All @@ -242,11 +237,12 @@ static int i2c_device_pm_thaw(struct device *dev)
{
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;

if (pm_runtime_suspended(dev))
return 0;

if (pm)
return pm->thaw ? pm->thaw(dev) : 0;
if (pm) {
if (pm_runtime_suspended(dev))
return 0;
else
return pm->thaw ? pm->thaw(dev) : 0;
}

return i2c_legacy_resume(dev);
}
Expand All @@ -255,11 +251,12 @@ static int i2c_device_pm_poweroff(struct device *dev)
{
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;

if (pm_runtime_suspended(dev))
return 0;

if (pm)
return pm->poweroff ? pm->poweroff(dev) : 0;
if (pm) {
if (pm_runtime_suspended(dev))
return 0;
else
return pm->poweroff ? pm->poweroff(dev) : 0;
}

return i2c_legacy_suspend(dev, PMSG_HIBERNATE);
}
Expand Down Expand Up @@ -876,9 +873,6 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
if (adap->nr < __i2c_first_dynamic_bus_num)
i2c_scan_static_board_info(adap);

/* Register devices from the device tree */
of_i2c_register_devices(adap);

/* Notify drivers */
mutex_lock(&core_lock);
bus_for_each_drv(&i2c_bus_type, NULL, adap, __process_new_adapter);
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/input/joydev.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ static int joydev_handle_JSIOCSAXMAP(struct joydev *joydev,

memcpy(joydev->abspam, abspam, len);

for (i = 0; i < joydev->nabs; i++)
joydev->absmap[joydev->abspam[i]] = i;

out:
kfree(abspam);
return retval;
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/input/misc/uinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,13 @@ static int uinput_setup_device(struct uinput_device *udev, const char __user *bu
retval = uinput_validate_absbits(dev);
if (retval < 0)
goto exit;
if (test_bit(ABS_MT_SLOT, dev->absbit)) {
int nslot = input_abs_get_max(dev, ABS_MT_SLOT) + 1;
input_mt_create_slots(dev, nslot);
input_set_events_per_packet(dev, 6 * nslot);
} else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) {
input_set_events_per_packet(dev, 60);
}
}

udev->state = UIST_SETUP_COMPLETE;
Expand Down
Loading

0 comments on commit a1142c6

Please sign in to comment.