Merge tag 'drm-misc-next-2018-11-28' of 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
This commit is contained in:
@@ -210,14 +210,11 @@ static void
|
||||
v3d_attach_object_fences(struct v3d_exec_info *exec)
|
||||
{
|
||||
struct dma_fence *out_fence = exec->render_done_fence;
|
||||
struct v3d_bo *bo;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < exec->bo_count; i++) {
|
||||
bo = to_v3d_bo(&exec->bo[i]->base);
|
||||
|
||||
/* XXX: Use shared fences for read-only objects. */
|
||||
reservation_object_add_excl_fence(bo->resv, out_fence);
|
||||
reservation_object_add_excl_fence(exec->bo[i]->resv, out_fence);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,11 +225,8 @@ v3d_unlock_bo_reservations(struct drm_device *dev,
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < exec->bo_count; i++) {
|
||||
struct v3d_bo *bo = to_v3d_bo(&exec->bo[i]->base);
|
||||
|
||||
ww_mutex_unlock(&bo->resv->lock);
|
||||
}
|
||||
for (i = 0; i < exec->bo_count; i++)
|
||||
ww_mutex_unlock(&exec->bo[i]->resv->lock);
|
||||
|
||||
ww_acquire_fini(acquire_ctx);
|
||||
}
|
||||
@@ -251,13 +245,13 @@ v3d_lock_bo_reservations(struct drm_device *dev,
|
||||
{
|
||||
int contended_lock = -1;
|
||||
int i, ret;
|
||||
struct v3d_bo *bo;
|
||||
|
||||
ww_acquire_init(acquire_ctx, &reservation_ww_class);
|
||||
|
||||
retry:
|
||||
if (contended_lock != -1) {
|
||||
bo = to_v3d_bo(&exec->bo[contended_lock]->base);
|
||||
struct v3d_bo *bo = exec->bo[contended_lock];
|
||||
|
||||
ret = ww_mutex_lock_slow_interruptible(&bo->resv->lock,
|
||||
acquire_ctx);
|
||||
if (ret) {
|
||||
@@ -270,19 +264,16 @@ retry:
|
||||
if (i == contended_lock)
|
||||
continue;
|
||||
|
||||
bo = to_v3d_bo(&exec->bo[i]->base);
|
||||
|
||||
ret = ww_mutex_lock_interruptible(&bo->resv->lock, acquire_ctx);
|
||||
ret = ww_mutex_lock_interruptible(&exec->bo[i]->resv->lock,
|
||||
acquire_ctx);
|
||||
if (ret) {
|
||||
int j;
|
||||
|
||||
for (j = 0; j < i; j++) {
|
||||
bo = to_v3d_bo(&exec->bo[j]->base);
|
||||
ww_mutex_unlock(&bo->resv->lock);
|
||||
}
|
||||
for (j = 0; j < i; j++)
|
||||
ww_mutex_unlock(&exec->bo[j]->resv->lock);
|
||||
|
||||
if (contended_lock != -1 && contended_lock >= i) {
|
||||
bo = to_v3d_bo(&exec->bo[contended_lock]->base);
|
||||
struct v3d_bo *bo = exec->bo[contended_lock];
|
||||
|
||||
ww_mutex_unlock(&bo->resv->lock);
|
||||
}
|
||||
@@ -303,9 +294,7 @@ retry:
|
||||
* before we commit the CL to the hardware.
|
||||
*/
|
||||
for (i = 0; i < exec->bo_count; i++) {
|
||||
bo = to_v3d_bo(&exec->bo[i]->base);
|
||||
|
||||
ret = reservation_object_reserve_shared(bo->resv, 1);
|
||||
ret = reservation_object_reserve_shared(exec->bo[i]->resv, 1);
|
||||
if (ret) {
|
||||
v3d_unlock_bo_reservations(dev, exec, acquire_ctx);
|
||||
return ret;
|
||||
|
@@ -41,7 +41,7 @@ v3d_job_free(struct drm_sched_job *sched_job)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the fences that the bin job depends on, one by one.
|
||||
* Returns the fences that the bin or render job depends on, one by one.
|
||||
* v3d_job_run() won't be called until all of them have been signaled.
|
||||
*/
|
||||
static struct dma_fence *
|
||||
|
Reference in New Issue
Block a user