]> Git Repo - linux.git/log
linux.git
8 years agodt-bindings: msm/mdp4: Create a separate binding doc for MDP4
Archit Taneja [Mon, 13 Jun 2016 14:07:37 +0000 (19:37 +0530)]
dt-bindings: msm/mdp4: Create a separate binding doc for MDP4

MDP4 and MDP5 vary a bit in terms of device hierarchy and the properties
they require. Rename the binding doc to mdp4.txt and remove MDP5 specific
pieces. A separate document will be created for MDP5

Acked-by: Rob Herring <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/dsi: Don't get DSI index from DT
Archit Taneja [Thu, 23 Jun 2016 09:56:04 +0000 (15:26 +0530)]
drm/msm/dsi: Don't get DSI index from DT

The DSI host and PHY driver currently expects the DT bindings to provide
custom properties "qcom,dsi-host-index" and "qcom,dsi-phy-index" so that
the driver can identify which DSI instance it is.

The binding isn't acceptable, but the driver still needs to figure out
what its instance id. This is now done by storing the mmio starting
addresses for each DSI instance in every SoC version in the driver. The
driver then identifies the index number by trying to match the stored
address with comparing the resource start address we get from DT.

We don't have compatible strings for DSI PHY on each SoC, but only the
DSI PHY type. We only support one SoC version for each PHY type, so we
get away doing the same thing above for the PHY driver. We can revisit
this when we support two SoCs with the same DSI PHY.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp5: Update compatible strings for MDSS/MDP5
Archit Taneja [Mon, 30 May 2016 11:32:00 +0000 (17:02 +0530)]
drm/msm/mdp5: Update compatible strings for MDSS/MDP5

Introduce new compatible strings for the top level MDSS wrapper device,
and the MDP5 device.

Previously, the "qcom,mdp5" and "qcom,mdss_mdp" compatible strings
were used to match the top level platform_device (which was also tied
to the top level drm_device struct). Now, these strings are used
to match the MDP5 platform device.

Use "qcom,mdss" as the compatible string for top level MDSS device.
This is now used to match the top level platform_device (which is
tied to the drm_device struct).

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm: Drop the gpu binding
Archit Taneja [Thu, 19 May 2016 08:03:52 +0000 (13:33 +0530)]
drm/msm: Drop the gpu binding

The driver currently identifies the GPU components it needs by parsing
a phandle list from the 'gpus' DT property.

This isn't the right binding to go with. So, for now, just search all
device nodes and find the gpu node we need by parsing a list of
compatible strings.

Once we know how to link the kms and gpu drivers, we'll drop this method
and use the correct binding.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm: Add components for MDP5
Archit Taneja [Mon, 6 Jun 2016 08:15:34 +0000 (13:45 +0530)]
drm/msm: Add components for MDP5

For MDP5 based platforms, the master device isn't the MDP5 platform
device, but the top level MDSS device, which is a parent to MDP5 and
interface (DSI, HDMI, eDP etc) devices.

In order to add components on MDP5 platforms, we first need to populate
the MDSS children, locate the MDP5 child, and then parse its ports to
get the display interfaces.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm: Add display components by parsing MDP ports
Archit Taneja [Thu, 19 May 2016 05:08:39 +0000 (10:38 +0530)]
drm/msm: Add display components by parsing MDP ports

The kms driver currently identifies all the mdss components it needs by
parsing a phandle list from the 'connectors' DT property.

Instead of this, describe a list of ports that the MDP hardware provides
to the external world. These ports are linked to external encoder
interfaces such as DSI, HDMI. These are also the subcomponent devices
that we need add. This description of ports complies with the generic
graph bindings.

The LVDS port is a special case since it is a part of MDP4 itself, and
its output connects directly to the LVDS panel. In this case, we don't
try to add it as a component.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm: Create separate funcs for adding display/gpu components
Archit Taneja [Thu, 19 May 2016 05:03:57 +0000 (10:33 +0530)]
drm/msm: Create separate funcs for adding display/gpu components

Simplifies some of the code that we'll add later.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp5: Add missing mdp5_enable/disable calls
Archit Taneja [Wed, 15 Jun 2016 10:18:15 +0000 (15:48 +0530)]
drm/msm/mdp5: Add missing mdp5_enable/disable calls

Since runtime PM isn't implemented yet, we need to call
mdp5_enable/disable in a few more places. These would later be
replaced by runtime PM get/put calls.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm: Call pm_runtime_enable/disable for newly created devices
Archit Taneja [Wed, 15 Jun 2016 12:34:31 +0000 (18:04 +0530)]
drm/msm: Call pm_runtime_enable/disable for newly created devices

With the new device hierarchy for MDP5, we need to enable runtime PM
for both the toplevel MDSS device and the MDP5 device itself. Enable
runtime PM for the new devices.

Since MDP4 and MDP5 now have different places where runtime PM is
enabled, remove the previous pm_runtime_enable/disable calls, and
squash them in the respective kms drivers.

The new device hierarchy (as expressed in the DT bindings) has the GDSC
tied only to the MDSS wrapper device. This GDSC needs to be enabled for
accessing any register in the MDSS sub-blocks. Once every driver is
runtime adapted, the GDSC will be enabled when any sub-block device
calls runtime_get because of the parent-child relationship with MDSS.

Until then, we call pm_runtime_get_sync() once for the MDSS device to
ensure the GDSC is never disabled. This will be removed once all the
drivers are runtime PM adapted.

The error handling paths become a bit tricky when we call these runtime
PM funcs. There doesn't seem to be any helper that checks if runtime PM
is enabled already. Add bool variables in mdp4_kms/mdp5_kms structs to
check if the driver had managed to call pm_runtime_enable before bailing
out.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp5: Update the register offsets of MDP5 sub-blocks
Archit Taneja [Mon, 9 May 2016 06:44:49 +0000 (12:14 +0530)]
drm/msm/mdp5: Update the register offsets of MDP5 sub-blocks

The MDP5 sub-block register offsets are relative to the top level
MDSS register address.

Now that we have the start of MDP5 register address space, provide
the offsets relative to that. This involves subtracting the offsets
with 0x1000 or 0x100 depending on the MDP5 version.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp5: Use updated MDP5 register names
Archit Taneja [Tue, 10 May 2016 05:35:58 +0000 (11:05 +0530)]
drm/msm/mdp5: Use updated MDP5 register names

Since MDSS registers were stuffed within the the MDP5 register
space, we had an __offset_MDP() macro to identify the offset
between the start of MDSS and MDP5 address spaces. This offset
macro expected a MDP index argument, which didn't make much
sense since we don't have multiple MDPs.

The offset is no longer needed now that we have devices for the 2
different register address spaces. Also, remove the "REG_MDP5_MDP_"
prefix to "REG_MDP5_".

Update the generated headers in mdp5.xml.h

We generally update headers as a separate patch, but we need to
do these together to prevent breaking build.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp5: Remove old kms init/destroy funcs
Archit Taneja [Tue, 14 Jun 2016 12:54:54 +0000 (18:24 +0530)]
drm/msm/mdp5: Remove old kms init/destroy funcs

With the new kms_init/destroy funcs in place for MDP5, we can get rid of
the old kms funcs. Some members of the mdp5_kms struct also become
redundant, so we remove those too.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp5: Use the new hierarchy and drop old irq management
Archit Taneja [Sun, 8 May 2016 16:06:28 +0000 (21:36 +0530)]
drm/msm/mdp5: Use the new hierarchy and drop old irq management

Call msm_mdss_init in msm_drv to set up top level registers/irq line.
Start using the new kms_init2/destroy2 funcs to inititalize MDP5 KMS.

With the MDSS interrupt and irqdomain set up, the old MDP5 irq code
can be dropped.

The mdp5_hw_init kms func now uses the platform device tied to MDP5
instead of the one tied to the drm_device/MDSS.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp5: Prepare new kms_init funcs
Archit Taneja [Tue, 14 Jun 2016 12:53:52 +0000 (18:23 +0530)]
drm/msm/mdp5: Prepare new kms_init funcs

With MDP5 as a new device, we need to do less for MDP when initializing
modeset after all the components are bound.

