platform/kernel/linux-amlogic.git
9 years agodrm/tilcdc: panel: Set return value explicitly
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:21 +0000 (09:51 -0300)]
drm/tilcdc: panel: Set return value explicitly

Instead of setting an initial value for the return code, set it explicitly
on each error path. This is just a cosmetic cleanup, as preparation for the
enable GPIO support.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm/tilcdc: panel: Fix backlight devicetree support
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:20 +0000 (09:51 -0300)]
drm/tilcdc: panel: Fix backlight devicetree support

The current backlight support is broken; the driver expects a backlight-class
in the panel devicetree node. Fix this by implementing it properly, getting
an optional backlight from a phandle.

This shouldn't cause any backward-compatibility DT issue because the current
implementation doesn't work and is not even documented.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm/tilcdc: panel: Use devm_kzalloc to simplify the error path
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:19 +0000 (09:51 -0300)]
drm/tilcdc: panel: Use devm_kzalloc to simplify the error path

Using the managed variant to allocate the resource makes the code simpler
and less error-prone.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm/tilcdc: panel: Spurious whitespace removal
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:18 +0000 (09:51 -0300)]
drm/tilcdc: panel: Spurious whitespace removal

Just a cosmetic cleanup.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm/tilcdc: panel: Remove unused variable
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:17 +0000 (09:51 -0300)]
drm/tilcdc: panel: Remove unused variable

Just a trivial cleanup to remove the variable.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm/tilcdc: panel: Add missing of_node_put
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:16 +0000 (09:51 -0300)]
drm/tilcdc: panel: Add missing of_node_put

This commit adds the missing calls to of_node_put to release the node
that's currently held by the of_get_child_by_name() call in the panel
info parsing code.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm/tilcdc: Fix the error path in tilcdc_load()
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:15 +0000 (09:51 -0300)]
drm/tilcdc: Fix the error path in tilcdc_load()

The current error path calls tilcdc_unload() in case of an error to release
the resources. However, this is wrong because not all resources have been
allocated by the time an error occurs in tilcdc_load().

To fix it, this commit adds proper labels to bail out at the different
stages in the load function, and release only the resources actually allocated.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agoMerge tag 'drm-intel-next-2014-09-05' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Tue, 16 Sep 2014 06:02:09 +0000 (16:02 +1000)]
Merge tag 'drm-intel-next-2014-09-05' of git://anongit.freedesktop.org/drm-intel into drm-next

- final bits (again) for the rotation support (Sonika Jindal)
- support bl_power in the intel backlight (Jani)
- vdd handling improvements from Ville
- i830M fixes from Ville
- piles of prep work all over to make skl enabling just plug in (Damien, Sonika)
- rename DP training defines to reflect latest edp standards, this touches all
  drm drivers supporting DP (Sonika Jindal)
- cache edids during single detect cycle to avoid re-reading it for e.g. audio,
  from Chris
- move w/a for registers which are stored in the hw context to the context init
  code (Arun&Damien)
- edp panel power sequencer fixes, helps chv a lot (Ville)
- piles of other chv fixes all over
- much more paranoid pageflip handling with stall detection and better recovery
  from Chris
- small things all over, as usual

* tag 'drm-intel-next-2014-09-05' of git://anongit.freedesktop.org/drm-intel: (114 commits)
  drm/i915: Update DRIVER_DATE to 20140905
  drm/i915: Decouple the stuck pageflip on modeset
  drm/i915: Check for a stalled page flip after each vblank
  drm/i915: Introduce a for_each_plane() macro
  drm/i915: Rewrite ABS_DIFF() in a safer manner
  drm/i915: Add comments explaining the vdd on/off functions
  drm/i915: Move DP port disable to post_disable for pch platforms
  drm/i915: Enable DP port earlier
  drm/i915: Turn on panel power before doing aux transfers
  drm/i915: Be more careful when picking the initial power sequencer pipe
  drm/i915: Reset power sequencer pipe tracking when disp2d is off
  drm/i915: Track which port is using which pipe's power sequencer
  drm/i915: Fix edp vdd locking
  drm/i915: Reset the HEAD pointer for the ring after writing START
  drm/i915: Fix unsafe vma iteration in i915_drop_caches
  drm/i915: init sprites with univeral plane init function
  drm/i915: Check of !HAS_PCH_SPLIT() in PCH transcoder funcs
  drm/i915: Use HAS_GMCH_DISPLAY un underrun reporting code
  drm/i915: Use IS_BROADWELL() instead of IS_GEN8() in forcewake code
  drm/i915: Don't call gen8_fbc_sw_flush() on chv
  ...

9 years agoMerge branch 'drm-next-ast-fixes' of ssh://people.freedesktop.org/~/linux into drm...
Dave Airlie [Tue, 16 Sep 2014 04:59:16 +0000 (14:59 +1000)]
Merge branch 'drm-next-ast-fixes' of ssh://people.freedesktop.org/~/linux into drm-next

Pull in first set of changes from Ben for ast on ppc.

I've done a quick boot test on x86 and it still seems to boot.

