1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>
5 * generic videomode description
8 #ifndef __LINUX_VIDEOMODE_H
9 #define __LINUX_VIDEOMODE_H
11 #include <linux/types.h>
12 #include <video/display_timing.h>
15 * Subsystem independent description of a videomode.
16 * Can be generated from struct display_timing.
19 unsigned long pixelclock
; /* pixelclock in Hz */
31 enum display_flags flags
; /* display flags */
35 * videomode_from_timing - convert display timing to videomode
36 * @dt: display_timing structure
40 * This function converts a struct display_timing to a struct videomode.
42 void videomode_from_timing(const struct display_timing
*dt
,
43 struct videomode
*vm
);
46 * videomode_from_timings - convert one display timings entry to videomode
47 * @disp: structure with all possible timing entries
49 * @index: index into the list of display timings in devicetree
52 * This function converts one struct display_timing entry to a struct videomode.
54 int videomode_from_timings(const struct display_timings
*disp
,
55 struct videomode
*vm
, unsigned int index
);