]> Git Repo - linux.git/commitdiff
Merge tag 'drm-misc-next-2018-11-07' of git://anongit.freedesktop.org/drm/drm-misc...
authorDave Airlie <[email protected]>
Mon, 19 Nov 2018 00:40:00 +0000 (10:40 +1000)
committerDave Airlie <[email protected]>
Mon, 19 Nov 2018 00:40:33 +0000 (10:40 +1000)
drm-misc-next for v4.21, part 1:

UAPI Changes:
- Add syncobj timeline support to drm.

Cross-subsystem Changes:
- Remove shared fence staging in dma-buf's fence object, and allow
  reserving more than 1 fence and add more paranoia when debugging.
- Constify infoframe functions in video/hdmi.

Core Changes:
- Add vkms todo, and a lot of assorted doc fixes.
- Drop transitional helpers and convert drivers to use drm_atomic_helper_shutdown().
- Move atomic state helper functions to drm_atomic_state_helper.[ch]
- Refactor drm selftests, and add new tests.
- DP MST atomic state cleanups.
- Drop EXPORT_SYMBOL from drm leases.
- Lease cleanups and fixes.
- Create render node for vgem.

Driver Changes:
- Fix build failure in imx without fbdev emulation.
- Add rotation quirk for GPD win2 panel.
- Add support for various CDTech panels, Banana Pi Panel, DLC1010GIG,
  Olimex LCD-O-LinuXino, Samsung S6D16D0, Truly NT35597 WQXGA,
  Himax HX8357D, simulated RTSM AEMv8.
- Add dw_hdmi support to rockchip driver.
- Fix YUV support in vc4.
- Fix resource id handling in virtio.
- Make rockchip use dw-mipi-dsi bridge driver, and add dual dsi support.
- Advertise that tinydrm only supports DRM_FORMAT_MOD_LINEAR.
- Convert many drivers to use atomic helpers, and drm_fbdev_generic_setup().
- Add Mali linear tiled formats, and enable them in the Mali-DP driver.
- Add support for H6 DE3 mixer 0, DW HDMI, HDMI PHY and TCON TOP.
- Assorted driver cleanups and fixes.

Signed-off-by: Dave Airlie <[email protected]>
From: Maarten Lankhorst <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
21 files changed:
1  2 
Documentation/devicetree/bindings/vendor-prefixes.txt
MAINTAINERS
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_connector.c
drivers/gpu/drm/drm_dp_mst_topology.c
drivers/gpu/drm/drm_fb_cma_helper.c
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/drm_lease.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/panel/panel-simple.c
drivers/media/i2c/adv7511.c
drivers/media/i2c/adv7604.c
drivers/media/i2c/adv7842.c
drivers/media/i2c/tc358743.c
drivers/media/i2c/tda1997x.c
drivers/video/hdmi.c
include/drm/drm_atomic.h
include/drm/drm_connector.h
include/linux/hdmi.h

index 4b1a2a8fcc16185cd5fae518e0e2fb953becac6f,0f5453d1823cd7e8917e31b8614da3f4b8265dc9..a2f4451cf3f9c6f579095f6489a2f61b94ca6edf
@@@ -67,6 -67,7 +67,7 @@@ capella       Capella Microsystems, In
  cascoda       Cascoda, Ltd.
  cavium        Cavium, Inc.
  cdns  Cadence Design Systems Inc.
+ cdtech        CDTech(H.K.) Electronics Limited
  ceva  Ceva, Inc.
  chipidea      Chipidea, Inc
  chipone               ChipOne
@@@ -84,7 -85,6 +85,7 @@@ cosmic        Cosmic Circuit
  crane Crane Connectivity Solutions
  creative      Creative Technology Ltd
  crystalfontz  Crystalfontz America, Inc.
 +csky  Hangzhou C-SKY Microsystems Co., Ltd
  cubietech     Cubietech, Ltd.
  cypress       Cypress Semiconductor Corporation
  cznic CZ.NIC, z.s.p.o.
@@@ -115,7 -115,6 +116,7 @@@ elan       Elan Microelectronic Corp
  embest        Shenzhen Embest Technology Co., Ltd.
  emmicro       EM Microelectronic
  emtrion       emtrion GmbH
 +endless       Endless Mobile, Inc.
  energymicro   Silicon Laboratories (formerly Energy Micro AS)
  engicam       Engicam S.r.l.
  epcos EPCOS AG
@@@ -129,7 -128,6 +130,7 @@@ everspin   Everspin Technologies, Inc
  exar  Exar Corporation
  excito        Excito
  ezchip        EZchip Semiconductor
 +facebook      Facebook
  fairphone     Fairphone B.V.
  faraday       Faraday Technology Corporation
  fastrax       Fastrax Oy
@@@ -238,7 -236,6 +239,7 @@@ micrel     Micrel Inc
  microchip     Microchip Technology Inc.
  microcrystal  Micro Crystal AG
  micron        Micron Technology Inc.
 +mikroe                MikroElektronika d.o.o.
  minix MINIX Technology Ltd.
  miramems      MiraMEMS Sensing Technology Co., Ltd.
  mitsubishi    Mitsubishi Electric Corporation
@@@ -278,7 -275,6 +279,7 @@@ nxp        NXP Semiconductor
  okaya Okaya Electric America, Inc.
  oki   Oki Electric Industry Co., Ltd.
  olimex        OLIMEX Ltd.
 +olpc  One Laptop Per Child
  onion Onion Corporation
  onnn  ON Semiconductor Corp.
  ontat On Tat Industrial Company
@@@ -302,7 -298,6 +303,7 @@@ pine64     Pine6
  pixcir  PIXCIR MICROELECTRONICS Co., Ltd
  plathome      Plat'Home Co., Ltd.
  plda  PLDA
 +plx   Broadcom Corporation (formerly PLX Technology)
  portwell      Portwell Inc.
  poslab        Poslab Technology Co., Ltd.
  powervr       PowerVR (deprecated, use img)
diff --combined MAINTAINERS
index b755a89fa3256e557115f0bd3b8a05dcaa5a21cf,ff1f2878e14b24f56c617c9fb6c04b0c9694fc4b..1026150ae90fc80e26687186adc7ef02e08e4f47
@@@ -324,6 -324,7 +324,6 @@@ F: Documentation/ABI/testing/sysfs-bus-
  F:    Documentation/ABI/testing/configfs-acpi
  F:    drivers/pci/*acpi*
  F:    drivers/pci/*/*acpi*
 -F:    drivers/pci/*/*/*acpi*
  F:    tools/power/acpi/
  
  ACPI APEI
@@@ -376,7 -377,7 +376,7 @@@ F: drivers/platform/x86/i2c-multi-insta
  ACPI PMIC DRIVERS
  M:    "Rafael J. Wysocki" <[email protected]>
  M:    Len Brown <[email protected]>
 -R:    Andy Shevchenko <and[email protected]>
 +R:    Andy Shevchenko <and[email protected]>
  R:    Mika Westerberg <[email protected]>
  L:    [email protected]
  Q:    https://patchwork.kernel.org/project/linux-acpi/list/
@@@ -535,7 -536,7 +535,7 @@@ F: Documentation/hwmon/adt747
  F:    drivers/hwmon/adt7475.c
  
  ADVANSYS SCSI DRIVER
 -M:    Matthew Wilcox <[email protected]>
 +M:    Matthew Wilcox <[email protected]>
  M:    Hannes Reinecke <[email protected]>
  L:    [email protected]
  S:    Maintained
@@@ -549,15 -550,6 +549,15 @@@ W:       http://ez.analog.com/community/linux
  S:    Supported
  F:    drivers/input/misc/adxl34x.c
  
 +ADXL372 THREE-AXIS DIGITAL ACCELEROMETER DRIVER
 +M:    Stefan Popa <[email protected]>
 +W:    http://ez.analog.com/community/linux-device-drivers
 +S:    Supported
 +F:    drivers/iio/accel/adxl372.c
 +F:    drivers/iio/accel/adxl372_spi.c
 +F:    drivers/iio/accel/adxl372_i2c.c
 +F:    Documentation/devicetree/bindings/iio/accel/adxl372.txt
 +
  AF9013 MEDIA DRIVER
  M:    Antti Palosaari <[email protected]>
  L:    [email protected]
@@@ -671,13 -663,6 +671,13 @@@ L:       [email protected]
  S:    Maintained
  F:    drivers/crypto/sunxi-ss/
  
 +ALLWINNER VPU DRIVER
 +M:    Maxime Ripard <[email protected]>
 +M:    Paul Kocialkowski <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/staging/media/sunxi/cedrus/
 +
  ALPHA PORT
  M:    Richard Henderson <[email protected]>
  M:    Ivan Kokshaysky <[email protected]>
@@@ -855,7 -840,7 +855,7 @@@ ANALOG DEVICES INC ADGS1408 DRIVE
  M:    Mircea Caprioru <[email protected]>
  S:    Supported
  F:    drivers/mux/adgs1408.c
 -F:    Documentation/devicetree/bindings/mux/adgs1408.txt
 +F:    Documentation/devicetree/bindings/mux/adi,adgs1408.txt
  
  ANALOG DEVICES INC ADP5061 DRIVER
  M:    Stefan Popa <[email protected]>
@@@ -948,7 -933,6 +948,7 @@@ M: Greg Kroah-Hartman <gregkh@linuxfoun
  M:    Arve Hjønnevåg <[email protected]>
  M:    Todd Kjos <[email protected]>
  M:    Martijn Coenen <[email protected]>
 +M:    Joel Fernandes <[email protected]>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
  L:    [email protected]
  S:    Supported
@@@ -1094,29 -1078,6 +1094,29 @@@ F:    arch/arm/include/asm/arch_timer.
  F:    arch/arm64/include/asm/arch_timer.h
  F:    drivers/clocksource/arm_arch_timer.c
  
 +ARM INTEGRATOR, VERSATILE AND REALVIEW SUPPORT
 +M:    Linus Walleij <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/arm/arm-boards
 +F:    Documentation/devicetree/bindings/auxdisplay/arm-charlcd.txt
 +F:    Documentation/devicetree/bindings/clock/arm-integrator.txt
 +F:    Documentation/devicetree/bindings/interrupt-controller/arm,versatile-fpga-irq.txt
 +F:    Documentation/devicetree/bindings/mtd/arm-versatile.txt
 +F:    arch/arm/mach-integrator/
 +F:    arch/arm/mach-realview/
 +F:    arch/arm/mach-versatile/
 +F:    arch/arm/plat-versatile/
 +F:    arch/arm/boot/dts/arm-realview-*
 +F:    arch/arm/boot/dts/integrator*
 +F:    arch/arm/boot/dts/versatile*
 +F:    drivers/clk/versatile/
 +F:    drivers/i2c/busses/i2c-versatile.c
 +F:    drivers/irqchip/irq-versatile-fpga.c
 +F:    drivers/mtd/maps/physmap_of_versatile.c
 +F:    drivers/power/reset/arm-versatile-reboot.c
 +F:    drivers/soc/versatile/
 +
  ARM HDLCD DRM DRIVER
  M:    Liviu Dudau <[email protected]>
  S:    Supported
@@@ -1189,26 -1150,12 +1189,26 @@@ S:   Odd Fixe
  F:    drivers/mmc/host/mmci.*
  F:    include/linux/amba/mmci.h
  
 +ARM PRIMECELL SSP PL022 SPI DRIVER
 +M:    Linus Walleij <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/spi/spi_pl022.txt
 +F:    drivers/spi/spi-pl022.c
 +
  ARM PRIMECELL UART PL010 AND PL011 DRIVERS
  M:    Russell King <[email protected]>
  S:    Odd Fixes
  F:    drivers/tty/serial/amba-pl01*.c
  F:    include/linux/amba/serial.h
  
 +ARM PRIMECELL VIC PL190/PL192 DRIVER
 +M:    Linus Walleij <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/interrupt-controller/arm,vic.txt
 +F:    drivers/irqchip/irq-vic.c
 +
  ARM SMMU DRIVERS
  M:    Will Deacon <[email protected]>
  R:    Robin Murphy <[email protected]>
@@@ -1228,25 -1175,18 +1228,25 @@@ T:   git git://git.kernel.org/pub/scm/lin
  
  ARM/ACTIONS SEMI ARCHITECTURE
  M:    Andreas Färber <[email protected]>
 +R:    Manivannan Sadhasivam <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  N:    owl
  F:    arch/arm/mach-actions/
  F:    arch/arm/boot/dts/owl-*
  F:    arch/arm64/boot/dts/actions/
 -F:    drivers/clocksource/owl-*
 +F:    drivers/clk/actions/
 +F:    drivers/clocksource/timer-owl*
 +F:    drivers/dma/owl-dma.c
 +F:    drivers/i2c/busses/i2c-owl.c
  F:    drivers/pinctrl/actions/*
  F:    drivers/soc/actions/
  F:    include/dt-bindings/power/owl-*
  F:    include/linux/soc/actions/
  F:    Documentation/devicetree/bindings/arm/actions.txt
 +F:    Documentation/devicetree/bindings/clock/actions,owl-cmu.txt
 +F:    Documentation/devicetree/bindings/dma/owl-dma.txt
 +F:    Documentation/devicetree/bindings/i2c/i2c-owl.txt
  F:    Documentation/devicetree/bindings/pinctrl/actions,s900-pinctrl.txt
  F:    Documentation/devicetree/bindings/power/actions,owl-sps.txt
  F:    Documentation/devicetree/bindings/timer/actions,owl-timer.txt
@@@ -1311,7 -1251,7 +1311,7 @@@ N:      meso
  
  ARM/Annapurna Labs ALPINE ARCHITECTURE
  M:    Tsahee Zidenberg <[email protected]>
 -M:    Antoine Tenart <antoine.tenart@free-electrons.com>
 +M:    Antoine Tenart <antoine.tenart@bootlin.com>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-alpine/
@@@ -1522,9 -1462,7 +1522,9 @@@ F:      arch/arm/mach-mxs
  F:    arch/arm/boot/dts/imx*
  F:    arch/arm/configs/imx*_defconfig
  F:    drivers/clk/imx/
 +F:    drivers/firmware/imx/
  F:    drivers/soc/imx/
 +F:    include/linux/firmware/imx/
  F:    include/soc/imx/
  
  ARM/FREESCALE VYBRID ARM ARCHITECTURE
  S:    Maintained
  
  ARM/LPC18XX ARCHITECTURE
 -M:    Joachim Eastwood <manabian@gmail.com>
 +M:    Vladimir Zapolskiy <vz@mleia.com>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/boot/dts/lpc43*
 -F:    drivers/clk/nxp/clk-lpc18xx*
 -F:    drivers/clocksource/time-lpc32xx.c
  F:    drivers/i2c/busses/i2c-lpc2k.c
  F:    drivers/memory/pl172.c
  F:    drivers/mtd/spi-nor/nxp-spifi.c
@@@ -1763,10 -1703,9 +1763,10 @@@ S:    Odd Fixe
  ARM/Microchip (AT91) SoC support
  M:    Nicolas Ferre <[email protected]>
  M:    Alexandre Belloni <[email protected]>
 +M:    Ludovic Desroches <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  W:    http://www.linux4sam.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git
  S:    Supported
  N:    at91
  N:    atmel
@@@ -2146,24 -2085,22 +2146,24 @@@ F:   include/linux/remoteproc/st_slim_rpr
  ARM/STM32 ARCHITECTURE
  M:    Maxime Coquelin <[email protected]>
  M:    Alexandre Torgue <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git stm32-next
  N:    stm32
 +N:    stm
  F:    arch/arm/boot/dts/stm32*
  F:    arch/arm/mach-stm32/
  F:    drivers/clocksource/armv7m_systick.c
  
 -ARM/Synaptics Berlin SoC support
 +ARM/Synaptics SoC support
  M:    Jisheng Zhang <[email protected]>
  M:    Sebastian Hesselbarth <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-berlin/
  F:    arch/arm/boot/dts/berlin*
 -F:    arch/arm64/boot/dts/marvell/berlin*
 +F:    arch/arm64/boot/dts/synaptics/
  
  ARM/TANGO ARCHITECTURE
  M:    Marc Gonzalez <[email protected]>
@@@ -2259,7 -2196,6 +2259,7 @@@ F:      drivers/clk/uniphier
  F:    drivers/gpio/gpio-uniphier.c
  F:    drivers/i2c/busses/i2c-uniphier*
  F:    drivers/irqchip/irq-uniphier-aidet.c
 +F:    drivers/mmc/host/uniphier-sd.c
  F:    drivers/pinctrl/uniphier/
  F:    drivers/reset/reset-uniphier.c
  F:    drivers/tty/serial/8250/8250_uniphier.c
@@@ -2284,7 -2220,7 +2284,7 @@@ F:      arch/arm/mach-vexpress
  F:    */*/vexpress*
  F:    */*/*/vexpress*
  F:    drivers/clk/versatile/clk-vexpress-osc.c
 -F:    drivers/clocksource/versatile.c
 +F:    drivers/clocksource/timer-versatile.c
  N:    mps2
  
  ARM/VFP SUPPORT
@@@ -2306,7 -2242,7 +2306,7 @@@ M:      Tony Prisk <[email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-vt8500/
 -F:    drivers/clocksource/vt8500_timer.c
 +F:    drivers/clocksource/timer-vt8500.c
  F:    drivers/i2c/busses/i2c-wmt.c
  F:    drivers/mmc/host/wmt-sdmmc.c
  F:    drivers/pwm/pwm-vt8500.c
@@@ -2327,6 -2263,7 +2327,6 @@@ F:      arch/arm/mach-pxa/include/mach/z2.
  
  ARM/ZTE ARCHITECTURE
  M:    Jun Nie <[email protected]>
 -M:    Baoyou Xie <[email protected]>
  M:    Shawn Guo <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
@@@ -2370,7 -2307,7 +2370,7 @@@ F:      drivers/cpuidle/cpuidle-zynq.
  F:    drivers/block/xsysace.c
  N:    zynq
  N:    xilinx
 -F:    drivers/clocksource/cadence_ttc_timer.c
 +F:    drivers/clocksource/timer-cadence-ttc.c
  F:    drivers/i2c/busses/i2c-cadence.c
  F:    drivers/mmc/host/sdhci-of-arasan.c
  F:    drivers/edac/synopsys_edac.c
@@@ -2534,6 -2471,42 +2534,6 @@@ F:     drivers/atm
  F:    include/linux/atm*
  F:    include/uapi/linux/atm*
  
 -ATMEL AT91 / AT32 MCI DRIVER
 -M:    Ludovic Desroches <[email protected]>
 -S:    Maintained
 -F:    drivers/mmc/host/atmel-mci.c
 -
 -ATMEL AT91 SAMA5D2-Compatible Shutdown Controller
 -M:    Nicolas Ferre <[email protected]>
 -S:    Supported
 -F:    drivers/power/reset/at91-sama5d2_shdwc.c
 -
 -ATMEL Audio ALSA driver
 -M:    Nicolas Ferre <[email protected]>
 -L:    [email protected] (moderated for non-subscribers)
 -S:    Supported
 -F:    sound/soc/atmel
 -
 -ATMEL I2C DRIVER
 -M:    Ludovic Desroches <[email protected]>
 -L:    [email protected]
 -S:    Supported
 -F:    drivers/i2c/busses/i2c-at91.c
 -
 -ATMEL ISI DRIVER
 -M:    Ludovic Desroches <[email protected]>
 -L:    [email protected]
 -S:    Supported
 -F:    drivers/media/platform/atmel/atmel-isi.c
 -F:    include/media/atmel-isi.h
 -
 -ATMEL LCDFB DRIVER
 -M:    Nicolas Ferre <[email protected]>
 -L:    [email protected]
 -S:    Maintained
 -F:    drivers/video/fbdev/atmel_lcdfb.c
 -F:    include/video/atmel_lcdc.h
 -
  ATMEL MACB ETHERNET DRIVER
  M:    Nicolas Ferre <[email protected]>
  S:    Supported
@@@ -2546,6 -2519,43 +2546,6 @@@ S:     Maintaine
  F:    Documentation/devicetree/bindings/input/atmel,maxtouch.txt
  F:    drivers/input/touchscreen/atmel_mxt_ts.c
  
 -ATMEL SAMA5D2 ADC DRIVER
 -M:    Ludovic Desroches <[email protected]>
 -L:    [email protected]
 -S:    Supported
 -F:    drivers/iio/adc/at91-sama5d2_adc.c
 -
 -ATMEL SDMMC DRIVER
 -M:    Ludovic Desroches <[email protected]>
 -L:    [email protected]
 -S:    Supported
 -F:    drivers/mmc/host/sdhci-of-at91.c
 -
 -ATMEL SPI DRIVER
 -M:    Nicolas Ferre <[email protected]>
 -S:    Supported
 -F:    drivers/spi/spi-atmel.*
 -
 -ATMEL SSC DRIVER
 -M:    Nicolas Ferre <[email protected]>
 -L:    [email protected] (moderated for non-subscribers)
 -S:    Supported
 -F:    drivers/misc/atmel-ssc.c
 -F:    include/linux/atmel-ssc.h
 -
 -ATMEL Timer Counter (TC) AND CLOCKSOURCE DRIVERS
 -M:    Nicolas Ferre <[email protected]>
 -L:    [email protected] (moderated for non-subscribers)
 -S:    Supported
 -F:    drivers/misc/atmel_tclib.c
 -F:    drivers/clocksource/tcb_clksrc.c
 -
 -ATMEL USBA UDC DRIVER
 -M:    Nicolas Ferre <[email protected]>
 -L:    [email protected] (moderated for non-subscribers)
 -S:    Supported
 -F:    drivers/usb/gadget/udc/atmel_usba_udc.*
 -
  ATMEL WIRELESS DRIVER
  M:    Simon Kelley <[email protected]>
  L:    [email protected]
@@@ -2554,6 -2564,13 +2554,6 @@@ W:     http://atmelwlandriver.sourceforge.n
  S:    Maintained
  F:    drivers/net/wireless/atmel/atmel*
  
 -ATMEL XDMA DRIVER
 -M:    Ludovic Desroches <[email protected]>
 -L:    [email protected]
 -L:    [email protected]
 -S:    Supported
 -F:    drivers/dma/at_xdmac.c
 -
  ATOMIC INFRASTRUCTURE
  M:    Will Deacon <[email protected]>
  M:    Peter Zijlstra <[email protected]>
@@@ -2939,6 -2956,7 +2939,6 @@@ F:      include/linux/bcm963xx_tag.
  
  BROADCOM BNX2 GIGABIT ETHERNET DRIVER
  M:    Rasesh Mody <[email protected]>
 -M:    Harish Patil <[email protected]>
  M:    [email protected]
  L:    [email protected]
  S:    Supported
@@@ -2959,7 -2977,6 +2959,7 @@@ F:      drivers/scsi/bnx2i
  
  BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
  M:    Ariel Elior <[email protected]>
 +M:    Sudarsana Kalluru <[email protected]>
  M:    [email protected]
  L:    [email protected]
  S:    Supported
@@@ -2990,14 -3007,6 +2990,14 @@@ S:    Supporte
  F:    drivers/gpio/gpio-brcmstb.c
  F:    Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
  
 +BROADCOM BRCMSTB I2C DRIVER
 +M:    Kamal Dasu <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/i2c/busses/i2c-brcmstb.c
 +F:    Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
 +
  BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER
  M:    Al Cooper <[email protected]>
  L:    [email protected]
@@@ -3105,15 -3114,6 +3105,15 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.txt
  F:    drivers/memory/brcmstb_dpfe.c
  
 +BROADCOM SPI DRIVER
 +M:    Kamal Dasu <[email protected]>
 +M:    [email protected]
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.txt
 +F:    drivers/spi/spi-bcm-qspi.*
 +F:    drivers/spi/spi-brcmstb-qspi.c
 +F:    drivers/spi/spi-iproc-qspi.c
 +
  BROADCOM SYSTEMPORT ETHERNET DRIVER
  M:    Florian Fainelli <[email protected]>
  L:    [email protected]
@@@ -3167,7 -3167,7 +3167,7 @@@ F:      drivers/gpio/gpio-bt8xx.
  
  BTRFS FILE SYSTEM
  M:    Chris Mason <[email protected]>
 -M:    Josef Bacik <jbacik@fb.com>
 +M:    Josef Bacik <josef@toxicpanda.com>
  M:    David Sterba <[email protected]>
  L:    [email protected]
  W:    http://btrfs.wiki.kernel.org/
@@@ -3211,15 -3211,6 +3211,15 @@@ T:    git git://git.alsa-project.org/alsa-
  S:    Maintained
  F:    sound/pci/oxygen/
  
 +C-SKY ARCHITECTURE
 +M:    Guo Ren <[email protected]>
 +T:    git https://github.com/c-sky/csky-linux.git
 +S:    Supported
 +F:    arch/csky/
 +F:    Documentation/devicetree/bindings/csky/
 +K:    csky
 +N:    csky
 +
  C6X ARCHITECTURE
  M:    Mark Salter <[email protected]>
  M:    Aurelien Jacquiot <[email protected]>
@@@ -3683,12 -3674,6 +3683,12 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/media/coda.txt
  F:    drivers/media/platform/coda/
  
 +CODE OF CONDUCT
 +M:    Greg Kroah-Hartman <[email protected]>
 +S:    Supported
 +F:    Documentation/process/code-of-conduct.rst
 +F:    Documentation/process/code-of-conduct-interpretation.rst
 +
  COMMON CLK FRAMEWORK
  M:    Michael Turquette <[email protected]>
  M:    Stephen Boyd <[email protected]>
  S:    Maintained
  F:    drivers/platform/x86/compal-laptop.c
  
 +COMPILER ATTRIBUTES
 +M:    Miguel Ojeda <[email protected]>
 +S:    Maintained
 +F:    include/linux/compiler_attributes.h
 +
  CONEXANT ACCESSRUNNER USB DRIVER
  L:    [email protected]
  W:    http://accessrunner.sourceforge.net/
@@@ -3835,6 -3815,7 +3835,6 @@@ W:      http://www.arm.com/products/processo
  S:    Maintained
  F:    drivers/cpufreq/arm_big_little.h
  F:    drivers/cpufreq/arm_big_little.c
 -F:    drivers/cpufreq/arm_big_little_dt.c
  
  CPU POWER MONITORING SUBSYSTEM
  M:    Thomas Renninger <[email protected]>
@@@ -4051,7 -4032,7 +4051,7 @@@ M:      Uma Krishnan <[email protected]
  L:    [email protected]
  S:    Supported
  F:    drivers/scsi/cxlflash/
 -F:    include/uapi/scsi/cxlflash_ioctls.h
 +F:    include/uapi/scsi/cxlflash_ioctl.h
  F:    Documentation/powerpc/cxlflash.txt
  
  CYBERPRO FB DRIVER
@@@ -4094,7 -4075,7 +4094,7 @@@ D-LINK DIR-685 TOUCHKEYS DRIVE
  M:    Linus Walleij <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    drivers/input/dlink-dir685-touchkeys.c
 +F:    drivers/input/keyboard/dlink-dir685-touchkeys.c
  
  DALLAS/MAXIM DS1685-FAMILY REAL TIME CLOCK
  M:    Joshua Kinard <[email protected]>
@@@ -4190,11 -4171,6 +4190,11 @@@ S:    Maintaine
  F:    drivers/platform/x86/dell-smbios-wmi.c
  F:    tools/wmi/dell-smbios-example.c
  
 +DEFZA FDDI NETWORK DRIVER
 +M:    "Maciej W. Rozycki" <[email protected]>
 +S:    Maintained
 +F:    drivers/net/fddi/defza.*
 +
  DELL LAPTOP DRIVER
  M:    Matthew Garrett <[email protected]>
  M:    Pali Rohár <[email protected]>
@@@ -4212,12 -4188,6 +4212,12 @@@ M:    Pali Rohár <[email protected]
  S:    Maintained
  F:    drivers/platform/x86/dell-rbtn.*
  
 +DELL REMOTE BIOS UPDATE DRIVER
 +M:    Stuart Hayes <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/platform/x86/dell_rbu.c
 +
  DELL LAPTOP SMM DRIVER
  M:    Pali Rohár <[email protected]>
  S:    Maintained
@@@ -4225,11 -4195,10 +4225,11 @@@ F:   drivers/hwmon/dell-smm-hwmon.
  F:    include/uapi/linux/i8k.h
  
  DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas)
 -M:    Doug Warzecha <[email protected]>
 +M:    Stuart Hayes <[email protected]>
 +L:    [email protected]
  S:    Maintained
  F:    Documentation/dcdbas.txt
 -F:    drivers/firmware/dcdbas.*
 +F:    drivers/platform/x86/dcdbas.*
  
  DELL WMI NOTIFICATIONS DRIVER
  M:    Matthew Garrett <[email protected]>
  S:    Maintained
  F:    drivers/gpio/gpio-gpio-mm.c
  
 -DIGI NEO AND CLASSIC PCI PRODUCTS
 -M:    Lidza Louina <[email protected]>
 -M:    Mark Hounschell <[email protected]>
 -L:    [email protected]
 -S:    Maintained
 -F:    drivers/staging/dgnc/
 -
  DIOLAN U2C-12 I2C DRIVER
  M:    Guenter Roeck <[email protected]>
  L:    [email protected]