Create mdp5_kms_init2/destroy2 funcs that inits modeset. These will
eventually replace the older kms_init/destroy funcs.

In the new kms_init2, the platform_device used is the one corresponding
to the new MDP5 platform_device. The new change here is that the irq is
now retrieved using irq_of_parse_and_map(), since MDP5 is a child interrupt
of the MDSS interrupt controller.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp5: Create a separate MDP5 device
Archit Taneja [Mon, 30 May 2016 11:06:50 +0000 (16:36 +0530)]
drm/msm/mdp5: Create a separate MDP5 device

In order to have a tree-like device hierarchy between MDSS and its
sub-blocks (MDP5, DSI, HDMI, eDP etc), we need to create a separate
device/driver for MDP5. Currently, MDP5 and MDSS are squashed
together are are tied to the top level platform_device, which is
also the one used to create drm_device.

The mdp5_kms_init code is split into two parts. The part where device
resources are allocated are associated with the MDP5 driver's probe,
the rest is executed later when we initialize modeset.

With this change, unlike MDP4, the MDP5 platform_device isn't tied to
the top level drm_device anymore. The top level drm_device is now
associated with a platform device that corresponds to MDSS wrapper
hardware.

Create mdp5_init/destroy funcs that will be used by the MDP5 driver
probe/remove. Use the HW_VERSION register in the MDP5 register address
space. Both the MDSS and MDP VERSION registers give out identical
version info.

The older mdp5_kms_init code is left as is for now, this would be removed
later when we have all the pieces to support the new device hierarchy.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp5: Add MDSS top level driver
Archit Taneja [Sat, 7 May 2016 17:41:25 +0000 (23:11 +0530)]
drm/msm/mdp5: Add MDSS top level driver

SoCs that contain MDP5 have a top level wrapper called MDSS that manages
clocks, power and irq for the sub-blocks within it.

Currently, the MDSS portions are stuffed into the MDP5 driver. This makes
it hard to represent the DT bindings in the correct way. We create a top
level MDSS helper that handles these parts. This is essentially moving out
some of the mdp5_kms irq code and MDSS register space and keeping it as a
separate entity. We haven't given any clocks to the top level MDSS yet,
but a AHB clock would be added in the future to access registers.

One thing to note is that the resources allocated by this helper are
tied to the top level platform_device (the one that allocates the
drm_device struct too). This device would be the parent to MDSS
sub-blocks like MDP5, DSI, eDP etc.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm: Get irq number within kms driver itself
Archit Taneja [Wed, 18 May 2016 09:36:03 +0000 (15:06 +0530)]
drm/msm: Get irq number within kms driver itself

The driver gets the irq number using platform_get_irq on the main kms
platform device. This works fine since both MDP4 and MDP5 currently
have a flat device hierarchy. The platform device tied with the
drm_device points to the MDP DT node in both cases.

This won't work when MDP5 supports a tree-like hierarchy. In this
case, the platform device tied to the top level drm_device is the
MDSS DT node, and the irq we need for KMS is the one generated by
MDP5, not MDSS.

Get the irq number from the MDP4/5 kms driver itself. Each driver
can later provide the irq number based on what device hierarchy it
uses.

While we're at it, call drm_irq_install only when we have a valid KMS
driver.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm: Remove unused fields
Archit Taneja [Fri, 6 May 2016 12:47:15 +0000 (18:17 +0530)]
drm/msm: Remove unused fields

These aren't used. Probably left overs when driver was refactored to
support both MDP4 and MDP5.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm: Drop the id_table in platform_driver
Archit Taneja [Thu, 5 May 2016 15:56:34 +0000 (21:26 +0530)]
drm/msm: Drop the id_table in platform_driver

This isn't needed as we only support OF.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodt-bindings: msm/dsi: Some binding doc cleanups
Archit Taneja [Thu, 9 Jun 2016 11:37:25 +0000 (17:07 +0530)]
dt-bindings: msm/dsi: Some binding doc cleanups

Some cleanups:

- Use simpler names for DT nodes in the example
- Use references instead of dumping Document links everywhere

Acked-by: Rob Herring <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodt-bindings: msm/dsi: Add assigned clocks bindings
Archit Taneja [Thu, 9 Jun 2016 10:21:44 +0000 (15:51 +0530)]
dt-bindings: msm/dsi: Add assigned clocks bindings

The PLL in the DSI PHY block generates 2 clock outputs (Byte and Pixel
clocks) that are fed into the Multimedia Clock Controller (MMCC). The MMCC
uses these as source clocks for some of its RCGs to generate clocks that
finally feed to the DSI host controller.

Use the assigned clocks DT bindings to set up the MMCC RCGs that feed to
the DSI host. Use the DSI PHY provided clocks to set up the parents
of these assigned clocks.

Acked-by: Rob Herring <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodt-bindings: msm/dsi: Modify port and PHY bindings
Archit Taneja [Thu, 9 Jun 2016 10:16:24 +0000 (15:46 +0530)]
dt-bindings: msm/dsi: Modify port and PHY bindings

The DSI node now has two ports that describe the connection between the
MDP interface output and the DSI input, and the connection between the DSI
output and the connected panel/bridge. Update the properties and the
example.

Also, use generic PHY bindings instead of the custom one.

Acked-by: Rob Herring <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodt-bindings: msm/dsi: Use standard data lanes binding
Archit Taneja [Thu, 9 Jun 2016 06:21:33 +0000 (11:51 +0530)]
dt-bindings: msm/dsi: Use standard data lanes binding

The "qcom,data-lane-map" binding mentioned in the document is changed to
the more generic "data-lanes" property specified in:

Documentation/devicetree/bindings/media/video-interfaces.txt

The previous binding expressed physical to logical data lane mappings,
the standard "data-lanes" binding uses logical to physical data lane
mappings. Update the docs to reflect this change. The example had the
property incorrectly named as "lanes", update this too.

The MSM DSI DT bindings aren't used anywhere at the moment, so
it's okay to update this property.

Acked-by: Rob Herring <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/dsi: Use a standard DT binding for data lanes
Archit Taneja [Wed, 8 Jun 2016 10:44:19 +0000 (16:14 +0530)]
drm/msm/dsi: Use a standard DT binding for data lanes

A more standard DT binding describing data lanes already exists here:
Documentation/devicetree/bindings/media/video-interfaces.txt

Use this binding instead of "qcom,data-lane-map". One difference
in the standard binding w.r.t to the existing binding is that it
provides a logical to physical mapping instead of the other way
round. Tweak the code to translate the data the way we want it.

The MSM DSI DT bindings aren't used anywhere at the moment, so
it's okay to update this property.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/dsi: Use generic PHY bindings
Archit Taneja [Fri, 29 Apr 2016 12:34:47 +0000 (18:04 +0530)]
drm/msm/dsi: Use generic PHY bindings

The DSI host links to the DSI PHY device using a custom binding. Switch to
the generic PHY bindings. The DSI PHY driver itself doesn't use the common
PHY framework for now.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/dsi: Modify port parsing
Archit Taneja [Wed, 27 Apr 2016 10:06:53 +0000 (15:36 +0530)]
drm/msm/dsi: Modify port parsing

The DSI interface is going to have two ports defined in its device node.
The first port is always going to be the link between the MDP output
and the input to DSI, the second port is going to be the link between
the DSI output and the connected panel/bridge:

 -----           -----           -------
| MDP | ------> | DSI | ------> | Panel |
 -----           -----           -------
        (Port 0)       (Port 1)

Until now, there was only one Port representing the output. Update the
DSI host driver such that it parses Port #1 for a connected device.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodt-bindings: msm/mdp: Fix up clock related bindings
Archit Taneja [Fri, 10 Jun 2016 06:31:58 +0000 (12:01 +0530)]
dt-bindings: msm/mdp: Fix up clock related bindings

Address some issues wiht clock related bindings. It's okay to change these
since these bindings aren't used in any dtsi files until now.

MDP5:
- Don't ask for source clock

MDP4:
- Give a better name for MDP_TV_CLK
- Remove TV_SRC
- Add MDP_AXI_CLK

