Merge tag 'topic/drm-misc-2016-10-27' of git://anongit.freedesktop.org/git/drm-intel into drm-next
Pull request already again to get the s/fence/dma_fence/ stuff in and allow everyone to resync. Otherwise really just misc stuff all over, and a new bridge driver. * tag 'topic/drm-misc-2016-10-27' of git://anongit.freedesktop.org/git/drm-intel: drm/bridge: fix platform_no_drv_owner.cocci warnings drm/bridge: fix semicolon.cocci warnings drm: Print some debug/error info during DP dual mode detect drm: mark drm_of_component_match_add dummy inline drm/bridge: add Silicon Image SiI8620 driver dt-bindings: add Silicon Image SiI8620 bridge bindings video: add header file for Mobile High-Definition Link (MHL) interface drm: convert DT component matching to component_match_add_release() dma-buf: Rename struct fence to dma_fence dma-buf/fence: add an lockdep_assert_held() drm/dp: Factor out helper to distinguish between branch and sink devices drm/edid: Only print the bad edid when aborting drm/msm: add missing header dependencies drm/msm/adreno: move function declarations to header file drm/i2c/tda998x: mark symbol static where possible doc: add missing docbook parameter for fence-array drm: RIP mode_config->rotation_property drm/msm/mdp5: Advertize 180 degree rotation drm/msm/mdp5: Use per-plane rotation property
This commit is contained in:
@@ -108,7 +108,7 @@ fman_from_fence(struct vmw_fence_obj *fence)
|
||||
* objects with actions attached to them.
|
||||
*/
|
||||
|
||||
static void vmw_fence_obj_destroy(struct fence *f)
|
||||
static void vmw_fence_obj_destroy(struct dma_fence *f)
|
||||
{
|
||||
struct vmw_fence_obj *fence =
|
||||
container_of(f, struct vmw_fence_obj, base);
|
||||
@@ -123,17 +123,17 @@ static void vmw_fence_obj_destroy(struct fence *f)
|
||||
fence->destroy(fence);
|
||||
}
|
||||
|
||||
static const char *vmw_fence_get_driver_name(struct fence *f)
|
||||
static const char *vmw_fence_get_driver_name(struct dma_fence *f)
|
||||
{
|
||||
return "vmwgfx";
|
||||
}
|
||||
|
||||
static const char *vmw_fence_get_timeline_name(struct fence *f)
|
||||
static const char *vmw_fence_get_timeline_name(struct dma_fence *f)
|
||||
{
|
||||
return "svga";
|
||||
}
|
||||
|
||||
static bool vmw_fence_enable_signaling(struct fence *f)
|
||||
static bool vmw_fence_enable_signaling(struct dma_fence *f)
|
||||
{
|
||||
struct vmw_fence_obj *fence =
|
||||
container_of(f, struct vmw_fence_obj, base);
|
||||
@@ -152,12 +152,12 @@ static bool vmw_fence_enable_signaling(struct fence *f)
|
||||
}
|
||||
|
||||
struct vmwgfx_wait_cb {
|
||||
struct fence_cb base;
|
||||
struct dma_fence_cb base;
|
||||
struct task_struct *task;
|
||||
};
|
||||
|
||||
static void
|
||||
vmwgfx_wait_cb(struct fence *fence, struct fence_cb *cb)
|
||||
vmwgfx_wait_cb(struct dma_fence *fence, struct dma_fence_cb *cb)
|
||||
{
|
||||
struct vmwgfx_wait_cb *wait =
|
||||
container_of(cb, struct vmwgfx_wait_cb, base);
|
||||
@@ -167,7 +167,7 @@ vmwgfx_wait_cb(struct fence *fence, struct fence_cb *cb)
|
||||
|
||||
static void __vmw_fences_update(struct vmw_fence_manager *fman);
|
||||
|
||||
static long vmw_fence_wait(struct fence *f, bool intr, signed long timeout)
|
||||
static long vmw_fence_wait(struct dma_fence *f, bool intr, signed long timeout)
|
||||
{
|
||||
struct vmw_fence_obj *fence =
|
||||
container_of(f, struct vmw_fence_obj, base);
|
||||
@@ -197,7 +197,7 @@ static long vmw_fence_wait(struct fence *f, bool intr, signed long timeout)
|
||||
|
||||
while (ret > 0) {
|
||||
__vmw_fences_update(fman);
|
||||
if (test_bit(FENCE_FLAG_SIGNALED_BIT, &f->flags))
|
||||
if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &f->flags))
|
||||
break;
|
||||
|
||||
if (intr)
|
||||
@@ -225,7 +225,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct fence_ops vmw_fence_ops = {
|
||||
static struct dma_fence_ops vmw_fence_ops = {
|
||||
.get_driver_name = vmw_fence_get_driver_name,
|
||||
.get_timeline_name = vmw_fence_get_timeline_name,
|
||||
.enable_signaling = vmw_fence_enable_signaling,
|
||||
@@ -298,7 +298,7 @@ struct vmw_fence_manager *vmw_fence_manager_init(struct vmw_private *dev_priv)
|
||||
fman->event_fence_action_size =
|
||||
ttm_round_pot(sizeof(struct vmw_event_fence_action));
|
||||
mutex_init(&fman->goal_irq_mutex);
|
||||
fman->ctx = fence_context_alloc(1);
|
||||
fman->ctx = dma_fence_context_alloc(1);
|
||||
|
||||
return fman;
|
||||
}
|
||||
@@ -326,8 +326,8 @@ static int vmw_fence_obj_init(struct vmw_fence_manager *fman,
|
||||
unsigned long irq_flags;
|
||||
int ret = 0;
|
||||
|
||||
fence_init(&fence->base, &vmw_fence_ops, &fman->lock,
|
||||
fman->ctx, seqno);
|
||||
dma_fence_init(&fence->base, &vmw_fence_ops, &fman->lock,
|
||||
fman->ctx, seqno);
|
||||
INIT_LIST_HEAD(&fence->seq_passed_actions);
|
||||
fence->destroy = destroy;
|
||||
|
||||
@@ -431,7 +431,7 @@ static bool vmw_fence_goal_check_locked(struct vmw_fence_obj *fence)
|
||||
u32 goal_seqno;
|
||||
u32 *fifo_mem;
|
||||
|
||||
if (fence_is_signaled_locked(&fence->base))
|
||||
if (dma_fence_is_signaled_locked(&fence->base))
|
||||
return false;
|
||||
|
||||
fifo_mem = fman->dev_priv->mmio_virt;
|
||||
@@ -459,7 +459,7 @@ rerun:
|
||||
list_for_each_entry_safe(fence, next_fence, &fman->fence_list, head) {
|
||||
if (seqno - fence->base.seqno < VMW_FENCE_WRAP) {
|
||||
list_del_init(&fence->head);
|
||||
fence_signal_locked(&fence->base);
|
||||
dma_fence_signal_locked(&fence->base);
|
||||
INIT_LIST_HEAD(&action_list);
|
||||
list_splice_init(&fence->seq_passed_actions,
|
||||
&action_list);
|
||||
@@ -500,18 +500,18 @@ bool vmw_fence_obj_signaled(struct vmw_fence_obj *fence)
|
||||
{
|
||||
struct vmw_fence_manager *fman = fman_from_fence(fence);
|
||||
|
||||
if (test_bit(FENCE_FLAG_SIGNALED_BIT, &fence->base.flags))
|
||||
if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->base.flags))
|
||||
return 1;
|
||||
|
||||
vmw_fences_update(fman);
|
||||
|
||||
return fence_is_signaled(&fence->base);
|
||||
return dma_fence_is_signaled(&fence->base);
|
||||
}
|
||||
|
||||
int vmw_fence_obj_wait(struct vmw_fence_obj *fence, bool lazy,
|
||||
bool interruptible, unsigned long timeout)
|
||||
{
|
||||
long ret = fence_wait_timeout(&fence->base, interruptible, timeout);
|
||||
long ret = dma_fence_wait_timeout(&fence->base, interruptible, timeout);
|
||||
|
||||
if (likely(ret > 0))
|
||||
return 0;
|
||||
@@ -530,7 +530,7 @@ void vmw_fence_obj_flush(struct vmw_fence_obj *fence)
|
||||
|
||||
static void vmw_fence_destroy(struct vmw_fence_obj *fence)
|
||||
{
|
||||
fence_free(&fence->base);
|
||||
dma_fence_free(&fence->base);
|
||||
}
|
||||
|
||||
int vmw_fence_create(struct vmw_fence_manager *fman,
|
||||
@@ -669,7 +669,7 @@ void vmw_fence_fifo_down(struct vmw_fence_manager *fman)
|
||||
struct vmw_fence_obj *fence =
|
||||
list_entry(fman->fence_list.prev, struct vmw_fence_obj,
|
||||
head);
|
||||
fence_get(&fence->base);
|
||||
dma_fence_get(&fence->base);
|
||||
spin_unlock_irq(&fman->lock);
|
||||
|
||||
ret = vmw_fence_obj_wait(fence, false, false,
|
||||
@@ -677,7 +677,7 @@ void vmw_fence_fifo_down(struct vmw_fence_manager *fman)
|
||||
|
||||
if (unlikely(ret != 0)) {
|
||||
list_del_init(&fence->head);
|
||||
fence_signal(&fence->base);
|
||||
dma_fence_signal(&fence->base);
|
||||
INIT_LIST_HEAD(&action_list);
|
||||
list_splice_init(&fence->seq_passed_actions,
|
||||
&action_list);
|
||||
@@ -685,7 +685,7 @@ void vmw_fence_fifo_down(struct vmw_fence_manager *fman)
|
||||
}
|
||||
|
||||
BUG_ON(!list_empty(&fence->head));
|
||||
fence_put(&fence->base);
|
||||
dma_fence_put(&fence->base);
|
||||
spin_lock_irq(&fman->lock);
|
||||
}
|
||||
spin_unlock_irq(&fman->lock);
|
||||
@@ -884,7 +884,7 @@ static void vmw_fence_obj_add_action(struct vmw_fence_obj *fence,
|
||||
spin_lock_irqsave(&fman->lock, irq_flags);
|
||||
|
||||
fman->pending_actions[action->type]++;
|
||||
if (fence_is_signaled_locked(&fence->base)) {
|
||||
if (dma_fence_is_signaled_locked(&fence->base)) {
|
||||
struct list_head action_list;
|
||||
|
||||
INIT_LIST_HEAD(&action_list);
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#ifndef _VMWGFX_FENCE_H_
|
||||
|
||||
#include <linux/fence.h>
|
||||
#include <linux/dma-fence.h>
|
||||
|
||||
#define VMW_FENCE_WAIT_TIMEOUT (5*HZ)
|
||||
|
||||
@@ -52,7 +52,7 @@ struct vmw_fence_action {
|
||||
};
|
||||
|
||||
struct vmw_fence_obj {
|
||||
struct fence base;
|
||||
struct dma_fence base;
|
||||
|
||||
struct list_head head;
|
||||
struct list_head seq_passed_actions;
|
||||
@@ -71,14 +71,14 @@ vmw_fence_obj_unreference(struct vmw_fence_obj **fence_p)
|
||||
|
||||
*fence_p = NULL;
|
||||
if (fence)
|
||||
fence_put(&fence->base);
|
||||
dma_fence_put(&fence->base);
|
||||
}
|
||||
|
||||
static inline struct vmw_fence_obj *
|
||||
vmw_fence_obj_reference(struct vmw_fence_obj *fence)
|
||||
{
|
||||
if (fence)
|
||||
fence_get(&fence->base);
|
||||
dma_fence_get(&fence->base);
|
||||
return fence;
|
||||
}
|
||||
|
||||
|
@@ -1454,7 +1454,7 @@ void vmw_fence_single_bo(struct ttm_buffer_object *bo,
|
||||
if (fence == NULL) {
|
||||
vmw_execbuf_fence_commands(NULL, dev_priv, &fence, NULL);
|
||||
reservation_object_add_excl_fence(bo->resv, &fence->base);
|
||||
fence_put(&fence->base);
|
||||
dma_fence_put(&fence->base);
|
||||
} else
|
||||
reservation_object_add_excl_fence(bo->resv, &fence->base);
|
||||
}
|
||||
|
Reference in New Issue
Block a user