@@@ -4388,7 -4364,7 +4388,7 @@@ S:      Maintaine
  F:    drivers/i2c/busses/i2c-diolan-u2c.c
  
  FILESYSTEM DIRECT ACCESS (DAX)
 -M:    Matthew Wilcox <[email protected]>
 +M:    Matthew Wilcox <[email protected]>
  M:    Ross Zwisler <[email protected]>
  M:    Jan Kara <[email protected]>
  L:    [email protected]
@@@ -4510,12 -4486,11 +4510,12 @@@ S:   Maintaine
  F:    Documentation/
  F:    scripts/kernel-doc
  X:    Documentation/ABI/
 +X:    Documentation/acpi/
  X:    Documentation/devicetree/
 -X:    Documentation/acpi
 -X:    Documentation/power
 -X:    Documentation/spi
 -X:    Documentation/media
 +X:    Documentation/i2c/
 +X:    Documentation/media/
 +X:    Documentation/power/
 +X:    Documentation/spi/
  T:    git git://git.lwn.net/linux.git docs-next
  
  DOCUMENTATION/ITALIAN
  T:    git git://linuxtv.org/media_tree.git
  S:    Maintained
  F:    drivers/media/i2c/dw9714.c
 +F:    Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.txt
  
  DONGWOON DW9807 LENS VOICE COIL DRIVER
  M:    Sakari Ailus <[email protected]>
  L:    [email protected]
  T:    git git://linuxtv.org/media_tree.git
  S:    Maintained
 -F:    drivers/media/i2c/dw9807.c
 +F:    drivers/media/i2c/dw9807-vcm.c
 +F:    Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.txt
  
  DOUBLETALK DRIVER
  M:    "James R. Van Zandt" <[email protected]>
@@@ -4555,13 -4528,9 +4555,13 @@@ F:    drivers/soc/fsl/dpi
  
  DPAA2 ETHERNET DRIVER
  M:    Ioana Radulescu <[email protected]>
 -L:    linux-kernel@vger.kernel.org
 +L:    netdev@vger.kernel.org
  S:    Maintained
 -F:    drivers/staging/fsl-dpaa2/ethernet
 +F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth*
 +F:    drivers/net/ethernet/freescale/dpaa2/dpni*
 +F:    drivers/net/ethernet/freescale/dpaa2/dpkg.h
 +F:    drivers/net/ethernet/freescale/dpaa2/Makefile
 +F:    drivers/net/ethernet/freescale/dpaa2/Kconfig
  
  DPAA2 ETHERNET SWITCH DRIVER
  M:    Ioana Radulescu <[email protected]>
@@@ -4572,10 -4541,9 +4572,10 @@@ F:    drivers/staging/fsl-dpaa2/eths
  
  DPAA2 PTP CLOCK DRIVER
  M:    Yangbo Lu <[email protected]>
 -L:    linux-kernel@vger.kernel.org
 +L:    netdev@vger.kernel.org
  S:    Maintained
 -F:    drivers/staging/fsl-dpaa2/rtc
 +F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp*
 +F:    drivers/net/ethernet/freescale/dpaa2/dprtc*
  
  DPT_I2O SCSI RAID DRIVER
  M:    Adaptec OEM Raid Solutions <[email protected]>
@@@ -4655,6 -4623,13 +4655,13 @@@ S:    Maintaine
  F:    drivers/gpu/drm/tinydrm/ili9225.c
  F:    Documentation/devicetree/bindings/display/ilitek,ili9225.txt
  
+ DRM DRIVER FOR HX8357D PANELS
+ M:    Eric Anholt <[email protected]>
+ T:    git git://anongit.freedesktop.org/drm/drm-misc
+ S:    Maintained
+ F:    drivers/gpu/drm/tinydrm/hx8357d.c
+ F:    Documentation/devicetree/bindings/display/himax,hx8357d.txt
  DRM DRIVER FOR INTEL I810 VIDEO CARDS
  S:    Orphan / Obsolete
  F:    drivers/gpu/drm/i810/
@@@ -4696,6 -4671,12 +4703,12 @@@ S:    Supporte
  F:    drivers/gpu/drm/nouveau/
  F:    include/uapi/drm/nouveau_drm.h
  
+ DRM DRIVER FOR OLIMEX LCD-OLINUXINO PANELS
+ M:    Stefan Mavrodiev <[email protected]>
+ S:    Maintained
+ F:    drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
+ F:    Documentation/devicetree/bindings/display/panel/olimex,lcd-olinuxino.txt
  DRM DRIVER FOR PERVASIVE DISPLAYS REPAPER PANELS
  M:    Noralf Trønnes <[email protected]>
  S:    Maintained
@@@ -5367,8 -5348,7 +5380,8 @@@ S:      Maintaine
  F:    drivers/edac/r82600_edac.c
  
  EDAC-SBRIDGE
 -M:    Mauro Carvalho Chehab <[email protected]>
 +M:    Tony Luck <[email protected]>
 +R:    Qiuxu Zhuo <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/edac/sb_edac.c
  S:    Maintained
  F:    drivers/edac/ti_edac.c
  
 +EDAC-QCOM
 +M:    Channagoud Kadabi <[email protected]>
 +M:    Venkata Narendra Kumar Gutta <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/edac/qcom_edac.c
 +
  EDIROL UA-101/UA-1000 DRIVER
  M:    Clemens Ladisch <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -5516,8 -5488,7 +5529,8 @@@ S:      Odd Fixe
  F:    drivers/net/ethernet/agere/
  
  ETHERNET BRIDGE
 -M:    Stephen Hemminger <[email protected]>
 +M:    Roopa Prabhu <[email protected]>
 +M:    Nikolay Aleksandrov <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected]
  W:    http://www.linuxfoundation.org/en/Net:Bridge
@@@ -5561,7 -5532,7 +5574,7 @@@ W:      http://ext4.wiki.kernel.or
  Q:    http://patchwork.ozlabs.org/project/linux-ext4/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
  S:    Maintained
 -F:    Documentation/filesystems/ext4.txt
 +F:    Documentation/filesystems/ext4/ext4.rst
  F:    fs/ext4/
  
  Extended Verification Module (EVM)
@@@ -5671,9 -5642,10 +5684,9 @@@ F:     Documentation/fault-injection
  F:    lib/fault-inject.c
  
  FBTFT Framebuffer drivers
 -M:    Thomas Petazzoni <[email protected]>
 +S:    Orphan
  L:    [email protected]
  L:    [email protected]
 -S:    Maintained
  F:    drivers/staging/fbtft/
  
  FC0011 TUNER DRIVER
  S:    Maintained
  F:    drivers/i2c/busses/i2c-cpm.c
  
 +FREESCALE IMX LPI2C DRIVER
 +M:    Dong Aisheng <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/i2c/busses/i2c-imx-lpi2c.c
 +F:    Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.txt
 +
  FREESCALE IMX / MXC FEC DRIVER
  M:    Fugang Duan <[email protected]>
  L:    [email protected]
@@@ -6508,7 -6472,6 +6521,7 @@@ F:      Documentation/devicetree/bindings/hw
  F:    Documentation/hwmon/
  F:    drivers/hwmon/
  F:    include/linux/hwmon*.h
 +F:    include/trace/events/hwmon*.h
  
  HARDWARE RANDOM NUMBER GENERATOR CORE
  M:    Matt Mackall <[email protected]>
@@@ -6607,9 -6570,9 +6620,9 @@@ F:      arch/*/include/asm/suspend*.
  
  HID CORE LAYER
  M:    Jiri Kosina <[email protected]>
 -R:    Benjamin Tissoires <[email protected]>
 +M:    Benjamin Tissoires <[email protected]>
  L:    [email protected]
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
  S:    Maintained
  F:    drivers/hid/
  F:    include/linux/hid*
@@@ -6817,12 -6780,6 +6830,12 @@@ S:    Maintaine
  F:    mm/memory-failure.c
  F:    mm/hwpoison-inject.c
  
 +HYGON PROCESSOR SUPPORT
 +M:    Pu Wen <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    arch/x86/kernel/cpu/hygon.c
 +
  Hyper-V CORE AND DRIVERS
  M:    "K. Y. Srinivasan" <[email protected]>
  M:    Haiyang Zhang <[email protected]>
  S:    Maintained
  F:    drivers/i2c/i2c-core-acpi.c
  
 +I2C CONTROLLER DRIVER FOR NVIDIA GPU
 +M:    Ajay Gupta <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/i2c/busses/i2c-nvidia-gpu
 +F:    drivers/i2c/busses/i2c-nvidia-gpu.c
 +
  I2C MUXES
  M:    Peter Rosin <[email protected]>
  L:    [email protected]
@@@ -7374,12 -7324,6 +7387,12 @@@ L:    [email protected] (moderat
  S:    Supported
  F:    sound/soc/intel/
  
 +INTEL ATOMISP2 DUMMY / POWER-MANAGEMENT DRIVER
 +M:    Hans de Goede <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/platform/x86/intel_atomisp2_pm.c
 +
  INTEL C600 SERIES SAS CONTROLLER DRIVER
  M:    Intel SCU Linux support <[email protected]>
  M:    Artur Paszkiewicz <[email protected]>
@@@ -7415,16 -7359,15 +7428,16 @@@ T:   git git://git.kernel.org/pub/scm/lin
  S:    Supported
  F:    Documentation/networking/e100.rst
  F:    Documentation/networking/e1000.rst
 -F:    Documentation/networking/e1000e.txt
 -F:    Documentation/networking/igb.txt
 -F:    Documentation/networking/igbvf.txt
 -F:    Documentation/networking/ixgb.txt
 -F:    Documentation/networking/ixgbe.txt
 -F:    Documentation/networking/ixgbevf.txt
 -F:    Documentation/networking/i40e.txt
 -F:    Documentation/networking/i40evf.txt
 -F:    Documentation/networking/ice.txt
 +F:    Documentation/networking/e1000e.rst
 +F:    Documentation/networking/fm10k.rst
 +F:    Documentation/networking/igb.rst
 +F:    Documentation/networking/igbvf.rst
 +F:    Documentation/networking/ixgb.rst
 +F:    Documentation/networking/ixgbe.rst
 +F:    Documentation/networking/ixgbevf.rst
 +F:    Documentation/networking/i40e.rst
 +F:    Documentation/networking/iavf.rst
 +F:    Documentation/networking/ice.rst
  F:    drivers/net/ethernet/intel/
  F:    drivers/net/ethernet/intel/*/
  F:    include/linux/avf/virtchnl.h
@@@ -7446,12 -7389,6 +7459,12 @@@ T:    git https://github.com/intel/gvt-lin
  S:    Supported
  F:    drivers/gpu/drm/i915/gvt/
  
 +INTEL PMIC GPIO DRIVER
 +R:    Andy Shevchenko <[email protected]>
 +S:    Maintained
 +F:    drivers/gpio/gpio-*cove.c
 +F:    drivers/gpio/gpio-msic.c
 +
  INTEL HID EVENT DRIVER
  M:    Alex Hung <[email protected]>
  L:    [email protected]
@@@ -7566,6 -7503,7 +7579,6 @@@ M:      Rajneesh Bhardwaj <rajneesh.bhardwaj
  M:    Vishwanath Somayaji <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    arch/x86/include/asm/pmc_core.h
  F:    drivers/platform/x86/intel_pmc_core*
  
  INTEL PMC/P-Unit IPC DRIVER
@@@ -7577,14 -7515,6 +7590,14 @@@ F:    drivers/platform/x86/intel_punit_ipc
  F:    arch/x86/include/asm/intel_pmc_ipc.h
  F:    arch/x86/include/asm/intel_punit_ipc.h
  
 +INTEL MULTIFUNCTION PMIC DEVICE DRIVERS
 +R:    Andy Shevchenko <[email protected]>
 +S:    Maintained
 +F:    drivers/mfd/intel_msic.c
 +F:    drivers/mfd/intel_soc_pmic*
 +F:    include/linux/mfd/intel_msic.h
 +F:    include/linux/mfd/intel_soc_pmic*
 +
  INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
  M:    Stanislav Yakovlev <[email protected]>
  L:    [email protected]
@@@ -7608,9 -7538,16 +7621,9 @@@ S:     Supporte
  F:    drivers/infiniband/hw/i40iw/
  F:    include/uapi/rdma/i40iw-abi.h
  
 -INTEL SHA MULTIBUFFER DRIVER
 -M:    Megha Dey <[email protected]>
 -R:    Tim Chen <[email protected]>
 -L:    [email protected]
 -S:    Supported
 -F:    arch/x86/crypto/sha*-mb/
 -F:    crypto/mcryptd.c
 -
  INTEL TELEMETRY DRIVER
 -M:    Souvik Kumar Chakravarty <[email protected]>
 +M:    Rajneesh Bhardwaj <[email protected]>
 +M:    "David E. Box" <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    arch/x86/include/asm/intel_telemetry.h
@@@ -7716,7 -7653,6 +7729,7 @@@ M:      Corey Minyard <[email protected]
  L:    [email protected] (moderated for non-subscribers)
  W:    http://openipmi.sourceforge.net/
  S:    Supported
 +F:    Documentation/devicetree/bindings/ipmi/
  F:    Documentation/IPMI.txt
  F:    drivers/char/ipmi/
  F:    include/linux/ipmi*
@@@ -7753,6 -7689,7 +7766,6 @@@ IPX NETWORK LAYE
  L:    [email protected]
  S:    Obsolete
  F:    include/uapi/linux/ipx.h
 -F:    drivers/staging/ipx/
  
  IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
  M:    Marc Zyngier <[email protected]>
@@@ -8187,7 -8124,6 +8200,7 @@@ F:      security/keys/encrypted-keys
  
  KEYS-TRUSTED
  M:    James Bottomley <[email protected]>
 +M:      Jarkko Sakkinen <[email protected]>
  M:    Mimi Zohar <[email protected]>
  L:    [email protected]
  L:    [email protected]
@@@ -8265,25 -8201,6 +8278,25 @@@ S:    Maintaine
  F:    net/l3mdev
  F:    include/net/l3mdev.h
  
 +L7 BPF FRAMEWORK
 +M:    John Fastabend <[email protected]>
 +M:    Daniel Borkmann <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    include/linux/skmsg.h
 +F:    net/core/skmsg.c
 +F:    net/core/sock_map.c
 +F:    net/ipv4/tcp_bpf.c
 +
 +LANTIQ / INTEL Ethernet drivers
 +M:    Hauke Mehrtens <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    net/dsa/tag_gswip.c
 +F:    drivers/net/ethernet/lantiq_xrx200.c
 +F:    drivers/net/dsa/lantiq_pce.h
 +F:    drivers/net/dsa/lantiq_gswip.c
 +
  LANTIQ MIPS ARCHITECTURE
  M:    John Crispin <[email protected]>
  L:    [email protected]
@@@ -8343,14 -8260,6 +8356,14 @@@ W:    http://legousb.sourceforge.net
  S:    Maintained
  F:    drivers/usb/misc/legousbtower.c
  
 +LG LAPTOP EXTRAS
 +M:    Matan Ziv-Av <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-platform-lg-laptop
 +F:    Documentation/laptops/lg-laptop.rst
 +F:    drivers/platform/x86/lg-laptop.c
 +
  LG2160 MEDIA DRIVER
  M:    Michael Krufky <[email protected]>
  L:    [email protected]
@@@ -8374,7 -8283,7 +8387,7 @@@ F:      drivers/media/dvb-frontends/lgdt3305
  LIBATA PATA ARASAN COMPACT FLASH CONTROLLER
  M:    Viresh Kumar <[email protected]>
  L:    [email protected]
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
  S:    Maintained
  F:    include/linux/pata_arasan_cf_data.h
  F:    drivers/ata/pata_arasan_cf.c
@@@ -8391,7 -8300,7 +8404,7 @@@ F:      drivers/ata/ata_generic.
  LIBATA PATA FARADAY FTIDE010 AND GEMINI SATA BRIDGE DRIVERS
  M:    Linus Walleij <[email protected]>
  L:    [email protected]
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
  S:    Maintained
  F:    drivers/ata/pata_ftide010.c
  F:    drivers/ata/sata_gemini.c
@@@ -8410,7 -8319,7 +8423,7 @@@ F:      include/linux/ahci_platform.
  LIBATA SATA PROMISE TX2/TX4 CONTROLLER DRIVER
  M:    Mikael Pettersson <[email protected]>
  L:    [email protected]
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
  S:    Maintained
  F:    drivers/ata/sata_promise.*
  