Acked-by: Rob Herring <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp4: Clean up some MDP4 clocks
Archit Taneja [Fri, 10 Jun 2016 06:25:43 +0000 (11:55 +0530)]
drm/msm/mdp4: Clean up some MDP4 clocks

Fix some issues with MDP4 clocks:

- mdp4_dtv_encoder tries to get "src_clk", which is a RCG(TV_SRC) in
  MSM8960 and APQ8064. This isn't something the driver should access or
  configure. Instead of this, configure the "mdp_clk" (MDP_TV_CLK), a
  branch clock in MMCC that has the TV_SRC as its parent. Setting
  rate/enabling the "mdp_clk" will eventually configure "src_clk", which
  is what we want.
- Rename "mdp_clk" to "tv_clk" because that's slightly less confusing.
- Rename "mdp_axi_clk" to "bus_clk" because that's what we do elsewhere
  too.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm/mdp5: Don't get source of MDP core clock
Archit Taneja [Thu, 9 Jun 2016 11:41:08 +0000 (17:11 +0530)]
drm/msm/mdp5: Don't get source of MDP core clock

The driver expects DT to provide the parent to MDP core clock. The only
operation done to the parent clock is to set a rate. This can be
achieved by setting the rate on the core clock itsef. Don't try to
get the parent clock anymore.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm: Print the correct virtual addresses in map/unmap funcs
Archit Taneja [Mon, 18 Apr 2016 06:56:21 +0000 (12:26 +0530)]
drm/msm: Print the correct virtual addresses in map/unmap funcs

The msm_iommu_map/unmap funcs have debug prints to show the list of
VA:PA mappings. Use the correct variable to print the VAs.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agodrm/msm: Use correct type for physical addresses
Archit Taneja [Sun, 17 Apr 2016 14:58:43 +0000 (20:28 +0530)]
drm/msm: Use correct type for physical addresses

The u32 type used to pass the physical addresses to iommu_map can't
accommodate 64 bit addresses. Move to dma_addr_t to ensure wrong
addresses aren't provided to the IOMMU driver.

Signed-off-by: Archit Taneja <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
8 years agoMerge tag 'drm-vc4-next-2016-07-15' of https://github.com/anholt/linux into drm-next
Dave Airlie [Sat, 16 Jul 2016 01:25:11 +0000 (11:25 +1000)]
Merge tag 'drm-vc4-next-2016-07-15' of https://github.com/anholt/linux into drm-next

This pull request brings in vc4 shader validation for branching,
allowing GLSL shaders with non-unrolled loops.

* tag 'drm-vc4-next-2016-07-15' of https://github.com/anholt/linux:
  drm/vc4: Fix a "the the" typo in a comment.
  drm/vc4: Fix definition of QPU_R_MS_REV_FLAGS
  drm/vc4: Add a getparam to signal support for branches.
  drm/vc4: Add support for branching in shader validation.
  drm/vc4: Add a bitmap of branch targets during shader validation.
  drm/vc4: Move validation's current/max ip into the validation struct.
  drm/vc4: Add a getparam ioctl for getting the V3D identity regs.

8 years agoMerge tag 'drm/panel/for-4.8-rc1' of git://anongit.freedesktop.org/tegra/linux into...
Dave Airlie [Sat, 16 Jul 2016 01:24:29 +0000 (11:24 +1000)]
Merge tag 'drm/panel/for-4.8-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/panel: Changes for v4.8-rc1

This set of changes contains a few cleanups for existing panels as well
as improved handling of certain backlights. In addition there's support
for a few new simple panels.

* tag 'drm/panel/for-4.8-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/panel: simple: Add support for Starry KR122EA0SRA panel
  dt-bindings: Add Starry KR122EA0SRA panel binding
  dt-bindings: Add vendor prefix for Starry
  dt-bindings: display: Add Sharp LQ101K1LY04 panel binding
  drm/panel: simple: Add support for Sharp LQ101K1LY04
  drm/panel: simple: Add support for LG LP079QX1-SP0V panel
  dt-bindings: Add support for LG LP079QX1-SP0V panel
  drm/panel: simple: Add support for Sharp LQ123P1JX31 panel
  dt-bindings: Add Sharp LQ123P1JX31 panel binding
  drm/panel: simple: Add support for Samsung LSN122DL01-C01 panel
  dt-bindings: Add Samsung LSN122DL01-C01 panel binding
  drm/panel: simple: Add support for LG LP097QX1-SPA1 panel
  dt-bindings: Add LG LP097QX1-SPA1 panel binding
  drm/panel: simple: Update backlight state property
  drm/panel: simple: Remove gratuitous blank line
  drm/panel: simple: Fix a couple of physical sizes

8 years agoMerge tag 'drm/tegra/for-4.8-rc1' of git://anongit.freedesktop.org/tegra/linux into...
Dave Airlie [Sat, 16 Jul 2016 01:23:50 +0000 (11:23 +1000)]
Merge tag 'drm/tegra/for-4.8-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/tegra: Changes for v4.8-rc1

This set of changes contains a bunch of cleanups to the host1x driver as
well as the addition of a pin controller for DPAUX, which is required by
boards to configure the DPAUX pads in AUX mode (for DisplayPort) or I2C
mode (for HDMI and DDC).

Included is also a bit of rework of the SOR driver in preparation to add
DisplayPort support as well as some refactoring and cleanup.

Finally, all output drivers are converted to runtime PM, which greatly
simplifies the handling of clocks and resets.

* tag 'drm/tegra/for-4.8-rc1' of git://anongit.freedesktop.org/tegra/linux: (35 commits)
  drm/tegra: sor: Reject HDMI 2.0 modes
  drm/tegra: sor: Prepare for generic PM domain support
  drm/tegra: dsi: Prepare for generic PM domain support
  drm/tegra: sor: Make XBAR configurable per SoC
  drm/tegra: sor: Use sor1_src clock to set parent for HDMI
  dt-bindings: display: tegra: Add source clock for SOR
  drm/tegra: sor: Implement sor1_brick clock
  drm/tegra: sor: Implement runtime PM
  drm/tegra: hdmi: Implement runtime PM
  drm/tegra: dsi: Implement runtime PM
  drm/tegra: dc: Implement runtime PM
  drm/tegra: hdmi: Enable audio over HDMI
  drm/tegra: sor: Do not support deep color modes
  drm/tegra: sor: Extract tegra_sor_mode_set()
  drm/tegra: sor: Split out tegra_sor_apply_config()
  drm/tegra: sor: Rename tegra_sor_calc_config()
  drm/tegra: sor: Factor out tegra_sor_set_parent_clock()
  drm/tegra: dpaux: Add pinctrl support
  dt-bindings: Add bindings for Tegra DPAUX pinctrl driver
  drm/tegra: Prepare DPAUX for supporting generic PM domains
  ...

8 years agoMerge branch 'upstream/analogix-dp-20160705' of git://github.com/yakir-Yang/linux...
Dave Airlie [Sat, 16 Jul 2016 01:21:50 +0000 (11:21 +1000)]
Merge branch 'upstream/analogix-dp-20160705' of git://github.com/yakir-Yang/linux into drm-next

Please consider merging this tag, which contains the v4 misc fixes and add RK3399 eDP support patches[0] I sent on 2016-06-29, rebased onto v4.7-rc5.

* 'upstream/analogix-dp-20160705' of git://github.com/yakir-Yang/linux:
  dt-bindings: analogix_dp: rockchip: correct the wrong compatible name
  drm/rockchip: analogix_dp: introduce the pclk for grf
  drm/bridge: analogix_dp: fix no drm hpd event when panel plug in
  drm/rockchip: analogix_dp: update the comments about why need to hardcode VOP output mode
  drm/rockchip: analogix_dp: correct the connector display color format and bpc
  drm/bridge: analogix_dp: passing the connector as an argument in .get_modes()
  drm/rockchip: analogix_dp: make panel detect to an optional action
  drm/rockchip: analogix_dp: add rk3399 eDP support
  drm/bridge: analogix_dp: some rockchip chips need to flip REF_CLK bit setting
  drm/bridge: analogix_dp: correct the register bit define error in ANALOGIX_DP_PLL_REG_1
  drm/rockchip: analogix_dp: split the lcdc select setting into device data

