1. 29 Jun, 2021 26 commits
  2. 28 Jun, 2021 1 commit
  3. 24 Jun, 2021 13 commits
    • Daniel Vetter's avatar
      drm/tiny: drm_gem_simple_display_pipe_prepare_fb is the default · 71501859
      Daniel Vetter authored
      Goes through all the drivers and deletes the default hook since it's
      the default now.
      Acked-by: default avatarDavid Lechner <david@lechnology.com>
      Acked-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      Acked-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Joel Stanley <joel@jms.id.au>
      Cc: Andrew Jeffery <andrew@aj.id.au>
      Cc: "Noralf Trønnes" <noralf@tronnes.org>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Emma Anholt <emma@anholt.net>
      Cc: David Lechner <david@lechnology.com>
      Cc: Kamlesh Gurudasani <kamlesh.gurudasani@gmail.com>
      Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: linux-aspeed@lists.ozlabs.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: xen-devel@lists.xenproject.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20210622165511.3169559-14-daniel.vetter@ffwll.ch
      71501859
    • Daniel Vetter's avatar
      drm/simple-helper: drm_gem_simple_display_pipe_prepare_fb as default · 40cfc7fc
      Daniel Vetter authored
      It's tedious to review this all the time, and my audit showed that
      arcpgu actually forgot to set this.
      
      Make this the default and stop worrying.
      
      Again I sprinkled WARN_ON_ONCE on top to make sure we don't have
      strange combinations of hooks: cleanup_fb without prepare_fb doesn't
      make sense, and since simpler drivers are all new they better be GEM
      based drivers.
      
      v2: Warn and bail when it's _not_ a GEM driver (Noralf)
      
      v3: It's neither ... nor, not not (Sam)
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Noralf Trønnes <noralf@tronnes.org>
      Acked-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210623162456.3373469-1-daniel.vetter@ffwll.ch
      40cfc7fc
    • Daniel Vetter's avatar
      drm/omap: Follow implicit fencing in prepare_fb · 942d8344
      Daniel Vetter authored
      I guess no one ever tried running omap together with lima or panfrost,
      not even sure that's possible. Anyway for consistency, fix this.
      Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Tomi Valkeinen <tomba@kernel.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210622165511.3169559-12-daniel.vetter@ffwll.ch
      942d8344
    • Daniel Vetter's avatar
      drm/vram-helpers: Create DRM_GEM_VRAM_PLANE_HELPER_FUNCS · f8bd3dbb
      Daniel Vetter authored
      Like we have for the shadow helpers too, and roll it out to drivers.
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Acked-by: default avatarTian Tao <tiantao6@hisilicon.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Tian Tao <tiantao6@hisilicon.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210622165511.3169559-11-daniel.vetter@ffwll.ch
      f8bd3dbb
    • Daniel Vetter's avatar
      drm/armada: Remove prepare/cleanup_fb hooks · 1a896130
      Daniel Vetter authored
      All they do is refcount the fb, which the atomic helpers already do.
      
      This is was necessary with the legacy helpers and I guess just carry
      over in the conversion. drm_plane_state always has a full reference
      for its ->fb pointer during its entire lifetime,
      see __drm_atomic_helper_plane_destroy_state()
      Acked-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210622165511.3169559-10-daniel.vetter@ffwll.ch
      1a896130
    • Daniel Vetter's avatar
      drm/<driver>: drm_gem_plane_helper_prepare_fb is now the default · 29a84084
      Daniel Vetter authored
      No need to set it explicitly.
      Acked-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Acked-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Acked-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
      Acked-by: default avatarChun-Kuang Hu <chunkuang.hu@kernel.org>
      Acked-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Acked-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
      Acked-by: default avatarPhilippe Cornu <philippe.cornu@foss.st.com>
      Acked-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: Paul Cercueil <paul@crapouillou.net>
      Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Sandy Huang <hjc@rock-chips.com>
      Cc: "Heiko Stübner" <heiko@sntech.de>
      Cc: Yannick Fertre <yannick.fertre@foss.st.com>
      Cc: Philippe Cornu <philippe.cornu@foss.st.com>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
      Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Chen-Yu Tsai <wens@csie.org>
      Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
      Cc: Jyri Sarha <jyri.sarha@iki.fi>
      Cc: Tomi Valkeinen <tomba@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-mips@vger.kernel.org
      Cc: linux-mediatek@lists.infradead.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: linux-rockchip@lists.infradead.org
      Cc: linux-stm32@st-md-mailman.stormreply.com
      Cc: linux-sunxi@lists.linux.dev
      Link: https://patchwork.freedesktop.org/patch/msgid/20210622165511.3169559-9-daniel.vetter@ffwll.ch
      29a84084
    • Daniel Vetter's avatar
      drm/atomic-helper: make drm_gem_plane_helper_prepare_fb the default · 7d30963f
      Daniel Vetter authored
      There's a bunch of atomic drivers who don't do this quite correctly,
      luckily most of them aren't in wide use or people would have noticed
      the tearing.
      
      By making this the default we avoid the constant audit pain and can
      additionally remove a ton of lines from vfuncs for a bit more clarity
      in smaller drivers.
      
      While at it complain if there's a cleanup_fb hook but no prepare_fb
      hook, because that makes no sense. I haven't found any driver which
      violates this, but better safe than sorry.
      
      Subsequent patches will reap the benefits.
      
      v2: It's neither ... nor, not not (Sam)
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210623162200.3372056-1-daniel.vetter@ffwll.ch
      7d30963f
    • Daniel Vetter's avatar
      dma-buf: Document dma-buf implicit fencing/resv fencing rules · 05459351
      Daniel Vetter authored
      Docs for struct dma_resv are fairly clear:
      
      "A reservation object can have attached one exclusive fence (normally
      associated with write operations) or N shared fences (read
      operations)."
      
      https://dri.freedesktop.org/docs/drm/driver-api/dma-buf.html#reservation-objects
      
      Furthermore a review across all of upstream.
      
      First of render drivers and how they set implicit fences:
      
      - nouveau follows this contract, see in validate_fini_no_ticket()
      
      			nouveau_bo_fence(nvbo, fence, !!b->write_domains);
      
        and that last boolean controls whether the exclusive or shared fence
        slot is used.
      
      - radeon follows this contract by setting
      
      		p->relocs[i].tv.num_shared = !r->write_domain;
      
        in radeon_cs_parser_relocs(), which ensures that the call to
        ttm_eu_fence_buffer_objects() in radeon_cs_parser_fini() will do the
        right thing.
      
      - vmwgfx seems to follow this contract with the shotgun approach of
        always setting ttm_val_buf->num_shared = 0, which means
        ttm_eu_fence_buffer_objects() will only use the exclusive slot.
      
      - etnaviv follows this contract, as can be trivially seen by looking
        at submit_attach_object_fences()
      
      - i915 is a bit a convoluted maze with multiple paths leading to
        i915_vma_move_to_active(). Which sets the exclusive flag if
        EXEC_OBJECT_WRITE is set. This can either come as a buffer flag for
        softpin mode, or through the write_domain when using relocations. It
        follows this contract.
      
      - lima follows this contract, see lima_gem_submit() which sets the
        exclusive fence when the LIMA_SUBMIT_BO_WRITE flag is set for that
        bo
      
      - msm follows this contract, see msm_gpu_submit() which sets the
        exclusive flag when the MSM_SUBMIT_BO_WRITE is set for that buffer
      
      - panfrost follows this contract with the shotgun approach of just
        always setting the exclusive fence, see
        panfrost_attach_object_fences(). Benefits of a single engine I guess
      
      - v3d follows this contract with the same shotgun approach in
        v3d_attach_fences_and_unlock_reservation(), but it has at least an
        XXX comment that maybe this should be improved
      
      - v4c uses the same shotgun approach of always setting an exclusive
        fence, see vc4_update_bo_seqnos()
      
      - vgem also follows this contract, see vgem_fence_attach_ioctl() and
        the VGEM_FENCE_WRITE. This is used in some igts to validate prime
        sharing with i915.ko without the need of a 2nd gpu
      
      - vritio follows this contract again with the shotgun approach of
        always setting an exclusive fence, see virtio_gpu_array_add_fence()
      
      This covers the setting of the exclusive fences when writing.
      
      Synchronizing against the exclusive fence is a lot more tricky, and I
      only spot checked a few:
      
      - i915 does it, with the optional EXEC_OBJECT_ASYNC to skip all
        implicit dependencies (which is used by vulkan)
      
      - etnaviv does this. Implicit dependencies are collected in
        submit_fence_sync(), again with an opt-out flag
        ETNA_SUBMIT_NO_IMPLICIT. These are then picked up in
        etnaviv_sched_dependency which is the
        drm_sched_backend_ops->dependency callback.
      
      - v4c seems to not do much here, maybe gets away with it by not having
        a scheduler and only a single engine. Since all newer broadcom chips than
        the OG vc4 use v3d for rendering, which follows this contract, the
        impact of this issue is fairly small.
      
      - v3d does this using the drm_gem_fence_array_add_implicit() helper,
        which then it's drm_sched_backend_ops->dependency callback
        v3d_job_dependency() picks up.
      
      - panfrost is nice here and tracks the implicit fences in
        panfrost_job->implicit_fences, which again the
        drm_sched_backend_ops->dependency callback panfrost_job_dependency()
        picks up. It is mildly questionable though since it only picks up
        exclusive fences in panfrost_acquire_object_fences(), but not buggy
        in practice because it also always sets the exclusive fence. It
        should pick up both sets of fences, just in case there's ever going
        to be a 2nd gpu in a SoC with a mali gpu. Or maybe a mali SoC with a
        pcie port and a real gpu, which might actually happen eventually. A
        bug, but easy to fix. Should probably use the
        drm_gem_fence_array_add_implicit() helper.
      
      - lima is nice an easy, uses drm_gem_fence_array_add_implicit() and
        the same schema as v3d.
      
      - msm is mildly entertaining. It also supports MSM_SUBMIT_NO_IMPLICIT,
        but because it doesn't use the drm/scheduler it handles fences from
        the wrong context with a synchronous dma_fence_wait. See
        submit_fence_sync() leading to msm_gem_sync_object(). Investing into
        a scheduler might be a good idea.
      
      - all the remaining drivers are ttm based, where I hope they do
        appropriately obey implicit fences already. I didn't do the full
        audit there because a) not follow the contract would confuse ttm
        quite well and b) reading non-standard scheduler and submit code
        which isn't based on drm/scheduler is a pain.
      
      Onwards to the display side.
      
      - Any driver using the drm_gem_plane_helper_prepare_fb() helper will
        correctly. Overwhelmingly most drivers get this right, except a few
        totally dont. I'll follow up with a patch to make this the default
        and avoid a bunch of bugs.
      
      - I didn't audit the ttm drivers, but given that dma_resv started
        there I hope they get this right.
      
      In conclusion this IS the contract, both as documented and
      overwhelmingly implemented, specically as implemented by all render
      drivers except amdgpu.
      
      Amdgpu tried to fix this already in
      
      commit 049aca43
      Author: Christian König <christian.koenig@amd.com>
      Date:   Wed Sep 19 16:54:35 2018 +0200
      
          drm/amdgpu: fix using shared fence for exported BOs v2
      
      but this fix falls short on a number of areas:
      
      - It's racy, by the time the buffer is shared it might be too late. To
        make sure there's definitely never a problem we need to set the
        fences correctly for any buffer that's potentially exportable.
      
      - It's breaking uapi, dma-buf fds support poll() and differentitiate
        between, which was introduced in
      
      	commit 9b495a58
      	Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
      	Date:   Tue Jul 1 12:57:43 2014 +0200
      
      	    dma-buf: add poll support, v3
      
      - Christian König wants to nack new uapi building further on this
        dma_resv contract because it breaks amdgpu, quoting
      
        "Yeah, and that is exactly the reason why I will NAK this uAPI change.
      
        "This doesn't works for amdgpu at all for the reasons outlined above."
      
        https://lore.kernel.org/dri-devel/f2eb6751-2f82-9b23-f57e-548de5b729de@gmail.com/
      
        Rejecting new development because your own driver is broken and
        violates established cross driver contracts and uapi is really not
        how upstream works.
      
      Now this patch will have a severe performance impact on anything that
      runs on multiple engines. So we can't just merge it outright, but need
      a bit a plan:
      
      - amdgpu needs a proper uapi for handling implicit fencing. The funny
        thing is that to do it correctly, implicit fencing must be treated
        as a very strange IPC mechanism for transporting fences, where both
        setting the fence and dependency intercepts must be handled
        explicitly. Current best practices is a per-bo flag to indicate
        writes, and a per-bo flag to to skip implicit fencing in the CS
        ioctl as a new chunk.
      
      - Since amdgpu has been shipping with broken behaviour we need an
        opt-out flag from the butchered implicit fencing model to enable the
        proper explicit implicit fencing model.
      
      - for kernel memory fences due to bo moves at least the i915 idea is
        to use ttm_bo->moving. amdgpu probably needs the same.
      
      - since the current p2p dma-buf interface assumes the kernel memory
        fence is in the exclusive dma_resv fence slot we need to add a new
        fence slot for kernel fences, which must never be ignored. Since
        currently only amdgpu supports this there's no real problem here
        yet, until amdgpu gains a NO_IMPLICIT CS flag.
      
      - New userspace needs to ship in enough desktop distros so that users
        wont notice the perf impact. I think we can ignore LTS distros who
        upgrade their kernels but not their mesa3d snapshot.
      
      - Then when this is all in place we can merge this patch here.
      
      What is not a solution to this problem here is trying to make the
      dma_resv rules in the kernel more clever. The fundamental issue here
      is that the amdgpu CS uapi is the least expressive one across all
      drivers (only equalled by panfrost, which has an actual excuse) by not
      allowing any userspace control over how implicit sync is conducted.
      
      Until this is fixed it's completely pointless to make the kernel more
      clever to improve amdgpu, because all we're doing is papering over
      this uapi design issue. amdgpu needs to attain the status quo
      established by other drivers first, once that's achieved we can tackle
      the remaining issues in a consistent way across drivers.
      
      v2: Bas pointed me at AMDGPU_GEM_CREATE_EXPLICIT_SYNC, which I
      entirely missed.
      
      This is great because it means the amdgpu specific piece for proper
      implicit fence handling exists already, and that since a while. The
      only thing that's now missing is
      - fishing the implicit fences out of a shared object at the right time
      - setting the exclusive implicit fence slot at the right time.
      
      Jason has a patch series to fill that gap with a bunch of generic
      ioctl on the dma-buf fd:
      
      https://lore.kernel.org/dri-devel/20210520190007.534046-1-jason@jlekstrand.net/
      
      v3: Since Christian has fixed amdgpu now in
      
      commit 8c505bdc (drm-misc/drm-misc-next)
      Author: Christian König <christian.koenig@amd.com>
      Date:   Wed Jun 9 13:51:36 2021 +0200
      
          drm/amdgpu: rework dma_resv handling v3
      
      Use the audit covered in this commit message as the excuse to update
      the dma-buf docs around dma_buf.resv usage across drivers.
      
      Since dynamic importers have different rules also hammer these in
      again while we're at it.
      
      v4:
      - Add the missing "through the device" in the dynamic section that I
        overlooked.
      - Fix a kerneldoc markup mistake, the link didn't connect
      
      v5:
      - A few s/should/must/ to make clear what must be done (if the driver
        does implicit sync) and what's more a maybe (Daniel Stone)
      - drop all the example api discussion, that needs to be expanded,
        clarified and put into a new chapter in drm-uapi.rst (Daniel Stone)
      
      Cc: Daniel Stone <daniel@fooishbar.org>
      Acked-by: default avatarDaniel Stone <daniel@fooishbar.org>
      Reviewed-by: Dave Airlie <airlied@redhat.com> (v4)
      Reviewed-by: Christian König <christian.koenig@amd.com> (v3)
      Cc: mesa-dev@lists.freedesktop.org
      Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Rob Clark <robdclark@chromium.org>
      Cc: Kristian H. Kristensen <hoegsberg@google.com>
      Cc: Michel Dänzer <michel@daenzer.net>
      Cc: Daniel Stone <daniels@collabora.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Deepak R Varma <mh12gx2825@gmail.com>
      Cc: Chen Li <chenli@uniontech.com>
      Cc: Kevin Wang <kevin1.wang@amd.com>
      Cc: Dennis Li <Dennis.Li@amd.com>
      Cc: Luben Tuikov <luben.tuikov@amd.com>
      Cc: linaro-mm-sig@lists.linaro.org
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210624125246.166721-1-daniel.vetter@ffwll.ch
      05459351
    • Daniel Vetter's avatar
      dma-buf: Switch to inline kerneldoc · d6abed2a
      Daniel Vetter authored
      Also review & update everything while we're at it.
      
      This is prep work to smash a ton of stuff into the kerneldoc for
      @resv.
      
      v2: Move the doc for sysfs_entry.attachment_uid to the right place too
      (Sam)
      Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Nirmoy Das <nirmoy.das@amd.com>
      Cc: Deepak R Varma <mh12gx2825@gmail.com>
      Cc: Chen Li <chenli@uniontech.com>
      Cc: Kevin Wang <kevin1.wang@amd.com>
      Cc: linux-media@vger.kernel.org
      Cc: linaro-mm-sig@lists.linaro.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20210623161712.3370885-1-daniel.vetter@ffwll.ch
      d6abed2a
    • Daniel Vetter's avatar
      drm/gem: Tiny kernel clarification for drm_gem_fence_array_add · d7fdae59
      Daniel Vetter authored
      Spotted while trying to convert panfrost to these.
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210622165511.3169559-15-daniel.vetter@ffwll.ch
      d7fdae59
    • Laurent Pinchart's avatar
      drm/bridge: ti-sn65dsi86: Split connector creation to a function · 379d3426
      Laurent Pinchart authored
      To prepare for making connector creation option, move connector creation
      out of ti_sn_bridge_attach to a separate function.
      
      No functional change intended.
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
      Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarRobert Foss <robert.foss@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210624000304.16281-7-laurent.pinchart+renesas@ideasonboard.com
      379d3426
    • Laurent Pinchart's avatar
      drm/bridge: ti-sn65dsi86: Group code in sections · 77674e72
      Laurent Pinchart authored
      Reorganize the functions in sections, related to connector operations,
      bridge operations, AUX adapter, GPIO controller and probe & remove.
      
      This prepares for proper support of DRM_BRIDGE_ATTACH_NO_CONNECTOR that
      will add more functions, to ensure that the code will stay readable.
      
      No functional change intended.
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
      Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarRobert Foss <robert.foss@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210624000304.16281-6-laurent.pinchart+renesas@ideasonboard.com
      77674e72
    • Laurent Pinchart's avatar
      drm/bridge: ti-sn65dsi86: Wrap panel with panel-bridge · 4e5763f0
      Laurent Pinchart authored
      To simplify interfacing with the panel, wrap it in a panel-bridge and
      let the DRM bridge helpers handle chaining of operations.
      
      This also prepares for support of DRM_BRIDGE_ATTACH_NO_CONNECTOR, which
      requires all components in the display pipeline to be represented by
      bridges.
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      Signed-off-by: default avatarRobert Foss <robert.foss@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210624000304.16281-5-laurent.pinchart+renesas@ideasonboard.com
      4e5763f0