Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/linux Make intel_psr.c build
details: https://anonhg.NetBSD.org/src/rev/e081c83b4989
branches: trunk
changeset: 1028707:e081c83b4989
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:49:11 2021 +0000
description:
Make intel_psr.c build
netbsd-ify
Stub out intel_lpe_audio.c (for now?).
Hammer intel_opregion.c into shape.
Hack up intel_lrc.c
Adapt intel_reset.c
Stub out intel_region_lmem.c
Adapt intel_ring_submission.c
Adapt intel_rps.c
Adapt intel_sdvo.c
Adapt intel_runtime_pm.c
Adapt intel_sideband.c
Adapt intel_sprite.c
Adapt intel_tv.c
Adapt intel_tc.c
Adapt intel_sseu.c
Adapt intel_timeline.c
Adapt intel_uc_fw.c and fix typo
Fix up intel_uncore.c
intel_vga.c
intel_wakeref.c
intel_vdsc.c
intel_wopcm.c
intel_workarounds.c
i915_globals.c
Fix up intelfb.c
Stub out intel_guc_log.c
Stub out intel_dsi_dcs_backlight.c
i915_perf.c
intel_hdmi.c
intel_hdcp.c
Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>
diffstat:
sys/external/bsd/common/include/linux/rcupdate.h | 4 +-
sys/external/bsd/common/include/linux/srcu.h | 14 +-
sys/external/bsd/common/include/linux/tasklet.h | 3 +-
sys/external/bsd/common/linux/linux_rcu.c | 24 +-
sys/external/bsd/common/linux/linux_srcu.c | 33 ++-
sys/external/bsd/common/linux/linux_tasklet.c | 43 ++-
sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c | 8 +-
sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c | 68 ++++-
sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.h | 5 +-
sys/external/bsd/drm2/dist/drm/i915/display/intel_psr.c | 8 +-
sys/external/bsd/drm2/dist/drm/i915/display/intel_sdvo.c | 20 +-
sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c | 57 +----
sys/external/bsd/drm2/dist/drm/i915/display/intel_tc.c | 6 +-
sys/external/bsd/drm2/dist/drm/i915/display/intel_tv.c | 6 +-
sys/external/bsd/drm2/dist/drm/i915/display/intel_vga.c | 31 ++-
sys/external/bsd/drm2/dist/drm/i915/gt/intel_lrc.c | 123 ++++++++-
sys/external/bsd/drm2/dist/drm/i915/gt/intel_ppgtt.c | 12 +-
sys/external/bsd/drm2/dist/drm/i915/gt/intel_rc6.c | 8 +-
sys/external/bsd/drm2/dist/drm/i915/gt/intel_reset.c | 64 ++--
sys/external/bsd/drm2/dist/drm/i915/gt/intel_reset_types.h | 7 +-
sys/external/bsd/drm2/dist/drm/i915/gt/intel_ring_submission.c | 18 +-
sys/external/bsd/drm2/dist/drm/i915/gt/intel_rps.c | 6 +-
sys/external/bsd/drm2/dist/drm/i915/gt/intel_sseu.c | 6 +-
sys/external/bsd/drm2/dist/drm/i915/gt/intel_timeline.c | 6 +-
sys/external/bsd/drm2/dist/drm/i915/gt/intel_workarounds.c | 6 +-
sys/external/bsd/drm2/dist/drm/i915/gt/uc/intel_uc_fw.c | 6 +-
sys/external/bsd/drm2/dist/drm/i915/i915_globals.c | 6 +-
sys/external/bsd/drm2/dist/drm/i915/i915_perf.c | 12 +-
sys/external/bsd/drm2/dist/drm/i915/i915_utils.h | 58 ++-
sys/external/bsd/drm2/dist/drm/i915/intel_runtime_pm.c | 6 +-
sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c | 35 +-
sys/external/bsd/drm2/dist/drm/i915/intel_uncore.h | 13 +-
sys/external/bsd/drm2/dist/drm/i915/intel_wakeref.c | 13 +-
sys/external/bsd/drm2/dist/drm/i915/intel_wakeref.h | 5 +-
sys/external/bsd/drm2/dist/drm/i915/intel_wopcm.c | 6 +-
sys/external/bsd/drm2/drm/drm_module.c | 8 +-
sys/external/bsd/drm2/i915drm/files.i915drmkms | 27 +-
sys/external/bsd/drm2/i915drm/i915_module.c | 10 +-
sys/external/bsd/drm2/i915drm/intel_dsi_dcs_backlight.c | 41 +++
sys/external/bsd/drm2/i915drm/intel_guc_log.c | 92 +++++++
sys/external/bsd/drm2/i915drm/intel_lpe_audio.c | 61 ++++
sys/external/bsd/drm2/i915drm/intel_region_lmem.c | 45 +++
sys/external/bsd/drm2/i915drm/intelfb.c | 33 +-
sys/external/bsd/drm2/include/asm/iosf_mbi.h | 65 +++++
sys/external/bsd/drm2/include/drm/drm_mipi_dsi.h | 15 +-
sys/external/bsd/drm2/include/drm/i915_mei_hdcp_interface.h | 25 ++
sys/external/bsd/drm2/include/i915_trace.h | 18 +-
sys/external/bsd/drm2/include/linux/device.h | 4 +-
sys/external/bsd/drm2/include/linux/i2c.h | 4 +-
sys/external/bsd/drm2/include/linux/init.h | 6 +-
sys/external/bsd/drm2/include/linux/lockdep.h | 3 +-
sys/external/bsd/drm2/include/linux/perf_event.h | 4 +-
sys/external/bsd/drm2/include/linux/pm_runtime.h | 13 +-
sys/external/bsd/drm2/include/linux/random.h | 15 +-
sys/external/bsd/drm2/include/linux/rculist.h | 37 +++
sys/external/bsd/drm2/include/linux/sched.h | 6 +-
sys/external/bsd/drm2/include/linux/sched/signal.h | 3 +-
sys/external/bsd/drm2/include/linux/sizes.h | 44 +-
sys/external/bsd/drm2/include/linux/smp.h | 24 +-
sys/external/bsd/drm2/include/linux/timer.h | 7 +-
sys/external/bsd/drm2/linux/linux_i2c.c | 13 +-
61 files changed, 1044 insertions(+), 325 deletions(-)
diffs (truncated from 3119 to 300 lines):
diff -r d30b05a6ea89 -r e081c83b4989 sys/external/bsd/common/include/linux/rcupdate.h
--- a/sys/external/bsd/common/include/linux/rcupdate.h Sun Dec 19 11:48:42 2021 +0000
+++ b/sys/external/bsd/common/include/linux/rcupdate.h Sun Dec 19 11:49:11 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rcupdate.h,v 1.7 2021/12/19 11:35:17 riastradh Exp $ */
+/* $NetBSD: rcupdate.h,v 1.8 2021/12/19 11:49:11 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -81,6 +81,7 @@
#define get_state_synchronize_rcu linux_get_state_synchronize_rcu
#define rcu_barrier linux_rcu_barrier
#define synchronize_rcu linux_synchronize_rcu
+#define synchronize_rcu_expedited linux_synchronize_rcu_expedited
int linux_rcu_gc_init(void);
void linux_rcu_gc_fini(void);
@@ -91,6 +92,7 @@
void call_rcu(struct rcu_head *, void (*)(struct rcu_head *));
void rcu_barrier(void);
void synchronize_rcu(void);
+void synchronize_rcu_expedited(void);
unsigned long get_state_synchronize_rcu(void);
void cond_synchronize_rcu(unsigned long);
diff -r d30b05a6ea89 -r e081c83b4989 sys/external/bsd/common/include/linux/srcu.h
--- a/sys/external/bsd/common/include/linux/srcu.h Sun Dec 19 11:48:42 2021 +0000
+++ b/sys/external/bsd/common/include/linux/srcu.h Sun Dec 19 11:49:11 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: srcu.h,v 1.3 2021/12/19 11:10:09 riastradh Exp $ */
+/* $NetBSD: srcu.h,v 1.4 2021/12/19 11:49:11 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -37,11 +37,12 @@
#include <sys/mutex.h>
/* namespace */
-#define srcu_fini linux_srcu_fini
-#define srcu_init linux_srcu_init
+#define _init_srcu_struct linux__init_init_srcu_struct
+#define cleanup_srcu_struct linux_cleanup_srcu_struct
#define srcu_read_lock linux_srcu_read_lock
#define srcu_read_unlock linux_srcu_read_unlock
#define synchronize_srcu linux_synchronize_srcu
+#define synchronize_srcu_expedited linux_synchronize_srcu_expedited
struct lwp;
struct percpu;
@@ -55,12 +56,15 @@
volatile unsigned srcu_gen;
};
-void srcu_init(struct srcu_struct *, const char *);
-void srcu_fini(struct srcu_struct *);
+#define init_srcu_struct(S) _init_srcu_struct(S, #S)
+
+void _init_srcu_struct(struct srcu_struct *, const char *);
+void cleanup_srcu_struct(struct srcu_struct *);
int srcu_read_lock(struct srcu_struct *);
void srcu_read_unlock(struct srcu_struct *, int);
void synchronize_srcu(struct srcu_struct *);
+void synchronize_srcu_expedited(struct srcu_struct *);
#endif /* _LINUX_SRCU_H_ */
diff -r d30b05a6ea89 -r e081c83b4989 sys/external/bsd/common/include/linux/tasklet.h
--- a/sys/external/bsd/common/include/linux/tasklet.h Sun Dec 19 11:48:42 2021 +0000
+++ b/sys/external/bsd/common/include/linux/tasklet.h Sun Dec 19 11:49:11 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tasklet.h,v 1.5 2021/12/19 11:03:17 riastradh Exp $ */
+/* $NetBSD: tasklet.h,v 1.6 2021/12/19 11:49:11 riastradh Exp $ */
/*-
* Copyright (c) 2018, 2020 The NetBSD Foundation, Inc.
@@ -81,6 +81,7 @@
void tasklet_init(struct tasklet_struct *, void (*)(unsigned long),
unsigned long);
+void tasklet_disable_nosync(struct tasklet_struct *);
void tasklet_disable(struct tasklet_struct *);
void tasklet_enable(struct tasklet_struct *);
void tasklet_schedule(struct tasklet_struct *);
diff -r d30b05a6ea89 -r e081c83b4989 sys/external/bsd/common/linux/linux_rcu.c
--- a/sys/external/bsd/common/linux/linux_rcu.c Sun Dec 19 11:48:42 2021 +0000
+++ b/sys/external/bsd/common/linux/linux_rcu.c Sun Dec 19 11:49:11 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_rcu.c,v 1.3 2021/12/19 11:35:17 riastradh Exp $ */
+/* $NetBSD: linux_rcu.c,v 1.4 2021/12/19 11:49:11 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_rcu.c,v 1.3 2021/12/19 11:35:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_rcu.c,v 1.4 2021/12/19 11:49:11 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -85,6 +85,8 @@
* Wait for any pending RCU read section on every CPU to complete
* by triggering on every CPU activity that is blocked by an RCU
* read section.
+ *
+ * May sleep. (Practically guaranteed to sleep!)
*/
void
synchronize_rcu(void)
@@ -96,6 +98,24 @@
}
/*
+ * synchronize_rcu_expedited()
+ *
+ * Wait for any pending RCU read section on every CPU to complete
+ * by triggering on every CPU activity that is blocked by an RCU
+ * read section. Try to get an answer faster than
+ * synchronize_rcu, at the cost of more activity triggered on
+ * other CPUs.
+ *
+ * May sleep. (Practically guaranteed to sleep!)
+ */
+void
+synchronize_rcu_expedited(void)
+{
+
+ synchronize_rcu();
+}
+
+/*
* cookie = get_state_synchronize_rcu(), cond_synchronize_rcu(cookie)
*
* Optimization for synchronize_rcu -- skip if it has already
diff -r d30b05a6ea89 -r e081c83b4989 sys/external/bsd/common/linux/linux_srcu.c
--- a/sys/external/bsd/common/linux/linux_srcu.c Sun Dec 19 11:48:42 2021 +0000
+++ b/sys/external/bsd/common/linux/linux_srcu.c Sun Dec 19 11:49:11 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_srcu.c,v 1.3 2021/12/19 11:20:33 riastradh Exp $ */
+/* $NetBSD: linux_srcu.c,v 1.4 2021/12/19 11:49:11 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_srcu.c,v 1.3 2021/12/19 11:20:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_srcu.c,v 1.4 2021/12/19 11:49:11 riastradh Exp $");
/*
* SRCU: Sleepable RCU
@@ -73,7 +73,7 @@
};
/*
- * srcu_init(srcu, name)
+ * _init_srcu_struct(srcu, name)
*
* Initialize the srcu state with the specified name. Caller must
* call srcu_fini when done.
@@ -84,7 +84,7 @@
* May sleep.
*/
void
-srcu_init(struct srcu_struct *srcu, const char *name)
+_init_srcu_struct(struct srcu_struct *srcu, const char *name)
{
ASSERT_SLEEPABLE();
@@ -98,7 +98,7 @@
}
/*
- * srcu_fini(srcu)
+ * cleanup_srcu_struct(srcu)
*
* Finalize an srcu state, which must not be in use right now. If
* any srcu read sections might be active, caller must wait for
@@ -107,14 +107,14 @@
* May sleep.
*/
void
-srcu_fini(struct srcu_struct *srcu)
+cleanup_srcu_struct(struct srcu_struct *srcu)
{
ASSERT_SLEEPABLE();
KASSERTMSG((srcu->srcu_sync == NULL),
- "srcu_fini in lwp %p while synchronize_srcu running in lwp %p",
- curlwp, srcu->srcu_sync);
+ "%s in lwp %p while synchronize_srcu running in lwp %p",
+ __func__, curlwp, srcu->srcu_sync);
cv_destroy(&srcu->srcu_cv);
mutex_destroy(&srcu->srcu_lock);
percpu_free(srcu->srcu_percpu, sizeof(struct srcu_cpu));
@@ -298,3 +298,20 @@
cv_broadcast(&srcu->srcu_cv);
mutex_spin_exit(&srcu->srcu_lock);
}
+
+/*
+ * synchronize_srcu_expedited(srcu)
+ *
+ * Wait for all srcu readers on all CPUs that may have begun
+ * before sychronize_srcu to complete. Try to get an answer
+ * faster than synchronize_srcu, at the cost of more activity
+ * triggered on other CPUs.
+ *
+ * May sleep. (Practically guaranteed to sleep!)
+ */
+void
+synchronize_srcu_expedited(struct srcu_struct *srcu)
+{
+
+ synchronize_srcu(srcu);
+}
diff -r d30b05a6ea89 -r e081c83b4989 sys/external/bsd/common/linux/linux_tasklet.c
--- a/sys/external/bsd/common/linux/linux_tasklet.c Sun Dec 19 11:48:42 2021 +0000
+++ b/sys/external/bsd/common/linux/linux_tasklet.c Sun Dec 19 11:49:11 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_tasklet.c,v 1.6 2021/12/19 11:04:58 riastradh Exp $ */
+/* $NetBSD: linux_tasklet.c,v 1.7 2021/12/19 11:49:11 riastradh Exp $ */
/*-
* Copyright (c) 2018, 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_tasklet.c,v 1.6 2021/12/19 11:04:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_tasklet.c,v 1.7 2021/12/19 11:49:11 riastradh Exp $");
#include <sys/types.h>
#include <sys/atomic.h>
@@ -347,6 +347,35 @@
}
/*
+ * tasklet_disable_nosync(tasklet)
+ *
+ * Increment the disable count of tasklet, but don't wait for it
+ * to complete -- it may remain running after this returns.
+ *
+ * As long as the disable count is nonzero, the tasklet's function
+ * will not run, but if already scheduled, the tasklet will remain
+ * so and the softint will repeatedly trigger itself in a sort of
+ * busy-wait, so this should be used only for short durations.
+ *
+ * Load-acquire semantics.
+ */
+void
+tasklet_disable_nosync(struct tasklet_struct *tasklet)
+{
+ unsigned int disablecount __diagused;
+
+ /* Increment the disable count. */
+ disablecount = atomic_inc_uint_nv(&tasklet->tl_disablecount);
+ KASSERT(disablecount < UINT_MAX);
+ KASSERT(disablecount != 0);
+
+ /* Pairs with membar_exit in __tasklet_enable. */
+#ifndef __HAVE_ATOMIC_AS_MEMBAR
+ membar_enter();
+#endif
+}
+
+/*
* tasklet_disable(tasklet)
*
* Increment the disable count of tasklet, and if it was already
@@ -366,17 +395,9 @@
void
tasklet_disable(struct tasklet_struct *tasklet)
{
- unsigned int disablecount __diagused;
/* Increment the disable count. */
- disablecount = atomic_inc_uint_nv(&tasklet->tl_disablecount);
- KASSERT(disablecount < UINT_MAX);
- KASSERT(disablecount != 0);
-
- /* Pairs with membar_exit in __tasklet_enable. */
-#ifndef __HAVE_ATOMIC_AS_MEMBAR
- membar_enter();
-#endif
+ tasklet_disable_nosync(tasklet);
/* Wait for it to finish running, if it was running. */
tasklet_unlock_wait(tasklet);
diff -r d30b05a6ea89 -r e081c83b4989 sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c
--- a/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c Sun Dec 19 11:48:42 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c Sun Dec 19 11:49:11 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intel_hdcp.c,v 1.4 2021/12/19 11:45:50 riastradh Exp $ */
+/* $NetBSD: intel_hdcp.c,v 1.5 2021/12/19 11:49:11 riastradh Exp $ */
Home |
Main Index |
Thread Index |
Old Index