Skip to content

Commit

Permalink
drm/panel: Add display timing support
Browse files Browse the repository at this point in the history
Many panel data sheets, additionally to typical values, list allowed
ranges for timings such as hsync/vsync lengths, porches, and the pixel
clock rate. These can be stored in a struct display_timing, to be used
by an encoder mode_fixup callback to clamp user provided timing values
or to validate workarounds for clock source limitations.

This patch adds a new drm_panel_funcs callback that returns the panel's
available display_timing entries.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
  • Loading branch information
Philipp Zabel authored and Thierry Reding committed Apr 2, 2015
1 parent 725c9d4 commit 2938931
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/drm/drm_panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
struct drm_connector;
struct drm_device;
struct drm_panel;
struct display_timing;

/**
* struct drm_panel_funcs - perform operations on a given panel
Expand All @@ -38,6 +39,8 @@ struct drm_panel;
* @enable: enable panel (turn on back light, etc.)
* @get_modes: add modes to the connector that the panel is attached to and
* return the number of modes added
* @get_timings: copy display timings into the provided array and return
* the number of display timings available
*
* The .prepare() function is typically called before the display controller
* starts to transmit video data. Panel drivers can use this to turn the panel
Expand Down Expand Up @@ -68,6 +71,8 @@ struct drm_panel_funcs {
int (*prepare)(struct drm_panel *panel);
int (*enable)(struct drm_panel *panel);
int (*get_modes)(struct drm_panel *panel);
int (*get_timings)(struct drm_panel *panel, unsigned int num_timings,
struct display_timing *timings);
};

struct drm_panel {
Expand Down

0 comments on commit 2938931

Please sign in to comment.