Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media: bcm2835-unicam: call pad ops with active/try states #5807

Open
wants to merge 715 commits into
base: rpi-6.7.y
Choose a base branch
from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Dec 19, 2023

  1. drivers: media: imx296: Disable 2x2 binned mode

    Disable enumerating and setting of the 2x2 binned mode entirely as it
    does not seem to work for either mono or colour sensor variants.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    62f2385 View commit details
    Browse the repository at this point in the history
  2. panel-sitronix-st7701: Fix panel prepare over SPI

    A DSI write is issued in st7701_prepare even when the probed panel
    runs on SPI. In practice, this results in a panic with the
    vc4-kms-dpi-hyperpixel2r overlay active.
    
    Perform the equivalent write over SPI in this case.
    
    Signed-off-by: Jack Andersen <jackoalan@gmail.com>
    jackoalan authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    9b2d28a View commit details
    Browse the repository at this point in the history
  3. serial: sc16is7xx: Read modem line state at startup

    This patch sets the driver modem line state to the actual line state
    at driver startup.
    
    See: raspberrypi#5501
    
    Signed-off-by: Earl Schmidt <schmidt.earl.f@gmail.com>
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4755fb6 View commit details
    Browse the repository at this point in the history
  4. drivers: media: bcm2835_unicam: Improve frame sequence count handling

    Ensure that the frame sequence counter is incremented only if a previous
    frame start interrupt has occurred, or a frame start + frame end has
    occurred simultaneously.
    
    This corresponds the sequence number with the actual number of frames
    produced by the sensor, not the number of frame buffers dequeued back
    to userland.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7d57fde View commit details
    Browse the repository at this point in the history
  5. driver: media: i2c: imx477: Re-enable temperature sensor

    The temperature sensor enable register write got lost at some point.
    Re-enable it.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    567ec08 View commit details
    Browse the repository at this point in the history
  6. media: i2c: arducam_64mp: Modify the line length of 1280x720 resolution

    Arducam 64MP has specific requirements for the line length, and if these
    conditions are not met, the camera will not function properly. Under the
    previous configuration, once a stream off operation is performed, the
    camera will not output any data, even if a stream on operation is
    performed. This prevents us from switching from 1280x720 to another
    resolution.
    
    Signed-off-by: Lee Jackson <lee.jackson@arducam.com>
    Lee Jackson authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    135ccea View commit details
    Browse the repository at this point in the history
  7. media: i2c: arducam_64mp: Add 8000x6000 resolution

    Added 8000x6000 10-bit (cropped) @ 3fps mode for Arducam 64MP
    
    Signed-off-by: Lee Jackson <lee.jackson@arducam.com>
    Lee Jackson authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    79f057d View commit details
    Browse the repository at this point in the history
  8. media: i2c: arducam_64mp: Add PDAF support

    Enable PDAF output for all modes, and also need to modify Embedded Line
    Width to 11560 * 3 (two lines of Embedded Data + one line of PDAF).
    
    Signed-off-by: Lee Jackson <lee.jackson@arducam.com>
    Lee Jackson authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    cda0f73 View commit details
    Browse the repository at this point in the history
  9. xhci: quirks: add link TRB quirk for VL805

    The VL805 controller can't cope with the TR Dequeue Pointer for an endpoint
    being set to a Link TRB. The hardware-maintained endpoint context ends up
    stuck at the address of the Link TRB, leading to erroneous ring expansion
    events whenever the enqueue pointer wraps to the dequeue position.
    
    If the search for the end of the current TD and ring cycle state lands on
    a Link TRB, move to the next segment.
    
    Link: raspberrypi#3919
    
    [6.5.y Fixup - move downstream quirk bits further along]
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    60b7ff8 View commit details
    Browse the repository at this point in the history
  10. usb: xhci: borrow upstream TRB_FETCH quirk on VL805 hosts

    This reimplements 5a57342 usb: xhci: add VLI_TRB_CACHE_BUG quirk
    
    The downstream implementation required a fair bit of driver surgery to
    allow for truncated ring segments, which needed to shrink by a small
    amount to avoid the cache prefetcher from reading off the end of one
    segment and into another.
    
    An upstream implementation for a similar bug on a different controller
    just doubles the size of the memory allocated for ring segments, which
    is a bit more wasteful (+4K per allocation) but means less code churn.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d1eba9f View commit details
    Browse the repository at this point in the history
  11. usb: xhci: add VLI_SS_BULK_OUT_BUG quirk

    The VL805 can cause data corruption if a SS Bulk OUT endpoint enters a
    flow-control condition and there are TRBs in the transfer ring that are
    not an integral size of wMaxPacket and the endpoint is behind one or more
    hubs.
    
    This is frequently the case encountered when FAT32 filesystems are
    present on mass-storage devices with cluster sizes of 1 sector, and the
    filesystem is being written to with an aggregate of small files.
    
    The initial implementation of this quirk separated TRBs that didn't
    adhere to this limitation into two - the first a multiple of wMaxPacket
    and the second the 512-byte remainder - in an attempt to force TD
    fragments to align with packet boundaries. This reduced the incidence
    rate of data corruption but did not resolve it.
    
    The fix as recommended by VIA is to disable bursts if this sequence of
    TRBs can occur.
    
    Limit turning off bursts to just USB mass-storage devices by searching
    the device's configuration for an interface with a class type of
    USB_CLASS_MASS_STORAGE.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    92dae3f View commit details
    Browse the repository at this point in the history
  12. usb: xhci: add XHCI_VLI_HUB_TT_QUIRK

    The integrated USB2.0 hub in the VL805 chipset has a bug where it
    incorrectly determines the remaining available frame time before the
    host next sends a SOF packet with an incremented frame_number.
    
    See the USB2.0 specification sections 11.3 and 11.14.2.3.
    
    The hub's non-periodic TT handler can transmit the IN/OUT handshake
    token too late, so a following 64-byte DATA0/1 packet causes the ACK
    handshake to collide with the propagated SOF. This causes port babble.
    
    Avoid ringing doorbells for vulnerable endpoints during uFrame 7 if the
    TR is Idle to stop one source of babble. An IN transfer for a Running TR
    may happen at any time, so there's not much we can do about that.
    
    Ideally a hub firmware update to properly implement frame timeouts is
    needed, and to avoid spinning for up to 125us when submitting TDs to
    Idle rings.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    xhci: constrain XHCI_VLI_HUB_TT_QUIRK to old firmware versions
    
    VLI have a firmware update for the VL805 which resolves the incorrect
    frame time calculation in the hub's TT. Limit applying the quirk to
    known-bad firmwares.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    aefec5f View commit details
    Browse the repository at this point in the history
  13. cfg80211: ship debian certificates as hex files

    Loading the regulatory database from the debian files fails with
    
    "loaded regulatory.db is malformed or signature is missing/invalid"
    
    due to missing certificates.  Add these debian-specific certificates
    from upstream to fix this error. See raspberrypi#5536 for details.
    
    The certificates have been imported as following:
    
    patch -p1 <<<$(
    curl https://salsa.debian.org/kernel-team/linux/-/raw/\
    master/debian/patches/debian/\
    wireless-add-debian-wireless-regdb-certificates.patch
    )
    
    Signed-off-by: Nicolai Buchwitz <n.buchwitz@kunbus.com>
    nbuchwitz authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8453465 View commit details
    Browse the repository at this point in the history
  14. drivers: media: imx296: Add standby delay during probe

    Add a 2-5ms delay when coming out of standby and before reading the
    sensor info register durning probe, as instructed by the datasheet. This
    standby delay is already present when the sensor starts streaming.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    e647f85 View commit details
    Browse the repository at this point in the history
  15. drivers: media: imx296: Updated imx296 driver for external trigger

    Updated imx296 driver to support external trigger mode via XTR pin.
    Added module parameter to control this mode.
    
    Signed-off-by: Ben Benson <ben.benson@raspberrypi.com>
    Ben Benson authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4d0f803 View commit details
    Browse the repository at this point in the history
  16. drm/ili9486: Resolve clash in spi_device_id names

    For "Really Good Reasons" [1] the SPI core requires a match
    between compatible device strings and the name in spi_device_id.
    
    The ili9486 driver uses compatible strings "waveshare,rpi-lcd-35"
    and "ozzmaker,piscreen", but "rpi-lcd-35" and "piscreen" are missing,
    so add them.
    
    Compatible string "ilitek,ili9486" is already used by
    staging/fbtft/fb_ili9486, therefore leaving it present in ili9486 as an
    spi_device_id causes the incorrect module to be loaded, therefore remove
    this id.
    
    [1] https://elixir.bootlin.com/linux/latest/source/drivers/spi/spi.c#L487
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8885444 View commit details
    Browse the repository at this point in the history
  17. input: ads7846: Add missing spi_device_id strings

    The SPI core logs error messages if a compatible string device
    name is not also present as an spi_device_id.
    
    No spi_device_id values are specified by the driver, therefore
    we get 4 log lines every time it is loaded:
    SPI driver ads7846 has no spi_device_id for ti,tsc2046
    SPI driver ads7846 has no spi_device_id for ti,ads7843
    SPI driver ads7846 has no spi_device_id for ti,ads7845
    SPI driver ads7846 has no spi_device_id for ti,ads7873
    
    Add the spi_device_id values for these devices.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d3cbcdd View commit details
    Browse the repository at this point in the history
  18. bcm2835-unicam: hacks to allow it to build

    media: bcm2835-unicam: Fix up async notifier usage
    
    Fixes "8a090fc3e549 bcm2835-unicam: hacks to allow it to build"
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7ce02e5 View commit details
    Browse the repository at this point in the history
  19. rtc: rv3028: Add backup switchover mode support

    Signed-off-by: Phil Howard <phil@pimoroni.com>
    Gadgetoid authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f417b49 View commit details
    Browse the repository at this point in the history
  20. Revert "usb: phy: generic: Get the vbus supply"

    This reverts commit c0ea202.
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5be0f5c View commit details
    Browse the repository at this point in the history
  21. drivers: char: add generic gpiomem driver

    Based on bcm2835-gpiomem.
    
    We allow export of the "GPIO registers" to userspace via a chardev as
    this allows for finer access control (e.g. users must be group gpio, root
    not required).
    
    This driver allows access to either rp1-gpiomem or gpiomem, depending on
    which nodes are populated in devicetree.
    
    RP1 has a different look-and-feel to BCM283x SoCs as it has split ranges
    for IO controls and the parallel registered OE/IN/OUT access. To handle
    this, the driver concatenates the ranges for an IO bank and the
    corresponding RIO instance into a contiguous buffer.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    2be1644 View commit details
    Browse the repository at this point in the history
  22. drivers: char: delete bcm2835-gpiomem

    This functionality is now provided by raspberrypi-gpiomem.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    096f47a View commit details
    Browse the repository at this point in the history
  23. gpio_brcmstb: Allow to build for ARCH_BCM2835

    gpio-brcmstb: Report the correct bank width
    
    gpio: brcmstb: Use bank address as gpiochip label
    
    If the path to the device node is used as gpiochip label then
    gpio-brcmstb instances with multiple banks end up with duplicated
    names. Instead, use a combination of the driver name with the physical
    address of the bank, which is both unique and helpful for devmem
    debugging.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    gpio: mmio: Add DIRECT mode for shared access
    
    The generic MMIO GPIO library uses shadow registers for efficiency,
    but this breaks attempts by raspi-gpio to change other GPIOs in the
    same bank. Add a DIRECT mode that makes fewer assumptions about the
    existing register contents, but note that genuinely simultaneous
    accesses are likely to lose updates.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    gpio: brcmstb: Don't always clear interrupt mask
    
    If the GPIO controller is not being used as an interrupt source
    leave the interrupt mask register alone. On BCM2712 it might be used
    to generate interrupts to the VPU firmware, and on other devices it
    doesn't matter since no interrupts will be generated.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5c6a33f View commit details
    Browse the repository at this point in the history
  24. Allow RESET_BRCMSTB on ARCH_BCM2835

    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    27f4bfb View commit details
    Browse the repository at this point in the history
  25. pinctrl: bcm2712 pinctrl/pinconf driver

    pinctrl: bcm2712: Reject invalid pulls
    
    Reject attempts to set pulls on aon-sgpios, and fix pull shift
    values.
    
    pinctrl: bcm2712: Add 7712 support, fix 2712 count
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    pinctrl-bcm2712: add EMMC pins so pulls can be set
    
    These pins have pad controls but not mux controls. They look enough like
    GPIOs to squeeze in at the end of the list though.
    
    pinctrl: bcm2712: correct BCM2712C0 AON_GPIO pad pull control offset
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    pinctrl: bcm2712: on C0 the regular GPIO pad control register moves too
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    pinctrl: bcm2712: Implement (partially) pinconf_get
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    pinctrl: bcm2712: Convert to generic pinconf
    
    Remove the legacy brcm,* pin configuration support and replace it with
    a proper generic pinconf interface, using named functions instead of
    alt function numbers. This is nicer for users, less error-prone, and
    immune to some of the C0->D0 changes.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    pinctrl: bcm2712: Remove vestigial pull parameter
    
    Now the legacy brcm, pinconf parameters are no longer supported, this
    custom pin config parameter is not needed.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    pinctrl: bcm2712: Guard against bad func numbers
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    pinctrl: bcm2712: A better attempt at D0 support
    
    The BCM2712D0 sparse pinctrl maps play havoc with the old GPIO_REGS
    macro, so make the bit positions explicit. And delete the unwanted
    GPIO and pinmux declarations on D0.
    
    Note that a Pi 5 with D0 requires a separate DTS file with "bcm2712d0"
    compatible strings.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    pinctrl: bcm2712: Delete base register constants
    
    BCM2712D0 deletes many GPIOs and their associated mux and pad bits,
    so much so that the offsets to the start of the pad control registers
    changes. Remove the constant offsets from the *GPIO_REGS macros,
    compensating by adjusting the per-GPIO values.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f527498 View commit details
    Browse the repository at this point in the history
  26. mmc: brcmstb: add support for BCM2712

    BCM2712 has an SD Express capable SDHCI implementation and uses
    the SDIO CFG register block present on other STB chips.
    
    Add plumbing for SD Express handover and BCM2712-specific functions.
    
    Due to the common bus infrastructure between BCM2711 and BCM2712,
    the driver also needs to implement 32-bit IO accessors.
    
    mmc: brcmstb: override card presence if broken-cd is set
    
    Not just if the card is declared as nonremovable.
    
    sdhci: brcmstb: align SD express switchover with SD spec v8.00
    
    Part 1 of the Physical specification, figure 3-24, details the switch
    sequence for cards initially probed as SD. Add a missing check for DAT2
    level after switching VDD2 on.
    
    sdhci: brcmstb: clean up SD Express probe and error handling
    
    Refactor to avoid spurious error messages in dmesg if the requisite SD
    Express DT nodes aren't present.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    mmc: sdhci-brcmstb: only use the delay line PHY for tuneable speeds
    
    The MMC core has a 200MHz core clock which allows the use of DDR50 and
    below without incremental phase tuning. SDR50/SDR104 and the EMMC HS200
    speeds require tuning.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    storulf authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    e815430 View commit details
    Browse the repository at this point in the history
  27. sdhci: Add SD Express hook

    sdhci: remove PYA0_INTR_BUG quirk. Add quirks to disable some of the higher SDR speeds at 1.8v.
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5535db1 View commit details
    Browse the repository at this point in the history
  28. Add new "pispbe" driver (though not yet the Makesfiles or DT required…

    … to use it)
    
    media: bcm2712: Initial commit of the PiSP BE driver
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: bcm2712_pisp_be: PiSP driver updates.
    
    - Start registering video nodes from /dev/video20
    - Formatting fixes
    - Define MODULE_DEVICE_TABLE() to probe correctly
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: pisp_be: Improve image format support
    
    Add a new format table that lists the V4L2 format enums and their properties.
    Keep the exising 'RPBP' format to support the userland verification tools.
    This format requires userland to fill all plane properties. Standard V4L2
    formats will derive these properties from the format table.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: pisp_be: Advertise the meta output format explictily.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: pisp_be: Various updates and cleanups
    
    - Switch to a single node group for now.
    - Add a node description table to simplify node handling.
    - Switch HoG output to V4L2_CAP_META_CAPTURE type.
    - Use string descriptions for node names in logging messages.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    pisp_be: Updates for libcamera usage:
    
    - Remove indexes from device entity names
    - Add enumframesize and enumfmts ioctls
    - Add default format to all nodes.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    v4l2: pisp_be: Move format definitions into v4l2 core
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: raspberrypi: Move PiSP common headers to a single location
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: raspberrypi: Remove old pispbe driver.
    
    This is now supersede by the driver in drivers/media/platform/raspberrypi/
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    PISP-BE Driver: Automate buffer-cycling for TDN and Stitch state.
    Remove "tdn-input" and "stitch-input" nodes altogether (the output
    nodes must still be opened and REQBUFS called with 1 or 2 buffers).
    Also, a bit of tidying of buffer address handling and locking.
    
    PISP-BE driver: Turn debug level right down to reduce overly-chatty messages
    
    media: bcm2712: Depend on CONFIG_PM
    
    Depend on CONFIG_PM as the driver uses the runtime_pm infrastructure.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    drivers: media: pisp_be: Move BE driver to a raspberrypi directory
    
    Move the pisp_be driver from drivers/media/platform/raspberrypi/ to
    drivers/media/platform/raspberrypi/pisp_be/. This seems the accepted
    convention in the drivers/media/platform/ directory structure.
    
    Also rename the driver module from bcm2712_pisp_be to pisp_be.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    pisp_be: Updates for libcamera streaming:
    
    - Add some required v4l2 formats
    - Add buf_prepare ioctl
    - Set plane offsets correctly before reprogramming
    
    pisp_be: Reduce logging verbosity
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    pisp_be: Add buffer timestamps
    
    While at it, remove duplicate code when checking if the HW has completed
    multiple jobs.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    pisp_be: Remove queue size allocation constraint
    
    PISP-BE driver: Fix ISR to handle multiple done/start events.
    
    PISP-BE: Fix variable-name shadowing bugette
    
    PISP-BE: Support for two node groups. Reorganize the driver.
    
    To support 2 concurrent libcamera applications, we need 2 node groups,
    need to allow multiple opens of each node (because libcamera does this)
    and create a separate media device per group (to support file-locking).
    
    This triggered significant rearrangement of the driver. Some calls
    that we formerly intercepted have been delegated back to v4l2/vb2.
    Logging changes arising from multiple v4l2_dev. Refactored probe()
    and initialization. Avoid dynamically-allocated entity name strings.
    
    drivers: media: pisp_be: Add vidioc_enum_fmt_meta_out
    
    This was missing in the struct v4l2_ioctl_ops definition.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: media: pispe_be: Add Bayer compressed formats
    
    Add PiSP Bayer compressed formats to the list of supported pixel formats
    for the PiSP backend driver.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: meida: pisp_be: Fix overflow in plane size calculations
    
    The calculations for buffer plane sizes can overflow because of the
    plane factor shift. Fix this by using u64 integers for the calculations.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: media: pisp_be: Use 0P3 for plane factors
    
    Use less precision for the plane factors to avoid any nasty overflows.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: pisp: Checkpatch and coding style fixups
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    
    media: pisp_be: More coding style fixups
    
    media: platform: bcm2712: pisp_be: Fix crash when buffer format not set
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    
    media: platform: bcm2712: pisp_be: Allow non-SRGB colour spaces on RGB outputs
    
    Allow colour spaces other than SRGB when the output format in question
    is an RGB output. This commit merely ports over existing changes from
    the vc4 ISP driver.
    
    Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
    
    media: platform: bcm2712: Tweak list of BE supported image formats
    
    Remove RGB565 and 10- and 12-bit packed raw formats, which ISP-BE
    can't support for input or output. Add NV12M and NV21M which it can.
    (I didn't bother adding YUV422P, which apparently is not widely used.)
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    
    pisp_be: Fill the hardware revision in the media entity struct
    
    This can be used by userland to determine the hardware capabilities.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    bcm2712: Use BIT() macro
    
    Use the BIT() macro instead of plain bit shifting.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    bcm2712: Invert condition in pispbe_schedule_internal()
    
    Return earlier and save one indentation level
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    bcm2712: Invert condition in for loop
    
    Save one indentation level by continuing if the node is not streaming.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    bcm2712: Do not declare a local variable
    
    There already is a truct pispbe_node *node in the function scope.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    bcm21712: Siplify pispbe_schedule_one()
    
    A little more verbose but easier to follow ?
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    bcm2712: Rename pispbe_schedule_all() to pispbe_schedule_any()
    
    The pispbe_schedule_all() function name is misleading, as the function
    schedule a single job from any of the node groups. Rename it.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: platform: bcm2712: Remove buffer auto-cycling from ISP-BE
    
    Previously, the ISP-BE driver tried to automate "ping pong" buffers
    for TDN and HDR state, but did not fully conceal them from users.
    
    The automation has been removed: there are now separate output and
    capture queues for each of TDN and Stitch, which must be managed by
    user code (DMABUFs may be used to circulate buffers between queues).
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    
    drivers: media: pisp_be: Cache BE config buffer vaddr
    
    When programming a new job, we access at the config buffer, possibly
    from ISR context. So fetch and the virtual address when queuing the
    buffer.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: media: pisp_be: Remove all traces of ctrls and request API
    
    These APIs are not (and will not) be used by the driver, so remove them.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: bcm2712: Replace v4l2_dbg with dev_dbg
    
    Replace the v4l2 debug helpers with the device debug once, which are
    preferred.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Remove of_match_ptr()
    
    The of_match_ptr() usage could cause a compiler warning if
    CONFIG_OF is not enabled, as the pispbe_of_match variable would
    result unused.
    
    As the of_match_table field of struct platform_driver exists
    unconditionally, drop of_match_ptr() to avoid a warning.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    drivers: media: pispbe: Add local config buffer DMA allocation
    
    When initialiasing the driver, allocate a number of tiles + config
    structures used for storing hardware config internally in the driver.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: media: pispbe: Use local config buffers
    
    Store a copy of the config + tiles buffer locally when the buffer gets
    queued. This resolves the security issue where a userland process may
    modify the config buffer after it has been queued.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: media: pispbe: Validate config buffers
    
    Perform a basic config validation on the device output nodes to ensure
    the buffer size and stride values do not result in a buffer overrun.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: bcm2712: Rework probe sequence order
    
    Rework the probe sequence to:
    1) Use dev_err_probe() when failing to get clocks
    2) Disable clock on error path
    3) Disable the node groups if they have been enabled and
       propagate the error up
    
    Also disable clocks in the remove() function.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Use pm_runtime_ops
    
    Introduce usage of runtime resume and suspend operations.
    
    The diver only uses a single clock source which is enable/disabled
    at resume and suspend time.
    
    Implement file open and release operations to control enablement of
    the clock provider.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Demote info message
    
    Demote info message about clock enablement to dev_dbg()
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Move pm_runtime calls to streamon/streamoff
    
    Move the calls to pm_runtime_resume_and_get() and pm_runtime_put()
    to the streamon and streamoff ioctl handlers.
    
    Remove custom handlers for the open and close file operations and use
    the framework provided helpers.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Use pm_runtime_autosuspend()
    
    Use the _autosuspend() version of runtime_pm_put() in order to avoid
    resuming and suspending the peripheral in between streaming sessions
    closely apart one from the other.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    drivers: media: pisp_be: Conditionally check buffers when preparing jobs
    
    When preparing a job, check the global enables in the config structure
    to see if the Output0/1, Tdn and Stitch blocks are enabled, and only
    test for a buffer queued if they are.
    
    This will allow userland to control the outputs selectively without
    disabling/re-enabling the respective device nodes.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: bcm2712: Rework media controller registration
    
    The current implementation register the v4l2_device and the video
    devices first, then creates the media controller and manually registers
    entities there.
    
    Rework the registration procedure to first create the v4l2_device and
    register the media_device with it. Then create the video nodes which
    gets automatically registered in the media graph by the core.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Create v4l2_subdev for ISP entity
    
    Create a v4l2 subdevice to represent the PISPBE ISP entity.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Fix v4l2-compliance warn on QUERYCAP
    
    Fix:
    
    warn: v4l2-compliance.cpp(669): media bus_info
    'platform:1000880000.pisp_be' differs from V4L2 bus_info
    'platform:pispbe'
    
    by populating the driver caps bus_info by using dev_name().
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Fix v4l2-compliance warn on invalid pixfmt
    
    The V4L2 API for the TRY_FMT/S_FMT ioctl allows the ioctl handler to
    return an error code only in specific conditions. If an invalid pixel
    format is supplied it should be adjusted instead of an error being
    returned.
    
    Albeit, v4l2-compliance treats this situation as a warning and not as
    an error because the behaviour has been discussed in length in the past.
    
    warn: v4l2-test-formats.cpp(794): TRY_FMT cannot handle an invalid pixelformat.
    warn: v4l2-test-formats.cpp(795): This may or may not be a problem. For more information see:
    warn: v4l2-test-formats.cpp(796): http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html
    VIDIOC_TRY_FMT returned -1 (Invalid argument)
    
    Regardless of the warning vs failure decision, adjust the try_format()
    function implementation to use V4L2_PIX_FMT_YUV420M as default pixel
    format if the supplied one is invalid.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Fix v4l2-compliance warn on HOG pix format
    
    The try_format() implementation for the HOG video device node returns
    an error if the supplied pixel format is not correct.
    
    As per the video device output and capture video nodes, this contradicts
    the V4L2 specification even if it is treated as a warning by
    v4l2-compliance.
    
    Fix this by forcing the buffer pixel format and size to the default
    supported one. While at here, use the BIT() macro in the format
    initialization function.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Fix formats enumeration
    
    Right now a single implementation of enum_fmt() is used for all nodes
    in a group. This means that all the BE supported formats are listed for
    all the nodes. This is incorrect as the meta capture and output node
    formats should be restricted, and the meta formats should not be
    enumerated for video output and capture devices.
    
    Fix this by restricting the enumeration of META formats to the config
    and hog nodes. Split out from the list of supported_formats the
    V4L2_META_FMT_RPI_BE_CFG which is only used for the meta_out node, while
    V4L2_PIX_FMT_RPI_BE is kept in the list of supported_formats as it can
    be used as an opaque format for both meta_cap, video_cap and video_out
    nodes.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    
    media: bcm2712: Minor fixes to support PiSP regression tests
    
    Allow RGB input, not just Bayer (but only of those at once);
    Allow Wallpaper image formats. XXX They are not yet size-checked;
    Set "chicken bits" to test BURST_TRIM and AXI AWID/BID variation.
    Convert some v4l2_err() to dev_err()
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    
    drivers: media: pisp_be: Use the maximum number of config buffers
    
    Set PISP_BE_NUM_CONFIG_BUFFERS the the maximum number of possible
    buffers.  In the worst case, this overallocates config buffers, but
    given their size, it's not too much of a problem.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: pisp_be: Fix extra PM runtime put
    
    vidioc_streamoff callback can be called even if vidioc_streamon was
    never called. The driver currently does PM runtime get/put in these
    callbacks, which may lead to a put without a matching get.
    
    Fix this by moving the PM runtime get/put to vb2_ops's start_streaming &
    stop_streaming, which the framework makes sure won't get extra calls.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    drivers: media: pisp_be: Don't report V4L2_PIX_FMT_RPI_BE format
    
    This is an internal opaque format, not to be reported in enum_fmt.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: media: pisp_be: Add back V4L2_PIX_FMT_RPI_BE format
    
    Add the opaque V4L2_PIX_FMT_RPI_BE format back to the format list as it
    is needed for the verification test suite. Also set the default format
    to YUV420 non-multiplanar.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    Nick Hollinghurst authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d8dc15a View commit details
    Browse the repository at this point in the history
  29. irqchip: irq-bcm2712-mip: Support for 2712's MIP

    irqchip: irq-bcm2712-mip: specify bitmap search size as ilog2(N) not N
    
    Freeing also has the same interface.
    
    irqchip: irq-bcm2712-mip: Fix build warnings
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    irqchip: bcm2712-mip: add a quick hack to optionally shift MSI vectors
    
    There are two MIP peripherals in bcm2712, the first gets a first-class
    treatment where 64 consecutive GIC SPIs are assigned to all 64 output
    vectors. The second gets an agglomeration of 17 GIC SPIs, but only 8 of
    these are consecutive starting at the 8th output vector.
    
    For now, allow the use of this smaller contiguous range within a larger
    whole.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    36c638d View commit details
    Browse the repository at this point in the history
  30. reset: reset-brcmstb-rescal: Support shared use

    reset_control_reset should not be used with shared reset controllers.
    Add support for reset_control_assert and _deassert to get the desired
    behaviour and avoid ugly warnings in the kernel log.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    bc1d06d View commit details
    Browse the repository at this point in the history
  31. net: macb: Also set DMA coherent mask

    macb: Add device tree properties that allow configuration of the AXI max pipeline register
    
    net: macb: add support for ethtool interrupt moderation configuration
    
    Only global throttling of rx or tx by time quanta is supported.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    macb: add platform device shutdown function. Prevents AXI master over PCIE from hanging when the host is rebooted.
    
    net: macb: increase polling interval for MDIO completion
    
    MDIO is a slow bus (single-digit MHz). Polling at 1us intervals
    is a bit aggressive, so increase to 100us as the transaction
    usually takes 100-200us to complete.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    net: macb: Several patches for RP1
    
    64-bit RX fix
    
    Also set DMA coherent mask
    
    Add device tree properties that allow configuration of the AXI max
    pipeline register
    
    Add support for ethtool interrupt moderation configuration
    
    Only global throttling of rx or tx by time quanta is supported.
    
    Add platform device shutdown function. Prevents AXI master over PCIE
    from hanging when the host is rebooted.
    
    Increase polling interval for MDIO completion
    
    MDIO is a slow bus (single-digit MHz). Polling at 1us intervals
    is a bit aggressive, so increase to 100us as the transaction
    usually takes 100-200us to complete.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    net: macb: Support the phy-reset-gpios property
    
    Allow a PHY to be reset with an optional GPIO. The reset duration can
    be specified in milliseconds - the default is 10ms.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    drivers: net: macb: close device on driver shutdown
    
    Fix some suspicious locking and instead call into macb_close, which
    deregisters and frees all resources the corresponding macb_open
    claimed.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    net: macb: add hack to prevent TX stalls in a quiet system
    
    See raspberrypi/linux-2712#89
    
    There is some critical window during TX where a further write to the
    TSTART bit while TX is active does not cause newly queued TX descriptors
    to be consumed.
    
    For now "wait a bit, then try anyway" seems to work.
    
    Requires further investigation, but this unsticks NFS reliably.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    net: macb: set default interrupt moderation for GEM hardware
    
    Defaulting to intmod = 0 is antisocial, as the MAC can generate over
    130,000 interrupts per second. 50us is a sensible default.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a719346 View commit details
    Browse the repository at this point in the history
  32. usb: dwc3: Set DMA and coherent masks early

    dwc3 allocates scratch and event buffers in the top-level driver. Hack the
    probe function to set the DMA mask before trying to allocate these.
    
    I think the event buffers are only used in device mode, but the scratch
    buffers may be used if core hibernation is enabled.
    
    usb: dwc3: add support for new DT quirks
    
    Apply the optional axi-pipe-limit and dis-in-autoretry-quirk properties
    during driver probe.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    phy: phy-brcm-usb: Add 2712 support
    
    usb: dwc3: if the host controller instance number is present in DT, use it
    
    If two instances of a dwc3 host controller are specified in devicetree,
    then the probe order may be arbitrary which results in the device names
    swapping on a per-boot basis.
    
    If a "usb" alias with the instance number is specified, then use
    that to construct the device name instead of autogenerating one.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    rp1 dwc3 changes
    
    drivers: usb: dwc3: allow setting GTXTHRCFG on dwc_usb3.0 hardware
    
    Equivalent register fields exist in the SuperSpeed Host version of the
    hardware, so allow the use of TX thresholds if specified in devicetree.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    drivers: usb: dwc3: remove downstream quirk dis-in-autoretry
    
    Upstream have unilaterally disabled the feature.
    
    Partially reverts 6e9142a (downstream)
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    030b774 View commit details
    Browse the repository at this point in the history
  33. drm/panel/raspberrypi-touchscreen: Insert more delays.

    This avoids failures in cases where the panel is enabled
    or re-probed very soon after being disabled or probed.
    These can occur because the Atmel device can mis-behave
    over I2C for a few ms after any write to the POWERON register.
    Nick Hollinghurst authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    cca2d54 View commit details
    Browse the repository at this point in the history
  34. PCI: brcmstb: Add BCM2712 support

    PCI: brcmstb: differing register offsets on 2712
    
    pcie-brcmstb: Add 2712 bridge reset support
    
    pcie: 2712 PORT_MASK and rescal support
    
    pcie-brcmstb: don't alter the L1SS debug register
    
    For reasons unknown, this disables the reference clock
    
    pcie-brcmstb: fix BAR2 enable and window decode
    
    Set UBUS ACCESS_EN to let inbound DMA work. Also BCM2712 has grown
    an index in the inbound window size decode register.
    
    PCIe: brcmstb: Enable support for 64 MSI-Xs
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    pcie-brcmstb: Suppress read error responses
    
    If the link is down or the EP fails to return a read completion, the
    RC's default behaviour is to return an AXI error. This causes fatal
    exceptions on A76, so it's better to respond with all 1s instead.
    
    pcie-brcmstb: increase UBUS timeout to cater for link retrain events
    
    pcie-brcmstb: Handle additional inbound regions
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    pcie-brcmstb: Add support for external MSI controller
    
    pcie-brcmstb: add a reasonable default traffic class to priority map
    
    BCM2712 supports multiple traffic classes (TCs) with independent
    maximally sized transfer queues for each TC. Traffic classes have no
    transaction ordering requirements between them, which facilitates
    out-of-order completions and arbitration between posted writes for
    data streams that have no dependence on each other.
    
    In addition to the above benefits of splitting endpoint traffic into
    individual queues, priorities can be assigned to traffic classes by
    a heuristic or deterministic mechanism. The heuristic elevates AXI
    QOS priority in accordance with the number of pending transfers in
    each TC's queue, but for true priority signalling a forwarding
    mechanism using vendor-defined messages is implemented.
    
    Receipt of a 3 DWORD VDM assigns a priority tag to a TC on-the-fly,
    and this tag corresponds to a configurable AXI QOS value.
    
    As a simple baseline, assign a linear map of AXI QOS to each tag.
    
    pcie: brcmstb: set up the VDM forwarding interface when setting up QoS
    
    pcie-brcmstb: clean up debug messages
    
    pcie-brcmstb: fix BCM2712A0 PHY PM errata
    
    The power management clock is 54MHz not 50MHz, so adjust the PM clock period
    to suit. Powering off the PHY PLL in L1.2 is unsafe, so force it on.
    
    pcie-brcmstb: set CLKREQ functionality according to link partner support
    
    The RC supports either L1 with clock PM or L1 sub-state control, not both
    at the same time. Examine the link partner's capabilities to determine
    which is the most suitable scheme to use.
    
    pcie: brcmstb: don't reset block bridges in suspend or removal cases
    
    BCM2712 has a single rescal block for all three root complexes, and
    holding PCIE1's bridge in reset will hang the chip if a different
    RC wants to access any of the rescal registers.
    
    pcie: brcmstb: guard 2712-specific setup with a RC type check
    
    BCM2711 doesn't implement the UBUS control registers.
    
    pcie: brcmstb: On 2712 keeping the PLL powered in L1.x is not required
    
    A separate misconfiguration when enabling SSC (the MDIO registers no
    longer do the same thing on BCM2712) had the side-effect of breaking
    PLL powerdown and resume sequencing.
    
    Allow entry into a true L1.2 state where analogue is depowered.
    
    pcie: brcmstb: Fix reset warning on probe failure
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    bcm2712: pcie: adjust PHY PLL setup to use a 54MHz input refclk
    
    Use canned MDIO writes from Broadcom that switch the ref_clk output
    pair to run from the internal fractional PLL, and set the internal PLL
    to expect a 54MHz input reference clock.
    
    Gen3 operation is not guaranteed to be stable in this setup, so default
    to gen2.
    
    This only works if the LCPLL is bypassed (requires latest bootloader).
    
    pcie: brcmstb: add missing register writes
    
    drivers: pcie: brcmstb: cater for BCM2712C0 bug dropping QoS on the floor
    
    The AXI QoS value extracted from the request fifo ends up as zero forever.
    Disabling this means that "panic" signalling doesn't do anything useful,
    but static priorites do work.
    
    Also align the selected TC:QoS map with RP1's expectations of service.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    drivers: pcie: brcmstb: shuffle TC priorities up to 8
    
    Use the range 8-11 which puts the highest below HVS but leaves space
    below for other 2712 masters.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    drivers: pcie: brcmstb: optionally enable QoS features by DT for BCM2712
    
    It's a bad idea to universally enable "realtime" priorities for TCs
    across all the RC instances on the chip. Endpoints other than RP1 may
    make use of these, so you don't want e.g. NVMe descriptor fetches getting
    higher priority than your remote display.
    
    Add two optional DT properties controlling the behaviour - FIFO-based
    backpressure QoS or "message-based". Message-based signalling is
    fundamentally broken due to a chip bug, so it collapses into a set of
    static assignments that RP1 needs.
    
    The default if neither property is specified is to assign everything a
    QoS of 0.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    
    drivers: pcie: brcmstb: adjust completion timeouts for bcm2712
    
    Setting the RC config retry timeout makes CRS auto-polling work, but
    the UBUS timeout will override the config retry. Both need to be large.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    jamesequinlan authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a99e7cd View commit details
    Browse the repository at this point in the history
  35. V4L2: Add PiSP opaque formats to V4L2

    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ce56b48 View commit details
    Browse the repository at this point in the history
  36. V4L2: Add PiSP compressed formats to V4L2

    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8d1a11d View commit details
    Browse the repository at this point in the history
  37. dt-binding: mfd: Add binding for Raspberry Pi RP1

    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    96f0426 View commit details
    Browse the repository at this point in the history
  38. mfd: Add rp1 driver

    RP1 is a multifunction PCIe device that exposes a range of
    peripherals.
    Add the parent driver to manage these.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    0b2f7a8 View commit details
    Browse the repository at this point in the history
  39. dt-bindings: clock: Add bindings for Raspberry Pi RP1

    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    9fe7a90 View commit details
    Browse the repository at this point in the history
  40. clk: Add rp1 clock driver

    RP1 contains various PLLs and clocks for driving the hardware
    blocks, so add a driver to configure these.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    6dff0df View commit details
    Browse the repository at this point in the history
  41. dt-bindings: pinctrl: Add bindings for Raspberry Pi RP1

    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    187d922 View commit details
    Browse the repository at this point in the history
  42. pinctrl: Add rp1 driver

    RP1 exposes GPIOs. Add a pinctrl driver to allow control of those.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    cc179e2 View commit details
    Browse the repository at this point in the history
  43. serial: pl011: rp1 uart support

    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    76472d4 View commit details
    Browse the repository at this point in the history
  44. mmc: sdhci-of-dwcmshc: define sdio timeout clocks

    Signed-off-by: Liam Fraser <liam@raspberrypi.com>
    
    mmc: sdhci-of-dwcmshc: rp1 sdio changes
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    
    drivers: mmc: sdhci-of-dwcmshc: add RP1 dt ID and quirks
    
    Differentiate the RP1 variant of the Designware MSHC controller(s).
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    liamfraser authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f4cfcdc View commit details
    Browse the repository at this point in the history
  45. clk: rp1: Add sdio-clk driver

    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7312caf View commit details
    Browse the repository at this point in the history
  46. i2c: designware: Add SMBUS quick command support

    The SMBUS emulation code turns an SMBUS quick command into a zero-
    length read. This controller can't do zero length accesses, but it
    can do quick commands, so reverse the emulation. The alternative
    would be to properly implement the SMBUS support but that is a lot
    more work, and unnecessary just to get i2cdetect working.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d670132 View commit details
    Browse the repository at this point in the history
  47. dmaengine: dw-axi-dmac: Fixes for RP1

    Don't assume that DMA addresses of devices are the same as their
    physical addresses - convert correctly.
    
    The CFG2 register layout is used when there are more than 8 channels,
    but also when configured for more than 16 target peripheral devices
    because the index of the handshake signal has to be made wider.
    
    Reset the DMAC on probe
    
    The driver goes to the trouble of tracking when transfers have been
    paused, but then doesn't report that state when queried.
    
    Not having APB registers is not an error - for most use cases it's
    not even of interest, it's expected. Demote the message to debug level,
    which is disabled by default.
    
    Each channel has a descriptor pool, which is shared between transfers.
    It is unsafe to treat the total number of descriptors allocated from a
    pool as the number allocated to a specific transfer; doing so leads
    to releasing buffers that shouldn't be released and walking off the
    ends of descriptor lists. Instead, give each transfer descriptor its
    own count.
    
    Support partial transfers:
    Some use cases involve streaming from a device where the transfer only
    proceeds when the device's FIFO occupancy exceeds a certain threshold.
    In such cases (e.g. when pulling data from a UART) it is important to
    know how much data has been transferred so far, in order that remaining
    bytes can be read from the FIFO directly by software.
    
    Add the necessary code to provide this "residue" value with a finer,
    sub-transfer granularity.
    
    In order to prevent the occasional byte getting stuck in the DMA
    controller's internal buffers, restrict the destination memory width
    to the source register width.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    9739e45 View commit details
    Browse the repository at this point in the history
  48. spi: dw: Handle combined tx and rx messages

    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ed65c7e View commit details
    Browse the repository at this point in the history
  49. pwm: Add support for RP1 PWM

    Add a driver for the RP1 PWM block.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d402003 View commit details
    Browse the repository at this point in the history
  50. drm: Add RP1 DSI driver

    Add support for the RP1 DSI hardware.
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    njhollinghurst authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    fff06ec View commit details
    Browse the repository at this point in the history
  51. drm: Add RP1 DPI driver

    Add support for the RP1 DPI hardware.
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    njhollinghurst authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    15febb2 View commit details
    Browse the repository at this point in the history
  52. drm: Add RP1 VEC driver

    Add support for the RP1 VEC hardware.
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    njhollinghurst authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    86b36e6 View commit details
    Browse the repository at this point in the history
  53. v4l2: Add pisp compression format support to v4l2

    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    e7d9309 View commit details
    Browse the repository at this point in the history
  54. media: rp1: Add CFE (Camera Front End) support

    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: rp1: cfe: Fix use of freed memory on errors
    
    cfe_probe_complete() calls cfe_put() on both success and fail code paths.
    This works for the success path, but causes the cfe_device struct to be
    freed, even if it will be used later in the teardown code.
    
    Fix this by making the ref handling a bit saner: Let the video nodes
    have the refs as they do now, but also keep a ref in the "main" driver,
    released only at cfe_remove() time. This way the driver does not depend
    on the video nodes keeping the refs.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: cfe: Fix width & height in cfe_start_channel()
    
    The logic for handling width & height in cfe_start_channel() is somewhat
    odd and, afaics, broken. The code reads:
    
    bool start_fe = is_fe_enabled(cfe) &&
                    test_all_nodes(cfe, NODE_ENABLED, NODE_STREAMING);
    
    if (start_fe || is_image_output_node(node)) {
            width = node->fmt.fmt.pix.width;
            height = node->fmt.fmt.pix.height;
    }
    
    cfe_start_channel() is called for all video nodes that will be used. So
    this means that if, say, fe_stats is enabled as the last node, start_fe
    will be true, and width and height will be taken from fe_stats' node.
    The width and height will thus contain garbage, which then gets
    programmed to the csi2 registers.
    
    It seems that this often still works fine, though, probably if the width
    & height are large enough.
    
    Drop the above code, and instead get the width & height from the csi2
    subdev's sink pad for the csi2 channel that is used. For metadata the
    width & height will be 0 as before.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: cfe: Fix verbose debug print
    
    The debug print in cfe_schedule_next_csi2_job() is printed every frame,
    and should thus use cfe_dbg_irq() to avoid spamming, rather than cfe_dbg().
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: cfe: Rename xxx_dbg_irq() to xxx_dbg_verbose()
    
    Rename the xxx_dbg_irq() macros to xxx_dbg_verbose(), as they can be
    used to verbose debugs outside irq context too.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: cfe: Add verbose debug module parameter
    
    Expose the verbose debug flag as a module parameter.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: cfe: Drop unused field
    
    Drop 'sensor_embedded_data' field, as it is unused.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: cfe: Fix default meta format's field
    
    Set default meta format's field to V4L2_FIELD_NONE, instead of zeroing
    it which indicates V4L2_FIELD_ANY. Metadata doesn't have fields, so NONE
    makes sense, and furthermore the default v4l2 link validation will check
    for matching fields, or that the sink field is NONE.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: cfe: Fail streaming if FE_CONFIG node is not enabled
    
    When the FE is enabled, ensure that the FE_CONFIG node is enabled.
    Otherwise fail cfe_start_streaming() entirely.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: media: rp1_cfe: Remove PISP specific MBUS formats
    
    Remove the MEDIA_BUS_FMT_PISP* format codcs entirely. For the image
    pad formats, use the 16-bit Bayer format mbus codes instead. For the
    config and stats pad formats, use MEDIA_BUS_FMT_FIXED.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: media: rp1_cfe: Fix link validate test for pixel format
    
    Now that we have removed unique PISP media bus codes, the cfe format
    table has multiple entries with the same media bus code for 16-bit
    formats. The test in cfe_video_link_validate() did not account for this.
    Fix it by testing the media bus code and the V4L2 pixelformat 4cc
    together.
    
    As a drive-by, ensure we have a valid CSI2 datatype id when programming
    the hardware block.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: media: cfe: Set the CSI-2 link frequency correctly
    
    Use the sensor provided link frequency to set the DPHY timing parameters
    on stream_on. This replaces the hard-coded 999 MHz value currently being
    used. As a fallback, revert to the original 999 Mhz link frequency.
    
    As a drive-by, fix a 80-character line formatting error.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    drivers: media: cfe: Don't confuse MHz and Mbps
    
    The driver was interchaning these units when talking about link rate.
    Fix this to avoid confusion. Apart from the logging message change,
    there is no function change in this commit.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    
    media: rp1: csi2: Fix missing reg writes
    
    The driver has two places where it writes a register based on a
    condition, and when that condition is false, the driver presumes that
    the register has the reset value. This is not a good idea, so fix those
    places to always write the register.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: fe: Use ~0, not -1, when working with unsigned values
    
    Use ~0, not -1, when working with unsigned values (-1 is not unsigned).
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: Add back reg write debug prints
    
    Add back debug prints in csi2 and pisp_fe reg_write() functions, but use
    the 'irq' variants to avoid spamming in normal situation.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: csi2: Track CSI-2 errors
    
    Track the errors from the CSI-2 receiver: overflows and discards. These
    are recorded in a table which can be read by the userspace via debugfs.
    
    As tracking the errors may cause much more interrupt load, the tracking
    needs to be enabled with a module parameter.
    
    Note that the recording is not perfect: we only record the last
    discarded DT for each discard type, instead of recording all of them.
    This means that e.g. if the device is discarding two unmatched DTs, the
    debugfs file only shows the last one recorded. Recording all of them
    would need a more sophisticated recording system to avoid the need of a
    very large table, or dynamic allocation.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: csi2: Set values for enum csi2_mode
    
    Set hardcoded values for enum csi2_mode, as the values will be
    programmed to HW registers.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    
    media: rp1: fe: Fix default mbus code
    
    When pisp_fe_pad_set_fmt() is given an mbus code that CFE does not
    support, it currently defaults to MEDIA_BUS_FMT_SBGGR10_1X10. This is
    not correct, as FE does not support SBGGR10.
    
    Set the default to MEDIA_BUS_FMT_SRGGB16_1X16 instead.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    af4e018 View commit details
    Browse the repository at this point in the history
  55. dt-bindings: net: cdns,macb: AXI tuning properties

    Add optional properties to tune the AXI interface -
    cdns,aw2w-max-pipe, cdns,ar2r-max-pipe and cdns,use-aw2b-fill.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    bbd5844 View commit details
    Browse the repository at this point in the history
  56. hwmon: Add RP1 ADC and temperature driver

    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    76b10ea View commit details
    Browse the repository at this point in the history
  57. mfd: bcm2835-pm: Add support for BCM2712

    BCM2712 lacks the "asb" and "rpivid_asb" register ranges, but still
    requires the use of the bcm2835-power driver to reset the V3D block.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    78fda0f View commit details
    Browse the repository at this point in the history
  58. soc: bcm: bcm2835-power: Add support for BCM2712

    BCM2712 has a PM block but neither ASB nor RPIVID_ASB. Use the absence
    of the "asb" register range to indicate BCM2712 and its different PM
    register range.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    6d8c8c5 View commit details
    Browse the repository at this point in the history
  59. spi: gpio: Fix spi-gpio to correctly implement sck-idle-input

    Formerly, if configured using DT, CS GPIOs were driven from spi.c
    and it was possible for CS to be asserted (low) *before* starting
    to drive SCK. CS GPIOs have been brought under control of this
    driver in both ACPI and DT cases, with a fixup for GPIO polarity.
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    njhollinghurst authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    dabb01d View commit details
    Browse the repository at this point in the history
  60. spi: spi-gpio: Implement spidelay when requested bit rate <= 1 Mbps

    Formerly the delay was omitted as bit-banged SPI seldom achieved
    even one Mbit/s; but some modern platforms can run faster, and
    some SPI devices may need to be clocked slower.
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    njhollinghurst authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    9fef5cc View commit details
    Browse the repository at this point in the history
  61. drm/v3d: fix up register addresses for V3D 7.x

    v2: fix kernel panic with debug-fs interface to list registers
    itoral authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    3656c28 View commit details
    Browse the repository at this point in the history
  62. drm/v3d: update UAPI to match user-space for V3D 7.x

    V3D t.x takes a new parameter to configure TFU jobs that needs
    to be provided by user space.
    itoral authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    123e584 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    8025664 View commit details
    Browse the repository at this point in the history
  64. drm/v3d: Improve MMU support for larger pages

    The built-in MMU driver went most of the way towards supporting larger
    kernel pages, but dropped the ball when it comes to calculating indexes
    into the page table. Fix it.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5a7e924 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    0861f82 View commit details
    Browse the repository at this point in the history
  66. drivers: hwmon: rp1-adc: check conversion validity before supplying v…

    …alue
    
    The SAR ADC architecture may complete a conversion but instability in the
    comparator can corrupt the result. Such corruption is signalled in the CS
    ERR bit, asserted alongside each conversion result.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    961be99 View commit details
    Browse the repository at this point in the history
  67. dmaengine: bcm2835: Add BCM2712 support

    BCM2712 has 6 40-bit channels - DMA6 to DMA11. Add a new compatible
    string to indicate that the current platform is BCM2712.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    49c4ed1 View commit details
    Browse the repository at this point in the history
  68. dmaengine: bcm2835: HACK: Support DMA-Lite channels

    The BCM2712 has a DMA-Lite controller that is basically a BCM2835-style
    DMA controller that supports 40 bits DMA addresses.
    
    We need it for HDMI audio to work, but this breaks BCM2835-38 so we
    should rework this later.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    
    dmaengine: bcm2835: Fix dma driver for BCM2835-38
    
    The previous commit broke support on older devices.
    Make the breaking parts of patch conditional on
    the device being used.
    
    Fixes: 6e1856ac7c39 ("dmaengine: bcm2835: HACK: Support DMA-Lite channels")
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    49daf2c View commit details
    Browse the repository at this point in the history
  69. clk: bcm: rpi: Add disp clock

    BCM2712 has an extra clock exposed by the firmware called DISP, and used
    by (at least) the HVS. Let's add it to the list of clocks to register in
    Linux.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    b2dd0e7 View commit details
    Browse the repository at this point in the history
  70. net: phy: broadcom: optionally enable link-down powersave based on DT

    It's really a function of the board whether or not to use this feature
    as it may require MAC compatibility as well as interop testing.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    abe6459 View commit details
    Browse the repository at this point in the history
  71. dmaengine: bcm2835: Rename to_bcm2711_cbaddr to to_40bit_cbaddr

    As the shifted address also applies to bcm2712,
    give the function a more specific name.
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7f2ad8c View commit details
    Browse the repository at this point in the history
  72. drivers: iommu: Add BCM2712 IOMMU

    Add a driver for BCM2712 IOMMUs.
    There is a small driver for the Shared IOMMU TLB Cache.
    Each IOMMU instance is a separate device.
    
    IOMMUs are set up with a "pass-through" range covering
    the lowest 40BGytes (which should cover all of SDRAM)
    for the benefit of non-IOMMU-aware devices that share
    a physical IOMMU; and translation for addresses in the
    range 40GB to 42GB.
    
    An optional parameter adds a DMA offset (which otherwise
    would be lost?) to virtual addresses for DMA masters on a
    bus such as PCIe.
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    njhollinghurst authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8f346ab View commit details
    Browse the repository at this point in the history
  73. irqchip/irq-brcmstb-l2: Add config for 2711 controller

    We currently see these regularly:
    [   25.157560] irq 31, desc: 00000000c15e6d2c, depth: 0, count: 0, unhandled: 0
    [   25.164658] ->handle_irq():  00000000b1775675, brcmstb_l2_intc_irq_handle+0x0/0x1a8
    [   25.172352] ->irq_data.chip(): 00000000fea59f1c, gic_chip_mode1+0x0/0x108
    [   25.179166] ->action(): 000000003eda6d6f
    [   25.183096] ->action->handler(): 000000002c09e646, bad_chained_irq+0x0/0x58
    [   25.190084]      IRQ_LEVEL set
    [   25.193142]    IRQ_NOPROBE set
    [   25.196198]  IRQ_NOREQUEST set
    [   25.199255]   IRQ_NOTHREAD set
    
    with:
    $ cat /proc/interrupts  | grep 31:
     31:          1          0          0          0     GICv2 129 Level     (null)
    
    The interrupt is described in DT with IRQ_TYPE_LEVEL_HIGH
    
    But the current compatible string uses the controller in edge triggered mode
    (as that config matches our register layout).
    
    Add a new compatible structure for level driven interrupt with our register layout.
    
    We had already been using this compatible string in device tree, so no change needed
    there.
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7899ed5 View commit details
    Browse the repository at this point in the history
  74. rtc: rtc-rpi: Add simple RTC driver for Raspberry Pi

    This supports setting and reading the real time clock
    and supports wakeup alarms.
    
    To support wake up alarms you want this bootloader config:
     POWER_OFF_ON_HALT=1
     WAKE_ON_GPIO=0
    
    You can test with:
      echo +600 | sudo tee /sys/class/rtc/rtc0/wakealarm
      sudo halt
    
    That will halt (in an almost no power state),
    then wake and restart after 10 minutes.
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a575f33 View commit details
    Browse the repository at this point in the history
  75. dt-bindings: rtc: new binding for Raspberry Pi RTC driver

    Add binding for the new RTC driver for Raspberry Pi.
    This platform has an RTC managed by firmware, and this RTC
    driver provides the simple mailbox interface to access it.
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    c5664d6 View commit details
    Browse the repository at this point in the history
  76. hwmon: (pwm-fan) Add fan speed register support

    Some platforms include a fan-speed register that reports RPM directly
    as an alternative to counting interrupts from the fan tachometer input.
    Add support for reading a register at a given offset (rpm-offset) within
    a block declared in another node (rpm-regmap). This indirection allows
    the usual address mapping to be performed, and for address sharing with
    another driver.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    84f5625 View commit details
    Browse the repository at this point in the history
  77. dt: bindings: update rpi-rtc binding

    Add property for bcm2712 firmware RTC driver charger control
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    c4cf99e View commit details
    Browse the repository at this point in the history
  78. drivers: rtc-rpi: add battery charge circuit control and readback

    Parse devicetree for a charger voltage and apply it. If nonzero and a
    valid voltage, the firmware will enable charging, otherwise the charger
    circuit is disabled.
    
    Add sysfs attributes to read back the supported charge voltage range,
    the measured battery voltage, and the charger setpoint.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    0115338 View commit details
    Browse the repository at this point in the history
  79. vc4_drv: Avoid panic when booted with no kms

    If kms/fkms overlay is not present we have no matching drivers
    and so match is NULL.
    
    It is not safe to call component_master_add_with_match with a null match argument.
    
    So don't do that
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    732e553 View commit details
    Browse the repository at this point in the history
  80. drm/vc4: Treat zero sized destination as full screen

    Kodi video planes come through with all zeros for fullscreen
    Without this check, we WARN when writing width-1, height-1
    to destination dlist
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    393bde0 View commit details
    Browse the repository at this point in the history
  81. drm/vc4: hdmi: Enable the audio clock

    The audio clock is used by the HDMI controller driver and we were using
    it to get its audio rate and compute the dividers needed to reach a
    given audio sample rate.
    
    However, we were never enabling it, which was resulting in lockups on
    the BCM2712.
    
    Fixes: 632ee3a ("drm/vc4: hdmi: Add audio-related callbacks")
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    01e8a0b View commit details
    Browse the repository at this point in the history
  82. drm/vc4: hdmi: Warn if writing to an unknown HDMI register

    The VC4 HDMI driver has a bunch of accessors to read from a register.
    The read accessor was warning when accessing an unknown register, but
    the write one was just returning silently.
    
    Let's make sure we warn also when writing to an unknown register.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    9116d40 View commit details
    Browse the repository at this point in the history
  83. drm/vc4: hvs: More logging for dlist generation

    DLIST generation can get pretty tricky and there's not a lot of debug in
    the driver to help. Let's add a few more to track the generated DLIST
    size.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    42be254 View commit details
    Browse the repository at this point in the history
  84. drm/vc4: hvs: Print error if we fail an allocation

    We need to allocate a few additional structures when checking our
    atomic_state, especially related to hardware SRAM that will hold the
    plane descriptors (DLIST) and the current line context (LBM) during
    composition.
    
    Since those allocation can fail, let's add some error message in that
    case to help debug what goes wrong.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ba0ebe2 View commit details
    Browse the repository at this point in the history
  85. drm/vc4: plane: Add more debugging for LBM allocation

    LBM allocations need a different size depending on the line length,
    format, etc.
    
    This can get tricky, and fail. Let's add some more prints to ease the
    debugging when it does.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    eeeb910 View commit details
    Browse the repository at this point in the history
  86. drm/vc4: plane: Use return variable in atomic_check

    The vc4_plane_atomic_check() directly returns the result of the final
    function it calls.
    
    Using the already defined ret variable to check its content on error,
    and a separate return 0 on success, makes it easier to extend.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    e9867d6 View commit details
    Browse the repository at this point in the history
  87. drm/vc4: crtc: Move assigned_channel to a variable

    We access multiple times the vc4_crtc_state->assigned_channel variable
    in the vc4_crtc_get_scanout_position() function, so let's store it in a
    local variable.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    217c118 View commit details
    Browse the repository at this point in the history
  88. drm/vc4: Introduce generation number enum

    With the introduction of the BCM2712 support, we will get yet another
    generation of display engine to support.
    
    The binary check of whether it's VC5 or not thus doesn't work anymore,
    especially since some parts of the driver will have changed with BCM2711,
    and some others with BCM2712.
    
    Let's introduce an enum to store the generation the driver is running
    on, which should provide more flexibility.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    39d0f70 View commit details
    Browse the repository at this point in the history
  89. drm/vc4: Make v3d paths unavailable on any generation newer than vc4

    The V3D IP has been separate since BCM2711, so let's make sure we issue
    a WARN if we're running not only on BCM2711, but also anything newer.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    09a21ef View commit details
    Browse the repository at this point in the history
  90. drm/vc4: hvs: Use switch statement to simplify vc4_hvs_get_fifo_from_…

    …output
    
    Since we'll support BCM2712 soon, let's move the logic behind
    vc4_hvs_get_fifo_from_output() to a switch to extend it more easily.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    6c8472f View commit details
    Browse the repository at this point in the history
  91. drm/vc4: hvs: Use switch statement to simplify enabling/disabling irq

    Since we'll support BCM2712 soon, let's move the logic to enable and
    disable the end-of-frame interrupts to a switch to extend it more
    easily.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f0c6f1a View commit details
    Browse the repository at this point in the history
  92. drm/vc4: hvs: Test if the EOF interrupts are enabled

    We currently enable the EOF interrupts through the CRTC destroy_state
    implementation.
    
    However, nothing guarantees that we can't call destroy_state multiple
    times in a row, and therefore before the EOF interrupt even happens.
    
    This means we would enable the interrupt multiple times but disable it
    only once. It wasn't an issue so far since the interrupts were only
    enabled by setting a bit in a register, but with BCM2712 we will use an
    external interrupt controller, with a refcounted interrupt.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7cf705f View commit details
    Browse the repository at this point in the history
  93. drm/vc4: hvs: Create hw_init function

    Since the BCM2712 will feature a significantly different HVS, let's move
    the hardware initialisation part of our bind function into a separate
    function.
    
    That way, it will be easier to extend in the future.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5fb7099 View commit details
    Browse the repository at this point in the history
  94. drm/vc4: hvs: Create cob_init function

    Just like the HVS itself, the COB parameters will be fairly different in
    the BCM2712.
    
    Let's move the COB parameters computation and its initialisation to a
    separate function that will be easier to extend in the future.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ac74c31 View commit details
    Browse the repository at this point in the history
  95. drm/vc4: hvs: Rename hvs_regs list

    The HVS register set has been heavily modified in the BCM2712, and we'll
    thus need a separate debugfs_reg32 array for it.
    
    The name hvs_regs is thus a bit too generic, so let's rename it to
    something more specific.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    1c2ed0e View commit details
    Browse the repository at this point in the history
  96. drm/vc4: plane: Change ptr0_offset to an array

    The BCM2712 will have a fairly different dlist, that will feature one
    Pointer 0 word for each plane.
    
    Let's prepare by changing the ptr0_offset variable that holds the offset
    in a dlist of the pointer 0 word to an array.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a9d818e View commit details
    Browse the repository at this point in the history
  97. drm/vc4: hvs: Rework LBM alignment

    With the introduction of the support for BCM2712, the check of whether
    we're running on vc5 or not to compute the LBM alignment requirement
    doesn't work anymore.
    
    Moreover, the LBM size will need to be computed in words for the
    BCM2712, while we've had sizes in bytes so far.
    
    Aligning on either 64 or 32 words is thus fairly harmful on BCM2712, so
    let's just explicitly align the size when needed, and then call
    drm_mm_insert_node_generic() with an alignment of 1.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    94a04ea View commit details
    Browse the repository at this point in the history
  98. drm/vc4: hvs: Change prototype of __vc4_hvs_alloc to pass registers

    The BCM2712 HVS has registers to report the size of the various SRAM the
    driver uses, and their size actually differ depending on the stepping.
    
    The initialisation of the memory pools happen in the __vc4_hvs_alloc()
    function that also allocates the main HVS structure, that will then hold
    the pointer to the memory mapping of the registers.
    
    This creates some kind of circular dependency that we can break by
    passing the mapping pointer as an argument for __vc4_hvs_alloc() to use
    to query to get the SRAM sizes and initialise the memory pools
    accordingly.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    15cb0f9 View commit details
    Browse the repository at this point in the history
  99. drm/vc4: UV planes vertical scaling must always be enabled

    It has been observed that a YUV422 unity scaled plane isn't displayed.
    Enabling vertical scaling on the UV planes solves this. There is
    already a similar clause to always enable horizontal scaling on the
    UV planes.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a9da388 View commit details
    Browse the repository at this point in the history
  100. drm/vc4: hdmi: Avoid hang with debug registers when suspended

    Trying to read /sys/kernel/debug/dri/1/hdmi1_regs
    when the hdmi is disconnected results in a fatal system hang.
    
    This is due to the pm suspend code disabling the dvp clock.
    That is just a gate of the 108MHz clock in DVP_HT_RPI_MISC_CONFIG,
    which results in accesses hanging AXI bus.
    
    Protect against this.
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    16673da View commit details
    Browse the repository at this point in the history
  101. drm/vc4: Move the buffer offset out of the vc4_plane_state

    The offset fields in vc4_plane_state are described as being
    the offset for each buffer in the bo, however it is used to
    store the complete DMA address that is then written into the
    register.
    
    The DMA address including the fb ofset  can be retrieved
    using drm_fb_dma_get_gem_addr, and the offset adjustment due to
    clipping is local to vc4_plane_mode_set.
    Drop the offset field from the state, and compute the complete
    DMA address in vc4_plane_mode_set.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    90b6881 View commit details
    Browse the repository at this point in the history
  102. drm/vc4: Fix dlist debug not resetting the next entry pointer

    The debug function to display the dlists didn't reset next_entry_start
    when starting each display, so resulting in not stopping the
    list at the correct place.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5d9a7b6 View commit details
    Browse the repository at this point in the history
  103. drm: vc4: Remove incorrect limit from hvs_dlist debugfs function

    The debugfs function to dump dlists aborted at 256 bytes,
    when actually the dlist memory is generally significantly
    larger but varies based on SoC.
    
    We already have the correct limit in __vc4_hvs_alloc, so
    store it for use in the debugfs dlist function.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    3c66e30 View commit details
    Browse the repository at this point in the history
  104. drm/vc4: hvs: Remove ABORT_ON_EMPTY flag

    ABORT_ON_EMPTY chooses whether the HVS abandons the current frame
    when it experiences an underflow, or attempts to continue.
    
    In theory the frame should be black from the point of underflow,
    compared to a shift of sebsequent pixels to the left.
    
    Unfortunately it seems to put the HVS is a bad state where it is not
    possible to recover simply. This typically requires a reboot
    following the 'flip done timed out message'.
    
    Discussion with Broadcom has suggested we don't use this flag.
    All their testing is done with it disabled.
    
    Additionally setting BLANK_INSERT_EN causes the HDMI to output
    blank pixels on an underflow which avoids it losing sync.
    
    After this change a 'flip done timed out' due to sdram bandwidth
    starvation or too low a clock is recoverable once the situation improves.
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    70c9c95 View commit details
    Browse the repository at this point in the history
  105. drm/vc4: Enable SCALER_CONTROL early in HVS init

    Always enable SCALER_CONTROL before attempting other HVS
    operations. It's safe to write to some parts of the HVS but
    in general it's dangerous to do this because it can cause bus
    lockups.
    
    Signed-off-by: Tim Gover <tim.gover@raspberrypi.com>
    timg236 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    2facb3f View commit details
    Browse the repository at this point in the history
  106. dt-bindings: display: Add BCM2712 HDMI bindings

    The BCM2712 HDMI controller uses a slightly different HDMI controller
    than the BCM2711, and a completely different PHY.
    
    Let's introduce a new compatible for it.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    0abe0e0 View commit details
    Browse the repository at this point in the history
  107. dt-bindings: display: Add BCM2712 HVS bindings

    The BCM2712 has a completely different HVS than the previous
    generations, so let's add a new compatible for it.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    3ce7e27 View commit details
    Browse the repository at this point in the history
  108. dt-bindings: display: Add BCM2712 PixelValve bindings

    The BCM2712 has 3 different pixelvalves that are similar to the ones
    found in the previous generations but with slightly different
    capabilities.
    
    Express that using a new set of compatibles.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    2db7b3b View commit details
    Browse the repository at this point in the history
  109. dt-bindings: display: Add BCM2712 MOP bindings

    The BCM2712 has a MOP controller which is basically a new revision of
    the TXP.
    
    Express that by adding a new compatible for it.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    6a2c03c View commit details
    Browse the repository at this point in the history
  110. dt-bindings: display: Add BCM2712 MOPLET bindings

    The BCM2712 has a MOPLET controller which is basically a TXP without the
    transpose feature.
    
    Express that by adding a new compatible for it.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a674020 View commit details
    Browse the repository at this point in the history
  111. dt-bindings: display: Add BCM2712 KMS driver bindings

    The BCM2712 SoC comes with a new variation of the videocore display
    pipeline. Let's create a new compatible for it.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    9a99c7b View commit details
    Browse the repository at this point in the history
  112. drm/vc4: drv: Support BCM2712

    The BCM2712 has an improved display pipeline, most notably with a
    different HVS and only HDMI and writeback outputs.
    
    Let's introduce it as a new VideoCore generation and compatible.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    dfb2fb1 View commit details
    Browse the repository at this point in the history
  113. drm/vc4: hvs: Support BCM2712 HVS

    The HVS found in the BCM2712, while having a similar role, is very
    different from the one found in the previous SoCs. Indeed, the register
    layout is fairly different, and the DLIST format is new as well.
    
    Let's introduce the needed functions to support the new HVS.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8b24a5f View commit details
    Browse the repository at this point in the history
  114. drm/vc4: crtc: Add support for BCM2712 PixelValves

    The PixelValves found on the BCM2712 are similar to the ones found in
    the previous generation.
    
    Compared to BCM2711, the pixelvalves only drive one HDMI controller each
    and HDMI1 PixelValve has a FIFO long enough to support 4k at 60Hz.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4336f48 View commit details
    Browse the repository at this point in the history
  115. drm/vc4: hdmi: Add support for BCM2712 HDMI controllers

    The HDMI controllers found in the BCM2712 are largely the ones found in
    the BCM2711 with a different PHY.
    
    There's some difference with how timings are split between registers,
    and HDMI1 is now able to run at 4k/60Hz.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    b62e6b8 View commit details
    Browse the repository at this point in the history
  116. drm/vc4: txp: Introduce structure to deal with revision differences

    The BCM2712 will have several TXP with small differences. Let's add a
    structure tied to the compatible to deal with those differences.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d7c73c4 View commit details
    Browse the repository at this point in the history
  117. drm/vc4: txp: Rename TXP data structure

    The TXP data structure has a name too generic for the multiple variants
    we'll have to support. Let's rename it to mention the SoC it applies to.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    392a9af View commit details
    Browse the repository at this point in the history
  118. drm/vc4: txp: Add byte enable toggle bit

    The MOPLET doesn't have the BYTE_ENABLE field to set, but the TXP and
    MOP do, so let's add a boolean to control whether or not we need to set
    it.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    de3bb4d View commit details
    Browse the repository at this point in the history
  119. drm/vc4: txp: Add horizontal and vertical size offset toggle bit

    The new writeback controllers that can be found on the BCM2712 require
    to have their horizontal and vertical size reduced by one.
    
    Let's tie that behaviour to the compatible so we can support both the
    new and old controllers.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    060ad4e View commit details
    Browse the repository at this point in the history
  120. drm/vc4: txp: Handle 40-bits DMA Addresses

    The BCM2712 MOP and MOPLET can handle addresses larger than 32bits
    through an extra register. We can easily support it and make it
    conditional based on the compatible through a boolean in our variant
    structure.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    1a2be0b View commit details
    Browse the repository at this point in the history
  121. drm/vc4: txp: Move the encoder type in the variant structure

    We'll have multiple TXP instances in the BCM2712, so we can't use a
    single encoder type anymore. Let's tie the encoder type to the
    compatible.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    81a7d5e View commit details
    Browse the repository at this point in the history
  122. drm/vc4: txp: Add a new TXP encoder type

    Starting with BCM2712, we'll have a two TXP. Let's follow the HDMI
    example and add two encoder types for TXP: TXP0 and TXP1.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5a2f79b View commit details
    Browse the repository at this point in the history
  123. drm/vc4: txp: Add support for BCM2712 MOP

    The BCM2712 has an evolution of what used to be called TXP in the
    earlier SoCs, but is now called MOP.
    
    There's a few differences still, so we can add a new compatible to deal
    with them easily.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ff2c517 View commit details
    Browse the repository at this point in the history
  124. drm/vc4: txp: Add BCM2712 MOPLET support

    The BCM2712 features a simpler TXP called MOPLET. Let's add support for
    it.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4593c7c View commit details
    Browse the repository at this point in the history
  125. drm/vc4: Add additional warn_on

    Some code path in vc4 are conditional to a generation and cannot be
    executed on others. Let's put a WARN_ON if that ever happens.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4b0b573 View commit details
    Browse the repository at this point in the history
  126. drm/vc4: tests: Switch generation mockup to a switch

    Testing whether the VideoCore generation we want to mock is vc5 or vc4
    worked so far, but will be difficult to extend to support BCM2712 (VC6).
    
    Convert to a switch.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    eef55d1 View commit details
    Browse the repository at this point in the history
  127. drm/vc4: tests: Drop drm parameter for vc4_find_crtc_for_encoder

    The DRM device pointer and the DRM encoder pointer are redundant, since
    the latter is attached to the former and we can just follow the
    drm_encoder->dev pointer.
    
    Let's remove the drm_device pointer argument.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    44d4eb7 View commit details
    Browse the repository at this point in the history
  128. drm/vc4: tests: Return the allocated output

    Some tests will need to retrieve the output that was just allocated by
    vc4_mock_atomic_add_output().
    
    Instead of making them look them up in the DRM device, we can simply
    make vc4_mock_atomic_add_output() return an error pointer that holds the
    allocated output instead of the error code.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    2255197 View commit details
    Browse the repository at this point in the history
  129. drm/vc4: tests: Add BCM2712 mock driver

    The BCM2712 has a simpler pipeline that can only output to a writeback
    connector and two HDMI controllers.
    
    Let's allow our kunit tests to create a mock of that pipeline.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5656bb4 View commit details
    Browse the repository at this point in the history
  130. drm/vc4: tests: Add tests for BCM2712 PixelValve Muxing

    The BCM2712 has a simpler pipeline than the BCM2711, and thus the muxing
    requirements are different. Create some tests to make sure we get proper
    muxing decisions.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7018b30 View commit details
    Browse the repository at this point in the history
  131. drm/vc4: tests: Use custom plane state for mock

    The current mock planes were just using the regular drm_plane_state,
    while the driver expect struct vc4_plane_state that subclasses
    drm_plane_state.
    
    Hook the proper implementations of reset, duplicate_state, destroy and
    atomic_check to create vc4_plane_state.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    2ba26aa View commit details
    Browse the repository at this point in the history
  132. drm/vc4: tests: Add function to lookup a plane for a CRTC

    Some tests will need to find a plane to run a test on for a given CRTC.
    Let's create a small helper to do that.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f5342ac View commit details
    Browse the repository at this point in the history
  133. drm/vc4: tests: Add helper to add a new plane to a state

    We'll start to add some tests for the plane state logic, so let's create
    a helper to add a plane to an existing atomic state.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    202480d View commit details
    Browse the repository at this point in the history
  134. drm/vc4: tests: Support a few more plane formats

    We'll start testing our planes code in situations where we will use more
    than XRGB8888, so let's add a few common pixel formats.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    b629f3a View commit details
    Browse the repository at this point in the history
  135. drm/vc4: tests: Introduce a test for LBM buffer size

    The BCM2712 comes with a different LBM size computation than the
    previous generations, so let's add the few examples provided as kunit
    tests to make sure we always satisfy those requirements.
    
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    mripard authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5196f7c View commit details
    Browse the repository at this point in the history
  136. drm/vc4: kms: Avoid setting core and disp clocks for hdmi modes

    On 2712, the firmware always runs these clock at a speed sufficient
    for dual 4kp60.
    
    The requests here prevent the gpu from going into its lowest voltage
    mode, so just skip the clock requests.
    
    With this applied the idle voltage on my pi 5 reduces from 0.7424V
    to 0.72V.
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8a26ff2 View commit details
    Browse the repository at this point in the history
  137. drm/vc4: Assign LBM memory during atomic_flush.

    Avoid double buffering LBM allocations by making the
    allocation a single alloc per crtc at atomic_flush.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8eaaeab View commit details
    Browse the repository at this point in the history
  138. drm/panel: simple: Alter the timing for the Pi 7" DSI display

    vc4 has always fixed up the timing, so the values defined have
    never actually appeared on the wire.
    The display appears to want a slightly longer HFP, so extend
    the timings and recompute the clock to give the same frame rate.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    19ca97c View commit details
    Browse the repository at this point in the history
  139. drm/panel: waveshare: Fix up timings for 10.1" panel

    The 10.1" panel doesn't work with the timings defined. vc4
    will always have been fixing up the timing due to the limited
    integer divider, so compute the fixed up mode and use it
    directly.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f40cdd2 View commit details
    Browse the repository at this point in the history
  140. media: i2c: imx477: Fix locking in imx477_init_controls()

    The driver does not lock the imx477 mutex when calling
    imx477_set_framing_limits(), leading to:
    
    WARNING: CPU: 3 PID: 426 at drivers/media/v4l2-core/v4l2-ctrls-api.c:934 __v4l2_ctrl_modify_range+0x1a0/0x210 [
    videodev]
    
    Fix this by taking the lock.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    20e6ef3 View commit details
    Browse the repository at this point in the history
  141. media: i2c: Move Kconfig entry for IMX477 to the camera sensor section

    It was accidentally placed in the audio decoder section.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7492f50 View commit details
    Browse the repository at this point in the history
  142. drm: Look for an alias for the displays to use as the DRM device name

    Allow DT aliases of eg DSI2 to force make DRM allocate the
    display with the requested name.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ee5e081 View commit details
    Browse the repository at this point in the history
  143. vc4/drm: Remove the clear of SCALER_DISPBKGND_FILL

    Since "drm/vc4: hvs: Support BCM2712 HVS" booting Pi4
    with dual 4kp30 displays connected fails with:
    vc4-drm gpu: [drm] *ERROR* [CRTC:107:pixelvalve-4] flip_done timed out
    
    It has been tracked down to the referenced commit adding a
    path to clear the SCALER_DISPBKGND_FILL when not required.
    
    Dual 4kp30 works with a core clock of 297MHz when background fill
    is enabled, but requires a higher value with it disabled.
    320MHz still fails, while 330MHz seems okay.
    
    Lets always enable background fill for Pi0-4.
    
    Fixes: e84da23 ("drm/vc4: hvs: Support BCM2712 HVS")
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    db06ce5 View commit details
    Browse the repository at this point in the history
  144. gpio: brcmstb: Use dynamic GPIO base numbers

    Forcing a gpiochip to have a fixed base number now leads to a warning
    message. Remove the need to do so by calculating hwirq numbers based
    on bank numbers.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    Fixes: 3b0213d ("gpio: Add GPIO support for Broadcom STB SoCs")
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f16c7b6 View commit details
    Browse the repository at this point in the history
  145. media: i2c: ov9282: Read chip ID via 2 reads

    Vision Components have made an OV9281 module which blocks reading
    back the majority of registers to comply with NDAs, and in doing
    so doesn't allow auto-increment register reading as used when
    reading the chip ID.
    
    Use two reads and manually combine the results.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    22ab911 View commit details
    Browse the repository at this point in the history
  146. media/rpivid: Allow use of iommu in rpivid

    In order to use iommu on hevc set dma mask_and_coherent in probe.
    I am assured dma_set_mask_and_coherent is benign on Pi4 (which has
    no iommu) and it seems to be so in practice.
    Also adds a bit of debug to make internal buffer allocation failure
    easier to spot in future
    
    Signed-off-by: John Cox <jc@kynesim.co.uk>
    jc-kynesim authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    bcbb9ff View commit details
    Browse the repository at this point in the history
  147. vc04_services: bcm2835-codec: Correct alignment requirements for YUYV

    The firmware wants the YUYV format stride alignment to be to a multiple
    of 32pixels / 64 bytes. The kernel driver was configuring it to a multiple
    of 16 pixels / 32 bytes, which then failed when it tried starting to
    stream.
    
    Correct the alignment requirements.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    afebddf View commit details
    Browse the repository at this point in the history
  148. vc_mem: Add the DMA memcpy support from bcm2708_fb

    bcm2708_fb is disabled by the vc4-kms-v3d overlay, which means that the
    DMA memcpy support it provides is not available to allow vclog to read
    the VC logs from the top 16MB on Pi 2 and Pi 3. Add the code to the
    vc_mem driver, which will still be enabled.
    
    It ought to be possible to do a proper DMA_MEM_TO_MEM copy via the
    generic DMA customer API, but that can be a later step.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    681fb64 View commit details
    Browse the repository at this point in the history
  149. drm/vc4: Correct address offset for planes with src_[xy] offsets

    11cf37e switched to using drm_fb_dma_get_gem_addr instead of
    drm_fb_dma_get_gem_obj and adding fb->offset[].
    
    However the tiled formats need to compute the offset in a more
    involved manner than drm_fb_dma_get_gem_addr applies, and we
    were ending up with the offset for src_[xy] being applied twice.
    
    Switch back to using drm_fb_dma_get_gem_obj and fully computing
    the offsets ourselves.
    
    Fixes: 11cf37e ("drm/vc4: Move the buffer offset out of the vc4_plane_state")
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    603213b View commit details
    Browse the repository at this point in the history
  150. fbdev: Allow client to request a particular /dev/fbN node

    Add a flag custom_fb_num to denote that the client has
    requested a specific fbdev node number via node.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    eb29152 View commit details
    Browse the repository at this point in the history
  151. drm/fb-helper: Look up preferred fbdev node number from DT

    For situations where there are multiple DRM cards in a system,
    add a query of DT for "drm_fb" designations for cards to set
    their preferred /dev/fbN designation.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4ff5621 View commit details
    Browse the repository at this point in the history
  152. drm/connector: Change DRM card alias from underscore to hyphen

    Apparently aliases are only allowed lower case and hyphens,
    so swap the use of underscore to hyphen.
    
    Fixes: 3aa1f24 ("drm: Look for an alias for the displays to use as the DRM device name")
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7ff6f59 View commit details
    Browse the repository at this point in the history
  153. drm/fb_helper: Change query for FB designation from drm_fb to drm-fb

    Fixes: 1216ea5 ("drm/fb-helper: Look up preferred fbdev node number from DT")
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a83432d View commit details
    Browse the repository at this point in the history
  154. drivers: media: imx477: Disable the scaler

    The horizontal scaler was enabled for the 2028x1520 and 2028x1080 modes,
    with a scale factor of 1. It caused a single column of bad pixels on the
    right edge of the image. Since scaling is not needed for these modes,
    disable it entirely.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    2d0dbb8 View commit details
    Browse the repository at this point in the history
  155. dt-bindings: PCI: brcmstb: add optional property - "brcm,tperst-clk-ms"

    This property can be used to delay deassertion of external fundamental
    reset, which may be useful for endpoints that require an extended time for
    internal setup to complete.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    b1e3a86 View commit details
    Browse the repository at this point in the history
  156. PCI: brcmstb: Change RCB_{MPS,64B}_MODE bits

    Upstream commit [1] unconditionally sets the RCB_MPS and RCB_64B bits
    that govern where packets are split. We think this is potentially
    harmful, particularly on CM4 and Pi 5 where potentially any PCIe devices
    could be attached.
    
    Make RCB_MPS conditional on a DT property and never set RCB_64B.
    
    [1] commit 602fb86 ("PCI: brcmstb: Set RCB_{MPS,64B}_MODE bits")
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ea2bac0 View commit details
    Browse the repository at this point in the history
  157. drivers: pci: brcmstb: optionally extend Tperst_clk time during link-up

    The RC has a feature that allows for manual control over the deassertion
    of the PERST# output pin, which allows the time between refclk active
    and reset deassert at the EP to be increased.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    16c1522 View commit details
    Browse the repository at this point in the history
  158. drivers: media: imx477: Set horizontal binning when disabling the scaler

    The horizontal scaler has been disabled but actually the sensor is not
    binning horizontally, resulting in images that are stretched 2x
    horizontally (missing the right half of the field of view completely).
    
    Therefore we must additionally set the horizontal binning mode. There
    is only marginal change in output quality and noise levels.
    
    Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
    Fixes: f075893 ("drivers: media: imx477: Disable the scaler")
    davidplowman authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    c143717 View commit details
    Browse the repository at this point in the history
  159. drivers: media: imx477: Add V4L2_CID_LINK_FREQ control

    Add V4L2_CID_LINK_FREQ as a read-only control with a value of 450 Mhz.
    This will be used by the CFE driver to corretly setup the DPHY timing
    parameters in the CSI-2 block.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5ce8e5f View commit details
    Browse the repository at this point in the history
  160. drivers: media: imx477: Correctly set IMX477_PIXEL_RATE as a r/o control

    This control is meant to be read-only, mark it as such.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    dde9d51 View commit details
    Browse the repository at this point in the history
  161. drm/vc4: Correct logic on stopping an HVS channel

    When factoring out __vc4_hvs_stop_channel, the logic got inverted from
    	if (condition)
    	  // stop channel
    to
    	if (condition)
    	  goto out
    	//stop channel
    	out:
    and also changed the exact register writes used to stop the channel.
    
    Correct the logic so that the channel is actually stopped, and revert
    to the original register writes.
    
    Fixes: 6d01a10 ("drm/vc4: crtc: Move HVS init and close to a function")
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    430a31a View commit details
    Browse the repository at this point in the history
  162. drm/vc4: Drop WARN for HVS FIFOs not being empty

    The reset condition for the EMPTY flag in DISPSTATx is 0,
    so seeing as we've just reset the pipeline there is no
    guarantee that the flag will denote empty if it hasn't been
    enabled.
    
    Drop the WARN.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    c48a80a View commit details
    Browse the repository at this point in the history
  163. drm/vc4: Free all stale dlists if channel is disabled

    The code handling freeing stale dlists had 2 issues:
    - it disabled the interrupt as soon as the first EOF interrupt
      occurred, even if it didn't clear all stale allocations, thus
      leading to stale entries
    - It didn't free stale entries from disabled channels, so eg
      "kmstest -c 0" could leave a stale alloc on channel 1 floating
      around.
    
    Keep the interrupt enabled whilst there are any outstanding
    allocs, and discard those on disabled channels. This second
    channel does require us to call vc4_hvs_stop_channel from
    vc4_crtc_atomic_disable so that the channel actually gets stopped.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7469e7c View commit details
    Browse the repository at this point in the history
  164. drm/vc4: Add hvs_dlist_allocs debugfs function.

    Users are reporting running out of DLIST memory. Add a
    debugfs file to dump out all the allocations.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4b16f0b View commit details
    Browse the repository at this point in the history
  165. drm/vc4: Log the size of the dlist allocation that was attempted

    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    950a8a8 View commit details
    Browse the repository at this point in the history
  166. drm/vc4: crtc: Support odd horizontal timings on BCM2712

    BCM2711 runs pixelvalve at two pixels per clock cycle which results
    in an unfortunate limitation that odd horizontal timings are not
    possible. This is apparent on the standard DMT mode of 1366x768@60
    which cannot be driven with correct timing.
    
    BCM2712 defaults to the same behaviour, but has a mode to support
    odd timings. While internally it still runs at two pixels per clock,
    setting the PV_VCONTROL_ODD_TIMING bit makes it appear externally
    to behave as it is one pixel per clock.
    
    Switching to this mode fixes 1366x768@60 mode, and other custom
    resultions with odd horizontal timings.
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    fd31df4 View commit details
    Browse the repository at this point in the history
  167. spi: dw-dma: Get the last DMA scoop out of the FIFO

    With a DMA FIFO threshold greater than 1 (encoded as 0), it is possible
    for data in the FIFO to be inaccessible, causing the transfer to fail
    after a timeout. If the transfer includes a transmission, reduce the
    RX threshold when the TX completes, otherwise use 1 for the whole
    transfer (inefficient, but not catastrophic at SPI data rates).
    
    See: raspberrypi#5696
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    c87d89a View commit details
    Browse the repository at this point in the history
  168. drivers: mmc: sdhci: add SPURIOUS_INT_RESP quirk

    Certain controllers (dwc-mshc) generate timeout conditions separately to
    command-completion conditions, where the end result is interrupts are
    separated in time depending on the current SDCLK frequency.
    
    This causes spurious interrupts if SDCLK is slow compared to the CPU's
    ability to process and return from interrupt. This occurs during card
    probe with an empty slot where all commands that would generate a
    response time out.
    
    Add a quirk to squelch command response interrupts when a command
    timeout interrupt is received.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    b0e6811 View commit details
    Browse the repository at this point in the history
  169. dt-bindings: mmc: sdhci-of-dwcmhsc: Add Raspberry Pi RP1 support

    The DWC MSHC controller on RP1 needs differentiating from the generic
    version.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    61f6f57 View commit details
    Browse the repository at this point in the history
  170. drivers: media: imx708: Adjust broken line correction parameter

    In full-resolution mode, the LPF_INTENSITY_EN and LPF_INTENSITY
    registers control Quad Bayer Re-mosaic broken line correction.
    Expose this as a module parameter "qbc_adjust": zero disables
    the correction and values in the range 2 to 5 set its strength.
    
    There is a trade-off between coloured and monochrome patterns.
    The previous fixed value 4 could produce ladder/spots artefacts
    in coloured textures. The new default value 2 may suit a wider
    range of scenes.
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    njhollinghurst authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ce79632 View commit details
    Browse the repository at this point in the history
  171. Revert "drivers: iommu: Add BCM2712 IOMMU"

    This reverts commit de57a4eb8e28291c4d7d29aa14b9deecbda5c1c1.
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    9ef6dbb View commit details
    Browse the repository at this point in the history
  172. Add ability to export gpio used by gpio-poweroff

    Signed-off-by: Nick Bulleid <nedbulleid@fastmail.com>
    
    Added export feature to gpio-poweroff documentation
    
    Signed-off-by: Nick Bulleid <nedbulleid@fastmail.com>
    nick-bulleid authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    df87321 View commit details
    Browse the repository at this point in the history
  173. gpio-poweroff: Disable the WARN

    With the new support for a chain of sys_off handlers, gpio-poweroff
    does not disable a normal shutdown (though it does delay it). There
    is therefore no need for the noisy WARN from the kernel.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f9363a3 View commit details
    Browse the repository at this point in the history
  174. configs: Add the drivetemp module

    See: raspberrypi#5670
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4b2c857 View commit details
    Browse the repository at this point in the history
  175. overlays: ov5647: Regularise vcm node label name

    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    b603921 View commit details
    Browse the repository at this point in the history
  176. overlays: ov5647: cam0 mode should use cam0_reg

    When the cam0 parameter is used, the vcm should be updated to refer to
    the cam0 regulator.
    
    See: raspberrypi#5722
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5c701d9 View commit details
    Browse the repository at this point in the history
  177. w1: Disable kernel log spam

    See: https://forums.raspberrypi.com/viewtopic.php?p=2159344
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    3669e30 View commit details
    Browse the repository at this point in the history
  178. include: uapi: v4l2: Add additional pixel formats for use with PiSP

    Add the following formats:
    
    - V4L2_PIX_FMT_RGB48/V4L2_PIX_FMT_BGR48
      48-bit RGB where each colour sample is 16-bits.
    
    - V4L2_PIX_FMT_PISP_COMP1_MONO/V4L2_PIX_FMT_PISP_COMP2_MONO
      16-bit to 8-bit pisp compressed monochrome pixel format.
    
    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    69e57a1 View commit details
    Browse the repository at this point in the history
  179. drivers: media: cfe: Add 16-bit and compressed mono format support

    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d7697ae View commit details
    Browse the repository at this point in the history
  180. drivers: media: pisp_be: Add mono and 48-bit RGB pixel format support

    Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
    naushir authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7cea330 View commit details
    Browse the repository at this point in the history
  181. ASoC: dwc: Remove check in set_bclk_ratio handling

    A check added to dw_i2s_set_bclk_ratio that the data format is
    consistent with the ratio seems reasonable but breaks when the
    ratio is changed before the format. Remove the check - it is
    unnecessary.
    
    See: raspberrypi#5724
    Fixes: 9c6694c ("ASOC: dwc: Fix 16-bit audio handling")
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    acab854 View commit details
    Browse the repository at this point in the history
  182. Revert "hwrng: bcm2835 - sleep more intelligently"

    This reverts commit 6a825ed.
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    eff1483 View commit details
    Browse the repository at this point in the history
  183. configs: bcm2712_defconfig: Change LOCALVERSION

    Debian seem to have rules about the content of the LOCALVERSION config
    setting. Specifically, the underscore is not accepted.
    
    Change it to a dash/hyphen.
    
    See: raspberrypi#5719
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    cd19125 View commit details
    Browse the repository at this point in the history
  184. overlays: README: Fix cut-and-paste errors

    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    3a83701 View commit details
    Browse the repository at this point in the history
  185. xhci: Use more event ring segment table entries

    Users have reported log spam created by "Event Ring Full" xHC event
    TRBs. These are caused by interrupt latency in conjunction with a very
    busy set of devices on the bus. The errors are benign, but throughput
    will suffer as the xHC will pause processing of transfers until the
    event ring is drained by the kernel. Expand the number of event TRB slots
    available by increasing the number of event ring segments in the ERST.
    
    Controllers have a hardware-defined limit as to the number of ERST
    entries they can process, so make the actual number in use
    min(ERST_MAX_SEGS, hw_max).
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    520c04d View commit details
    Browse the repository at this point in the history
  186. drm/vc4: vec: Add the margin properties to the connector

    All the handling for the properties was present, but they
    were never attached to the connector to allow userspace
    to change them.
    
    Add them to the connector.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    79e7fd1 View commit details
    Browse the repository at this point in the history
  187. drivers: thermal: step_wise: add support for hysteresis

    Step wise governor increases the mitigation level when the temperature
    goes above a threshold and will decrease the mitigation when the
    temperature falls below the threshold. If it were a case, where the
    temperature hovers around a threshold, the mitigation will be applied
    and removed at every iteration. This reaction to the temperature is
    inefficient for performance.
    
    The use of hysteresis temperature could avoid this ping-pong of
    mitigation by relaxing the mitigation to happen only when the
    temperature goes below this lower hysteresis value.
    
    Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
    Signed-off-by: Lina Iyer <ilina@codeaurora.org>
    
    drivers: thermal: step_wise: avoid throttling at hysteresis temperature after dropping below it
    
    Signed-off-by: Serge Schneider <serge@raspberrypi.org>
    
    Fix hysteresis support in gov_step_wise.c
    
    Directly get hyst value instead of going through an
    optional and, now, unimplemented function.
    
    Signed-off-by: Jürgen Kreileder <jk@blackdown.de>
    Ram Chandrasekar authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ae5f47f View commit details
    Browse the repository at this point in the history
  188. media/i2c: ov7251: Switch from V4L2_CID_GAIN to V4L2_CID_ANALOGUE_GAIN

    The mainline driver has implemented analogue gain using the control
    V4L2_CID_GAIN instead of V4L2_CID_ANALOGUE_GAIN.
    
    libcamera requires V4L2_CID_ANALOGUE_GAIN, and therefore fails.
    
    Update the driver to use V4L2_CID_ANALOGUE_GAIN.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    31983ab View commit details
    Browse the repository at this point in the history
  189. drm/vc4: Drop planes that are completely off-screen

    It is permitted for a plane to be configured such that none
    of it is on-screen via either negative dest rectangle X,Y
    offset, or just an offset that is greater than the crtc
    dimensions.
    
    These planes were resized via drm_atomic_helper_check_plane_state
    such that the source rectangle had a zero width or height, but
    they still created a dlist entry even though they contributed
    no pixels. In the case of vc6_plane_mode_set, that it could result
    in negative values being written into registers, which caused
    incorrect behaviour.
    
    Drop planes that result in a source width or height of 0 pixels
    to avoid the incorrect rendering.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    32eda13 View commit details
    Browse the repository at this point in the history
  190. drm/bridge: display-connector: Select DRM_KMS_HELPER

    Commit 7cd7065 ("drm/bridge: display-connector: implement
    bus fmts callbacks") added use of drm_atomic_helper_bridge_*
    functions, but didn't select the dependency of DRM_KMS_HELPER.
    If nothing else selected that dependency it resulted in a
    build failure.
    
    Select the missing dependency.
    
    Fixes: 7cd7065 ("drm/bridge: display-connector: implement bus fmts callbacks")
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    88afdf2 View commit details
    Browse the repository at this point in the history
  191. drm: vc4: Free the dlist alloc immediately if it never hit the hw

    atomic_check creates a state, and allocates the dlist memory for
    it such that atomic_flush can not fail.
    
    On destroy that dlist allocation was being put in the stale list,
    even though it had never been programmed into the hardware,
    therefore doing lots of atomic_checks could consume all the dlist
    memory and fail.
    
    If the dlist has never been programmed into the hardware, then
    free it immediately.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    dd04bff View commit details
    Browse the repository at this point in the history
  192. input: edt-ft5x06: Include I2C details in names for the devices

    libinput uses the input device name alone. If you have two
    identical input devices, then there is no way to differentiate
    between them, and in the case of touchscreens that means no
    way to associate them with the appropriate display device.
    
    Add the I2C bus and address to the start of the input device
    name so that the name is always unique within the system.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    01d1060 View commit details
    Browse the repository at this point in the history
  193. input: goodix: Include I2C details in names for the devices

    libinput uses the input device name alone. If you have two
    identical input devices, then there is no way to differentiate
    between them, and in the case of touchscreens that means no
    way to associate them with the appropriate display device.
    
    Add the I2C bus and address to the start of the input device
    name so that the name is always unique within the system.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    3e0285c View commit details
    Browse the repository at this point in the history
  194. drm: vc4: Block swiotlb bounce buffers being imported as dmabuf

    The dmabuf import already checks that the backing buffer is contiguous
    and rejects it if it isn't. vc4 also requires that the buffer is
    in the bottom 1GB of RAM, and this is all correctly defined via
    dma-ranges.
    
    However the kernel silently uses swiotlb to bounce dma buffers
    around if they are in the wrong region. This relies on dma sync
    functions to be called in order to copy the data to/from the
    bounce buffer.
    
    DRM is based on all memory allocations being coherent with the
    GPU so that any updates to a framebuffer will be acted on without
    the need for any additional update. This is fairly fundamentally
    incompatible with needing to call dma_sync_ to handle the bounce
    buffer copies, and therefore we have to detect and reject mappings
    that use bounce buffers.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    b7c52b9 View commit details
    Browse the repository at this point in the history
  195. configs: Add the adt7410 module

    Signed-off-by: Kenny <aSmig+github@romhat.net>
    aSmig authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    2550868 View commit details
    Browse the repository at this point in the history
  196. overlays: i2c-sensor: Add adt7410 support

    See raspberrypi#5738
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    aSmig authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5bcd304 View commit details
    Browse the repository at this point in the history
  197. overlays: hat_map: Add pisound mapping

    See: raspberrypi#5741
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    704946c View commit details
    Browse the repository at this point in the history
  198. drm: panel: jdi-lt070me05000: Add prepare_upstream_first flag

    The panel driver wants to send DCS commands from the prepare
    hook, therefore the DSI host wants to be pre_enabled first.
    Set the flag to achieve this.
    
    https://forums.raspberrypi.com/viewtopic.php?t=354708
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    9b8ec85 View commit details
    Browse the repository at this point in the history
  199. drivers: media: cfe: Find the source pads on the sensor entity

    The driver was assuming that pad 0 on the sensor entity was the
    appropriate source pad, but this isn't necessarily the case.
    With video-mux, it has the sink pads first, and then the source
    pad as the last one.
    
    Iterate through the sensor pads to find the relevant source pads.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    e2c427b View commit details
    Browse the repository at this point in the history
  200. dtoverlays: Add option for cam0 to camera-mux-Nport overlays

    Seeing as the mux can be connected to either CAM/DISP1 or
    CAM/DISP0 on a Pi5, add a cam0 override to allow configuration
    of which is used. Default (as with all camera overlays) is CAM/DISP1.
    
    The overlay does NOT update the camera regulator used by all the
    sensors as doing so would be a nightmare. The Arducam mulitplexer
    boards these overlays are initially supporting seem to tie the
    regulator GPIO for all the sensors high anyway.
    If it was viewed as necessary, then creating an additional
    regulator that listed cam[01]_reg as the parent should work.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ba1052f View commit details
    Browse the repository at this point in the history
  201. ASoC: dwc: Permit sample rates up to 384kHz

    The BCM2835 I2S block advertises clock rates up to 384kHz, and there's
    no reason why RP1's DWC I2S block shouldn't do the same.
    
    See: raspberrypi#5748
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    cf0ca33 View commit details
    Browse the repository at this point in the history
  202. arch: arm: configs: add HID_NINTENDO to rpi defconfigs

    Signed-off-by: Ryan McClelland <rymcclel@gmail.com>
    XenuIsWatching authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d7aef1b View commit details
    Browse the repository at this point in the history
  203. ASoC: dwc: Fix full-duplex mode

    Configuration of the DMA register was carelessly zeroing bits that may
    used by a stream in the other direction. Preserve them instead.
    
    See: raspberrypi#5741
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f9fa86f View commit details
    Browse the repository at this point in the history
  204. README: show rpi-6.6.y build status

    Replace rpi-6.5.y with rpi-6.6.y in the build status list.
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f4ad825 View commit details
    Browse the repository at this point in the history
  205. dtc update

    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    72ef4e4 View commit details
    Browse the repository at this point in the history
  206. bcm270x.dtsi: Fix bad merge

    This explains the complaints about alias names from dtc.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4735132 View commit details
    Browse the repository at this point in the history
  207. drm/panel: add panel-dsi

    Equivalent to panel-dpi for configuring a simple DSI panel with
    device tree side timings and bus settings.
    Motiviation is the same as for panel-dpi of wanting to support
    new simple panels without needing to patch the kernel.
    
    Signed-off-by: Timon Skerutsch <kernel@diodes-delight.com>
    Timon Skerutsch authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    bf82cb4 View commit details
    Browse the repository at this point in the history
  208. dt-bindings: display: panel-dsi bindings

    Bindings for the panel-dsi specific additions to panel-simple.
    Allow for DSI specific bus settings and panel timing
    to be define in devicetree. Very similar to panel-dpi.
    
    Signed-off-by: Timon Skerutsch <kernel@diodes-delight.com>
    Timon Skerutsch authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    da49e8c View commit details
    Browse the repository at this point in the history
  209. overlays: example overlay for using panel-dsi on RPi

    Analog to the generic panel-dpi overlay to use panel-dsi with dtparam
    to not require a panel specific overlay for simple use cases that
    do not require setting more niche DSI modes.
    
    Signed-off-by: Timon Skerutsch <kernel@diodes-delight.com>
    Timon Skerutsch authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ccf3b9b View commit details
    Browse the repository at this point in the history
  210. Configuration menu
    Copy the full SHA
    9dc5d32 View commit details
    Browse the repository at this point in the history
  211. dts: bcm2712: put usb under /axi not /soc

    On 2712, the DWC USB controller is no longer attached to the Videocore
    30-bit bus with its associated aliases, and can see the bottom 4GB of
    RAM directly.
    
    Ideally it should make use of IOMMU6 but for now software bounce buffers
    get it working.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f3a5ffe View commit details
    Browse the repository at this point in the history
  212. drm/vc4: Correct HVS muxing setup for the moplet

    The moplet registers as VC4_ENCODER_TYPE_TXP1 and can be
    fed from mux output 2 of HVS channel 1.
    
    Correct the option which checked for VC4_ENCODER_TYPE_TXP0
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d3494f6 View commit details
    Browse the repository at this point in the history
  213. drm/vc4: Mop and moplet have different register offsets for high addr

    MOP uses register offset 0x24 for the high bits of the address,
    whilst Moplet uses 0x1c.
    
    Handle this difference between the block types.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    beeefca View commit details
    Browse the repository at this point in the history
  214. arm: dt: bcm2712: Correct the size of the register range for MOP

    The Mop covers 0x28 bytes of registers, so ensure the range is
    defined appropriately.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5c6d076 View commit details
    Browse the repository at this point in the history
  215. dwc_otg: Avoid the use of align_buf for short packets

    Recent kernels (from 6.5) fail to boot on Pi0-3.
    
    This has been tracked down to the call to:
    ret = usb_get_std_status(hdev, USB_RECIP_DEVICE, 0, &hubstatus);
    
    returning garbage in hubstatus (it gets the uninitialised contents of
    a kmalloc buffer that is not overwritten as expected).
    
    As we don't have strong evidence that this code path has ever worked,
    and it is causing a clear problem currently, lets disable it to
    allow wider use of newer kernels.
    
    Signed-off-by: Dom Cobley <popcornmix@gmail.com>
    popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    6dfe39c View commit details
    Browse the repository at this point in the history
  216. media: dt-bindings: Add OmniVision OV64A40

    Add bindings for OmniVision OV64A40.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    Jacopo Mondi authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f0208a9 View commit details
    Browse the repository at this point in the history
  217. media: dt-bindings: i2c: Add Rohm BU64754 bindings

    Add YAML device tree bindings for the ROHM BU64754 VCM Motor Driver for
    Camera Autofocus.
    
    Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    kbingham authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    3effbf6 View commit details
    Browse the repository at this point in the history
  218. media: i2c: Add driver for OmniVision OV64A40

    Add a driver for the OmniVision OV64A40 image sensor.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    Jacopo Mondi authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a559343 View commit details
    Browse the repository at this point in the history
  219. media: i2c: Add ROHM BU64754 Camera Autofocus Actuator

    Add support for the ROHM BU64754 Motor Driver for Camera Autofocus. A
    V4L2 Subdevice is registered and provides a single
    V4L2_CID_FOCUS_ABSOLUTE control.
    
    Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    kbingham authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    341099c View commit details
    Browse the repository at this point in the history
  220. overlays: Add overlay for the OV64A40 Arducam Camera Module

    Arducam have integrated an Omnivision OV64A40 with a ROHM BU64754 VCM
    with a Raspberry Pi compatible cable pinout.
    
    Provide an overlay to support the module.
    
    Also add support to the camera mux overlays.
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
    Jacopo Mondi authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    66419e9 View commit details
    Browse the repository at this point in the history
  221. configs: rpi: Compile OV64A40 and BU64754 as modules

    Compile both the OV64A40 and the BU64754 drivers used by the Arducam
    64MP camera module based as modules in the defconfig files for
    
    - rpi5
    - rpi4
    - rpi2/3
    - rpi1/0
    
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    Jacopo Mondi authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ec4f7a7 View commit details
    Browse the repository at this point in the history
  222. media: rp1: cfe: Expose find_format_by_pix()

    Make find_format_by_pix() accessible to other files in the driver.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7a2be14 View commit details
    Browse the repository at this point in the history
  223. media: rp1: cfe: Add missing remaps

    8-bit bayer formats are missing remap definitions. Add them.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    68339a4 View commit details
    Browse the repository at this point in the history
  224. media: rp1: cfe: Add missing compressed remaps

    16-bit bayer formats are missing compressed remap definitions. Add them.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    60b40e0 View commit details
    Browse the repository at this point in the history
  225. media: rp1: cfe: Add cfe_find_16bit_code() and cfe_find_compressed_co…

    …de()
    
    Add helper functions which, given an mbus code, return the 16-bit
    remapped mbus code or the compressed mbus code.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    0947c61 View commit details
    Browse the repository at this point in the history
  226. media: rp1: csi2: Fix csi2_pad_set_fmt()

    The CSI-2 subdev's set_fmt currently allows setting the source and sink
    pad formats quite freely. This is not right, as the CSI-2 block can only
    do one of the following when processing the stream: 1) pass through as
    is, 2) expand to 16-bits, 3) compress.
    
    The csi2_pad_set_fmt() should take this into account, and only allow
    changing the source side mbus code, compared to the sink side format.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f5a9dd8 View commit details
    Browse the repository at this point in the history
  227. media: rp1: fe: Fix pisp_fe_pad_set_fmt()

    pisp_fe_pad_set_fmt() allows setting the pad formats quite freely. This
    is not correct, and the function should only allow formats as supported
    by the hardware. Fix this by:
    
    Allow no format changes for FE_CONFIG_PAD and FE_STATS_PAD. They should
    always be the hardcoded initial ones.
    
    Allow setting FE_STREAM_PAD freely (but the mbus code must be
    supported), and propagate the format to the FE_OUTPUT0_PAD and
    FE_OUTPUT1_PAD pads.
    
    Allow changing the mbus code for FE_OUTPUT0_PAD and FE_OUTPUT1_PAD pads
    only if the mbus code is the compressed version of the sink side code.
    
    TODO: FE supports scaling and cropping. This should be represented here
    too?
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    862bb15 View commit details
    Browse the repository at this point in the history
  228. media: rp1: csi2: Use get_frame_desc to get CSI-2 VC and DT

    Use get_frame_desc pad op for asking the CSI-2 VC and DT from the source
    device driver, instead of hardcoding to VC 0, and getting the DT from a
    formats table. To keep backward compatibility with sources that do not
    implement get_frame_desc, implement a fallback mechanism that always
    uses VC 0, and gets the DT from the formats table, based on the CSI2's
    sink pad's format.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    0a7f248 View commit details
    Browse the repository at this point in the history
  229. media: rp1: cfe: Add is_image_node()

    The hardware supports streaming from memory (in addition to streaming
    from the CSI-2 RX), but the driver does not support this at the moment.
    
    There are multiple places in the driver which uses
    is_image_output_node(), even if the "output" part is not relevant. Thus,
    in a minor preparation for the possible support for streaming from
    memory, and to make it more obvious that the pieces of code are not
    about the "output", add is_image_node() which will return true for both
    input and output video nodes.
    
    While at it, reformat also the metadata related macros to fit inside 80
    columns.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f086810 View commit details
    Browse the repository at this point in the history
  230. media: rp1: cfe: Dual purpose video nodes

    The RP1 CSI-2 DMA can capture both video and metadata just fine, but at
    the moment the video nodes are only set to support either video or
    metadata.
    
    Make the changes to support both video and metadata. This mostly means
    tracking both video format and metadata format separately for each video
    node, and using vb2_queue_change_type() to change the vb2 queue type
    when needed.
    
    Briefly, this means that the user can get/set both video and meta
    formats to a single video node. The vb2 queue buffer type will be
    changed when the user calls REQBUFS or CREATE_BUFS ioctls. This buffer
    type will be then used as the "mode" for the video node when the user
    starts the streaming, and based on that either the video or the meta
    format will be used.
    
    A bunch of macros are added (node_supports_xxx()), which tell if a node
    can support a particular mode, whereas the existing macros
    (is_xxx_node()) will tell if the node is currently in a particular mode.
    Note that the latter will only work correctly between the start of the
    streaming and the end of the streaming, and thus should be only used in
    those code paths.
    
    However, as the userspace (libcamera) does not support dual purpose
    video nodes, for the time being let's keep the second video node as
    V4L2_CAP_META_CAPTURE only to keep the userspace working.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    e5e6d4d View commit details
    Browse the repository at this point in the history
  231. media: rp1: Drop LE handling

    The driver registers for line-end interrupts, but never uses them. This
    just causes extra interrupt load, with more complexity in the driver.
    
    Drop the LE handling. It can easily be added back if later needed.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d7147a9 View commit details
    Browse the repository at this point in the history
  232. media: rp1: csi2: Use standard link_validate

    The current csi2_link_validate() skips some important checks. Let's
    rather use the standard v4l2_subdev_link_validate_default() as the
    link_validate hook.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    dfc2f85 View commit details
    Browse the repository at this point in the history
  233. media: rp1: fe: Use standard link_validate

    The current pisp_fe_link_validate() skips some important checks. Let's
    rather use the standard v4l2_subdev_link_validate_default() as the
    link_validate hook.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    e6a990d View commit details
    Browse the repository at this point in the history
  234. media: rp1: cfe: Improve link validation for metadata

    Improve the link validation for metadata by:
    - Allowing capture buffers that are larger than the incoming frame
      (instead of requiring exact match).
    
    - Instead of assuming that a metadata unit ("pixel") is 8 bits, use
      find_format_by_code() to get the format and use the bit depth from
      there. E.g. bit depth for RAW10 metadata will be 10 bits, when we
      move to the upstream metadata formats.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    tomba authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    02b72ef View commit details
    Browse the repository at this point in the history
  235. configs: rpi: Compile TSC2007 as module

    Compile the TSC2007 touchscreen driver as a module
    and enable the optional IIO module.
    
    Signed-off-by: Timon Skerutsch <kernel@diodes-delight.com>
    timonsku authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    85f2a02 View commit details
    Browse the repository at this point in the history
  236. overlays: rpi-poe: Add PWM polarity value

    Newer kernels expect PWM references to include a polarity value as the
    third parameter.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    5f2a42a View commit details
    Browse the repository at this point in the history
  237. ARM: dts: bcm2712: PWM references include polarity

    Increase #pwm-cells to 3 to allow for the extra polarity word.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    bbbafc2 View commit details
    Browse the repository at this point in the history
  238. ARM: dts: bcm2711-rpi-400: Don't delete the ACT LED

    The Pi 400 only has one user-accessible LED (green), which is intended
    to be used as a power indication. Therefore there is no activity LED.
    However, a user may wish to remap the activity LED functionality to a
    GPIO in the 40-way header, so preserve the led-act node in a disabled
    state.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    803c699 View commit details
    Browse the repository at this point in the history
  239. ARM: dts: bcm2712-rpi-5-b: Update the LED labels

    In 6.7 the labels on the LEDs have changed from xxx_led to led_xxx.
    Update the Pi 5 DTS to match, otherwise the act-led overlay does not
    apply.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4f11832 View commit details
    Browse the repository at this point in the history
  240. bcm2835-sdhost: Fail gracefully with bad dtb

    The logging timestamps depend on the existence of a bcm2835-system-timer
    node. If this node doesn't exist, leave the logging disabled rather than
    crashing.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    41b49c0 View commit details
    Browse the repository at this point in the history
  241. drivers/pinctrl/bcm/Kconfig: Fix BCM2712 help

    Replace "Broadcom BCM2835 GPIO" with "Broadcom BCM2712 PINCONF"
    in the help message. This work was sponsored by GOVCERT.LU.
    
    Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
    leon-anavi authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a372caf View commit details
    Browse the repository at this point in the history
  242. configs: Add XILLYBUS support modules

    See: raspberrypi#5786
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    9ce043e View commit details
    Browse the repository at this point in the history
  243. drivers/gpu/drm/panel:fix waveshare panel software restart/shutdown d…

    …isplay is abnormal
    
    Fixed the screen stays white when the user restarts or shuts down
    
    Signed-off-by: eng33 <eng33@waveshare.com>
    eng33 authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    bc42d33 View commit details
    Browse the repository at this point in the history
  244. firmware/psci: Pass given partition number through

    Pi 5 uses BL31 as its armstub file, so the reset goes via PSCI. Parse
    any "reboot" parameter as a partition number to reboot into.
    N.B. This code path is only used if reboot mode has been set to warm
    or soft.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4d171ed View commit details
    Browse the repository at this point in the history
  245. dts: bcm2712-rpi-5-b: Enable warm reboot mode

    Switch to warm reboot mode so that the partition number is preserved.
    
    Signed-off-by: Phil Elwell <phil@raspberrypi.com>
    pelwell authored and popcornmix committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    7f83257 View commit details
    Browse the repository at this point in the history
  246. dts: rp1: add SNPS quirk to USB3 host controllers

    Set snps,parkmode-disable-ss-quirk for usb0 and usb1.
    
    Enabling this test/debug feature seems to prevent controller lockups
    with bidirectional SS bulk endpoints active.
    
    Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
    P33M authored and pelwell committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    2252780 View commit details
    Browse the repository at this point in the history
  247. drivers: media: i2c: imx296,imx477: Configure tigger_mode every time

    Don't assume the camera has been reset each time we start streaming,
    but always write registers relating to trigger_mode, even in mode 0.
    
    IMX477: Stop driving XVS on stop streaming, to avoid spurious pulses.
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    njhollinghurst authored and pelwell committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4ea1e0b View commit details
    Browse the repository at this point in the history
  248. overlays: Add "always-on" parameter to imx477 and imx296

    Leave the camera's power supplies up, to prevent the camera
    clamping its 1.8V digital I/Os to ground. This may be useful
    when synchronizing multiple camera systems using XVS or XTRIG.
    
    Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
    njhollinghurst authored and pelwell committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    add8c28 View commit details
    Browse the repository at this point in the history
  249. input: edt-ft5x06: Correct prefix length in snprintf

    snprintf takes the length of the array that we can print into,
    and has to fit the NULL terminator in there too.
    Printing the prefix is generally "12-3456 " which is 8 desired
    characters (the length of EDT_NAME_PREFIX_LEN) and the NULL.
    The space is therefore being truncated to fit the NULL in.
    
    Increase the length snprintf is allowed to use.
    
    Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    6by9 authored and pelwell committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    cee7137 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2023

  1. media: bcm2835-unicam: call pad ops with active/try states

    This change removes the subdev state management at the driver
    level for the bcm2835 unicam driver to instead opt for the v4l2-core's
    state management.
    
    Signed-off-by: Vinay Varma <varmavinaym@gmail.com>
    vvarma committed Dec 23, 2023
    Configuration menu
    Copy the full SHA
    ee0772b View commit details
    Browse the repository at this point in the history