Skip to content

Conversation

rogertje50
Copy link

@rogertje50 rogertje50 commented Mar 28, 2025

Add --drm-vout-display Parameter for Selecting Specific DRM Outputs

This pull request introduces a new command-line parameter, --drm-vout-display, to allow users to specify the desired DRM output display when running Flutter applications on Raspberry Pi.

This change is implemented in response to issue #201.

Supported Options

The supported values for this parameter are:

  • HDMI-A-1
  • HDMI-A-2
  • DSI-1
  • DSI-2

If the --drm-vout-display parameter is not provided, the code will behave as before, automatically selecting the first available connected display.


Key Changes

New Command-Line Argument

  • Added the --drm-vout-display option to the command-line arguments.
  • Users can now specify the desired display output by providing one of the supported values.

Validation and Parsing

  • The provided value is validated against the supported options (HDMI-A-1, HDMI-A-2, DSI-1, DSI-2).
  • The flutterpi struct now includes a drm_vout_display field to store the selected display.

Behavior

  • If a valid display is specified, the code will attempt to use the corresponding DRM connector type and type ID.
  • If no display is specified, the code defaults to the previous behavior of selecting the first available connected display.

Documentation

  • Updated the --help output to include the new --drm-vout-display option.
  • The supported values are based on the Raspberry Pi documentation: Playing Audio and Video.

Example Usage

flutter-pi --drm-vout-display HDMI-A-1

Backward Compatibility

This change is fully backward-compatible. If the --drm-vout-display parameter is not provided, the application will function as it did previously, automatically selecting the first available connected display.


Motivation

This feature provides users with greater control over which display output is used, especially in multi-display setups or when specific outputs are required for certain use cases.

@rogertje50 rogertje50 requested a review from Copilot March 28, 2025 13:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (2)
  • src/flutter-pi.c: Language not supported
  • src/flutter-pi.h: Language not supported

@rogertje50 rogertje50 requested a review from tomfrissen March 28, 2025 13:24
@rogertje50 rogertje50 merged commit 6522d1c into master Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant