Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263004
b: refs/heads/master
c: 2f6a123
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Aug 15, 2011
1 parent de80720 commit 191b6ca
Show file tree
Hide file tree
Showing 31 changed files with 250 additions and 170 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: e22a539824e8ddb82c87b4f415165ede82e6ab56
refs/heads/master: 2f6a123821a7feaba7cee787ef0f21d2354d1730
4 changes: 2 additions & 2 deletions trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION = 3
PATCHLEVEL = 1
SUBLEVEL = 0
EXTRAVERSION = -rc1
NAME = Sneaky Weasel
EXTRAVERSION = -rc2
NAME = Wet Seal

# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/base/regmap/regmap-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ struct regmap *regmap_init_i2c(struct i2c_client *i2c,
}
EXPORT_SYMBOL_GPL(regmap_init_i2c);

MODULE_LICENSE("GPL");
2 changes: 2 additions & 0 deletions trunk/drivers/base/regmap/regmap-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ struct regmap *regmap_init_spi(struct spi_device *spi,
return regmap_init(&spi->dev, &regmap_spi, config);
}
EXPORT_SYMBOL_GPL(regmap_init_spi);

MODULE_LICENSE("GPL");
2 changes: 1 addition & 1 deletion trunk/drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
u8[0] |= map->bus->read_flag_mask;

ret = map->bus->read(map->dev, map->work_buf, map->format.reg_bytes,
val, map->format.val_bytes);
val, val_len);
if (ret != 0)
return ret;

Expand Down
24 changes: 21 additions & 3 deletions trunk/drivers/firewire/core-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,33 @@ struct inbound_phy_packet_event {
struct fw_cdev_event_phy_packet phy_packet;
};

static inline void __user *u64_to_uptr(__u64 value)
#ifdef CONFIG_COMPAT
static void __user *u64_to_uptr(u64 value)
{
if (is_compat_task())
return compat_ptr(value);
else
return (void __user *)(unsigned long)value;
}

static u64 uptr_to_u64(void __user *ptr)
{
if (is_compat_task())
return ptr_to_compat(ptr);
else
return (u64)(unsigned long)ptr;
}
#else
static inline void __user *u64_to_uptr(u64 value)
{
return (void __user *)(unsigned long)value;
}

static inline __u64 uptr_to_u64(void __user *ptr)
static inline u64 uptr_to_u64(void __user *ptr)
{
return (__u64)(unsigned long)ptr;
return (u64)(unsigned long)ptr;
}
#endif /* CONFIG_COMPAT */

static int fw_device_op_open(struct inode *inode, struct file *file)
{
Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2179,8 +2179,13 @@ static int ohci_enable(struct fw_card *card,
ohci_driver_name, ohci)) {
fw_error("Failed to allocate interrupt %d.\n", dev->irq);
pci_disable_msi(dev);
dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
ohci->config_rom, ohci->config_rom_bus);

if (config_rom) {
dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
ohci->next_config_rom,
ohci->next_config_rom_bus);
ohci->next_config_rom = NULL;
}
return -EIO;
}

Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/gpu/drm/radeon/atombios_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,18 @@ static bool radeon_dp_get_link_status(struct radeon_connector *radeon_connector,
return true;
}

bool radeon_dp_needs_link_train(struct radeon_connector *radeon_connector)
{
u8 link_status[DP_LINK_STATUS_SIZE];
struct radeon_connector_atom_dig *dig = radeon_connector->con_priv;

if (!radeon_dp_get_link_status(radeon_connector, link_status))
return false;
if (dp_channel_eq_ok(link_status, dig->dp_lane_count))
return false;
return true;
}

struct radeon_dp_link_train_info {
struct radeon_device *rdev;
struct drm_encoder *encoder;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/radeon/evergreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ static void evergreen_program_watermarks(struct radeon_device *rdev,
!evergreen_average_bandwidth_vs_available_bandwidth(&wm) ||
!evergreen_check_latency_hiding(&wm) ||
(rdev->disp_priority == 2)) {
DRM_INFO("force priority to high\n");
DRM_DEBUG_KMS("force priority to high\n");
priority_a_cnt |= PRIORITY_ALWAYS_ON;
priority_b_cnt |= PRIORITY_ALWAYS_ON;
}
Expand Down
29 changes: 20 additions & 9 deletions trunk/drivers/gpu/drm/radeon/radeon_connectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,20 @@ void radeon_connector_hotplug(struct drm_connector *connector)

radeon_hpd_set_polarity(rdev, radeon_connector->hpd.hpd);

/* powering up/down the eDP panel generates hpd events which
* can interfere with modesetting.
*/
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
/* if the connector is already off, don't turn it back on */
if (connector->dpms != DRM_MODE_DPMS_ON)
return;

/* pre-r600 did not always have the hpd pins mapped accurately to connectors */
if (rdev->family >= CHIP_R600) {
if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
/* just deal with DP (not eDP) here. */
if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
int saved_dpms = connector->dpms;

if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd) &&
radeon_dp_needs_link_train(radeon_connector))
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
else
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
connector->dpms = saved_dpms;
}
}

