Skip to content

Commit 83f1bfd

Browse files
author
Jiri Kosina
committed
Merge branches 'for-4.4/upstream-fixes', 'for-4.5/async-suspend', 'for-4.5/container-of-cleanups', 'for-4.5/core', 'for-4.5/i2c-hid', 'for-4.5/logitech', 'for-4.5/multitouch', 'for-4.5/sony', 'for-4.5/upstream' and 'for-4.5/wacom' into for-linus
10 parents 7683355 + 64bebef + 2cf8383 + 5d9374c + 6cf2e31 + 5f008c9 + 73e7d63 + b71b557 + 7775fb9 + 0bbfe28 commit 83f1bfd

File tree

3,183 files changed

+131929
-80938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,183 files changed

+131929
-80938
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
What: /sys/bus/scsi/drivers/st/debug_flag
2+
Date: October 2015
3+
Kernel Version: ?.?
4+
5+
Description:
6+
This file allows you to turn debug output from the st driver
7+
off if you write a '0' to the file or on if you write a '1'.
8+
Note that debug output requires that the module be compiled
9+
with the #define DEBUG set to a non-zero value (this is the
10+
default). If DEBUG is set to 0 then this file will not
11+
appear in sysfs as its presence is conditional upon debug
12+
output support being compiled into the module.

Documentation/DMA-API.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,6 @@ memory back to the pool before you destroy it.
141141
Part Ic - DMA addressing limitations
142142
------------------------------------
143143

144-
int
145-
dma_supported(struct device *dev, u64 mask)
146-
147-
Checks to see if the device can support DMA to the memory described by
148-
mask.
149-
150-
Returns: 1 if it can and 0 if it can't.
151-
152-
Notes: This routine merely tests to see if the mask is possible. It
153-
won't change the current mask settings. It is more intended as an
154-
internal API for use by the platform than an external API for use by
155-
driver writers.
156-
157144
int
158145
dma_set_mask_and_coherent(struct device *dev, u64 mask)
159146

Documentation/DocBook/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ DOCBOOKS := z8530book.xml device-drivers.xml \
1414
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
1515
80211.xml debugobjects.xml sh.xml regulator.xml \
1616
alsa-driver-api.xml writing-an-alsa-driver.xml \
17-
tracepoint.xml drm.xml media_api.xml w1.xml \
17+
tracepoint.xml gpu.xml media_api.xml w1.xml \
1818
writing_musb_glue_layer.xml crypto-API.xml iio.xml
1919

2020
include Documentation/DocBook/media/Makefile

Documentation/DocBook/drm.tmpl renamed to Documentation/DocBook/gpu.tmpl

Lines changed: 116 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
33
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
44

5-
<book id="drmDevelopersGuide">
5+
<book id="gpuDevelopersGuide">
66
<bookinfo>
7-
<title>Linux DRM Developer's Guide</title>
7+
<title>Linux GPU Driver Developer's Guide</title>
88

99
<authorgroup>
1010
<author>
@@ -40,6 +40,16 @@
4040
</address>
4141
</affiliation>
4242
</author>
43+
<author>
44+
<firstname>Lukas</firstname>
45+
<surname>Wunner</surname>
46+
<contrib>vga_switcheroo documentation</contrib>
47+
<affiliation>
48+
<address>
49+
<email>[email protected]</email>
50+
</address>
51+
</affiliation>
52+
</author>
4353
</authorgroup>
4454

4555
<copyright>
@@ -51,6 +61,10 @@
5161
<year>2012</year>
5262
<holder>Laurent Pinchart</holder>
5363
</copyright>
64+
<copyright>
65+
<year>2015</year>
66+
<holder>Lukas Wunner</holder>
67+
</copyright>
5468

5569
<legalnotice>
5670
<para>
@@ -69,6 +83,13 @@
6983
<revremark>Added extensive documentation about driver internals.
7084
</revremark>
7185
</revision>
86+
<revision>
87+
<revnumber>1.1</revnumber>
88+
<date>2015-10-11</date>
89+
<authorinitials>LW</authorinitials>
90+
<revremark>Added vga_switcheroo documentation.
91+
</revremark>
92+
</revision>
7293
</revhistory>
7394
</bookinfo>
7495

@@ -78,9 +99,9 @@
7899
<title>DRM Core</title>
79100
<partintro>
80101
<para>
81-
This first part of the DRM Developer's Guide documents core DRM code,
82-
helper libraries for writing drivers and generic userspace interfaces
83-
exposed by DRM drivers.
102+
This first part of the GPU Driver Developer's Guide documents core DRM
103+
code, helper libraries for writing drivers and generic userspace
104+
interfaces exposed by DRM drivers.
84105
</para>
85106
</partintro>
86107

