]> Git Repo - linux.git/commitdiff
Merge remote-tracking branch 'drm/drm-next' into drm-misc-next
authorMaarten Lankhorst <[email protected]>
Tue, 13 Nov 2018 09:58:49 +0000 (10:58 +0100)
committerMaarten Lankhorst <[email protected]>
Tue, 13 Nov 2018 09:59:10 +0000 (10:59 +0100)
drm-next is forwarded to v4.20-rc1, and we need this to make
a patch series apply.

Signed-off-by: Maarten Lankhorst <[email protected]>
20 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.c
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_connector.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/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 0f5453d1823cd7e8917e31b8614da3f4b8265dc9,4b1a2a8fcc16185cd5fae518e0e2fb953becac6f..a2f4451cf3f9c6f579095f6489a2f61b94ca6edf
@@@ -67,7 -67,6 +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
@@@ -85,6 -84,7 +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,6 -115,7 +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
@@@ -128,6 -129,7 +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
@@@ -236,6 -238,7 +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
@@@ -275,6 -278,7 +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
@@@ -298,6 -302,7 +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 ff1f2878e14b24f56c617c9fb6c04b0c9694fc4b,f4855974f325063c1e5fea88d9d755ce75ee3b66..4caac2f6b01d4ae55e99fb08504cd5b743b897c5
@@@ -324,7 -324,6 +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
@@@ -377,7 -376,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/
@@@ -536,7 -535,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
@@@ -550,6 -549,15 +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]
@@@ -663,6 -671,13 +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]>
@@@ -840,7 -855,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]>
@@@ -933,6 -948,7 +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
@@@ -1078,6 -1094,29 +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
@@@ -1150,12 -1189,26 +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]>
@@@ -1175,18 -1228,25 +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
@@@ -1251,7 -1311,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/
@@@ -1462,7 -1522,9 +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
@@@ -1703,9 -1763,10 +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
@@@ -2085,22 -2146,24 +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]>
@@@ -2196,6 -2259,7 +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
@@@ -2220,7 -2284,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
@@@ -2242,7 -2306,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
@@@ -2263,7 -2327,6 +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
@@@ -2307,7 -2370,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
@@@ -2471,42 -2534,6 +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
@@@ -2519,43 -2546,6 +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]
@@@ -2564,13 -2554,6 +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]>
@@@ -2956,7 -2939,6 +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
@@@ -2977,6 -2959,7 +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
@@@ -3007,6 -2990,14 +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]
@@@ -3114,6 -3105,15 +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,6 -3211,15 +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]>
@@@ -3674,6 -3683,12 +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/
@@@ -3815,7 -3835,6 +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]>
@@@ -4032,7 -4051,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
@@@ -4075,7 -4094,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]>
@@@ -4171,6 -4190,11 +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]>
@@@ -4188,6 -4212,12 +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
@@@ -4195,10 -4225,11 +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]
@@@ -4364,7 -4388,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]
@@@ -4486,11 -4510,12 +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]>
@@@ -4528,9 -4555,13 +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]>
@@@ -4541,9 -4572,10 +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]>
@@@ -4623,13 -4655,6 +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/
@@@ -4671,12 -4696,6 +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
@@@ -5348,7 -5367,8 +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)
@@@ -5488,7 -5516,8 +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
@@@ -5532,7 -5561,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)
@@@ -5642,10 -5671,9 +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]
@@@ -6472,6 -6508,7 +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]>
@@@ -6780,6 -6817,12 +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]>
@@@ -7324,6 -7367,12 +7380,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]>
@@@ -7359,15 -7408,16 +7421,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
@@@ -7389,6 -7439,12 +7452,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]
@@@ -7503,7 -7559,6 +7572,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
@@@ -7515,6 -7570,14 +7583,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]
@@@ -7538,16 -7601,9 +7614,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
@@@ -7653,6 -7709,7 +7722,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*
@@@ -7689,7 -7746,6 +7759,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]>
@@@ -8124,6 -8180,7 +8193,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]
@@@ -8201,6 -8258,25 +8271,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]
@@@ -8260,6 -8336,14 +8349,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]
@@@ -8616,7 -8700,6 +8713,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
@@@ -8644,11 -8727,18 +8740,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]
@@@ -8762,7 -8852,7 +8865,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
@@@ -8813,7 -8903,7 +8916,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.*
@@@ -8852,6 -8942,15 +8955,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
@@@ -8865,13 -8964,6 +8977,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]
@@@ -9010,11 -9102,10 +9115,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
@@@ -9029,6 -9120,13 +9133,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]
@@@ -9059,11 -9157,10 +9170,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
@@@ -9106,7 -9203,7 +9216,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
@@@ -9126,6 -9223,7 +9236,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
@@@ -9134,19 -9232,17 +9245,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
@@@ -9513,7 -9609,7 +9622,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]>
@@@ -9532,13 -9628,20 +9641,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 / ATMEL DMA DRIVER
+ MICROCHIP AUDIO ASOC DRIVERS
+ M:    Codrin Ciubotariu <[email protected]>
+ L:    [email protected] (moderated for non-subscribers)
+ S:    Supported
+ F:    sound/soc/atmel
+ MICROCHIP DMA DRIVER
  M:    Ludovic Desroches <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected]
