diff options
author | Javier Martinez Canillas <javierm@redhat.com> | 2024-01-02 13:21:58 +0100 |
---|---|---|
committer | Javier Martinez Canillas <javierm@redhat.com> | 2024-01-05 21:14:46 +0100 |
commit | 5343f29b3dc534be01b45cd3a3e43572996f96f8 (patch) | |
tree | 2d22b555764663aeb6be3236e401c5505f9dec4a /include/drm/drm_modes.h | |
parent | e130ba220da559a8eac60eb5ff60b0774ea17009 (diff) |
drm: Move drm_set_preferred_mode() helper from drm_edid to drm_modes
The helper is generic, it doesn't use the opaque EDID type struct drm_edid
and is also used by drivers that only support non-probeable displays such
as fixed panels.
These drivers add a list of modes using drm_mode_probed_add() and then set
a preferred mode using the drm_set_preferred_mode() helper.
It seems more logical to have the helper definition in drm_modes.o instead
of drm_edid.o, since the former contains modes helper while the latter has
helpers to manage the EDID information.
Since both drm_edid.o and drm_modes.o object files are built-in the drm.o
object, there are no functional changes. But besides being a more logical
place for this helper, it could also allow to eventually make drm_edid.o
optional and not included in drm.o if only fixed panels must be supported
in a given system.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240102122208.3103597-1-javierm@redhat.com
Diffstat (limited to 'include/drm/drm_modes.h')
-rw-r--r-- | include/drm/drm_modes.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h index c613f0abe9dc..b9bb92e4b029 100644 --- a/include/drm/drm_modes.h +++ b/include/drm/drm_modes.h @@ -467,6 +467,8 @@ bool drm_mode_is_420_also(const struct drm_display_info *display, const struct drm_display_mode *mode); bool drm_mode_is_420(const struct drm_display_info *display, const struct drm_display_mode *mode); +void drm_set_preferred_mode(struct drm_connector *connector, + int hpref, int vpref); struct drm_display_mode *drm_analog_tv_mode(struct drm_device *dev, enum drm_connector_tv_mode mode, |