Skip to content
Snippets Groups Projects
  1. Apr 08, 2019
  2. Apr 03, 2019
  3. Apr 01, 2019
  4. Mar 27, 2019
  5. Mar 25, 2019
  6. Mar 21, 2019
    • Maarten Lankhorst's avatar
      drm/fourcc: Fix conflicting Y41x definitions · ff01e697
      Maarten Lankhorst authored
      
      There has unfortunately been a conflict with the following 3 commits:
      
      commit e9961ab9
      Author: Ayan Kumar Halder <ayan.halder@arm.com>
      Date:   Fri Nov 9 17:21:12 2018 +0000
          drm: Added a new format DRM_FORMAT_XVYU2101010
      
      commit 7ba0fee2
      Author: Brian Starkey <brian.starkey@arm.com>
      Date:   Fri Oct 5 10:27:00 2018 +0100
      
          drm/fourcc: Add AFBC yuv fourccs for Mali
      
      and
      
      commit 50bf5d7d
      Author: Swati Sharma <swati2.sharma@intel.com>
      Date:   Mon Mar 4 17:26:33 2019 +0530
      
          drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc
      
      Unfortunately gcc didn't warn about the redefinitions, because the
      double defines were the set to same value, and gcc apparently no longer
      warns about that.
      
      Fix this by using new XYVU for i915, without alpha, and making the
      Y41x definitions match msdn, with alpha.
      
      Fortunately we caught it early, and the conflict hasn't even landed in
      drm-next yet.
      
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Brian Starkey <Brian.Starkey@arm.com>
      Cc: Swati Sharma <swati2.sharma@intel.com>
      Cc: Ayan Kumar Halder <ayan.halder@arm.com>
      Cc: malidp@foss.arm.com
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: Dave Airlie <airlied@linux.ie>
      Cc: Liviu Dudau <Liviu.Dudau@arm.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190319121702.6814-1-maarten.lankhorst@linux.intel.com
      
      
      Acked-by: Jani Nikula <jani.nikula@intel.com> #irc
      Acked-by: default avatarSean Paul <sean@poorly.run>
      Reviewed-by: default avatarAyan Kumar halder <ayan.halder@arm.com>
      ff01e697
  7. Mar 20, 2019
    • Noralf Trønnes's avatar
      tinydrm/mipi-dbi: Use dma-safe buffers for all SPI transfers · a89bfc5d
      Noralf Trønnes authored
      
      Buffers passed to spi_sync() must be dma-safe even for tiny buffers since
      some SPI controllers use DMA for all transfers.
      
      Example splat with CONFIG_DMA_API_DEBUG enabled:
      
      [   23.750467] DMA-API: dw_dmac_pci 0000:00:15.0: device driver maps memory from stack [probable addr=000000001e49185d]
      [   23.750529] WARNING: CPU: 1 PID: 1296 at kernel/dma/debug.c:1161 check_for_stack+0xb7/0x190
      [   23.750533] Modules linked in: mmc_block(+) spi_pxa2xx_platform(+) pwm_lpss_pci pwm_lpss spi_pxa2xx_pci sdhci_pci cqhci intel_mrfld_pwrbtn extcon_intel_mrfld sdhci intel_mrfld_adc led_class mmc_core ili9341 mipi_dbi tinydrm backlight ti_ads7950 industrialio_triggered_buffer kfifo_buf intel_soc_pmic_mrfld hci_uart btbcm
      [   23.750599] CPU: 1 PID: 1296 Comm: modprobe Not tainted 5.0.0-rc7+ #236
      [   23.750605] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
      [   23.750620] RIP: 0010:check_for_stack+0xb7/0x190
      [   23.750630] Code: 8b 6d 50 4d 85 ed 75 04 4c 8b 6d 10 48 89 ef e8 2f 8b 44 00 48 89 c6 4a 8d 0c 23 4c 89 ea 48 c7 c7 88 d0 82 b4 e8 40 7c f9 ff <0f> 0b 8b 05 79 00 4b 01 85 c0 74 07 5b 5d 41 5c 41 5d c3 8b 05 54
      [   23.750637] RSP: 0000:ffff97bbc0292fa0 EFLAGS: 00010286
      [   23.750646] RAX: 0000000000000000 RBX: ffff97bbc0290000 RCX: 0000000000000006
      [   23.750652] RDX: 0000000000000007 RSI: 0000000000000002 RDI: ffff94b33e115450
      [   23.750658] RBP: ffff94b33c8578b0 R08: 0000000000000002 R09: 00000000000201c0
      [   23.750664] R10: 00000006ecb0ccc6 R11: 0000000000034f38 R12: 000000000000316c
      [   23.750670] R13: ffff94b33c84b250 R14: ffff94b33dedd5a0 R15: 0000000000000001
      [   23.750679] FS:  0000000000000000(0000) GS:ffff94b33e100000(0063) knlGS:00000000f7faf690
      [   23.750686] CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
      [   23.750691] CR2: 00000000f7f54faf CR3: 000000000722c000 CR4: 00000000001006e0
      [   23.750696] Call Trace:
      [   23.750713]  debug_dma_map_sg+0x100/0x340
      [   23.750727]  ? dma_direct_map_sg+0x3b/0xb0
      [   23.750739]  spi_map_buf+0x25a/0x300
      [   23.750751]  __spi_pump_messages+0x2a4/0x680
      [   23.750762]  __spi_sync+0x1dd/0x1f0
      [   23.750773]  spi_sync+0x26/0x40
      [   23.750790]  mipi_dbi_typec3_command_read+0x14d/0x240 [mipi_dbi]
      [   23.750802]  ? spi_finalize_current_transfer+0x10/0x10
      [   23.750821]  mipi_dbi_typec3_command+0x1bc/0x1d0 [mipi_dbi]
      
      Reported-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      Tested-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190222124329.23046-1-noralf@tronnes.org
      a89bfc5d
  8. Mar 14, 2019
  9. Mar 13, 2019
  10. Mar 12, 2019
    • Ayan Kumar Halder's avatar
      drm: Added a new format DRM_FORMAT_XVYU2101010 · e9961ab9
      Ayan Kumar Halder authored
      
      This new format is supported by DP550 and DP650
      
      Changes since v3 (series):
      - Added the ack
      - Rebased on the latest drm-misc-next
      
      Signed-off-by: default avatarAyan Kumar halder <ayan.halder@arm.com>
      Reviewed-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      Acked-by: default avatarAlyssa Rosenzweig <alyssa@rosenzweig.io>
      Link: https://patchwork.freedesktop.org/patch/291758/?series=57895&rev=1
      e9961ab9
    • Brian Starkey's avatar
      drm/fourcc: Add AFBC yuv fourccs for Mali · 7ba0fee2
      Brian Starkey authored
      As we look to enable AFBC using DRM format modifiers, we run into
      problems which we've historically handled via vendor-private details
      (i.e. gralloc, on Android).
      
      AFBC (as an encoding) is fully flexible, and for example YUV data can
      be encoded into 1, 2 or 3 encoded "planes", much like the linear
      equivalents. Component order is also meaningful, as AFBC doesn't
      necessarily care about what each "channel" of the data it encodes
      contains. Therefore ABGR8888 and RGBA8888 can be encoded in AFBC with
      different representations. Similarly, 'X' components may be encoded
      into AFBC streams in cases where a decoder expects to decode a 4th
      component.
      
      In addition, AFBC is a licensable IP, meaning that to support the
      ecosystem we need to ensure that _all_ AFBC users are able to describe
      the encodings that they need. This is much better achieved by
      preserving meaning in the fourcc codes when they are combined with an
      AFBC modifier.
      
      In essence, we want to use the modifier to describe the parameters of
      the AFBC encode/decode, and use the fourcc code to describe the data
      being encoded/decoded.
      
      To do anything different would be to introduce redundancy - we would
      need to duplicate in the modifier information which is _already_
      conveyed clearly and non-ambigiously by a fourcc code.
      
      I hope that for RGB this is non-controversial.
      (BGRA8888 + MODIFIER_AFBC) is a different format from
      (RGBA8888 + MODIFIER_AFBC).
      
      Possibly more controversial is that (XBGR8888 + MODIFIER_AFBC)
      is different from (BGR888 + MODIFIER_AFBC). I understand that in some
      schemes it is not the case - but in AFBC it is so.
      
      Where we run into problems is where there are not already fourcc codes
      which represent the data which the AFBC encoder/decoder is processing.
      To that end, we want to introduce new fourcc codes to describe the
      data being encoded/decoded, in the places where none of the existing
      fourcc codes are applicable.
      
      Where we don't support an equivalent non-compressed layout, or where
      no "obvious" linear layout exists, we are proposing adding fourcc
      codes which have no associated linear layout - because any layout we
      proposed would be completely arbitrary.
      
      Some formats are following the naming conventions from [2].
      
      The summary of the new formats is:
       DRM_FORMAT_VUY888 - Packed 8-bit YUV 444. Y followed by U then V.
       DRM_FORMAT_VUY101010 - Packed 10-bit YUV 444. Y followed by U then
                              V. No defined linear encoding.
       DRM_FORMAT_Y210 - Packed 10-bit YUV 422. Y followed by U (then Y)
                         then V. 10-bit samples in 16-bit words.
       DRM_FORMAT_Y410 - Packed 10-bit YUV 444, with 2-bit alpha.
       DRM_FORMAT_P210 - Semi-planar 10-bit YUV 422. Y plane, followed by
                         interleaved U-then-V plane. 10-bit samples in
                         16-bit words.
       DRM_FORMAT_YUV420_8BIT - Packed 8-bit YUV 420. Y followed by U then
                                V. No defined linear encoding
       DRM_FORMAT_YUV420_10BIT - Packed 10-bit YUV 420. Y followed by U
                                 then V. No defined linear encoding
      
      Please also note that in the absence of AFBC, we would still need to
      add Y410, Y210 and P210.
      
      Full rationale follows:
      
      YUV 444 8-bit, 1-plane
      ----------------------
       The currently defined AYUV format encodes a 4th alpha component,
       which makes it unsuitable for representing a 3-component YUV 444
       AFBC stream.
      
       The proposed[1] XYUV format which is supported by Mali-DP in linear
       layout is also unsuitable, because the component order is the
       opposite of the AFBC version, and it encodes a 4th 'X' component.
      
       DRM_FORMAT_VUY888 is the "obvious" format for a 3-component, packed,
       YUV 444 8-bit format, with the component order which our HW expects to
       encode/decode. It conforms to the same naming convention as the
       existing packed YUV 444 format.
       The naming here is meant to be consistent with DRM_FORMAT_AYUV and
       DRM_FORMAT_XYUV[1]
      
      YUV 444 10-bit, 1-plane
      -----------------------
       There is no currently-defined YUV 444 10-bit format in
       drm_fourcc.h, irrespective of number of planes.
      
       The proposed[1] XVYU2101010 format which is supported by Mali-DP in
       linear layout uses the wrong component order, and also encodes a 4th
       'X' component, which doesn't match the AFBC version of YUV 444
       10-bit which we support.
      
       DRM_FORMAT_Y410 is the same layout as XVYU2101010, but with 2 bits of
       alpha.  This format is supported with linear layout by Mali GPUs. The
       naming follows[2].
      
       There is no "obvious" linear encoding for a 3-component 10:10:10
       packed format, and so DRM_FORMAT_VUY101010 defines a component
       order, but not a bit encoding. Again, the naming is meant to be
       consistent with DRM_FORMAT_AYUV.
      
      YUV 422 8-bit, 1-plane
      ----------------------
       The existing DRM_FORMAT_YUYV (and the other component orders) are
       single-planar YUV 422 8-bit formats. Following the convention of
       the component orders of the RGB formats, YUYV has the correct
       component order for our AFBC encoding (Y followed by U followed by
       V). We can use YUYV for AFBC YUV 422 8-bit.
      
      YUV 422 10-bit, 1-plane
      -----------------------
       There is no currently-defined YUV 422 10-bit format in drm_fourcc.h
      
       DRM_FORMAT_Y210 is analogous to YUYV, but with 10-bits per sample
       packed into the upper 10-bits of 16-bit samples. This format is
       supported in both linear and AFBC by Mali GPUs.
      
      YUV 422 10-bit, 2-plane
      -----------------------
       The recently defined DRM_FORMAT_P010 format is a 10-bit semi-planar
       YUV 420 format, which has the correct component ordering for an AFBC
       2-plane YUV 420 buffer. The linear layout contains meaningless padding
       bits, which will not be encoded in an AFBC stream.
      
      YUV 420 8-bit, 1-plane
      ----------------------
       There is no currently defined single-planar YUV 420, 8-bit format
       in drm_fourcc.h. There's differing opinions on whether using the
       existing fourcc-implied n_planes where possible is a good idea or
       not when using modifiers.
      
       For me, it's much more "obvious" to use NV12 for 2-plane AFBC and
       YUV420 for 3-plane AFBC. This keeps the aforementioned separation
       between the AFBC codec settings (in the modifier) and the pixel data
       format (in the fourcc). With different vendors using AFBC, this helps
       to ensure that there is no confusion in interoperation. It also
       ensures that the AFBC modifiers describe AFBC itself (which is a
       licensable component), and not implementation details which are not
       defined by AFBC.
      
       The proposed[1] X0L0 format which Mali-DP supports with Linear layout
       is unsuitable, as it contains a 4th 'X' component, and our AFBC
       decoder expects only 3 components.
      
       To that end, we propose a new YUV 420 8-bit format. There is no
       "obvious" linear encoding for a 3-component 8:8:8, 420, packed format,
       and so DRM_FORMAT_YUV420_8BIT defines a component order, but not a
       bit encoding. I'm happy to hear different naming suggestions.
      
      YUV 420 8-bit, 2-, 3-plane
      --------------------------
       These already exist, we can use NV12 and YUV420.
      
      YUV 420 10-bit, 1-plane
      -----------------------
       As above, no current definition exists, and X0L2 encodes a 4th 'X'
       channel.
      
       Analogous to DRM_FORMAT_YUV420_8BIT, we define DRM_FORMAT_YUV420_10BIT.
      
      [1] https://lists.freedesktop.org/archives/dri-devel/2018-July/184598.html
      [2] https://docs.microsoft.com/en-us/windows/desktop/medfound/10-bit-and-16-bit-yuv-video-formats
      
      
      
      Changes since RFC v1:
       - Fix confusing subsampling vs bit-depth X:X:X notation in
         descriptions (danvet)
       - Rename DRM_FORMAT_AVYU1101010 to DRM_FORMAT_Y410 (Lisa Wu)
       - Add drm_format_info structures for the new formats, using the
         new 'bpp' field for those with non-integer bytes-per-pixel
       - Rebase, including Juha-Pekka Heikkila's format definitions
      
      Changes since RFC v2:
      - Rebase on top of latest changes in drm-misc-next
      - Change the description of DRM_FORMAT_P210 in __drm_format_info and
      drm_fourcc.h so as to make it consistent with other DRM_FORMAT_PXXX
      formats.
      
      Changes since v3:
      - Added the ack
      - Rebased on the latest drm-misc-next
      
      Signed-off-by: default avatarBrian Starkey <brian.starkey@arm.com>
      Signed-off-by: default avatarAyan Kumar Halder <ayan.halder@arm.com>
      Reviewed-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      Acked-by: default avatarAlyssa Rosenzweig <alyssa@rosenzweig.io>
      Link: https://patchwork.freedesktop.org/patch/291759/?series=57895&rev=1
      7ba0fee2
  11. Mar 07, 2019
  12. Mar 05, 2019
  13. Mar 04, 2019
  14. Mar 02, 2019
  15. Feb 28, 2019
  16. Feb 27, 2019
Loading