Skip to content

Config.txt ignores conditional filters for hdmi settings #1296

@colerd24

Description

@colerd24

Description
There is a bug with the config.txt parser that ignores conditional filters only for hdmi settings, even when the settings are under the [none] filter.

Reproduction Steps

  1. Download fresh Raspbian image
  2. Update (apt update && apt upgrade -y)
  3. Replace config.txt with version listed below (see config.txt)
  4. Connect Raspberry Pi to an HDMI display (anything that is not the resolution of hdmi_mode, 640x480 in this example)
  5. Boot Raspberry Pi

config.txt:
In reality, [none] should be a filter that evaluates to false (none simulates false)
[none]
hdmi_ignore_edid=0xa5000080
hdmi_force_hotplug=1
hdmi_pixel_encoding=2
hdmi_drive=1
hdmi_group=2
hdmi_mode=4
[all]

Expected Behaviour
Display resolution should match that of the display as the custom HDMI implementations should not run when they are under the [none] filter (nor any filter that evaluates to false).

Actual Behaviour
Custom HDMI options are set and screen has output resolution as specified under the [none] filter (in this example it's 640x480).

System
Models Tested: CM 3B+, 3B+
OS: Raspbian Buster Lite (Fresh install, fully updated)
vcgencmd version: Sep 24 2019 6820edeee4ef3891b95fc01cf02a7abd7ca52f17
rpi-issue: 2019-09-26 80d486687ea77d31fc3fc13cf3a2f8b464e129be, stage2
Kernel Version: 4.19.75-v7+

Also tried this after rpi-update to kernel 4.19.86-v7+

Logs
Output of vcdbg log msg:
001288.733: brfs: File read: /mfs/sd/config.txt
001289.187: brfs: File read: 139 bytes
001321.736: brfs: File read: /mfs/sd/config.txt
001542.160: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined
001544.267: *** Restart logging
001544.331: brfs: File read: 139 bytes
001551.070: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001555.067: brfs: File read: /mfs/sd/cmdline.txt
001555.157: Read command line from file 'cmdline.txt':
001555.216: 'console=serial0,115200 console=tty1 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait'
001559.852: brfs: File read: 121 bytes
001563.592: brfs: File read: /mfs/sd/bcm2710-rpi-3-b-plus.dtb
001563.655: Loading 'bcm2710-rpi-3-b-plus.dtb' to 0x100 size 0x69ca
001717.610: brfs: File read: 27082 bytes
001720.957: brfs: File read: /mfs/sd/config.txt
003433.319: gpioman: gpioman_get_pin_num: pin EMMC_ENABLE not defined
003534.620: brfs: File read: 139 bytes
003903.243: brfs: File read: /mfs/sd/kernel7.img
003903.307: Loading 'kernel7.img' to 0x8000 size 0x5108a0
003903.376: Device tree loaded to 0x2eff9200 (size 0x6de5)
003905.944: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
005331.235: vchiq_core: vchiq_init_state: slot_zero = 0xfad80000, is_master = 1
005335.580: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
005340.805: TV service:host side not connected, dropping notification 0x00000002, 0x00000002, 0x00000004
009791.047: brfs: File read: 5310624 bytes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Close within 30 daysThis issue will be closed within 30 days unless further interactions are posted. If you wish this is

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions