[Merge] ~bdrung/ubuntu/+source/initramfs-tools:ubuntu/devel-drm into ~ubuntu-core-dev/ubuntu/+source/initramfs-tools:ubuntu/devel

Daniel van Vugt mp+462691 at code.launchpad.net
Wed Mar 20 06:30:52 UTC 2024



Diff comments:

> diff --git a/hook-functions b/hook-functions
> index 33e03e6..223c28e 100644
> --- a/hook-functions
> +++ b/hook-functions
> @@ -691,6 +691,15 @@ auto_add_modules()
>  			;;
>  			esac
>  		;;
> +		drm)
> +			# Direct Rendering Manager (DRM) drivers for video
> +			modules="$modules =drivers/gpu/drm/tiny vboxvideo virtio-gpu"

Calling this case "drm" is not accurate and may have undesirable consequences later. Because someone might think their DRM drivers are missing, like i915 or amdgpu, and then add them in. But we've intentionally omitted those larger DRM drivers so the case should be called something like "minimal_drm".

> +			# if there is a privacy screen then its driver must be loaded before the
> +			# kms driver will bind, otherwise its probe() will return -EPROBE_DEFER
> +			# So include privacy screen providers
> +			# atm all providers live under drivers/platform/x86
> +			manual_add_modules -s "drm_privacy_screen_register" "=drivers/platform/x86"
> +		;;
>  		hw_random)
>  			modules="$modules =drivers/char/hw_random"
>  		;;
> diff --git a/hooks/framebuffer b/hooks/framebuffer
> index c559efd..bc2d787 100755
> --- a/hooks/framebuffer
> +++ b/hooks/framebuffer
> @@ -19,25 +19,24 @@ esac
>  
>  . /usr/share/initramfs-tools/hook-functions
>  
> -manual_add_modules "=drivers/gpu/drm/tiny" \
> -	fbcon vesafb vga16fb vboxvideo simplefb efifb virtio-gpu
> -
> -# if there is a privacy screen then its driver must be loaded before the
> -# kms driver will bind, otherwise its probe() will return -EPROBE_DEFER
> -# So include privacy screen providers
> -# atm all providers live under drivers/platform/x86
> -manual_add_modules -s "drm_privacy_screen_register" "=drivers/platform/x86"
> -
> -for x in "${MODULESDIR}"/initrd/*; do
> -	x=${x##*/}
> -	x=${x%.*}
> -	case ${x} in
> -	'*')
> -		break
> -		;;
> -	*fb)
> -		;;
> -	esac
> -
> -	manual_add_modules "${x}"
> -done
> +if [ "${MODULES-}" = "dep" ]; then
> +	if [ -e /sys/class/drm ]; then
> +		class_add_modules drm
> +	fi
> +elif [ "$MODULES" != "list" ]; then
> +	auto_add_modules drm fbdev

Same concern about calling it "drm" as above. We don't want all the DRM drivers to be accidentally reintroduced later.

> +
> +	for x in "${MODULESDIR}"/initrd/*; do
> +		x=${x##*/}
> +		x=${x%.*}
> +		case ${x} in
> +		'*')
> +			break
> +			;;
> +		*fb)
> +			;;
> +		esac
> +
> +		manual_add_modules "${x}"
> +	done
> +fi


-- 
https://code.launchpad.net/~bdrung/ubuntu/+source/initramfs-tools/+git/initramfs-tools/+merge/462691
Your team Ubuntu Core Development Team is subscribed to branch ~ubuntu-core-dev/ubuntu/+source/initramfs-tools:ubuntu/devel.




More information about the Ubuntu-reviews mailing list