mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +09:00
Add camera-specific switches to legacy mode
This commit is contained in:
parent
16d46d340b
commit
a8b2361318
@ -1831,6 +1831,12 @@ do_legacy() {
|
|||||||
printf "[pi4]\ndtoverlay=vc4-fkms-v3d\n" >> $CONFIG
|
printf "[pi4]\ndtoverlay=vc4-fkms-v3d\n" >> $CONFIG
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
CUR_GPU_MEM=$(get_config_var gpu_mem $CONFIG)
|
||||||
|
if [ -z "$CUR_GPU_MEM" ] || [ "$CUR_GPU_MEM" -lt 128 ]; then
|
||||||
|
set_config_var gpu_mem 128 $CONFIG
|
||||||
|
fi
|
||||||
|
sed $CONFIG -i -e 's/^camera_auto_detect.*/start_x=1/g'
|
||||||
|
sed $CONFIG -i -e 's/^dtoverlay=camera/#dtoverlay=camera/g'
|
||||||
STATUS="Legacy camera support is enabled.\n\nThis will disable various features in the video driver."
|
STATUS="Legacy camera support is enabled.\n\nThis will disable various features in the video driver."
|
||||||
else
|
else
|
||||||
sed $CONFIG -i -e 's/^#\?dtoverlay=vc4-f\?kms-v3d/dtoverlay=vc4-kms-v3d/g'
|
sed $CONFIG -i -e 's/^#\?dtoverlay=vc4-f\?kms-v3d/dtoverlay=vc4-kms-v3d/g'
|
||||||
@ -1842,6 +1848,8 @@ do_legacy() {
|
|||||||
printf "[all]\ndtoverlay=vc4-kms-v3d\n" >> $CONFIG
|
printf "[all]\ndtoverlay=vc4-kms-v3d\n" >> $CONFIG
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
sed $CONFIG -i -e 's/^start_x.*/camera_auto_detect=1/g'
|
||||||
|
sed $CONFIG -i -e 's/^#dtoverlay=camera/dtoverlay=camera/g'
|
||||||
STATUS="Legacy camera support is disabled."
|
STATUS="Legacy camera support is disabled."
|
||||||
fi
|
fi
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user