Skip to content

Commit fffddfd

Browse files
committed
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm merge from Dave Airlie: "Highlights: - TI LCD controller KMS driver - TI OMAP KMS driver merged from staging - drop gma500 stub driver - the fbcon locking fixes - the vgacon dirty like zebra fix. - open firmware videomode and hdmi common code helpers - major locking rework for kms object handling - pageflip/cursor won't block on polling anymore! - fbcon helper and prime helper cleanups - i915: all over the map, haswell power well enhancements, valleyview macro horrors cleaned up, killing lots of legacy GTT code, - radeon: CS ioctl unification, deprecated UMS support, gpu reset rework, VM fixes - nouveau: reworked thermal code, external dp/tmds encoder support (anx9805), fences sleep instead of polling, - exynos: all over the driver fixes." Lovely conflict in radeon/evergreen_cs.c between commit de0babd ("drm/radeon: enforce use of radeon_get_ib_value when reading user cmd") and the new changes that modified that evergreen_dma_cs_parse() function. * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (508 commits) drm/tilcdc: only build on arm drm/i915: Revert hdmi HDP pin checks drm/tegra: Add list of framebuffers to debugfs drm/tegra: Fix color expansion drm/tegra: Split DC_CMD_STATE_CONTROL register write drm/tegra: Implement page-flipping support drm/tegra: Implement VBLANK support drm/tegra: Implement .mode_set_base() drm/tegra: Add plane support drm/tegra: Remove bogus tegra_framebuffer structure drm: Add consistency check for page-flipping drm/radeon: Use generic HDMI infoframe helpers drm/tegra: Use generic HDMI infoframe helpers drm: Add EDID helper documentation drm: Add HDMI infoframe helpers video: Add generic HDMI infoframe helpers drm: Add some missing forward declarations drm: Move mode tables to drm_edid.c drm: Remove duplicate drm_mode_cea_vic() gma500: Fix n, m1 and m2 clock limits for sdvo and lvds ...
2 parents 69086a7 + be88298 commit fffddfd

398 files changed

Lines changed: 23479 additions & 11509 deletions

File tree

Some content is hidden

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

‎Documentation/DocBook/drm.tmpl‎

