You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/amd/xgbe/xgbe-desc.c drivers/net/ethernet/renesas/sh_eth.c Overlapping changes in both conflict cases. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -383,7 +383,7 @@ o <http://www.iptables.org/downloads.html>
|
|||||||
|
|
||||||
Ip-route2
|
Ip-route2
|
||||||
---------
|
---------
|
||||||
o <ftp://ftp.tux.org/pub/net/ip-routing/iproute2-2.2.4-now-ss991023.tar.gz>
|
o <https://www.kernel.org/pub/linux/utils/net/iproute2/>
|
||||||
|
|
||||||
OProfile
|
OProfile
|
||||||
--------
|
--------
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
VERSION = 3
|
VERSION = 3
|
||||||
PATCHLEVEL = 18
|
PATCHLEVEL = 18
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc6
|
EXTRAVERSION = -rc7
|
||||||
NAME = Diseased Newt
|
NAME = Diseased Newt
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ static inline void emit_mod(unsigned int dst, unsigned int src,
|
|||||||
u32 *p = &ctx->target[ctx->idx];
|
u32 *p = &ctx->target[ctx->idx];
|
||||||
uasm_i_divu(&p, dst, src);
|
uasm_i_divu(&p, dst, src);
|
||||||
p = &ctx->target[ctx->idx + 1];
|
p = &ctx->target[ctx->idx + 1];
|
||||||
uasm_i_mflo(&p, dst);
|
uasm_i_mfhi(&p, dst);
|
||||||
}
|
}
|
||||||
ctx->idx += 2; /* 2 insts */
|
ctx->idx += 2; /* 2 insts */
|
||||||
}
|
}
|
||||||
@@ -971,7 +971,7 @@ load_ind:
|
|||||||
break;
|
break;
|
||||||
case BPF_ALU | BPF_MOD | BPF_K:
|
case BPF_ALU | BPF_MOD | BPF_K:
|
||||||
/* A %= k */
|
/* A %= k */
|
||||||
if (k == 1 || optimize_div(&k)) {
|
if (k == 1) {
|
||||||
ctx->flags |= SEEN_A;
|
ctx->flags |= SEEN_A;
|
||||||
emit_jit_reg_move(r_A, r_zero, ctx);
|
emit_jit_reg_move(r_A, r_zero, ctx);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -54,12 +54,8 @@ void s390_handle_mcck(void)
|
|||||||
*/
|
*/
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
local_mcck_disable();
|
local_mcck_disable();
|
||||||
/*
|
mcck = *this_cpu_ptr(&cpu_mcck);
|
||||||
* Ummm... Does this make sense at all? Copying the percpu struct
|
memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck));
|
||||||
* and then zapping it one statement later?
|
|
||||||
*/
|
|
||||||
memcpy(&mcck, this_cpu_ptr(&cpu_mcck), sizeof(mcck));
|
|
||||||
memset(&mcck, 0, sizeof(struct mcck_struct));
|
|
||||||
clear_cpu_flag(CIF_MCCK_PENDING);
|
clear_cpu_flag(CIF_MCCK_PENDING);
|
||||||
local_mcck_enable();
|
local_mcck_enable();
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ static void jit_fill_hole(void *area, unsigned int size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct jit_context {
|
struct jit_context {
|
||||||
unsigned int cleanup_addr; /* epilogue code offset */
|
int cleanup_addr; /* epilogue code offset */
|
||||||
bool seen_ld_abs;
|
bool seen_ld_abs;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -192,6 +192,7 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
|
|||||||
struct bpf_insn *insn = bpf_prog->insnsi;
|
struct bpf_insn *insn = bpf_prog->insnsi;
|
||||||
int insn_cnt = bpf_prog->len;
|
int insn_cnt = bpf_prog->len;
|
||||||
bool seen_ld_abs = ctx->seen_ld_abs | (oldproglen == 0);
|
bool seen_ld_abs = ctx->seen_ld_abs | (oldproglen == 0);
|
||||||
|
bool seen_exit = false;
|
||||||
u8 temp[BPF_MAX_INSN_SIZE + BPF_INSN_SAFETY];
|
u8 temp[BPF_MAX_INSN_SIZE + BPF_INSN_SAFETY];
|
||||||
int i;
|
int i;
|
||||||
int proglen = 0;
|
int proglen = 0;
|
||||||
@@ -854,10 +855,11 @@ common_load:
|
|||||||
goto common_load;
|
goto common_load;
|
||||||
|
|
||||||
case BPF_JMP | BPF_EXIT:
|
case BPF_JMP | BPF_EXIT:
|
||||||
if (i != insn_cnt - 1) {
|
if (seen_exit) {
|
||||||
jmp_offset = ctx->cleanup_addr - addrs[i];
|
jmp_offset = ctx->cleanup_addr - addrs[i];
|
||||||
goto emit_jmp;
|
goto emit_jmp;
|
||||||
}
|
}
|
||||||
|
seen_exit = true;
|
||||||
/* update cleanup_addr */
|
/* update cleanup_addr */
|
||||||
ctx->cleanup_addr = proglen;
|
ctx->cleanup_addr = proglen;
|
||||||
/* mov rbx, qword ptr [rbp-X] */
|
/* mov rbx, qword ptr [rbp-X] */
|
||||||
|
|||||||
@@ -216,9 +216,10 @@ static int bio_integrity_process(struct bio *bio,
|
|||||||
{
|
{
|
||||||
struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev);
|
struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev);
|
||||||
struct blk_integrity_iter iter;
|
struct blk_integrity_iter iter;
|
||||||
struct bio_vec *bv;
|
struct bvec_iter bviter;
|
||||||
|
struct bio_vec bv;
|
||||||
struct bio_integrity_payload *bip = bio_integrity(bio);
|
struct bio_integrity_payload *bip = bio_integrity(bio);
|
||||||
unsigned int i, ret = 0;
|
unsigned int ret = 0;
|
||||||
void *prot_buf = page_address(bip->bip_vec->bv_page) +
|
void *prot_buf = page_address(bip->bip_vec->bv_page) +
|
||||||
bip->bip_vec->bv_offset;
|
bip->bip_vec->bv_offset;
|
||||||
|
|
||||||
@@ -227,11 +228,11 @@ static int bio_integrity_process(struct bio *bio,
|
|||||||
iter.seed = bip_get_seed(bip);
|
iter.seed = bip_get_seed(bip);
|
||||||
iter.prot_buf = prot_buf;
|
iter.prot_buf = prot_buf;
|
||||||
|
|
||||||
bio_for_each_segment_all(bv, bio, i) {
|
bio_for_each_segment(bv, bio, bviter) {
|
||||||
void *kaddr = kmap_atomic(bv->bv_page);
|
void *kaddr = kmap_atomic(bv.bv_page);
|
||||||
|
|
||||||
iter.data_buf = kaddr + bv->bv_offset;
|
iter.data_buf = kaddr + bv.bv_offset;
|
||||||
iter.data_size = bv->bv_len;
|
iter.data_size = bv.bv_len;
|
||||||
|
|
||||||
ret = proc_fn(&iter);
|
ret = proc_fn(&iter);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|||||||
@@ -9408,6 +9408,10 @@ static bool page_flip_finished(struct intel_crtc *crtc)
|
|||||||
struct drm_device *dev = crtc->base.dev;
|
struct drm_device *dev = crtc->base.dev;
|
||||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||||
|
|
||||||
|
if (i915_reset_in_progress(&dev_priv->gpu_error) ||
|
||||||
|
crtc->reset_counter != atomic_read(&dev_priv->gpu_error.reset_counter))
|
||||||
|
return true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The relevant registers doen't exist on pre-ctg.
|
* The relevant registers doen't exist on pre-ctg.
|
||||||
* As the flip done interrupt doesn't trigger for mmio
|
* As the flip done interrupt doesn't trigger for mmio
|
||||||
|
|||||||
@@ -4450,6 +4450,7 @@ static void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
|
|||||||
* vdd might still be enabled do to the delayed vdd off.
|
* vdd might still be enabled do to the delayed vdd off.
|
||||||
* Make sure vdd is actually turned off here.
|
* Make sure vdd is actually turned off here.
|
||||||
*/
|
*/
|
||||||
|
cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
|
||||||
pps_lock(intel_dp);
|
pps_lock(intel_dp);
|
||||||
edp_panel_vdd_off_sync(intel_dp);
|
edp_panel_vdd_off_sync(intel_dp);
|
||||||
pps_unlock(intel_dp);
|
pps_unlock(intel_dp);
|
||||||
|
|||||||
@@ -218,7 +218,6 @@ nvc0_identify(struct nouveau_device *device)
|
|||||||
device->oclass[NVDEV_ENGINE_BSP ] = &nvc0_bsp_oclass;
|
device->oclass[NVDEV_ENGINE_BSP ] = &nvc0_bsp_oclass;
|
||||||
device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass;
|
device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass;
|
||||||
device->oclass[NVDEV_ENGINE_COPY0 ] = &nvc0_copy0_oclass;
|
device->oclass[NVDEV_ENGINE_COPY0 ] = &nvc0_copy0_oclass;
|
||||||
device->oclass[NVDEV_ENGINE_COPY1 ] = &nvc0_copy1_oclass;
|
|
||||||
device->oclass[NVDEV_ENGINE_DISP ] = nva3_disp_oclass;
|
device->oclass[NVDEV_ENGINE_DISP ] = nva3_disp_oclass;
|
||||||
device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
|
device->oclass[NVDEV_ENGINE_PERFMON] = &nvc0_perfmon_oclass;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -551,8 +551,8 @@ nv04_fifo_intr(struct nouveau_subdev *subdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (status & 0x40000000) {
|
if (status & 0x40000000) {
|
||||||
nouveau_fifo_uevent(&priv->base);
|
|
||||||
nv_wr32(priv, 0x002100, 0x40000000);
|
nv_wr32(priv, 0x002100, 0x40000000);
|
||||||
|
nouveau_fifo_uevent(&priv->base);
|
||||||
status &= ~0x40000000;
|
status &= ~0x40000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -740,6 +740,8 @@ nvc0_fifo_intr_engine_unit(struct nvc0_fifo_priv *priv, int engn)
|
|||||||
u32 inte = nv_rd32(priv, 0x002628);
|
u32 inte = nv_rd32(priv, 0x002628);
|
||||||
u32 unkn;
|
u32 unkn;
|
||||||
|
|
||||||
|
nv_wr32(priv, 0x0025a8 + (engn * 0x04), intr);
|
||||||
|
|
||||||
for (unkn = 0; unkn < 8; unkn++) {
|
for (unkn = 0; unkn < 8; unkn++) {
|
||||||
u32 ints = (intr >> (unkn * 0x04)) & inte;
|
u32 ints = (intr >> (unkn * 0x04)) & inte;
|
||||||
if (ints & 0x1) {
|
if (ints & 0x1) {
|
||||||
@@ -751,8 +753,6 @@ nvc0_fifo_intr_engine_unit(struct nvc0_fifo_priv *priv, int engn)
|
|||||||
nv_mask(priv, 0x002628, ints, 0);
|
nv_mask(priv, 0x002628, ints, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nv_wr32(priv, 0x0025a8 + (engn * 0x04), intr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -952,8 +952,8 @@ nve0_fifo_intr(struct nouveau_subdev *subdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (stat & 0x80000000) {
|
if (stat & 0x80000000) {
|
||||||
nve0_fifo_intr_engine(priv);
|
|
||||||
nv_wr32(priv, 0x002100, 0x80000000);
|
nv_wr32(priv, 0x002100, 0x80000000);
|
||||||
|
nve0_fifo_intr_engine(priv);
|
||||||
stat &= ~0x80000000;
|
stat &= ~0x80000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -629,7 +629,6 @@ int nouveau_pmops_suspend(struct device *dev)
|
|||||||
|
|
||||||
pci_save_state(pdev);
|
pci_save_state(pdev);
|
||||||
pci_disable_device(pdev);
|
pci_disable_device(pdev);
|
||||||
pci_ignore_hotplug(pdev);
|
|
||||||
pci_set_power_state(pdev, PCI_D3hot);
|
pci_set_power_state(pdev, PCI_D3hot);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -933,6 +932,7 @@ static int nouveau_pmops_runtime_suspend(struct device *dev)
|
|||||||
ret = nouveau_do_suspend(drm_dev, true);
|
ret = nouveau_do_suspend(drm_dev, true);
|
||||||
pci_save_state(pdev);
|
pci_save_state(pdev);
|
||||||
pci_disable_device(pdev);
|
pci_disable_device(pdev);
|
||||||
|
pci_ignore_hotplug(pdev);
|
||||||
pci_set_power_state(pdev, PCI_D3cold);
|
pci_set_power_state(pdev, PCI_D3cold);
|
||||||
drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF;
|
drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF;
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -52,20 +52,24 @@ nouveau_fctx(struct nouveau_fence *fence)
|
|||||||
return container_of(fence->base.lock, struct nouveau_fence_chan, lock);
|
return container_of(fence->base.lock, struct nouveau_fence_chan, lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
nouveau_fence_signal(struct nouveau_fence *fence)
|
nouveau_fence_signal(struct nouveau_fence *fence)
|
||||||
{
|
{
|
||||||
|
int drop = 0;
|
||||||
|
|
||||||
fence_signal_locked(&fence->base);
|
fence_signal_locked(&fence->base);
|
||||||
list_del(&fence->head);
|
list_del(&fence->head);
|
||||||
|
rcu_assign_pointer(fence->channel, NULL);
|
||||||
|
|
||||||
if (test_bit(FENCE_FLAG_USER_BITS, &fence->base.flags)) {
|
if (test_bit(FENCE_FLAG_USER_BITS, &fence->base.flags)) {
|
||||||
struct nouveau_fence_chan *fctx = nouveau_fctx(fence);
|
struct nouveau_fence_chan *fctx = nouveau_fctx(fence);
|
||||||
|
|
||||||
if (!--fctx->notify_ref)
|
if (!--fctx->notify_ref)
|
||||||
nvif_notify_put(&fctx->notify);
|
drop = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fence_put(&fence->base);
|
fence_put(&fence->base);
|
||||||
|
return drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nouveau_fence *
|
static struct nouveau_fence *
|
||||||
@@ -88,16 +92,23 @@ nouveau_fence_context_del(struct nouveau_fence_chan *fctx)
|
|||||||
{
|
{
|
||||||
struct nouveau_fence *fence;
|
struct nouveau_fence *fence;
|
||||||
|
|
||||||
nvif_notify_fini(&fctx->notify);
|
|
||||||
|
|
||||||
spin_lock_irq(&fctx->lock);
|
spin_lock_irq(&fctx->lock);
|
||||||
while (!list_empty(&fctx->pending)) {
|
while (!list_empty(&fctx->pending)) {
|
||||||
fence = list_entry(fctx->pending.next, typeof(*fence), head);
|
fence = list_entry(fctx->pending.next, typeof(*fence), head);
|
||||||
|
|
||||||
nouveau_fence_signal(fence);
|
if (nouveau_fence_signal(fence))
|
||||||
fence->channel = NULL;
|
nvif_notify_put(&fctx->notify);
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&fctx->lock);
|
spin_unlock_irq(&fctx->lock);
|
||||||
|
|
||||||
|
nvif_notify_fini(&fctx->notify);
|
||||||
|
fctx->dead = 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ensure that all accesses to fence->channel complete before freeing
|
||||||
|
* the channel.
|
||||||
|
*/
|
||||||
|
synchronize_rcu();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -112,21 +123,23 @@ nouveau_fence_context_free(struct nouveau_fence_chan *fctx)
|
|||||||
kref_put(&fctx->fence_ref, nouveau_fence_context_put);
|
kref_put(&fctx->fence_ref, nouveau_fence_context_put);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
nouveau_fence_update(struct nouveau_channel *chan, struct nouveau_fence_chan *fctx)
|
nouveau_fence_update(struct nouveau_channel *chan, struct nouveau_fence_chan *fctx)
|
||||||
{
|
{
|
||||||
struct nouveau_fence *fence;
|
struct nouveau_fence *fence;
|
||||||
|
int drop = 0;
|
||||||
u32 seq = fctx->read(chan);
|
u32 seq = fctx->read(chan);
|
||||||
|
|
||||||
while (!list_empty(&fctx->pending)) {
|
while (!list_empty(&fctx->pending)) {
|
||||||
fence = list_entry(fctx->pending.next, typeof(*fence), head);
|
fence = list_entry(fctx->pending.next, typeof(*fence), head);
|
||||||
|
|
||||||
if ((int)(seq - fence->base.seqno) < 0)
|
if ((int)(seq - fence->base.seqno) < 0)
|
||||||
return;
|
break;
|
||||||
|
|
||||||
nouveau_fence_signal(fence);
|
drop |= nouveau_fence_signal(fence);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -135,18 +148,21 @@ nouveau_fence_wait_uevent_handler(struct nvif_notify *notify)
|
|||||||
struct nouveau_fence_chan *fctx =
|
struct nouveau_fence_chan *fctx =
|
||||||
container_of(notify, typeof(*fctx), notify);
|
container_of(notify, typeof(*fctx), notify);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
int ret = NVIF_NOTIFY_KEEP;
|
||||||
|
|
||||||
spin_lock_irqsave(&fctx->lock, flags);
|
spin_lock_irqsave(&fctx->lock, flags);
|
||||||
if (!list_empty(&fctx->pending)) {
|
if (!list_empty(&fctx->pending)) {
|
||||||
struct nouveau_fence *fence;
|
struct nouveau_fence *fence;
|
||||||
|
struct nouveau_channel *chan;
|
||||||
|
|
||||||
fence = list_entry(fctx->pending.next, typeof(*fence), head);
|
fence = list_entry(fctx->pending.next, typeof(*fence), head);
|
||||||
nouveau_fence_update(fence->channel, fctx);
|
chan = rcu_dereference_protected(fence->channel, lockdep_is_held(&fctx->lock));
|
||||||
|
if (nouveau_fence_update(fence->channel, fctx))
|
||||||
|
ret = NVIF_NOTIFY_DROP;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&fctx->lock, flags);
|
spin_unlock_irqrestore(&fctx->lock, flags);
|
||||||
|
|
||||||
/* Always return keep here. NVIF refcount is handled with nouveau_fence_update */
|
return ret;
|
||||||
return NVIF_NOTIFY_KEEP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -262,7 +278,10 @@ nouveau_fence_emit(struct nouveau_fence *fence, struct nouveau_channel *chan)
|
|||||||
if (!ret) {
|
if (!ret) {
|
||||||
fence_get(&fence->base);
|
fence_get(&fence->base);
|
||||||
spin_lock_irq(&fctx->lock);
|
spin_lock_irq(&fctx->lock);
|
||||||
nouveau_fence_update(chan, fctx);
|
|
||||||
|
if (nouveau_fence_update(chan, fctx))
|
||||||
|
nvif_notify_put(&fctx->notify);
|
||||||
|
|
||||||
list_add_tail(&fence->head, &fctx->pending);
|
list_add_tail(&fence->head, &fctx->pending);
|
||||||
spin_unlock_irq(&fctx->lock);
|
spin_unlock_irq(&fctx->lock);
|
||||||
}
|
}
|
||||||
@@ -276,13 +295,16 @@ nouveau_fence_done(struct nouveau_fence *fence)
|
|||||||
if (fence->base.ops == &nouveau_fence_ops_legacy ||
|
if (fence->base.ops == &nouveau_fence_ops_legacy ||
|
||||||
fence->base.ops == &nouveau_fence_ops_uevent) {
|
fence->base.ops == &nouveau_fence_ops_uevent) {
|
||||||
struct nouveau_fence_chan *fctx = nouveau_fctx(fence);
|
struct nouveau_fence_chan *fctx = nouveau_fctx(fence);
|
||||||
|
struct nouveau_channel *chan;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (test_bit(FENCE_FLAG_SIGNALED_BIT, &fence->base.flags))
|
if (test_bit(FENCE_FLAG_SIGNALED_BIT, &fence->base.flags))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
spin_lock_irqsave(&fctx->lock, flags);
|
spin_lock_irqsave(&fctx->lock, flags);
|
||||||
nouveau_fence_update(fence->channel, fctx);
|
chan = rcu_dereference_protected(fence->channel, lockdep_is_held(&fctx->lock));
|
||||||
|
if (chan && nouveau_fence_update(chan, fctx))
|
||||||
|
nvif_notify_put(&fctx->notify);
|
||||||
spin_unlock_irqrestore(&fctx->lock, flags);
|
spin_unlock_irqrestore(&fctx->lock, flags);
|
||||||
}
|
}
|
||||||
return fence_is_signaled(&fence->base);
|
return fence_is_signaled(&fence->base);
|
||||||
@@ -387,12 +409,18 @@ nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan, bool e
|
|||||||
|
|
||||||
if (fence && (!exclusive || !fobj || !fobj->shared_count)) {
|
if (fence && (!exclusive || !fobj || !fobj->shared_count)) {
|
||||||
struct nouveau_channel *prev = NULL;
|
struct nouveau_channel *prev = NULL;
|
||||||
|
bool must_wait = true;
|
||||||
|
|
||||||
f = nouveau_local_fence(fence, chan->drm);
|
f = nouveau_local_fence(fence, chan->drm);
|
||||||
if (f)
|
if (f) {
|
||||||
prev = f->channel;
|
rcu_read_lock();
|
||||||
|
prev = rcu_dereference(f->channel);
|
||||||
|
if (prev && (prev == chan || fctx->sync(f, prev, chan) == 0))
|
||||||
|
must_wait = false;
|
||||||
|
rcu_read_unlock();
|
||||||
|
}
|
||||||
|
|
||||||
if (!prev || (prev != chan && (ret = fctx->sync(f, prev, chan))))
|
if (must_wait)
|
||||||
ret = fence_wait(fence, intr);
|
ret = fence_wait(fence, intr);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -403,19 +431,22 @@ nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan, bool e
|
|||||||
|
|
||||||
for (i = 0; i < fobj->shared_count && !ret; ++i) {
|
for (i = 0; i < fobj->shared_count && !ret; ++i) {
|
||||||
struct nouveau_channel *prev = NULL;
|
struct nouveau_channel *prev = NULL;
|
||||||
|
bool must_wait = true;
|
||||||
|
|
||||||
fence = rcu_dereference_protected(fobj->shared[i],
|
fence = rcu_dereference_protected(fobj->shared[i],
|
||||||
reservation_object_held(resv));
|
reservation_object_held(resv));
|
||||||
|
|
||||||
f = nouveau_local_fence(fence, chan->drm);
|
f = nouveau_local_fence(fence, chan->drm);
|
||||||
if (f)
|
if (f) {
|
||||||
prev = f->channel;
|
rcu_read_lock();
|
||||||
|
prev = rcu_dereference(f->channel);
|
||||||
|
if (prev && (prev == chan || fctx->sync(f, prev, chan) == 0))
|
||||||
|
must_wait = false;
|
||||||
|
rcu_read_unlock();
|
||||||
|
}
|
||||||
|
|
||||||
if (!prev || (prev != chan && (ret = fctx->sync(f, prev, chan))))
|
if (must_wait)
|
||||||
ret = fence_wait(fence, intr);
|
ret = fence_wait(fence, intr);
|
||||||
|
|
||||||
if (ret)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -463,7 +494,7 @@ static const char *nouveau_fence_get_timeline_name(struct fence *f)
|
|||||||
struct nouveau_fence *fence = from_fence(f);
|
struct nouveau_fence *fence = from_fence(f);
|
||||||
struct nouveau_fence_chan *fctx = nouveau_fctx(fence);
|
struct nouveau_fence_chan *fctx = nouveau_fctx(fence);
|
||||||
|
|
||||||
return fence->channel ? fctx->name : "dead channel";
|
return !fctx->dead ? fctx->name : "dead channel";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -476,9 +507,16 @@ static bool nouveau_fence_is_signaled(struct fence *f)
|
|||||||
{
|
{
|
||||||
struct nouveau_fence *fence = from_fence(f);
|
struct nouveau_fence *fence = from_fence(f);
|
||||||
struct nouveau_fence_chan *fctx = nouveau_fctx(fence);
|
struct nouveau_fence_chan *fctx = nouveau_fctx(fence);
|
||||||
struct nouveau_channel *chan = fence->channel;
|
struct nouveau_channel *chan;
|
||||||
|
bool ret = false;
|
||||||
|
|
||||||
return (int)(fctx->read(chan) - fence->base.seqno) >= 0;
|
rcu_read_lock();
|
||||||
|
chan = rcu_dereference(fence->channel);
|
||||||
|
if (chan)
|
||||||
|
ret = (int)(fctx->read(chan) - fence->base.seqno) >= 0;
|
||||||
|
rcu_read_unlock();
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool nouveau_fence_no_signaling(struct fence *f)
|
static bool nouveau_fence_no_signaling(struct fence *f)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ struct nouveau_fence {
|
|||||||
|
|
||||||
bool sysmem;
|
bool sysmem;
|
||||||
|
|
||||||
struct nouveau_channel *channel;
|
struct nouveau_channel __rcu *channel;
|
||||||
unsigned long timeout;
|
unsigned long timeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ struct nouveau_fence_chan {
|
|||||||
char name[32];
|
char name[32];
|
||||||
|
|
||||||
struct nvif_notify notify;
|
struct nvif_notify notify;
|
||||||
int notify_ref;
|
int notify_ref, dead;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nouveau_fence_priv {
|
struct nouveau_fence_priv {
|
||||||
|
|||||||
@@ -322,6 +322,12 @@ static void radeon_connector_get_edid(struct drm_connector *connector)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!radeon_connector->edid) {
|
if (!radeon_connector->edid) {
|
||||||
|
/* don't fetch the edid from the vbios if ddc fails and runpm is
|
||||||
|
* enabled so we report disconnected.
|
||||||
|
*/
|
||||||
|
if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0))
|
||||||
|
return;
|
||||||
|
|
||||||
if (rdev->is_atom_bios) {
|
if (rdev->is_atom_bios) {
|
||||||
/* some laptops provide a hardcoded edid in rom for LCDs */
|
/* some laptops provide a hardcoded edid in rom for LCDs */
|
||||||
if (((connector->connector_type == DRM_MODE_CONNECTOR_LVDS) ||
|
if (((connector->connector_type == DRM_MODE_CONNECTOR_LVDS) ||
|
||||||
@@ -826,6 +832,8 @@ static int radeon_lvds_mode_valid(struct drm_connector *connector,
|
|||||||
static enum drm_connector_status
|
static enum drm_connector_status
|
||||||
radeon_lvds_detect(struct drm_connector *connector, bool force)
|
radeon_lvds_detect(struct drm_connector *connector, bool force)
|
||||||
{
|
{
|
||||||
|
struct drm_device *dev = connector->dev;
|
||||||
|
struct radeon_device *rdev = dev->dev_private;
|
||||||
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
|
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
|
||||||
struct drm_encoder *encoder = radeon_best_single_encoder(connector);
|
struct drm_encoder *encoder = radeon_best_single_encoder(connector);
|
||||||
enum drm_connector_status ret = connector_status_disconnected;
|
enum drm_connector_status ret = connector_status_disconnected;
|
||||||
@@ -842,7 +850,11 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
|
|||||||
/* check if panel is valid */
|
/* check if panel is valid */
|
||||||
if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240)
|
if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240)
|
||||||
ret = connector_status_connected;
|
ret = connector_status_connected;
|
||||||
|
/* don't fetch the edid from the vbios if ddc fails and runpm is
|
||||||
|
* enabled so we report disconnected.
|
||||||
|
*/
|
||||||
|
if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0))
|
||||||
|
ret = connector_status_disconnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check for edid as well */
|
/* check for edid as well */
|
||||||
@@ -1589,6 +1601,11 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
|
|||||||
/* check if panel is valid */
|
/* check if panel is valid */
|
||||||
if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240)
|
if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240)
|
||||||
ret = connector_status_connected;
|
ret = connector_status_connected;
|
||||||
|
/* don't fetch the edid from the vbios if ddc fails and runpm is
|
||||||
|
* enabled so we report disconnected.
|
||||||
|
*/
|
||||||
|
if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0))
|
||||||
|
ret = connector_status_disconnected;
|
||||||
}
|
}
|
||||||
/* eDP is always DP */
|
/* eDP is always DP */
|
||||||
radeon_dig_connector->dp_sink_type = CONNECTOR_OBJECT_ID_DISPLAYPORT;
|
radeon_dig_connector->dp_sink_type = CONNECTOR_OBJECT_ID_DISPLAYPORT;
|
||||||
|
|||||||
@@ -251,22 +251,19 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
|
|||||||
|
|
||||||
static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
|
static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
|
||||||
{
|
{
|
||||||
int i, r = 0;
|
struct radeon_cs_reloc *reloc;
|
||||||
|
int r;
|
||||||
|
|
||||||
for (i = 0; i < p->nrelocs; i++) {
|
list_for_each_entry(reloc, &p->validated, tv.head) {
|
||||||
struct reservation_object *resv;
|
struct reservation_object *resv;
|
||||||
|
|
||||||
if (!p->relocs[i].robj)
|
resv = reloc->robj->tbo.resv;
|
||||||
continue;
|
|
||||||
|
|
||||||
resv = p->relocs[i].robj->tbo.resv;
|
|
||||||
r = radeon_semaphore_sync_resv(p->rdev, p->ib.semaphore, resv,
|
r = radeon_semaphore_sync_resv(p->rdev, p->ib.semaphore, resv,
|
||||||
p->relocs[i].tv.shared);
|
reloc->tv.shared);
|
||||||
|
|
||||||
if (r)
|
if (r)
|
||||||
break;
|
return r;
|
||||||
}
|
}
|
||||||
return r;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: note that this is called from the legacy UMS CS ioctl as well */
|
/* XXX: note that this is called from the legacy UMS CS ioctl as well */
|
||||||
|
|||||||
@@ -795,6 +795,8 @@ int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,
|
|||||||
|
|
||||||
/* Get associated drm_crtc: */
|
/* Get associated drm_crtc: */
|
||||||
drmcrtc = &rdev->mode_info.crtcs[crtc]->base;
|
drmcrtc = &rdev->mode_info.crtcs[crtc]->base;
|
||||||
|
if (!drmcrtc)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* Helper routine in DRM core does all the work: */
|
/* Helper routine in DRM core does all the work: */
|
||||||
return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error,
|
return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error,
|
||||||
|
|||||||
@@ -213,6 +213,13 @@ int radeon_bo_create(struct radeon_device *rdev,
|
|||||||
if (!(rdev->flags & RADEON_IS_PCIE))
|
if (!(rdev->flags & RADEON_IS_PCIE))
|
||||||
bo->flags &= ~(RADEON_GEM_GTT_WC | RADEON_GEM_GTT_UC);
|
bo->flags &= ~(RADEON_GEM_GTT_WC | RADEON_GEM_GTT_UC);
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_32
|
||||||
|
/* XXX: Write-combined CPU mappings of GTT seem broken on 32-bit
|
||||||
|
* See https://bugs.freedesktop.org/show_bug.cgi?id=84627
|
||||||
|
*/
|
||||||
|
bo->flags &= ~RADEON_GEM_GTT_WC;
|
||||||
|
#endif
|
||||||
|
|
||||||
radeon_ttm_placement_from_domain(bo, domain);
|
radeon_ttm_placement_from_domain(bo, domain);
|
||||||
/* Kernel allocation are uninterruptible */
|
/* Kernel allocation are uninterruptible */
|
||||||
down_read(&rdev->pm.mclk_lock);
|
down_read(&rdev->pm.mclk_lock);
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ int i2c_dw_init(struct dw_i2c_dev *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Configure Tx/Rx FIFO threshold levels */
|
/* Configure Tx/Rx FIFO threshold levels */
|
||||||
dw_writel(dev, dev->tx_fifo_depth - 1, DW_IC_TX_TL);
|
dw_writel(dev, dev->tx_fifo_depth / 2, DW_IC_TX_TL);
|
||||||
dw_writel(dev, 0, DW_IC_RX_TL);
|
dw_writel(dev, 0, DW_IC_RX_TL);
|
||||||
|
|
||||||
/* configure the i2c master */
|
/* configure the i2c master */
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user