* 'drm-next-ast-fixes' of ssh://people.freedesktop.org/~/linux:
  drm/ast: Cleanup analog init code path
  drm/ast: Don't assume DVO enabled means SIL164 on uninitialized chips
  drm/ast: Properly initialize P2A base before using it in ast_init_3rdtx()
  drm/ast: POST chip at probe time if VGA not enabled
  drm/ast: Try to use MMIO registers when PIO isn't supported

9 years agodrm/ast: Add reduced blanking modes for wide screen mode
Y.C. Chen [Thu, 28 Aug 2014 09:11:04 +0000 (17:11 +0800)]
drm/ast: Add reduced blanking modes for wide screen mode

Signed-off-by: Egbert Eich <eich@suse.com>
Tested-by: Steven You2 Liang <liangyou2@lenovo.com>
Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
v3: based on [PATCH 1/2] drm/ast: Add missing entry to dclk_table[].
    Add reduced blanking modes, improve mode matching to
    identify these modes by thier sync polarities.

[airlied: argh whitespace damage]
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm: backmerge tag 'v3.17-rc5' into drm-next
Dave Airlie [Tue, 16 Sep 2014 01:28:52 +0000 (11:28 +1000)]
drm: backmerge tag 'v3.17-rc5' into drm-next

This is requested to get the fixes for intel and radeon into the
same tree for future development work.

i915_display.c: fix missing dev_priv conflict.

9 years agoMerge branch 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6...
Dave Airlie [Mon, 15 Sep 2014 20:20:53 +0000 (06:20 +1000)]
Merge branch 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

