Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Browse files Browse the repository at this point in the history
  • Loading branch information
davem330 committed Oct 8, 2014
2 parents 16b99a4 + 5301e3e commit 64b1f00
Show file tree
Hide file tree
Showing 47 changed files with 264 additions and 181 deletions.
12 changes: 9 additions & 3 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1667,6 +1667,12 @@ M: Nicolas Ferre <[email protected]>
S: Supported
F: drivers/tty/serial/atmel_serial.c

ATMEL Audio ALSA driver
M: Bo Shen <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Supported
F: sound/soc/atmel

ATMEL DMA DRIVER
M: Nicolas Ferre <[email protected]>
L: [email protected] (moderated for non-subscribers)
Expand Down Expand Up @@ -4791,14 +4797,14 @@ M: Deepak Saxena <[email protected]>
S: Maintained
F: drivers/char/hw_random/ixp4xx-rng.c

INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/igbvf/ixgb/ixgbe/ixgbevf/i40e/i40evf)
INTEL ETHERNET DRIVERS (e100/e1000/e1000e/fm10k/igb/igbvf/ixgb/ixgbe/ixgbevf/i40e/i40evf)
M: Jeff Kirsher <[email protected]>
M: Jesse Brandeburg <[email protected]>
M: Bruce Allan <[email protected]>
M: Carolyn Wyborny <[email protected]>
M: Don Skidmore <[email protected]>
M: Greg Rose <[email protected]>
M: Alex Duyck <alexander.h.duyck@intel.com>
M: Matthew Vick <matthew.vick@intel.com>
M: John Ronciak <[email protected]>
M: Mitch Williams <[email protected]>
M: Linux NICS <[email protected]>
Expand Down Expand Up @@ -5486,7 +5492,7 @@ F: drivers/macintosh/
LINUX FOR POWERPC EMBEDDED MPC5XXX
M: Anatolij Gustschin <[email protected]>
L: [email protected]
T: git git://git.denx.de/linux-2.6-agust.git
T: git git://git.denx.de/linux-denx-agust.git
S: Maintained
F: arch/powerpc/platforms/512x/
F: arch/powerpc/platforms/52xx/
Expand Down
7 changes: 4 additions & 3 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1658,10 +1658,8 @@ void cpufreq_suspend(void)
if (!cpufreq_driver)
return;

cpufreq_suspended = true;

if (!has_target())
return;
goto suspend;

pr_debug("%s: Suspending Governors\n", __func__);

Expand All @@ -1674,6 +1672,9 @@ void cpufreq_suspend(void)
pr_err("%s: Failed to suspend driver: %p\n", __func__,
policy);
}

suspend:
cpufreq_suspended = true;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions drivers/cpufreq/integrator-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ static int __init integrator_cpufreq_probe(struct platform_device *pdev)
return cpufreq_register_driver(&integrator_driver);
}

static void __exit integrator_cpufreq_remove(struct platform_device *pdev)
static int __exit integrator_cpufreq_remove(struct platform_device *pdev)
{
cpufreq_unregister_driver(&integrator_driver);
return cpufreq_unregister_driver(&integrator_driver);
}

static const struct of_device_id integrator_cpufreq_match[] = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/cpufreq/pcc-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy,
u32 input_buffer;
int cpu;

spin_lock(&pcc_lock);
cpu = policy->cpu;
pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu);

Expand All @@ -216,6 +215,7 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy,
freqs.old = policy->cur;
freqs.new = target_freq;
cpufreq_freq_transition_begin(policy, &freqs);
spin_lock(&pcc_lock);

input_buffer = 0x1 | (((target_freq * 100)
/ (ioread32(&pcch_hdr->nominal) * 1000)) << 8);
Expand Down
14 changes: 13 additions & 1 deletion drivers/gpu/drm/i915/i915_gem_gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,16 @@ void i915_check_and_clear_faults(struct drm_device *dev)
POSTING_READ(RING_FAULT_REG(&dev_priv->ring[RCS]));
}

static void i915_ggtt_flush(struct drm_i915_private *dev_priv)
{
if (INTEL_INFO(dev_priv->dev)->gen < 6) {
intel_gtt_chipset_flush();
} else {
I915_WRITE(GFX_FLSH_CNTL_GEN6, GFX_FLSH_CNTL_EN);
POSTING_READ(GFX_FLSH_CNTL_GEN6);
}
}

void i915_gem_suspend_gtt_mappings(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
Expand All @@ -1326,6 +1336,8 @@ void i915_gem_suspend_gtt_mappings(struct drm_device *dev)
dev_priv->gtt.base.start,
dev_priv->gtt.base.total,
true);