@@@ -9546,27 -9649,50 +9662,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]
@@@ -9592,6 -9792,13 +9805,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]
@@@ -9676,7 -9883,8 +9896,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*
@@@ -9716,6 -9924,19 +9937,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]
@@@ -9883,7 -10104,7 +10117,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/
  
@@@ -9923,6 -10144,13 +10157,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]
@@@ -9954,11 -10182,6 +10195,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*
@@@ -10206,6 -10428,8 +10441,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/*
@@@ -11058,7 -11282,7 +11295,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
@@@ -11090,7 -11314,7 +11327,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
@@@ -11159,7 -11383,7 +11396,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)
@@@ -11210,7 -11434,7 +11447,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]>
@@@ -11510,15 -11734,12 +11747,12 @@@ S:        Maintaine
  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]>
@@@ -11596,7 -11817,26 +11830,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
  
@@@ -12000,7 -12240,7 +12253,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]
@@@ -12008,7 -12248,6 +12261,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]
@@@ -12410,6 -12649,12 +12662,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]
@@@ -12696,6 -12941,18 +12954,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]>
@@@ -13084,7 -13347,7 +13360,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
@@@ -13328,6 -13591,7 +13604,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]>
@@@ -13574,6 -13838,20 +13851,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/
@@@ -13640,7 -13918,7 +13931,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]
@@@ -13891,7 -14171,7 +14184,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
@@@ -14055,6 -14335,12 +14348,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
@@@ -14437,7 -14723,6 +14736,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)
@@@ -15313,6 -15605,12 +15618,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]
@@@ -15387,6 -15685,12 +15698,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
@@@ -15401,7 -15705,7 +15718,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]>
@@@ -15424,7 -15728,7 +15741,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.*
@@@ -15525,7 -15829,7 +15842,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
@@@ -15559,7 -15863,6 +15876,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
@@@ -15737,7 -16040,7 +16053,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
@@@ -16002,6 -16305,17 +16318,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]
@@@ -16043,6 -16357,7 +16370,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 bdce05183edbe59e246a63d8a81c21bae9bc1af9,352b304090602e342ef6f584acab90edf126f51a..d6c47972062afee121116c3f9995eeb8bfe3a3df
@@@ -542,7 -542,8 +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));
  }
  
  /**
@@@ -772,7 -773,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;
  
@@@ -1839,7 -1840,7 +1840,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;
  
@@@ -3234,8 -3235,10 +3235,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 e5294d1a3049f16384cbe1518fc36969a79df76e,b0df6dc9a775f061120fbad6837e92f483317aea..dd688cfed6aa27d53b5bf134b6cc48f4750eb0ec
@@@ -1524,6 -1524,13 +1524,13 @@@ static int amdgpu_dm_backlight_update_s
  {
        struct amdgpu_display_manager *dm = bl_get_data(bd);
  
+       /*
+        * PWM interperts 0 as 100% rather than 0% because of HW
+        * limitation for level 0.So limiting minimum brightness level
+        * to 1.
+        */
+       if (bd->props.brightness < 1)
+               return 1;
        if (dc_link_set_backlight_level(dm->backlight_link,
                        bd->props.brightness, 0, 0))
                return 0;