@@@ -8707,6 -8616,7 +8720,6 @@@ F:      include/linux/spinlock*.
  F:    arch/*/include/asm/spinlock*.h
  F:    include/linux/rwlock*.h
  F:    include/linux/mutex*.h
 -F:    arch/*/include/asm/mutex*.h
  F:    include/linux/rwsem*.h
  F:    arch/*/include/asm/rwsem.h
  F:    include/linux/seqlock.h
@@@ -8734,18 -8644,11 +8747,18 @@@ F:   drivers/message/fusion
  F:    drivers/scsi/mpt3sas/
  
  LSILOGIC/SYMBIOS/NCR 53C8XX and 53C1010 PCI-SCSI drivers
 -M:    Matthew Wilcox <[email protected]>
 +M:    Matthew Wilcox <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/scsi/sym53c8xx_2/
  
 +LTC1660 DAC DRIVER
 +M:    Marcus Folkesson <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/iio/dac/ltc1660.txt
 +F:    drivers/iio/dac/ltc1660.c
 +
  LTC4261 HARDWARE MONITOR DRIVER
  M:    Guenter Roeck <[email protected]>
  L:    [email protected]
@@@ -8859,7 -8762,7 +8872,7 @@@ M:      Vivien Didelot <vivien.didelot@savoi
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/dsa/mv88e6xxx/
 -F:    linux/platform_data/mv88e6xxx.h
 +F:    include/linux/platform_data/mv88e6xxx.h
  F:    Documentation/devicetree/bindings/net/dsa/marvell.txt
  
  MARVELL ARMADA DRM SUPPORT
@@@ -8910,7 -8813,7 +8923,7 @@@ S:      Maintaine
  F:    drivers/net/phy/marvell10g.c
  
  MARVELL MVNETA ETHERNET DRIVER
 -M:    Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 +M:    Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/ethernet/marvell/mvneta.*
@@@ -8949,15 -8852,6 +8962,15 @@@ S:    Supporte
  F:    drivers/mmc/host/sdhci-xenon*
  F:    Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.txt
  
 +MARVELL OCTEONTX2 RVU ADMIN FUNCTION DRIVER
 +M:    Sunil Goutham <[email protected]>
 +M:    Linu Cherian <[email protected]>
 +M:    Geetha sowjanya <[email protected]>
 +M:    Jerin Jacob <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/net/ethernet/marvell/octeontx2/af/
 +
  MATROX FRAMEBUFFER DRIVER
  L:    [email protected]
  S:    Orphan
@@@ -8971,6 -8865,13 +8984,6 @@@ S:     Maintaine
  F:    Documentation/hwmon/max16065
  F:    drivers/hwmon/max16065.c
  
 -MAX20751 HARDWARE MONITOR DRIVER
 -M:    Guenter Roeck <[email protected]>
 -L:    [email protected]
 -S:    Maintained
 -F:    Documentation/hwmon/max20751
 -F:    drivers/hwmon/max20751.c
 -
  MAX2175 SDR TUNER DRIVER
  M:    Ramesh Shanmugasundaram <[email protected]>
  L:    [email protected]
@@@ -9109,10 -9010,11 +9122,10 @@@ F:   drivers/media/dvb-frontends/cxd2880/
  F:    drivers/media/spi/cxd2880*
  
  MEDIA DRIVERS FOR DIGITAL DEVICES PCIE DEVICES
 -M:    Daniel Scheller <[email protected]>
  L:    [email protected]
  W:    https://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
 -S:    Maintained
 +S:    Orphan
  F:    drivers/media/pci/ddbridge/*
  
  MEDIA DRIVERS FOR FREESCALE IMX
@@@ -9127,13 -9029,6 +9140,13 @@@ F:    drivers/staging/media/imx
  F:    include/linux/imx-media.h
  F:    include/media/imx.h
  
 +MEDIA DRIVER FOR FREESCALE IMX PXP
 +M:    Philipp Zabel <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/platform/imx-pxp.[ch]
 +
  MEDIA DRIVERS FOR HELENE
  M:    Abylay Ospan <[email protected]>
  L:    [email protected]
@@@ -9164,10 -9059,11 +9177,10 @@@ S:   Supporte
  F:    drivers/media/dvb-frontends/lnbh25*
  
  MEDIA DRIVERS FOR MXL5XX TUNER DEMODULATORS
 -M:    Daniel Scheller <[email protected]>
  L:    [email protected]
  W:    https://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
 -S:    Maintained
 +S:    Orphan
  F:    drivers/media/dvb-frontends/mxl5xx*
  
  MEDIA DRIVERS FOR NETUP PCI UNIVERSAL DVB devices
@@@ -9210,7 -9106,7 +9223,7 @@@ F:      drivers/media/platform/rcar-fcp.
  F:    include/media/rcar-fcp.h
  
  MEDIA DRIVERS FOR RENESAS - FDP1
 -M:    Kieran Bingham <kieran@bingham.xyz>
 +M:    Kieran Bingham <kieran[email protected]>
  L:    [email protected]
  L:    [email protected]
  T:    git git://linuxtv.org/media_tree.git
@@@ -9230,7 -9126,6 +9243,7 @@@ F:      drivers/media/platform/rcar-vin
  
  MEDIA DRIVERS FOR RENESAS - VSP1
  M:    Laurent Pinchart <[email protected]>
 +M:    Kieran Bingham <[email protected]>
  L:    [email protected]
  L:    [email protected]
  T:    git git://linuxtv.org/media_tree.git
@@@ -9239,17 -9134,19 +9252,17 @@@ F:   Documentation/devicetree/bindings/me
  F:    drivers/media/platform/vsp1/
  
  MEDIA DRIVERS FOR ST STV0910 DEMODULATOR ICs
 -M:    Daniel Scheller <[email protected]>
  L:    [email protected]
  W:    https://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
 -S:    Maintained
 +S:    Orphan
  F:    drivers/media/dvb-frontends/stv0910*
  
  MEDIA DRIVERS FOR ST STV6111 TUNER ICs
 -M:    Daniel Scheller <[email protected]>
  L:    [email protected]
  W:    https://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
 -S:    Maintained
 +S:    Orphan
  F:    drivers/media/dvb-frontends/stv6111*
  
  MEDIA DRIVERS FOR STM32 - DCMI
@@@ -9616,7 -9513,7 +9629,7 @@@ MEN Z069 WATCHDOG DRIVE
  M:    Johannes Thumshirn <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    drivers/watchdog/menz069_wdt.c
 +F:    drivers/watchdog/menz69_wdt.c
  
  MESON AO CEC DRIVER FOR AMLOGIC SOCS
  M:    Neil Armstrong <[email protected]>
@@@ -9635,20 -9532,13 +9648,20 @@@ T:   git git://git.monstr.eu/linux-2.6-mi
  S:    Supported
  F:    arch/microblaze/
  
 -MICROCHIP / ATMEL AT91 SERIAL DRIVER
 +MICROCHIP AT91 SERIAL DRIVER
  M:    Richard Genoud <[email protected]>
  S:    Maintained
  F:    drivers/tty/serial/atmel_serial.c
  F:    drivers/tty/serial/atmel_serial.h
 +F:    Documentation/devicetree/bindings/mfd/atmel-usart.txt
 +
 +MICROCHIP AUDIO ASOC DRIVERS
 +M:    Codrin Ciubotariu <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Supported
 +F:    sound/soc/atmel
  
 -MICROCHIP / ATMEL DMA DRIVER
 +MICROCHIP DMA DRIVER
  M:    Ludovic Desroches <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected]
@@@ -9656,50 -9546,27 +9669,50 @@@ S:   Supporte
  F:    drivers/dma/at_hdmac.c
  F:    drivers/dma/at_hdmac_regs.h
  F:    include/linux/platform_data/dma-atmel.h
 +F:    Documentation/devicetree/bindings/dma/atmel-dma.txt
 +F:    include/dt-bindings/dma/at91.h
  
 -MICROCHIP / ATMEL ECC DRIVER
 +MICROCHIP ECC DRIVER
  M:    Tudor Ambarus <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/crypto/atmel-ecc.*
  
 -MICROCHIP / ATMEL ISC DRIVER
 -M:    Songjun Wu <[email protected]>
 +MICROCHIP I2C DRIVER
 +M:    Ludovic Desroches <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/i2c/busses/i2c-at91.c
 +
 +MICROCHIP ISC DRIVER
 +M:    Eugen Hristev <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    drivers/media/platform/atmel/atmel-isc.c
  F:    drivers/media/platform/atmel/atmel-isc-regs.h
  F:    devicetree/bindings/media/atmel-isc.txt
  
 -MICROCHIP / ATMEL NAND DRIVER
 -M:    Josh Wu <rainyfeeling@outlook.com>
 -L:    linux-m[email protected].org
 +MICROCHIP ISI DRIVER
 +M:    Eugen Hristev <eugen.hristev@microchip.com>
 +L:    linux-m[email protected].org
  S:    Supported
 -F:    drivers/mtd/nand/raw/atmel/*
 -F:    Documentation/devicetree/bindings/mtd/atmel-nand.txt
 +F:    drivers/media/platform/atmel/atmel-isi.c
 +F:    include/media/atmel-isi.h
 +
 +MICROCHIP AT91 USART MFD DRIVER
 +M:    Radu Pirea <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/mfd/at91-usart.c
 +F:    include/dt-bindings/mfd/at91-usart.h
 +F:    Documentation/devicetree/bindings/mfd/atmel-usart.txt
 +
 +MICROCHIP AT91 USART SPI DRIVER
 +M:    Radu Pirea <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/spi/spi-at91-usart.c
 +F:    Documentation/devicetree/bindings/mfd/atmel-usart.txt
  
  MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
  M:    Woojung Huh <[email protected]>
  S:    Maintained
  F:    drivers/net/ethernet/microchip/lan743x_*
  
 +MICROCHIP LCDFB DRIVER
 +M:    Nicolas Ferre <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/video/fbdev/atmel_lcdfb.c
 +F:    include/video/atmel_lcdc.h
 +
 +MICROCHIP MMC/SD/SDIO MCI DRIVER
 +M:    Ludovic Desroches <[email protected]>
 +S:    Maintained
 +F:    drivers/mmc/host/atmel-mci.c
 +
 +MICROCHIP MCP3911 ADC DRIVER
 +M:    Marcus Folkesson <[email protected]>
 +M:    Kent Gustavsson <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/iio/adc/mcp3911.c
 +F:    Documentation/devicetree/bindings/iio/adc/mcp3911.txt
 +
 +MICROCHIP NAND DRIVER
 +M:    Tudor Ambarus <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/mtd/nand/raw/atmel/*
 +F:    Documentation/devicetree/bindings/mtd/atmel-nand.txt
 +
 +MICROCHIP PWM DRIVER
 +M:    Claudiu Beznea <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/pwm/pwm-atmel.c
 +F:    Documentation/devicetree/bindings/pwm/atmel-pwm.txt
 +
 +MICROCHIP SAMA5D2-COMPATIBLE ADC DRIVER
 +M:    Ludovic Desroches <[email protected]>
 +M:    Eugen Hristev <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/iio/adc/at91-sama5d2_adc.c
 +F:    Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt
 +F:    include/dt-bindings/iio/adc/at91-sama5d2_adc.h
 +
 +MICROCHIP SAMA5D2-COMPATIBLE SHUTDOWN CONTROLLER
 +M:    Nicolas Ferre <[email protected]>
 +S:    Supported
 +F:    drivers/power/reset/at91-sama5d2_shdwc.c
 +
 +MICROCHIP SPI DRIVER
 +M:    Nicolas Ferre <[email protected]>
 +S:    Supported
 +F:    drivers/spi/spi-atmel.*
 +
 +MICROCHIP SSC DRIVER
 +M:    Nicolas Ferre <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Supported
 +F:    drivers/misc/atmel-ssc.c
 +F:    include/linux/atmel-ssc.h
 +
 +MICROCHIP TIMER COUNTER (TC) AND CLOCKSOURCE DRIVERS
 +M:    Nicolas Ferre <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Supported
 +F:    drivers/misc/atmel_tclib.c
 +F:    drivers/clocksource/tcb_clksrc.c
 +
 +MICROCHIP USBA UDC DRIVER
 +M:    Cristian Birsan <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Supported
 +F:    drivers/usb/gadget/udc/atmel_usba_udc.*
 +
  MICROCHIP USB251XB DRIVER
  M:    Richard Leitner <[email protected]>
  L:    [email protected]
@@@ -9799,13 -9592,6 +9812,13 @@@ S:    Maintaine
  F:    drivers/usb/misc/usb251xb.c
  F:    Documentation/devicetree/bindings/usb/usb251xb.txt
  
 +MICROCHIP XDMA DRIVER
 +M:    Ludovic Desroches <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/dma/at_xdmac.c
 +
  MICROSEMI MIPS SOCS
  M:    Alexandre Belloni <[email protected]>
  L:    [email protected]
@@@ -9890,8 -9676,7 +9903,8 @@@ MIPS/LOONGSON2 ARCHITECTUR
  M:    Jiaxun Yang <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    arch/mips/loongson64/*{2e/2f}*
 +F:    arch/mips/loongson64/fuloong-2e/
 +F:    arch/mips/loongson64/lemote-2f/
  F:    arch/mips/include/asm/mach-loongson64/
  F:    drivers/*/*loongson2*
  F:    drivers/*/*/*loongson2*
@@@ -9931,19 -9716,6 +9944,19 @@@ S:    Maintaine
  F:    arch/arm/boot/dts/mmp*
  F:    arch/arm/mach-mmp/
  
 +MMU GATHER AND TLB INVALIDATION
 +M:    Will Deacon <[email protected]>
 +M:    "Aneesh Kumar K.V" <[email protected]>
 +M:    Andrew Morton <[email protected]>
 +M:    Nick Piggin <[email protected]>
 +M:    Peter Zijlstra <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Maintained
 +F:    arch/*/include/asm/tlb.h
 +F:    include/asm-generic/tlb.h
 +F:    mm/mmu_gather.c
 +
  MN88472 MEDIA DRIVER
  M:    Antti Palosaari <[email protected]>
  L:    [email protected]
@@@ -10111,7 -9883,7 +10124,7 @@@ M:    Peter Rosin <[email protected]
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-class-mux*
  F:    Documentation/devicetree/bindings/mux/
 -F:    include/linux/dt-bindings/mux/
 +F:    include/dt-bindings/mux/
  F:    include/linux/mux/
  F:    drivers/mux/
  
@@@ -10151,13 -9923,6 +10164,13 @@@ F:  drivers/gpu/drm/mxsfb
  F:    Documentation/devicetree/bindings/display/mxsfb.txt
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  
 +MYLEX DAC960 PCI RAID Controller
 +M:    Hannes Reinecke <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/scsi/myrb.*
 +F:    drivers/scsi/myrs.*
 +
  MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
  M:    Chris Lee <[email protected]>
  L:    [email protected]
@@@ -10189,6 -9954,11 +10202,6 @@@ NATSEMI ETHERNET DRIVER (DP8381x
  S:    Orphan
  F:    drivers/net/ethernet/natsemi/natsemi.c
  
 -NCP FILESYSTEM
 -M:    Petr Vandrovec <[email protected]>
 -S:    Obsolete
 -F:    drivers/staging/ncpfs/
 -
  NCR 5380 SCSI DRIVERS
  M:    Finn Thain <[email protected]>
  M:    Michael Schmitz <[email protected]>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git
  S:    Maintained
 -F:    net/core/flow.c
  F:    net/xfrm/
  F:    net/key/
  F:    net/ipv4/xfrm*
@@@ -10435,8 -10206,6 +10448,8 @@@ NETWORKING [TLS
  M:    Boris Pismenny <[email protected]>
  M:    Aviad Yehezkel <[email protected]>
  M:    Dave Watson <[email protected]>
 +M:    John Fastabend <[email protected]>
 +M:    Daniel Borkmann <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    net/tls/*
  S:    Maintained
  F:    arch/arm/mach-omap2/omap_hwmod.*
  
 +OMAP I2C DRIVER
 +M:    Vignesh R <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/i2c/i2c-omap.txt
 +F:    drivers/i2c/busses/i2c-omap.c
 +
  OMAP IMAGING SUBSYSTEM (OMAP3 ISP and OMAP4 ISS)
  M:    Laurent Pinchart <[email protected]>
  L:    [email protected]
@@@ -10808,9 -10569,9 +10821,9 @@@ F:   drivers/media/platform/omap3isp
  F:    drivers/staging/media/omap4iss/
  
  OMAP MMC SUPPORT
 -M:    Jarkko Lavinen <[email protected]>
 +M:    Aaro Koskinen <[email protected]>
  L:    [email protected]
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/mmc/host/omap.c
  
  OMAP POWER MANAGEMENT SUPPORT
@@@ -11297,7 -11058,7 +11310,7 @@@ S:   Maintaine
  F:    drivers/firmware/pcdp.*
  
  PCI DRIVER FOR AARDVARK (Marvell Armada 3700)
 -M:    Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 +M:    Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
@@@ -11329,7 -11090,7 +11342,7 @@@ F:   Documentation/devicetree/bindings/pc
  F:    drivers/pci/controller/pci-versatile.c
  
  PCI DRIVER FOR ARMADA 8K
 -M:    Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 +M:    Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
@@@ -11398,7 -11159,7 +11411,7 @@@ F:   Documentation/devicetree/bindings/pc
  F:    drivers/pci/controller/pcie-mobiveil.c
  
  PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC support)
 -M:    Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 +M:    Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  M:    Jason Cooper <[email protected]>
  L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
@@@ -11449,7 -11210,7 +11462,7 @@@ M:   Murali Karicheri <[email protected]
  L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/pci/controller/dwc/*keystone*
 +F:    drivers/pci/controller/dwc/pci-keystone.c
  
  PCI ENDPOINT SUBSYSTEM
  M:    Kishon Vijay Abraham I <[email protected]>
@@@ -11745,17 -11506,19 +11758,17 @@@ F:        Documentation/devicetree/bindings/pi
  PIN CONTROLLER - INTEL
  M:    Mika Westerberg <[email protected]>
  M:    Andy Shevchenko <[email protected]>
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git
  S:    Maintained
  F:    drivers/pinctrl/intel/
  
  PIN CONTROLLER - MEDIATEK
 -M:    Sean Wang <sean.wang@mediatek.com>
 +M:    Sean Wang <sean.wang@kernel.org>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
  F:    Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
 -F:    drivers/pinctrl/mediatek/mtk-eint.*
 -F:    drivers/pinctrl/mediatek/pinctrl-mtk-common.*
 -F:    drivers/pinctrl/mediatek/pinctrl-mt2701.c
 -F:    drivers/pinctrl/mediatek/pinctrl-mt7622.c
 +F:    drivers/pinctrl/mediatek/
  
  PIN CONTROLLER - QUALCOMM
  M:    Bjorn Andersson <[email protected]>
@@@ -11833,26 -11596,7 +11846,26 @@@ W: http://hwmon.wiki.kernel.org
  W:    http://www.roeck-us.net/linux/drivers/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/hwmon/ibm,cffps1.txt
 +F:    Documentation/devicetree/bindings/hwmon/max31785.txt
 +F:    Documentation/devicetree/bindings/hwmon/ltc2978.txt
 +F:    Documentation/hwmon/adm1275
 +F:    Documentation/hwmon/ibm-cffps
 +F:    Documentation/hwmon/ir35221
 +F:    Documentation/hwmon/lm25066
 +F:    Documentation/hwmon/ltc2978
 +F:    Documentation/hwmon/ltc3815
 +F:    Documentation/hwmon/max16064
 +F:    Documentation/hwmon/max20751
 +F:    Documentation/hwmon/max31785
 +F:    Documentation/hwmon/max34440
 +F:    Documentation/hwmon/max8688
  F:    Documentation/hwmon/pmbus
 +F:    Documentation/hwmon/pmbus-core
 +F:    Documentation/hwmon/tps40422
 +F:    Documentation/hwmon/ucd9000
 +F:    Documentation/hwmon/ucd9200
 +F:    Documentation/hwmon/zl6100
  F:    drivers/hwmon/pmbus/
  F:    include/linux/pmbus.h
  
@@@ -12256,7 -12000,7 +12269,7 @@@ F:   Documentation/scsi/LICENSE.qla4xx
  F:    drivers/scsi/qla4xxx/
  
  QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
 -M:    Harish Patil <harish.patil@cavium.com>
 +M:    Shahed Shaikh <Shahed.Shaikh@cavium.com>
  M:    Manish Chopra <[email protected]>
  M:    [email protected]
  L:    [email protected]
@@@ -12264,6 -12008,7 +12277,6 @@@ S:   Supporte
  F:    drivers/net/ethernet/qlogic/qlcnic/
  
  QLOGIC QLGE 10Gb ETHERNET DRIVER
 -M:    Harish Patil <[email protected]>
  M:    Manish Chopra <[email protected]>
  M:    [email protected]
  L:    [email protected]
@@@ -12665,12 -12410,6 +12678,12 @@@ S: Supporte
  F:    drivers/i2c/busses/i2c-rcar.c
  F:    drivers/i2c/busses/i2c-sh_mobile.c
  
 +RENESAS RIIC DRIVER
 +M:    Chris Brandt <[email protected]>
 +S:    Supported
 +F:    Documentation/devicetree/bindings/i2c/i2c-riic.txt
 +F:    drivers/i2c/busses/i2c-riic.c
 +
  RENESAS USB PHY DRIVER
  M:    Yoshihiro Shimoda <[email protected]>
  L:    [email protected]
@@@ -12957,18 -12696,6 +12970,18 @@@ W: http://www.ibm.com/developerworks/li
  S:    Supported
  F:    drivers/s390/crypto/
  
 +S390 VFIO AP DRIVER
 +M:    Tony Krowiak <[email protected]>
 +M:    Pierre Morel <[email protected]>
 +M:    Halil Pasic <[email protected]>
 +L:    [email protected]
 +W:    http://www.ibm.com/developerworks/linux/linux390/
 +S:    Supported
 +F:    drivers/s390/crypto/vfio_ap_drv.c
 +F:    drivers/s390/crypto/vfio_ap_private.h
 +F:    drivers/s390/crypto/vfio_ap_ops.c
 +F:    Documentation/s390/vfio-ap.txt
 +
  S390 ZFCP DRIVER
  M:    Steffen Maier <[email protected]>
  M:    Benjamin Block <[email protected]>
  S:    Maintained
  F:    drivers/mmc/host/sdhci-pci-dwc-mshc.c
  
 +SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) MICROCHIP DRIVER
 +M:    Ludovic Desroches <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/mmc/host/sdhci-of-at91.c
 +
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER
  M:    Ben Dooks <[email protected]>
  M:    Jaehoon Chung <[email protected]>
@@@ -13363,7 -13084,7 +13376,7 @@@ SELINUX SECURITY MODUL
  M:    Paul Moore <[email protected]>
  M:    Stephen Smalley <[email protected]>
  M:    Eric Paris <[email protected]>
 -L:    selinux@tycho.nsa.gov (moderated for non-subscribers)
 +L:    selinux@vger.kernel.org
  W:    https://selinuxproject.org
  W:    https://github.com/SELinuxProject
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git
@@@ -13607,7 -13328,6 +13620,7 @@@ M:   Uwe Kleine-König <u.kleine-koenig@p
  R:    Pengutronix Kernel Team <[email protected]>
  S:    Supported
  F:    drivers/siox/*
 +F:    drivers/gpio/gpio-siox.c
  F:    include/trace/events/siox.h
  
  SIS 190 ETHERNET DRIVER
  S:    Maintained
  F:    Documentation/devicetree/bindings/arm/firmware/sdei.txt
  F:    drivers/firmware/arm_sdei.c
 -F:    include/linux/sdei.h
 -F:    include/uapi/linux/sdei.h
 +F:    include/linux/arm_sdei.h
 +F:    include/uapi/linux/arm_sdei.h
  
  SOFTWARE RAID (Multiple Disks) SUPPORT
  M:    Shaohua Li <[email protected]>
@@@ -13854,20 -13574,6 +13867,20 @@@ S: Maintaine
  F:    drivers/media/i2c/imx274.c
  F:    Documentation/devicetree/bindings/media/i2c/imx274.txt
  
 +SONY IMX319 SENSOR DRIVER
 +M:    Bingbu Cao <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/imx319.c
 +
 +SONY IMX355 SENSOR DRIVER
 +M:    Tianshu Qiu <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/imx355.c
 +
  SONY MEMORYSTICK CARD SUPPORT
  M:    Alex Dubov <[email protected]>
  W:    http://tifmxx.berlios.de/
@@@ -13934,7 -13640,7 +13947,7 @@@ F:   sound/soc
  F:    include/sound/soc*
  
  SOUNDWIRE SUBSYSTEM
 -M:    Vinod Koul <v[email protected]>
 +M:    Vinod Koul <v[email protected]>
  M:    Sanyog Kale <[email protected]>
  R:    Pierre-Louis Bossart <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    drivers/i2c/busses/i2c-stm32*
  
 +ST VL53L0X ToF RANGER(I2C) IIO DRIVER
 +M:    Song Qiang <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/iio/proximity/vl53l0x-i2c.c
 +F:    Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt
 +
  STABLE BRANCH
  M:    Greg Kroah-Hartman <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/staging/erofs/
  
 -STAGING - FLARION FT1000 DRIVERS
 -M:    Marek Belisko <[email protected]>
 -S:    Odd Fixes
 -F:    drivers/staging/ft1000/
 -
  STAGING - INDUSTRIAL IO
  M:    Jonathan Cameron <[email protected]>
  L:    [email protected]
@@@ -14187,7 -13891,7 +14200,7 @@@ F:   sound/soc/sti
  STI CEC DRIVER
  M:    Benjamin Gaignard <[email protected]>
  S:    Maintained
 -F:    drivers/staging/media/st-cec/
 +F:    drivers/media/platform/sti/cec/
  F:    Documentation/devicetree/bindings/media/stih-cec.txt
  
  STK1160 USB VIDEO CAPTURE DRIVER
@@@ -14351,12 -14055,6 +14364,12 @@@ S: Supporte
  F:    drivers/reset/reset-axs10x.c
  F:    Documentation/devicetree/bindings/reset/snps,axs10x-reset.txt
  
 +SYNOPSYS CREG GPIO DRIVER
 +M:    Eugeniy Paltsev <[email protected]>
 +S:    Maintained
 +F:    drivers/gpio/gpio-creg-snps.c
 +F:    Documentation/devicetree/bindings/gpio/snps,creg-gpio.txt
 +
  SYNOPSYS DESIGNWARE 8250 UART DRIVER
  R:    Andy Shevchenko <[email protected]>
  S:    Maintained
@@@ -14739,6 -14437,7 +14752,6 @@@ F:   Documentation/devicetree/bindings/ar
  F:    drivers/firmware/ti_sci*
  F:    include/linux/soc/ti/ti_sci_protocol.h
  F:    Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
 -F:    include/dt-bindings/genpd/k2g.h
  F:    drivers/soc/ti/ti_sci_pm_domains.c
  F:    Documentation/devicetree/bindings/reset/ti,sci-reset.txt
  F:    Documentation/devicetree/bindings/clock/ti,sci-clk.txt
  S:    Maintained
  F:    drivers/net/ethernet/ti/netcp*
  
 +TI PCM3060 ASoC CODEC DRIVER
 +M:    Kirill Marinushkin <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/sound/pcm3060.txt
 +F:    sound/soc/codecs/pcm3060*
 +
  TI TAS571X FAMILY ASoC CODEC DRIVER
  M:    Kevin Cernekee <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -15452,9 -15144,9 +15465,9 @@@ F:   include/linux/usb/gadget
  
  USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...)
  M:    Jiri Kosina <[email protected]>
 -R:    Benjamin Tissoires <[email protected]>
 +M:    Benjamin Tissoires <[email protected]>
  L:    [email protected]
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
  S:    Maintained
  F:    Documentation/hid/hiddev.txt
  F:    drivers/hid/usbhid/
@@@ -15621,12 -15313,6 +15634,12 @@@ F: Documentation/driver-api/usb/typec_b
  F:    drivers/usb/typec/altmodes/
  F:    include/linux/usb/typec_altmode.h
  
 +USB TYPEC PORT CONTROLLER DRIVERS
 +M:    Guenter Roeck <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/usb/typec/tcpm/
 +
  USB UHCI DRIVER
  M:    Alan Stern <[email protected]>
  L:    [email protected]
@@@ -15701,12 -15387,6 +15714,12 @@@ F: arch/x86/um
  F:    fs/hostfs/
  F:    fs/hppfs/
  
 +USERSPACE COPYIN/COPYOUT (UIOVEC)
 +M:    Alexander Viro <[email protected]>
 +S:    Maintained
 +F:    lib/iov_iter.c
 +F:    include/linux/uio.h
 +
  USERSPACE DMA BUFFER DRIVER
  M:    Gerd Hoffmann <[email protected]>
  S:    Maintained
@@@ -15721,7 -15401,7 +15734,7 @@@ S:   Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
  F:    Documentation/driver-api/uio-howto.rst
  F:    drivers/uio/
 -F:    include/linux/uio*.h
 +F:    include/linux/uio_driver.h
  
  UTIL-LINUX PACKAGE
  M:    Karel Zak <[email protected]>
@@@ -15744,7 -15424,7 +15757,7 @@@ S:   Maintaine
  UVESAFB DRIVER
  M:    Michal Januszewski <[email protected]>
  L:    [email protected]
 -W:    http://dev.gentoo.org/~spock/projects/uvesafb/
 +W:    https://github.com/mjanusz/v86d
  S:    Maintained
  F:    Documentation/fb/uvesafb.txt
  F:    drivers/video/fbdev/uvesafb.*
@@@ -15845,7 -15525,7 +15858,7 @@@ M:   Marek Szyprowski <m.szyprowski@samsu
  M:    Kyungmin Park <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    drivers/media/v4l2-core/videobuf2-*
 +F:    drivers/media/common/videobuf2/*
  F:    include/media/videobuf2-*
  
  VIMC VIRTUAL MEDIA CONTROLLER DRIVER
@@@ -15879,6 -15559,7 +15892,6 @@@ F:   net/vmw_vsock/virtio_transport_commo
  F:    net/vmw_vsock/virtio_transport.c
  F:    drivers/net/vsockmon.c
  F:    drivers/vhost/vsock.c
 -F:    drivers/vhost/vsock.h
  F:    tools/testing/vsock/
  
  VIRTIO CONSOLE DRIVER
@@@ -16056,7 -15737,7 +16069,7 @@@ F:   include/linux/regulator
  
  VRF
  M:    David Ahern <[email protected]>
 -M:    Shrijeet Mukherjee <shm@cumulusnetworks.com>
 +M:    Shrijeet Mukherjee <shrijeet@gmail.com>
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/vrf.c
@@@ -16321,17 -16002,6 +16334,17 @@@ T: git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    arch/x86/entry/vdso/
  
 +XARRAY
 +M:    Matthew Wilcox <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    Documentation/core-api/xarray.rst
 +F:    lib/idr.c
 +F:    lib/xarray.c
 +F:    include/linux/idr.h
 +F:    include/linux/xarray.h
 +F:    tools/testing/radix-tree
 +
  XC2028/3028 TUNER DRIVER
  M:    Mauro Carvalho Chehab <[email protected]>
  L:    [email protected]
@@@ -16373,7 -16043,6 +16386,7 @@@ F:   arch/arm64/include/asm/xen
  XEN HYPERVISOR INTERFACE
  M:    Boris Ostrovsky <[email protected]>
  M:    Juergen Gross <[email protected]>
 +R:    Stefano Stabellini <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git
  S:    Supported
index dad0e2342df9db7641f77f1473a87f6d78d99050,bdce05183edbe59e246a63d8a81c21bae9bc1af9..58a2363040ddca5cbfe2ff1891f1617fb47d073d
@@@ -542,8 -542,7 +542,8 @@@ static void amdgpu_vm_pt_next_leaf(stru
                                   struct amdgpu_vm_pt_cursor *cursor)
  {
        amdgpu_vm_pt_next(adev, cursor);
 -      while (amdgpu_vm_pt_descendant(adev, cursor));
 +      if (cursor->pfn != ~0ll)
 +              while (amdgpu_vm_pt_descendant(adev, cursor));
  }
  
  /**
@@@ -773,7 -772,7 +773,7 @@@ static int amdgpu_vm_clear_bo(struct am
  
        ring = container_of(vm->entity.rq->sched, struct amdgpu_ring, sched);
  
-       r = reservation_object_reserve_shared(bo->tbo.resv);
+       r = reservation_object_reserve_shared(bo->tbo.resv, 1);
        if (r)
                return r;
  
@@@ -1632,6 -1631,13 +1632,6 @@@ static int amdgpu_vm_update_ptes(struc
                        continue;
                }
  
 -              /* First check if the entry is already handled */
 -              if (cursor.pfn < frag_start) {
 -                      cursor.entry->huge = true;
 -                      amdgpu_vm_pt_next(adev, &cursor);
 -                      continue;
 -              }
 -
                /* If it isn't already handled it can't be a huge page */
                if (cursor.entry->huge) {
                        /* Add the entry to the relocated list to update it. */
                        }
                } while (frag_start < entry_end);
  
 -              if (frag >= shift)
 +              if (amdgpu_vm_pt_descendant(adev, &cursor)) {
 +                      /* Mark all child entries as huge */
 +                      while (cursor.pfn < frag_start) {
 +                              cursor.entry->huge = true;
 +                              amdgpu_vm_pt_next(adev, &cursor);
 +                      }
 +
 +              } else if (frag >= shift) {
 +                      /* or just move on to the next on the same level. */
                        amdgpu_vm_pt_next(adev, &cursor);
 +              }
        }
  
        return 0;