i915_ggtt_flush(dev_priv);
}

void i915_gem_restore_gtt_mappings(struct drm_device *dev)
Expand Down Expand Up @@ -1378,7 +1390,7 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
gen6_write_pdes(container_of(vm, struct i915_hw_ppgtt, base));
}

i915_gem_chipset_flush(dev);
i915_ggtt_flush(dev_priv);
}

int i915_gem_gtt_prepare_object(struct drm_i915_gem_object *obj)
Expand Down
16 changes: 11 additions & 5 deletions drivers/gpu/drm/i915/intel_opregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,16 @@ int intel_opregion_notify_adapter(struct drm_device *dev, pci_power_t state)
return -EINVAL;
}

/*
* If the vendor backlight interface is not in use and ACPI backlight interface
* is broken, do not bother processing backlight change requests from firmware.
*/
static bool should_ignore_backlight_request(void)
{
return acpi_video_backlight_support() &&
!acpi_video_verify_backlight_support();
}

static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)
{
struct drm_i915_private *dev_priv = dev->dev_private;
Expand All @@ -404,11 +414,7 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)

DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp);

/*
* If the acpi_video interface is not supposed to be used, don't
* bother processing backlight level change requests from firmware.
*/
if (!acpi_video_verify_backlight_support()) {
if (should_ignore_backlight_request()) {
DRM_DEBUG_KMS("opregion backlight request ignored\n");
return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -1763,9 +1763,10 @@ nv50_disp_intr_unk40_0_tmds(struct nv50_disp_priv *priv, struct dcb_output *outp
const int or = ffs(outp->or) - 1;
const u32 loff = (or * 0x800) + (link * 0x80);
const u16 mask = (outp->sorconf.link << 6) | outp->or;
struct dcb_output match;
u8 ver, hdr;

if (dcb_outp_match(bios, DCB_OUTPUT_DP, mask, &ver, &hdr, outp))
if (dcb_outp_match(bios, DCB_OUTPUT_DP, mask, &ver, &hdr, &match))
nv_mask(priv, 0x61c10c + loff, 0x00000001, 0x00000000);
}

Expand Down
7 changes: 6 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
struct nouveau_software_chan *swch;
struct nv_dma_v0 args = {};
int ret, i;
bool save;

nvif_object_map(chan->object);

Expand Down Expand Up @@ -386,7 +387,11 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
}

/* initialise synchronisation */
return nouveau_fence(chan->drm)->context_new(chan);
save = cli->base.super;
cli->base.super = true; /* hack until fencenv50 fixed */
ret = nouveau_fence(chan->drm)->context_new(chan);
cli->base.super = save;
return ret;
}

int
Expand Down
23 changes: 11 additions & 12 deletions drivers/gpu/drm/nouveau/nouveau_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,14 +550,12 @@ nouveau_display_destroy(struct drm_device *dev)
}

int
nouveau_display_suspend(struct drm_device *dev)
nouveau_display_suspend(struct drm_device *dev, bool runtime)
{
struct nouveau_drm *drm = nouveau_drm(dev);
struct drm_crtc *crtc;

nouveau_display_fini(dev);

NV_INFO(drm, "unpinning framebuffer(s)...\n");
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_framebuffer *nouveau_fb;

Expand All @@ -579,12 +577,13 @@ nouveau_display_suspend(struct drm_device *dev)
}

void
nouveau_display_repin(struct drm_device *dev)
nouveau_display_resume(struct drm_device *dev, bool runtime)
{
struct nouveau_drm *drm = nouveau_drm(dev);
struct drm_crtc *crtc;
int ret;
int ret, head;

/* re-pin fb/cursors */
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_framebuffer *nouveau_fb;

Expand All @@ -606,13 +605,6 @@ nouveau_display_repin(struct drm_device *dev)
if (ret)
NV_ERROR(drm, "Could not pin/map cursor.\n");
}
}

void
nouveau_display_resume(struct drm_device *dev)
{
struct drm_crtc *crtc;
int head;

nouveau_display_init(dev);

Expand All @@ -627,6 +619,13 @@ nouveau_display_resume(struct drm_device *dev)
for (head = 0; head < dev->mode_config.num_crtc; head++)
drm_vblank_on(dev, head);

/* This should ensure we don't hit a locking problem when someone
* wakes us up via a connector. We should never go into suspend
* while the display is on anyways.
*/
if (runtime)
return;

drm_helper_resume_force_mode(dev);

list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
Expand Down
5 changes: 2 additions & 3 deletions drivers/gpu/drm/nouveau/nouveau_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ int nouveau_display_create(struct drm_device *dev);
void nouveau_display_destroy(struct drm_device *dev);
int nouveau_display_init(struct drm_device *dev);
void nouveau_display_fini(struct drm_device *dev);
int nouveau_display_suspend(struct drm_device *dev);
void nouveau_display_repin(struct drm_device *dev);
void nouveau_display_resume(struct drm_device *dev);
int nouveau_display_suspend(struct drm_device *dev, bool runtime);
void nouveau_display_resume(struct drm_device *dev, bool runtime);
int nouveau_display_vblank_enable(struct drm_device *, int);
void nouveau_display_vblank_disable(struct drm_device *, int);
int nouveau_display_scanoutpos(struct drm_device *, int, unsigned int,
Expand Down
51 changes: 13 additions & 38 deletions drivers/gpu/drm/nouveau/nouveau_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,11 @@ nouveau_do_suspend(struct drm_device *dev, bool runtime)
struct nouveau_cli *cli;
int ret;

if (dev->mode_config.num_crtc && !runtime) {
if (dev->mode_config.num_crtc) {
NV_INFO(drm, "suspending console...\n");
nouveau_fbcon_set_suspend(dev, 1);
NV_INFO(drm, "suspending display...\n");
ret = nouveau_display_suspend(dev);
ret = nouveau_display_suspend(dev, runtime);
if (ret)
return ret;
}
Expand Down Expand Up @@ -603,7 +605,7 @@ nouveau_do_suspend(struct drm_device *dev, bool runtime)
fail_display:
if (dev->mode_config.num_crtc) {
NV_INFO(drm, "resuming display...\n");
nouveau_display_resume(dev);
nouveau_display_resume(dev, runtime);
}
return ret;
}
Expand All @@ -618,9 +620,6 @@ int nouveau_pmops_suspend(struct device *dev)
drm_dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF)
return 0;

if (drm_dev->mode_config.num_crtc)
nouveau_fbcon_set_suspend(drm_dev, 1);

ret = nouveau_do_suspend(drm_dev, false);
if (ret)
return ret;
Expand All @@ -633,7 +632,7 @@ int nouveau_pmops_suspend(struct device *dev)
}

static int
nouveau_do_resume(struct drm_device *dev)
nouveau_do_resume(struct drm_device *dev, bool runtime)
{
struct nouveau_drm *drm = nouveau_drm(dev);
struct nouveau_cli *cli;
Expand All @@ -658,7 +657,9 @@ nouveau_do_resume(struct drm_device *dev)

if (dev->mode_config.num_crtc) {
NV_INFO(drm, "resuming display...\n");
nouveau_display_repin(dev);
nouveau_display_resume(dev, runtime);
NV_INFO(drm, "resuming console...\n");
nouveau_fbcon_set_suspend(dev, 0);
}

return 0;
Expand All @@ -681,47 +682,21 @@ int nouveau_pmops_resume(struct device *dev)
return ret;
pci_set_master(pdev);

ret = nouveau_do_resume(drm_dev);
if (ret)
return ret;

if (drm_dev->mode_config.num_crtc) {
nouveau_display_resume(drm_dev);
nouveau_fbcon_set_suspend(drm_dev, 0);
}

return 0;
return nouveau_do_resume(drm_dev, false);
}

static int nouveau_pmops_freeze(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
int ret;

if (drm_dev->mode_config.num_crtc)
nouveau_fbcon_set_suspend(drm_dev, 1);

ret = nouveau_do_suspend(drm_dev, false);
return ret;
return nouveau_do_suspend(drm_dev, false);
}

static int nouveau_pmops_thaw(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
int ret;

ret = nouveau_do_resume(drm_dev);
if (ret)
return ret;

if (drm_dev->mode_config.num_crtc) {
nouveau_display_resume(drm_dev);
nouveau_fbcon_set_suspend(drm_dev, 0);
}

return 0;
return nouveau_do_resume(drm_dev, false);
}


Expand Down Expand Up @@ -977,7 +952,7 @@ static int nouveau_pmops_runtime_resume(struct device *dev)
return ret;
pci_set_master(pdev);

ret = nouveau_do_resume(drm_dev);
ret = nouveau_do_resume(drm_dev, true);
drm_kms_helper_poll_enable(drm_dev);
/* do magic */
nvif_mask(device, 0x88488, (1 << 25), (1 << 25));
Expand Down
Loading

0 comments on commit 64b1f00

Please sign in to comment.