Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions drivers/bluetooth/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ obj-$(CONFIG_BT_HCIVHCI) += hci_vhci.o
obj-$(CONFIG_BT_HCIUART) += hci_uart.o
obj-$(CONFIG_BT_HCIBCM203X) += bcm203x.o
obj-$(CONFIG_BT_HCIBCM4377) += hci_bcm4377.o
obj-$(CONFIG_BT_HCIMT79XX_PCIE) += btmtk_pcie.o
obj-$(CONFIG_BT_HCIBPA10X) += bpa10x.o
obj-$(CONFIG_BT_HCIBFUSB) += bfusb.o
obj-$(CONFIG_BT_HCIDTL1) += dtl1_cs.o
obj-$(CONFIG_BT_HCIBT3C) += bt3c_cs.o
obj-$(CONFIG_BT_HCIBLUECARD) += bluecard_cs.o

obj-$(CONFIG_BT_HCIBTUSB) += btusb.o
obj-$(CONFIG_BT_HCIBTSDIO) += btsdio.o
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/apple/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ config DRM_APPLE
select OF_DYNAMIC
select DRM_CLIENT_SELECTION
select DRM_KMS_HELPER
select DRM_KMS_DMA_HELPER
select DRM_GEM_SHMEM_HELPER
select DRM_GEM_DMA_HELPER
select VIDEOMODE_HELPERS
Expand Down
7 changes: 1 addition & 6 deletions drivers/gpu/drm/apple/dcp-fabric.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ module_param(tiled_split, bool, 0644);
MODULE_PARM_DESC(tiled_split,
"Drive both halves of a tiled Thunderbolt display (LG UltraFine 5K) on one pipeline, through its two DPTX ports (default: on)");

static bool typec_follow_crtc = true;
module_param(typec_follow_crtc, bool, 0444);