8 years agoMerge tag 'imx-drm-next-2016-07-14' of git://git.pengutronix.de/git/pza/linux into...
Dave Airlie [Sat, 16 Jul 2016 01:19:29 +0000 (11:19 +1000)]
Merge tag 'imx-drm-next-2016-07-14' of git://git.pengutronix.de/git/pza/linux into drm-next

imx-drm updates

- atomic mode setting conversion
- replace DMFC FIFO allocation mechanism with a fixed allocation
  that is good enough for all cases
- support for external bridges connected to parallel-display
- improved error handling in imx-ldb, imx-tve, and parallel-display
- some code cleanup in imx-tve

* tag 'imx-drm-next-2016-07-14' of git://git.pengutronix.de/git/pza/linux:
  drm/imx: parallel-display: add bridge support
  drm/imx: parallel-display: check return code from of_get_drm_display_mode()
  gpu: ipu-v3: ipu-dc: don't bug out on invalid bus_format
  drm/imx: imx-tve: fix the error message
  drm/imx: imx-tve: remove unneeded 'or' operation
  drm/imx: imx-tve: check the value returned by regulator_set_voltage()
  drm/imx: imx-ldb: check return code on panel attach
  drm/imx: turn remaining container_of macros into inline functions
  drm/imx: store internal bus configuration in crtc state
  drm/imx: remove empty mode_set encoder callbacks
  drm/imx: atomic phase 3 step 3: Advertise DRIVER_ATOMIC
  drm/imx: atomic phase 3 step 2: Legacy callback fixups
  drm/bridge: dw-hdmi: Remove the legacy drm_connector_funcs structure
  drm/imx: atomic phase 3 step 1: Use atomic configuration
  drm/imx: Remove encoders' ->prepare callbacks
  drm/imx: atomic phase 2 step 2: Track plane_state->fb correctly in ->page_flip
  drm/imx: atomic phase 2 step 1: Wire up state ->reset, ->duplicate and ->destroy
  drm/imx: atomic phase 1: Use transitional atomic CRTC and plane helpers
  gpu: ipu-v3: ipu-dmfc: Use static DMFC FIFO allocation mechanism
  drm/imx: ipuv3 plane: Check different types of plane separately

8 years agodrm/fsl-dcu: add support for drm bridge
Meng Yi [Fri, 15 Jul 2016 06:53:38 +0000 (14:53 +0800)]
drm/fsl-dcu: add support for drm bridge

The current output code only supports connection to drm panels.
Add code to support drm bridge, to support connections to
external connectors.

Signed-off-by: Meng Yi <[email protected]>
Signed-off-by: Stefan Agner <[email protected]>
8 years agodrm/fsl-dcu: rework codes to support of_graph dt binding for panel
Meng Yi [Fri, 15 Jul 2016 06:53:37 +0000 (14:53 +0800)]
drm/fsl-dcu: rework codes to support of_graph dt binding for panel

This patch rework the output code to add of_graph dt binding support
for panel device and also keeps the backward compatibility

Signed-off-by: Meng Yi <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Stefan Agner <[email protected]>
8 years agodrm/fsl-dcu: add missing of_node_put after calling of_parse_phandle
Peter Chen [Mon, 4 Jul 2016 07:40:40 +0000 (15:40 +0800)]
drm/fsl-dcu: add missing of_node_put after calling of_parse_phandle

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using, but current code only
calls it at error path, fix it by adding it at correct code path.

Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Stefan Agner <[email protected]>
8 years agoMerge tag 'for-linus-20160715' of git://git.infradead.org/linux-mtd
Linus Torvalds [Sat, 16 Jul 2016 00:53:34 +0000 (09:53 +0900)]
Merge tag 'for-linus-20160715' of git://git.infradead.org/linux-mtd

Pull MTD fix from Brian Norris:
 "Late MTD fix for v4.7:

  One regression in the Device Tree handling for OMAP NAND handling of
  the ELM node.  TI migrated to using the property name "ti,elm-id", but
  forgot to keep compatibility with the old "elm_id" property.

  Also, might as well send out this MAINTAINERS fixup now"

* tag 'for-linus-20160715' of git://git.infradead.org/linux-mtd:
  mtd: nand: omap2: Add check for old elm binding
  MAINTAINERS: Add file patterns for mtd device tree bindings

8 years agonet: bgmac: Fix infinite loop in bgmac_dma_tx_add()
Florian Fainelli [Fri, 15 Jul 2016 22:42:52 +0000 (15:42 -0700)]
net: bgmac: Fix infinite loop in bgmac_dma_tx_add()

Nothing is decrementing the index "i" while we are cleaning up the
fragments we could not successful transmit.

Fixes: 9cde94506eacf ("bgmac: implement scatter/gather support")
Reported-by: coverity (CID 1352048)
Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
8 years agodrm/vc4: Fix a "the the" typo in a comment.
Eric Anholt [Sat, 2 Jul 2016 16:58:41 +0000 (09:58 -0700)]
drm/vc4: Fix a "the the" typo in a comment.

Signed-off-by: Eric Anholt <[email protected]>
8 years agodrm/vc4: Fix definition of QPU_R_MS_REV_FLAGS
Eric Anholt [Mon, 4 Jul 2016 19:59:18 +0000 (12:59 -0700)]
drm/vc4: Fix definition of QPU_R_MS_REV_FLAGS

We don't use it in shader validation currently, so it had no effect,
but best to fix it anyway in case we do some day.

Signed-off-by: Eric Anholt <[email protected]>
8 years agodrm/vc4: Add a getparam to signal support for branches.
Eric Anholt [Sat, 2 Jul 2016 21:14:27 +0000 (14:14 -0700)]
drm/vc4: Add a getparam to signal support for branches.

Userspace needs to know if it can create shaders that do branching.
Otherwise, for backwards compatibility with old kernels it needs to
lower if statements to conditional assignments.

Signed-off-by: Eric Anholt <[email protected]>
8 years agodrm/vc4: Add support for branching in shader validation.
Eric Anholt [Sat, 2 Jul 2016 19:17:10 +0000 (12:17 -0700)]
drm/vc4: Add support for branching in shader validation.

We're already checking that branch instructions are between the start
of the shader and the proper PROG_END sequence.  The other thing we
need to make branching safe is to verify that the shader doesn't read
past the end of the uniforms stream.

To do that, we require that at any basic block reading uniforms have
the following instructions:

load_imm temp, <next offset within uniform stream>
add unif_addr, temp, unif

The instructions are generated by userspace, and the kernel verifies
that the load_imm is of the expected offset, and that the add adds it
to a uniform.  We track which uniform in the stream that is, and at
draw call time fix up the uniform stream to have the address of the
start of the shader's uniforms at that location.

Signed-off-by: Eric Anholt <[email protected]>
8 years agodrm/vc4: Add a bitmap of branch targets during shader validation.
Eric Anholt [Sat, 2 Jul 2016 17:10:24 +0000 (10:10 -0700)]
drm/vc4: Add a bitmap of branch targets during shader validation.

This isn't used yet, it's just a first step toward loop validation.
During the main parsing of instructions, we need to know when we hit a
new basic block so that we can reset validated state.

v2: Fix a stray semicolon after an if block.  (caught by kbuild test).

Signed-off-by: Eric Anholt <[email protected]>
8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Fri, 15 Jul 2016 22:04:12 +0000 (07:04 +0900)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:
 "A few last-minute updates for the input subsystem"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: ts4800-ts - add missing of_node_put after calling of_parse_phandle
  Input: synaptics-rmi4 - use of_get_child_by_name() to fix refcount
  Revert "Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE"
  Input: xpad - validate USB endpoint count during probe
  Input: add SW_PEN_INSERTED define

8 years agoMerge branch 'mlxsw-fixes'
David S. Miller [Fri, 15 Jul 2016 21:49:51 +0000 (14:49 -0700)]
Merge branch 'mlxsw-fixes'

Jiri Pirko says:

====================
mlxsw: Couple of fixes

Couple of fixes for mlxsw driver from Ido.
====================

