diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-01 21:44:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-01 21:44:08 -0400 |
commit | 731c7d3a205ba89b475b2aa71b5f13dd6ae3de56 (patch) | |
tree | d2b9c3e0a98b94dfc3e4e60e35622c0143ef4ed4 /drivers/platform | |
parent | 77a87824ed676ca8ff8482e4157d3adb284fd381 (diff) | |
parent | 753e7c8cbd8c503b962294303c7b5e9ea8513443 (diff) |
Merge tag 'drm-for-v4.8' of git://people.freedesktop.org/~airlied/linux
Merge drm updates from Dave Airlie:
"This is the main drm pull request for 4.8.
I'm down with a cold at the moment so hopefully this isn't in too bad
a state, I finished pulling stuff last week mostly (nouveau fixes just
went in today), so only this message should be influenced by illness.
Apologies to anyone who's major feature I missed :-)
Core:
Lockless GEM BO freeing
Non-blocking atomic work
Documentation changes (rst/sphinx)
Prep for new fencing changes
Simple display helpers
Master/auth changes
Register/unregister rework
Loads of trivial patches/fixes.
New stuff:
ARM Mali display driver (not the 3D chip)
sii902x RGB->HDMI bridge
Panel:
Support for new panels
Improved backlight support
Bridge:
Convert ADV7511 to bridge driver
ADV7533 support
TC358767 (DSI/DPI to eDP) encoder chip support
i915:
BXT support enabled by default
GVT-g infrastructure
GuC command submission and fixes
BXT workarounds
SKL/BKL workarounds
Demidlayering device registration
Thundering herd fixes
Missing pci ids
Atomic updates
amdgpu/radeon:
ATPX improvements for better dGPU power control on PX systems
New power features for CZ/BR/ST
Pipelined BO moves and evictions in TTM
GPU scheduler improvements
GPU reset improvements
Overclocking on dGPUs with amdgpu
Polaris powermanagement enabled
nouveau:
GK20A/GM20B volt and clock improvements.
Initial support for GP100/GP104 GPUs, GP104 will not yet support
acceleration due to NVIDIA having not released firmware for them as of yet.
exynos:
Exynos5433 SoC with IOMMU support.
vc4:
Shader validation for branching
imx-drm:
Atomic mode setting conversion
Reworked DMFC FIFO allocation
External bridge support
analogix-dp:
RK3399 eDP support
Lots of fixes.
rockchip:
Lots of small fixes.
msm:
DT bindings cleanups
Shrinker and madvise support
ASoC HDMI codec support
tegra:
Host1x driver cleanups
SOR reworking for DP support
Runtime PM support
omapdrm:
PLL enhancements
Header refactoring
Gamma table support
arcgpu:
Simulator support
virtio-gpu:
Atomic modesetting fixes.
rcar-du:
Misc fixes.
mediatek:
MT8173 HDMI support
sti:
ASOC HDMI codec support
Minor fixes
fsl-dcu:
Suspend/resume support
Bridge support
amdkfd:
Minor fixes.
etnaviv:
Enable GPU clock gating
hisilicon:
Vblank and other fixes"
* tag 'drm-for-v4.8' of git://people.freedesktop.org/~airlied/linux: (1575 commits)
drm/nouveau/gr/nv3x: fix instobj write offsets in gr setup
drm/nouveau/acpi: fix lockup with PCIe runtime PM
drm/nouveau/acpi: check for function 0x1B before using it
drm/nouveau/acpi: return supported DSM functions
drm/nouveau/acpi: ensure matching ACPI handle and supported functions
drm/nouveau/fbcon: fix font width not divisible by 8
drm/amd/powerplay: remove enable_clock_power_gatings_tasks from initialize and resume events
drm/amd/powerplay: move clockgating to after ungating power in pp for uvd/vce
drm/amdgpu: add query device id and revision id into system info entry at CGS
drm/amdgpu: add new definition in bif header
drm/amd/powerplay: rename smum header guards
drm/amdgpu: enable UVD context buffer for older HW
drm/amdgpu: fix default UVD context size
drm/amdgpu: fix incorrect type of info_id
drm/amdgpu: make amdgpu_cgs_call_acpi_method as static
drm/amdgpu: comment out unused defaults_staturn_pro static const structure to fix the build
drm/amdgpu: enable UVD VM only on polaris
drm/amdgpu: increase timeout of IB test
drm/amdgpu: add destroy session when generate VCE destroy msg.
drm/amd: fix deadlock of job_list_lock V2
...
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/apple-gmux.c | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c index 4034d2d4c507..a66be137324c 100644 --- a/drivers/platform/x86/apple-gmux.c +++ b/drivers/platform/x86/apple-gmux.c | |||
@@ -31,19 +31,21 @@ | |||
31 | /** | 31 | /** |
32 | * DOC: Overview | 32 | * DOC: Overview |
33 | * | 33 | * |
34 | * :1: http://www.latticesemi.com/en/Products/FPGAandCPLD/LatticeXP2.aspx | ||
35 | * :2: http://www.renesas.com/products/mpumcu/h8s/h8s2100/h8s2113/index.jsp | ||
36 | * | ||
37 | * gmux is a microcontroller built into the MacBook Pro to support dual GPUs: | 34 | * gmux is a microcontroller built into the MacBook Pro to support dual GPUs: |
38 | * A {1}[Lattice XP2] on pre-retinas, a {2}[Renesas R4F2113] on retinas. | 35 | * A `Lattice XP2`_ on pre-retinas, a `Renesas R4F2113`_ on retinas. |
39 | * | 36 | * |
40 | * (The MacPro6,1 2013 also has a gmux, however it is unclear why since it has | 37 | * (The MacPro6,1 2013 also has a gmux, however it is unclear why since it has |
41 | * dual GPUs but no built-in display.) | 38 | * dual GPUs but no built-in display.) |
42 | * | 39 | * |
43 | * gmux is connected to the LPC bus of the southbridge. Its I/O ports are | 40 | * gmux is connected to the LPC bus of the southbridge. Its I/O ports are |
44 | * accessed differently depending on the microcontroller: Driver functions | 41 | * accessed differently depending on the microcontroller: Driver functions |
45 | * to access a pre-retina gmux are infixed `_pio_`, those for a retina gmux | 42 | * to access a pre-retina gmux are infixed ``_pio_``, those for a retina gmux |
46 | * are infixed `_index_`. | 43 | * are infixed ``_index_``. |
44 | * | ||
45 | * .. _Lattice XP2: | ||
46 | * http://www.latticesemi.com/en/Products/FPGAandCPLD/LatticeXP2.aspx | ||
47 | * .. _Renesas R4F2113: | ||
48 | * http://www.renesas.com/products/mpumcu/h8s/h8s2100/h8s2113/index.jsp | ||
47 | */ | 49 | */ |
48 | 50 | ||
49 | struct apple_gmux_data { | 51 | struct apple_gmux_data { |
@@ -272,15 +274,15 @@ static bool gmux_is_indexed(struct apple_gmux_data *gmux_data) | |||
272 | /** | 274 | /** |
273 | * DOC: Backlight control | 275 | * DOC: Backlight control |
274 | * | 276 | * |
275 | * :3: http://www.ti.com/lit/ds/symlink/lp8543.pdf | ||
276 | * :4: http://www.ti.com/lit/ds/symlink/lp8545.pdf | ||
277 | * | ||
278 | * On single GPU MacBooks, the PWM signal for the backlight is generated by | 277 | * On single GPU MacBooks, the PWM signal for the backlight is generated by |
279 | * the GPU. On dual GPU MacBook Pros by contrast, either GPU may be suspended | 278 | * the GPU. On dual GPU MacBook Pros by contrast, either GPU may be suspended |
280 | * to conserve energy. Hence the PWM signal needs to be generated by a separate | 279 | * to conserve energy. Hence the PWM signal needs to be generated by a separate |
281 | * backlight driver which is controlled by gmux. The earliest generation | 280 | * backlight driver which is controlled by gmux. The earliest generation |
282 | * MBP5 2008/09 uses a {3}[TI LP8543] backlight driver. All newer models | 281 | * MBP5 2008/09 uses a `TI LP8543`_ backlight driver. All newer models |
283 | * use a {4}[TI LP8545]. | 282 | * use a `TI LP8545`_. |
283 | * | ||
284 | * .. _TI LP8543: http://www.ti.com/lit/ds/symlink/lp8543.pdf | ||
285 | * .. _TI LP8545: http://www.ti.com/lit/ds/symlink/lp8545.pdf | ||
284 | */ | 286 | */ |
285 | 287 | ||
286 | static int gmux_get_brightness(struct backlight_device *bd) | 288 | static int gmux_get_brightness(struct backlight_device *bd) |
@@ -312,28 +314,20 @@ static const struct backlight_ops gmux_bl_ops = { | |||
312 | /** | 314 | /** |
313 | * DOC: Graphics mux | 315 | * DOC: Graphics mux |
314 | * | 316 | * |
315 | * :5: http://pimg-fpiw.uspto.gov/fdd/07/870/086/0.pdf | ||
316 | * :6: http://www.nxp.com/documents/data_sheet/CBTL06141.pdf | ||
317 | * :7: http://www.ti.com/lit/ds/symlink/hd3ss212.pdf | ||
318 | * :8: https://www.pericom.com/assets/Datasheets/PI3VDP12412.pdf | ||
319 | * :9: http://www.ti.com/lit/ds/symlink/sn74lv4066a.pdf | ||
320 | * :10: http://pdf.datasheetarchive.com/indexerfiles/Datasheets-SW16/DSASW00308511.pdf | ||
321 | * :11: http://www.ti.com/lit/ds/symlink/ts3ds10224.pdf | ||
322 | * | ||
323 | * On pre-retinas, the LVDS outputs of both GPUs feed into gmux which muxes | 317 | * On pre-retinas, the LVDS outputs of both GPUs feed into gmux which muxes |
324 | * either of them to the panel. One of the tricks gmux has up its sleeve is | 318 | * either of them to the panel. One of the tricks gmux has up its sleeve is |
325 | * to lengthen the blanking interval of its output during a switch to | 319 | * to lengthen the blanking interval of its output during a switch to |
326 | * synchronize it with the GPU switched to. This allows for a flicker-free | 320 | * synchronize it with the GPU switched to. This allows for a flicker-free |
327 | * switch that is imperceptible by the user ({5}[US 8,687,007 B2]). | 321 | * switch that is imperceptible by the user (`US 8,687,007 B2`_). |
328 | * | 322 | * |
329 | * On retinas, muxing is no longer done by gmux itself, but by a separate | 323 | * On retinas, muxing is no longer done by gmux itself, but by a separate |
330 | * chip which is controlled by gmux. The chip is triple sourced, it is | 324 | * chip which is controlled by gmux. The chip is triple sourced, it is |
331 | * either an {6}[NXP CBTL06142], {7}[TI HD3SS212] or {8}[Pericom PI3VDP12412]. | 325 | * either an `NXP CBTL06142`_, `TI HD3SS212`_ or `Pericom PI3VDP12412`_. |
332 | * The panel is driven with eDP instead of LVDS since the pixel clock | 326 | * The panel is driven with eDP instead of LVDS since the pixel clock |
333 | * required for retina resolution exceeds LVDS' limits. | 327 | * required for retina resolution exceeds LVDS' limits. |
334 | * | 328 | * |
335 | * Pre-retinas are able to switch the panel's DDC pins separately. | 329 | * Pre-retinas are able to switch the panel's DDC pins separately. |
336 | * This is handled by a {9}[TI SN74LV4066A] which is controlled by gmux. | 330 | * This is handled by a `TI SN74LV4066A`_ which is controlled by gmux. |
337 | * The inactive GPU can thus probe the panel's EDID without switching over | 331 | * The inactive GPU can thus probe the panel's EDID without switching over |
338 | * the entire panel. Retinas lack this functionality as the chips used for | 332 | * the entire panel. Retinas lack this functionality as the chips used for |
339 | * eDP muxing are incapable of switching the AUX channel separately (see | 333 | * eDP muxing are incapable of switching the AUX channel separately (see |
@@ -344,15 +338,15 @@ static const struct backlight_ops gmux_bl_ops = { | |||
344 | * | 338 | * |
345 | * The external DP port is only fully switchable on the first two unibody | 339 | * The external DP port is only fully switchable on the first two unibody |
346 | * MacBook Pro generations, MBP5 2008/09 and MBP6 2010. This is done by an | 340 | * MacBook Pro generations, MBP5 2008/09 and MBP6 2010. This is done by an |
347 | * {6}[NXP CBTL06141] which is controlled by gmux. It's the predecessor of the | 341 | * `NXP CBTL06141`_ which is controlled by gmux. It's the predecessor of the |
348 | * eDP mux on retinas, the difference being support for 2.7 versus 5.4 Gbit/s. | 342 | * eDP mux on retinas, the difference being support for 2.7 versus 5.4 Gbit/s. |
349 | * | 343 | * |
350 | * The following MacBook Pro generations replaced the external DP port with a | 344 | * The following MacBook Pro generations replaced the external DP port with a |
351 | * combined DP/Thunderbolt port and lost the ability to switch it between GPUs, | 345 | * combined DP/Thunderbolt port and lost the ability to switch it between GPUs, |
352 | * connecting it either to the discrete GPU or the Thunderbolt controller. | 346 | * connecting it either to the discrete GPU or the Thunderbolt controller. |
353 | * Oddly enough, while the full port is no longer switchable, AUX and HPD | 347 | * Oddly enough, while the full port is no longer switchable, AUX and HPD |
354 | * are still switchable by way of an {10}[NXP CBTL03062] (on pre-retinas | 348 | * are still switchable by way of an `NXP CBTL03062`_ (on pre-retinas |
355 | * MBP8 2011 and MBP9 2012) or two {11}[TI TS3DS10224] (on retinas) under the | 349 | * MBP8 2011 and MBP9 2012) or two `TI TS3DS10224`_ (on retinas) under the |
356 | * control of gmux. Since the integrated GPU is missing the main link, | 350 | * control of gmux. Since the integrated GPU is missing the main link, |
357 | * external displays appear to it as phantoms which fail to link-train. | 351 | * external displays appear to it as phantoms which fail to link-train. |
358 | * | 352 | * |
@@ -365,10 +359,19 @@ static const struct backlight_ops gmux_bl_ops = { | |||
365 | * of this feature. | 359 | * of this feature. |
366 | * | 360 | * |
367 | * gmux' initial switch state on bootup is user configurable via the EFI | 361 | * gmux' initial switch state on bootup is user configurable via the EFI |
368 | * variable `gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9` (5th byte, | 362 | * variable ``gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9`` (5th byte, |
369 | * 1 = IGD, 0 = DIS). Based on this setting, the EFI firmware tells gmux to | 363 | * 1 = IGD, 0 = DIS). Based on this setting, the EFI firmware tells gmux to |
370 | * switch the panel and the external DP connector and allocates a framebuffer | 364 | * switch the panel and the external DP connector and allocates a framebuffer |
371 | * for the selected GPU. | 365 | * for the selected GPU. |
366 | * | ||
367 | * .. _US 8,687,007 B2: http://pimg-fpiw.uspto.gov/fdd/07/870/086/0.pdf | ||
368 | * .. _NXP CBTL06141: http://www.nxp.com/documents/data_sheet/CBTL06141.pdf | ||
369 | * .. _NXP CBTL06142: http://www.nxp.com/documents/data_sheet/CBTL06141.pdf | ||
370 | * .. _TI HD3SS212: http://www.ti.com/lit/ds/symlink/hd3ss212.pdf | ||
371 | * .. _Pericom PI3VDP12412: https://www.pericom.com/assets/Datasheets/PI3VDP12412.pdf | ||
372 | * .. _TI SN74LV4066A: http://www.ti.com/lit/ds/symlink/sn74lv4066a.pdf | ||
373 | * .. _NXP CBTL03062: http://pdf.datasheetarchive.com/indexerfiles/Datasheets-SW16/DSASW00308511.pdf | ||
374 | * .. _TI TS3DS10224: http://www.ti.com/lit/ds/symlink/ts3ds10224.pdf | ||
372 | */ | 375 | */ |
373 | 376 | ||
374 | static void gmux_read_switch_state(struct apple_gmux_data *gmux_data) | 377 | static void gmux_read_switch_state(struct apple_gmux_data *gmux_data) |