UBUNTU: Start new release

Ignore: yes
aufs: bugfix, stop calling security_mmap_file() again

Actually this commit is a revival of
	a1d9363 2012-06-08 aufs: for 3.5-rcN, security_mmap_file()
That commit was reverted after a discussion. For details, see these.
	6608a07 2012-07-29 aufs: aufs_mmap() calls security_mmap_file() directly
	66ecc70 2012-07-24 Revert "aufs: cosmetics for aufs_mmap()"
	7573c5b 2012-07-24 Revert "aufs: for 3.5-rcN, new au_security_file_mmap() 1/2"
	c3a3e02 2012-07-24 Revert "aufs: for 3.5-rcN, call au_security_file_mmap() 2/2"
	ad02614 2012-06-13 aufs: for 3.5-rcN, call au_security_file_mmap() 2/2
	aa29a06 2012-06-13 aufs: for 3.5-rcN, new au_security_file_mmap() 1/2
	b028c62 2012-06-08 aufs: cosmetics for aufs_mmap()

The real problem is reported and I decided to stop calling
security_mmap_file() for the branch-fs file from aufs_mmap() again.

See: http://www.mail-archive.com/aufs-users@lists.sourceforge.net/msg04609.html
Reported-by: Matthew Riley <mdriley@gmail.com>
Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
BugLink: http://bugs.launchpad.net/bugs/1371316
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
ipvs: fix ipv6 hook registration for local replies

BugLink: http://bugs.launchpad.net/bugs/1349768

commit fc604767613b6d2036cdc35b660bc39451040a47
("ipvs: changes for local real server") from 2.6.37
introduced DNAT support to local real server but the
IPv6 LOCAL_OUT handler ip_vs_local_reply6() is
registered incorrectly as IPv4 hook causing any outgoing
IPv4 traffic to be dropped depending on the IP header values.

Chris tracked down the problem to CONFIG_IP_VS_IPV6=y
Bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1349768

Reported-by: Chris J Arges <chris.j.arges@canonical.com>
Tested-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
(cherry picked from commit eb90b0c734ad793d5f5bf230a9e9a4dcc48df8aa)
Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Revert "UBUNTU: SAUCE: scsi: hyper-v storsvc switch up to SPC-3"

BugLink: http://bugs.launchpad.net/bugs/1354397

This reverts commit 1cbbe45e891a262e95f7d0c44c23e6d4f85e936e.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Drivers: add blist flags

BugLink: http://bugs.launchpad.net/bugs/1354397

Add blist flags to permit the reading of the VPD pages even when
the target may claim SPC-2 compliance. MSFT targets currently
claim SPC-2 compliance while they implement post SPC-2 features.
With this patch we can correctly handle WRITE_SAME_16 issues.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>

(cherry picked from commit f3cfabce7a2e92564d380de3aad4b43901fb7ae6)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
sd: fix a bug in deriving the FLUSH_TIMEOUT from the basic I/O timeout

BugLink: http://bugs.launchpad.net/bugs/1354397

Commit ID: 7e660100d85af860e7ad763202fff717adcdaacd added code to derive the
FLUSH_TIMEOUT from the basic I/O timeout. However, this patch did not use the
basic I/O timeout of the device. Fix this bug.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>

(backported from commit 26b9fd8b3452dcf0a8862e307ee23f442f63fb51)
Conflicts:
	drivers/scsi/sd.c
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915/bdw: Add 42ms delay for IPS disable

BugLink: http://bugs.launchpad.net/bugs/1374389

This is a requirement added to the spec. This patch will prevent
persistent corruption on the display.

v2: Make the wait before the vblank wait. (Art)
Try to finish early by polling the register
s/present/prevent (Chris)

Cc: Art Runyan <arthur.j.runyan@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
[danvet: Upgrade debug output to ERROR.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

(cherry picked from commit 23d0b13036d14257ae4d226209cd7845f25af8e0)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915: add null render states for gen6, gen7 and gen8

BugLink: http://bugs.launchpad.net/bugs/1374389

These are generated with intel-gpu-tools/tools/null_state_gen

v2: Don't use header file for states (Daniel Vetter)

v3: Proper URB state size for gen8/GT3 (Damien Lespiau)

Tested-by: Kristen Carlson Accardi <kristen@linux.intel.com> (v1)
Tested-by: Oscar Mateo <oscar.mateo@intel.com> (v2)
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 229b0489aa75a8c51d2f2e124329d3ac326f326d)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915/bdw: 3D_CHICKEN3 has write mask bits

BugLink: http://bugs.launchpad.net/bugs/1374389

The workaround to limit SDE poly depth FIFO to 2 is not applied because
3D Chicken-3 mask bit is not set.

WaLimitSizeOfSDEPolyFifo is only for BDW-A and could be removed.

Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit b3f9ad93b7621364ed51f9c37b9cf9abc9855991)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915/bdw: Disable idle DOP clock gating

