/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Copyright 2012 Steffen Trumtrar <[email protected]>3*4* generic videomode description5*/67#ifndef __LINUX_VIDEOMODE_H8#define __LINUX_VIDEOMODE_H910#include <linux/types.h>11#include <video/display_timing.h>1213/*14* Subsystem independent description of a videomode.15* Can be generated from struct display_timing.16*/17struct videomode {18unsigned long pixelclock; /* pixelclock in Hz */1920u32 hactive;21u32 hfront_porch;22u32 hback_porch;23u32 hsync_len;2425u32 vactive;26u32 vfront_porch;27u32 vback_porch;28u32 vsync_len;2930enum display_flags flags; /* display flags */31};3233/**34* videomode_from_timing - convert display timing to videomode35* @dt: display_timing structure36* @vm: return value37*38* DESCRIPTION:39* This function converts a struct display_timing to a struct videomode.40*/41void videomode_from_timing(const struct display_timing *dt,42struct videomode *vm);4344/**45* videomode_from_timings - convert one display timings entry to videomode46* @disp: structure with all possible timing entries47* @vm: return value48* @index: index into the list of display timings in devicetree49*50* DESCRIPTION:51* This function converts one struct display_timing entry to a struct videomode.52*/53int videomode_from_timings(const struct display_timings *disp,54struct videomode *vm, unsigned int index);5556#endif575859