linux/drivers/gpu/drm/sun4i/sun4i_drv.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2015 Free Electrons
 * Copyright (C) 2015 NextThing Co
 *
 * Maxime Ripard <[email protected]>
 */

#include <linux/component.h>
#include <linux/dma-mapping.h>
#include <linux/kfifo.h>
#include <linux/module.h>
#include <linux/of_graph.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>

#include <drm/drm_aperture.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fbdev_dma.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_module.h>
#include <drm/drm_of.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>

#include "sun4i_drv.h"
#include "sun4i_frontend.h"
#include "sun4i_framebuffer.h"
#include "sun4i_tcon.h"
#include "sun8i_tcon_top.h"

static int drm_sun4i_gem_dumb_create(struct drm_file *file_priv,
				     struct drm_device *drm,
				     struct drm_mode_create_dumb *args)
{}

DEFINE_DRM_GEM_DMA_FOPS(sun4i_drv_fops);

static const struct drm_driver sun4i_drv_driver =;

static int sun4i_drv_bind(struct device *dev)
{}

static void sun4i_drv_unbind(struct device *dev)
{}

static const struct component_master_ops sun4i_drv_master_ops =;

static bool sun4i_drv_node_is_connector(struct device_node *node)
{}

static bool sun4i_drv_node_is_frontend(struct device_node *node)
{}

static bool sun4i_drv_node_is_deu(struct device_node *node)
{}

static bool sun4i_drv_node_is_supported_frontend(struct device_node *node)
{}

static bool sun4i_drv_node_is_tcon(struct device_node *node)
{}

static bool sun4i_drv_node_is_tcon_with_ch0(struct device_node *node)
{}

static bool sun4i_drv_node_is_tcon_top(struct device_node *node)
{}

/*
 * The encoder drivers use drm_of_find_possible_crtcs to get upstream
 * crtcs from the device tree using of_graph. For the results to be
 * correct, encoders must be probed/bound after _all_ crtcs have been
 * created. The existing code uses a depth first recursive traversal
 * of the of_graph, which means the encoders downstream of the TCON
 * get add right after the first TCON. The second TCON or CRTC will
 * never be properly associated with encoders connected to it.
 *
 * Also, in a dual display pipeline setup, both frontends can feed
 * either backend, and both backends can feed either TCON, we want
 * all components of the same type to be added before the next type
 * in the pipeline. Fortunately, the pipelines are perfectly symmetric,
 * i.e. components of the same type are at the same depth when counted
 * from the frontend. The only exception is the third pipeline in
 * the A80 SoC, which we do not support anyway.
 *
 * Hence we can use a breadth first search traversal order to add
 * components. We do not need to check for duplicates. The component
 * matching system handles this for us.
 */
struct endpoint_list {};

static void sun4i_drv_traverse_endpoints(struct endpoint_list *list,
					 struct device_node *node,
					 int port_id)
{}

static int sun4i_drv_add_endpoints(struct device *dev,
				   struct endpoint_list *list,
				   struct component_match **match,
				   struct device_node *node)
{}

#ifdef CONFIG_PM_SLEEP
static int sun4i_drv_drm_sys_suspend(struct device *dev)
{}

static int sun4i_drv_drm_sys_resume(struct device *dev)
{}
#endif

static const struct dev_pm_ops sun4i_drv_drm_pm_ops =;

static int sun4i_drv_probe(struct platform_device *pdev)
{}

static void sun4i_drv_remove(struct platform_device *pdev)
{}

static void sun4i_drv_shutdown(struct platform_device *pdev)
{}

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

static struct platform_driver sun4i_drv_platform_driver =;
drm_module_platform_driver();

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