@@ -138,14 +159,10 @@
138159
<para>
139160
At the core of every DRM driver is a <structname>drm_driver</structname>
140161
structure. Drivers typically statically initialize a drm_driver structure,
141-
and then pass it to one of the <function>drm_*_init()</function> functions
142-
to register it with the DRM subsystem.
143-
</para>
144-
<para>
145-
Newer drivers that no longer require a <structname>drm_bus</structname>
146-
structure can alternatively use the low-level device initialization and
147-
registration functions such as <function>drm_dev_alloc()</function> and
148-
<function>drm_dev_register()</function> directly.
162+
and then pass it to <function>drm_dev_alloc()</function> to allocate a
163+
device instance. After the device instance is fully initialized it can be
164+
registered (which makes it accessible from userspace) using
165+
<function>drm_dev_register()</function>.
149166
</para>
150167
<para>
151168
The <structname>drm_driver</structname> structure contains static
@@ -296,83 +313,12 @@ char *date;</synopsis>
296313
</sect3>
297314
</sect2>
298315
<sect2>
299-
<title>Device Registration</title>
300-
<para>
301-
A number of functions are provided to help with device registration.
302-
The functions deal with PCI and platform devices, respectively.
303-
</para>
304-
!Edrivers/gpu/drm/drm_pci.c
305-
!Edrivers/gpu/drm/drm_platform.c
306-
<para>
307-
New drivers that no longer rely on the services provided by the
308-
<structname>drm_bus</structname> structure can call the low-level
309-
device registration functions directly. The
310-
<function>drm_dev_alloc()</function> function can be used to allocate
311-
and initialize a new <structname>drm_device</structname> structure.
312-
Drivers will typically want to perform some additional setup on this
313-
structure, such as allocating driver-specific data and storing a
314-
pointer to it in the DRM device's <structfield>dev_private</structfield>
315-
field. Drivers should also set the device's unique name using the
316-
<function>drm_dev_set_unique()</function> function. After it has been
317-
set up a device can be registered with the DRM subsystem by calling
318-
<function>drm_dev_register()</function>. This will cause the device to
319-
be exposed to userspace and will call the driver's
320-
<structfield>.load()</structfield> implementation. When a device is
321-
removed, the DRM device can safely be unregistered and freed by calling
322-
<function>drm_dev_unregister()</function> followed by a call to
323-
<function>drm_dev_unref()</function>.
324-
</para>
316+
<title>Device Instance and Driver Handling</title>
317+
!Pdrivers/gpu/drm/drm_drv.c driver instance overview
325318
!Edrivers/gpu/drm/drm_drv.c
326319
</sect2>
327320
<sect2>
328321
<title>Driver Load</title>
329-
<para>
330-
The <methodname>load</methodname> method is the driver and device
331-
initialization entry point. The method is responsible for allocating and
332-
initializing driver private data, performing resource allocation and
333-
mapping (e.g. acquiring
334-
clocks, mapping registers or allocating command buffers), initializing
335-
the memory manager (<xref linkend="drm-memory-management"/>), installing
336-
the IRQ handler (<xref linkend="drm-irq-registration"/>), setting up
337-
vertical blanking handling (<xref linkend="drm-vertical-blank"/>), mode
338-
setting (<xref linkend="drm-mode-setting"/>) and initial output
339-
configuration (<xref linkend="drm-kms-init"/>).
340-
</para>
341-
<note><para>
342-
If compatibility is a concern (e.g. with drivers converted over from
343-
User Mode Setting to Kernel Mode Setting), care must be taken to prevent
344-
device initialization and control that is incompatible with currently
345-
active userspace drivers. For instance, if user level mode setting
346-
drivers are in use, it would be problematic to perform output discovery
347-
&amp; configuration at load time. Likewise, if user-level drivers
348-
unaware of memory management are in use, memory management and command
349-
buffer setup may need to be omitted. These requirements are
350-
driver-specific, and care needs to be taken to keep both old and new
351-
applications and libraries working.
352-
</para></note>
353-
<synopsis>int (*load) (struct drm_device *, unsigned long flags);</synopsis>
354-
<para>
355-
The method takes two arguments, a pointer to the newly created
356-
<structname>drm_device</structname> and flags. The flags are used to
357-
pass the <structfield>driver_data</structfield> field of the device id
358-
corresponding to the device passed to <function>drm_*_init()</function>.
359-
Only PCI devices currently use this, USB and platform DRM drivers have
360-
their <methodname>load</methodname> method called with flags to 0.
361-
</para>
362-
<sect3>
363-
<title>Driver Private Data</title>
364-
<para>
365-
The driver private hangs off the main
366-
<structname>drm_device</structname> structure and can be used for
367-
tracking various device-specific bits of information, like register
368-
offsets, command buffer status, register state for suspend/resume, etc.
369-
At load time, a driver may simply allocate one and set
370-
<structname>drm_device</structname>.<structfield>dev_priv</structfield>
371-
appropriately; it should be freed and
372-
<structname>drm_device</structname>.<structfield>dev_priv</structfield>
373-
set to NULL when the driver is unloaded.
374-
</para>
375-
</sect3>
376322
<sect3 id="drm-irq-registration">
377323
<title>IRQ Registration</title>
378324
<para>
@@ -465,6 +411,18 @@ char *date;</synopsis>
465411
</para>
466412
</sect3>
467413
</sect2>
414+
<sect2>
415+
<title>Bus-specific Device Registration and PCI Support</title>
416+
<para>
417+
A number of functions are provided to help with device registration.
418+
The functions deal with PCI and platform devices respectively and are
419+
only provided for historical reasons. These are all deprecated and
420+
shouldn't be used in new drivers. Besides that there's a few
421+
helpers for pci drivers.
422+
</para>
423+
!Edrivers/gpu/drm/drm_pci.c
424+
!Edrivers/gpu/drm/drm_platform.c
425+
</sect2>
468426
</sect1>
469427