BugLink: http://bugs.launchpad.net/bugs/1374389

It seems we need this at least for the current platforms we have, but
probably not later. In any event, it should cause too much harm as we do
the same thing on several other platforms.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 242a4018cc7902fbdaf213314db2bc622f5c579d)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915: call lpt_init_clock_gating on BDW too

BugLink: http://bugs.launchpad.net/bugs/1374389

Because BDW has WPT, which is equivalent to LPT. This is just like the
CPT/PPT case.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 89d6b2b81fdfa57666188d63dc970f8f14efed71)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915: shuffle panel code

BugLink: http://bugs.launchpad.net/bugs/1374389

Somehow a few functions have been dropped in the middle of backlight
code. Move them around. No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 525997e00bd32c3e25d5f77c26703f76c498f424)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915: extract backlight minimum brightness from VBT

BugLink: http://bugs.launchpad.net/bugs/1374389

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 1de6068eb755cf8f87b985277fc396903d6bccd2)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915: respect the VBT minimum backlight brightness

BugLink: http://bugs.launchpad.net/bugs/1374389

Historically we've exposed the full backlight PWM duty cycle range to
the userspace, in the name of "mechanism, not policy". However, it turns
out there are both panels and board designs where there is a minimum
duty cycle that is required for proper operation. The minimum duty cycle
is available in the VBT.

The backlight class sysfs interface does not make any promises to the
userspace about the physical meaning of the range
0..max_brightness. Specifically there is no guarantee that 0 means off;
indeed for acpi_backlight 0 usually is not off, but the minimum
acceptable value.

Respect the minimum backlight, and expose the range acceptable to the
hardware as 0..max_brightness to the userspace via the backlight class
device; 0 means the minimum acceptable enabled value. To switch off the
backlight, the user must disable the encoder.

As a side effect, make the backlight class device max brightness and
physical PWM modulation frequency (i.e. max duty cycle)
independent. This allows a follow-up patch to virtualize the max value
exposed to the userspace.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[danvet: s/BUG_ON/WARN_ON/]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

(cherry picked from commit 6dda730e55f412a6dfb181cae6784822ba463847)

Conflicts:
	ubuntu/i915/intel_panel.c
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915/bdw: Apply workarounds in render ring init function

BugLink: http://bugs.launchpad.net/bugs/1374389

For BDW workarounds are currently initialized in init_clock_gating() but
they are lost during reset, suspend/resume etc; this patch moves the WAs
that are part of register state context to render ring init fn otherwise
default context ends up with incorrect values as they don't get initialized
until init_clock_gating fn.

v2: Add workarounds to golden render state
This method has its own issues, first of all this is different for
each gen and it is generated using a tool so adding new workaround
and mainitaining them across gens is not a straightforward process.

v3: Use LRIs to emit these workarounds (Ville)
Instead of modifying the golden render state the same LRIs are
emitted from within the driver.

v4: Use abstract name when exporting gen specific routines (Chris)

For: VIZ-4092
Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 86d7f23842f1bce3ab5e8c8d0c676112bbc4c99b)

Conflicts:
	ubuntu/i915/i915_gem_context.c
	ubuntu/i915/intel_ringbuffer.c
	ubuntu/i915/intel_ringbuffer.h
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915/bdw: Cleanup pre prod workarounds

BugLink: http://bugs.launchpad.net/bugs/1374389

as these have been fixed in production hw and hurt performance
if applied.

v2: adjust requested ring space (Ville)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83482
Tested-by: zhoujian <jianx.zhou@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915: Replace hardcoded cacheline size with macro

BugLink: http://bugs.launchpad.net/bugs/1374389

For readibility and guess at the meaning behind the constants.

v2: Claim only the meagerest connections with reality.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 18393f6322ce523efa767e7ed9bd64fe0645e458)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915: Refactor Broadwell PIPE_CONTROL emission into a helper.

BugLink: http://bugs.launchpad.net/bugs/1374389

We'll want to reuse this for a workaround.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[danvet: Rmove now unused int.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

(cherry picked from commit 884ceacee308f0e4616d0c933518af2639f7b1d8)

Conflicts:
	ubuntu/i915/intel_ringbuffer.c
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915: Add the WaCsStallBeforeStateCacheInvalidate:bdw workaround.

BugLink: http://bugs.launchpad.net/bugs/1374389

On Broadwell, any PIPE_CONTROL with the "State Cache Invalidate" bit set
must be preceded by a PIPE_CONTROL with the "CS Stall" bit set.

Documented on the BSpec 3D workarounds page.

Reviewed-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
[vsyrjala: add chv w/a note too]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 02c9f7e3cfe76a7f54ef03438c36aade86cc1c8b)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drm/i915/bdw: Remove BDW preproduction W/As until C stepping.

BugLink: http://bugs.launchpad.net/bugs/1374389

Let's clean this a bit

v2: Rebase after other Mika's patch that removed some BDW production workarounds.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>