summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/v3d
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-212-0/+2
| | | | | | | | | | | | | | Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drm/v3d: fix a missing check of pm_runtime_get_syncKangjie Lu2019-04-011-0/+2
| | | | | | | | | | | | pm_runtime_get_sync could fail and thus deserves a check. The patch adds such a check and return its error code upstream if it indeed failed. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190324231602.2436-1-kjlu@umn.edu Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
* drm/v3d: Rename the fence signaled from IRQs to "irq_fence".Eric Anholt2019-04-014-14/+14
| | | | | | | | | | We have another thing called the "done fence" that tracks when the scheduler considers the job done, and having the shared name was confusing. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190313235211.28995-2-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm/v3d: Add a note about OOM vs FLDONE, which may be racing on v3.3.Eric Anholt2019-04-011-1/+2
| | | | | | | | | | | We deref v3d->bin_job in the work handler, but v3d->bin_job doesn't actually hold a ref on the job. v2: typo fix FRDONE -> FLDONE Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190313235211.28995-1-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm/v3d: fix a NULL vs error pointer mixupDan Carpenter2019-04-011-2/+2
| | | | | | | | | | | The drm_gem_shmem_create() returns error pointers and v3d_bo_create() is also supposed to return error pointers. Fixes: 40609d4820b2 ("drm/v3d: Use the new shmem helpers to reduce driver boilerplate.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190321062731.GC21489@kadam
* drm/v3d: Use the new shmem helpers to reduce driver boilerplate.Eric Anholt2019-03-147-269/+115
| | | | | | | | | | | | The new shmem helpers from Noralf and Rob abstract out a bunch of our BO creation and mapping code. v2: Use the new sgt getter, and flag pages as dirty before freeing. v3: Remove the mismatched put_pages. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190314163451.13431-1-eric@anholt.net Reviewed-by: Rob Herring <robh@kernel.org> (v2)
* drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.Andrey Grodzovsky2019-03-141-8/+5
| | | | | | | | | | | | | Also stop calling drm_sched_increase_karma multiple times. v2: Fix whitespace in the code we're moving (by anholt) Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/1552409822-17230-1-git-send-email-andrey.grodzovsky@amd.com Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Fixes: 222b5f044159 ("drm/sched: Refactor ring mirror list handling.")
* drm/v3d: Remove some dead members of struct v3d_bo.Eric Anholt2019-03-142-10/+0
| | | | | | | | | vmas was from the previous model of page table management (one per fd), and vaddr was left over from vc4. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190308161716.2466-4-eric@anholt.net Acked-by: Rob Herring <robh@kernel.org>
* drm/v3d: Use drm_gem_lock_reservations()/drm_gem_unlock_reservations()Eric Anholt2019-03-141-50/+6
| | | | | | | | Now that we have core helpers, this gets rid of a lot of boilerplate. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190308161716.2466-3-eric@anholt.net Acked-by: Rob Herring <robh@kernel.org>
* drm/v3d: Add support for V3D v4.2.Eric Anholt2019-03-084-17/+63
| | | | | | | | | | | | | | | | | | | | No compatible string for it yet, just the version-dependent changes. They've now tied the hub and the core interrupt lines into a single interrupt line coming out of the block. It also turns out I made a mistake in modeling the V3D v3.3 and v4.1 bridge as a part of V3D itself -- the bridge is going away in favor of an external reset controller in a larger HW module. v2: Use consistent checks for whether we're on 4.2, and fix a leak in an error path. v3: Use more general means of determining if the current 4.2 changes are in place, as apparently other platforms may switch back (noted by Dave). Update the binding doc. v4: Improve error handling for IRQ init. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190308174336.7866-2-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm/v3d: Handle errors from IRQ setup.Eric Anholt2019-03-083-5/+18
| | | | | | | | Noted in review by Dave Emett for V3D 4.2 support. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190308174336.7866-1-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm/v3d: Make sure the GPU is on when measuring clocks.Eric Anholt2019-03-081-0/+8
| | | | | | | | | You'll get garbage measurements if the registers always read back 0xdeadbeef Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190220233658.986-3-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm/v3d: Don't try to set OVRTMUOUT on V3D 4.x.Eric Anholt2019-03-082-1/+4
| | | | | | | | | | | | | | The old field is gone and the register now has a different field, QRMAXCNT for how many TMU requests get serviced before thread switch. We were accidentally reducing it from its default of 0x3 (4 requests) to 0x0 (1). v2: Skip setting the reg at all on 4.x, instead of trying to update only the old field. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190220233658.986-2-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm: v3d: Switch to use drm_gem_object reservation_objectRob Herring2019-02-194-46/+10
| | | | | | | | | | | | | | Now that the base struct drm_gem_object has a reservation_object, use it and remove the private BO one. Cc: Eric Anholt <eric@anholt.net> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190202154158.10443-5-robh@kernel.org Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
* drm/v3d: Update top-level kerneldoc for the addition of TFU.Eric Anholt2019-02-191-3/+3
| | | | | | | Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190207201001.5730-1-eric@anholt.net Reviewed-by: Thomas Spurden <thomas.spurden@broadcom.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
* drm/v3d: Fix BO stats accounting for dma-buf-imported buffers.Eric Anholt2019-02-191-0/+6
| | | | | | | | | | We always decrement at GEM free, so make sure we increment at GEM creation for dma-bufs. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190207232613.24981-1-eric@anholt.net Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
* drm/sched: Refactor ring mirror list handling.Andrey Grodzovsky2019-01-251-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decauple sched threads stop and start and ring mirror list handling from the policy of what to do about the guilty jobs. When stoppping the sched thread and detaching sched fences from non signaled HW fenes wait for all signaled HW fences to complete before rerunning the jobs. v2: Fix resubmission of guilty job into HW after refactoring. v4: Full restart for all the jobs, not only from guilty ring. Extract karma increase into standalone function. v5: Rework waiting for signaled jobs without relying on the job struct itself as those might already be freed for non 'guilty' job's schedulers. Expose karma increase to drivers. v6: Use list_for_each_entry_safe_continue and drm_sched_process_job in case fence already signaled. Call drm_sched_increase_karma only once for amdgpu and add documentation. v7: Wait only for the latest job's fence. Suggested-by: Christian Koenig <Christian.Koenig@amd.com> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/v3d: Invalidate the caches from the outside in.Eric Anholt2018-12-071-2/+6
| | | | | | | | | This would be a fairly obscure race, but let's make sure we don't ever lose it. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-6-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm/v3d: Stop trying to flush L2C on V3D 3.3+Eric Anholt2018-12-071-3/+8
| | | | | | | | | This cache was replaced with the slice accessing the L2T in the newer generations. Noted by Dave during review. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-5-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm/v3d: Drop the wait for L2T flush to complete.Eric Anholt2018-12-071-4/+4
| | | | | | | | | | | | | | According to Dave, once you've started an L2T flush, all L2T accesses will be blocked until the flush completes. This fixes a consistent 3-4ms stall between the ioctl and running the job, and 3DMMES Taiji goes from 27fps to 110fps. v2: Leave a note about why we don't need to wait for completion. Signed-off-by: Eric Anholt <eric@anholt.net> Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Reviewed-by: Dave Emett <david.emett@broadcom.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-4-eric@anholt.net
* drm/v3d: Don't bother flushing L1TD at job start.Eric Anholt2018-12-071-12/+0
| | | | | | | | | | | This is the write combiner for TMU writes. You're supposed to flush that at job end if you had dirtied any cachelines. Flushing it at job start then doesn't make any sense. Signed-off-by: Eric Anholt <eric@anholt.net> Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Reviewed-by: Dave Emett <david.emett@broadcom.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-3-eric@anholt.net
* drm/v3d: Drop unused v3d_flush_caches().Eric Anholt2018-12-072-22/+0
| | | | | | | | | Now that I've specified how the end-of-pipeline flushing should work, we're never going to use this function. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Emett <david.emett@broadcom.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-2-eric@anholt.net
* drm/v3d: fix broken buildChristian König2018-12-061-1/+1
| | | | | | | | | | | I missed one case during the recent revert of the replace_fence interface change. Fixes: 0b258ed1a219 drm: revert "expand replace_fence to support timeline point v2" Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/266134/
* drm: revert "expand replace_fence to support timeline point v2"Christian König2018-12-051-2/+1
| | | | | | | | | | | | | | | This reverts commit 9a09a42369a4a37a959c051d8e1a1f948c1529a4. The whole interface isn't thought through. Since this function can't fail we actually can't allocate an object to store the sync point. Sorry, I should have taken the lead on this from the very beginning and reviewed it more thoughtfully. Going to propose a new interface as a follow up change. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Link: https://patchwork.freedesktop.org/patch/265580/
* drm/v3d: Add more tracepoints for V3D GPU rendering.Eric Anholt2018-12-033-3/+121
| | | | | | | | | | | | | The core scheduler tells us when the job is pushed to the scheduler's queue, and I had the job_run functions saying when they actually queue the job to the hardware. By adding tracepoints for the very top of the ioctls and the IRQs signaling job completion, "perf record -a -e v3d:.\* -e gpu_scheduler:.\* <job>; perf script" gets you a pretty decent timeline. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20181201005759.28093-5-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm/v3d: Add missing fence timeline name for TFU.Eric Anholt2018-12-031-2/+8
| | | | | | | | | We shouldn't be returning v3d-render for our new queue. Signed-off-by: Eric Anholt <eric@anholt.net> Fixes: 83d5139982db ("drm/v3d: Add support for submitting jobs to the TFU.") Link: https://patchwork.freedesktop.org/patch/msgid/20181201005759.28093-6-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm/v3d: Fix prime imports of buffers from other drivers.Eric Anholt2018-11-301-0/+1
| | | | | | | | | | | | | | 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: Eric Anholt <eric@anholt.net> Fixes: 57692c94dcbe ("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: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Dave Emett <david.emett@broadcom.com>
* drm/v3d: Drop the "dev" argument to lock/unlock of BO reservations.Eric Anholt2018-11-301-11/+9
| | | | | | | | | They were unused, as Dave Emett noticed in TFU review. Signed-off-by: Eric 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: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/v3d: Add support for submitting jobs to the TFU.Eric Anholt2018-11-307-51/+402
| | | | | | | | | | | | | | | | | | | | | | | 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: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Emett <david.emett@broadcom.com> (v2) Link: https://patchwork.freedesktop.org/patch/264607/
* Merge tag 'drm-misc-next-2018-11-28' of ↵Dave Airlie2018-11-292-23/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v4.21: Core Changes: - Merge drm_info.c into drm_debugfs.c - Complete the fake drm_crtc_commit's hw_done/flip_done sooner. - Remove deprecated drm_obj_ref/unref functions. All drivers use get/put now. - Decrease stack use of drm_gem_prime_mmap. - Improve documentation for dumb callbacks. Driver Changes: - Add edid support to virtio. - Wait on implicit fence in meson and sun4i. - Add support for BGRX8888 to sun4i. - Preparation patches for sun4i driver to start supporting linear and tiled YUV formats. - Add support for HDMI 1.4 4k modes to meson, and support for VIC alternate timings. - Drop custom dumb_map in vkms. - Small fixes and cleanups to v3d. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/151a3270-b1be-ed75-bd58-6b29d741f592@linux.intel.com
| * drm/v3d: Clean up the reservation object setup.Eric Anholt2018-11-271-22/+11
| | | | | | | | | | | | | | | | | | | | | | The extra to_v3d_bo() calls came from copying this from the vc4 driver, which stored the cma gem object in the structs. v2: Fix an unused var warning Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20181108161654.19888-4-eric@anholt.net Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> (v1)
| * drm/v3d: Update a comment about what uses v3d_job_dependency().Eric Anholt2018-11-271-1/+1
| | | | | | | | | | | | | | | | I merged bin and render's paths in a late refactoring. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20181108161654.19888-3-eric@anholt.net Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
* | Merge branch 'drm-next-4.21' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2018-11-191-3/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next New features for 4.21: amdgpu: - Support for SDMA paging queue on vega - Put compute EOP buffers into vram for better performance - Share more code with amdkfd - Support for scanout with DCC on gfx9 - Initial kerneldoc for DC - Updated SMU firmware support for gfx8 chips - Rework CSA handling for eventual support for preemption - XGMI PSP support - Clean up RLC handling - Enable GPU reset by default on VI, SOC15 dGPUs - Ring and IB test cleanups amdkfd: - Share more code with amdgpu ttm: - Move global init out of the drivers scheduler: - Track if schedulers are ready for work - Timeout/fault handling changes to facilitate GPU recovery Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexdeucher@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181114165113.3751-1-alexander.deucher@amd.com
| * drm/scheduler: Add drm_sched_job_cleanupSharat Masetty2018-11-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new API to clean up the scheduler job resources. This is primarliy needed in cases the job was created but was not queued to the scheduler queue. Additionally with this change, the layer which creates the scheduler job also gets to free up the job's resources and this entails moving the dma_fence_put(finished_fence) to the drivers ops free handler routines. Signed-off-by: Sharat Masetty <smasetty@codeaurora.org> Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/sched: make sure timer is restartedChristian König2018-11-051-3/+0
| | | | | | | | | | | | | | | | | | Make sure we always restart the timer after a timeout and remove the device specific workarounds. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | dma-buf: allow reserving more than one shared fence slotChristian König2018-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | Let's support simultaneous submissions to multiple engines. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Link: https://patchwork.kernel.org/patch/10626149/
* | Merge drm/drm-next into drm-misc-nextSean Paul2018-10-241-1/+1
|\| | | | | | | | | | | | | 4.19 is out, Lyude asked for a backmerge, and it's been a while. All very good reasons on their own :-) Signed-off-by: Sean Paul <seanpaul@chromium.org>
| * drm/scheduler: remove timeout work_struct from drm_sched_job (v3)Nayan Deshmukh2018-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | having a delayed work item per job is redundant as we only need one per scheduler to track the time out the currently executing job. v2: the first element of the ring mirror list is the currently executing job so we don't need a additional variable for it v3: squash in fixes for v3d and etnaviv Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Suggested-by: Christian König <christian.koenig@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm: add flags to drm_syncobj_find_fenceChunming Zhou2018-10-161-2/+2
| | | | | | | | | | | | | | | | | | flags can be used by driver to decide whether need to block wait submission. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> SIgned-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.kernel.org/patch/10641339/
* | drm/v3d: Skip debugfs dumping GCA on platforms without GCA.Eric Anholt2018-10-151-4/+7
| | | | | | | | | | | | | | | | | | | | Fixes an oops reading this debugfs entry on BCM7278. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20180928232126.4332-4-eric@anholt.net Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Cc: <stable@vger.kernel.org> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
* | drm/v3d: Add a little debugfs entry for measuring the core clock.Eric Anholt2018-10-152-0/+65
| | | | | | | | | | | | | | | | | | | | | | This adds just enough performance counter support to measure the clock. We don't have linux kernel drivers for the clock driving the HW, and this was useful for determining that the V3D HW is running on a slow clock, not that the driver was slow. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20180928232126.4332-2-eric@anholt.net Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
* | drm/v3d: Fix a use-after-free race accessing the scheduler's fences.Eric Anholt2018-10-152-2/+11
|/ | | | | | | | | | | | Once we push the job, the scheduler could run it and free it. So, if we want to reference their fences, we need to grab them before then. I haven't seen this happen in many days of conformance test runtime, but let's still close the race. Signed-off-by: Eric Anholt <eric@anholt.net> Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Link: https://patchwork.freedesktop.org/patch/254119/ Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
* drm: expand replace_fence to support timeline point v2Chunming Zhou2018-09-061-1/+1
| | | | | | | | | | we can place a fence to a timeline point after expanded. v2: change func parameter order Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/246543/
* drm: expand drm_syncobj_find_fence to support timeline point v2Chunming Zhou2018-09-061-2/+2
| | | | | | | | | | we can fetch timeline point fence after expanded. v2: The parameter fence is the result of the function and should come last. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/246541/
* drm/scheduler: modify API to avoid redundancyNayan Deshmukh2018-07-252-5/+1
| | | | | | | | | | entity has a scheduler field and we don't need the sched argument in any of the functions where entity is provided. Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* Merge branch 'drm-next-4.19' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2018-07-201-4/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next More features for 4.19: - Map processes to vmids for debugging GPUVM faults - Raven gfxoff fixes - Initial gfxoff support for vega12 - Use defines for interrupt sources rather than magic numbers - DC aux fixes - Finish DC logging TODO - Add more DC debugfs interfaces for conformance testing - Add CRC support for DCN - Scheduler rework in preparation for load balancing - Unify common smu9 code - Clean up UVD instancing support - ttm cleanups - Misc fixes and cleanups Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180719194001.3488-1-alexander.deucher@amd.com
| * drm/scheduler: modify args of drm_sched_entity_initNayan Deshmukh2018-07-131-4/+3
| | | | | | | | | | | | | | | | | | | | replace run queue by a list of run queues and remove the sched arg as that is part of run queue itself Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | Merge tag 'drm-misc-next-2018-07-11' of ↵Dave Airlie2018-07-195-38/+30
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 4.19: Cross-subsystem Changes: - many dt-bindings Doc changes Core Changes: - Encoder clean ups (Ville Syrjälä) - Connector Writeback improvements(Boris Brezillon) - Fake vblank support (Boris Brezillon) - API for in-kernel clients (Noralf Trønnes) - improvements to the path of finding panels(Boris Brezillon) Driver Changes: - initial support for the virtual display driver - vkms(Haneen Mohammed and Rodrigo Siqueira) - panel: add Rocktech RK070ER9427 LCD support (Jagan Teki) - panel: add support for the EDT ETM0700G0EDH6 and EDT ETM0700G0BDH6(Jan Tuerk) - panel: add DLC DLC0700YZG-1 (Philipp Zabel) - panel: add support for BOE HV070WSA-100 (Andrzej Hajda) - panel: add newhaven, nhd-4.3-480272ef-atxl LCD (Tomi Valkeinen) - panel: add support for Innolux G070Y2-L01 (Christoph Fritz) - panel: add support for DataImage SCF0700C48GGU18 (Michal Vokáč) - panel: add support for Sharp LQ035Q7DB03 (Vladimir Zapolskiy) - panel: p079zca: Refactor panel driver to support multiple panels (Lin Huang) - sun4i: Add R40 display engine compatible(Jernej Skrabec) Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180712011137.GA26620@juma
| * drm/v3d: Fix a grammar nit in the scheduler docs.Eric Anholt2018-07-051-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Eric Anholt <eric@anholt.net> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20180703170515.6298-4-eric@anholt.net Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Daniel Vetter <daniel@ffwll.ch>
| * drm/v3d: Remove unnecessary dma_fence_ops.Eric Anholt2018-07-051-12/+0
| | | | | | | | | | | | | | | | | | | | | | The dma-fence core as of commit 418cc6ca0607 ("dma-fence: Make ->wait callback optional") provides appropriate defaults for these methods. Signed-off-by: Eric Anholt <eric@anholt.net> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20180703170515.6298-2-eric@anholt.net Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Daniel Vetter <daniel@ffwll.ch>