1. 07 Jun, 2024 3 commits
    • Noralf Trønnes's avatar
      drm/mipi-dbi: Make bits per word configurable for pixel transfers · df3fb27a
      Noralf Trønnes authored
      MIPI DCS write/set commands have 8 bit parameters except for the
      write_memory commands where it depends on the pixel format.
      drm_mipi_dbi does currently only support RGB565 which is 16-bit and it
      has to make sure that the pixels enters the SPI bus in big endian format
      since the MIPI DBI spec doesn't have support for little endian.
      
      drm_mipi_dbi is optimized for DBI interface option 3 which means that the
      16-bit bytes are swapped by the upper layer if the SPI bus does not
      support 16 bits per word, signified by the swap_bytes member.
      
      In order to support both 16-bit and 24-bit pixel transfers we need a way
      to tell the DBI command layer the format of the buffer. Add a
      write_memory_bpw member that the upper layer can use to tell how many
      bits per word to use for the SPI transfer.
      
      v4:
      - Expand the commit message (Dmitry)
      Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240604-panel-mipi-dbi-rgb666-v4-3-d7c2bcb9b78d@tronnes.orgSigned-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      df3fb27a
    • Noralf Trønnes's avatar
      drm/mipi-dbi: Remove mipi_dbi_machine_little_endian() · f34f014c
      Noralf Trønnes authored
      mipi_dbi_machine_little_endian() should really have been called
      mipi_dbi_framebuffer_little_endian() because that's the function it
      performs. When I added support for these SPI displays I thought that the
      framebuffers on big endian machines were also big endian, but I have
      later learned that this is not the case. There's a bit in the fourcc code
      that controls this: DRM_FORMAT_BIG_ENDIAN.
      
      Just remove the function to avoid confusion. We can add big endian support
      later should the need arise and we have hardware to test on.
      
      Instead of just amending the docs, expand it to explain the endianness
      handling.
      Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240604-panel-mipi-dbi-rgb666-v4-2-d7c2bcb9b78d@tronnes.orgSigned-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      f34f014c
    • Noralf Trønnes's avatar
      dt-bindings: display: panel: mipi-dbi-spi: Add a pixel format property · fdb16466
      Noralf Trønnes authored
      The MIPI DBI 2.0 specification (2005) lists only two pixel formats for
      the Type C Interface (SPI) and that is 3-bits/pixel RGB111 with
      2 options for bit layout.
      
      For Type A and B (parallel) the following formats are listed: RGB332,
      RGB444, RGB565, RGB666 and RGB888 (some have 2 options for the bit layout).
      
      Many MIPI DBI compatible controllers support all interface types on the
      same chip and often the manufacturers have chosen to provide support for
      the Type A/B interface pixel formats also on the Type C interface.
      
      Some chips provide many pixel formats with optional bit layouts over SPI,
      but the most common by far are RGB565 and RGB666. So even if the
      specification doesn't list these formats for the Type C interface, the
      industry has chosen to include them.
      
      The MIPI DCS specification lists the standard commands that can be sent
      over the MIPI DBI interface. The set_address_mode (36h) command has one
      bit in the parameter that controls RGB/BGR order:
          This bit controls the RGB data latching order transferred from the
          peripheral’s frame memory to the display device.
      This means that each supported RGB format also has a BGR variant.
      
      Based on this rationale document the following pixel formats describing
      the bit layout going over the wire:
      - RGB111 (option 1): x2r1g1b1r1g1b1 (2 pixels per byte)
      - BGR111 (option 1): x2b1g1r1b1g1r1 (2 pixels per byte)
      - RGB111 (option 2): x1r1g1b1x1r1g1b1 (2 pixels per byte)
      - BGR111 (option 2): x1b1g1r1x1b1g1r1 (2 pixels per byte)
      - RGB565: r5g6b5 (2 bytes)
      - BGR565: b5g6r5 (2 bytes)
      - RGB666: r6x2g6x2b6x2 (3 bytes)
      - BGR666: b6x2g6x2r6x2 (3 bytes)
      (x: don't care)
      
      v2:
      - Use 'default: r5g6b5' (Rob)
      Reviewed-by: default avatarRob Herring (Arm) <robh@kernel.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240604-panel-mipi-dbi-rgb666-v4-1-d7c2bcb9b78d@tronnes.orgSigned-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      fdb16466
  2. 06 Jun, 2024 16 commits
  3. 05 Jun, 2024 2 commits
  4. 04 Jun, 2024 3 commits
  5. 03 Jun, 2024 3 commits
  6. 31 May, 2024 1 commit
  7. 30 May, 2024 9 commits
  8. 29 May, 2024 2 commits
  9. 28 May, 2024 1 commit