470428
<!-- Internals: memory management -->
@@ -3646,10 +3604,11 @@ void (*postclose) (struct drm_device *, struct drm_file *);</synopsis>
36463604
plane properties to default value, so that a subsequent open of the
36473605
device will not inherit state from the previous user. It can also be
36483606
used to execute delayed power switching state changes, e.g. in
3649-
conjunction with the vga-switcheroo infrastructure. Beyond that KMS
3650-
drivers should not do any further cleanup. Only legacy UMS drivers might
3651-
need to clean up device state so that the vga console or an independent
3652-
fbdev driver could take over.
3607+
conjunction with the vga_switcheroo infrastructure (see
3608+
<xref linkend="vga_switcheroo"/>). Beyond that KMS drivers should not
3609+
do any further cleanup. Only legacy UMS drivers might need to clean up
3610+
device state so that the vga console or an independent fbdev driver
3611+
could take over.
36533612
</para>
36543613
</sect2>
36553614
<sect2>
@@ -3747,11 +3706,14 @@ int num_ioctls;</synopsis>
37473706
</para></listitem>
37483707
<listitem><para>
37493708
DRM_UNLOCKED - The ioctl handler will be called without locking
3750-
the DRM global mutex
3709+
the DRM global mutex. This is the enforced default for kms drivers
3710+
(i.e. using the DRIVER_MODESET flag) and hence shouldn't be used
3711+
any more for new drivers.
37513712
</para></listitem>
37523713
</itemizedlist>
37533714
</para>
37543715
</para>
3716+
!Edrivers/gpu/drm/drm_ioctl.c
37553717
</sect2>
37563718
</sect1>
37573719
<sect1>
@@ -3949,8 +3911,8 @@ int num_ioctls;</synopsis>
39493911