@@@ -3189,6 -3196,7 +3196,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)
@@@ -3591,17 -3599,14 +3598,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;
@@@ -3728,12 -3733,14 +3735,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 a16dc34b62c526fceea64cc2e0a7782305bb430a,3dbfbddae7e6f2f887b30773e9b06a98774d640c..7e23b150ca80b97b571152fa2e5e73abdde6d3f8
@@@ -175,6 -175,11 +175,11 @@@ void drm_atomic_state_default_clear(str
                state->crtcs[i].state = NULL;
                state->crtcs[i].old_state = NULL;
                state->crtcs[i].new_state = NULL;
+               if (state->crtcs[i].commit) {
+                       drm_crtc_commit_put(state->crtcs[i].commit);
+                       state->crtcs[i].commit = NULL;
+               }
        }
  
        for (i = 0; i < config->num_total_plane; i++) {
@@@ -310,11 -315,9 +315,11 @@@ drm_atomic_get_crtc_state(struct drm_at
  }
  EXPORT_SYMBOL(drm_atomic_get_crtc_state);
  
 -static int drm_atomic_crtc_check(struct drm_crtc *crtc,
 -              struct drm_crtc_state *state)
 +static int drm_atomic_crtc_check(const struct drm_crtc_state *old_crtc_state,
 +                               const struct drm_crtc_state *new_crtc_state)
  {
 +      struct drm_crtc *crtc = new_crtc_state->crtc;
 +
        /* NOTE: we explicitly don't enforce constraints such as primary
         * layer covering entire screen, since that is something we want
         * to allow (on hw that supports it).  For hw that does not, it
         * TODO: Add generic modeset state checks once we support those.
         */
  
 -      if (state->active && !state->enable) {
 +      if (new_crtc_state->active && !new_crtc_state->enable) {
                DRM_DEBUG_ATOMIC("[CRTC:%d:%s] active without enabled\n",
                                 crtc->base.id, crtc->name);
                return -EINVAL;
         * as this is a kernel-internal detail that userspace should never
         * be able to trigger. */
        if (drm_core_check_feature(crtc->dev, DRIVER_ATOMIC) &&
 -          WARN_ON(state->enable && !state->mode_blob)) {
 +          WARN_ON(new_crtc_state->enable && !new_crtc_state->mode_blob)) {
                DRM_DEBUG_ATOMIC("[CRTC:%d:%s] enabled without mode blob\n",
                                 crtc->base.id, crtc->name);
                return -EINVAL;
        }
  
        if (drm_core_check_feature(crtc->dev, DRIVER_ATOMIC) &&
 -          WARN_ON(!state->enable && state->mode_blob)) {
 +          WARN_ON(!new_crtc_state->enable && new_crtc_state->mode_blob)) {
                DRM_DEBUG_ATOMIC("[CRTC:%d:%s] disabled with mode blob\n",
                                 crtc->base.id, crtc->name);
                return -EINVAL;
         * and legacy page_flip IOCTL which also reject service on a disabled
         * pipe.
         */
 -      if (state->event && !state->active && !crtc->state->active) {
 +      if (new_crtc_state->event &&
 +          !new_crtc_state->active && !old_crtc_state->active) {
                DRM_DEBUG_ATOMIC("[CRTC:%d:%s] requesting event but off\n",
                                 crtc->base.id, crtc->name);
                return -EINVAL;
@@@ -487,13 -489,14 +492,13 @@@ drm_atomic_get_plane_state(struct drm_a
  EXPORT_SYMBOL(drm_atomic_get_plane_state);
  
  static bool
 -plane_switching_crtc(struct drm_atomic_state *state,
 -                   struct drm_plane *plane,
 -                   struct drm_plane_state *plane_state)
 +plane_switching_crtc(const struct drm_plane_state *old_plane_state,
 +                   const struct drm_plane_state *new_plane_state)
  {
 -      if (!plane->state->crtc || !plane_state->crtc)
 +      if (!old_plane_state->crtc || !new_plane_state->crtc)
                return false;
  
 -      if (plane->state->crtc == plane_state->crtc)
 +      if (old_plane_state->crtc == new_plane_state->crtc)
                return false;
  
        /* This could be refined, but currently there's no helper or driver code
  
  /**
   * drm_atomic_plane_check - check plane state
 - * @plane: plane to check
 - * @state: plane state to check
 + * @old_plane_state: old plane state to check
 + * @new_plane_state: new plane state to check
   *
   * Provides core sanity checks for plane state.
   *
   * RETURNS:
   * Zero on success, error code on failure
   */
 -static int drm_atomic_plane_check(struct drm_plane *plane,
 -              struct drm_plane_state *state)
 +static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state,
 +                                const struct drm_plane_state *new_plane_state)
  {
 +      struct drm_plane *plane = new_plane_state->plane;
 +      struct drm_crtc *crtc = new_plane_state->crtc;
 +      const struct drm_framebuffer *fb = new_plane_state->fb;
        unsigned int fb_width, fb_height;
        int ret;
  
        /* either *both* CRTC and FB must be set, or neither */
 -      if (state->crtc && !state->fb) {
 +      if (crtc && !fb) {
                DRM_DEBUG_ATOMIC("[PLANE:%d:%s] CRTC set but no FB\n",
                                 plane->base.id, plane->name);
                return -EINVAL;
 -      } else if (state->fb && !state->crtc) {
 +      } else if (fb && !crtc) {
                DRM_DEBUG_ATOMIC("[PLANE:%d:%s] FB set but no CRTC\n",
                                 plane->base.id, plane->name);
                return -EINVAL;
        }
  
        /* if disabled, we don't care about the rest of the state: */
 -      if (!state->crtc)
 +      if (!crtc)
                return 0;
  
        /* Check whether this plane is usable on this CRTC */
 -      if (!(plane->possible_crtcs & drm_crtc_mask(state->crtc))) {
 +      if (!(plane->possible_crtcs & drm_crtc_mask(crtc))) {
                DRM_DEBUG_ATOMIC("Invalid [CRTC:%d:%s] for [PLANE:%d:%s]\n",
 -                               state->crtc->base.id, state->crtc->name,
 +                               crtc->base.id, crtc->name,
                                 plane->base.id, plane->name);
                return -EINVAL;
        }
  
        /* Check whether this plane supports the fb pixel format. */
 -      ret = drm_plane_check_pixel_format(plane, state->fb->format->format,
 -                                         state->fb->modifier);
 +      ret = drm_plane_check_pixel_format(plane, fb->format->format,
 +                                         fb->modifier);
        if (ret) {
                struct drm_format_name_buf format_name;
                DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid pixel format %s, modifier 0x%llx\n",
                                 plane->base.id, plane->name,
 -                               drm_get_format_name(state->fb->format->format,
 +                               drm_get_format_name(fb->format->format,
                                                     &format_name),
 -                               state->fb->modifier);
 +                               fb->modifier);
                return ret;
        }
  
        /* Give drivers some help against integer overflows */
 -      if (state->crtc_w > INT_MAX ||
 -          state->crtc_x > INT_MAX - (int32_t) state->crtc_w ||
 -          state->crtc_h > INT_MAX ||
 -          state->crtc_y > INT_MAX - (int32_t) state->crtc_h) {
 +      if (new_plane_state->crtc_w > INT_MAX ||
 +          new_plane_state->crtc_x > INT_MAX - (int32_t) new_plane_state->crtc_w ||
 +          new_plane_state->crtc_h > INT_MAX ||
 +          new_plane_state->crtc_y > INT_MAX - (int32_t) new_plane_state->crtc_h) {
                DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid CRTC coordinates %ux%u+%d+%d\n",
                                 plane->base.id, plane->name,
 -                               state->crtc_w, state->crtc_h,
 -                               state->crtc_x, state->crtc_y);
 +                               new_plane_state->crtc_w, new_plane_state->crtc_h,
 +                               new_plane_state->crtc_x, new_plane_state->crtc_y);
                return -ERANGE;
        }
  
 -      fb_width = state->fb->width << 16;
 -      fb_height = state->fb->height << 16;
 +      fb_width = fb->width << 16;
 +      fb_height = fb->height << 16;
  
        /* Make sure source coordinates are inside the fb. */
 -      if (state->src_w > fb_width ||
 -          state->src_x > fb_width - state->src_w ||
 -          state->src_h > fb_height ||
 -          state->src_y > fb_height - state->src_h) {
 +      if (new_plane_state->src_w > fb_width ||
 +          new_plane_state->src_x > fb_width - new_plane_state->src_w ||
 +          new_plane_state->src_h > fb_height ||
 +          new_plane_state->src_y > fb_height - new_plane_state->src_h) {
                DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid source coordinates "
                                 "%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n",
                                 plane->base.id, plane->name,
 -                               state->src_w >> 16, ((state->src_w & 0xffff) * 15625) >> 10,
 -                               state->src_h >> 16, ((state->src_h & 0xffff) * 15625) >> 10,
 -                               state->src_x >> 16, ((state->src_x & 0xffff) * 15625) >> 10,
 -                               state->src_y >> 16, ((state->src_y & 0xffff) * 15625) >> 10,
 -                               state->fb->width, state->fb->height);
 +                               new_plane_state->src_w >> 16,
 +                               ((new_plane_state->src_w & 0xffff) * 15625) >> 10,
 +                               new_plane_state->src_h >> 16,
 +                               ((new_plane_state->src_h & 0xffff) * 15625) >> 10,
 +                               new_plane_state->src_x >> 16,
 +                               ((new_plane_state->src_x & 0xffff) * 15625) >> 10,
 +                               new_plane_state->src_y >> 16,
 +                               ((new_plane_state->src_y & 0xffff) * 15625) >> 10,
 +                               fb->width, fb->height);
                return -ENOSPC;
        }
  
 -      if (plane_switching_crtc(state->state, plane, state)) {
 +      if (plane_switching_crtc(old_plane_state, new_plane_state)) {
                DRM_DEBUG_ATOMIC("[PLANE:%d:%s] switching CRTC directly\n",
                                 plane->base.id, plane->name);
                return -EINVAL;
@@@ -931,8 -927,6 +936,8 @@@ in
  drm_atomic_add_affected_planes(struct drm_atomic_state *state,
                               struct drm_crtc *crtc)
  {
 +      const struct drm_crtc_state *old_crtc_state =
 +              drm_atomic_get_old_crtc_state(state, crtc);
        struct drm_plane *plane;
  
        WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc));
        DRM_DEBUG_ATOMIC("Adding all current planes for [CRTC:%d:%s] to %p\n",
                         crtc->base.id, crtc->name, state);
  
 -      drm_for_each_plane_mask(plane, state->dev, crtc->state->plane_mask) {
 +      drm_for_each_plane_mask(plane, state->dev, old_crtc_state->plane_mask) {
                struct drm_plane_state *plane_state =
                        drm_atomic_get_plane_state(state, plane);
  
@@@ -967,19 -961,17 +972,19 @@@ int drm_atomic_check_only(struct drm_at
        struct drm_device *dev = state->dev;
        struct drm_mode_config *config = &dev->mode_config;
        struct drm_plane *plane;
 -      struct drm_plane_state *plane_state;
 +      struct drm_plane_state *old_plane_state;
 +      struct drm_plane_state *new_plane_state;
        struct drm_crtc *crtc;
 -      struct drm_crtc_state *crtc_state;
 +      struct drm_crtc_state *old_crtc_state;
 +      struct drm_crtc_state *new_crtc_state;
        struct drm_connector *conn;
        struct drm_connector_state *conn_state;
        int i, ret = 0;
  
        DRM_DEBUG_ATOMIC("checking %p\n", state);
  
 -      for_each_new_plane_in_state(state, plane, plane_state, i) {
 -              ret = drm_atomic_plane_check(plane, plane_state);
 +      for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
 +              ret = drm_atomic_plane_check(old_plane_state, new_plane_state);
                if (ret) {
                        DRM_DEBUG_ATOMIC("[PLANE:%d:%s] atomic core check failed\n",
                                         plane->base.id, plane->name);
                }
        }
  
 -      for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
 -              ret = drm_atomic_crtc_check(crtc, crtc_state);
 +      for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
 +              ret = drm_atomic_crtc_check(old_crtc_state, new_crtc_state);
                if (ret) {
                        DRM_DEBUG_ATOMIC("[CRTC:%d:%s] atomic core check failed\n",
                                         crtc->base.id, crtc->name);
        }
  
        if (!state->allow_modeset) {
 -              for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
 -                      if (drm_atomic_crtc_needs_modeset(crtc_state)) {
 +              for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
 +                      if (drm_atomic_crtc_needs_modeset(new_crtc_state)) {
                                DRM_DEBUG_ATOMIC("[CRTC:%d:%s] requires full modeset\n",
                                                 crtc->base.id, crtc->name);
                                return -EINVAL;
index 6f66777dca4b0e339d1259e038d00d826e3adb29,d8b526b7932c3db06e1ff7cad3f2485ddfe52cee..474b503a73a1694b9b909d976389caf135fd6b12
@@@ -92,17 -92,6 +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)) {
@@@ -319,6 -308,26 +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",
@@@ -1420,15 -1428,16 +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);
@@@ -1946,6 -1955,9 +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) {
@@@ -3399,3 -3411,586 +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 c555e17ab8d7d73e6bd059c3e2a289ead01f5278,4943cef178beb7675ab46a0d3100e33ae836bd0e..aa18b1d7d3e4df837de8561ae10322d31ff5159c
@@@ -260,7 -260,9 +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);
@@@ -292,24 -294,6 +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
@@@ -395,7 -379,8 +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) {
@@@ -452,7 -437,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:
@@@ -494,7 -479,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 b07ab3f613e0f54f3c81e396503ec552ed8b67fe,fb0dfc62b1b6340521cb5edade5540ee29efc169..5b516615881a0029c54a8fad9db2696f02406b80
@@@ -72,9 -72,7 +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
@@@ -89,13 -87,6 +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;
  }
@@@ -138,7 -124,10 +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);
  
@@@ -178,7 -167,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:
@@@ -235,3 -226,21 +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 8024524f05477ea5aa6ff524fe90521f0ff7870e,a502f3e519fdb668c685f392d518361e1e0a1ef2..9a69ad7e9f3b8beb6769d7a92673cd7dd2840757
@@@ -1599,6 -1599,25 +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
@@@ -1609,15 -1628,10 +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);
@@@ -1992,8 -1949,6 +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;
@@@ -3264,13 -3219,15 +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 3b367e07c87e026de588215599e1e428aee29575,24a177ea54176d91b289da8471cbffce3d4ee120..3650d3c467180e502e9695383e4bf358529693fc
@@@ -39,6 -39,7 +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)
@@@ -116,6 -117,7 +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)
@@@ -142,6 -144,7 +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)
@@@ -181,6 -184,7 +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
@@@ -353,9 -357,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;
  }
@@@ -393,8 -397,6 +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) {
@@@ -510,21 -509,15 +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 07d576d99475d9b47a6bf16b906062ca14b0a809,a04ffb3b21742a834c44c4770e2760f8139053dd..5fbee837b0dbedbdd22cc4232e61279e1cb26e2c
@@@ -56,6 -56,8 +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
@@@ -66,6 -68,7 +68,7 @@@
         */
        struct {
                unsigned int prepare;
+               unsigned int hpd_absent_delay;
                unsigned int enable;
                unsigned int disable;
                unsigned int unprepare;
@@@ -79,6 -82,7 +82,7 @@@ struct panel_simple 
        struct drm_panel base;
        bool prepared;
        bool enabled;
+       bool no_hpd;
  
        const struct panel_desc *desc;
  
@@@ -202,6 -206,7 +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;
  
@@@ -305,6 -313,8 +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);
@@@ -772,38 -782,16 +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,
  };
  
@@@ -858,55 -846,6 +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,
@@@ -1032,36 -971,6 +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,
@@@ -1464,7 -1373,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,
        },
  };
@@@ -2424,33 -2334,6 +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 b85b181bbb6c4cd9ff1a06f9b540189b90f3c3f5,f3899cc84e27f8db4c89c63e8ab1f2593dd8432a..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 2e7a28dbad4ecf11da8dc42b6eef2b4057dfdadf,9eb7c70a7712580a6741723c9447d7439bc87b7d..9f99ef38bccaf676e072877cd6e9f41cf1fe7371
@@@ -2284,8 -2284,10 +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;
  
@@@ -2418,7 -2420,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;
@@@ -2474,7 -2476,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[] = {
@@@ -3093,7 -3095,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 2cfd03f929b250f41fe1bc42b6ab593860497697,4721d49dcf0fef4bc4048e73d49bac558e3ed13e..0e6384f2016a60d2df687b6efc16529418c20465
@@@ -786,11 -786,13 +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;
  
@@@ -1525,6 -1527,7 +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],
@@@ -2563,7 -2574,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 519bf92508d5bddc61b3691a4bc07cd22cfb03ca,ca5d92942820a2fcb439ec1e7d277dd445214276..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 195a1fc74ee8b7ac3b618e6466f7df480a03e712,c4c2a6134e1eb047fb8687a6c235e49c358f089b..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 08d94ab0046735464fa43a573299982d097cd290,8a3e8f61b991bd7fb14a5552eed46a56c88a1d6a..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,36 -68,8 +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);
  
  /**
@@@ -238,33 -178,8 +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);
  
  /**
@@@ -362,33 -242,8 +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);
  
  /**
@@@ -499,7 -319,6 +499,7 @@@ int hdmi_vendor_infoframe_init(struct h
         * value
         */
        frame->s3d_struct = HDMI_3D_STRUCTURE_INVALID;
 +      frame->length = 4;
  
        return 0;
  }