/*
* The hybrid pipeline (dcpext0: fixed HDMI PHY + Type-C routes) normally
* comes last for a Type-C port, kept for an HDMI display. On the J616s it
Expand Down Expand Up @@ -91,8 +88,6 @@ static bool dcp_typec_hybrid_first(void)

return policy < 0 ? READ_ONCE(typec_hybrid_first_dt) : policy > 0;
}
MODULE_PARM_DESC(typec_follow_crtc,
"Let direct DP-alt routes follow their selected CRTC (default: on)");

/* J714s: how long a tunnel's last pipeline is held for its return, in running time */
#define DCP_TB_STICKY_MS 20000
Expand Down Expand Up @@ -368,7 +363,7 @@ bool dcp_typec_ordered_dual_stream(void)
*/
bool dcp_typec_follows_crtc(struct apple_dcp *dcp)
{
return typec_follow_crtc && dcp->nr_typec_routes &&
return dcp->nr_typec_routes &&
!dcp->external && !dcp->external_native &&
(dcp->fw_compat == DCP_FIRMWARE_V_12_3 ||
dcp->fw_compat == DCP_FIRMWARE_V_13_5);
Expand Down
9 changes: 1 addition & 8 deletions drivers/gpu/drm/apple/dcp-peer-probe-v27.inc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static ssize_t peer_setup_test_store(struct device *dev,

if (kstrtobool(buf, &value) || !value)
return -EINVAL;
if (!peer_allocation_probe || !dcp)
if (!dcp)
return -EOPNOTSUPP;
wait = kzalloc(sizeof(*wait), GFP_KERNEL);
if (!wait)
Expand Down Expand Up @@ -85,15 +85,8 @@ static struct attribute *dcp_peer_probe_attrs[] = {
NULL,
};

static umode_t dcp_peer_probe_visible(struct kobject *kobj,
struct attribute *attr, int n)
{
return peer_allocation_probe ? attr->mode : 0;
}

static const struct attribute_group dcp_peer_probe_group = {
.attrs = dcp_peer_probe_attrs,
.is_visible = dcp_peer_probe_visible,
};
static const struct attribute_group *dcp_peer_probe_groups[] = {
&dcp_peer_probe_group,
Expand Down
17 changes: 5 additions & 12 deletions drivers/gpu/drm/apple/dcp-peer-runtime-v27.inc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
/* Paired DRM scanout of a mode one firmware-27 pipe cannot drive alone. */
static bool peer_scanout = true;
module_param(peer_scanout, bool, 0444);
MODULE_PARM_DESC(peer_scanout, "Firmware27 paired DRM scanout (default: on)");

static bool dcp_peer_transport_idle(struct apple_dcp *dcp)
{
Expand Down Expand Up @@ -115,8 +112,7 @@ int dcp_peer_modeset_v27(struct apple_dcp *dcp, u32 timing, u32 color, u32 min_v
bool limited, prepared, vrr_only;
int ret = -EOPNOTSUPP;

if (!peer_scanout || !peer_allocation_probe ||
dcp->fw_compat != DCP_FIRMWARE_V_27_0)
if (dcp->fw_compat != DCP_FIRMWARE_V_27_0)
return ret;
if (timing > U32_MAX - 10000 || color > U32_MAX - 10000)
return -EINVAL;
Expand Down Expand Up @@ -265,8 +261,6 @@ int dcp_peer_check_v27(struct apple_dcp *dcp, struct drm_atomic_commit *commit,
pair ? "needs the pair" : "one engine");
if (!pair)
return 0;
if (!peer_scanout || !peer_allocation_probe)
return -EINVAL;
scoped_guard(mutex, &dcp_peer_lock) {
struct apple_dcp *peer = dcp->peer_reserved;
unsigned int displays, engines;
Expand Down Expand Up @@ -301,7 +295,7 @@ int dcp_peer_stop_v27(struct apple_dcp *dcp)
struct apple_dcp *peer;
int ret = 0;

if (!peer_scanout || !READ_ONCE(dcp->peer_frames.active))
if (!READ_ONCE(dcp->peer_frames.active))
return 0;
if (!device_trylock(dcp->dev))
return -EBUSY;
Expand Down Expand Up @@ -351,7 +345,7 @@ struct apple_dcp *dcp_peer_scanout_v27(struct apple_dcp *dcp)
{
struct apple_dcp *peer;

if (!peer_scanout || !READ_ONCE(dcp->peer_frames.active))
if (!READ_ONCE(dcp->peer_frames.active))
return NULL;
guard(mutex)(&dcp_peer_lock);
if (!dcp->peer_frames.active)
Expand Down Expand Up @@ -385,12 +379,11 @@ bool dcp_peer_swap_complete_v27(struct apple_dcp *dcp, u32 id, ktime_t now, bool
bool both_shown;

/* Independent CRTCs must not serialize through the pair's mutex. */
if (!peer_scanout || (!READ_ONCE(dcp->peer_frames.active) &&
!READ_ONCE(dcp->peer_owner)))
if (!READ_ONCE(dcp->peer_frames.active) && !READ_ONCE(dcp->peer_owner))
return false;
guard(mutex)(&dcp_peer_lock);
owner = dcp->peer_owner ?: dcp;
if (!peer_scanout || !owner->peer_frames.active)
if (!owner->peer_frames.active)
return false;
if (dcp_peer_frame_complete_v27(&owner->peer_frames, dcp != owner, id, shown,
&watermark, &both_shown))
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/apple/dcp-peer-swap-probe-v27.inc
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ static ssize_t peer_swap_test_store(struct device *dev,

if (kstrtobool(buf, &enabled) || !enabled)
return -EINVAL;
if (!peer_allocation_probe || !device_trylock(dev))
if (!device_trylock(dev))
return -EBUSY;
dcp = dev_get_drvdata(dev);
{
Expand Down Expand Up @@ -385,7 +385,7 @@ static ssize_t peer_stop_test_store(struct device *dev,

if (kstrtobool(buf, &enabled) || !enabled)
return -EINVAL;
if (!peer_allocation_probe || !device_trylock(dev))
if (!device_trylock(dev))
return -EBUSY;
dcp = dev_get_drvdata(dev);
{
Expand Down
8 changes: 1 addition & 7 deletions drivers/gpu/drm/apple/dcp-peer-v27.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
/* Logical peer allocation for a merged mode. This only reserves an otherwise
* unrouted DCP; it never replaces a physical route.
*/
static bool peer_allocation_probe = true;
module_param(peer_allocation_probe, bool, 0444);
MODULE_PARM_DESC(peer_allocation_probe, "Firmware27 logical peer allocation for merged modes (default: on)");

/*
* The platform limit on merged modes (dcp_fabric_merged_fits()) holds for the
* external display processors whose node says so (apple,merged-mode-limit).
Expand Down Expand Up @@ -113,7 +109,7 @@ bool dcp_peer_tiling_state_v27(struct apple_dcp *dcp, bool write,
struct apple_dcp *peer;

guard(mutex)(&dcp_peer_lock);
if (!peer_allocation_probe || dcp->peer_unbinding || dcp->crashed)
if (dcp->peer_unbinding || dcp->crashed)
return false;
peer = dcp->peer_reserved ?: dcp->peer_owner;
if (!peer || peer->peer_unbinding || peer->crashed)
Expand Down Expand Up @@ -183,8 +179,6 @@ int dcp_peer_hints_v27(struct apple_dcp *dcp, struct dptx_port *port,
* status has a field of its own, leaving the request hints unchanged.
*/
r->status = 0;
if (!peer_allocation_probe)
return 0;
if (!of_device_is_compatible(dcp->dev->of_node, "apple,t6050-dcpext") ||
port->unit || !dcp->crtc)
return 0;
Expand Down
4 changes: 1 addition & 3 deletions drivers/gpu/drm/apple/dcp-peer-video-probe-v27.inc
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ static ssize_t peer_video_test_store(struct device *dev,
if (sscanf(buf, "%u %u %u %c", &timing, &color, &install, &extra) != 3 ||
install > 3 || timing > U32_MAX - 10000 || color > U32_MAX - 10000)
return -EINVAL;
if (!peer_allocation_probe)
return -EOPNOTSUPP;
/* Trylocks avoid the sysfs-removal/device-lock inversion. Hold both
* devices across RPC waits so neither devm-backed DCP can be unbound.
*/
Expand Down Expand Up @@ -239,7 +237,7 @@ static ssize_t peer_link_test_store(struct device *dev,

if (kstrtobool(buf, &enabled))
return -EINVAL;
if (!peer_allocation_probe || !device_trylock(dev))
if (!device_trylock(dev))
return -EBUSY;
dcp = dev_get_drvdata(dev);
if (!dcp || !dcp->active || dcp->crashed || !dcp->fixed_phy ||
Expand Down
7 changes: 1 addition & 6 deletions drivers/gpu/drm/apple/iomfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3072,11 +3072,6 @@ static int dcp_desktop_modeset(struct apple_dcp *dcp,
return iomfb_modeset_v26_6_desktop(dcp, crtc_state);
}

static bool takeover_adopt = true;
module_param(takeover_adopt, bool, 0444);
MODULE_PARM_DESC(takeover_adopt,
"Desktop 26.x panel takeover: present on the loader's live mode instead of setting it again (default: on)");

/*
* The loader leaves the panel running, and the firmware keeps that pipe when
* it restarts. Setting the same mode again blanks the panel for ~200 ms, so
Expand Down Expand Up @@ -3192,7 +3187,7 @@ int dcp_takeover_trial(struct platform_device *pdev, const char **reason)
goto out;
}

for (k = 0; takeover_adopt && k < n; k++) {
for (k = 0; k < n; k++) {
if (!dcp_takeover_adopt(dcp, &cand[k])) {
win = k;
break;
Expand Down
34 changes: 10 additions & 24 deletions drivers/gpu/drm/apple/iomfb_v26_6.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,21 +272,11 @@ struct apple_dcp_v26 {
/* One DCP session per boot: RTKit is never started twice. */
static bool dcp_v26_session;

static bool j613_25g83_swap_timestamps = true;
module_param(j613_25g83_swap_timestamps, bool, 0644);
MODULE_PARM_DESC(j613_25g83_swap_timestamps,
"J613/25G83: time-stamp swaps on a 120 Hz variable-refresh panel so they are shown at 120 Hz, not 60 Hz (default: on)");

static unsigned int j613_25g83_refresh = 120;
module_param(j613_25g83_refresh, uint, 0444);
MODULE_PARM_DESC(j613_25g83_refresh,
"J613/25G83: preferred refresh of the built-in display: 120 (variable refresh, ProMotion) or 60 (locked); both modes stay available (default: 120)");

static bool j613_25g83_flip_timestamp = true;
module_param(j613_25g83_flip_timestamp, bool, 0644);
MODULE_PARM_DESC(j613_25g83_flip_timestamp,
"J613/25G83: stamp page-flip events with the arrival of the firmware's swap-complete message; off: when the flush ends, less 1 ms (default: on)");

static int dcp_v26_callback(void *cookie, u32 tag, const void *input, u32 in_size,
void *output, u32 out_size);
static void dcp_v26_backlight_register(struct work_struct *work);
Expand Down Expand Up @@ -1300,9 +1290,9 @@ static int dcp_v26_present_show(struct seq_file *m, void *unused)
snap->vrr = v26->vrr;
mutex_unlock(&v26->lock);

seq_printf(m, "vrr %d\nrefresh %u\ntimed %d\ntimestamps %d\nflip_timestamp %d\nswaps %llu\n",
/* timestamps and flip_timestamp are always on; the lines stay for readers. */
seq_printf(m, "vrr %d\nrefresh %u\ntimed %d\ntimestamps 1\nflip_timestamp 1\nswaps %llu\n",
snap->vrr, READ_ONCE(v26->refresh), READ_ONCE(v26->timed),
READ_ONCE(j613_25g83_swap_timestamps), READ_ONCE(j613_25g83_flip_timestamp),
snap->history_count);
seq_puts(m, "# id surface timed start_ns submitted_ns replied_ns completed_ns\n");
first = snap->history_count > DCP_V26_HISTORY ? snap->history_count - DCP_V26_HISTORY : 0;
Expand Down Expand Up @@ -1620,7 +1610,7 @@ static int dcp_v26_swap(struct apple_dcp_v26 *v26, const u8 *surface, u64 iova,
dcp_v26_encode_swap(swap, id, DCP_V26_BLACK, surface, iova, width, height,
dst_y, DCP_V26_LAYER);
/* A target long past: show it at the next refresh, as on M1/M2. */
if (surface && READ_ONCE(v26->timed) && READ_ONCE(j613_25g83_swap_timestamps)) {
if (surface && READ_ONCE(v26->timed)) {
dcp_v26_swap_set_timing(swap, 120);
rec.timed = 1;
}
Expand Down Expand Up @@ -1797,17 +1787,13 @@ void iomfb_v26_6_flush(struct apple_dcp *dcp, struct drm_crtc *crtc,
dcp_v26_cancel_event(dcp);
return;
}
if (READ_ONCE(j613_25g83_flip_timestamp)) {
/*
* The flip completed when the firmware's swap-complete message
* came in, not when this worker got to run: stamp the event with
* that time as it is (no swap_start correction).
*/
dcp->swap_start = KTIME_MIN;
dcp_drm_crtc_page_flip(dcp, presented);
} else {
dcp_drm_crtc_page_flip(dcp, ktime_get());
}
/*
* The flip completed when the firmware's swap-complete message
* came in, not when this worker got to run: stamp the event with
* that time as it is (no swap_start correction).
*/
dcp->swap_start = KTIME_MIN;
dcp_drm_crtc_page_flip(dcp, presented);
}

/*
Expand Down
6 changes: 2 additions & 4 deletions drivers/gpu/drm/asahi/Kconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# SPDX-License-Identifier: GPL-2.0

# The Rust DRM scheduler bindings are part of the built-in kernel crate,
# so DRM_SCHED must be built in, not modular like DRM_ASAHI.
config RUST_DRM_SCHED
bool
select DRM_SCHED

config RUST_DRM_GPUVM
bool
select DRM_GPUVM

config DRM_ASAHI
tristate "Aurora (DRM support for Apple AGX GPUs)"
depends on RUST
Expand Down
1 change: 1 addition & 0 deletions drivers/soc/apple/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ endmenu

endif

# Kept: configs that still set APPLE_T8140_SLEEP=y keep APPLE_SOC_SLEEP after olddefconfig.
config APPLE_T8140_SLEEP
bool
transitional
Expand Down
2 changes: 0 additions & 2 deletions rust/kernel/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#![feature(sized_type_properties)]
//
#![feature(slice_range)]
//
#![cfg_attr(CONFIG_RUSTC_HAS_COERCE_POINTEE, feature(pin_coerce_unsized_trait))]
// ============ end asahi dowanstream features ============
//
// To be determined.
Expand Down
29 changes: 20 additions & 9 deletions tools/aurora-sep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,21 +368,32 @@ and serves the copy to the login screen's shell alone through a GResource
overlay. When the check is not exactly as expected, for example after a
GNOME update, it changes nothing. The enable key above still applies.

The login screen asks fprintd for the reader once, as it comes up, and the
enclave can take most of a minute after boot. The login screen does not wait
for it: `aurora-sep-greeter-refresh.service` runs once both are up, and when
Touch ID came up later and nobody has logged in, it shows the login screen
again so it offers fingerprint. With automatic login, or once someone has
logged in, it changes nothing. Both are one switch, off by default. It needs
`gresource` from glib2-devel. With the packages, or after installing it by
hand, turn it on with `systemctl enable`:
The login screen does not wait for Touch ID, which can take most of a minute
after boot. The login screen right after boot takes the password anyway: as on
macOS, where Touch ID is offered only after one password login since the
restart, `require_password_after_boot = yes` holds the reader until then.
Later login screens (after a log out) and the lock screen find the reader once
it is up. It is one switch, off by default. It needs `gresource` from
glib2-devel. With the packages, or after installing it by hand, turn it on
with `systemctl enable`:

```sh
install -Dm755 aurora-sep-greeter-fingerprint /usr/local/sbin/aurora-sep-greeter-fingerprint
install -Dm644 aurora-sep-greeter-fingerprint.service aurora-sep-greeter-refresh.service /etc/systemd/system/
install -Dm644 aurora-sep-greeter-fingerprint.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable aurora-sep-greeter-fingerprint.service
```
Upgrading an install from before 11-29 (manual or packaged): the old
`aurora-sep-greeter-refresh.service` is gone, and `refresh` is now a no-op that
only logs. Remove what is left of it once:

```
sudo systemctl disable aurora-sep-greeter-refresh.service 2>/dev/null
sudo rm -f /etc/systemd/system/aurora-sep-greeter-refresh.service \
/etc/systemd/system/gdm.service.wants/aurora-sep-greeter-refresh.service
sudo systemctl daemon-reload
```


Disabling it and rebooting returns the login screen to GNOME's behaviour.

Expand Down
15 changes: 5 additions & 10 deletions tools/aurora-sep/aurora-sep-greeter-fingerprint
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,11 @@ log() {
}

if [ "${1:-}" = refresh ]; then
# Touch ID came up after the login screen asked fprintd for the reader,
# so the login screen has no fingerprint option. Show it again, but only
# while nobody is logged in: restarting gdm ends graphical sessions.
systemctl -q is-active gdm.service || exit 0
for s in $(loginctl list-sessions --no-legend | awk '{print $1}'); do
[ "$(loginctl show-session "$s" -p Class --value)" != user ] || exit 0
done
[ -f "$out/authServicesLegacy.js" ] || exit 0
log "Touch ID is ready; showing the login screen again so it offers fingerprint"
exec systemctl restart gdm.service
# aurora-sep-greeter-refresh.service, which passed "refresh", is gone. A manual
# install from before may still have it enabled. Do nothing, so that it never
# removes and rebuilds the overlay of a login screen that is already running.
log "'refresh' is no longer used; disable and remove aurora-sep-greeter-refresh.service (see README)"
exit 0
fi

rm -rf "$out" "$dropin"
Expand Down
Loading
Loading