39503912
<partintro>
39513913
<para>
3952-
This second part of the DRM Developer's Guide documents driver code,
3953-
implementation details and also all the driver-specific userspace
3914+
This second part of the GPU Driver Developer's Guide documents driver
3915+
code, implementation details and also all the driver-specific userspace
39543916
interfaces. Especially since all hardware-acceleration interfaces to
39553917
userspace are driver specific for efficiency and other reasons these
39563918
interfaces can be rather substantial. Hence every driver has its own
@@ -4051,6 +4013,7 @@ int num_ioctls;</synopsis>
40514013
<title>High Definition Audio</title>
40524014
!Pdrivers/gpu/drm/i915/intel_audio.c High Definition Audio over HDMI and Display Port
40534015
!Idrivers/gpu/drm/i915/intel_audio.c
4016+
!Iinclude/drm/i915_component.h
40544017
</sect2>
40554018
<sect2>
40564019
<title>Panel Self Refresh PSR (PSR/SRD)</title>
@@ -4237,6 +4200,20 @@ int num_ioctls;</synopsis>
42374200
!Idrivers/gpu/drm/i915/i915_gem_shrinker.c
42384201
</sect2>
42394202
</sect1>
4203+
<sect1>
4204+
<title>GuC-based Command Submission</title>
4205+
<sect2>
4206+
<title>GuC</title>
4207+
!Pdrivers/gpu/drm/i915/intel_guc_loader.c GuC-specific firmware loader
4208+
!Idrivers/gpu/drm/i915/intel_guc_loader.c
4209+
</sect2>
4210+
<sect2>
4211+
<title>GuC Client</title>
4212+
!Pdrivers/gpu/drm/i915/i915_guc_submission.c GuC-based command submissison
4213+
!Idrivers/gpu/drm/i915/i915_guc_submission.c
4214+
</sect2>
4215+
</sect1>
4216+
42404217
<sect1>
42414218
<title> Tracing </title>
42424219
<para>
@@ -4260,4 +4237,50 @@ int num_ioctls;</synopsis>
42604237
</chapter>
42614238
!Cdrivers/gpu/drm/i915/i915_irq.c
42624239
</part>
4240+
4241+
<part id="vga_switcheroo">
4242+
<title>vga_switcheroo</title>
4243+
<partintro>
4244+
!Pdrivers/gpu/vga/vga_switcheroo.c Overview
4245+
</partintro>
4246+
4247+
<chapter id="modes_of_use">
4248+
<title>Modes of Use</title>
4249+
<sect1>
4250+
<title>Manual switching and manual power control</title>
4251+
!Pdrivers/gpu/vga/vga_switcheroo.c Manual switching and manual power control
4252+
</sect1>
4253+
<sect1>
4254+
<title>Driver power control</title>
4255+
!Pdrivers/gpu/vga/vga_switcheroo.c Driver power control
4256+
</sect1>
4257+
</chapter>
4258+
4259+
<chapter id="pubfunctions">
4260+
<title>Public functions</title>
4261+
!Edrivers/gpu/vga/vga_switcheroo.c
4262+
</chapter>
4263+
4264+
<chapter id="pubstructures">
4265+
<title>Public structures</title>
4266+
!Finclude/linux/vga_switcheroo.h vga_switcheroo_handler
4267+
!Finclude/linux/vga_switcheroo.h vga_switcheroo_client_ops
4268+
</chapter>
4269+
4270+
<chapter id="pubconstants">
4271+
<title>Public constants</title>
4272+
!Finclude/linux/vga_switcheroo.h vga_switcheroo_client_id
4273+
!Finclude/linux/vga_switcheroo.h vga_switcheroo_state
4274+
</chapter>
4275+
4276+
<chapter id="privstructures">
4277+
<title>Private structures</title>
4278+
!Fdrivers/gpu/vga/vga_switcheroo.c vgasr_priv
4279+
!Fdrivers/gpu/vga/vga_switcheroo.c vga_switcheroo_client
4280+
</chapter>
4281+
4282+
!Cdrivers/gpu/vga/vga_switcheroo.c
4283+
!Cinclude/linux/vga_switcheroo.h
4284+
</part>
4285+
42634286
</book>

Documentation/IPMI.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ used to control it:
587587

588588
modprobe ipmi_watchdog timeout=<t> pretimeout=<t> action=<action type>
589589
preaction=<preaction type> preop=<preop type> start_now=x
590-
nowayout=x ifnum_to_use=n
590+
nowayout=x ifnum_to_use=n panic_wdt_timeout=<t>
591591

592592
ifnum_to_use specifies which interface the watchdog timer should use.
593593
The default is -1, which means to pick the first one registered.
@@ -597,7 +597,9 @@ is the amount of seconds before the reset that the pre-timeout panic will
597597
occur (if pretimeout is zero, then pretimeout will not be enabled). Note
598598
that the pretimeout is the time before the final timeout. So if the
599599
timeout is 50 seconds and the pretimeout is 10 seconds, then the pretimeout
600-
will occur in 40 second (10 seconds before the timeout).
600+
will occur in 40 second (10 seconds before the timeout). The panic_wdt_timeout
601+
is the value of timeout which is set on kernel panic, in order to let actions
602+
such as kdump to occur during panic.
601603

602604
The action may be "reset", "power_cycle", or "power_off", and
603605
specifies what to do when the timer times out, and defaults to
@@ -634,6 +636,7 @@ for configuring the watchdog:
634636
ipmi_watchdog.preop=<preop type>
635637
ipmi_watchdog.start_now=x
636638
ipmi_watchdog.nowayout=x
639+
ipmi_watchdog.panic_wdt_timeout=<t>
637640

638641
The options are the same as the module parameter options.
639642

0 commit comments

Comments
 (0)