This is the main merge request for Nouveau 3.18, overview:
- various bits of roy's gt21x clock work
- various bits of kepler memory clock work (don't get too excited, there's at least one more major bit left that's busting higher freqs)
- misc fan control improvements
- kepler hdmi infoframe fixes
- dp audio
- l2 cache + cbc improvements

* 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (68 commits)
  drm/gt214-/disp: enable dp audio
  drm/gt214-/kms: fix hda eld regression
  drm/g94-/disp: calculate some dp audio constants
  drm/gt214-/kms: perform hda codec setup on displayport too
  drm/gk104-/disp: infoframe registers moved yet again on kepler
  drm/nouveau/bios: parse older ramcfg/timing data like we do newer ones
  drm/nva3/fb/ram: Per-partition regs
  drm/nouveau/fb/ram: Support strided regs
  drm/nv50/fb/ram: Store the number of partitions in the designated fields
  drm/nv50/kms: Set VBLANK time in modeset script
  drm/nouveau/bios: Add rammap support for version 1.0
  drm/gf100-/pwr/memx: block host and fifo around reclock
  drm/nouveau/pwr/memx: fix command ordering around block/unblock
  drm/nouveau/pwr/memx: rename fb off/on to block/unblock
  drm/nva3/clk: Pause the GPU before reclocking
  drm/nouveau/gpio: rename g92 class to g94
  drm/gk104-/fb/ram: move fb enable/disable to same place as nvidia
  drm/gk104/fb/ram: twiddle some more bits when reclocking
  drm/nouveau/bios: parse another large chunk of random memory config data
  drm/gk104-/fb/ram: perform certain steps only when bios data differs
  ...

9 years agodrm/gt214-/disp: enable dp audio
Ben Skeggs [Mon, 15 Sep 2014 11:29:05 +0000 (21:29 +1000)]
drm/gt214-/disp: enable dp audio

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gt214-/kms: fix hda eld regression
Ben Skeggs [Mon, 15 Sep 2014 11:11:51 +0000 (21:11 +1000)]
drm/gt214-/kms: fix hda eld regression

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/g94-/disp: calculate some dp audio constants
Ben Skeggs [Mon, 15 Sep 2014 05:55:56 +0000 (15:55 +1000)]
drm/g94-/disp: calculate some dp audio constants

NVIDIA appear to have tweaked the algorithm from GF110, this implements
the previous algorithm for them still.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gt214-/kms: perform hda codec setup on displayport too
Ben Skeggs [Mon, 15 Sep 2014 05:20:47 +0000 (15:20 +1000)]
drm/gt214-/kms: perform hda codec setup on displayport too

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gk104-/disp: infoframe registers moved yet again on kepler
Ben Skeggs [Mon, 15 Sep 2014 05:15:09 +0000 (15:15 +1000)]
drm/gk104-/disp: infoframe registers moved yet again on kepler

Thanks to Vincent Pelletier for pointing this out and providing a proof of
concept patch on the list.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios: parse older ramcfg/timing data like we do newer ones
Ben Skeggs [Mon, 15 Sep 2014 02:30:08 +0000 (12:30 +1000)]
drm/nouveau/bios: parse older ramcfg/timing data like we do newer ones

Done after discussion with Roy.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nva3/fb/ram: Per-partition regs
Roy Spliet [Fri, 12 Sep 2014 16:00:16 +0000 (18:00 +0200)]
drm/nva3/fb/ram: Per-partition regs

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fb/ram: Support strided regs
Roy Spliet [Fri, 12 Sep 2014 16:00:15 +0000 (18:00 +0200)]
drm/nouveau/fb/ram: Support strided regs

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nv50/fb/ram: Store the number of partitions in the designated fields
Roy Spliet [Fri, 12 Sep 2014 16:00:14 +0000 (18:00 +0200)]
drm/nv50/fb/ram: Store the number of partitions in the designated fields

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nv50/kms: Set VBLANK time in modeset script
Roy Spliet [Fri, 12 Sep 2014 16:00:13 +0000 (18:00 +0200)]
drm/nv50/kms: Set VBLANK time in modeset script

Solves blinking on reclocking memory. The value set is an underestimate, but
with non-reduced vblanking this should give us plenty of time

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios: Add rammap support for version 1.0
Roy Spliet [Fri, 12 Sep 2014 16:00:12 +0000 (18:00 +0200)]
drm/nouveau/bios: Add rammap support for version 1.0

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gf100-/pwr/memx: block host and fifo around reclock
Ben Skeggs [Thu, 11 Sep 2014 13:32:20 +0000 (23:32 +1000)]
drm/gf100-/pwr/memx: block host and fifo around reclock

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pwr/memx: fix command ordering around block/unblock
Ben Skeggs [Thu, 11 Sep 2014 13:04:22 +0000 (23:04 +1000)]
drm/nouveau/pwr/memx: fix command ordering around block/unblock

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pwr/memx: rename fb off/on to block/unblock
Ben Skeggs [Thu, 11 Sep 2014 12:59:13 +0000 (22:59 +1000)]
drm/nouveau/pwr/memx: rename fb off/on to block/unblock

More accurate as to the function of the opcodes.  Not only is FB disabled,
but the host is prevented from touching the GPU.  An upcoming patch for
Kepler will also halt PFIFO (as NVIDIA does).

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nva3/clk: Pause the GPU before reclocking
Roy Spliet [Fri, 29 Aug 2014 10:27:42 +0000 (12:27 +0200)]
drm/nva3/clk: Pause the GPU before reclocking

V2: always call post correctly even if pre fails
V3: move function prototype to nva3.h

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
9 years agodrm/nouveau/gpio: rename g92 class to g94
Emil Velikov [Mon, 8 Sep 2014 19:27:57 +0000 (20:27 +0100)]
drm/nouveau/gpio: rename g92 class to g94

nv92 hardware has only 16 interrupt lines, while nv94 and later
has 32. Accessing 0xe0c{0,4} registers on nv92 can lead to incorrect
PDISP setup. This is a regression introduced with

commit 9d0f5ec9ee0fd5dc5fc1cc2cf559286431e406e3
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Mon May 12 15:22:42 2014 +1000

    gpio: split g92 class from nv50

Reported-by: estece on #nouveau
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gk104-/fb/ram: move fb enable/disable to same place as nvidia
Ben Skeggs [Mon, 8 Sep 2014 05:21:48 +0000 (15:21 +1000)]
drm/gk104-/fb/ram: move fb enable/disable to same place as nvidia

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gk104/fb/ram: twiddle some more bits when reclocking
Ben Skeggs [Wed, 3 Sep 2014 06:26:20 +0000 (16:26 +1000)]
drm/gk104/fb/ram: twiddle some more bits when reclocking

*when* this is done is only a rough approximation of what the binary driver
does.. need to investigate more to see if it matters

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios: parse another large chunk of random memory config data
Ben Skeggs [Wed, 3 Sep 2014 06:25:47 +0000 (16:25 +1000)]
drm/nouveau/bios: parse another large chunk of random memory config data

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gk104-/fb/ram: perform certain steps only when bios data differs
Ben Skeggs [Mon, 8 Sep 2014 04:41:26 +0000 (14:41 +1000)]
drm/gk104-/fb/ram: perform certain steps only when bios data differs

Awful, awful.  But, on the GK106 I have, some upcoming patches show
that this is actually necessary after all.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gk104-/fb/ram: parse ramcfg data for all frequencies up-front
Ben Skeggs [Mon, 8 Sep 2014 03:29:04 +0000 (13:29 +1000)]
drm/gk104-/fb/ram: parse ramcfg data for all frequencies up-front

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gk104-/fb/ram: use parsed timing data in mr routines
Ben Skeggs [Mon, 8 Sep 2014 03:38:02 +0000 (13:38 +1000)]
drm/gk104-/fb/ram: use parsed timing data in mr routines

All the other chipsets should be moved over to this too.  It's not needed
yet for the upcoming commits, so left this step as it'll conflict badly
with Roy's GT21x reclocking work.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios: parse freq ranges and timing id into ramcfg struct
Ben Skeggs [Mon, 8 Sep 2014 02:48:31 +0000 (12:48 +1000)]
drm/nouveau/bios: parse freq ranges and timing id into ramcfg struct

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios: memset dcb struct to zero before parsing
Ben Skeggs [Mon, 8 Sep 2014 00:33:32 +0000 (10:33 +1000)]
drm/nouveau/bios: memset dcb struct to zero before parsing

Fixes type/mask calculation being based on uninitialised data for VGA
outputs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gk104/fb/ram: make use of training data provided by vbios
Ben Skeggs [Wed, 3 Sep 2014 02:40:04 +0000 (12:40 +1000)]
drm/gk104/fb/ram: make use of training data provided by vbios

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios: add support for parsing table at BIT 'M' v2 + 0x09
Ben Skeggs [Mon, 1 Sep 2014 05:42:45 +0000 (15:42 +1000)]
drm/nouveau/bios: add support for parsing table at BIT 'M' v2 + 0x09

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios: add support for parsing table at BIT 'M' v2 + 0x05
Ben Skeggs [Mon, 1 Sep 2014 05:33:14 +0000 (15:33 +1000)]
drm/nouveau/bios: add support for parsing table at BIT 'M' v2 + 0x05

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gk104/fb/ram: fix register for second set of training data
Ben Skeggs [Mon, 1 Sep 2014 01:15:21 +0000 (11:15 +1000)]
drm/gk104/fb/ram: fix register for second set of training data

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gk104/fb/ram: more random magic in fb init
Ben Skeggs [Mon, 1 Sep 2014 00:48:39 +0000 (10:48 +1000)]
drm/gk104/fb/ram: more random magic in fb init

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gk104/fb/ram: skip table entry for mode we're already in
Ben Skeggs [Mon, 1 Sep 2014 00:44:57 +0000 (10:44 +1000)]
drm/gk104/fb/ram: skip table entry for mode we're already in

NVIDIA binary driver appears to, not sure if it's for a good reason, but
grasping at straws for some GDDR5 reclocking issues here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fb/sddr2: Generate MR values
Roy Spliet [Fri, 5 Sep 2014 00:41:46 +0000 (02:41 +0200)]
drm/nouveau/fb/sddr2: Generate MR values

V2: Always disable DLL reset

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fb/sddr3: Expand MR generation
Roy Spliet [Thu, 4 Sep 2014 14:58:54 +0000 (16:58 +0200)]
drm/nouveau/fb/sddr3: Expand MR generation

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nva3/pwr/memx: Match blob's fb access behaviour
Roy Spliet [Thu, 4 Sep 2014 14:58:53 +0000 (16:58 +0200)]
drm/nva3/pwr/memx: Match blob's fb access behaviour

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pwr/memx: Return debugging information
Roy Spliet [Thu, 4 Sep 2014 14:58:52 +0000 (16:58 +0200)]
drm/nouveau/pwr/memx: Return debugging information

Time measured from disabling FB to re-enabling, PPWR_IN reveals status of
heads at the end of script. Helps debug various issues (like flicker).

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pwr/memx: Make FB disable and enable explicit
Roy Spliet [Thu, 4 Sep 2014 14:58:50 +0000 (16:58 +0200)]
drm/nouveau/pwr/memx: Make FB disable and enable explicit

Needs to be done after wait-for-VBLANK, and NVA3 requires register writes
in between.

Rather than hard-coding register writes, just split out fb_disable and
fb_enable.

v2. Squashed "fb/ramnve0: disable fb before reclocking"

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nva3/pwr/memx: Implement "wait for VBLANK"
Roy Spliet [Thu, 4 Sep 2014 14:58:49 +0000 (16:58 +0200)]
drm/nva3/pwr/memx: Implement "wait for VBLANK"

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/therm/nv84+: do not expose non-calibrated internal temp sensor
Martin Peres [Sun, 24 Aug 2014 21:15:11 +0000 (23:15 +0200)]
drm/nouveau/therm/nv84+: do not expose non-calibrated internal temp sensor

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/therm: make sure the temperature settings are sane on nv84+
Martin Peres [Sun, 24 Aug 2014 21:15:10 +0000 (23:15 +0200)]
drm/nouveau/therm: make sure the temperature settings are sane on nv84+

One of my nv92 has a calibrated internal sensor but it displays 0°C
as the default values use sw calibration values to force the temperature
to 0.

Since we cannot read the temperature from the adt7473 present on this board,
let's re-enable the internal reading!

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/subdev: add a pfuse subdev v2
Martin Peres [Mon, 25 Aug 2014 22:26:38 +0000 (00:26 +0200)]
drm/nouveau/subdev: add a pfuse subdev v2

We will use this subdev to disable temperature reading on cards that did not
get a sensor calibration in the factory.

v2:
- rename "nouveau_fuse_rd32" to "gxXXX_fuse_rd32" as adviced by Christian Costa
- fold the code a little as adviced by Emil Velikov

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nva3/clk: Set intermediate core clock on reclocking
Roy Spliet [Thu, 21 Aug 2014 11:45:17 +0000 (13:45 +0200)]
drm/nva3/clk: Set intermediate core clock on reclocking

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nva3/clk: For PLL clocks always make sure the PLL is not in use
Roy Spliet [Thu, 21 Aug 2014 11:45:16 +0000 (13:45 +0200)]
drm/nva3/clk: For PLL clocks always make sure the PLL is not in use

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nva3/clk: Abort when PLL doesn't lock
Roy Spliet [Thu, 21 Aug 2014 11:45:15 +0000 (13:45 +0200)]
drm/nva3/clk: Abort when PLL doesn't lock

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nva3/clk: HOST clock
Roy Spliet [Thu, 21 Aug 2014 11:45:14 +0000 (13:45 +0200)]
drm/nva3/clk: HOST clock

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nva3/clk: Set PLL refclk
Roy Spliet [Thu, 21 Aug 2014 11:45:13 +0000 (13:45 +0200)]
drm/nva3/clk: Set PLL refclk

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nva3/clk: Parse clock control registers more accurately
Roy Spliet [Thu, 21 Aug 2014 11:45:12 +0000 (13:45 +0200)]
drm/nva3/clk: Parse clock control registers more accurately

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau: Fix duplicate definition of NV04_PFB_BOOT_0_*
Pierre Moreau [Mon, 18 Aug 2014 20:32:53 +0000 (22:32 +0200)]
drm/nouveau: Fix duplicate definition of NV04_PFB_BOOT_0_*

Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau: Display Nouveau boot options at launch
Pierre Moreau [Mon, 18 Aug 2014 20:43:24 +0000 (22:43 +0200)]
drm/nouveau: Display Nouveau boot options at launch

It can help to remove any ambiguity about which options were passed to Nouveau,
especially in case the user had some options set in /etc/modprobe.d/*.conf that
he forgot about, as they won't appear in a dmesg.

Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pwr: wait for scrubbers to finish before uploading new ucode
Ben Skeggs [Mon, 18 Aug 2014 02:41:57 +0000 (12:41 +1000)]
drm/nouveau/pwr: wait for scrubbers to finish before uploading new ucode

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pwr/fuc: make $r1-$r10 registers callee-saved in kernel.fuc
Martin Peres [Sun, 17 Aug 2014 15:33:14 +0000 (17:33 +0200)]
drm/nouveau/pwr/fuc: make $r1-$r10 registers callee-saved in kernel.fuc

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pwr/fuc: add ld/st macros
Martin Peres [Sun, 17 Aug 2014 15:33:13 +0000 (17:33 +0200)]
drm/nouveau/pwr/fuc: add ld/st macros

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pwr: add helpers for delay-to-ticks and ticks-to-delay
Martin Peres [Sun, 17 Aug 2014 15:33:12 +0000 (17:33 +0200)]
drm/nouveau/pwr: add helpers for delay-to-ticks and ticks-to-delay

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pwr: add some arith functions (mul32_32_64, subu64 and addu64)
Martin Peres [Sun, 17 Aug 2014 15:33:11 +0000 (17:33 +0200)]
drm/nouveau/pwr: add some arith functions (mul32_32_64, subu64 and addu64)

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pwr: fix the timers implementation with concurent processes
Martin Peres [Sun, 17 Aug 2014 15:33:10 +0000 (17:33 +0200)]
drm/nouveau/pwr: fix the timers implementation with concurent processes

The problem with the current implementation is that adding a timer improperly
checked which process would time up first by not taking into account how much
time elapsed since their timer got scheduled. Rework the re-scheduling
decision t fix this.

The catch with this fix is that we are limited to scheduling timers of up to
2^31 ticks to avoid any potential overflow. Since we are unlikely to need to
wait for more than a second, this won't be a problem :)

Another possible fix would be to decrement the timeouts of all processes but
it would duplicate a lot of code and dealing with edge cases wasn't pretty
last time I checked.

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/ppwr: enable ppwr on gm107
Martin Peres [Sun, 17 Aug 2014 15:33:09 +0000 (17:33 +0200)]
drm/nouveau/ppwr: enable ppwr on gm107

For some reason, it is now required to wait a 20 µs after the 0x200 reset of
the engine.

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gm107/therm: add PWM fan support v2
Martin Peres [Sun, 17 Aug 2014 15:33:08 +0000 (17:33 +0200)]
drm/gm107/therm: add PWM fan support v2

v2: change the copyright ownership from "Nouveau Community" to myself, as per
Illia's recommendation.

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/therm/fan: do not use the pwm mode when the vbios tells us to use toggle
Martin Peres [Sun, 17 Aug 2014 15:33:07 +0000 (17:33 +0200)]
drm/nouveau/therm/fan: do not use the pwm mode when the vbios tells us to use toggle

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bios/fan: add support for maxwell's fan management table v2
Martin Peres [Sun, 17 Aug 2014 15:33:06 +0000 (17:33 +0200)]
drm/nouveau/bios/fan: add support for maxwell's fan management table v2

Re-use the therm-exported fan structure with only two minor modifications:
- pwm_freq: u16 -> u32;
- add fan_type (toggle or PWM)

v2:
- Do not memset the table to 0 as it erases the pre-set default values

Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/ltc: allocate tagram from memory that spans all partitions
Ben Skeggs [Tue, 12 Aug 2014 05:16:16 +0000 (15:16 +1000)]
drm/nouveau/ltc: allocate tagram from memory that spans all partitions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/core/mm: allow allocation to be confined to a specific slice of heap
Ben Skeggs [Tue, 12 Aug 2014 04:30:52 +0000 (14:30 +1000)]
drm/nouveau/core/mm: allow allocation to be confined to a specific slice of heap

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/core/mm: fill in holes with "allocated" nodes
Ben Skeggs [Tue, 12 Aug 2014 03:54:37 +0000 (13:54 +1000)]
drm/nouveau/core/mm: fill in holes with "allocated" nodes

The allocation algorithm doesn't expect there to be holes in the mm, which
causes its alignment/cutoff calculations to choke (and go negative) when
encountering the last chunk of a block before a hole.

The least expensive solution is to simply fill in any holes with nodes
that are pre-marked as being allocated.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/core/mm: dump mm when trying to tear one down that still has allocations
Ben Skeggs [Tue, 12 Aug 2014 04:48:28 +0000 (14:48 +1000)]
drm/nouveau/core/mm: dump mm when trying to tear one down that still has allocations

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/core/mm: modify test for if building a mm with holes in it
Ben Skeggs [Tue, 12 Aug 2014 03:40:42 +0000 (13:40 +1000)]
drm/nouveau/core/mm: modify test for if building a mm with holes in it

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/core/mm: make it clearer what (type == 0) means
Ben Skeggs [Tue, 12 Aug 2014 01:16:58 +0000 (11:16 +1000)]
drm/nouveau/core/mm: make it clearer what (type == 0) means

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/gf100/ltc: translate interrupt status into more meaningful names
Ben Skeggs [Tue, 12 Aug 2014 00:22:31 +0000 (10:22 +1000)]
drm/gf100/ltc: translate interrupt status into more meaningful names

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/ltc: drop workaround for an interrupt storm that no longer happens
Ben Skeggs [Tue, 12 Aug 2014 00:01:13 +0000 (10:01 +1000)]
drm/nouveau/ltc: drop workaround for an interrupt storm that no longer happens

This is really the wrong thing to do, but at the time it was our only
option to prevent worse issues.

We no longer cause quite so much anger from LTC, so it's not needed.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nv50-/disp: add support for completion events
Ben Skeggs [Mon, 11 Aug 2014 04:38:10 +0000 (14:38 +1000)]
drm/nv50-/disp: add support for completion events

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/core: pass related object into notify constructor
Ben Skeggs [Mon, 11 Aug 2014 03:56:56 +0000 (13:56 +1000)]
drm/nouveau/core: pass related object into notify constructor

The event source types/index might need to be derived from it.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/bar: ioremap only the areas that we're actually using
Ben Skeggs [Mon, 11 Aug 2014 02:23:23 +0000 (12:23 +1000)]
drm/nouveau/bar: ioremap only the areas that we're actually using

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agoMerge tag 'topic/core-stuff-2014-09-15' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Mon, 15 Sep 2014 09:55:55 +0000 (19:55 +1000)]
Merge tag 'topic/core-stuff-2014-09-15' of git://anongit.freedesktop.org/drm-intel into drm-next

Here's the updated topic/core-stuff pull request with the two patches
already merged into drm-fixes dropped.

* tag 'topic/core-stuff-2014-09-15' of git://anongit.freedesktop.org/drm-intel:
  drm: Drop modeset locking from crtc init function
  drm/i915/hdmi: Enable pipe pixel replication for SD interlaced modes
  drm/edid: Reduce horizontal timings for pixel replicated modes
  drm: Include task->name and master status in debugfs clients info
  drm/gem: Fix kerneldoc typo
  drm: use c99 initializers in structures
  drm: fix drm_modeset_lock.h kernel-doc notation

9 years agodrm: Drop modeset locking from crtc init function
Daniel Vetter [Mon, 8 Sep 2014 07:02:49 +0000 (09:02 +0200)]
drm: Drop modeset locking from crtc init function

At driver init no one can access modeset objects and we're
single-threaded. So locking is just cargo-culting here. Worse, with
the new ww mutexes and ww mutex slowpath debugging the mutex_lock
might actually fail, and we don't have the full-blown ww recovery
dance.

Which then leads to fireworks when we try to unlock the not-locked
crtc lock.

An audit of all the functions called from here shows that none of them
contain locking checks, so there's also no reason to keep the locking
around just for consistency of caller contexts. Besides that I have
the rule (at least in i915) that such places where we take locks just
to simplify locking checks and not for correctness always require a
comment.

This regression was introduced in

commit 51fd371bbaf94018a1223b4e2cf20b9880fd92d4
Author: Rob Clark <robdclark@gmail.com>
Date:   Tue Nov 19 12:10:12 2013 -0500

    drm: convert crtc and connection_mutex to ww_mutex (v5)

v2: Don't drop the lock_init call, spotted by the 0day builder.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=83341
Cc: Rob Clark <robdclark@gmail.com>
Cc: thellstrom@vmware.com
Cc: maarten.lankhorst@canonical.com
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agodrm/i915/hdmi: Enable pipe pixel replication for SD interlaced modes
Clint Taylor [Wed, 3 Sep 2014 00:03:36 +0000 (17:03 -0700)]
drm/i915/hdmi: Enable pipe pixel replication for SD interlaced modes

Enable 2x pixel replication for modes the mode flag DBLCLK to double
horizontal timings and pixel clock across TMDS.

Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/edid: Reduce horizontal timings for pixel replicated modes
Clint Taylor [Wed, 3 Sep 2014 00:03:35 +0000 (17:03 -0700)]
drm/edid: Reduce horizontal timings for pixel replicated modes

Pixel replicated modes should be non-2x horizontal timings and pixel
replicated by the HW across the HDMI cable at 2X pixel clock. Current
horizontal resolution of 1440 does not allow pixel duplication to
occur and scaling artifacts occur on the TV. HDMI certification
7-26 currently fails for all pixel replicated modes. This change will
allow HDMI certification with 480i/576i modes once pixel replication
is turned on.

Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm: Include task->name and master status in debugfs clients info
Chris Wilson [Tue, 2 Sep 2014 07:03:22 +0000 (08:03 +0100)]
drm: Include task->name and master status in debugfs clients info

Showing who is the current master is useful for trying to decypher
errors when trying to acquire master (e.g. a race with X taking over
from plymouth). By including the process name as well as the pid
simplifies the task of grabbing enough information remotely at the point
of error.

v2: Add the command column header and flesh out a couple of comments.
(David Herrmann)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/gem: Fix kerneldoc typo
Laurent Pinchart [Thu, 28 Aug 2014 12:34:36 +0000 (14:34 +0200)]
drm/gem: Fix kerneldoc typo

The drm_gem_private_object_init function is called drm_gem_object_init
in its kerneldoc. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/ast: Cleanup analog init code path
Benjamin Herrenschmidt [Thu, 4 Sep 2014 07:45:26 +0000 (17:45 +1000)]
drm/ast: Cleanup analog init code path

Move the MMIO mangling to a separate routine and actually
disable the DVO output when using pure analog.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm/ast: Don't assume DVO enabled means SIL164 on uninitialized chips
Benjamin Herrenschmidt [Thu, 4 Sep 2014 07:50:21 +0000 (17:50 +1000)]
drm/ast: Don't assume DVO enabled means SIL164 on uninitialized chips

It looks like the AST2400 comes up with the DVO enable bit set,
which causes us to incorrectly assume we have a SIL164 regardless
of the value of the scratch registers setup by the BMC firmware.

So let's limit that test to the case where the chip has already
been setup by a BIOS.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm/ast: Properly initialize P2A base before using it in ast_init_3rdtx()
Benjamin Herrenschmidt [Thu, 4 Sep 2014 07:50:17 +0000 (17:50 +1000)]
drm/ast: Properly initialize P2A base before using it in ast_init_3rdtx()

If the P2A has been used to target other SOC registers before that
call, we're going to hit the wrong place so make sure we set the
base address up properly before using it.

(P2A stands for PCIe to AHB bridge and is the bride that allows
accessing the AST's internal AHB bus using a relocatable 64k
window in the second half of the PCIe MMIO BAR)

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm/ast: POST chip at probe time if VGA not enabled
Benjamin Herrenschmidt [Thu, 4 Sep 2014 07:50:11 +0000 (17:50 +1000)]
drm/ast: POST chip at probe time if VGA not enabled

We need to do it on machines without a BIOS such as POWER8. Also
for detection to work without triggering PCIe errors, we need
to enable VGA early on, inside ast_detect_chip().

While touching those files, replace a few hard coded register
numbers with the corresponding symbolic constant.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm/ast: Try to use MMIO registers when PIO isn't supported
Benjamin Herrenschmidt [Thu, 4 Sep 2014 07:44:18 +0000 (17:44 +1000)]
drm/ast: Try to use MMIO registers when PIO isn't supported

If the PIO resources haven't been assigned, then we have no choice
but try to use the MMIO version. This is the case for example on
POWER8 which doesn't support PIO at all.

Chips rev 0x20 or later have MMIO decoding enabled by default.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agoLinux 3.17-rc5
Linus Torvalds [Mon, 15 Sep 2014 00:50:12 +0000 (17:50 -0700)]
Linux 3.17-rc5

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Mon, 15 Sep 2014 00:37:36 +0000 (17:37 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
 "double iput() on failure exit in lustre, racy removal of spliced
  dentries from ->s_anon in __d_materialise_dentry() plus a bunch of
  assorted RCU pathwalk fixes"

The RCU pathwalk fixes end up fixing a couple of cases where we
incorrectly dropped out of RCU walking, due to incorrect initialization
and testing of the sequence locks in some corner cases.  Since dropping
out of RCU walk mode forces the slow locked accesses, those corner cases
slowed down quite dramatically.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  be careful with nd->inode in path_init() and follow_dotdot_rcu()
  don't bugger nd->seq on set_root_rcu() from follow_dotdot_rcu()
  fix bogus read_seqretry() checks introduced in b37199e
  move the call of __d_drop(anon) into __d_materialise_unique(dentry, anon)
  [fix] lustre: d_make_root() does iput() on dentry allocation failure

9 years agovfs: avoid non-forwarding large load after small store in path lookup
Linus Torvalds [Mon, 15 Sep 2014 00:28:32 +0000 (17:28 -0700)]
vfs: avoid non-forwarding large load after small store in path lookup

The performance regression that Josef Bacik reported in the pathname
lookup (see commit 99d263d4c5b2 "vfs: fix bad hashing of dentries") made
me look at performance stability of the dcache code, just to verify that
the problem was actually fixed.  That turned up a few other problems in
this area.

There are a few cases where we exit RCU lookup mode and go to the slow
serializing case when we shouldn't, Al has fixed those and they'll come
in with the next VFS pull.

But my performance verification also shows that link_path_walk() turns
out to have a very unfortunate 32-bit store of the length and hash of
the name we look up, followed by a 64-bit read of the combined hash_len
field.  That screws up the processor store to load forwarding, causing
an unnecessary hickup in this critical routine.

It's caused by the ugly calling convention for the "hash_name()"
function, and easily fixed by just making hash_name() fill in the whole
'struct qstr' rather than passing it a pointer to just the hash value.

With that, the profile for this function looks much smoother.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoMerge branch 'parisc-3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Sun, 14 Sep 2014 19:28:08 +0000 (12:28 -0700)]
Merge branch 'parisc-3.17-1' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc updates from Helge Deller:
 "The most important patch is a new Light Weigth Syscall (LWS) for 8,
  16, 32 and 64 bit atomic CAS operations which is required in order to
  be able to implement the atomic gcc builtins on our platform.

  Other than that, we wire up the seccomp, getrandom and memfd_create
  syscalls, fixes a minor off-by-one bug and a wrong printk string"

* 'parisc-3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Implement new LWS CAS supporting 64 bit operations.
  parisc: Wire up seccomp, getrandom and memfd_create syscalls
  parisc: dino: fix %d confusingly prefixed with 0x in format string
  parisc: sys_hpux: NUL terminator is one past the end

9 years agobe careful with nd->inode in path_init() and follow_dotdot_rcu()
Al Viro [Sun, 14 Sep 2014 01:59:43 +0000 (21:59 -0400)]
be careful with nd->inode in path_init() and follow_dotdot_rcu()

in the former we simply check if dentry is still valid after picking
its ->d_inode; in the latter we fetch ->d_inode in the same places
where we fetch dentry and its ->d_seq, under the same checks.

Cc: stable@vger.kernel.org # 2.6.38+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agodon't bugger nd->seq on set_root_rcu() from follow_dotdot_rcu()
Al Viro [Sun, 14 Sep 2014 01:55:46 +0000 (21:55 -0400)]
don't bugger nd->seq on set_root_rcu() from follow_dotdot_rcu()

return the value instead, and have path_init() do the assignment.  Broken by
"vfs: Fix absolute RCU path walk failures due to uninitialized seq number",
which was Cc-stable with 2.6.38+ as destination.  This one should go where
it went.

To avoid dummy value returned in case when root is already set (it would do
no harm, actually, since the only caller that doesn't ignore the return value
is guaranteed to have nd->root *not* set, but it's more obvious that way),
lift the check into callers.  And do the same to set_root(), to keep them
in sync.

Cc: stable@vger.kernel.org # 2.6.38+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoMerge tag 'ntb-3.17' of git://github.com/jonmason/ntb
Linus Torvalds [Sun, 14 Sep 2014 17:54:12 +0000 (10:54 -0700)]
Merge tag 'ntb-3.17' of git://github.com/jonmason/ntb

Pull ntb driver bugfixes from Jon Mason:
 "NTB driver fixes for queue spread and buffer alignment.  Also, update
  to MAINTAINERS to reflect new e-mail address"

* tag 'ntb-3.17' of git://github.com/jonmason/ntb:
  ntb: Add alignment check to meet hardware requirement
  MAINTAINERS: update NTB info
  NTB: correct the spread of queues over mw's

9 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Sep 2014 17:37:10 +0000 (10:37 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull ARM irq chip fixes from Thomas Gleixner:
 "Another pile of ARM specific irq chip fixlets:

   - off by one bugs in the crossbar driver
   - missing annotations
   - a bunch of "make it compile" updates

  I pulled the lot today from Jason, but it has been in -next for at
  least a week"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: gic-v3: Declare rdist as __percpu pointer to __iomem pointer
  irqchip: gic: Make gic_default_routable_irq_domain_ops static
  irqchip: exynos-combiner: Fix compilation error on ARM64
  irqchip: crossbar: Off by one bugs in init
  irqchip: gic-v3: Tag all low level accessors __maybe_unused
  irqchip: gic-v3: Only define gic_peek_irq() when building SMP

9 years agoMerge tag 'irqchip-urgent-3.17' of git://git.infradead.org/users/jcooper/linux into...
Thomas Gleixner [Sun, 14 Sep 2014 13:19:19 +0000 (15:19 +0200)]
Merge tag 'irqchip-urgent-3.17' of git://git.infradead.org/users/jcooper/linux into irq/urgent

irqchip fixes for v3.17 from Jason Cooper

 - GIC/GICV3: Various fixlets
 - crossbar: Fix off-by-one bug
 - exynos-combiner: Fix arm64 build error