Lines changed: 64 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,10 @@ char *date;</synopsis>
743743
These two operations are mandatory for GEM drivers that support DRM
744744
PRIME.
745745
</para>
746+
<sect4>
747+
<title>DRM PRIME Helper Functions Reference</title>
748+
!Pdrivers/gpu/drm/drm_prime.c PRIME Helpers
749+
</sect4>
746750
</sect3>
747751
<sect3 id="drm-gem-objects-mapping">
748752
<title>GEM Objects Mapping</title>
@@ -978,10 +982,25 @@ int max_width, max_height;</synopsis>
978982
If the parameters are deemed valid, drivers then create, initialize and
979983
return an instance of struct <structname>drm_framebuffer</structname>.
980984
If desired the instance can be embedded in a larger driver-specific
981-
structure. The new instance is initialized with a call to
982-
<function>drm_framebuffer_init</function> which takes a pointer to DRM
983-
frame buffer operations (struct
984-
<structname>drm_framebuffer_funcs</structname>). Frame buffer operations are
985+
structure. Drivers must fill its <structfield>width</structfield>,
986+
<structfield>height</structfield>, <structfield>pitches</structfield>,
987+
<structfield>offsets</structfield>, <structfield>depth</structfield>,
988+
<structfield>bits_per_pixel</structfield> and
989+
<structfield>pixel_format</structfield> fields from the values passed
990+
through the <parameter>drm_mode_fb_cmd2</parameter> argument. They
991+
should call the <function>drm_helper_mode_fill_fb_struct</function>
992+
helper function to do so.
993+
</para>
994+
995+
<para>
996+
The initailization of the new framebuffer instance is finalized with a
997+
call to <function>drm_framebuffer_init</function> which takes a pointer
998+
to DRM frame buffer operations (struct
999+
<structname>drm_framebuffer_funcs</structname>). Note that this function
1000+
publishes the framebuffer and so from this point on it can be accessed
1001+
concurrently from other threads. Hence it must be the last step in the
1002+
driver's framebuffer initialization sequence. Frame buffer operations
1003+
are
9851004
<itemizedlist>
9861005
<listitem>
9871006
<synopsis>int (*create_handle)(struct drm_framebuffer *fb,
@@ -1022,16 +1041,16 @@ int max_width, max_height;</synopsis>
10221041
</itemizedlist>
10231042
</para>
10241043
<para>
1025-
After initializing the <structname>drm_framebuffer</structname>
1026-
instance drivers must fill its <structfield>width</structfield>,
1027-
<structfield>height</structfield>, <structfield>pitches</structfield>,
1028-
<structfield>offsets</structfield>, <structfield>depth</structfield>,
1029-
<structfield>bits_per_pixel</structfield> and
1030-
<structfield>pixel_format</structfield> fields from the values passed
1031-
through the <parameter>drm_mode_fb_cmd2</parameter> argument. They
1032-
should call the <function>drm_helper_mode_fill_fb_struct</function>
1033-
helper function to do so.
1034-
</para>
1044+
The lifetime of a drm framebuffer is controlled with a reference count,
1045+
drivers can grab additional references with
1046+
<function>drm_framebuffer_reference</function> </para> and drop them
1047+
again with <function>drm_framebuffer_unreference</function>. For
1048+
driver-private framebuffers for which the last reference is never
1049+
dropped (e.g. for the fbdev framebuffer when the struct
1050+
<structname>drm_framebuffer</structname> is embedded into the fbdev
1051+
helper struct) drivers can manually clean up a framebuffer at module
1052+
unload time with
1053+
<function>drm_framebuffer_unregister_private</function>.
10351054
</sect2>
10361055
<sect2>
10371056
<title>Output Polling</title>
@@ -1043,6 +1062,22 @@ int max_width, max_height;</synopsis>
10431062
operation.
10441063
</para>
10451064
</sect2>
1065+
<sect2>
1066+
<title>Locking</title>
1067+
<para>
1068+
Beside some lookup structures with their own locking (which is hidden
1069+
behind the interface functions) most of the modeset state is protected
1070+
by the <code>dev-&lt;mode_config.lock</code> mutex and additionally
1071+
per-crtc locks to allow cursor updates, pageflips and similar operations
1072+
to occur concurrently with background tasks like output detection.
1073+
Operations which cross domains like a full modeset always grab all
1074+
locks. Drivers there need to protect resources shared between crtcs with
1075+
additional locking. They also need to be careful to always grab the
1076+
relevant crtc locks if a modset functions touches crtc state, e.g. for
1077+
load detection (which does only grab the <code>mode_config.lock</code>
1078+
to allow concurrent screen updates on live crtcs).
1079+
</para>
1080+
</sect2>
10461081
</sect1>
10471082

10481083
<!-- Internals: kms initialization and cleanup -->
@@ -1125,6 +1160,12 @@ int max_width, max_height;</synopsis>
11251160
without waiting for rendering or page flip to complete and must block
11261161
any new rendering to the frame buffer until the page flip completes.
11271162
</para>
1163+
<para>
1164+
If a page flip can be successfully scheduled the driver must set the
1165+
<code>drm_crtc-&lt;fb</code> field to the new framebuffer pointed to
1166+
by <code>fb</code>. This is important so that the reference counting
1167+
on framebuffers stays balanced.
1168+
</para>
11281169
<para>
11291170
If a page flip is already pending, the
11301171
<methodname>page_flip</methodname> operation must return
@@ -1609,6 +1650,10 @@ void intel_crt_init(struct drm_device *dev)
16091650
make its properties available to applications.
16101651
</para>
16111652
</sect2>
1653+
<sect2>
1654+
<title>KMS API Functions</title>
1655+
!Edrivers/gpu/drm/drm_crtc.c
1656+
</sect2>
16121657
</sect1>
16131658

16141659
<!-- Internals: kms helper functions -->
@@ -2104,13 +2149,18 @@ void intel_crt_init(struct drm_device *dev)
21042149
<title>fbdev Helper Functions Reference</title>
21052150
!Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers
21062151
!Edrivers/gpu/drm/drm_fb_helper.c
2152+
!Iinclude/drm/drm_fb_helper.h
21072153
</sect2>
21082154
<sect2>
21092155
<title>Display Port Helper Functions Reference</title>
21102156
!Pdrivers/gpu/drm/drm_dp_helper.c dp helpers
21112157
!Iinclude/drm/drm_dp_helper.h
21122158
!Edrivers/gpu/drm/drm_dp_helper.c
21132159
</sect2>
2160+
<sect2>
2161+
<title>EDID Helper Functions Reference</title>
2162+
!Edrivers/gpu/drm/drm_edid.c
2163+
</sect2>
21142164
</sect1>
21152165

21162166
<!-- Internals: vertical blanking -->

‎Documentation/EDID/HOWTO.txt‎

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,30 @@ Makefile environment are given here.
2828
To create binary EDID and C source code files from the existing data
2929
material, simply type "make".
3030

31-
If you want to create your own EDID file, copy the file 1024x768.S and
32-
replace the settings with your own data. The CRC value in the last line
31+
If you want to create your own EDID file, copy the file 1024x768.S,
32+
replace the settings with your own data and add a new target to the
33+
Makefile. Please note that the EDID data structure expects the timing
34+
values in a different way as compared to the standard X11 format.
35+
36+
X11:
37+
HTimings: hdisp hsyncstart hsyncend htotal
38+
VTimings: vdisp vsyncstart vsyncend vtotal
39+
40+
EDID:
41+
#define XPIX hdisp
42+
#define XBLANK htotal-hdisp
43+
#define XOFFSET hsyncstart-hdisp
44+
#define XPULSE hsyncend-hsyncstart
45+
46+
#define YPIX vdisp
47+
#define YBLANK vtotal-vdisp
48+
#define YOFFSET (63+(vsyncstart-vdisp))
49+
#define YPULSE (63+(vsyncend-vsyncstart))
50+
51+
The CRC value in the last line
3352
#define CRC 0x55
34-
is a bit tricky. After a first version of the binary data set is
35-
created, it must be be checked with the "edid-decode" utility which will
53+
also is a bit tricky. After a first version of the binary data set is
54+
created, it must be checked with the "edid-decode" utility which will
3655
most probably complain about a wrong CRC. Fortunately, the utility also
3756
displays the correct CRC which must then be inserted into the source
3857
file. After the make procedure is repeated, the EDID data set is ready
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Device-Tree bindings for tilcdc DRM generic panel output driver
2+
3+
Required properties:
4+
- compatible: value should be "ti,tilcdc,panel".
5+
- panel-info: configuration info to configure LCDC correctly for the panel
6+
- ac-bias: AC Bias Pin Frequency
7+
- ac-bias-intrpt: AC Bias Pin Transitions per Interrupt
8+
- dma-burst-sz: DMA burst size
9+
- bpp: Bits per pixel
10+
- fdd: FIFO DMA Request Delay
11+
- sync-edge: Horizontal and Vertical Sync Edge: 0=rising 1=falling
12+
- sync-ctrl: Horizontal and Vertical Sync: Control: 0=ignore
13+
- raster-order: Raster Data Order Select: 1=Most-to-least 0=Least-to-most
14+
- fifo-th: DMA FIFO threshold
15+
- display-timings: typical videomode of lcd panel. Multiple video modes
16+
can be listed if the panel supports multiple timings, but the 'native-mode'
17+
should be the preferred/default resolution. Refer to
18+
Documentation/devicetree/bindings/video/display-timing.txt for display
19+
timing binding details.
20+
21+
Recommended properties:
22+
- pinctrl-names, pinctrl-0: the pincontrol settings to configure
23+
muxing properly for pins that connect to TFP410 device
24+
25+
Example:
26+
27+
/* Settings for CDTech_S035Q01 / LCD3 cape: */
28+
lcd3 {
29+
compatible = "ti,tilcdc,panel";
30+
pinctrl-names = "default";
31+
pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
32+
panel-info {
33+
ac-bias = <255>;
34+
ac-bias-intrpt = <0>;
35+
dma-burst-sz = <16>;
36+
bpp = <16>;
37+
fdd = <0x80>;
38+
sync-edge = <0>;
39+
sync-ctrl = <1>;
40+
raster-order = <0>;
41+
fifo-th = <0>;
42+
};
43+
display-timings {
44+
native-mode = <&timing0>;
45+
timing0: 320x240 {
46+
hactive = <320>;
47+
vactive = <240>;
48+
hback-porch = <21>;
49+
hfront-porch = <58>;
50+
hsync-len = <47>;
51+
vback-porch = <11>;
52+
vfront-porch = <23>;
53+
vsync-len = <2>;
54+
clock-frequency = <8000000>;
55+
hsync-active = <0>;
56+
vsync-active = <0>;
57+
};
58+
};
59+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Device-Tree bindings for tilcdc DRM encoder slave output driver
2+
3+
Required properties:
4+
- compatible: value should be "ti,tilcdc,slave".
5+
- i2c: the phandle for the i2c device the encoder slave is connected to
6+
7+
Recommended properties:
8+
- pinctrl-names, pinctrl-0: the pincontrol settings to configure
9+
muxing properly for pins that connect to TFP410 device
10+
11+
Example:
12+
13+
hdmi {
14+
compatible = "ti,tilcdc,slave";
15+
i2c = <&i2c0>;
16+
pinctrl-names = "default";
17+
pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
18+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Device-Tree bindings for tilcdc DRM TFP410 output driver
2+
3+
Required properties:
4+
- compatible: value should be "ti,tilcdc,tfp410".
5+
- i2c: the phandle for the i2c device to use for DDC
6+
7+
Recommended properties:
8+
- pinctrl-names, pinctrl-0: the pincontrol settings to configure
9+
muxing properly for pins that connect to TFP410 device
10+
- powerdn-gpio: the powerdown GPIO, pulled low to power down the
11+
TFP410 device (for DPMS_OFF)
12+
13+
Example:
14+
15+
dvicape {
16+
compatible = "ti,tilcdc,tfp410";
17+
i2c = <&i2c2>;
18+
pinctrl-names = "default";
19+
pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>;
20+
powerdn-gpio = <&gpio2 31 0>;
21+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Device-Tree bindings for tilcdc DRM driver
2+
3+
Required properties:
4+
- compatible: value should be "ti,am33xx-tilcdc".
5+
- interrupts: the interrupt number
6+
- reg: base address and size of the LCDC device
7+
8+
Recommended properties:
9+
- interrupt-parent: the phandle for the interrupt controller that
10+
services interrupts for this device.
11+
- ti,hwmods: Name of the hwmod associated to the LCDC
12+
13+
Example:
14+
15+
fb: fb@4830e000 {
16+
compatible = "ti,am33xx-tilcdc";
17+
reg = <0x4830e000 0x1000>;
18+
interrupt-parent = <&intc>;
19+
interrupts = <36>;
20+
ti,hwmods = "lcdc";
21+
};

0 commit comments

Comments
 (0)