Signed-off-by: David S. Miller <[email protected]>
8 years agomlxsw: spectrum: Prevent invalid ingress buffer mapping
Ido Schimmel [Fri, 15 Jul 2016 09:15:02 +0000 (11:15 +0200)]
mlxsw: spectrum: Prevent invalid ingress buffer mapping

Packets entering the switch are mapped to a Switch Priority (SP)
according to their PCP value (untagged frames are mapped to SP 0).

The packets are classified to a priority group (PG) buffer in the port's
headroom according to their SP.

The switch maintains another mapping (SP to IEEE priority), which is
used to generate PFC frames for lossless PGs. This mapping is
initialized to IEEE = SP % 8.

Therefore, when mapping SP 'x' to PG 'y' we create a situation in which
an IEEE priority is mapped to two different PGs:

IEEE 'x' ---> SP 'x' ---> PG 'y'
IEEE 'x' ---> SP 'x + 8' ---> PG '0' (default)

Which is invalid, as a flow can use only one PG buffer.

Fix this by mapping both SP 'x' and 'x + 8' to the same PG buffer.

Fixes: 8e8dfe9fdf06 ("mlxsw: spectrum: Add IEEE 802.1Qaz ETS support")
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
8 years agomlxsw: spectrum: Prevent overwrite of DCB capability fields
Ido Schimmel [Fri, 15 Jul 2016 09:15:01 +0000 (11:15 +0200)]
mlxsw: spectrum: Prevent overwrite of DCB capability fields

The number of supported traffic classes that can have ETS and PFC
simultaneously enabled is not subject to user configuration, so make
sure we always initialize them to the correct values following a set
operation.

Fixes: 8e8dfe9fdf06 ("mlxsw: spectrum: Add IEEE 802.1Qaz ETS support")
Fixes: d81a6bdb87ce ("mlxsw: spectrum: Add IEEE 802.1Qbb PFC support")
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
8 years agomlxsw: spectrum: Don't emit errors when PFC is disabled
Ido Schimmel [Fri, 15 Jul 2016 09:15:00 +0000 (11:15 +0200)]
mlxsw: spectrum: Don't emit errors when PFC is disabled

We can't have PAUSE frames and PFC both enabled on the same port, but
the fact that ieee_setpfc() was called doesn't necessarily mean PFC is
enabled.

Only emit errors when PAUSE frames and PFC are enabled simultaneously.

Fixes: d81a6bdb87ce ("mlxsw: spectrum: Add IEEE 802.1Qbb PFC support")
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
8 years agomlxsw: spectrum: Indicate support for autonegotiation
Ido Schimmel [Fri, 15 Jul 2016 09:14:59 +0000 (11:14 +0200)]
mlxsw: spectrum: Indicate support for autonegotiation

The device supports link autonegotiation, so let the user know about it
by indicating support via ethtool ops.

Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
8 years agomlxsw: spectrum: Force link training according to admin state
Ido Schimmel [Fri, 15 Jul 2016 09:14:58 +0000 (11:14 +0200)]
mlxsw: spectrum: Force link training according to admin state

When setting a new speed we need to disable and enable the port for the
changes to take effect. We currently only do that if the operational
state of the port is up. However, setting a new speed following link
training failure will require us to explicitly set the port down and then
up.

Instead, disable and enable the port based on its administrative state.

Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
8 years agoMerge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Linus Torvalds [Fri, 15 Jul 2016 21:36:55 +0000 (06:36 +0900)]
Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

Pull workqueue fix from Tejun Heo:
 "The optimization for setting unbound worker affinity masks collided
  with recent scheduler changes triggering warning messages.

  This late pull request fixes the bug by removing the optimization"

* 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: Fix setting affinity of unbound worker threads

8 years agoxfs: fix type confusion in xfs_ioc_swapext
Jann Horn [Fri, 11 Sep 2015 19:39:33 +0000 (21:39 +0200)]
xfs: fix type confusion in xfs_ioc_swapext

Without this check, the following XFS_I invocations would return bad
pointers when used on non-XFS inodes (perhaps pointers into preceding
allocator chunks).

This could be used by an attacker to trick xfs_swap_extents into
performing locking operations on attacker-chosen structures in kernel
memory, potentially leading to code execution in the kernel.  (I have
not investigated how likely this is to be usable for an attack in
practice.)

Signed-off-by: Jann Horn <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Dave Chinner <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Fri, 15 Jul 2016 21:27:44 +0000 (14:27 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2016-07-14

This series contains fixes to i40e and ixgbe.

Alex fixes issues found in i40e_rx_checksum() which was broken, where the
checksum was being returned valid when it was not.

Kiran fixes a bug which was found when we abruptly remove a cable which
caused a panic.  Set the VSI broadcast promiscuous mode during VSI add
sequence and prevents adding MAC filter if specified MAC address is
broadcast.

Paolo Abeni fixes a bug by returning the actual work done, capped to
weight - 1, since the core doesn't allow to return the full budget when
the driver modifies the NAPI status.

Guilherme Piccoli fixes an issue where the q_vector initialization
routine sets the affinity _mask of a q_vector based on v_idx value.
This means a loop iterates on v_idx, which is an incremental value, and
the cpumask is created based on this value.  This is a problem in
systems with multiple logical CPUs per core (like in SMT scenarios).
Changed the way q_vector's affinity_mask is created to resolve the issue.
====================

Signed-off-by: David S. Miller <[email protected]>
8 years agor8152: add MODULE_VERSION
Grant Grundler [Thu, 14 Jul 2016 18:27:16 +0000 (11:27 -0700)]
r8152: add MODULE_VERSION

ethtool -i provides a driver version that is hard coded.
Export the same value via "modinfo".

Signed-off-by: Grant Grundler <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
8 years agotcp: enable per-socket rate limiting of all 'challenge acks'
Jason Baron [Thu, 14 Jul 2016 15:38:40 +0000 (11:38 -0400)]
tcp: enable per-socket rate limiting of all 'challenge acks'

The per-socket rate limit for 'challenge acks' was introduced in the
context of limiting ack loops:

commit f2b2c582e824 ("tcp: mitigate ACK loops for connections as tcp_sock")

And I think it can be extended to rate limit all 'challenge acks' on a
per-socket basis.

Since we have the global tcp_challenge_ack_limit, this patch allows for
tcp_challenge_ack_limit to be set to a large value and effectively rely on
the per-socket limit, or set tcp_challenge_ack_limit to a lower value and
still prevents a single connections from consuming the entire challenge ack
quota.

It further moves in the direction of eliminating the global limit at some
point, as Eric Dumazet has suggested. This a follow-up to:
Subject: tcp: make challenge acks less predictable

Cc: Eric Dumazet <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Neal Cardwell <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Cc: Yue Cao <[email protected]>
Signed-off-by: Jason Baron <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
8 years agomedia: fix airspy usb probe error path
James Patrick-Evans [Fri, 15 Jul 2016 15:40:45 +0000 (16:40 +0100)]
media: fix airspy usb probe error path

Fix a memory leak on probe error of the airspy usb device driver.

The problem is triggered when more than 64 usb devices register with
v4l2 of type VFL_TYPE_SDR or VFL_TYPE_SUBDEV.

The memory leak is caused by the probe function of the airspy driver
mishandeling errors and not freeing the corresponding control structures
when an error occours registering the device to v4l2 core.

A badusb device can emulate 64 of these devices, and then through
continual emulated connect/disconnect of the 65th device, cause the
kernel to run out of RAM and crash the kernel, thus causing a local DOS
vulnerability.

Fixes CVE-2016-5400

Signed-off-by: James Patrick-Evans <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Cc: [email protected] # 3.17+
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoEDAC, sb_edac: Fix Knights Landing
Tony Luck [Thu, 14 Jul 2016 22:38:43 +0000 (15:38 -0700)]
EDAC, sb_edac: Fix Knights Landing

In commit 2c1ea4c700af ("EDAC, sb_edac: Use cpu family/model in driver
detection") I broke Knights Landing because I failed to notice that it
called a wrapper macro "sbridge_get_all_devices_knl" instead of
"sbridge_get_all_devices" like all the other types.

Now that we include the processor type in the pci_id_table structure we
can skip the wrappers and just have the sbridge_get_all_devices() check
the type to decide whether to allow duplicate devices and controllers to
have registers spread across buses.

Fixes: 2c1ea4c700af ("EDAC, sb_edac: Use cpu family/model in driver detection")
Tested-by: Lukasz Odzioba <[email protected]>
Acked-by: Aristeu Rozanski <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoInput: ts4800-ts - add missing of_node_put after calling of_parse_phandle
Peter Chen [Fri, 15 Jul 2016 16:32:54 +0000 (09:32 -0700)]
Input: ts4800-ts - add missing of_node_put after calling of_parse_phandle

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
8 years agodrm/i915: Introduce Kabypoint PCH for Kabylake H/DT.
Rodrigo Vivi [Sat, 2 Jul 2016 00:07:12 +0000 (17:07 -0700)]
drm/i915: Introduce Kabypoint PCH for Kabylake H/DT.

Some Kabylake SKUs are going to use Kabypoint PCH.
It is mainly for Halo and DT ones.

>From our specs it doesn't seem that KBP brings
any change on the display south engine. So let's consider
this as a continuation of SunrisePoint, i.e., SPT+.

Since it is easy to get confused by a letter change:
KBL = Kabylake - CPU/GPU codename.
KBP = Kabypoint - PCH codename.

Signed-off-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96826
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Rodrigo Vivi <[email protected]>
(cherry picked from commit 22dea0be50b2eb0bafd3c82e1fb080113e0c889e)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate
Tim Gore [Mon, 13 Jun 2016 11:15:01 +0000 (12:15 +0100)]
drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate

This patch enables a workaround for a mid thread preemption
issue where a hardware timing problem can prevent the
context restore from happening, leading to a hang.

v2: move to gen9_init_workarounds (Arun)
v3: move to start of gen9_init_workarounds (Arun)

Signed-off-by: Tim Gore <[email protected]>
Reviewed-by: Arun Siluvery <[email protected]>
Signed-off-by: Tvrtko Ursulin <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit a8ab5ed5e1bf856eceaab5579236de6f92822b9f)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/gen9: Add WaFbcHighMemBwCorruptionAvoidance
Mika Kuoppala [Tue, 7 Jun 2016 14:19:19 +0000 (17:19 +0300)]
drm/i915/gen9: Add WaFbcHighMemBwCorruptionAvoidance

Add this fbc related workaround for all gen9

Cc: Ville Syrjälä <[email protected]>
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit d1b4eefdea6d63aa15321f539feec298d8aefdc1)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i195/fbc: Add WaFbcNukeOnHostModify
Mika Kuoppala [Tue, 7 Jun 2016 14:19:18 +0000 (17:19 +0300)]
drm/i195/fbc: Add WaFbcNukeOnHostModify

