Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: drm: rp1: rp1-vec: Add a parameter to set DRM picture aspect ratio #6166

Draft
wants to merge 1 commit into
base: rpi-6.6.y
Choose a base branch
from

Conversation

njhollinghurst
Copy link
Contributor

Experimentally, allow setting picture_aspect_ratio field in all advertised DRM modes. This has no other effect on VEC's behaviour (and perhaps has no useful effects at all...)

It is set via a module parameter drm-rp1-vec.par which can be set from the command line, or later using sysfs. A value of 1 means 4:3, 2 means 16:9.

Allow setting picture_aspect_ratio field in advertised DRM modes.
This has no other effect on VEC's behaviour.

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Copy link
Contributor

@6by9 6by9 left a comment

Choose a reason for hiding this comment

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

Can we add validation that the module parameter is a valid enum hdmi_picture_aspect? https://elixir.bootlin.com/linux/latest/source/include/linux/hdmi.h#L96

drm_mode_probed_add(connector, mode);
n++;

if (mode->vtotal == 405 || mode->vtotal == 819)
if (i >= 4)
Copy link
Contributor

Choose a reason for hiding this comment

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

This 4 is creeping in as a magic number both here and line 355. It'd be nice if it came from a define in and around the rp1vec_modes array.

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.

None yet

2 participants