Expand Down Expand Up @@ -474,11 +476,19 @@ static void radeon_fixup_lvds_native_mode(struct drm_encoder *encoder,
{
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
struct drm_display_mode *native_mode = &radeon_encoder->native_mode;
struct drm_display_mode *t, *mode;

/* If the EDID preferred mode doesn't match the native mode, use it */
list_for_each_entry_safe(mode, t, &connector->probed_modes, head) {
if (mode->type & DRM_MODE_TYPE_PREFERRED) {
if (mode->hdisplay != native_mode->hdisplay ||
mode->vdisplay != native_mode->vdisplay)
memcpy(native_mode, mode, sizeof(*mode));
}
}

/* Try to get native mode details from EDID if necessary */
if (!native_mode->clock) {
struct drm_display_mode *t, *mode;

list_for_each_entry_safe(mode, t, &connector->probed_modes, head) {
if (mode->hdisplay == native_mode->hdisplay &&
mode->vdisplay == native_mode->vdisplay) {
Expand All @@ -489,6 +499,7 @@ static void radeon_fixup_lvds_native_mode(struct drm_encoder *encoder,
}
}
}

if (!native_mode->clock) {
DRM_DEBUG_KMS("No LVDS native mode details, disabling RMX\n");
radeon_encoder->rmx_type = RMX_OFF;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/gpu/drm/radeon/radeon_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <drm/radeon_drm.h>
#include <linux/vgaarb.h>
#include <linux/vga_switcheroo.h>
#include <linux/efi.h>
#include "radeon_reg.h"
#include "radeon.h"
#include "atom.h"
Expand Down Expand Up @@ -348,6 +349,9 @@ bool radeon_card_posted(struct radeon_device *rdev)
{
uint32_t reg;

if (efi_enabled && rdev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE)
return false;

/* first check CRTCs */
if (ASIC_IS_DCE41(rdev)) {
reg = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET) |
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/gpu/drm/radeon/radeon_encoders.c
Original file line number Diff line number Diff line change
Expand Up @@ -2323,6 +2323,9 @@ radeon_add_atom_encoder(struct drm_device *dev,
default:
encoder->possible_crtcs = 0x3;
break;
case 4:
encoder->possible_crtcs = 0xf;
break;
case 6:
encoder->possible_crtcs = 0x3f;
break;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/radeon/radeon_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ extern void radeon_dp_set_link_config(struct drm_connector *connector,
struct drm_display_mode *mode);
extern void radeon_dp_link_train(struct drm_encoder *encoder,
struct drm_connector *connector);
extern bool radeon_dp_needs_link_train(struct radeon_connector *radeon_connector);
extern u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector);
extern bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector);
extern void atombios_dig_encoder_setup(struct drm_encoder *encoder, int action, int panel_mode);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/misc/cb710/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ EXPORT_SYMBOL_GPL(cb710_pci_update_config_reg);
static int __devinit cb710_pci_configure(struct pci_dev *pdev)
{
unsigned int devfn = PCI_DEVFN(PCI_SLOT(pdev->devfn), 0);
struct pci_dev *pdev0 = pci_get_slot(pdev->bus, devfn);
struct pci_dev *pdev0;
u32 val;

cb710_pci_update_config_reg(pdev, 0x48,
Expand All @@ -43,6 +43,7 @@ static int __devinit cb710_pci_configure(struct pci_dev *pdev)
if (val & 0x80000000)
return 0;

pdev0 = pci_get_slot(pdev->bus, devfn);
if (!pdev0)
return -ENODEV;

Expand Down
58 changes: 31 additions & 27 deletions trunk/drivers/mmc/card/mmc_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static void mmc_test_prepare_mrq(struct mmc_test_card *test,
static int mmc_test_busy(struct mmc_command *cmd)
{
return !(cmd->resp[0] & R1_READY_FOR_DATA) ||
(R1_CURRENT_STATE(cmd->resp[0]) == 7);
(R1_CURRENT_STATE(cmd->resp[0]) == R1_STATE_PRG);
}

/*
Expand Down Expand Up @@ -2900,7 +2900,7 @@ static const struct file_operations mmc_test_fops_testlist = {
.release = single_release,
};

static void mmc_test_free_file_test(struct mmc_card *card)
static void mmc_test_free_dbgfs_file(struct mmc_card *card)
{
struct mmc_test_dbgfs_file *df, *dfs;

Expand All @@ -2917,49 +2917,53 @@ static void mmc_test_free_file_test(struct mmc_card *card)
mutex_unlock(&mmc_test_lock);
}

static int mmc_test_register_file_test(struct mmc_card *card)
static int __mmc_test_register_dbgfs_file(struct mmc_card *card,
const char *name, mode_t mode, const struct file_operations *fops)
{
struct dentry *file = NULL;
struct mmc_test_dbgfs_file *df;
int ret = 0;

mutex_lock(&mmc_test_lock);

if (card->debugfs_root)
file = debugfs_create_file("test", S_IWUSR | S_IRUGO,
card->debugfs_root, card, &mmc_test_fops_test);

if (IS_ERR_OR_NULL(file)) {
dev_err(&card->dev,
"Can't create test. Perhaps debugfs is disabled.\n");
ret = -ENODEV;
goto err;
}

if (card->debugfs_root)
file = debugfs_create_file("testlist", S_IRUGO,
card->debugfs_root, card, &mmc_test_fops_testlist);
file = debugfs_create_file(name, mode, card->debugfs_root,
card, fops);

if (IS_ERR_OR_NULL(file)) {
dev_err(&card->dev,
"Can't create testlist. Perhaps debugfs is disabled.\n");
ret = -ENODEV;
goto err;
"Can't create %s. Perhaps debugfs is disabled.\n",
name);
return -ENODEV;
}

df = kmalloc(sizeof(struct mmc_test_dbgfs_file), GFP_KERNEL);
if (!df) {
debugfs_remove(file);
dev_err(&card->dev,
"Can't allocate memory for internal usage.\n");
ret = -ENOMEM;
goto err;
return -ENOMEM;
}

df->card = card;
df->file = file;

list_add(&df->link, &mmc_test_file_test);
return 0;
}

static int mmc_test_register_dbgfs_file(struct mmc_card *card)
{
int ret;

mutex_lock(&mmc_test_lock);

ret = __mmc_test_register_dbgfs_file(card, "test", S_IWUSR | S_IRUGO,
&mmc_test_fops_test);
if (ret)
goto err;

ret = __mmc_test_register_dbgfs_file(card, "testlist", S_IRUGO,
&mmc_test_fops_testlist);
if (ret)
goto err;

err:
mutex_unlock(&mmc_test_lock);
Expand All @@ -2974,7 +2978,7 @@ static int mmc_test_probe(struct mmc_card *card)
if (!mmc_card_mmc(card) && !mmc_card_sd(card))
return -ENODEV;

ret = mmc_test_register_file_test(card);
ret = mmc_test_register_dbgfs_file(card);
if (ret)
return ret;

Expand All @@ -2986,7 +2990,7 @@ static int mmc_test_probe(struct mmc_card *card)
static void mmc_test_remove(struct mmc_card *card)
{
mmc_test_free_result(card);
mmc_test_free_file_test(card);
mmc_test_free_dbgfs_file(card);
}

static struct mmc_driver mmc_driver = {
Expand All @@ -3006,7 +3010,7 @@ static void __exit mmc_test_exit(void)
{
/* Clear stalled data if card is still plugged */
mmc_test_free_result(NULL);
mmc_test_free_file_test(NULL);
mmc_test_free_dbgfs_file(NULL);

mmc_unregister_driver(&mmc_driver);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from,
goto out;
}
} while (!(cmd.resp[0] & R1_READY_FOR_DATA) ||
R1_CURRENT_STATE(cmd.resp[0]) == 7);
R1_CURRENT_STATE(cmd.resp[0]) == R1_STATE_PRG);
out:
return err;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
}

card->ext_csd.rev = ext_csd[EXT_CSD_REV];
if (card->ext_csd.rev > 5) {
if (card->ext_csd.rev > 6) {
printk(KERN_ERR "%s: unrecognised EXT_CSD revision %d\n",
mmc_hostname(card->host), card->ext_csd.rev);
err = -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mmc/core/mmc_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
break;
if (mmc_host_is_spi(card->host))
break;
} while (R1_CURRENT_STATE(status) == 7);
} while (R1_CURRENT_STATE(status) == R1_STATE_PRG);

if (mmc_host_is_spi(card->host)) {
if (status & R1_SPI_ILLEGAL_COMMAND)
Expand Down
Loading

0 comments on commit 191b6ca

Please sign in to comment.