Bspec states that we need to set nuke on modify all to prevent
screen corruption with fbc on skl and kbl.

v2: proper workaround name

References: HSD#2227109, HSDES#1404569388
Cc: Ville Syrjälä <[email protected]>
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 031cd8c85aefad31e7af91eba7bc4735a6dfcc79)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/gen9: Add WaFbcWakeMemOn
Mika Kuoppala [Tue, 7 Jun 2016 14:19:17 +0000 (17:19 +0300)]
drm/i915/gen9: Add WaFbcWakeMemOn

Set bit 8 in 0x43224 to prevent screen corruption and system
hangs on high memory bandwidth conditions. The same wa also suggest
setting bit 31 on ARB_CTL. According to another workaround we gain
better idle power savings when FBC is enabled.

v2: use correct workaround name
v3: split out overlapping wa for corruption avoidance (Ville)

References: HSD#2137218, HSD#2227171, HSD#2136579, BSID#883
Cc: Paulo Zanoni <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 303d4ea522e8672a1b62d968a5b6764929adc292)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/gen9: Add WaFbcTurnOffFbcWatermark
Mika Kuoppala [Tue, 7 Jun 2016 14:19:16 +0000 (17:19 +0300)]
drm/i915/gen9: Add WaFbcTurnOffFbcWatermark

According to bspec this prevents screen corruption when fbc is
used.

v2: This workaround has a name, use it (Ville)
v3: remove bogus gen check on ilk/vlv wm path (Ville)

References: HSD#2135555, HSD#2137270, BSID#562
Cc: Paulo Zanoni <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 0f78dee6f06a9399d4bdf79575094cc761b872ac)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaClearSlmSpaceAtContextSwitch
Mika Kuoppala [Tue, 7 Jun 2016 14:19:15 +0000 (17:19 +0300)]
drm/i915/kbl: Add WaClearSlmSpaceAtContextSwitch

This workaround for bdw and chv, is also needed for kbl A0.

References: HSD#1911519, BSID#569
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 066d462888514af727008a450f4078b1a23d5cbe)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/gen9: Add WaEnableChickenDCPR
Mika Kuoppala [Tue, 7 Jun 2016 14:19:13 +0000 (17:19 +0300)]
drm/i915/gen9: Add WaEnableChickenDCPR

Workaround for display underrun issues with Y & Yf Tiling.
Set this on all gen9 as stated by bspec.

v2: proper workaround name

References: HSD#2136383, BSID#857
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 590e8ff04bc0182dce97228e5e352d6413d80456)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaDisableSbeCacheDispatchPortSharing
Mika Kuoppala [Tue, 7 Jun 2016 14:19:12 +0000 (17:19 +0300)]
drm/i915/kbl: Add WaDisableSbeCacheDispatchPortSharing

This is needed for all kbl revision.

v2: Don't add revid checks to generic gen9 init (Arun)

References: HSD#2135593
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 954337aa96a31f6d4baf1e40ac219fbb1b1d92f4)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaDisableGafsUnitClkGating
Mika Kuoppala [Tue, 7 Jun 2016 14:19:11 +0000 (17:19 +0300)]
drm/i915/kbl: Add WaDisableGafsUnitClkGating

We need to disable clock gating in this unit to work around
hardware issue causing possible corruption/hang.

v2: name the bit (Ville)
v3: leave the fix enabled for 2227050 and set correct bit (Matthew)
v4: Split out the skl part in separate commit for easier backport

References: HSD#2227156, HSD#2227050
Cc: Ville Syrjälä <[email protected]>
Cc: Matthew Auld <[email protected]>
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 4de5d7ccbccc88d2f7b1bcdc2180196ded7db8b8)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaForGAMHang
Mika Kuoppala [Tue, 7 Jun 2016 14:19:10 +0000 (17:19 +0300)]
drm/i915/kbl: Add WaForGAMHang

Add this workaround for A0 and B0 revisions

References: HSD#2226935
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 0b2d0934edceff9905b1202d0e7e91f1b6228485)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915: Add WaInsertDummyPushConstP for bxt and kbl
Mika Kuoppala [Tue, 7 Jun 2016 14:19:07 +0000 (17:19 +0300)]
drm/i915: Add WaInsertDummyPushConstP for bxt and kbl

Add this workaround for both bxt and kbl up to until
rev B0.

References: HSD#2136703
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit ad2bdb44b19529ba992bd0b7667e91b14fe9a9ee)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaDisableDynamicCreditSharing
Mika Kuoppala [Tue, 7 Jun 2016 14:19:06 +0000 (17:19 +0300)]
drm/i915/kbl: Add WaDisableDynamicCreditSharing

Bspec states that we need to turn off dynamic credit
sharing on kbl revid a0 and b0. This happens by writing bit 28
on 0x4ab8.

References: HSD#2225601, HSD#2226938, HSD#2225763
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit c0b730d572ea00d427f6112b17982c6b9d5e97bb)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaDisableGamClockGating
Mika Kuoppala [Tue, 7 Jun 2016 14:19:05 +0000 (17:19 +0300)]
drm/i915/kbl: Add WaDisableGamClockGating

According to bspec we need to disable gam unit clock gating on
on kbl revids A0 and B0.

References: HSD#2226858, HSD#1944358
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 8aeb7f624fbf8a68a9c67f831d4158a0f80ea920)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/gen9: Enable must set chicken bits in config0 reg
Mika Kuoppala [Tue, 7 Jun 2016 14:19:04 +0000 (17:19 +0300)]
drm/i915/gen9: Enable must set chicken bits in config0 reg

