diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-02-18 12:03:42 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-03-14 17:36:59 +0200 |
commit | 2d3eec8970335148278a6e350bc4840374f06471 (patch) | |
tree | 3b7c51954ad57b43bca092091ce6493176f7fd1c /include | |
parent | b861de246912e10c5bda32cb100bff429a5e1ec4 (diff) | |
download | linux-2d3eec8970335148278a6e350bc4840374f06471.tar.bz2 |
drm: Add drm_mode_init()
Add a variant of drm_mode_copy() that explicitly clears out
the list head of the destination mode. Helpful to guarantee
we don't have stack garbage left in there for on-stack modes.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220218100403.7028-2-ville.syrjala@linux.intel.com
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Diffstat (limited to 'include')
-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 2fa6b2c33b3f..a80ae9639e96 100644 --- a/include/drm/drm_modes.h +++ b/include/drm/drm_modes.h @@ -492,6 +492,8 @@ void drm_mode_set_crtcinfo(struct drm_display_mode *p, int adjust_flags); void drm_mode_copy(struct drm_display_mode *dst, const struct drm_display_mode *src); +void drm_mode_init(struct drm_display_mode *dst, + const struct drm_display_mode *src); struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev, const struct drm_display_mode *mode); bool drm_mode_match(const struct drm_display_mode *mode1, |