@@@ -1842,7 -1839,7 +1842,7 @@@ static int amdgpu_vm_bo_update_mapping(
        if (r)
                goto error_free;
  
-       r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv);
+       r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv, 1);
        if (r)
                goto error_free;
  
@@@ -3237,10 -3234,8 +3237,10 @@@ void amdgpu_vm_fini(struct amdgpu_devic
        }
        rbtree_postorder_for_each_entry_safe(mapping, tmp,
                                             &vm->va.rb_root, rb) {
 +              /* Don't remove the mapping here, we don't want to trigger a
 +               * rebalance and the tree is about to be destroyed anyway.
 +               */
                list_del(&mapping->list);
 -              amdgpu_vm_it_remove(mapping, &vm->va);
                kfree(mapping);
        }
        list_for_each_entry_safe(mapping, tmp, &vm->freed, list) {
index c1262f62cd9f21400c68a6040000d31e4a9a9716,e5294d1a3049f16384cbe1518fc36969a79df76e..5064768642f32ea12a84742e61e02e8e9b5c02ff
@@@ -429,9 -429,6 +429,9 @@@ static int amdgpu_dm_init(struct amdgpu
            adev->asic_type < CHIP_RAVEN)
                init_data.flags.gpu_vm_support = true;
  
 +      if (amdgpu_dc_feature_mask & DC_FBC_MASK)
 +              init_data.flags.fbc_support = true;
 +
        /* Display Core create. */
        adev->dm.dc = dc_create(&init_data);
  
@@@ -2703,11 -2700,18 +2703,11 @@@ create_stream_for_sink(struct amdgpu_dm
        drm_connector = &aconnector->base;
  
        if (!aconnector->dc_sink) {
 -              /*
 -               * Create dc_sink when necessary to MST
 -               * Don't apply fake_sink to MST
 -               */
 -              if (aconnector->mst_port) {
 -                      dm_dp_mst_dc_sink_create(drm_connector);
 -                      return stream;
 +              if (!aconnector->mst_port) {
 +                      sink = create_fake_sink(aconnector);
 +                      if (!sink)
 +                              return stream;
                }
 -
 -              sink = create_fake_sink(aconnector);
 -              if (!sink)
 -                      return stream;
        } else {
                sink = aconnector->dc_sink;
        }
@@@ -3185,7 -3189,6 +3185,6 @@@ amdgpu_dm_connector_helper_funcs = 
         */
        .get_modes = get_modes,
        .mode_valid = amdgpu_dm_connector_mode_valid,
-       .best_encoder = drm_atomic_helper_best_encoder
  };
  
  static void dm_crtc_helper_disable(struct drm_crtc *crtc)
@@@ -3297,7 -3300,7 +3296,7 @@@ void dm_drm_plane_destroy_state(struct 
  static const struct drm_plane_funcs dm_plane_funcs = {
        .update_plane   = drm_atomic_helper_update_plane,
        .disable_plane  = drm_atomic_helper_disable_plane,
 -      .destroy        = drm_plane_cleanup,
 +      .destroy        = drm_primary_helper_destroy,
        .reset = dm_drm_plane_reset,
        .atomic_duplicate_state = dm_drm_plane_duplicate_state,
        .atomic_destroy_state = dm_drm_plane_destroy_state,
@@@ -3588,14 -3591,17 +3587,17 @@@ static int to_drm_connector_type(enum s
        }
  }
  
+ static struct drm_encoder *amdgpu_dm_connector_to_encoder(struct drm_connector *connector)
+ {
+       return drm_encoder_find(connector->dev, NULL, connector->encoder_ids[0]);
+ }
  static void amdgpu_dm_get_native_mode(struct drm_connector *connector)
  {
-       const struct drm_connector_helper_funcs *helper =
-               connector->helper_private;
        struct drm_encoder *encoder;
        struct amdgpu_encoder *amdgpu_encoder;
  
-       encoder = helper->best_encoder(connector);
+       encoder = amdgpu_dm_connector_to_encoder(connector);
  
        if (encoder == NULL)
                return;
@@@ -3722,14 -3728,12 +3724,12 @@@ static void amdgpu_dm_connector_ddc_get
  
  static int amdgpu_dm_connector_get_modes(struct drm_connector *connector)
  {
-       const struct drm_connector_helper_funcs *helper =
-                       connector->helper_private;
        struct amdgpu_dm_connector *amdgpu_dm_connector =
                        to_amdgpu_dm_connector(connector);
        struct drm_encoder *encoder;
        struct edid *edid = amdgpu_dm_connector->edid;
  
-       encoder = helper->best_encoder(connector);
+       encoder = amdgpu_dm_connector_to_encoder(connector);
  
        if (!edid || !drm_edid_is_valid(edid)) {
                amdgpu_dm_connector->num_modes =
index d8b526b7932c3db06e1ff7cad3f2485ddfe52cee,6f66777dca4b0e339d1259e038d00d826e3adb29..474b503a73a1694b9b909d976389caf135fd6b12
@@@ -92,6 -92,17 +92,17 @@@ drm_atomic_helper_plane_changed(struct 
        }
  }
  
+ /*
+  * For connectors that support multiple encoders, either the
+  * .atomic_best_encoder() or .best_encoder() operation must be implemented.
+  */
+ static struct drm_encoder *
+ pick_single_encoder_for_connector(struct drm_connector *connector)
+ {
+       WARN_ON(connector->encoder_ids[1]);
+       return drm_encoder_find(connector->dev, NULL, connector->encoder_ids[0]);
+ }
  static int handle_conflicting_encoders(struct drm_atomic_state *state,
                                       bool disable_conflicting_encoders)
  {
                else if (funcs->best_encoder)
                        new_encoder = funcs->best_encoder(connector);
                else
-                       new_encoder = drm_atomic_helper_best_encoder(connector);
+                       new_encoder = pick_single_encoder_for_connector(connector);
  
                if (new_encoder) {
                        if (encoder_mask & drm_encoder_mask(new_encoder)) {
@@@ -308,26 -319,6 +319,26 @@@ update_connector_routing(struct drm_ato
                return 0;
        }
  
 +      crtc_state = drm_atomic_get_new_crtc_state(state,
 +                                                 new_connector_state->crtc);
 +      /*
 +       * For compatibility with legacy users, we want to make sure that
 +       * we allow DPMS On->Off modesets on unregistered connectors. Modesets
 +       * which would result in anything else must be considered invalid, to
 +       * avoid turning on new displays on dead connectors.
 +       *
 +       * Since the connector can be unregistered at any point during an
 +       * atomic check or commit, this is racy. But that's OK: all we care
 +       * about is ensuring that userspace can't do anything but shut off the
 +       * display on a connector that was destroyed after its been notified,
 +       * not before.
 +       */
 +      if (drm_connector_is_unregistered(connector) && crtc_state->active) {
 +              DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] is not registered\n",
 +                               connector->base.id, connector->name);
 +              return -EINVAL;
 +      }
 +
        funcs = connector->helper_private;
  
        if (funcs->atomic_best_encoder)
        else if (funcs->best_encoder)
                new_encoder = funcs->best_encoder(connector);
        else
-               new_encoder = drm_atomic_helper_best_encoder(connector);
+               new_encoder = pick_single_encoder_for_connector(connector);
  
        if (!new_encoder) {
                DRM_DEBUG_ATOMIC("No suitable encoder found for [CONNECTOR:%d:%s]\n",
  
        set_best_encoder(state, new_connector_state, new_encoder);
  
 -      crtc_state = drm_atomic_get_new_crtc_state(state, new_connector_state->crtc);
        crtc_state->connectors_changed = true;
  
        DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] using [ENCODER:%d:%s] on [CRTC:%d:%s]\n",
@@@ -1428,16 -1420,15 +1439,16 @@@ EXPORT_SYMBOL(drm_atomic_helper_wait_fo
  void drm_atomic_helper_wait_for_flip_done(struct drm_device *dev,
                                          struct drm_atomic_state *old_state)
  {
 -      struct drm_crtc_state *new_crtc_state;
        struct drm_crtc *crtc;
        int i;
  
 -      for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) {
 -              struct drm_crtc_commit *commit = new_crtc_state->commit;
 +      for (i = 0; i < dev->mode_config.num_crtc; i++) {
 +              struct drm_crtc_commit *commit = old_state->crtcs[i].commit;
                int ret;
  
 -              if (!commit)
 +              crtc = old_state->crtcs[i].ptr;
 +
 +              if (!crtc || !commit)
                        continue;
  
                ret = wait_for_completion_timeout(&commit->flip_done, 10 * HZ);
@@@ -1955,9 -1946,6 +1966,9 @@@ int drm_atomic_helper_setup_commit(stru
                drm_crtc_commit_get(commit);
  
                commit->abort_completion = true;
 +
 +              state->crtcs[i].commit = commit;
 +              drm_crtc_commit_get(commit);
        }
  
        for_each_oldnew_connector_in_state(state, conn, old_conn_state, new_conn_state, i) {
@@@ -3411,586 -3399,3 +3422,3 @@@ fail
        return ret;
  }
  EXPORT_SYMBOL(drm_atomic_helper_page_flip_target);
- /**
-  * drm_atomic_helper_best_encoder - Helper for
-  *    &drm_connector_helper_funcs.best_encoder callback
-  * @connector: Connector control structure
-  *
-  * This is a &drm_connector_helper_funcs.best_encoder callback helper for
-  * connectors that support exactly 1 encoder, statically determined at driver
-  * init time.
-  */
- struct drm_encoder *
- drm_atomic_helper_best_encoder(struct drm_connector *connector)
- {
-       WARN_ON(connector->encoder_ids[1]);
-       return drm_encoder_find(connector->dev, NULL, connector->encoder_ids[0]);
- }
- EXPORT_SYMBOL(drm_atomic_helper_best_encoder);
- /**
-  * DOC: atomic state reset and initialization
-  *
-  * Both the drm core and the atomic helpers assume that there is always the full
-  * and correct atomic software state for all connectors, CRTCs and planes
-  * available. Which is a bit a problem on driver load and also after system
-  * suspend. One way to solve this is to have a hardware state read-out
-  * infrastructure which reconstructs the full software state (e.g. the i915
-  * driver).
-  *
-  * The simpler solution is to just reset the software state to everything off,
-  * which is easiest to do by calling drm_mode_config_reset(). To facilitate this
-  * the atomic helpers provide default reset implementations for all hooks.
-  *
-  * On the upside the precise state tracking of atomic simplifies system suspend
-  * and resume a lot. For drivers using drm_mode_config_reset() a complete recipe
-  * is implemented in drm_atomic_helper_suspend() and drm_atomic_helper_resume().
-  * For other drivers the building blocks are split out, see the documentation
-  * for these functions.
-  */
- /**
-  * drm_atomic_helper_crtc_reset - default &drm_crtc_funcs.reset hook for CRTCs
-  * @crtc: drm CRTC
-  *
-  * Resets the atomic state for @crtc by freeing the state pointer (which might
-  * be NULL, e.g. at driver load time) and allocating a new empty state object.
-  */
- void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc)
- {
-       if (crtc->state)
-               __drm_atomic_helper_crtc_destroy_state(crtc->state);
-       kfree(crtc->state);
-       crtc->state = kzalloc(sizeof(*crtc->state), GFP_KERNEL);
-       if (crtc->state)
-               crtc->state->crtc = crtc;
- }
- EXPORT_SYMBOL(drm_atomic_helper_crtc_reset);
- /**
-  * __drm_atomic_helper_crtc_duplicate_state - copy atomic CRTC state
-  * @crtc: CRTC object
-  * @state: atomic CRTC state
-  *
-  * Copies atomic state from a CRTC's current state and resets inferred values.
-  * This is useful for drivers that subclass the CRTC state.
-  */
- void __drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc,
-                                             struct drm_crtc_state *state)
- {
-       memcpy(state, crtc->state, sizeof(*state));
-       if (state->mode_blob)
-               drm_property_blob_get(state->mode_blob);
-       if (state->degamma_lut)
-               drm_property_blob_get(state->degamma_lut);
-       if (state->ctm)
-               drm_property_blob_get(state->ctm);
-       if (state->gamma_lut)
-               drm_property_blob_get(state->gamma_lut);
-       state->mode_changed = false;
-       state->active_changed = false;
-       state->planes_changed = false;
-       state->connectors_changed = false;
-       state->color_mgmt_changed = false;
-       state->zpos_changed = false;
-       state->commit = NULL;
-       state->event = NULL;
-       state->pageflip_flags = 0;
- }
- EXPORT_SYMBOL(__drm_atomic_helper_crtc_duplicate_state);
- /**
-  * drm_atomic_helper_crtc_duplicate_state - default state duplicate hook
-  * @crtc: drm CRTC
-  *
-  * Default CRTC state duplicate hook for drivers which don't have their own
-  * subclassed CRTC state structure.
-  */
- struct drm_crtc_state *
- drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc)
- {
-       struct drm_crtc_state *state;
-       if (WARN_ON(!crtc->state))
-               return NULL;
-       state = kmalloc(sizeof(*state), GFP_KERNEL);
-       if (state)
-               __drm_atomic_helper_crtc_duplicate_state(crtc, state);
-       return state;
- }
- EXPORT_SYMBOL(drm_atomic_helper_crtc_duplicate_state);
- /**
-  * __drm_atomic_helper_crtc_destroy_state - release CRTC state
-  * @state: CRTC state object to release
-  *
-  * Releases all resources stored in the CRTC state without actually freeing
-  * the memory of the CRTC state. This is useful for drivers that subclass the
-  * CRTC state.
-  */
- void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state)
- {
-       if (state->commit) {
-               /*
-                * In the event that a non-blocking commit returns
-                * -ERESTARTSYS before the commit_tail work is queued, we will
-                * have an extra reference to the commit object. Release it, if
-                * the event has not been consumed by the worker.
-                *
-                * state->event may be freed, so we can't directly look at
-                * state->event->base.completion.
-                */
-               if (state->event && state->commit->abort_completion)
-                       drm_crtc_commit_put(state->commit);
-               kfree(state->commit->event);
-               state->commit->event = NULL;
-               drm_crtc_commit_put(state->commit);
-       }
-       drm_property_blob_put(state->mode_blob);
-       drm_property_blob_put(state->degamma_lut);
-       drm_property_blob_put(state->ctm);
-       drm_property_blob_put(state->gamma_lut);
- }
- EXPORT_SYMBOL(__drm_atomic_helper_crtc_destroy_state);
- /**
-  * drm_atomic_helper_crtc_destroy_state - default state destroy hook
-  * @crtc: drm CRTC
-  * @state: CRTC state object to release
-  *
-  * Default CRTC state destroy hook for drivers which don't have their own
-  * subclassed CRTC state structure.
-  */
- void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc,
-                                         struct drm_crtc_state *state)
- {
-       __drm_atomic_helper_crtc_destroy_state(state);
-       kfree(state);
- }
- EXPORT_SYMBOL(drm_atomic_helper_crtc_destroy_state);
- /**
-  * __drm_atomic_helper_plane_reset - resets planes state to default values
-  * @plane: plane object, must not be NULL
-  * @state: atomic plane state, must not be NULL
-  *
-  * Initializes plane state to default. This is useful for drivers that subclass
-  * the plane state.
-  */
- void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
-                                    struct drm_plane_state *state)
- {
-       state->plane = plane;
-       state->rotation = DRM_MODE_ROTATE_0;
-       state->alpha = DRM_BLEND_ALPHA_OPAQUE;
-       state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI;
-       plane->state = state;
- }
- EXPORT_SYMBOL(__drm_atomic_helper_plane_reset);
- /**
-  * drm_atomic_helper_plane_reset - default &drm_plane_funcs.reset hook for planes
-  * @plane: drm plane
-  *
-  * Resets the atomic state for @plane by freeing the state pointer (which might
-  * be NULL, e.g. at driver load time) and allocating a new empty state object.
-  */
- void drm_atomic_helper_plane_reset(struct drm_plane *plane)
- {
-       if (plane->state)
-               __drm_atomic_helper_plane_destroy_state(plane->state);
-       kfree(plane->state);
-       plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL);
-       if (plane->state)
-               __drm_atomic_helper_plane_reset(plane, plane->state);
- }
- EXPORT_SYMBOL(drm_atomic_helper_plane_reset);
- /**
-  * __drm_atomic_helper_plane_duplicate_state - copy atomic plane state
-  * @plane: plane object
-  * @state: atomic plane state
-  *
-  * Copies atomic state from a plane's current state. This is useful for
-  * drivers that subclass the plane state.
-  */
- void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
-                                              struct drm_plane_state *state)
- {
-       memcpy(state, plane->state, sizeof(*state));
-       if (state->fb)
-               drm_framebuffer_get(state->fb);
-       state->fence = NULL;
-       state->commit = NULL;
- }
- EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state);
- /**
-  * drm_atomic_helper_plane_duplicate_state - default state duplicate hook
-  * @plane: drm plane
-  *
-  * Default plane state duplicate hook for drivers which don't have their own
-  * subclassed plane state structure.
-  */
- struct drm_plane_state *
- drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane)
- {
-       struct drm_plane_state *state;
-       if (WARN_ON(!plane->state))
-               return NULL;
-       state = kmalloc(sizeof(*state), GFP_KERNEL);
-       if (state)
-               __drm_atomic_helper_plane_duplicate_state(plane, state);
-       return state;
- }
- EXPORT_SYMBOL(drm_atomic_helper_plane_duplicate_state);
- /**
-  * __drm_atomic_helper_plane_destroy_state - release plane state
-  * @state: plane state object to release
-  *
-  * Releases all resources stored in the plane state without actually freeing
-  * the memory of the plane state. This is useful for drivers that subclass the
-  * plane state.
-  */
- void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state)
- {
-       if (state->fb)
-               drm_framebuffer_put(state->fb);
-       if (state->fence)
-               dma_fence_put(state->fence);
-       if (state->commit)
-               drm_crtc_commit_put(state->commit);
- }
- EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state);
- /**
-  * drm_atomic_helper_plane_destroy_state - default state destroy hook
-  * @plane: drm plane
-  * @state: plane state object to release
-  *
-  * Default plane state destroy hook for drivers which don't have their own
-  * subclassed plane state structure.
-  */
- void drm_atomic_helper_plane_destroy_state(struct drm_plane *plane,
-                                          struct drm_plane_state *state)
- {
-       __drm_atomic_helper_plane_destroy_state(state);
-       kfree(state);
- }
- EXPORT_SYMBOL(drm_atomic_helper_plane_destroy_state);
- /**
-  * __drm_atomic_helper_connector_reset - reset state on connector
-  * @connector: drm connector
-  * @conn_state: connector state to assign
-  *
-  * Initializes the newly allocated @conn_state and assigns it to
-  * the &drm_conector->state pointer of @connector, usually required when
-  * initializing the drivers or when called from the &drm_connector_funcs.reset
-  * hook.
-  *
-  * This is useful for drivers that subclass the connector state.
-  */
- void
- __drm_atomic_helper_connector_reset(struct drm_connector *connector,
-                                   struct drm_connector_state *conn_state)
- {
-       if (conn_state)
-               conn_state->connector = connector;
-       connector->state = conn_state;
- }
- EXPORT_SYMBOL(__drm_atomic_helper_connector_reset);
- /**
-  * drm_atomic_helper_connector_reset - default &drm_connector_funcs.reset hook for connectors
-  * @connector: drm connector
-  *
-  * Resets the atomic state for @connector by freeing the state pointer (which
-  * might be NULL, e.g. at driver load time) and allocating a new empty state
-  * object.
-  */
- void drm_atomic_helper_connector_reset(struct drm_connector *connector)
- {
-       struct drm_connector_state *conn_state =
-               kzalloc(sizeof(*conn_state), GFP_KERNEL);
-       if (connector->state)
-               __drm_atomic_helper_connector_destroy_state(connector->state);
-       kfree(connector->state);
-       __drm_atomic_helper_connector_reset(connector, conn_state);
- }
- EXPORT_SYMBOL(drm_atomic_helper_connector_reset);
- /**
-  * __drm_atomic_helper_connector_duplicate_state - copy atomic connector state
-  * @connector: connector object
-  * @state: atomic connector state
-  *
-  * Copies atomic state from a connector's current state. This is useful for
-  * drivers that subclass the connector state.
-  */
- void
- __drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector,
-                                           struct drm_connector_state *state)
- {
-       memcpy(state, connector->state, sizeof(*state));
-       if (state->crtc)
-               drm_connector_get(connector);
-       state->commit = NULL;
-       /* Don't copy over a writeback job, they are used only once */
-       state->writeback_job = NULL;
- }
- EXPORT_SYMBOL(__drm_atomic_helper_connector_duplicate_state);
- /**
-  * drm_atomic_helper_connector_duplicate_state - default state duplicate hook
-  * @connector: drm connector
-  *
-  * Default connector state duplicate hook for drivers which don't have their own
-  * subclassed connector state structure.
-  */
- struct drm_connector_state *
- drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector)
- {
-       struct drm_connector_state *state;
-       if (WARN_ON(!connector->state))
-               return NULL;
-       state = kmalloc(sizeof(*state), GFP_KERNEL);
-       if (state)
-               __drm_atomic_helper_connector_duplicate_state(connector, state);
-       return state;
- }
- EXPORT_SYMBOL(drm_atomic_helper_connector_duplicate_state);
- /**
-  * drm_atomic_helper_duplicate_state - duplicate an atomic state object
-  * @dev: DRM device
-  * @ctx: lock acquisition context
-  *
-  * Makes a copy of the current atomic state by looping over all objects and
-  * duplicating their respective states. This is used for example by suspend/
-  * resume support code to save the state prior to suspend such that it can
-  * be restored upon resume.
-  *
-  * Note that this treats atomic state as persistent between save and restore.
-  * Drivers must make sure that this is possible and won't result in confusion
-  * or erroneous behaviour.
-  *
-  * Note that if callers haven't already acquired all modeset locks this might
-  * return -EDEADLK, which must be handled by calling drm_modeset_backoff().
-  *
-  * Returns:
-  * A pointer to the copy of the atomic state object on success or an
-  * ERR_PTR()-encoded error code on failure.
-  *
-  * See also:
-  * drm_atomic_helper_suspend(), drm_atomic_helper_resume()
-  */
- struct drm_atomic_state *
- drm_atomic_helper_duplicate_state(struct drm_device *dev,
-                                 struct drm_modeset_acquire_ctx *ctx)
- {
-       struct drm_atomic_state *state;
-       struct drm_connector *conn;
-       struct drm_connector_list_iter conn_iter;
-       struct drm_plane *plane;
-       struct drm_crtc *crtc;
-       int err = 0;
-       state = drm_atomic_state_alloc(dev);
-       if (!state)
-               return ERR_PTR(-ENOMEM);
-       state->acquire_ctx = ctx;
-       drm_for_each_crtc(crtc, dev) {
-               struct drm_crtc_state *crtc_state;
-               crtc_state = drm_atomic_get_crtc_state(state, crtc);
-               if (IS_ERR(crtc_state)) {
-                       err = PTR_ERR(crtc_state);
-                       goto free;
-               }
-       }
-       drm_for_each_plane(plane, dev) {
-               struct drm_plane_state *plane_state;
-               plane_state = drm_atomic_get_plane_state(state, plane);
-               if (IS_ERR(plane_state)) {
-                       err = PTR_ERR(plane_state);
-                       goto free;
-               }
-       }
-       drm_connector_list_iter_begin(dev, &conn_iter);
-       drm_for_each_connector_iter(conn, &conn_iter) {
-               struct drm_connector_state *conn_state;
-               conn_state = drm_atomic_get_connector_state(state, conn);
-               if (IS_ERR(conn_state)) {
-                       err = PTR_ERR(conn_state);
-                       drm_connector_list_iter_end(&conn_iter);
-                       goto free;
-               }
-       }
-       drm_connector_list_iter_end(&conn_iter);
-       /* clear the acquire context so that it isn't accidentally reused */
-       state->acquire_ctx = NULL;
- free:
-       if (err < 0) {
-               drm_atomic_state_put(state);
-               state = ERR_PTR(err);
-       }
-       return state;
- }
- EXPORT_SYMBOL(drm_atomic_helper_duplicate_state);
- /**
-  * __drm_atomic_helper_connector_destroy_state - release connector state
-  * @state: connector state object to release
-  *
-  * Releases all resources stored in the connector state without actually
-  * freeing the memory of the connector state. This is useful for drivers that
-  * subclass the connector state.
-  */
- void
- __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state)
- {
-       if (state->crtc)
-               drm_connector_put(state->connector);
-       if (state->commit)
-               drm_crtc_commit_put(state->commit);
- }
- EXPORT_SYMBOL(__drm_atomic_helper_connector_destroy_state);
- /**
-  * drm_atomic_helper_connector_destroy_state - default state destroy hook
-  * @connector: drm connector
-  * @state: connector state object to release
-  *
-  * Default connector state destroy hook for drivers which don't have their own
-  * subclassed connector state structure.
-  */
- void drm_atomic_helper_connector_destroy_state(struct drm_connector *connector,
-                                         struct drm_connector_state *state)
- {
-       __drm_atomic_helper_connector_destroy_state(state);
-       kfree(state);
- }
- EXPORT_SYMBOL(drm_atomic_helper_connector_destroy_state);
- /**
-  * drm_atomic_helper_legacy_gamma_set - set the legacy gamma correction table
-  * @crtc: CRTC object
-  * @red: red correction table
-  * @green: green correction table
-  * @blue: green correction table
-  * @size: size of the tables
-  * @ctx: lock acquire context
-  *
-  * Implements support for legacy gamma correction table for drivers
-  * that support color management through the DEGAMMA_LUT/GAMMA_LUT
-  * properties. See drm_crtc_enable_color_mgmt() and the containing chapter for
-  * how the atomic color management and gamma tables work.
-  */
- int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
-                                      u16 *red, u16 *green, u16 *blue,
-                                      uint32_t size,
-                                      struct drm_modeset_acquire_ctx *ctx)
- {
-       struct drm_device *dev = crtc->dev;
-       struct drm_atomic_state *state;
-       struct drm_crtc_state *crtc_state;
-       struct drm_property_blob *blob = NULL;
-       struct drm_color_lut *blob_data;
-       int i, ret = 0;
-       bool replaced;
-       state = drm_atomic_state_alloc(crtc->dev);
-       if (!state)
-               return -ENOMEM;
-       blob = drm_property_create_blob(dev,
-                                       sizeof(struct drm_color_lut) * size,
-                                       NULL);
-       if (IS_ERR(blob)) {
-               ret = PTR_ERR(blob);
-               blob = NULL;
-               goto fail;
-       }
-       /* Prepare GAMMA_LUT with the legacy values. */
-       blob_data = blob->data;
-       for (i = 0; i < size; i++) {
-               blob_data[i].red = red[i];
-               blob_data[i].green = green[i];
-               blob_data[i].blue = blue[i];
-       }
-       state->acquire_ctx = ctx;
-       crtc_state = drm_atomic_get_crtc_state(state, crtc);
-       if (IS_ERR(crtc_state)) {
-               ret = PTR_ERR(crtc_state);
-               goto fail;
-       }
-       /* Reset DEGAMMA_LUT and CTM properties. */
-       replaced  = drm_property_replace_blob(&crtc_state->degamma_lut, NULL);
-       replaced |= drm_property_replace_blob(&crtc_state->ctm, NULL);
-       replaced |= drm_property_replace_blob(&crtc_state->gamma_lut, blob);
-       crtc_state->color_mgmt_changed |= replaced;
-       ret = drm_atomic_commit(state);
- fail:
-       drm_atomic_state_put(state);
-       drm_property_blob_put(blob);
-       return ret;
- }
- EXPORT_SYMBOL(drm_atomic_helper_legacy_gamma_set);
- /**
-  * __drm_atomic_helper_private_duplicate_state - copy atomic private state
-  * @obj: CRTC object
-  * @state: new private object state
-  *
-  * Copies atomic state from a private objects's current state and resets inferred values.
-  * This is useful for drivers that subclass the private state.
-  */
- void __drm_atomic_helper_private_obj_duplicate_state(struct drm_private_obj *obj,
-                                                    struct drm_private_state *state)
- {
-       memcpy(state, obj->state, sizeof(*state));
- }
- EXPORT_SYMBOL(__drm_atomic_helper_private_obj_duplicate_state);
index 4943cef178beb7675ab46a0d3100e33ae836bd0e,c555e17ab8d7d73e6bd059c3e2a289ead01f5278..aa18b1d7d3e4df837de8561ae10322d31ff5159c
@@@ -260,9 -260,7 +260,7 @@@ int drm_connector_init(struct drm_devic
  
        if (connector_type != DRM_MODE_CONNECTOR_VIRTUAL &&
            connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
-               drm_object_attach_property(&connector->base,
-                                             config->edid_property,
-                                             0);
+               drm_connector_attach_edid_property(connector);
  
        drm_object_attach_property(&connector->base,
                                      config->dpms_property, 0);
@@@ -294,6 -292,24 +292,24 @@@ out_put
  }
  EXPORT_SYMBOL(drm_connector_init);
  
+ /**
+  * drm_connector_attach_edid_property - attach edid property.
+  * @connector: the connector
+  *
+  * Some connector types like DRM_MODE_CONNECTOR_VIRTUAL do not get a
+  * edid property attached by default.  This function can be used to
+  * explicitly enable the edid property in these cases.
+  */
+ void drm_connector_attach_edid_property(struct drm_connector *connector)
+ {
+       struct drm_mode_config *config = &connector->dev->mode_config;
+       drm_object_attach_property(&connector->base,
+                                  config->edid_property,
+                                  0);
+ }
+ EXPORT_SYMBOL(drm_connector_attach_edid_property);
  /**
   * drm_connector_attach_encoder - attach a connector to an encoder
   * @connector: connector to attach
@@@ -379,8 -395,7 +395,8 @@@ void drm_connector_cleanup(struct drm_c
        /* The connector should have been removed from userspace long before
         * it is finally destroyed.
         */
 -      if (WARN_ON(connector->registered))
 +      if (WARN_ON(connector->registration_state ==
 +                  DRM_CONNECTOR_REGISTERED))
                drm_connector_unregister(connector);
  
        if (connector->tile_group) {
@@@ -437,7 -452,7 +453,7 @@@ int drm_connector_register(struct drm_c
                return 0;
  
        mutex_lock(&connector->mutex);
 -      if (connector->registered)
 +      if (connector->registration_state != DRM_CONNECTOR_INITIALIZING)
                goto unlock;
  
        ret = drm_sysfs_connector_add(connector);
  
        drm_mode_object_register(connector->dev, &connector->base);
  
 -      connector->registered = true;
 +      connector->registration_state = DRM_CONNECTOR_REGISTERED;
        goto unlock;
  
  err_debugfs:
@@@ -479,7 -494,7 +495,7 @@@ EXPORT_SYMBOL(drm_connector_register)
  void drm_connector_unregister(struct drm_connector *connector)
  {
        mutex_lock(&connector->mutex);
 -      if (!connector->registered) {
 +      if (connector->registration_state != DRM_CONNECTOR_REGISTERED) {
                mutex_unlock(&connector->mutex);
                return;
        }
        drm_sysfs_connector_remove(connector);
        drm_debugfs_connector_remove(connector);
  
 -      connector->registered = false;
 +      connector->registration_state = DRM_CONNECTOR_UNREGISTERED;
        mutex_unlock(&connector->mutex);
  }
  EXPORT_SYMBOL(drm_connector_unregister);
index 0e0df398222d1e0220b4388d0513bf73f66164ae,8c3cfac437f431e5dfe2792f61efc45b39e0896d..5294145569625df3e8d7fc05c5ccc5e405ef62b1
@@@ -1275,9 -1275,6 +1275,9 @@@ static struct drm_dp_mst_branch *drm_dp
        mutex_lock(&mgr->lock);
        mstb = mgr->mst_primary;
  
 +      if (!mstb)
 +              goto out;
 +
        for (i = 0; i < lct - 1; i++) {
                int shift = (i % 2) ? 0 : 4;
                int port_num = (rad[i / 2] >> shift) & 0xf;
@@@ -2572,9 -2569,16 +2572,16 @@@ struct edid *drm_dp_mst_get_edid(struc
  EXPORT_SYMBOL(drm_dp_mst_get_edid);
  
  /**
-  * drm_dp_find_vcpi_slots() - find slots for this PBN value
+  * drm_dp_find_vcpi_slots() - Find VCPI slots for this PBN value
   * @mgr: manager to use
   * @pbn: payload bandwidth to convert into slots.
+  *
+  * Calculate the number of VCPI slots that will be required for the given PBN
+  * value. This function is deprecated, and should not be used in atomic
+  * drivers.
+  *
+  * RETURNS:
+  * The total slots required for this port, or error.
   */
  int drm_dp_find_vcpi_slots(struct drm_dp_mst_topology_mgr *mgr,
                           int pbn)
index fb0dfc62b1b6340521cb5edade5540ee29efc169,b07ab3f613e0f54f3c81e396503ec552ed8b67fe..5b516615881a0029c54a8fad9db2696f02406b80
@@@ -72,7 -72,9 +72,9 @@@ struct drm_gem_cma_object *drm_fb_cma_g
  EXPORT_SYMBOL_GPL(drm_fb_cma_get_gem_obj);
  
  /**
-  * drm_fb_cma_get_gem_addr() - Get physical address for framebuffer
+  * drm_fb_cma_get_gem_addr() - Get physical address for framebuffer, for pixel
+  * formats where values are grouped in blocks this will get you the beginning of
+  * the block
   * @fb: The framebuffer
   * @state: Which state of drm plane
   * @plane: Which plane
@@@ -87,6 -89,13 +89,13 @@@ dma_addr_t drm_fb_cma_get_gem_addr(stru
        struct drm_gem_cma_object *obj;
        dma_addr_t paddr;
        u8 h_div = 1, v_div = 1;
+       u32 block_w = drm_format_info_block_width(fb->format, plane);
+       u32 block_h = drm_format_info_block_height(fb->format, plane);
+       u32 block_size = fb->format->char_per_block[plane];
+       u32 sample_x;
+       u32 sample_y;
+       u32 block_start_y;
+       u32 num_hblocks;
  
        obj = drm_fb_cma_get_gem_obj(fb, plane);
        if (!obj)
                v_div = fb->format->vsub;
        }
  
-       paddr += (fb->format->cpp[plane] * (state->src_x >> 16)) / h_div;
-       paddr += (fb->pitches[plane] * (state->src_y >> 16)) / v_div;
+       sample_x = (state->src_x >> 16) / h_div;
+       sample_y = (state->src_y >> 16) / v_div;
+       block_start_y = (sample_y / block_h) * block_h;
+       num_hblocks = sample_x / block_w;
+       paddr += fb->pitches[plane] * block_start_y;
+       paddr += block_size * num_hblocks;
  
        return paddr;
  }
@@@ -124,10 -138,7 +138,7 @@@ int drm_fb_cma_fbdev_init(struct drm_de
  
        /* dev->fb_helper will indirectly point to fbdev_cma after this call */
        fbdev_cma = drm_fbdev_cma_init(dev, preferred_bpp, max_conn_count);
-       if (IS_ERR(fbdev_cma))
-               return PTR_ERR(fbdev_cma);
-       return 0;
+       return PTR_ERR_OR_ZERO(fbdev_cma);
  }
  EXPORT_SYMBOL_GPL(drm_fb_cma_fbdev_init);
  
@@@ -167,7 -178,7 +178,7 @@@ struct drm_fbdev_cma *drm_fbdev_cma_ini
  
        fb_helper = &fbdev_cma->fb_helper;
  
 -      ret = drm_client_new(dev, &fb_helper->client, "fbdev", NULL);
 +      ret = drm_client_init(dev, &fb_helper->client, "fbdev", NULL);
        if (ret)
                goto err_free;
  
        if (ret)
                goto err_client_put;
  
 +      drm_client_add(&fb_helper->client);
 +
        return fbdev_cma;
  
  err_client_put:
@@@ -226,21 -235,3 +237,3 @@@ void drm_fbdev_cma_hotplug_event(struc
                drm_fb_helper_hotplug_event(&fbdev_cma->fb_helper);
  }
  EXPORT_SYMBOL_GPL(drm_fbdev_cma_hotplug_event);
- /**
-  * drm_fbdev_cma_set_suspend_unlocked - wrapper around
-  *                                      drm_fb_helper_set_suspend_unlocked
-  * @fbdev_cma: The drm_fbdev_cma struct, may be NULL
-  * @state: desired state, zero to resume, non-zero to suspend
-  *
-  * Calls drm_fb_helper_set_suspend, which is a wrapper around
-  * fb_set_suspend implemented by fbdev core.
-  */
- void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
-                                       bool state)
- {
-       if (fbdev_cma)
-               drm_fb_helper_set_suspend_unlocked(&fbdev_cma->fb_helper,
-                                                  state);
- }
- EXPORT_SYMBOL(drm_fbdev_cma_set_suspend_unlocked);
index a502f3e519fdb668c685f392d518361e1e0a1ef2,8024524f05477ea5aa6ff524fe90521f0ff7870e..9a69ad7e9f3b8beb6769d7a92673cd7dd2840757
@@@ -1599,25 -1599,6 +1599,25 @@@ unlock
  }
  EXPORT_SYMBOL(drm_fb_helper_ioctl);
  
 +static bool drm_fb_pixel_format_equal(const struct fb_var_screeninfo *var_1,
 +                                    const struct fb_var_screeninfo *var_2)
 +{
 +      return var_1->bits_per_pixel == var_2->bits_per_pixel &&
 +             var_1->grayscale == var_2->grayscale &&
 +             var_1->red.offset == var_2->red.offset &&
 +             var_1->red.length == var_2->red.length &&
 +             var_1->red.msb_right == var_2->red.msb_right &&
 +             var_1->green.offset == var_2->green.offset &&
 +             var_1->green.length == var_2->green.length &&
 +             var_1->green.msb_right == var_2->green.msb_right &&
 +             var_1->blue.offset == var_2->blue.offset &&
 +             var_1->blue.length == var_2->blue.length &&
 +             var_1->blue.msb_right == var_2->blue.msb_right &&
 +             var_1->transp.offset == var_2->transp.offset &&
 +             var_1->transp.length == var_2->transp.length &&
 +             var_1->transp.msb_right == var_2->transp.msb_right;
 +}
 +
  /**
   * drm_fb_helper_check_var - implementation for &fb_ops.fb_check_var
   * @var: screeninfo to check
@@@ -1628,10 -1609,15 +1628,14 @@@ int drm_fb_helper_check_var(struct fb_v
  {
        struct drm_fb_helper *fb_helper = info->par;
        struct drm_framebuffer *fb = fb_helper->fb;
 -      int depth;
  
        if (var->pixclock != 0 || in_dbg_master())
                return -EINVAL;
  
+       if ((drm_format_info_block_width(fb->format, 0) > 1) ||
+           (drm_format_info_block_height(fb->format, 0) > 1))
+               return -EINVAL;
        /*
         * Changes struct fb_var_screeninfo are currently not pushed back
         * to KMS, hence fail if different settings are requested.
                return -EINVAL;
        }
  
 -      switch (var->bits_per_pixel) {
 -      case 16:
 -              depth = (var->green.length == 6) ? 16 : 15;
 -              break;
 -      case 32:
 -              depth = (var->transp.length > 0) ? 32 : 24;
 -              break;
 -      default:
 -              depth = var->bits_per_pixel;
 -              break;
 -      }
 -
 -      switch (depth) {
 -      case 8:
 -              var->red.offset = 0;
 -              var->green.offset = 0;
 -              var->blue.offset = 0;
 -              var->red.length = 8;
 -              var->green.length = 8;
 -              var->blue.length = 8;
 -              var->transp.length = 0;
 -              var->transp.offset = 0;
 -              break;
 -      case 15:
 -              var->red.offset = 10;
 -              var->green.offset = 5;
 -              var->blue.offset = 0;
 -              var->red.length = 5;
 -              var->green.length = 5;
 -              var->blue.length = 5;
 -              var->transp.length = 1;
 -              var->transp.offset = 15;
 -              break;
 -      case 16:
 -              var->red.offset = 11;
 -              var->green.offset = 5;
 -              var->blue.offset = 0;
 -              var->red.length = 5;
 -              var->green.length = 6;
 -              var->blue.length = 5;
 -              var->transp.length = 0;
 -              var->transp.offset = 0;
 -              break;
 -      case 24:
 -              var->red.offset = 16;
 -              var->green.offset = 8;
 -              var->blue.offset = 0;
 -              var->red.length = 8;
 -              var->green.length = 8;
 -              var->blue.length = 8;
 -              var->transp.length = 0;
 -              var->transp.offset = 0;
 -              break;
 -      case 32:
 -              var->red.offset = 16;
 -              var->green.offset = 8;
 -              var->blue.offset = 0;
 -              var->red.length = 8;
 -              var->green.length = 8;
 -              var->blue.length = 8;
 -              var->transp.length = 8;
 -              var->transp.offset = 24;
 -              break;
 -      default:
 +      /*
 +       * drm fbdev emulation doesn't support changing the pixel format at all,
 +       * so reject all pixel format changing requests.
 +       */
 +      if (!drm_fb_pixel_format_equal(var, &info->var)) {
 +              DRM_DEBUG("fbdev emulation doesn't support changing the pixel format\n");
                return -EINVAL;
        }
 +
        return 0;
  }
  EXPORT_SYMBOL(drm_fb_helper_check_var);
@@@ -1949,6 -1992,8 +1953,8 @@@ void drm_fb_helper_fill_var(struct fb_i
  {
        struct drm_framebuffer *fb = fb_helper->fb;
  
+       WARN_ON((drm_format_info_block_width(fb->format, 0) > 1) ||
+               (drm_format_info_block_height(fb->format, 0) > 1));
        info->pseudo_palette = fb_helper->pseudo_palette;
        info->var.xres_virtual = fb->width;
        info->var.yres_virtual = fb->height;
@@@ -3219,15 -3264,13 +3225,15 @@@ int drm_fbdev_generic_setup(struct drm_
        if (!fb_helper)
                return -ENOMEM;
  
 -      ret = drm_client_new(dev, &fb_helper->client, "fbdev", &drm_fbdev_client_funcs);
 +      ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_client_funcs);
        if (ret) {
                kfree(fb_helper);
                DRM_DEV_ERROR(dev->dev, "Failed to register client: %d\n", ret);
                return ret;
        }
  
 +      drm_client_add(&fb_helper->client);
 +
        fb_helper->preferred_bpp = preferred_bpp;
  
        ret = drm_fbdev_client_hotplug(&fb_helper->client);
index 24a177ea54176d91b289da8471cbffce3d4ee120,3b367e07c87e026de588215599e1e428aee29575..3650d3c467180e502e9695383e4bf358529693fc
@@@ -39,7 -39,6 +39,6 @@@ struct drm_master *drm_lease_owner(stru
                master = master->lessor;
        return master;
  }
- EXPORT_SYMBOL(drm_lease_owner);
  
  /**
   * _drm_find_lessee - find lessee by id (idr_mutex held)
@@@ -117,7 -116,6 +116,6 @@@ bool _drm_lease_held(struct drm_file *f
  
        return _drm_lease_held_master(file_priv->master, id);
  }
- EXPORT_SYMBOL(_drm_lease_held);
  
  /**
   * drm_lease_held - check drm_mode_object lease status (idr_mutex not held)
@@@ -144,7 -142,6 +142,6 @@@ bool drm_lease_held(struct drm_file *fi
        mutex_unlock(&master->dev->mode_config.idr_mutex);
        return ret;
  }
- EXPORT_SYMBOL(drm_lease_held);
  
  /**
   * drm_lease_filter_crtcs - restricted crtc set to leased values (idr_mutex not held)
@@@ -184,7 -181,6 +181,6 @@@ uint32_t drm_lease_filter_crtcs(struct 
        mutex_unlock(&master->dev->mode_config.idr_mutex);
        return crtcs_out;
  }
- EXPORT_SYMBOL(drm_lease_filter_crtcs);
  
  /*
   * drm_lease_create - create a new drm_master with leased objects (idr_mutex not held)
   * make sure all of the desired objects can be leased, atomically
   * leasing them to the new drmmaster.
   *
-  *    ERR_PTR(-EACCESS)       some other master holds the title to any object
+  *    ERR_PTR(-EACCES       some other master holds the title to any object
   *    ERR_PTR(-ENOENT)        some object is not a valid DRM object for this device
   *    ERR_PTR(-EBUSY)         some other lessee holds title to this object
   *    ERR_PTR(-EEXIST)        same object specified more than once in the provided list
@@@ -357,9 -353,9 +353,9 @@@ void drm_lease_revoke(struct drm_maste
  }
  
  static int validate_lease(struct drm_device *dev,
-                         struct drm_file *lessor_priv,
                          int object_count,
-                         struct drm_mode_object **objects)
+                         struct drm_mode_object **objects,
+                         bool universal_planes)
  {
        int o;
        int has_crtc = -1;
                if (objects[o]->type == DRM_MODE_OBJECT_CONNECTOR && has_connector == -1)
                        has_connector = o;
  
-               if (lessor_priv->universal_planes) {
+               if (universal_planes) {
                        if (objects[o]->type == DRM_MODE_OBJECT_PLANE && has_plane == -1)
                                has_plane = o;
                }
        }
        if (has_crtc == -1 || has_connector == -1)
                return -EINVAL;
-       if (lessor_priv->universal_planes && has_plane == -1)
+       if (universal_planes && has_plane == -1)
                return -EINVAL;
        return 0;
  }
@@@ -397,6 -393,8 +393,8 @@@ static int fill_object_idr(struct drm_d
        struct drm_mode_object **objects;
        u32 o;
        int ret;
+       bool universal_planes = READ_ONCE(lessor_priv->universal_planes);
        objects = kcalloc(object_count, sizeof(struct drm_mode_object *),
                          GFP_KERNEL);
        if (!objects)
                }
  
                if (!drm_mode_object_lease_required(objects[o]->type)) {
+                       DRM_DEBUG_KMS("invalid object for lease\n");
                        ret = -EINVAL;
                        goto out_free_objects;
                }
        }
  
-       ret = validate_lease(dev, lessor_priv, object_count, objects);
-       if (ret)
+       ret = validate_lease(dev, object_count, objects, universal_planes);
+       if (ret) {
+               DRM_DEBUG_LEASE("lease validation failed\n");
                goto out_free_objects;
+       }
  
        /* add their IDs to the lease request - taking into account
           universal planes */
                                        object_id, ret);
                        goto out_free_objects;
                }
-               if (obj->type == DRM_MODE_OBJECT_CRTC && !lessor_priv->universal_planes) {
+               if (obj->type == DRM_MODE_OBJECT_CRTC && !universal_planes) {
                        struct drm_crtc *crtc = obj_to_crtc(obj);
                        ret = idr_alloc(leases, &drm_lease_idr_object, crtc->primary->base.id, crtc->primary->base.id + 1, GFP_KERNEL);
                        if (ret < 0) {
@@@ -509,15 -510,21 +510,21 @@@ int drm_mode_create_lease_ioctl(struct 
                return -EOPNOTSUPP;
  
        /* Do not allow sub-leases */
-       if (lessor->lessor)
+       if (lessor->lessor) {
+               DRM_DEBUG_LEASE("recursive leasing not allowed\n");
                return -EINVAL;
+       }
  
        /* need some objects */
-       if (cl->object_count == 0)
+       if (cl->object_count == 0) {
+               DRM_DEBUG_LEASE("no objects in lease\n");
                return -EINVAL;
+       }
  
-       if (cl->flags && (cl->flags & ~(O_CLOEXEC | O_NONBLOCK)))
+       if (cl->flags && (cl->flags & ~(O_CLOEXEC | O_NONBLOCK))) {
+               DRM_DEBUG_LEASE("invalid flags\n");
                return -EINVAL;
+       }
  
        object_count = cl->object_count;
  
                              object_count, object_ids);
        kfree(object_ids);
        if (ret) {
+               DRM_DEBUG_LEASE("lease object lookup failed: %i\n", ret);
                idr_destroy(&leases);
                return ret;
        }
        lessee_priv->is_master = 1;
        lessee_priv->authenticated = 1;
  
 -      /* Hook up the fd */
 -      fd_install(fd, lessee_file);
 -
        /* Pass fd back to userspace */
        DRM_DEBUG_LEASE("Returning fd %d id %d\n", fd, lessee->lessee_id);
        cl->fd = fd;
        cl->lessee_id = lessee->lessee_id;
  
 +      /* Hook up the fd */
 +      fd_install(fd, lessee_file);
 +
        DRM_DEBUG_LEASE("drm_mode_create_lease_ioctl succeeded\n");
        return 0;
  
index 1aaccbe7e1debd0c11440ac9acae9c15b07880d5,f90a09b83370745a24b48d0c5544d3a270805a6b..1a1c04db6c80651e4bf3a88eb3000bf084caca47
@@@ -460,7 -460,7 +460,7 @@@ eb_validate_vma(struct i915_execbuffer 
         * any non-page-aligned or non-canonical addresses.
         */
        if (unlikely(entry->flags & EXEC_OBJECT_PINNED &&
 -                   entry->offset != gen8_canonical_addr(entry->offset & PAGE_MASK)))
 +                   entry->offset != gen8_canonical_addr(entry->offset & I915_GTT_PAGE_MASK)))
                return -EINVAL;
  
        /* pad_to_size was once a reserved field, so sanitize it */
@@@ -2157,7 -2157,7 +2157,7 @@@ await_fence_array(struct i915_execbuffe
                if (!(flags & I915_EXEC_FENCE_WAIT))
                        continue;
  
-               fence = drm_syncobj_fence_get(syncobj);
+               drm_syncobj_search_fence(syncobj, 0, 0, &fence);
                if (!fence)
                        return -EINVAL;
  
index a04ffb3b21742a834c44c4770e2760f8139053dd,07d576d99475d9b47a6bf16b906062ca14b0a809..5fbee837b0dbedbdd22cc4232e61279e1cb26e2c
@@@ -56,8 -56,6 +56,8 @@@ struct panel_desc 
        /**
         * @prepare: the time (in milliseconds) that it takes for the panel to
         *           become ready and start receiving video data
 +       * @hpd_absent_delay: Add this to the prepare delay if we know Hot
 +       *                    Plug Detect isn't used.
         * @enable: the time (in milliseconds) that it takes for the panel to
         *          display the first valid frame after starting to receive
         *          video data
@@@ -68,7 -66,6 +68,7 @@@
         */
        struct {
                unsigned int prepare;
 +              unsigned int hpd_absent_delay;
                unsigned int enable;
                unsigned int disable;
                unsigned int unprepare;
@@@ -82,7 -79,6 +82,7 @@@ struct panel_simple 
        struct drm_panel base;
        bool prepared;
        bool enabled;
 +      bool no_hpd;
  
        const struct panel_desc *desc;
  
@@@ -206,7 -202,6 +206,7 @@@ static int panel_simple_unprepare(struc
  static int panel_simple_prepare(struct drm_panel *panel)
  {
        struct panel_simple *p = to_panel_simple(panel);
 +      unsigned int delay;
        int err;
  
        if (p->prepared)
  
        gpiod_set_value_cansleep(p->enable_gpio, 1);
  
 -      if (p->desc->delay.prepare)
 -              msleep(p->desc->delay.prepare);
 +      delay = p->desc->delay.prepare;
 +      if (p->no_hpd)
 +              delay += p->desc->delay.hpd_absent_delay;
 +      if (delay)
 +              msleep(delay);
  
        p->prepared = true;
  
@@@ -313,8 -305,6 +313,8 @@@ static int panel_simple_probe(struct de
        panel->prepared = false;
        panel->desc = desc;
  
 +      panel->no_hpd = of_property_read_bool(dev->of_node, "no-hpd");
 +
        panel->supply = devm_regulator_get(dev, "power");
        if (IS_ERR(panel->supply))
                return PTR_ERR(panel->supply);
@@@ -782,16 -772,38 +782,38 @@@ static const struct panel_desc avic_tm0
        },
  };
  
+ static const struct drm_display_mode bananapi_s070wv20_ct16_mode = {
+       .clock = 30000,
+       .hdisplay = 800,
+       .hsync_start = 800 + 40,
+       .hsync_end = 800 + 40 + 48,
+       .htotal = 800 + 40 + 48 + 40,
+       .vdisplay = 480,
+       .vsync_start = 480 + 13,
+       .vsync_end = 480 + 13 + 3,
+       .vtotal = 480 + 13 + 3 + 29,
+ };
+ static const struct panel_desc bananapi_s070wv20_ct16 = {
+       .modes = &bananapi_s070wv20_ct16_mode,
+       .num_modes = 1,
+       .bpc = 6,
+       .size = {
+               .width = 154,
+               .height = 86,
+       },
+ };
  static const struct drm_display_mode boe_hv070wsa_mode = {
-       .clock = 40800,
+       .clock = 42105,
        .hdisplay = 1024,
-       .hsync_start = 1024 + 90,
-       .hsync_end = 1024 + 90 + 90,
-       .htotal = 1024 + 90 + 90 + 90,
+       .hsync_start = 1024 + 30,
+       .hsync_end = 1024 + 30 + 30,
+       .htotal = 1024 + 30 + 30 + 30,
        .vdisplay = 600,
-       .vsync_start = 600 + 3,
-       .vsync_end = 600 + 3 + 4,
-       .vtotal = 600 + 3 + 4 + 3,
+       .vsync_start = 600 + 10,
+       .vsync_end = 600 + 10 + 10,
+       .vtotal = 600 + 10 + 10 + 10,
        .vrefresh = 60,
  };
  
@@@ -846,6 -858,55 +868,55 @@@ static const struct panel_desc boe_nv10
        },
  };
  
+ static const struct drm_display_mode cdtech_s043wq26h_ct7_mode = {
+       .clock = 9000,
+       .hdisplay = 480,
+       .hsync_start = 480 + 5,
+       .hsync_end = 480 + 5 + 5,
+       .htotal = 480 + 5 + 5 + 40,
+       .vdisplay = 272,
+       .vsync_start = 272 + 8,
+       .vsync_end = 272 + 8 + 8,
+       .vtotal = 272 + 8 + 8 + 8,
+       .vrefresh = 60,
+       .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
+ };
+ static const struct panel_desc cdtech_s043wq26h_ct7 = {
+       .modes = &cdtech_s043wq26h_ct7_mode,
+       .num_modes = 1,
+       .bpc = 8,
+       .size = {
+               .width = 95,
+               .height = 54,
+       },
+       .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
+ };
+ static const struct drm_display_mode cdtech_s070wv95_ct16_mode = {
+       .clock = 35000,
+       .hdisplay = 800,
+       .hsync_start = 800 + 40,
+       .hsync_end = 800 + 40 + 40,
+       .htotal = 800 + 40 + 40 + 48,
+       .vdisplay = 480,
+       .vsync_start = 480 + 29,
+       .vsync_end = 480 + 29 + 13,
+       .vtotal = 480 + 29 + 13 + 3,
+       .vrefresh = 60,
+       .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
+ };
+ static const struct panel_desc cdtech_s070wv95_ct16 = {
+       .modes = &cdtech_s070wv95_ct16_mode,
+       .num_modes = 1,
+       .bpc = 8,
+       .size = {
+               .width = 154,
+               .height = 85,
+       },
+ };
  static const struct drm_display_mode chunghwa_claa070wp03xg_mode = {
        .clock = 66770,
        .hdisplay = 800,
@@@ -971,6 -1032,36 +1042,36 @@@ static const struct panel_desc dlc_dlc0
        .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
  };
  
+ static const struct display_timing dlc_dlc1010gig_timing = {
+       .pixelclock = { 68900000, 71100000, 73400000 },
+       .hactive = { 1280, 1280, 1280 },
+       .hfront_porch = { 43, 53, 63 },
+       .hback_porch = { 43, 53, 63 },
+       .hsync_len = { 44, 54, 64 },
+       .vactive = { 800, 800, 800 },
+       .vfront_porch = { 5, 8, 11 },
+       .vback_porch = { 5, 8, 11 },
+       .vsync_len = { 5, 7, 11 },
+       .flags = DISPLAY_FLAGS_DE_HIGH,
+ };
+ static const struct panel_desc dlc_dlc1010gig = {
+       .timings = &dlc_dlc1010gig_timing,
+       .num_timings = 1,
+       .bpc = 8,
+       .size = {
+               .width = 216,
+               .height = 135,
+       },
+       .delay = {
+               .prepare = 60,
+               .enable = 150,
+               .disable = 100,
+               .unprepare = 60,
+       },
+       .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+ };
  static const struct drm_display_mode edt_et057090dhu_mode = {
        .clock = 25175,
        .hdisplay = 640,
@@@ -1373,7 -1464,7 +1474,7 @@@ static const struct panel_desc innolux_
        },
  };
  
 -static const struct drm_display_mode innolux_tv123wam_mode = {
 +static const struct drm_display_mode innolux_p120zdg_bf1_mode = {
        .clock = 206016,
        .hdisplay = 2160,
        .hsync_start = 2160 + 48,
        .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
  };
  
 -static const struct panel_desc innolux_tv123wam = {
 -      .modes = &innolux_tv123wam_mode,
 +static const struct panel_desc innolux_p120zdg_bf1 = {
 +      .modes = &innolux_p120zdg_bf1_mode,
        .num_modes = 1,
        .bpc = 8,
        .size = {
 -              .width = 259,
 -              .height = 173,
 +              .width = 254,
 +              .height = 169,
        },
        .delay = {
 +              .hpd_absent_delay = 200,
                .unprepare = 500,
        },
  };
@@@ -2334,6 -2424,33 +2435,33 @@@ static const struct panel_desc winstar_
        .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  };
  
+ static const struct drm_display_mode arm_rtsm_mode[] = {
+       {
+               .clock = 65000,
+               .hdisplay = 1024,
+               .hsync_start = 1024 + 24,
+               .hsync_end = 1024 + 24 + 136,
+               .htotal = 1024 + 24 + 136 + 160,
+               .vdisplay = 768,
+               .vsync_start = 768 + 3,
+               .vsync_end = 768 + 3 + 6,
+               .vtotal = 768 + 3 + 6 + 29,
+               .vrefresh = 60,
+               .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+       },
+ };
+ static const struct panel_desc arm_rtsm = {
+       .modes = arm_rtsm_mode,
+       .num_modes = 1,
+       .bpc = 8,
+       .size = {
+               .width = 400,
+               .height = 300,
+       },
+       .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+ };
  static const struct of_device_id platform_of_match[] = {
        {
                .compatible = "ampire,am-480272h3tmqw-t01h",
        }, {
                .compatible = "ampire,am800480r3tmqwa1h",
                .data = &ampire_am800480r3tmqwa1h,
+       }, {
+               .compatible = "arm,rtsm-display",
+               .data = &arm_rtsm,
        }, {
                .compatible = "auo,b101aw03",
                .data = &auo_b101aw03,
        }, {
                .compatible = "avic,tm070ddh03",
                .data = &avic_tm070ddh03,
+       }, {
+               .compatible = "bananapi,s070wv20-ct16",
+               .data = &bananapi_s070wv20_ct16,
        }, {
                .compatible = "boe,hv070wsa-100",
                .data = &boe_hv070wsa
        }, {
                .compatible = "boe,nv101wxmn51",
                .data = &boe_nv101wxmn51,
+       }, {
+               .compatible = "cdtech,s043wq26h-ct7",
+               .data = &cdtech_s043wq26h_ct7,
+       }, {
+               .compatible = "cdtech,s070wv95-ct16",
+               .data = &cdtech_s070wv95_ct16,
        }, {
                .compatible = "chunghwa,claa070wp03xg",
                .data = &chunghwa_claa070wp03xg,
        }, {
                .compatible = "dlc,dlc0700yzg-1",
                .data = &dlc_dlc0700yzg_1,
+       }, {
+               .compatible = "dlc,dlc1010gig",
+               .data = &dlc_dlc1010gig,
        }, {
                .compatible = "edt,et057090dhu",
                .data = &edt_et057090dhu,
                .compatible = "innolux,n156bge-l21",
                .data = &innolux_n156bge_l21,
        }, {
 -              .compatible = "innolux,tv123wam",
 -              .data = &innolux_tv123wam,
 +              .compatible = "innolux,p120zdg-bf1",
 +              .data = &innolux_p120zdg_bf1,
        }, {
                .compatible = "innolux,zj070na-01p",
                .data = &innolux_zj070na_01p,
index f3899cc84e27f8db4c89c63e8ab1f2593dd8432a,b85b181bbb6c4cd9ff1a06f9b540189b90f3c3f5..4551bca3c1278360707cde916af56fb153e5d56e
@@@ -550,7 -550,7 +550,7 @@@ static void log_infoframe(struct v4l2_s
        buffer[3] = 0;
        buffer[3] = hdmi_infoframe_checksum(buffer, len + 4);
  
-       if (hdmi_infoframe_unpack(&frame, buffer) < 0) {
+       if (hdmi_infoframe_unpack(&frame, buffer, sizeof(buffer)) < 0) {
                v4l2_err(sd, "%s: unpack of %s infoframe failed\n", __func__, cri->desc);
                return;
        }
@@@ -1355,10 -1355,10 +1355,10 @@@ static int adv7511_set_fmt(struct v4l2_
        state->xfer_func = format->format.xfer_func;
  
        switch (format->format.colorspace) {
 -      case V4L2_COLORSPACE_ADOBERGB:
 +      case V4L2_COLORSPACE_OPRGB:
                c = HDMI_COLORIMETRY_EXTENDED;
 -              ec = y ? HDMI_EXTENDED_COLORIMETRY_ADOBE_YCC_601 :
 -                       HDMI_EXTENDED_COLORIMETRY_ADOBE_RGB;
 +              ec = y ? HDMI_EXTENDED_COLORIMETRY_OPYCC_601 :
 +                       HDMI_EXTENDED_COLORIMETRY_OPRGB;
                break;
        case V4L2_COLORSPACE_SMPTE170M:
                c = y ? HDMI_COLORIMETRY_ITU_601 : HDMI_COLORIMETRY_NONE;
index 9eb7c70a7712580a6741723c9447d7439bc87b7d,2e7a28dbad4ecf11da8dc42b6eef2b4057dfdadf..9f99ef38bccaf676e072877cd6e9f41cf1fe7371
@@@ -2284,10 -2284,8 +2284,10 @@@ static int adv76xx_set_edid(struct v4l2
                state->aspect_ratio.numerator = 16;
                state->aspect_ratio.denominator = 9;
  
 -              if (!state->edid.present)
 +              if (!state->edid.present) {
                        state->edid.blocks = 0;
 +                      cec_phys_addr_invalidate(state->cec_adap);
 +              }
  
                v4l2_dbg(2, debug, sd, "%s: clear EDID pad %d, edid.present = 0x%x\n",
                                __func__, edid->pad, state->edid.present);
                edid->blocks = 2;
                return -E2BIG;
        }
 -      pa = cec_get_edid_phys_addr(edid->edid, edid->blocks * 128, &spa_loc);
 -      err = cec_phys_addr_validate(pa, &pa, NULL);
 +      pa = v4l2_get_edid_phys_addr(edid->edid, edid->blocks * 128, &spa_loc);
 +      err = v4l2_phys_addr_validate(pa, &pa, NULL);
        if (err)
                return err;
  
@@@ -2420,7 -2418,7 +2420,7 @@@ static int adv76xx_read_infoframe(struc
                buffer[i + 3] = infoframe_read(sd,
                                       adv76xx_cri[index].payload_addr + i);
  
-       if (hdmi_infoframe_unpack(frame, buffer) < 0) {
+       if (hdmi_infoframe_unpack(frame, buffer, sizeof(buffer)) < 0) {
                v4l2_err(sd, "%s: unpack of %s infoframe failed\n", __func__,
                         adv76xx_cri[index].desc);
                return -ENOENT;
@@@ -2476,7 -2474,7 +2476,7 @@@ static int adv76xx_log_status(struct v4
                "YCbCr Bt.601 (16-235)", "YCbCr Bt.709 (16-235)",
                "xvYCC Bt.601", "xvYCC Bt.709",
                "YCbCr Bt.601 (0-255)", "YCbCr Bt.709 (0-255)",
 -              "sYCC", "Adobe YCC 601", "AdobeRGB", "invalid", "invalid",
 +              "sYCC", "opYCC 601", "opRGB", "invalid", "invalid",
                "invalid", "invalid", "invalid"
        };
        static const char * const rgb_quantization_range_txt[] = {
@@@ -3095,7 -3093,7 +3095,7 @@@ MODULE_DEVICE_TABLE(of, adv76xx_of_id)
  
  static int adv76xx_parse_dt(struct adv76xx_state *state)
  {
 -      struct v4l2_fwnode_endpoint bus_cfg;
 +      struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = 0 };
        struct device_node *endpoint;
        struct device_node *np;
        unsigned int flags;
index 4721d49dcf0fef4bc4048e73d49bac558e3ed13e,2cfd03f929b250f41fe1bc42b6ab593860497697..0e6384f2016a60d2df687b6efc16529418c20465
@@@ -786,13 -786,11 +786,13 @@@ static int edid_write_hdmi_segment(stru
        /* Disable I2C access to internal EDID ram from HDMI DDC ports */
        rep_write_and_or(sd, 0x77, 0xf3, 0x00);
  
 -      if (!state->hdmi_edid.present)
 +      if (!state->hdmi_edid.present) {
 +              cec_phys_addr_invalidate(state->cec_adap);
                return 0;
 +      }
  
 -      pa = cec_get_edid_phys_addr(edid, 256, &spa_loc);
 -      err = cec_phys_addr_validate(pa, &pa, NULL);
 +      pa = v4l2_get_edid_phys_addr(edid, 256, &spa_loc);
 +      err = v4l2_phys_addr_validate(pa, &pa, NULL);
        if (err)
                return err;
  
@@@ -1527,7 -1525,6 +1527,7 @@@ static void adv7842_fill_optional_dv_ti
        v4l2_find_dv_timings_cap(timings, adv7842_get_dv_timings_cap(sd),
                        is_digital_input(sd) ? 250000 : 1000000,
                        adv7842_check_dv_timings, NULL);
 +      timings->bt.flags |= V4L2_DV_FL_CAN_DETECT_REDUCED_FPS;
  }
  
  static int adv7842_query_dv_timings(struct v4l2_subdev *sd,
                        bt->il_vbackporch = 0;
                }
                adv7842_fill_optional_dv_timings_fields(sd, timings);
 +              if ((timings->bt.flags & V4L2_DV_FL_CAN_REDUCE_FPS) &&
 +                  freq < bt->pixelclock) {
 +                      u32 reduced_freq = ((u32)bt->pixelclock / 1001) * 1000;
 +                      u32 delta_freq = abs(freq - reduced_freq);
 +
 +                      if (delta_freq < ((u32)bt->pixelclock - reduced_freq) / 2)
 +                              timings->bt.flags |= V4L2_DV_FL_REDUCED_FPS;
 +              }
        } else {
                /* find format
                 * Since LCVS values are inaccurate [REF_03, p. 339-340],
@@@ -2574,7 -2563,7 +2574,7 @@@ static void log_infoframe(struct v4l2_s
        for (i = 0; i < len; i++)
                buffer[i + 3] = infoframe_read(sd, cri->payload_addr + i);
  
-       if (hdmi_infoframe_unpack(&frame, buffer) < 0) {
+       if (hdmi_infoframe_unpack(&frame, buffer, sizeof(buffer)) < 0) {
                v4l2_err(sd, "%s: unpack of %s infoframe failed\n", __func__, cri->desc);
                return;
        }
index ca5d92942820a2fcb439ec1e7d277dd445214276,519bf92508d5bddc61b3691a4bc07cd22cfb03ca..a38e54b8f687a7c4aec12309bb7161f4826ab495
@@@ -444,7 -444,7 +444,7 @@@ static void print_avi_infoframe(struct 
  
        i2c_rd(sd, PK_AVI_0HEAD, buffer, HDMI_INFOFRAME_SIZE(AVI));
  
-       if (hdmi_infoframe_unpack(&frame, buffer) < 0) {
+       if (hdmi_infoframe_unpack(&frame, buffer, sizeof(buffer)) < 0) {
                v4l2_err(sd, "%s: unpack of AVI infoframe failed\n", __func__);
                return;
        }
@@@ -1243,9 -1243,9 +1243,9 @@@ static int tc358743_log_status(struct v
        u8 vi_status3 =  i2c_rd8(sd, VI_STATUS3);
        const int deep_color_mode[4] = { 8, 10, 12, 16 };
        static const char * const input_color_space[] = {
 -              "RGB", "YCbCr 601", "Adobe RGB", "YCbCr 709", "NA (4)",
 +              "RGB", "YCbCr 601", "opRGB", "YCbCr 709", "NA (4)",
                "xvYCC 601", "NA(6)", "xvYCC 709", "NA(8)", "sYCC601",
 -              "NA(10)", "NA(11)", "NA(12)", "Adobe YCC 601"};
 +              "NA(10)", "NA(11)", "NA(12)", "opYCC 601"};
  
        v4l2_info(sd, "-----Chip status-----\n");
        v4l2_info(sd, "Chip ID: 0x%02x\n",
@@@ -1607,7 -1607,7 +1607,7 @@@ static int tc358743_g_mbus_config(struc
  {
        struct tc358743_state *state = to_state(sd);
  
 -      cfg->type = V4L2_MBUS_CSI2;
 +      cfg->type = V4L2_MBUS_CSI2_DPHY;
  
        /* Support for non-continuous CSI-2 clock is missing in the driver */
        cfg->flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
@@@ -1789,7 -1789,7 +1789,7 @@@ static int tc358743_s_edid(struct v4l2_
                return -E2BIG;
        }
        pa = cec_get_edid_phys_addr(edid->edid, edid->blocks * 128, NULL);
 -      err = cec_phys_addr_validate(pa, &pa, NULL);
 +      err = v4l2_phys_addr_validate(pa, &pa, NULL);
        if (err)
                return err;
  
@@@ -1895,11 -1895,11 +1895,11 @@@ static void tc358743_gpio_reset(struct 
  static int tc358743_probe_of(struct tc358743_state *state)
  {
        struct device *dev = &state->i2c_client->dev;
 -      struct v4l2_fwnode_endpoint *endpoint;
 +      struct v4l2_fwnode_endpoint endpoint = { .bus_type = 0 };
        struct device_node *ep;
        struct clk *refclk;
        u32 bps_pr_lane;
 -      int ret = -EINVAL;
 +      int ret;
  
        refclk = devm_clk_get(dev, "refclk");
        if (IS_ERR(refclk)) {
                return -EINVAL;
        }
  
 -      endpoint = v4l2_fwnode_endpoint_alloc_parse(of_fwnode_handle(ep));
 -      if (IS_ERR(endpoint)) {
 +      ret = v4l2_fwnode_endpoint_alloc_parse(of_fwnode_handle(ep), &endpoint);
 +      if (ret) {
                dev_err(dev, "failed to parse endpoint\n");
 -              ret = PTR_ERR(endpoint);
 +              ret = ret;
                goto put_node;
        }
  
 -      if (endpoint->bus_type != V4L2_MBUS_CSI2 ||
 -          endpoint->bus.mipi_csi2.num_data_lanes == 0 ||
 -          endpoint->nr_of_link_frequencies == 0) {
 +      if (endpoint.bus_type != V4L2_MBUS_CSI2_DPHY ||
 +          endpoint.bus.mipi_csi2.num_data_lanes == 0 ||
 +          endpoint.nr_of_link_frequencies == 0) {
                dev_err(dev, "missing CSI-2 properties in endpoint\n");
 +              ret = -EINVAL;
                goto free_endpoint;
        }
  
 -      if (endpoint->bus.mipi_csi2.num_data_lanes > 4) {
 +      if (endpoint.bus.mipi_csi2.num_data_lanes > 4) {
                dev_err(dev, "invalid number of lanes\n");
 +              ret = -EINVAL;
                goto free_endpoint;
        }
  
 -      state->bus = endpoint->bus.mipi_csi2;
 +      state->bus = endpoint.bus.mipi_csi2;
  
        ret = clk_prepare_enable(refclk);
        if (ret) {
         * The CSI bps per lane must be between 62.5 Mbps and 1 Gbps.
         * The default is 594 Mbps for 4-lane 1080p60 or 2-lane 720p60.
         */
 -      bps_pr_lane = 2 * endpoint->link_frequencies[0];
 +      bps_pr_lane = 2 * endpoint.link_frequencies[0];
        if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) {
                dev_err(dev, "unsupported bps per lane: %u bps\n", bps_pr_lane);
                goto disable_clk;
  disable_clk:
        clk_disable_unprepare(refclk);
  free_endpoint:
 -      v4l2_fwnode_endpoint_free(endpoint);
 +      v4l2_fwnode_endpoint_free(&endpoint);
  put_node:
        of_node_put(ep);
        return ret;
index c4c2a6134e1eb047fb8687a6c235e49c358f089b,195a1fc74ee8b7ac3b618e6466f7df480a03e712..e8613e364403c9809a33ddcc7c3611efd8445632
@@@ -1253,7 -1253,7 +1253,7 @@@ tda1997x_parse_infoframe(struct tda1997
  
        /* read data */
        len = io_readn(sd, addr, sizeof(buffer), buffer);
-       err = hdmi_infoframe_unpack(&frame, buffer);
+       err = hdmi_infoframe_unpack(&frame, buffer, sizeof(buffer));
        if (err) {
                v4l_err(state->client,
                        "failed parsing %d byte infoframe: 0x%04x/0x%02x\n",
@@@ -1928,7 -1928,7 +1928,7 @@@ static int tda1997x_log_infoframe(struc
        /* read data */
        len = io_readn(sd, addr, sizeof(buffer), buffer);
        v4l2_dbg(1, debug, sd, "infoframe: addr=%d len=%d\n", addr, len);
-       err = hdmi_infoframe_unpack(&frame, buffer);
+       err = hdmi_infoframe_unpack(&frame, buffer, sizeof(buffer));
        if (err) {
                v4l_err(state->client,
                        "failed parsing %d byte infoframe: 0x%04x/0x%02x\n",
@@@ -2265,7 -2265,7 +2265,7 @@@ MODULE_DEVICE_TABLE(of, tda1997x_of_id)
  static int tda1997x_parse_dt(struct tda1997x_state *state)
  {
        struct tda1997x_platform_data *pdata = &state->pdata;
 -      struct v4l2_fwnode_endpoint bus_cfg;
 +      struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = 0 };
        struct device_node *ep;
        struct device_node *np;
        unsigned int flags;
diff --combined drivers/video/hdmi.c
index 8a3e8f61b991bd7fb14a5552eed46a56c88a1d6a,08d94ab0046735464fa43a573299982d097cd290..799ae49774f58e1e00e70cd9fe188f39bf9b08a5
@@@ -31,7 -31,7 +31,7 @@@
  
  #define hdmi_log(fmt, ...) dev_printk(level, dev, fmt, ##__VA_ARGS__)
  
- static u8 hdmi_infoframe_checksum(u8 *ptr, size_t size)
+ static u8 hdmi_infoframe_checksum(const u8 *ptr, size_t size)
  {
        u8 csum = 0;
        size_t i;
@@@ -68,8 -68,36 +68,36 @@@ int hdmi_avi_infoframe_init(struct hdmi
  }
  EXPORT_SYMBOL(hdmi_avi_infoframe_init);
  
+ static int hdmi_avi_infoframe_check_only(const struct hdmi_avi_infoframe *frame)
+ {
+       if (frame->type != HDMI_INFOFRAME_TYPE_AVI ||
+           frame->version != 2 ||
+           frame->length != HDMI_AVI_INFOFRAME_SIZE)
+               return -EINVAL;
+       if (frame->picture_aspect > HDMI_PICTURE_ASPECT_16_9)
+               return -EINVAL;
+       return 0;
+ }
  /**
-  * hdmi_avi_infoframe_pack() - write HDMI AVI infoframe to binary buffer
+  * hdmi_avi_infoframe_check() - check a HDMI AVI infoframe
+  * @frame: HDMI AVI infoframe
+  *
+  * Validates that the infoframe is consistent and updates derived fields
+  * (eg. length) based on other fields.
+  *
+  * Returns 0 on success or a negative error code on failure.
+  */
+ int hdmi_avi_infoframe_check(struct hdmi_avi_infoframe *frame)
+ {
+       return hdmi_avi_infoframe_check_only(frame);
+ }
+ EXPORT_SYMBOL(hdmi_avi_infoframe_check);
+ /**
+  * hdmi_avi_infoframe_pack_only() - write HDMI AVI infoframe to binary buffer
   * @frame: HDMI AVI infoframe
   * @buffer: destination buffer
   * @size: size of buffer
   * Returns the number of bytes packed into the binary buffer or a negative
   * error code on failure.
   */
- ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,
-                               size_t size)
+ ssize_t hdmi_avi_infoframe_pack_only(const struct hdmi_avi_infoframe *frame,
+                                    void *buffer, size_t size)
  {
        u8 *ptr = buffer;
        size_t length;
+       int ret;
+       ret = hdmi_avi_infoframe_check_only(frame);
+       if (ret)
+               return ret;
  
        length = HDMI_INFOFRAME_HEADER_SIZE + frame->length;
  
        if (size < length)
                return -ENOSPC;
  
-       if (frame->picture_aspect > HDMI_PICTURE_ASPECT_16_9)
-               return -EINVAL;
        memset(buffer, 0, size);
  
        ptr[0] = frame->type;
  
        return length;
  }
+ EXPORT_SYMBOL(hdmi_avi_infoframe_pack_only);
+ /**
+  * hdmi_avi_infoframe_pack() - check a HDMI AVI infoframe,
+  *                             and write it to binary buffer
+  * @frame: HDMI AVI infoframe
+  * @buffer: destination buffer
+  * @size: size of buffer
+  *
+  * Validates that the infoframe is consistent and updates derived fields
+  * (eg. length) based on other fields, after which it packs the information
+  * contained in the @frame structure into a binary representation that
+  * can be written into the corresponding controller registers. This function
+  * also computes the checksum as required by section 5.3.5 of the HDMI 1.4
+  * specification.
+  *
+  * Returns the number of bytes packed into the binary buffer or a negative
+  * error code on failure.
+  */
+ ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame,
+                               void *buffer, size_t size)
+ {
+       int ret;
+       ret = hdmi_avi_infoframe_check(frame);
+       if (ret)
+               return ret;
+       return hdmi_avi_infoframe_pack_only(frame, buffer, size);
+ }
  EXPORT_SYMBOL(hdmi_avi_infoframe_pack);
  
  /**
@@@ -178,8 -238,33 +238,33 @@@ int hdmi_spd_infoframe_init(struct hdmi
  }
  EXPORT_SYMBOL(hdmi_spd_infoframe_init);
  
+ static int hdmi_spd_infoframe_check_only(const struct hdmi_spd_infoframe *frame)
+ {
+       if (frame->type != HDMI_INFOFRAME_TYPE_SPD ||
+           frame->version != 1 ||
+           frame->length != HDMI_SPD_INFOFRAME_SIZE)
+               return -EINVAL;
+       return 0;
+ }
  /**
-  * hdmi_spd_infoframe_pack() - write HDMI SPD infoframe to binary buffer
+  * hdmi_spd_infoframe_check() - check a HDMI SPD infoframe
+  * @frame: HDMI SPD infoframe
+  *
+  * Validates that the infoframe is consistent and updates derived fields
+  * (eg. length) based on other fields.
+  *
+  * Returns 0 on success or a negative error code on failure.
+  */
+ int hdmi_spd_infoframe_check(struct hdmi_spd_infoframe *frame)
+ {
+       return hdmi_spd_infoframe_check_only(frame);
+ }
+ EXPORT_SYMBOL(hdmi_spd_infoframe_check);
+ /**
+  * hdmi_spd_infoframe_pack_only() - write HDMI SPD infoframe to binary buffer
   * @frame: HDMI SPD infoframe
   * @buffer: destination buffer
   * @size: size of buffer
   * Returns the number of bytes packed into the binary buffer or a negative
   * error code on failure.
   */
- ssize_t hdmi_spd_infoframe_pack(struct hdmi_spd_infoframe *frame, void *buffer,
-                               size_t size)
+ ssize_t hdmi_spd_infoframe_pack_only(const struct hdmi_spd_infoframe *frame,
+                                    void *buffer, size_t size)
  {
        u8 *ptr = buffer;
        size_t length;
+       int ret;
+       ret = hdmi_spd_infoframe_check_only(frame);
+       if (ret)
+               return ret;
  
        length = HDMI_INFOFRAME_HEADER_SIZE + frame->length;
  
  
        return length;
  }
+ EXPORT_SYMBOL(hdmi_spd_infoframe_pack_only);
+ /**
+  * hdmi_spd_infoframe_pack() - check a HDMI SPD infoframe,
+  *                             and write it to binary buffer
+  * @frame: HDMI SPD infoframe
+  * @buffer: destination buffer
+  * @size: size of buffer
+  *
+  * Validates that the infoframe is consistent and updates derived fields
+  * (eg. length) based on other fields, after which it packs the information
+  * contained in the @frame structure into a binary representation that
+  * can be written into the corresponding controller registers. This function
+  * also computes the checksum as required by section 5.3.5 of the HDMI 1.4
+  * specification.
+  *
+  * Returns the number of bytes packed into the binary buffer or a negative
+  * error code on failure.
+  */
+ ssize_t hdmi_spd_infoframe_pack(struct hdmi_spd_infoframe *frame,
+                               void *buffer, size_t size)
+ {
+       int ret;
+       ret = hdmi_spd_infoframe_check(frame);
+       if (ret)
+               return ret;
+       return hdmi_spd_infoframe_pack_only(frame, buffer, size);
+ }
  EXPORT_SYMBOL(hdmi_spd_infoframe_pack);
  
  /**
@@@ -242,8 -362,33 +362,33 @@@ int hdmi_audio_infoframe_init(struct hd
  }
  EXPORT_SYMBOL(hdmi_audio_infoframe_init);
  
+ static int hdmi_audio_infoframe_check_only(const struct hdmi_audio_infoframe *frame)
+ {
+       if (frame->type != HDMI_INFOFRAME_TYPE_AUDIO ||
+           frame->version != 1 ||
+           frame->length != HDMI_AUDIO_INFOFRAME_SIZE)
+               return -EINVAL;
+       return 0;
+ }
  /**
-  * hdmi_audio_infoframe_pack() - write HDMI audio infoframe to binary buffer
+  * hdmi_audio_infoframe_check() - check a HDMI audio infoframe
+  * @frame: HDMI audio infoframe
+  *
+  * Validates that the infoframe is consistent and updates derived fields
+  * (eg. length) based on other fields.
+  *
+  * Returns 0 on success or a negative error code on failure.
+  */
+ int hdmi_audio_infoframe_check(struct hdmi_audio_infoframe *frame)
+ {
+       return hdmi_audio_infoframe_check_only(frame);
+ }
+ EXPORT_SYMBOL(hdmi_audio_infoframe_check);
+ /**
+  * hdmi_audio_infoframe_pack_only() - write HDMI audio infoframe to binary buffer
   * @frame: HDMI audio infoframe
   * @buffer: destination buffer
   * @size: size of buffer
   * Returns the number of bytes packed into the binary buffer or a negative
   * error code on failure.
   */
- ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame,
-                                 void *buffer, size_t size)
+ ssize_t hdmi_audio_infoframe_pack_only(const struct hdmi_audio_infoframe *frame,
+                                      void *buffer, size_t size)
  {
        unsigned char channels;
        u8 *ptr = buffer;
        size_t length;
+       int ret;
+       ret = hdmi_audio_infoframe_check_only(frame);
+       if (ret)
+               return ret;
  
        length = HDMI_INFOFRAME_HEADER_SIZE + frame->length;
  
  
        return length;
  }
+ EXPORT_SYMBOL(hdmi_audio_infoframe_pack_only);
+ /**
+  * hdmi_audio_infoframe_pack() - check a HDMI Audio infoframe,
+  *                               and write it to binary buffer
+  * @frame: HDMI Audio infoframe
+  * @buffer: destination buffer
+  * @size: size of buffer
+  *
+  * Validates that the infoframe is consistent and updates derived fields
+  * (eg. length) based on other fields, after which it packs the information
+  * contained in the @frame structure into a binary representation that
+  * can be written into the corresponding controller registers. This function
+  * also computes the checksum as required by section 5.3.5 of the HDMI 1.4
+  * specification.
+  *
+  * Returns the number of bytes packed into the binary buffer or a negative
+  * error code on failure.
+  */
+ ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame,
+                                 void *buffer, size_t size)
+ {
+       int ret;
+       ret = hdmi_audio_infoframe_check(frame);
+       if (ret)
+               return ret;
+       return hdmi_audio_infoframe_pack_only(frame, buffer, size);
+ }
  EXPORT_SYMBOL(hdmi_audio_infoframe_pack);
  
  /**
@@@ -319,6 -499,7 +499,7 @@@ int hdmi_vendor_infoframe_init(struct h
         * value
         */
        frame->s3d_struct = HDMI_3D_STRUCTURE_INVALID;
+       frame->length = 4;
  
        return 0;
  }
@@@ -335,8 -516,42 +516,42 @@@ static int hdmi_vendor_infoframe_length
                return 4;
  }
  
+ static int hdmi_vendor_infoframe_check_only(const struct hdmi_vendor_infoframe *frame)
+ {
+       if (frame->type != HDMI_INFOFRAME_TYPE_VENDOR ||
+           frame->version != 1 ||
+           frame->oui != HDMI_IEEE_OUI)
+               return -EINVAL;
+       /* only one of those can be supplied */
+       if (frame->vic != 0 && frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID)
+               return -EINVAL;
+       if (frame->length != hdmi_vendor_infoframe_length(frame))
+               return -EINVAL;
+       return 0;
+ }
+ /**
+  * hdmi_vendor_infoframe_check() - check a HDMI vendor infoframe
+  * @frame: HDMI infoframe
+  *
+  * Validates that the infoframe is consistent and updates derived fields
+  * (eg. length) based on other fields.
+  *
+  * Returns 0 on success or a negative error code on failure.
+  */
+ int hdmi_vendor_infoframe_check(struct hdmi_vendor_infoframe *frame)
+ {
+       frame->length = hdmi_vendor_infoframe_length(frame);
+       return hdmi_vendor_infoframe_check_only(frame);
+ }
+ EXPORT_SYMBOL(hdmi_vendor_infoframe_check);
  /**
-  * hdmi_vendor_infoframe_pack() - write a HDMI vendor infoframe to binary buffer
+  * hdmi_vendor_infoframe_pack_only() - write a HDMI vendor infoframe to binary buffer
   * @frame: HDMI infoframe
   * @buffer: destination buffer
   * @size: size of buffer
   * Returns the number of bytes packed into the binary buffer or a negative
   * error code on failure.
   */
- ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
-                                void *buffer, size_t size)
+ ssize_t hdmi_vendor_infoframe_pack_only(const struct hdmi_vendor_infoframe *frame,
+                                       void *buffer, size_t size)
  {
        u8 *ptr = buffer;
        size_t length;
+       int ret;
  
-       /* only one of those can be supplied */
-       if (frame->vic != 0 && frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID)
-               return -EINVAL;
-       frame->length = hdmi_vendor_infoframe_length(frame);
+       ret = hdmi_vendor_infoframe_check_only(frame);
+       if (ret)
+               return ret;
  
        length = HDMI_INFOFRAME_HEADER_SIZE + frame->length;
  
  
        return length;
  }
+ EXPORT_SYMBOL(hdmi_vendor_infoframe_pack_only);
+ /**
+  * hdmi_vendor_infoframe_pack() - check a HDMI Vendor infoframe,
+  *                                and write it to binary buffer
+  * @frame: HDMI Vendor infoframe
+  * @buffer: destination buffer
+  * @size: size of buffer
+  *
+  * Validates that the infoframe is consistent and updates derived fields
+  * (eg. length) based on other fields, after which it packs the information
+  * contained in the @frame structure into a binary representation that
+  * can be written into the corresponding controller registers. This function
+  * also computes the checksum as required by section 5.3.5 of the HDMI 1.4
+  * specification.
+  *
+  * Returns the number of bytes packed into the binary buffer or a negative
+  * error code on failure.
+  */
+ ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
+                                  void *buffer, size_t size)
+ {
+       int ret;
+       ret = hdmi_vendor_infoframe_check(frame);
+       if (ret)
+               return ret;
+       return hdmi_vendor_infoframe_pack_only(frame, buffer, size);
+ }
  EXPORT_SYMBOL(hdmi_vendor_infoframe_pack);
  
+ static int
+ hdmi_vendor_any_infoframe_check_only(const union hdmi_vendor_any_infoframe *frame)
+ {
+       if (frame->any.type != HDMI_INFOFRAME_TYPE_VENDOR ||
+           frame->any.version != 1)
+               return -EINVAL;
+       return 0;
+ }
+ /*
+  * hdmi_vendor_any_infoframe_check() - check a vendor infoframe
+  */
+ static int
+ hdmi_vendor_any_infoframe_check(union hdmi_vendor_any_infoframe *frame)
+ {
+       int ret;
+       ret = hdmi_vendor_any_infoframe_check_only(frame);
+       if (ret)
+               return ret;
+       /* we only know about HDMI vendor infoframes */
+       if (frame->any.oui != HDMI_IEEE_OUI)
+               return -EINVAL;
+       return hdmi_vendor_infoframe_check(&frame->hdmi);
+ }
  /*
-  * hdmi_vendor_any_infoframe_pack() - write a vendor infoframe to binary buffer
+  * hdmi_vendor_any_infoframe_pack_only() - write a vendor infoframe to binary buffer
   */
  static ssize_t
- hdmi_vendor_any_infoframe_pack(union hdmi_vendor_any_infoframe *frame,
-                          void *buffer, size_t size)
+ hdmi_vendor_any_infoframe_pack_only(const union hdmi_vendor_any_infoframe *frame,
+                                   void *buffer, size_t size)
  {
+       int ret;
+       ret = hdmi_vendor_any_infoframe_check_only(frame);
+       if (ret)
+               return ret;
        /* we only know about HDMI vendor infoframes */
        if (frame->any.oui != HDMI_IEEE_OUI)
                return -EINVAL;
  
-       return hdmi_vendor_infoframe_pack(&frame->hdmi, buffer, size);
+       return hdmi_vendor_infoframe_pack_only(&frame->hdmi, buffer, size);
+ }
+ /*
+  * hdmi_vendor_any_infoframe_pack() - check a vendor infoframe,
+  *                                    and write it to binary buffer
+  */
+ static ssize_t
+ hdmi_vendor_any_infoframe_pack(union hdmi_vendor_any_infoframe *frame,
+                              void *buffer, size_t size)
+ {
+       int ret;
+       ret = hdmi_vendor_any_infoframe_check(frame);
+       if (ret)
+               return ret;
+       return hdmi_vendor_any_infoframe_pack_only(frame, buffer, size);
  }
  
  /**
-  * hdmi_infoframe_pack() - write a HDMI infoframe to binary buffer
+  * hdmi_infoframe_check() - check a HDMI infoframe
+  * @frame: HDMI infoframe
+  *
+  * Validates that the infoframe is consistent and updates derived fields
+  * (eg. length) based on other fields.
+  *
+  * Returns 0 on success or a negative error code on failure.
+  */
+ int
+ hdmi_infoframe_check(union hdmi_infoframe *frame)
+ {
+       switch (frame->any.type) {
+       case HDMI_INFOFRAME_TYPE_AVI:
+               return hdmi_avi_infoframe_check(&frame->avi);
+       case HDMI_INFOFRAME_TYPE_SPD:
+               return hdmi_spd_infoframe_check(&frame->spd);
+       case HDMI_INFOFRAME_TYPE_AUDIO:
+               return hdmi_audio_infoframe_check(&frame->audio);
+       case HDMI_INFOFRAME_TYPE_VENDOR:
+               return hdmi_vendor_any_infoframe_check(&frame->vendor);
+       default:
+               WARN(1, "Bad infoframe type %d\n", frame->any.type);
+               return -EINVAL;
+       }
+ }
+ EXPORT_SYMBOL(hdmi_infoframe_check);
+ /**
+  * hdmi_infoframe_pack_only() - write a HDMI infoframe to binary buffer
   * @frame: HDMI infoframe
   * @buffer: destination buffer
   * @size: size of buffer
   * error code on failure.
   */
  ssize_t
- hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer, size_t size)
+ hdmi_infoframe_pack_only(const union hdmi_infoframe *frame, void *buffer, size_t size)
+ {
+       ssize_t length;
+       switch (frame->any.type) {
+       case HDMI_INFOFRAME_TYPE_AVI:
+               length = hdmi_avi_infoframe_pack_only(&frame->avi,
+                                                     buffer, size);
+               break;
+       case HDMI_INFOFRAME_TYPE_SPD:
+               length = hdmi_spd_infoframe_pack_only(&frame->spd,
+                                                     buffer, size);
+               break;
+       case HDMI_INFOFRAME_TYPE_AUDIO:
+               length = hdmi_audio_infoframe_pack_only(&frame->audio,
+                                                       buffer, size);
+               break;
+       case HDMI_INFOFRAME_TYPE_VENDOR:
+               length = hdmi_vendor_any_infoframe_pack_only(&frame->vendor,
+                                                            buffer, size);
+               break;
+       default:
+               WARN(1, "Bad infoframe type %d\n", frame->any.type);
+               length = -EINVAL;
+       }
+       return length;
+ }
+ EXPORT_SYMBOL(hdmi_infoframe_pack_only);
+ /**
+  * hdmi_infoframe_pack() - check a HDMI infoframe,
+  *                         and write it to binary buffer
+  * @frame: HDMI infoframe
+  * @buffer: destination buffer
+  * @size: size of buffer
+  *
+  * Validates that the infoframe is consistent and updates derived fields
+  * (eg. length) based on other fields, after which it packs the information
+  * contained in the @frame structure into a binary representation that
+  * can be written into the corresponding controller registers. This function
+  * also computes the checksum as required by section 5.3.5 of the HDMI 1.4
+  * specification.
+  *
+  * Returns the number of bytes packed into the binary buffer or a negative
+  * error code on failure.
+  */
+ ssize_t
+ hdmi_infoframe_pack(union hdmi_infoframe *frame,
+                   void *buffer, size_t size)
  {
        ssize_t length;
  
@@@ -471,7 -844,7 +844,7 @@@ static const char *hdmi_infoframe_type_
  
  static void hdmi_infoframe_log_header(const char *level,
                                      struct device *dev,
-                                     struct hdmi_any_infoframe *frame)
+                                     const struct hdmi_any_infoframe *frame)
  {
        hdmi_log("HDMI infoframe: %s, version %u, length %u\n",
                hdmi_infoframe_type_get_name(frame->type),
@@@ -592,10 -965,10 +965,10 @@@ hdmi_extended_colorimetry_get_name(enu
                return "xvYCC 709";
        case HDMI_EXTENDED_COLORIMETRY_S_YCC_601:
                return "sYCC 601";
 -      case HDMI_EXTENDED_COLORIMETRY_ADOBE_YCC_601:
 -              return "Adobe YCC 601";
 -      case HDMI_EXTENDED_COLORIMETRY_ADOBE_RGB:
 -              return "Adobe RGB";
 +      case HDMI_EXTENDED_COLORIMETRY_OPYCC_601:
 +              return "opYCC 601";
 +      case HDMI_EXTENDED_COLORIMETRY_OPRGB:
 +              return "opRGB";
        case HDMI_EXTENDED_COLORIMETRY_BT2020_CONST_LUM:
                return "BT.2020 Constant Luminance";
        case HDMI_EXTENDED_COLORIMETRY_BT2020:
@@@ -673,10 -1046,10 +1046,10 @@@ hdmi_content_type_get_name(enum hdmi_co
   */
  static void hdmi_avi_infoframe_log(const char *level,
                                   struct device *dev,
-                                  struct hdmi_avi_infoframe *frame)
+                                  const struct hdmi_avi_infoframe *frame)
  {
        hdmi_infoframe_log_header(level, dev,
-                                 (struct hdmi_any_infoframe *)frame);
+                                 (const struct hdmi_any_infoframe *)frame);
  
        hdmi_log("    colorspace: %s\n",
                        hdmi_colorspace_get_name(frame->colorspace));
@@@ -750,12 -1123,12 +1123,12 @@@ static const char *hdmi_spd_sdi_get_nam
   */
  static void hdmi_spd_infoframe_log(const char *level,
                                   struct device *dev,
-                                  struct hdmi_spd_infoframe *frame)
+                                  const struct hdmi_spd_infoframe *frame)
  {
        u8 buf[17];
  
        hdmi_infoframe_log_header(level, dev,
-                                 (struct hdmi_any_infoframe *)frame);
+                                 (const struct hdmi_any_infoframe *)frame);
  
        memset(buf, 0, sizeof(buf));
  
@@@ -886,10 -1259,10 +1259,10 @@@ hdmi_audio_coding_type_ext_get_name(enu
   */
  static void hdmi_audio_infoframe_log(const char *level,
                                     struct device *dev,
-                                    struct hdmi_audio_infoframe *frame)
+                                    const struct hdmi_audio_infoframe *frame)
  {
        hdmi_infoframe_log_header(level, dev,
-                                 (struct hdmi_any_infoframe *)frame);
+                                 (const struct hdmi_any_infoframe *)frame);
  
        if (frame->channels)
                hdmi_log("    channels: %u\n", frame->channels - 1);
@@@ -949,12 -1322,12 +1322,12 @@@ hdmi_3d_structure_get_name(enum hdmi_3d
  static void
  hdmi_vendor_any_infoframe_log(const char *level,
                              struct device *dev,
-                             union hdmi_vendor_any_infoframe *frame)
+                             const union hdmi_vendor_any_infoframe *frame)
  {
-       struct hdmi_vendor_infoframe *hvf = &frame->hdmi;
+       const struct hdmi_vendor_infoframe *hvf = &frame->hdmi;
  
        hdmi_infoframe_log_header(level, dev,
-                                 (struct hdmi_any_infoframe *)frame);
+                                 (const struct hdmi_any_infoframe *)frame);
  
        if (frame->any.oui != HDMI_IEEE_OUI) {
                hdmi_log("    not a HDMI vendor infoframe\n");
   */
  void hdmi_infoframe_log(const char *level,
                        struct device *dev,
-                       union hdmi_infoframe *frame)
+                       const union hdmi_infoframe *frame)
  {
        switch (frame->any.type) {
        case HDMI_INFOFRAME_TYPE_AVI:
@@@ -1005,8 -1378,9 +1378,9 @@@ EXPORT_SYMBOL(hdmi_infoframe_log)
  
  /**
   * hdmi_avi_infoframe_unpack() - unpack binary buffer to a HDMI AVI infoframe
-  * @buffer: source buffer
   * @frame: HDMI AVI infoframe
+  * @buffer: source buffer
+  * @size: size of buffer
   *
   * Unpacks the information contained in binary @buffer into a structured
   * @frame of the HDMI Auxiliary Video (AVI) information frame.
   * Returns 0 on success or a negative error code on failure.
   */
  static int hdmi_avi_infoframe_unpack(struct hdmi_avi_infoframe *frame,
-                                    void *buffer)
+                                    const void *buffer, size_t size)
  {
-       u8 *ptr = buffer;
+       const u8 *ptr = buffer;
        int ret;
  
+       if (size < HDMI_INFOFRAME_SIZE(AVI))
+               return -EINVAL;
        if (ptr[0] != HDMI_INFOFRAME_TYPE_AVI ||
            ptr[1] != 2 ||
            ptr[2] != HDMI_AVI_INFOFRAME_SIZE)
  
  /**
   * hdmi_spd_infoframe_unpack() - unpack binary buffer to a HDMI SPD infoframe
-  * @buffer: source buffer
   * @frame: HDMI SPD infoframe
+  * @buffer: source buffer
+  * @size: size of buffer
   *
   * Unpacks the information contained in binary @buffer into a structured
   * @frame of the HDMI Source Product Description (SPD) information frame.
   * Returns 0 on success or a negative error code on failure.
   */
  static int hdmi_spd_infoframe_unpack(struct hdmi_spd_infoframe *frame,
-                                    void *buffer)
+                                    const void *buffer, size_t size)
  {
-       u8 *ptr = buffer;
+       const u8 *ptr = buffer;
        int ret;
  
+       if (size < HDMI_INFOFRAME_SIZE(SPD))
+               return -EINVAL;
        if (ptr[0] != HDMI_INFOFRAME_TYPE_SPD ||
            ptr[1] != 1 ||
            ptr[2] != HDMI_SPD_INFOFRAME_SIZE) {
  
  /**
   * hdmi_audio_infoframe_unpack() - unpack binary buffer to a HDMI AUDIO infoframe
-  * @buffer: source buffer
   * @frame: HDMI Audio infoframe
+  * @buffer: source buffer
+  * @size: size of buffer
   *
   * Unpacks the information contained in binary @buffer into a structured
   * @frame of the HDMI Audio information frame.
   * Returns 0 on success or a negative error code on failure.
   */
  static int hdmi_audio_infoframe_unpack(struct hdmi_audio_infoframe *frame,
-                                      void *buffer)
+                                      const void *buffer, size_t size)
  {
-       u8 *ptr = buffer;
+       const u8 *ptr = buffer;
        int ret;
  
+       if (size < HDMI_INFOFRAME_SIZE(AUDIO))
+               return -EINVAL;
        if (ptr[0] != HDMI_INFOFRAME_TYPE_AUDIO ||
            ptr[1] != 1 ||
            ptr[2] != HDMI_AUDIO_INFOFRAME_SIZE) {
  
  /**
   * hdmi_vendor_infoframe_unpack() - unpack binary buffer to a HDMI vendor infoframe
-  * @buffer: source buffer
   * @frame: HDMI Vendor infoframe
+  * @buffer: source buffer
+  * @size: size of buffer
   *
   * Unpacks the information contained in binary @buffer into a structured
   * @frame of the HDMI Vendor information frame.
   */
  static int
  hdmi_vendor_any_infoframe_unpack(union hdmi_vendor_any_infoframe *frame,
-                                void *buffer)
+                                const void *buffer, size_t size)
  {
-       u8 *ptr = buffer;
+       const u8 *ptr = buffer;
        size_t length;
        int ret;
        u8 hdmi_video_format;
        struct hdmi_vendor_infoframe *hvf = &frame->hdmi;
  
+       if (size < HDMI_INFOFRAME_HEADER_SIZE)
+               return -EINVAL;
        if (ptr[0] != HDMI_INFOFRAME_TYPE_VENDOR ||
            ptr[1] != 1 ||
            (ptr[2] != 4 && ptr[2] != 5 && ptr[2] != 6))
  
        length = ptr[2];
  
+       if (size < HDMI_INFOFRAME_HEADER_SIZE + length)
+               return -EINVAL;
        if (hdmi_infoframe_checksum(buffer,
                                    HDMI_INFOFRAME_HEADER_SIZE + length) != 0)
                return -EINVAL;
  
  /**
   * hdmi_infoframe_unpack() - unpack binary buffer to a HDMI infoframe
-  * @buffer: source buffer
   * @frame: HDMI infoframe
+  * @buffer: source buffer
+  * @size: size of buffer
   *
   * Unpacks the information contained in binary buffer @buffer into a structured
   * @frame of a HDMI infoframe.
   *
   * Returns 0 on success or a negative error code on failure.
   */
- int hdmi_infoframe_unpack(union hdmi_infoframe *frame, void *buffer)
+ int hdmi_infoframe_unpack(union hdmi_infoframe *frame,
+                         const void *buffer, size_t size)
  {
        int ret;
-       u8 *ptr = buffer;
+       const u8 *ptr = buffer;
+       if (size < HDMI_INFOFRAME_HEADER_SIZE)
+               return -EINVAL;
  
        switch (ptr[0]) {
        case HDMI_INFOFRAME_TYPE_AVI:
-               ret = hdmi_avi_infoframe_unpack(&frame->avi, buffer);
+               ret = hdmi_avi_infoframe_unpack(&frame->avi, buffer, size);
                break;
        case HDMI_INFOFRAME_TYPE_SPD:
-               ret = hdmi_spd_infoframe_unpack(&frame->spd, buffer);
+               ret = hdmi_spd_infoframe_unpack(&frame->spd, buffer, size);
                break;
        case HDMI_INFOFRAME_TYPE_AUDIO:
-               ret = hdmi_audio_infoframe_unpack(&frame->audio, buffer);
+               ret = hdmi_audio_infoframe_unpack(&frame->audio, buffer, size);
                break;
        case HDMI_INFOFRAME_TYPE_VENDOR:
-               ret = hdmi_vendor_any_infoframe_unpack(&frame->vendor, buffer);
+               ret = hdmi_vendor_any_infoframe_unpack(&frame->vendor, buffer, size);
                break;
        default:
                ret = -EINVAL;
diff --combined include/drm/drm_atomic.h
index 1e810e0b76647239dee3c89f589f684b07b6786a,c09ecaf43825740c46761a8b07b2cfc5489293dc..f9b35834c45d0e544fe7c2944353577072818ac2
@@@ -154,17 -154,6 +154,17 @@@ struct __drm_planes_state 
  struct __drm_crtcs_state {
        struct drm_crtc *ptr;
        struct drm_crtc_state *state, *old_state, *new_state;
 +
 +      /**
 +       * @commit:
 +       *
 +       * A reference to the CRTC commit object that is kept for use by
 +       * drm_atomic_helper_wait_for_flip_done() after
 +       * drm_atomic_helper_commit_hw_done() is called. This ensures that a
 +       * concurrent commit won't free a commit object that is still in use.
 +       */
 +      struct drm_crtc_commit *commit;
 +
        s32 __user *out_fence_ptr;
        u64 last_vblank_count;
  };
@@@ -265,7 -254,6 +265,6 @@@ struct __drm_private_objs_state 
   * struct drm_atomic_state - the global state object for atomic updates
   * @ref: count of all references to this state (will not be freed until zero)
   * @dev: parent DRM device
-  * @allow_modeset: allow full modeset
   * @legacy_cursor_update: hint to enforce legacy cursor IOCTL semantics
   * @async_update: hint for asynchronous plane update
   * @planes: pointer to array of structures with per-plane data
@@@ -284,6 -272,15 +283,15 @@@ struct drm_atomic_state 
        struct kref ref;
  
        struct drm_device *dev;
+       /**
+        * @allow_modeset:
+        *
+        * Allow full modeset. This is used by the ATOMIC IOCTL handler to
+        * implement the DRM_MODE_ATOMIC_ALLOW_MODESET flag. Drivers should
+        * never consult this flag, instead looking at the output of
+        * drm_atomic_crtc_needs_modeset().
+        */
        bool allow_modeset : 1;
        bool legacy_cursor_update : 1;
        bool async_update : 1;
index 9ccad6b062f2bb62c54434288e7fc9a25b194b53,5b3cf909fd5e4c31072a849572db66a87565e2aa..dd0552cb747232cc7ac89003c6af846d6b90a0e5
@@@ -82,53 -82,6 +82,53 @@@ enum drm_connector_status 
        connector_status_unknown = 3,
  };
  
 +/**
 + * enum drm_connector_registration_status - userspace registration status for
 + * a &drm_connector
 + *
 + * This enum is used to track the status of initializing a connector and
 + * registering it with userspace, so that DRM can prevent bogus modesets on
 + * connectors that no longer exist.
 + */
 +enum drm_connector_registration_state {
 +      /**
 +       * @DRM_CONNECTOR_INITIALIZING: The connector has just been created,
 +       * but has yet to be exposed to userspace. There should be no
 +       * additional restrictions to how the state of this connector may be
 +       * modified.
 +       */
 +      DRM_CONNECTOR_INITIALIZING = 0,
 +
 +      /**
 +       * @DRM_CONNECTOR_REGISTERED: The connector has been fully initialized
 +       * and registered with sysfs, as such it has been exposed to
 +       * userspace. There should be no additional restrictions to how the
 +       * state of this connector may be modified.
 +       */
 +      DRM_CONNECTOR_REGISTERED = 1,
 +
 +      /**
 +       * @DRM_CONNECTOR_UNREGISTERED: The connector has either been exposed
 +       * to userspace and has since been unregistered and removed from
 +       * userspace, or the connector was unregistered before it had a chance
 +       * to be exposed to userspace (e.g. still in the
 +       * @DRM_CONNECTOR_INITIALIZING state). When a connector is
 +       * unregistered, there are additional restrictions to how its state
 +       * may be modified:
 +       *
 +       * - An unregistered connector may only have its DPMS changed from
 +       *   On->Off. Once DPMS is changed to Off, it may not be switched back
 +       *   to On.
 +       * - Modesets are not allowed on unregistered connectors, unless they
 +       *   would result in disabling its assigned CRTCs. This means
 +       *   disabling a CRTC on an unregistered connector is OK, but enabling
 +       *   one is not.
 +       * - Removing a CRTC from an unregistered connector is OK, but new
 +       *   CRTCs may never be assigned to an unregistered connector.
 +       */
 +      DRM_CONNECTOR_UNREGISTERED = 2,
 +};
 +
  enum subpixel_order {
        SubPixelUnknown = 0,
        SubPixelHorizontalRGB,
@@@ -900,12 -853,10 +900,12 @@@ struct drm_connector 
        bool ycbcr_420_allowed;
  
        /**
 -       * @registered: Is this connector exposed (registered) with userspace?
 +       * @registration_state: Is this connector initializing, exposed
 +       * (registered) with userspace, or unregistered?
 +       *
         * Protected by @mutex.
         */
 -      bool registered;
 +      enum drm_connector_registration_state registration_state;
  
        /**
         * @modes:
@@@ -1133,6 -1084,7 +1133,7 @@@ int drm_connector_init(struct drm_devic
                       struct drm_connector *connector,
                       const struct drm_connector_funcs *funcs,
                       int connector_type);
+ void drm_connector_attach_edid_property(struct drm_connector *connector);
  int drm_connector_register(struct drm_connector *connector);
  void drm_connector_unregister(struct drm_connector *connector);
  int drm_connector_attach_encoder(struct drm_connector *connector,
@@@ -1215,24 -1167,6 +1216,24 @@@ static inline void drm_connector_unrefe
        drm_connector_put(connector);
  }
  
 +/**
 + * drm_connector_is_unregistered - has the connector been unregistered from
 + * userspace?
 + * @connector: DRM connector
 + *
 + * Checks whether or not @connector has been unregistered from userspace.
 + *
 + * Returns:
 + * True if the connector was unregistered, false if the connector is
 + * registered or has not yet been registered with userspace.
 + */
 +static inline bool
 +drm_connector_is_unregistered(struct drm_connector *connector)
 +{
 +      return READ_ONCE(connector->registration_state) ==
 +              DRM_CONNECTOR_UNREGISTERED;
 +}
 +
  const char *drm_get_connector_status_name(enum drm_connector_status status);
  const char *drm_get_subpixel_order_name(enum subpixel_order order);
  const char *drm_get_dpms_name(int val);
diff --combined include/linux/hdmi.h
index 4f3febc0f971cbf603bd5a905d4a2693fba8d3df,c76b50a48e48544dff3338c3fc6ca17e3111ff6e..d2bacf5024295dcfb6092de230179e6f78117c3f
@@@ -101,8 -101,8 +101,8 @@@ enum hdmi_extended_colorimetry 
        HDMI_EXTENDED_COLORIMETRY_XV_YCC_601,
        HDMI_EXTENDED_COLORIMETRY_XV_YCC_709,
        HDMI_EXTENDED_COLORIMETRY_S_YCC_601,
 -      HDMI_EXTENDED_COLORIMETRY_ADOBE_YCC_601,
 -      HDMI_EXTENDED_COLORIMETRY_ADOBE_RGB,
 +      HDMI_EXTENDED_COLORIMETRY_OPYCC_601,
 +      HDMI_EXTENDED_COLORIMETRY_OPRGB,
  
        /* The following EC values are only defined in CEA-861-F. */
        HDMI_EXTENDED_COLORIMETRY_BT2020_CONST_LUM,
@@@ -163,6 -163,9 +163,9 @@@ struct hdmi_avi_infoframe 
  int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);
  ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,
                                size_t size);
+ ssize_t hdmi_avi_infoframe_pack_only(const struct hdmi_avi_infoframe *frame,
+                                    void *buffer, size_t size);
+ int hdmi_avi_infoframe_check(struct hdmi_avi_infoframe *frame);
  
  enum hdmi_spd_sdi {
        HDMI_SPD_SDI_UNKNOWN,
@@@ -194,6 -197,9 +197,9 @@@ int hdmi_spd_infoframe_init(struct hdmi
                            const char *vendor, const char *product);
  ssize_t hdmi_spd_infoframe_pack(struct hdmi_spd_infoframe *frame, void *buffer,
                                size_t size);
+ ssize_t hdmi_spd_infoframe_pack_only(const struct hdmi_spd_infoframe *frame,
+                                    void *buffer, size_t size);
+ int hdmi_spd_infoframe_check(struct hdmi_spd_infoframe *frame);
  
  enum hdmi_audio_coding_type {
        HDMI_AUDIO_CODING_TYPE_STREAM,
@@@ -272,6 -278,9 +278,9 @@@ struct hdmi_audio_infoframe 
  int hdmi_audio_infoframe_init(struct hdmi_audio_infoframe *frame);
  ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame,
                                  void *buffer, size_t size);
+ ssize_t hdmi_audio_infoframe_pack_only(const struct hdmi_audio_infoframe *frame,
+                                      void *buffer, size_t size);
+ int hdmi_audio_infoframe_check(struct hdmi_audio_infoframe *frame);
  
  enum hdmi_3d_structure {
        HDMI_3D_STRUCTURE_INVALID = -1,
@@@ -299,6 -308,9 +308,9 @@@ struct hdmi_vendor_infoframe 
  int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame);
  ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
                                   void *buffer, size_t size);
+ ssize_t hdmi_vendor_infoframe_pack_only(const struct hdmi_vendor_infoframe *frame,
+                                       void *buffer, size_t size);
+ int hdmi_vendor_infoframe_check(struct hdmi_vendor_infoframe *frame);
  
  union hdmi_vendor_any_infoframe {
        struct {
@@@ -330,10 -342,14 +342,14 @@@ union hdmi_infoframe 
        struct hdmi_audio_infoframe audio;
  };
  
- ssize_t
- hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer, size_t size);
- int hdmi_infoframe_unpack(union hdmi_infoframe *frame, void *buffer);
+ ssize_t hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer,
+                           size_t size);
+ ssize_t hdmi_infoframe_pack_only(const union hdmi_infoframe *frame,
+                                void *buffer, size_t size);
+ int hdmi_infoframe_check(union hdmi_infoframe *frame);
+ int hdmi_infoframe_unpack(union hdmi_infoframe *frame,
+                         const void *buffer, size_t size);
  void hdmi_infoframe_log(const char *level, struct device *dev,
-                       union hdmi_infoframe *frame);
+                       const union hdmi_infoframe *frame);
  
  #endif /* _DRM_HDMI_H */
This page took 0.326771 seconds and 4 git commands to generate.