The bspec states that these must be set in CONFIG0 for all gen9.

v2: rebase
v3: fix spacing (Matthew)

References: HSD#2134995
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit b033bb6d5d3a0e51d56b3ba929a8db4e18da0892)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaDisableLSQCROPERFforOCL
Mika Kuoppala [Tue, 7 Jun 2016 14:19:03 +0000 (17:19 +0300)]
drm/i915/kbl: Add WaDisableLSQCROPERFforOCL

Extend the scope of this workaround, already used in skl,
to also take effect in kbl.

v2: Fix KBL_REVID_E0 (Matthew)

References: HSD#2132677
Cc: Matthew Auld <[email protected]>
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit fe90581987cd5fadd2942f59f8511bcb39fdec34)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaDisableSDEUnitClockGating
Mika Kuoppala [Tue, 7 Jun 2016 14:19:01 +0000 (17:19 +0300)]
drm/i915/kbl: Add WaDisableSDEUnitClockGating

Add this workaround until upto kbl revid B0.

References: HSD#1802092
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 9498dba7b4ffe40a1e2b23d7718b77e49841248f)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaDisableFenceDestinationToSLM for A0
Mika Kuoppala [Tue, 7 Jun 2016 14:19:00 +0000 (17:19 +0300)]
drm/i915/kbl: Add WaDisableFenceDestinationToSLM for A0

Add this workaround for kbl revid A0 only.

v2: rebase
v3: carve out a non related workaround (Chris)

References: HSD#1911714
Cc: Chris Wilson <[email protected]>
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 8401d42fd5adf709281e1700194805f393b49573)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaEnableGapsTsvCreditFix
Mika Kuoppala [Tue, 7 Jun 2016 14:18:59 +0000 (17:18 +0300)]
drm/i915/kbl: Add WaEnableGapsTsvCreditFix

We need this crucial workaround from skl also to all kbl revisions.
Lack of it was causing system hangs on skl enabling so this is
a must have.

v2: Don't add revid checks to gen9 init workarounds (Arun)

References: HSD#2126660
Cc: Arun Siluvery <[email protected]>
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit e587f6cb0af140f3c0ea794d8616eb9a29969983)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915: Mimic skl with WaForceEnableNonCoherent
Mika Kuoppala [Tue, 7 Jun 2016 14:18:58 +0000 (17:18 +0300)]
drm/i915: Mimic skl with WaForceEnableNonCoherent

Past evidence with system hangs and hsds tie
WaForceEnableNonCoherent and WaDisableHDCInvalidation to
WaForceContextSaveRestoreNonCoherent. Documentation
states that WaForceContextSaveRestoreNonCoherent would
not be needed on skl past E0 but evidence proved otherwise. See
commit <510650e8b2ab> ("drm/i915/skl: Fix spurious gpu hang with gt3/gt4
revs"). In this scope consider kbl to be skl with a bigger revision than
E0 so play it safe and bind these two workarounds to the
WaForceContextSaveRestoreNonCoherent, and apply to all gen9.

v2: fix comment (Matthew)

References: HSD#2134449, HSD#2131413
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit bbaefe72a00c93c6ec12e029019681e3f7d7de7a)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/gen9: Always apply WaForceContextSaveRestoreNonCoherent
Mika Kuoppala [Tue, 7 Jun 2016 14:18:57 +0000 (17:18 +0300)]
drm/i915/gen9: Always apply WaForceContextSaveRestoreNonCoherent

The revision id range for this workaround has changed. So apply
it to all revids on all gen9.

References: HSD#2134449
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 5b0e3659296cc4a1484e60640ef10780194a195b)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add WaSkipStolenMemoryFirstPage for A0
Mika Kuoppala [Tue, 7 Jun 2016 14:18:56 +0000 (17:18 +0300)]
drm/i915/kbl: Add WaSkipStolenMemoryFirstPage for A0

We need this for kbl a0 boards. Note that this should be also
for bxt A0 but we omit that on purpose as bxt A0's are
out of fashion already.

References: HSD#1912158, HSD#4393097
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 6e4f10c33a8bd0df4412bc31c0f11930e0228123)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Add REVID macro
Mika Kuoppala [Tue, 7 Jun 2016 14:18:55 +0000 (17:18 +0300)]
drm/i915/kbl: Add REVID macro

Add REVID macro for kbl to limit wa applicability to particular
revision range.

Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit c033a37cd42c1b5492d95bfbc8c0891088e04b57)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/kbl: Init gen9 workarounds
Mika Kuoppala [Tue, 7 Jun 2016 14:18:54 +0000 (17:18 +0300)]
drm/i915/kbl: Init gen9 workarounds

Kabylake is part of gen9 family so init the generic gen9
workarounds for it.

v2: rebase

Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit e5f81d65ac5a04020d790caf63b2324730ba0277)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/skl: Add WaDisableGafsUnitClkGating
Mika Kuoppala [Tue, 7 Jun 2016 14:18:53 +0000 (17:18 +0300)]
drm/i915/skl: Add WaDisableGafsUnitClkGating

We need to disable clock gating in this unit to work around
hardware issue causing possible corruption/hang.

v2: name the bit (Ville)
v3: leave the fix enabled for 2227050 and set correct bit (Matthew)

References: HSD#2227156, HSD#2227050
Cc: Ville Syrjälä <[email protected]>
Cc: Matthew Auld <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Signed-off-by: Mika Kuoppala <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit eee8efb02a0f9284d85e6b3688f944ca765d7ad3)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/gen9: Add WaVFEStateAfterPipeControlwithMediaStateClear
[email protected] [Mon, 6 Jun 2016 08:52:49 +0000 (09:52 +0100)]
drm/i915/gen9: Add WaVFEStateAfterPipeControlwithMediaStateClear

Kernel only need to add a register to HW whitelist, required for a
preemption related issue.

Reference: HSD#2131039
Reviewed-by: Jeff McGee <[email protected]>
Signed-off-by: Arun Siluvery <[email protected]>
Signed-off-by: Tvrtko Ursulin <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 6bb6285582e0cf9b3a8440e0e714aae5f66d9ce2)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agodrm/i915/psr: Implement PSR2 w/a for gen9
Daniel Vetter [Thu, 19 May 2016 07:14:20 +0000 (09:14 +0200)]
drm/i915/psr: Implement PSR2 w/a for gen9

Found this while browsing Bspec. Looks like it applies to both skl and
kbl.

v2: Also for bxt (Art).

Cc: Rodrigo Vivi <[email protected]>
Cc: Sonika Jindal <[email protected]>
Cc: Durgadoss R <[email protected]>
Cc: "Pandiyan, Dhinakaran" <[email protected]>
Cc: "Runyan, Arthur J" <[email protected]>
Reviewed-by: Sonika Jindal<[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit dc00b6a07c2206e7b7dbcbeff856049264c40faa)
Signed-off-by: Mika Kuoppala <[email protected]>
8 years agoMerge branch 'akpm' (patches from Andrew)
Linus Torvalds [Fri, 15 Jul 2016 07:00:18 +0000 (16:00 +0900)]
Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "20 fixes"

* emailed patches from Andrew Morton <[email protected]>:
  m32r: fix build warning about putc
  mm: workingset: printk missing log level, use pr_info()
  mm: thp: refix false positive BUG in page_move_anon_rmap()
  mm: rmap: call page_check_address() with sync enabled to avoid racy check
  mm: thp: move pmd check inside ptl for freeze_page()
  vmlinux.lds: account for destructor sections
  gcov: add support for gcc version >= 6
  mm, meminit: ensure node is online before checking whether pages are uninitialised
  mm, meminit: always return a valid node from early_pfn_to_nid
  kasan/quarantine: fix bugs on qlist_move_cache()
  uapi: export lirc.h header
  madvise_free, thp: fix madvise_free_huge_pmd return value after splitting
  Revert "scripts/gdb: add documentation example for radix tree"
  Revert "scripts/gdb: add a Radix Tree Parser"
  scripts/gdb: Perform path expansion to lx-symbol's arguments
  scripts/gdb: add constants.py to .gitignore
  scripts/gdb: rebuild constants.py on dependancy change
  scripts/gdb: silence 'nothing to do' message
  kasan: add newline to messages
  mm, compaction: prevent VM_BUG_ON when terminating freeing scanner

8 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
Linus Torvalds [Fri, 15 Jul 2016 06:42:22 +0000 (15:42 +0900)]
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma

Pull rdma fixes from Doug Ledford:
 "Round three of 4.7 rc fixes:
   - two fixes for hfi1
   - two fixes for i40iw
   - one omission correction in the port table counter arrays"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
  i40iw: Enable remote access rights for stag allocation
  i40iw: do not print unitialized variables in error message
  IB core: Add port_xmit_wait counter
  IB/hfi1: Fix sleep inside atomic issue in init_asic_data
  IB/hfi1: Correct issues with sc5 computation

8 years agoi40e: use valid online CPU on q_vector initialization
Guilherme G. Piccoli [Mon, 27 Jun 2016 15:16:43 +0000 (12:16 -0300)]
i40e: use valid online CPU on q_vector initialization

Currently, the q_vector initialization routine sets the affinity_mask
of a q_vector based on v_idx value. Meaning a loop iterates on v_idx,
which is an incremental value, and the cpumask is created based on
this value.

This is a problem in systems with multiple logical CPUs per core (like in
SMT scenarios). If we disable some logical CPUs, by turning SMT off for
example, we will end up with a sparse cpu_online_mask, i.e., only the first
CPU in a core is online, and incremental filling in q_vector cpumask might
lead to multiple offline CPUs being assigned to q_vectors.

Example: if we have a system with 8 cores each one containing 8 logical
CPUs (SMT == 8 in this case), we have 64 CPUs in total. But if SMT is
disabled, only the 1st CPU in each core remains online, so the
cpu_online_mask in this case would have only 8 bits set, in a sparse way.

In general case, when SMT is off the cpu_online_mask has only C bits set:
0, 1*N, 2*N, ..., C*(N-1)  where
C == # of cores;
N == # of logical CPUs per core.
In our example, only bits 0, 8, 16, 24, 32, 40, 48, 56 would be set.

This patch changes the way q_vector's affinity_mask is created: it iterates
on v_idx, but consumes the CPU index from the cpu_online_mask instead of
just using the v_idx incremental value.

No functional changes were introduced.

Signed-off-by: Guilherme G Piccoli <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
8 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Fri, 15 Jul 2016 06:39:03 +0000 (15:39 +0900)]
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Four driver bugfixes for the I2C subsystem"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: mux: reg: wrong condition checked for of_address_to_resource return value
  i2c: tegra: Correct error path in probe
  i2c: remove __init from i2c_register_board_info()
  i2c: qup: Fix wrong value of index variable

8 years agoixgbe: napi_poll must return the work done
Paolo Abeni [Wed, 15 Jun 2016 13:37:59 +0000 (15:37 +0200)]
ixgbe: napi_poll must return the work done

Currently the function ixgbe_poll() returns 0 when it clean completely
the rx rings, but this foul budget accounting in core code.
Fix this returning the actual work done, capped to weight - 1, since
the core doesn't allow to return the full budget when the driver modifies
the napi status

Signed-off-by: Paolo Abeni <[email protected]>
Reviewed-by: Venkatesh Srinivas <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
8 years agoi40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter
Kiran Patil [Mon, 20 Jun 2016 16:10:34 +0000 (09:10 -0700)]
i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter

This patch sets VSI broadcast promiscuous mode during VSI add sequence
and prevents adding MAC filter if specified MAC address is broadcast.

Change-ID: Ia62251fca095bc449d0497fc44bec3a5a0136773
Signed-off-by: Kiran Patil <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
8 years agoi40e/i40evf: Fix i40e_rx_checksum
Alexander Duyck [Tue, 14 Jun 2016 22:45:42 +0000 (15:45 -0700)]
i40e/i40evf: Fix i40e_rx_checksum

There are a couple of issues I found in i40e_rx_checksum while doing some
recent testing.  As a result I have found the Rx checksum logic is pretty
much broken and returning that the checksum is valid for tunnels in cases
where it is not.

First the inner types are not the correct values to use to test for if a
tunnel is present or not.  In addition the inner protocol types are not a
bitmask as such performing an OR of the values doesn't make sense.  I have
instead changed the code so that the inner protocol types are used to
determine if we report CHECKSUM_UNNECESSARY or not.  For anything that does
not end in UDP, TCP, or SCTP it doesn't make much sense to report a
checksum offload since it won't contain a checksum anyway.

This leaves us with the need to set the csum_level based on some value.
For that purpose I am using the tunnel_type field.  If the tunnel type is
GRENAT or greater then this means we have a GRE or UDP tunnel with an inner
header.  In the case of GRE or UDP we will have a possible checksum present
so for this reason it should be safe to set the csum_level to 1 to indicate
that we are reporting the state of the inner header.

Signed-off-by: Alexander Duyck <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
8 years agoMerge tag 'drm-fixes-for-v4.7-rc8-vmware' of git://people.freedesktop.org/~airlied...
Linus Torvalds [Fri, 15 Jul 2016 06:16:13 +0000 (15:16 +0900)]
Merge tag 'drm-fixes-for-v4.7-rc8-vmware' of git://people.freedesktop.org/~airlied/linux

Pull drm vmware fixes from Dave Airlie:
 "These are some fixes for the vmware graphics driver, that fix some
  black screen issues on at least Ubuntu 16.04, I think VMware would
  like to get these in so stable can pick them up ASAP"

* tag 'drm-fixes-for-v4.7-rc8-vmware' of git://people.freedesktop.org/~airlied/linux:
  drm/vmwgfx: Fix error paths when mapping framebuffer
  drm/vmwgfx: Fix corner case screen target management
  drm/vmwgfx: Delay pinning fbdev framebuffer until after mode set
  drm/vmwgfx: Check pin count before attempting to move a buffer
  drm/ttm: Make ttm_bo_mem_compat available
  drm/vmwgfx: Add an option to change assumed FB bpp
  drm/vmwgfx: Work around mode set failure in 2D VMs
  drm/vmwgfx: Add a check to handle host message failure

8 years agoMerge tag 'drm-fixes-for-v4.7-rc8' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 15 Jul 2016 06:13:06 +0000 (15:13 +0900)]
Merge tag 'drm-fixes-for-v4.7-rc8' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "These are just some i915 and amdgpu fixes that shows up, the amdgpu
  ones are polaris fixes, and the i915 one is a major regression fix"

* tag 'drm-fixes-for-v4.7-rc8' of git://people.freedesktop.org/~airlied/linux:
  drm/amdgpu: fix power distribution issue for Polaris10 XT
  drm/amdgpu: Add a missing register to Polaris golden setting
  drm/i915: Ignore panel type from OpRegion on SKL
  drm/i915: Update ifdeffery for mutex->owner

8 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 Jul 2016 06:02:49 +0000 (15:02 +0900)]
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fix from Ingo Molnar:
 "Fix a CPU hotplug related corruption of the load average that got
  introduced in this merge window"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/core: Correct off by one bug in load migration calculation

8 years agom32r: fix build warning about putc
Sudip Mukherjee [Thu, 14 Jul 2016 19:07:43 +0000 (12:07 -0700)]
m32r: fix build warning about putc

We were getting build warning:

  arch/m32r/boot/compressed/m32r_sio.c:11:13:
     warning: conflicting types for built-in function 'putc'

Here putc is used as a static function so lets just rename it to avoid
the conflict with the builtin putc.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agomm: workingset: printk missing log level, use pr_info()
Anton Blanchard [Thu, 14 Jul 2016 19:07:41 +0000 (12:07 -0700)]
mm: workingset: printk missing log level, use pr_info()

Commit 612e44939c3c ("mm: workingset: eviction buckets for bigmem/lowbit
machines") added a printk without a log level.  Quieten it by using
pr_info().

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Anton Blanchard <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This page took 0.12533 seconds and 4 git commands to generate.