Skip to content
  1. Nov 26, 2020
  2. Nov 25, 2020
  3. Nov 24, 2020
  4. Nov 23, 2020
    • Gustavo A. R. Silva's avatar
      video: fbdev: pm2fb: Fix fall-through warnings for Clang · 04295bc3
      Gustavo A. R. Silva authored
      
      
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a fallthrough pseudo-keyword.
      
      Link: https://github.com/KSPP/linux/issues/115
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/0eedb3972a0032da4997a2a47cf0665fbe9c56ca.1605896060.git.gustavoars@kernel.org
      04295bc3
    • Gustavo A. R. Silva's avatar
      video: fbdev: lxfb_ops: Fix fall-through warnings for Clang · 2c3a1e49
      Gustavo A. R. Silva authored
      
      
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a break statement instead of letting the code fall
      through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/9c1dcb12aae7c7ff0907ffb99ffd227656cbe444.1605896060.git.gustavoars@kernel.org
      2c3a1e49
    • Gustavo A. R. Silva's avatar
      drm/via: Fix fall-through warnings for Clang · 0b08d08d
      Gustavo A. R. Silva authored
      
      
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a break statement instead of letting the code fall
      through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/c21a588bf9e222826f6b138db91de26a2b21df33.1605896060.git.gustavoars@kernel.org
      0b08d08d
    • Gustavo A. R. Silva's avatar
      drm: Fix fall-through warnings for Clang · 8ce9daf8
      Gustavo A. R. Silva authored
      
      
      In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
      by explicitly adding a break statement instead of letting the code fall
      through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/111e9d3d55c686892357aa5269022024b4d48330.1605896059.git.gustavoars@kernel.org
      8ce9daf8
    • John Stultz's avatar
      dma-buf: system_heap: Allocate higher order pages if available · d963ab0f
      John Stultz authored
      
      
      While the system heap can return non-contiguous pages,
      try to allocate larger order pages if possible.
      
      This will allow slight performance gains and make implementing
      page pooling easier.
      
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Liam Mark <lmark@codeaurora.org>
      Cc: Laura Abbott <labbott@kernel.org>
      Cc: Brian Starkey <Brian.Starkey@arm.com>
      Cc: Hridya Valsaraju <hridya@google.com>
      Cc: Suren Baghdasaryan <surenb@google.com>
      Cc: Sandeep Patil <sspatil@google.com>
      Cc: Daniel Mentz <danielmentz@google.com>
      Cc: Chris Goldsworthy <cgoldswo@codeaurora.org>
      Cc: Ørjan Eide <orjan.eide@arm.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Ezequiel Garcia <ezequiel@collabora.com>
      Cc: Simon Ser <contact@emersion.fr>
      Cc: James Jones <jajones@nvidia.com>
      Cc: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: default avatarBrian Starkey <brian.starkey@arm.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201121235002.69945-6-john.stultz@linaro.org
      d963ab0f
    • John Stultz's avatar
      dma-buf: heaps: Skip sync if not mapped · 4c68e499
      John Stultz authored
      This patch is basically a port of Ørjan Eide's similar patch for ION
       https://lore.kernel.org/lkml/20200414134629.54567-1-orjan.eide@arm.com/
      
      Only sync the sg-list of dma-buf heap attachment when the attachment
      is actually mapped on the device.
      
      dma-bufs may be synced at any time. It can be reached from user space
      via DMA_BUF_IOCTL_SYNC, so there are no guarantees from callers on when
      syncs may be attempted, and dma_buf_end_cpu_access() and
      dma_buf_begin_cpu_access() may not be paired.
      
      Since the sg_list's dma_address isn't set up until the buffer is used
      on the device, and dma_map_sg() is called on it, the dma_address will be
      NULL if sync is attempted on the dma-buf before it's mapped on a device.
      
      Before v5.0 (commit 55897af6 ("dma-direct: merge swiotlb_dma_ops
      into the dma_direct code")) this was a problem as the dma-api (at least
      the swiotlb_dma_ops on arm64) would use the potentially invalid
      dma_address. How that failed depended on how the device handled physical
      address 0. If 0 was a valid address to physical ram, that page would get
      flushed a lot, while the actual pages in the buffer would not get synced
      correctly. While if 0 is an invalid physical address it may cause a
      fault and trigger a crash.
      
      In v5.0 this was incidentally fixed by commit 55897af6 ("dma-direct:
      merge swiotlb_dma_ops into the dma_direct code"), as this moved the
      dma-api to use the page pointer in the sg_list, and (for Ion buffers at
      least) this will always be valid if the sg_list exists at all.
      
      But, this issue is re-introduced in v5.3 with
      commit 449fa54d
      
       ("dma-direct: correct the physical addr in
      dma_direct_sync_sg_for_cpu/device") moves the dma-api back to the old
      behaviour and picks the dma_address that may be invalid.
      
      dma-buf core doesn't ensure that the buffer is mapped on the device, and
      thus have a valid sg_list, before calling the exporter's
      begin_cpu_access.
      
      Logic and commit message originally by: Ørjan Eide <orjan.eide@arm.com>
      
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Liam Mark <lmark@codeaurora.org>
      Cc: Laura Abbott <labbott@kernel.org>
      Cc: Brian Starkey <Brian.Starkey@arm.com>
      Cc: Hridya Valsaraju <hridya@google.com>
      Cc: Suren Baghdasaryan <surenb@google.com>
      Cc: Sandeep Patil <sspatil@google.com>
      Cc: Daniel Mentz <danielmentz@google.com>
      Cc: Chris Goldsworthy <cgoldswo@codeaurora.org>
      Cc: Ørjan Eide <orjan.eide@arm.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Ezequiel Garcia <ezequiel@collabora.com>
      Cc: Simon Ser <contact@emersion.fr>
      Cc: James Jones <jajones@nvidia.com>
      Cc: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: default avatarBrian Starkey <brian.starkey@arm.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201121235002.69945-5-john.stultz@linaro.org
      4c68e499
    • John Stultz's avatar
      dma-buf: heaps: Remove heap-helpers code · 064fae53
      John Stultz authored
      
      
      The heap-helpers code was not as generic as initially hoped
      and it is now not being used, so remove it from the tree.
      
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Liam Mark <lmark@codeaurora.org>
      Cc: Laura Abbott <labbott@kernel.org>
      Cc: Brian Starkey <Brian.Starkey@arm.com>
      Cc: Hridya Valsaraju <hridya@google.com>
      Cc: Suren Baghdasaryan <surenb@google.com>
      Cc: Sandeep Patil <sspatil@google.com>
      Cc: Daniel Mentz <danielmentz@google.com>
      Cc: Chris Goldsworthy <cgoldswo@codeaurora.org>
      Cc: Ørjan Eide <orjan.eide@arm.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Ezequiel Garcia <ezequiel@collabora.com>
      Cc: Simon Ser <contact@emersion.fr>
      Cc: James Jones <jajones@nvidia.com>
      Cc: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: default avatarBrian Starkey <brian.starkey@arm.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201121235002.69945-4-john.stultz@linaro.org
      064fae53
    • John Stultz's avatar
      dma-buf: heaps: Move heap-helper logic into the cma_heap implementation · a5d2d29e
      John Stultz authored
      
      
      Since the heap-helpers logic ended up not being as generic as
      hoped, move the heap-helpers dma_buf_ops implementations into
      the cma_heap directly.
      
      This will allow us to remove the heap_helpers code in a following
      patch.
      
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Liam Mark <lmark@codeaurora.org>
      Cc: Laura Abbott <labbott@kernel.org>
      Cc: Brian Starkey <Brian.Starkey@arm.com>
      Cc: Hridya Valsaraju <hridya@google.com>
      Cc: Suren Baghdasaryan <surenb@google.com>
      Cc: Sandeep Patil <sspatil@google.com>
      Cc: Daniel Mentz <danielmentz@google.com>
      Cc: Chris Goldsworthy <cgoldswo@codeaurora.org>
      Cc: Ørjan Eide <orjan.eide@arm.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Ezequiel Garcia <ezequiel@collabora.com>
      Cc: Simon Ser <contact@emersion.fr>
      Cc: James Jones <jajones@nvidia.com>
      Cc: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: default avatarBrian Starkey <brian.starkey@arm.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201121235002.69945-3-john.stultz@linaro.org
      a5d2d29e
    • John Stultz's avatar
      dma-buf: system_heap: Rework system heap to use sgtables instead of pagelists · 38129575
      John Stultz authored
      
      
      In preparation for some patches to optmize the system
      heap code, rework the dmabuf exporter to utilize sgtables rather
      then pageslists for tracking the associated pages.
      
      This will allow for large order page allocations, as well as
      more efficient page pooling.
      
      In doing so, the system heap stops using the heap-helpers logic
      which sadly is not quite as generic as I was hoping it to be, so
      this patch adds heap specific implementations of the dma_buf_ops
      function handlers.
      
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Liam Mark <lmark@codeaurora.org>
      Cc: Laura Abbott <labbott@kernel.org>
      Cc: Brian Starkey <Brian.Starkey@arm.com>
      Cc: Hridya Valsaraju <hridya@google.com>
      Cc: Suren Baghdasaryan <surenb@google.com>
      Cc: Sandeep Patil <sspatil@google.com>
      Cc: Daniel Mentz <danielmentz@google.com>
      Cc: Chris Goldsworthy <cgoldswo@codeaurora.org>
      Cc: Ørjan Eide <orjan.eide@arm.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Ezequiel Garcia <ezequiel@collabora.com>
      Cc: Simon Ser <contact@emersion.fr>
      Cc: James Jones <jajones@nvidia.com>
      Cc: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: default avatarBrian Starkey <brian.starkey@arm.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201121235002.69945-2-john.stultz@linaro.org
      38129575
  5. Nov 20, 2020
    • Marc Zyngier's avatar
      drm/meson: dw-hdmi: Enable the iahb clock early enough · 2b6cb81b
      Marc Zyngier authored
      Instead of moving meson_dw_hdmi_init() around which breaks existing
      platform, let's enable the clock meson_dw_hdmi_init() depends on.
      This means we don't have to worry about this clock being enabled or
      not, depending on the boot-loader features.
      
      Fixes: b33340e3
      
       ("drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the TOP registers")
      Reported-by: default avatar"kernelci.org bot" <bot@kernelci.org>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Tested-by: default avatarGuillaume Tucker <guillaume.tucker@collabora.com>
      Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      [narmstrong: changed reported by to kernelci.org bot]
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201120094205.525228-3-maz@kernel.org
      2b6cb81b
    • Marc Zyngier's avatar
      drm/meson: dw-hdmi: Disable clocks on driver teardown · 1dfeea90
      Marc Zyngier authored
      
      
      The HDMI driver request clocks early, but never disable them, leaving
      the clocks on even when the driver is removed.
      
      Fix it by slightly refactoring the clock code, and register a devm
      action that will eventually disable/unprepare the enabled clocks.
      
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201120094205.525228-2-maz@kernel.org
      1dfeea90
    • Linus Walleij's avatar
      drm/panel: s6e63m0: Fix init sequence · f0aee45f
      Linus Walleij authored
      
      
      The init sequence consist of a number of unknown settings
      for the display controller. This patch achieves two things:
      
      - Fix an error that must have happened when the driver was
        converted from the backlight subsystem: the 0xb8
        configuration command was lost and added as a tail to
        the previous command.
      
      - Update some minor settings in some bytes here and there
        according to changes in the Samsung GT-I9070 and
        Samsung GT-S7710 code dumps. Since two other devices use
        these settings they probably reflect trimmings later
        found to be better for the display rather than
        customizations for these devices.
      
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
      Cc: Stephan Gerhold <stephan@gerhold.net>
      Cc: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201117175621.870085-3-linus.walleij@linaro.org
      f0aee45f
    • Linus Walleij's avatar
      drm/panel: s6e63m0: Implement 28 backlight levels · 9c3f0a0d
      Linus Walleij authored
      
      
      A later version of the s6e63m0 driver in the Samsung
      GT-I9070 vendor tree provides 28 different backlight
      levels making use of elaborate control of the ACL
      and ELVSS regulator. Implement this more fine-grained
      backlight control.
      
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
      Cc: Stephan Gerhold <stephan@gerhold.net>
      Cc: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201117175621.870085-2-linus.walleij@linaro.org
      9c3f0a0d
    • Linus Walleij's avatar
      drm/panel: s6e63m0: Fix and extend MCS table · c8917fd7
      Linus Walleij authored
      
      
      Fix up the format of the manufacturer command set table
      to be TAB-indented and lowercase. Add the MCS_TEMP_SWIRE
      command that we will make use of.
      
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
      Cc: Stephan Gerhold <stephan@gerhold.net>
      Cc: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201117175621.870085-1-linus.walleij@linaro.org
      c8917fd7
    • Maxime Ripard's avatar
      drm: Pass the full state to connectors atomic functions · eca22edb
      Maxime Ripard authored
      
      
      The current atomic helpers have either their object state being passed as
      an argument or the full atomic state.
      
      The former is the pattern that was done at first, before switching to the
      latter for new hooks or when it was needed.
      
      Now that the CRTCs have been converted, let's move forward with the
      connectors to provide a consistent interface.
      
      The conversion was done using the coccinelle script below, and built tested
      on all the drivers.
      
      @@
      identifier connector, connector_state;
      @@
      
       struct drm_connector_helper_funcs {
      	...
      	struct drm_encoder* (*atomic_best_encoder)(struct drm_connector *connector,
      -						   struct drm_connector_state *connector_state);
      +						   struct drm_atomic_state *state);
      	...
      }
      
      @@
      identifier connector, connector_state;
      @@
      
       struct drm_connector_helper_funcs {
      	...
      	void (*atomic_commit)(struct drm_connector *connector,
      -			      struct drm_connector_state *connector_state);
      +			      struct drm_atomic_state *state);
      	...
      }
      
      @@
      struct drm_connector_helper_funcs *FUNCS;
      identifier state;
      identifier connector, connector_state;
      identifier f;
      @@
      
       f(..., struct drm_atomic_state *state, ...)
       {
      	<+...
      -	FUNCS->atomic_commit(connector, connector_state);
      +	FUNCS->atomic_commit(connector, state);
      	...+>
       }
      
      @@
      struct drm_connector_helper_funcs *FUNCS;
      identifier state;
      identifier connector, connector_state;
      identifier var, f;
      @@
      
       f(struct drm_atomic_state *state, ...)
       {
      	<+...
      -	var = FUNCS->atomic_best_encoder(connector, connector_state);
      +	var = FUNCS->atomic_best_encoder(connector, state);
      	...+>
       }
      
      @ connector_atomic_func @
      identifier helpers;
      identifier func;
      @@
      
      (
      static struct drm_connector_helper_funcs helpers = {
      	...,
      	.atomic_best_encoder = func,
      	...,
      };
      |
      static struct drm_connector_helper_funcs helpers = {
      	...,
      	.atomic_commit = func,
      	...,
      };
      )
      
      @@
      identifier connector_atomic_func.func;
      identifier connector;
      symbol state;
      @@
      
       func(struct drm_connector *connector,
      -      struct drm_connector_state *state
      +      struct drm_connector_state *connector_state
            )
       {
      	...
      -	state
      +	connector_state
       	...
       }
      
      @ ignores_state @
      identifier connector_atomic_func.func;
      identifier connector, connector_state;
      @@
      
       func(struct drm_connector *connector,
            struct drm_connector_state *connector_state)
      {
      	... when != connector_state
      }
      
      @ adds_state depends on connector_atomic_func && !ignores_state @
      identifier connector_atomic_func.func;
      identifier connector, connector_state;
      @@
      
       func(struct drm_connector *connector, struct drm_connector_state *connector_state)
       {
      +	struct drm_connector_state *connector_state = drm_atomic_get_new_connector_state(state, connector);
      	...
       }
      
      @ depends on connector_atomic_func @
      identifier connector_atomic_func.func;
      identifier connector_state;
      identifier connector;
      @@
      
       func(struct drm_connector *connector,
      -     struct drm_connector_state *connector_state
      +     struct drm_atomic_state *state
      	   )
       { ... }
      
      @ include depends on adds_state @
      @@
      
       #include <drm/drm_atomic.h>
      
      @ no_include depends on !include && adds_state @
      @@
      
      + #include <drm/drm_atomic.h>
        #include <drm/...>
      
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Reviewed-by: default avatarRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
      Cc: Melissa Wen <melissa.srw@gmail.com>
      Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201118094758.506730-1-maxime@cerno.tech
      eca22edb
    • Simon Ser's avatar
      drm: document drm_mode_modeinfo · 22f0d898
      Simon Ser authored
      
      
      This allows `struct drm_mode_modeinfo` references to be linkified.
      
      Some descriptions are borrowed from struct drm_display_mode.
      
      Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/BBtyuxgs3DvcrMtbRyb7KBEWUviGy1dtWO61eB4@cp3-web-016.plabs.ch
      22f0d898
    • Simon Ser's avatar
      drm: document drm_mode_get_connector · 2ac5ef3b
      Simon Ser authored
      
      
      Document how to perform a GETCONNECTOR ioctl. Document the various
      struct fields. Also document how to perform a forced probe, and when
      should user-space do it.
      
      Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Pekka Paalanen <ppaalanen@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/4NxrTtynzPiPX4SOCzxmA1sRB8fVLfeiabVpi5j3Y@cp7-web-041.plabs.ch
      2ac5ef3b