Skip to content
  1. Dec 07, 2018
  2. Dec 06, 2018
  3. Dec 05, 2018
  4. Dec 04, 2018
  5. Dec 03, 2018
  6. Dec 01, 2018
    • Eric Anholt's avatar
      drm/v3d: Fix prime imports of buffers from other drivers. · 62d1a752
      Eric Anholt authored
      
      
      v3d_bo_get_pages() checks this to decide to map the imported buffer
      instead of the backing shmem file.  The caller was about to set this
      value anyway, and there's no error path in between.  Ideally we
      wouldn't even allocate the shmem file for our imports, but that's a
      more invasive fix.
      
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Fixes: 57692c94
      
       ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
      Link: https://patchwork.freedesktop.org/patch/msgid/20181128230927.10951-3-eric@anholt.net
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarDave Emett <david.emett@broadcom.com>
      62d1a752
    • Eric Anholt's avatar
      drm/v3d: Drop the "dev" argument to lock/unlock of BO reservations. · e14a07fc
      Eric Anholt authored
      
      
      They were unused, as Dave Emett noticed in TFU review.
      
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Cc: Dave Emett <david.emett@broadcom.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181128230927.10951-2-eric@anholt.net
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e14a07fc
    • Eric Anholt's avatar
      drm/v3d: Add support for submitting jobs to the TFU. · 1584f16c
      Eric Anholt authored
      
      
      The TFU can copy from raster, UIF, and SAND input images to UIF output
      images, with optional mipmap generation.  This will certainly be
      useful for media EGL image input, but is also useful immediately for
      mipmap generation without bogging the V3D core down.
      
      For now we only run the queue 1 job deep, and don't have any hang
      recovery (though I don't think we should need it, with TFU).  Queuing
      multiple jobs in the HW will require synchronizing the YUV coefficient
      regs updates since they don't get FIFOed with the job.
      
      v2: Change the ioctl to IOW instead of IOWR, always set COEF0, explain
          why TFU is AUTH, clarify the syncing docs, drop the unused TFU
          interrupt regs (you're expected to use the hub's), don't take
          &bo->base for NULL bos.
      v3: Fix a little whitespace alignment (noticed by checkpatch), rebase
          on drm_sched_job_cleanup() changes.
      
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Reviewed-by: Dave Emett <david.emett@broadcom.com> (v2)
      Link: https://patchwork.freedesktop.org/patch/264607/
      1584f16c
  7. Nov 30, 2018
    • Daniel Vetter's avatar
      drm: Fix up drm_atomic_state_helper.[hc] extraction · 1d8224e7
      Daniel Vetter authored
      I've misplaced two functions by accident:
      - drm_atomic_helper_duplicate_state is really part of the
        resume/suspend/shutdown device-wide helpers.
      - drm_atomic_helper_legacy_gamma_set is part of the legacy ioctl
        compat helpers.
      
      Move them both back.
      
      Fixes: 9ef8a9dc
      
       ("drm: Extract drm_atomic_state_helper.[hc]")
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarSean Paul <sean@poorly.run>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181128100728.4674-1-daniel.vetter@ffwll.ch
      1d8224e7
    • Sean Paul's avatar
      drm: Fix compiler warning in drm_atomic_helper.c · 615aa3d9
      Sean Paul authored
      Kbuild was complaining about:
      >> drivers/gpu/drm/drm_atomic_helper.c:3169:27: warning: 'state' may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      Now state can't actually be used uninitialized, but we'll assign a value
      anyways so it stops bellyaching.
      
      Kbuild config:
      	link:	https://lists.01.org/pipermail/kbuild-all/2018-November/055374.html
      	tree:   git://anongit.freedesktop.org/drm/drm-misc for-linux-next
      	head:   b7ea04d2
      	commit: b7ea04d2 [4/4] drm: Add
      	DRM_MODESET_LOCK_BEGIN/END helpers
      	config: x86_64-randconfig-x017-201847 (attached as .config)
      	compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
      	reproduce:
      		git checkout b7ea04d2
      		# save the attached .config to linux build tree
      		make ARCH=x86_64
      
      Fixes: b7ea04d2
      
       ("drm: Add DRM_MODESET_LOCK_BEGIN/END helpers")
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      [seanpaul added extra details on airlied's suggestion]
      Link: https://patchwork.freedesktop.org/patch/msgid/20181129203652.223634-1-sean@poorly.run
      615aa3d9
    • Sean Paul's avatar
      Merge drm/drm-next into drm-misc-next · f6d266c2
      Sean Paul authored
      Need to pick up the following patch to fix htmldocs build
      
      167bfe53
      
       ("Documentation: drm: Remove dangling pointer from drm-mm.rst")
      
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      f6d266c2
    • Boris Brezillon's avatar
      drm/vc4: Allow YUV formats on cursor planes · 2c2853f7
      Boris Brezillon authored
      
      
      Now that scaling is allowed on cursor planes, we can also allow YUV
      formats.
      
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-6-boris.brezillon@bootlin.com
      2c2853f7
    • Boris Brezillon's avatar
      drm/vc4: Allow scaling on cursor plane · 5dc416d9
      Boris Brezillon authored
      
      
      Now that async update has been reworked to allow scaled planes to be
      updated asynchronously when the scaling params do not change, we can
      remove the NO_SCALING constraint on cursor planes.
      
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-5-boris.brezillon@bootlin.com
      5dc416d9
    • Boris Brezillon's avatar
      drm/vc4: Rework the async update logic · 1d4118ca
      Boris Brezillon authored
      
      
      vc4_plane_atomic_async_check() was only based on the
      state->{crtc,src}_{w,h} which was fine since scaling was not allowed on
      the cursor plane.
      
      We are about to change that to properly support underscan, and, in order
      to make the async check more reliable, we call vc4_plane_mode_set()
      from there and check that only the pos0, pos2 and ptr0 entries in the
      dlist have changed.
      
      In vc4_plane_atomic_async_update(), we no longer call
      vc4_plane_atomic_check() since vc4_plane_mode_set() has already been
      called in vc4_plane_atomic_async_check(), and we don't need to allocate
      a new LBM region (we reuse the one from the current state).
      
      Note that we now have to manually update each field of the current
      plane state since it's no longer updated in place (not sure we have
      to sync all of them, but it's harmless if we do).
      We also drop the vc4_plane_async_set_fb() call (ptr0 dlist entry has
      been properly updated in vc4_plane_mode_set())
      
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-4-boris.brezillon@bootlin.com
      1d4118ca
    • Boris Brezillon's avatar
      drm/vc4: Don't check plane state more than once · 8d938449
      Boris Brezillon authored
      
      
      We are about to use vc4_plane_mode_set() in the async check path, but
      async check can decide that async update is not possible and force the
      driver to fallback to a sync update.
      
      All the checks that have been done on the plane state during async check
      stay valid, and checking it again is not necessary. Add a ->checked
      field to vc4_plane_state, and use it to track the status of the state
      (checked or not).
      
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-3-boris.brezillon@bootlin.com
      8d938449
    • Boris Brezillon's avatar
      drm/vc4: Move LBM creation out of vc4_plane_mode_set() · 0a038c1c
      Boris Brezillon authored
      
      
      We are about to use vc4_plane_mode_set() in the async check path, and
      async updates require that LBM size stay the same since they reuse the
      LBM from the previous state. So we definitely don't want to allocate a
      new LBM region that we know for sure will be free right away.
      
      Move the LBM allocation out of vc4_plane_mode_set() and call the new
      function (vc4_plane_update_lbm()) from vc4_plane_atomic_check().
      
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-2-boris.brezillon@bootlin.com
      0a038c1c
    • Boris Brezillon's avatar
      drm/vc4: Make vc4_lbm_size() return 0 when vertical scaling is disabled · b2e554d4
      Boris Brezillon authored
      
      
      LBM is not needed when vertical scaling is disabled. Return 0 in this
      case to avoid allocating LBM memory that will anyway be unused.
      
      While at it, drop the test on ->is_unity which is now redundant.
      
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-1-boris.brezillon@bootlin.com
      b2e554d4
    • Sean Paul's avatar
      Documentation: drm: Remove dangling pointer from drm-mm.rst · 167bfe53
      Sean Paul authored
      Fixes htmldocs build error:
      Error: Cannot open file ../drivers/gpu/drm/drm_global.c
      
      Fixes: 2bb42410
      
       ("drm: Remove drm_global.{c,h} v2")
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Junwei Zhang <Jerry.Zhang@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Christian Koenig <christian.koenig@amd.com>
      Cc: Huang Rui <ray.huang@amd.com>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181129155522.33749-1-sean@poorly.run
      167bfe53
    • Sean Paul's avatar
      drm: TODO: Add DRM_MODESET_LOCK_ALL* conversion to todo.rst · 22be8740
      Sean Paul authored
      
      
      We should also get the drivers using the helpers. Seems like a good
      intermediate TODO item.
      
      Changes in v2:
      - Add line about replacing drm_modest_lock_all() (Daniel)
      
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181129195838.222031-1-sean@poorly.run
      22be8740
  8. Nov 29, 2018