Skip to content

Commit 2f650bf

Browse files
committed
at linux version 5.6.14
1 parent 382ae02 commit 2f650bf

8 files changed

Lines changed: 30 additions & 34 deletions

File tree

sys/external/bsd/drm2/dist/drm/i915/i915_drv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,6 +1640,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
16401640
(IS_ICELAKE(p) && IS_REVID(p, since, until))
16411641

16421642
#define TGL_REVID_A0 0x0
1643+
#define TGL_REVID_B0 0x1
1644+
#define TGL_REVID_C0 0x2
16431645

16441646
#define IS_TGL_REVID(p, since, until) \
16451647
(IS_TIGERLAKE(p) && IS_REVID(p, since, until))

sys/external/bsd/drm2/dist/drm/i915/i915_gem_evict.c

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ i915_gem_evict_something(struct i915_address_space *vm,
137137
active = NULL;
138138
INIT_LIST_HEAD(&eviction_list);
139139
list_for_each_entry_safe(vma, next, &vm->bound_list, vm_link) {
140+
if (vma == active) { /* now seen this vma twice */
141+
if (flags & PIN_NONBLOCK)
142+
break;
143+
144+
active = ERR_PTR(-EAGAIN);
145+
}
146+
140147
/*
141148
* We keep this list in a rough least-recently scanned order
142149
* of active elements (inactive elements are cheap to reap).
@@ -152,21 +159,12 @@ i915_gem_evict_something(struct i915_address_space *vm,
152159
* To notice when we complete one full cycle, we record the
153160
* first active element seen, before moving it to the tail.
154161
*/
155-
if (i915_vma_is_active(vma)) {
156-
if (vma == active) {
157-
if (flags & PIN_NONBLOCK)
158-
break;
159-
160-
active = ERR_PTR(-EAGAIN);
161-
}
162-
163-
if (active != ERR_PTR(-EAGAIN)) {
164-
if (!active)
165-
active = vma;
162+
if (active != ERR_PTR(-EAGAIN) && i915_vma_is_active(vma)) {
163+
if (!active)
164+
active = vma;
166165

167-
list_move_tail(&vma->vm_link, &vm->bound_list);
168-
continue;
169-
}
166+
list_move_tail(&vma->vm_link, &vm->bound_list);
167+
continue;
170168
}
171169

172170
if (mark_free(&scan, vma, flags, &eviction_list))

sys/external/bsd/drm2/dist/drm/i915/i915_irq.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,26 +3339,16 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
33393339
u32 de_pipe_masked = gen8_de_pipe_fault_mask(dev_priv) |
33403340
GEN8_PIPE_CDCLK_CRC_DONE;
33413341
u32 de_pipe_enables;
3342-
u32 de_port_masked = GEN8_AUX_CHANNEL_A;
3342+
u32 de_port_masked = gen8_de_port_aux_mask(dev_priv);
33433343
u32 de_port_enables;
33443344
u32 de_misc_masked = GEN8_DE_EDP_PSR;
33453345
enum pipe pipe;
33463346

33473347
if (INTEL_GEN(dev_priv) <= 10)
33483348
de_misc_masked |= GEN8_DE_MISC_GSE;
33493349

3350-
if (INTEL_GEN(dev_priv) >= 9) {
3351-
de_port_masked |= GEN9_AUX_CHANNEL_B | GEN9_AUX_CHANNEL_C |
3352-
GEN9_AUX_CHANNEL_D;
3353-
if (IS_GEN9_LP(dev_priv))
3354-
de_port_masked |= BXT_DE_PORT_GMBUS;
3355-
}
3356-
3357-
if (INTEL_GEN(dev_priv) >= 11)
3358-
de_port_masked |= ICL_AUX_CHANNEL_E;
3359-
3360-
if (IS_CNL_WITH_PORT_F(dev_priv) || INTEL_GEN(dev_priv) >= 11)
3361-
de_port_masked |= CNL_AUX_CHANNEL_F;
3350+
if (IS_GEN9_LP(dev_priv))
3351+
de_port_masked |= BXT_DE_PORT_GMBUS;
33623352

33633353
de_pipe_enables = de_pipe_masked | GEN8_PIPE_VBLANK |
33643354
GEN8_PIPE_FIFO_UNDERRUN;

sys/external/bsd/drm2/dist/drm/i915/i915_request.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,9 @@ i915_request_await_request(struct i915_request *to, struct i915_request *from)
945945
return 0;
946946

947947
if (to->engine->schedule) {
948-
ret = i915_sched_node_add_dependency(&to->sched, &from->sched);
948+
ret = i915_sched_node_add_dependency(&to->sched,
949+
&from->sched,
950+
I915_DEPENDENCY_EXTERNAL);
949951
if (ret < 0)
950952
return ret;
951953
}
@@ -1078,7 +1080,9 @@ __i915_request_await_execution(struct i915_request *to,
10781080

10791081
/* Couple the dependency tree for PI on this exposed to->fence */
10801082
if (to->engine->schedule) {
1081-
err = i915_sched_node_add_dependency(&to->sched, &from->sched);
1083+
err = i915_sched_node_add_dependency(&to->sched,
1084+
&from->sched,
1085+
I915_DEPENDENCY_WEAK);
10821086
if (err < 0)
10831087
return err;
10841088
}

sys/external/bsd/drm2/dist/drm/i915/i915_scheduler.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,8 @@ bool __i915_sched_node_add_dependency(struct i915_sched_node *node,
534534
}
535535

536536
int i915_sched_node_add_dependency(struct i915_sched_node *node,
537-
struct i915_sched_node *signal)
537+
struct i915_sched_node *signal,
538+
unsigned long flags)
538539
{
539540
struct i915_dependency *dep;
540541

@@ -543,8 +544,7 @@ int i915_sched_node_add_dependency(struct i915_sched_node *node,
543544
return -ENOMEM;
544545

545546
if (!__i915_sched_node_add_dependency(node, signal, dep,
546-
I915_DEPENDENCY_EXTERNAL |
547-
I915_DEPENDENCY_ALLOC))
547+
flags | I915_DEPENDENCY_ALLOC))
548548
i915_dependency_free(dep);
549549

550550
return 0;

sys/external/bsd/drm2/dist/drm/i915/i915_scheduler.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ bool __i915_sched_node_add_dependency(struct i915_sched_node *node,
3636
unsigned long flags);
3737

3838
int i915_sched_node_add_dependency(struct i915_sched_node *node,
39-
struct i915_sched_node *signal);
39+
struct i915_sched_node *signal,
40+
unsigned long flags);
4041

4142
void i915_sched_node_fini(struct i915_sched_node *node);
4243

sys/external/bsd/drm2/dist/drm/i915/i915_scheduler_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ struct i915_dependency {
8080
unsigned long flags;
8181
#define I915_DEPENDENCY_ALLOC BIT(0)
8282
#define I915_DEPENDENCY_EXTERNAL BIT(1)
83+
#define I915_DEPENDENCY_WEAK BIT(2)
8384
};
8485

8586
#endif /* _I915_SCHEDULER_TYPES_H_ */

sys/external/bsd/drm2/dist/drm/i915/intel_pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4731,7 +4731,7 @@ static void skl_compute_plane_wm(const struct intel_crtc_state *crtc_state,
47314731
* WaIncreaseLatencyIPCEnabled: kbl,cfl
47324732
* Display WA #1141: kbl,cfl
47334733
*/
4734-
if ((IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv)) ||
4734+
if ((IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv)) &&
47354735
dev_priv->ipc_enabled)
47364736
latency += 4;
47374737

0 commit comments

Comments
 (0)