Skip to content
  • Neil Armstrong's avatar
    modetest: switch usage to proper options grammar · 6acadd49
    Neil Armstrong authored and Dmitry Baryshkov's avatar Dmitry Baryshkov committed
    It was unclear how #mode could be used, so fixup the usage string and print
    the struct grammar of the -s and -P options to clarify the usage.
    
    The following grammar was compiled:
    <plane_topology> ::= <plane_id> "@" <crtc_id> ":" <width> "x" <height> ( <plane_offsets> )?
    <plane_offsets> ::= "+" <x_offset> "+" <y_offset> ( <plane_scale> )?
    <plane_scale> ::= "*" <scale> ( <plane_format> )?
    <plane_format> ::= "@" <format>
    
    <mode_topology> ::= <connector_id> ( "," <connector_id> )* ( "@" <crtc_id> )? ":" <mode_selection> ( "@" <format> )?
    <mode_selection> ::=  <indexed_mode> | <named_mode> | <custom_mode>
    <indexed_mode> ::=  "#" <mode_index>
    <named_mode> ::=  <width> "x" <height> ( "-" <vrefresh> )?
    <custom_mode> ::=  <hdisplay> "," <hsyncstart> "," <hsyncend> "," <htotal> "," <vdisplay> "," <vsyncstart> "," <vsyncend> "," <vtotal>  "-" <vrefresh>
    <property>  ::= <object_id> ":" <property_name> ":" <value>
    
    <plane_id> ::= [0-9]+
    <crtc_id> ::= [0-9]+
    <width> ::= [0-9]+
    <height> ::= [0-9]+
    <x_offset> ::= [0-9]+
    <y_offset> ::= [0-9]+
    <scale> ::= [0-9]+ ( "." [0-9]+ )
    <format> ::= ( [A-Z] | [0-9] )+
    <connector_id> ::= [0-9]+
    <mode_index> ::= [0-9]+
    <hdisplay> ::= [0-9]+
    <hsyncstart> ::= [0-9]+
    <hsyncend> ::= [0-9]+
    <htotal> ::= [0-9]+
    <vdisplay> ::= [0-9]+
    <vsyncstart> ::= [0-9]+
    <vsyncend> ::= [0-9]+
    <vtotal> ::= [0-9]+
    <object_id> ::= [0-9]+
    <vrefresh> ::= [0-9]+
    <property_name> ::= ( [A-Z] | [0-9] | "_" )+
    <value> ::= [0-9]+
    
    with the https://bnfplayground.pauliankline.com/
    
     service
    
    Reviewed-by: default avatarMarijn Suijten <marijn.suijten@somainline.org>
    Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Signed-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
    6acadd49