Skip to content
Open
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
19 changes: 16 additions & 3 deletions quickboot-display/files/03-drm.rules
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
# Trigger Weston immediately when the primary DRM card is detected by the kernel.
# This eliminates delays waiting for generic multi-user targets.
# Trigger Weston immediately when the primary display controller's DRM card is
# detected by the kernel. This eliminates delays waiting for generic multi-user
# targets.
#
# Match on the msm_dpu display-controller driver (DRIVERS=="msm_dpu") rather than
# a fixed KERNEL=="card0". The cardN numbering is assigned in probe order and is
# not guaranteed to be the display controller when more than one DRM device is
# present (e.g. a discrete GPU or a DP/HDMI bridge exposing its own card). The
# msm_dpu driver name is stable and board-independent across the msm display
# stack. DEVTYPE=="drm_minor" + KERNEL=="card[0-9]*" restrict the match to the
# card node itself, excluding renderD* and card*-<connector> child nodes.
#
# SYSTEMD_ALIAS exposes this node as a stable device unit
# "dev-dri-msm_dpu_card.device" so weston.service can order itself against it
# (Requires=/After=) without hardcoding the unstable cardN name.

ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_READY}="1", ENV{SYSTEMD_WANTS}="weston.service"
ACTION=="add", SUBSYSTEM=="drm", ENV{DEVTYPE}=="drm_minor", DRIVERS=="msm_dpu", KERNEL=="card[0-9]*", ENV{SYSTEMD_ALIAS}="/dev/dri/msm_dpu_card", TAG+="systemd", ENV{SYSTEMD_READY}="1", ENV{SYSTEMD_WANTS}="weston.service"
9 changes: 6 additions & 3 deletions quickboot-display/files/weston.service
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
# Remove default dependenies (sysinit.target, basic.target) to enable early start
DefaultDependencies=no

# Start as soon as display card appear
Requires=dev-dri-card0.device
After=dev-dri-card0.device
# Start as soon as the display card appears. Order against the stable device-unit
# alias published by 03-drm.rules (SYSTEMD_ALIAS=/dev/dri/msm_dpu_card) instead of
# a hardcoded dev-dri-card0.device -- dev-dri-msm_dpu_card.device tracks the
# msm_dpu display controller regardless of its cardN enumeration.
Requires=dev-dri-msm_dpu_card.device
After=dev-dri-msm_dpu_card.device

# Since we are part of the graphical session, make sure we are started before
# it is complete.
Expand Down