#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0-only

build() {
    # AGP and DRM modules for GPUs
    map add_checked_modules '/drivers/char/agp/' '/drivers/gpu/drm/'

    # modules that implement the privacy screen interface
    # TODO: Replace with dynamic lookup of modules that depend on the drm_privacy_screen_register symbol
    # See https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/issues/132
    map add_checked_modules 'chromeos_privacy_screen?' 'thinkpad_acpi?'
}

help() {
    cat <<HELPEOF
Adds KMS and privacy screen drivers to the initramfs image. To minimize the
modules in the image, add the autodetect hook too.
HELPEOF
}
