Commit 9ea10a50 authored by Douglas Anderson's avatar Douglas Anderson

drm/panel-edp: Split the delay structure out

In the case where we can read an EDID for a panel the only part of the
panel description that can't be found directly from the EDID is the
description of the delays. Let's break the delay structure out so that
we can specify just the delays for panels that are detected by EDID.

This is simple code motion. No functional change is intended.
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210914132020.v5.10.I24f3646dd09954958645cc05c538909f169bf362@changeid
parent b6d5ffce
......@@ -41,52 +41,11 @@
#include <drm/drm_panel.h>
/**
* struct panel_desc - Describes a simple panel.
* struct panel_delay - Describes delays for a simple panel.
*/
struct panel_desc {
struct panel_delay {
/**
* @modes: Pointer to array of fixed modes appropriate for this panel.
*
* If only one mode then this can just be the address of the mode.
* NOTE: cannot be used with "timings" and also if this is specified
* then you cannot override the mode in the device tree.
*/
const struct drm_display_mode *modes;
/** @num_modes: Number of elements in modes array. */
unsigned int num_modes;
/**
* @timings: Pointer to array of display timings
*
* NOTE: cannot be used with "modes" and also these will be used to
* validate a device tree override if one is present.
*/
const struct display_timing *timings;
/** @num_timings: Number of elements in timings array. */
unsigned int num_timings;
/** @bpc: Bits per color. */
unsigned int bpc;
/** @size: Structure containing the physical size of this panel. */
struct {
/**
* @size.width: Width (in mm) of the active display area.
*/
unsigned int width;
/**
* @size.height: Height (in mm) of the active display area.
*/
unsigned int height;
} size;
/** @delay: Structure containing various delay values for this panel. */
struct {
/**
* @delay.prepare: Time for the panel to become ready.
* @prepare: Time for the panel to become ready.
*
* The time (in milliseconds) that it takes for the panel to
* become ready and start receiving video data
......@@ -94,7 +53,7 @@ struct panel_desc {
unsigned int prepare;
/**
* @delay.hpd_absent_delay: Time to wait if HPD isn't hooked up.
* @hpd_absent_delay: Time to wait if HPD isn't hooked up.
*
* Add this to the prepare delay if we know Hot Plug Detect
* isn't used.
......@@ -102,7 +61,7 @@ struct panel_desc {
unsigned int hpd_absent_delay;
/**
* @delay.prepare_to_enable: Time between prepare and enable.
* @prepare_to_enable: Time between prepare and enable.
*
* The minimum time, in milliseconds, that needs to have passed
* between when prepare finished and enable may begin. If at
......@@ -132,7 +91,7 @@ struct panel_desc {
unsigned int prepare_to_enable;
/**
* @delay.enable: Time for the panel to display a valid frame.
* @enable: Time for the panel to display a valid frame.
*
* The time (in milliseconds) that it takes for the panel to
* display the first valid frame after starting to receive
......@@ -141,7 +100,7 @@ struct panel_desc {
unsigned int enable;
/**
* @delay.disable: Time for the panel to turn the display off.
* @disable: Time for the panel to turn the display off.
*
* The time (in milliseconds) that it takes for the panel to
* turn the display off (no content is visible).
......@@ -149,7 +108,7 @@ struct panel_desc {
unsigned int disable;
/**
* @delay.unprepare: Time to power down completely.
* @unprepare: Time to power down completely.
*
* The time (in milliseconds) that it takes for the panel
* to power itself down completely.
......@@ -160,7 +119,53 @@ struct panel_desc {
* finished, the driver waits for the remaining time.
*/
unsigned int unprepare;
} delay;
};
/**
* struct panel_desc - Describes a simple panel.
*/
struct panel_desc {
/**
* @modes: Pointer to array of fixed modes appropriate for this panel.
*
* If only one mode then this can just be the address of the mode.
* NOTE: cannot be used with "timings" and also if this is specified
* then you cannot override the mode in the device tree.
*/
const struct drm_display_mode *modes;
/** @num_modes: Number of elements in modes array. */
unsigned int num_modes;
/**
* @timings: Pointer to array of display timings
*
* NOTE: cannot be used with "modes" and also these will be used to
* validate a device tree override if one is present.
*/
const struct display_timing *timings;
/** @num_timings: Number of elements in timings array. */
unsigned int num_timings;
/** @bpc: Bits per color. */
unsigned int bpc;
/** @size: Structure containing the physical size of this panel. */
struct {
/**
* @size.width: Width (in mm) of the active display area.
*/
unsigned int width;
/**
* @size.height: Height (in mm) of the active display area.
*/
unsigned int height;
} size;
/** @delay: Structure containing various delay values for this panel. */
struct panel_delay delay;
};
struct panel_edp {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment