linux/drivers/gpu/drm/panel/panel-edp.c

/*
 * Copyright (C) 2013, NVIDIA Corporation.  All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sub license,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial portions
 * of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>

#include <video/display_timing.h>
#include <video/of_display_timing.h>
#include <video/videomode.h>

#include <drm/display/drm_dp_aux_bus.h>
#include <drm/display/drm_dp_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_device.h>
#include <drm/drm_edid.h>
#include <drm/drm_panel.h>

/**
 * struct panel_delay - Describes delays for a simple panel.
 */
struct panel_delay {};

/**
 * struct panel_desc - Describes a simple panel.
 */
struct panel_desc {};

/**
 * struct edp_panel_entry - Maps panel ID to delay / panel name.
 */
struct edp_panel_entry {};

struct panel_edp {};

static inline struct panel_edp *to_panel_edp(struct drm_panel *panel)
{}

static unsigned int panel_edp_get_timings_modes(struct panel_edp *panel,
						struct drm_connector *connector)
{}

static unsigned int panel_edp_get_display_modes(struct panel_edp *panel,
						struct drm_connector *connector)
{}

static int panel_edp_override_edid_mode(struct panel_edp *panel,
					struct drm_connector *connector,
					const struct drm_display_mode *override_mode)
{}

static int panel_edp_get_non_edid_modes(struct panel_edp *panel,
					struct drm_connector *connector)
{}

static void panel_edp_wait(ktime_t start_ktime, unsigned int min_ms)
{}

static int panel_edp_disable(struct drm_panel *panel)
{}

static int panel_edp_suspend(struct device *dev)
{}

static int panel_edp_unprepare(struct drm_panel *panel)
{}

static int panel_edp_get_hpd_gpio(struct device *dev, struct panel_edp *p)
{}

static bool panel_edp_can_read_hpd(struct panel_edp *p)
{}

static int panel_edp_prepare_once(struct panel_edp *p)
{}

/*
 * Some panels simply don't always come up and need to be power cycled to
 * work properly.  We'll allow for a handful of retries.
 */
#define MAX_PANEL_PREPARE_TRIES

static int panel_edp_resume(struct device *dev)
{}

static int panel_edp_prepare(struct drm_panel *panel)
{}

static int panel_edp_enable(struct drm_panel *panel)
{}

static int panel_edp_get_modes(struct drm_panel *panel,
			       struct drm_connector *connector)
{}

static int panel_edp_get_timings(struct drm_panel *panel,
				 unsigned int num_timings,
				 struct display_timing *timings)
{}

static enum drm_panel_orientation panel_edp_get_orientation(struct drm_panel *panel)
{}

static int detected_panel_show(struct seq_file *s, void *data)
{}

DEFINE_SHOW_ATTRIBUTE();

static void panel_edp_debugfs_init(struct drm_panel *panel, struct dentry *root)
{}

static const struct drm_panel_funcs panel_edp_funcs =;

#define PANEL_EDP_BOUNDS_CHECK(to_check, bounds, field)
static void panel_edp_parse_panel_timing_node(struct device *dev,
					      struct panel_edp *panel,
					      const struct display_timing *ot)
{}

static const struct edp_panel_entry *find_edp_panel(u32 panel_id, const struct drm_edid *edid);

static void panel_edp_set_conservative_timings(struct panel_edp *panel, struct panel_desc *desc)
{}

static int generic_edp_panel_probe(struct device *dev, struct panel_edp *panel)
{}

static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,
			   struct drm_dp_aux *aux)
{}

static void panel_edp_shutdown(struct device *dev)
{}

static void panel_edp_remove(struct device *dev)
{}

static const struct display_timing auo_b101ean01_timing =;

static const struct panel_desc auo_b101ean01 =;

static const struct drm_display_mode auo_b116xa3_mode =;

static const struct drm_display_mode auo_b116xak01_mode =;

static const struct panel_desc auo_b116xak01 =;

static const struct drm_display_mode auo_b133htn01_mode =;

static const struct panel_desc auo_b133htn01 =;

static const struct drm_display_mode auo_b133xtn01_mode =;

static const struct panel_desc auo_b133xtn01 =;

static const struct drm_display_mode boe_nv101wxmn51_modes[] =;

static const struct panel_desc boe_nv101wxmn51 =;

static const struct drm_display_mode boe_nv110wtm_n61_modes[] =;

static const struct panel_desc boe_nv110wtm_n61 =;

/* Also used for boe_nv133fhm_n62 */
static const struct drm_display_mode boe_nv133fhm_n61_modes =;

/* Also used for boe_nv133fhm_n62 */
static const struct panel_desc boe_nv133fhm_n61 =;

static const struct drm_display_mode boe_nv140fhmn49_modes[] =;

static const struct panel_desc boe_nv140fhmn49 =;