@@@ -516,42 -335,8 +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;
  
@@@ -844,7 -471,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),
@@@ -965,10 -592,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:
@@@ -1046,10 -673,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));
@@@ -1123,12 -750,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));
  
@@@ -1259,10 -886,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);
@@@ -1322,12 -949,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:
@@@ -1378,9 -1005,8 +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 c09ecaf43825740c46761a8b07b2cfc5489293dc,1e810e0b76647239dee3c89f589f684b07b6786a..f9b35834c45d0e544fe7c2944353577072818ac2
@@@ -154,6 -154,17 +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;
  };
@@@ -254,6 -265,7 +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
@@@ -272,15 -284,6 +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 5b3cf909fd5e4c31072a849572db66a87565e2aa,9ccad6b062f2bb62c54434288e7fc9a25b194b53..dd0552cb747232cc7ac89003c6af846d6b90a0e5
@@@ -82,6 -82,53 +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,
@@@ -853,10 -900,12 +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:
@@@ -1084,7 -1133,6 +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,
@@@ -1167,6 -1215,24 +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 c76b50a48e48544dff3338c3fc6ca17e3111ff6e,4f3febc0f971cbf603bd5a905d4a2693fba8d3df..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,9 -163,6 +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,
@@@ -197,9 -194,6 +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,
@@@ -278,9 -272,6 +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,
@@@ -308,9 -299,6 +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 {
@@@ -342,14 -330,10 +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.260857 seconds and 4 git commands to generate.