static const struct drm_display_mode innolux_n116bca_ea1_mode =;

static const struct panel_desc innolux_n116bca_ea1 =;

/*
 * Datasheet specifies that at 60 Hz refresh rate:
 * - total horizontal time: { 1506, 1592, 1716 }
 * - total vertical time: { 788, 800, 868 }
 *
 * ...but doesn't go into exactly how that should be split into a front
 * porch, back porch, or sync length.  For now we'll leave a single setting
 * here which allows a bit of tweaking of the pixel clock at the expense of
 * refresh rate.
 */
static const struct display_timing innolux_n116bge_timing =;

static const struct panel_desc innolux_n116bge =;

static const struct drm_display_mode innolux_n125hce_gn1_mode =;

static const struct panel_desc innolux_n125hce_gn1 =;

static const struct drm_display_mode innolux_p120zdg_bf1_mode =;

static const struct panel_desc innolux_p120zdg_bf1 =;

static const struct drm_display_mode kingdisplay_kd116n21_30nv_a010_mode =;

static const struct panel_desc kingdisplay_kd116n21_30nv_a010 =;

static const struct drm_display_mode lg_lp079qx1_sp0v_mode =;

static const struct panel_desc lg_lp079qx1_sp0v =;

static const struct drm_display_mode lg_lp097qx1_spa1_mode =;

static const struct panel_desc lg_lp097qx1_spa1 =;

static const struct drm_display_mode lg_lp120up1_mode =;

static const struct panel_desc lg_lp120up1 =;

static const struct drm_display_mode lg_lp129qe_mode =;

static const struct panel_desc lg_lp129qe =;

static const struct drm_display_mode neweast_wjfh116008a_modes[] =;

static const struct panel_desc neweast_wjfh116008a =;

static const struct drm_display_mode samsung_lsn122dl01_c01_mode =;

static const struct panel_desc samsung_lsn122dl01_c01 =;

static const struct drm_display_mode samsung_ltn140at29_301_mode =;

static const struct panel_desc samsung_ltn140at29_301 =;

static const struct drm_display_mode sharp_ld_d5116z01b_mode =;

static const struct panel_desc sharp_ld_d5116z01b =;

static const struct display_timing sharp_lq123p1jx31_timing =;

static const struct panel_desc sharp_lq123p1jx31 =;

static const struct of_device_id platform_of_match[] =;
MODULE_DEVICE_TABLE(of, platform_of_match);

static const struct panel_delay delay_200_500_p2e80 =;

static const struct panel_delay delay_200_500_e50_p2e80 =;

static const struct panel_delay delay_200_500_p2e100 =;

static const struct panel_delay delay_200_500_e50 =;

static const struct panel_delay delay_200_500_e50_p2e200 =;

static const struct panel_delay delay_200_500_e80 =;

static const struct panel_delay delay_200_500_e80_d50 =;

static const struct panel_delay delay_80_500_e50 =;

static const struct panel_delay delay_100_500_e200 =;

static const struct panel_delay delay_200_500_e200 =;

static const struct panel_delay delay_200_500_e200_d200 =;

static const struct panel_delay delay_200_500_e200_d10 =;

static const struct panel_delay delay_200_150_e200 =;

static const struct panel_delay delay_200_500_e50_po2e200 =;

#define EDP_PANEL_ENTRY(vend_chr_0, vend_chr_1, vend_chr_2, product_id, _delay, _name)

#define EDP_PANEL_ENTRY2(vend_chr_0, vend_chr_1, vend_chr_2, product_id, _delay, _name, _mode)

/*
 * This table is used to figure out power sequencing delays for panels that
 * are detected by EDID. Entries here may point to entries in the
 * platform_of_match table (if a panel is listed in both places).
 *
 * Sort first by vendor, then by product ID.
 */
static const struct edp_panel_entry edp_panels[] =;

static const struct edp_panel_entry *find_edp_panel(u32 panel_id, const struct drm_edid *edid)
{}

static int panel_edp_platform_probe(struct platform_device *pdev)
{}

static void panel_edp_platform_remove(struct platform_device *pdev)
{}

static void panel_edp_platform_shutdown(struct platform_device *pdev)
{}

static const struct dev_pm_ops panel_edp_pm_ops =;

static struct platform_driver panel_edp_platform_driver =;

static int panel_edp_dp_aux_ep_probe(struct dp_aux_ep_device *aux_ep)
{}

static void panel_edp_dp_aux_ep_remove(struct dp_aux_ep_device *aux_ep)
{}

static void panel_edp_dp_aux_ep_shutdown(struct dp_aux_ep_device *aux_ep)
{}

static struct dp_aux_ep_driver panel_edp_dp_aux_ep_driver =;

static int __init panel_edp_init(void)
{}
module_init();

static void __exit panel_edp_exit(void)
{}
module_exit(panel_edp_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();