linux/drivers/gpu/drm/ingenic/ingenic-drm-drv.c

// SPDX-License-Identifier: GPL-2.0
//
// Ingenic JZ47xx KMS driver
//
// Copyright (C) 2019, Paul Cercueil <[email protected]>

#include "ingenic-drm.h"

#include <linux/bitfield.h>
#include <linux/component.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/media-bus-format.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/regmap.h>

#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_bridge_connector.h>
#include <drm/drm_color_mgmt.h>
#include <drm/drm_crtc.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_encoder.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_fb_dma_helper.h>
#include <drm/drm_fbdev_dma.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_plane.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>

#define HWDESC_PALETTE

struct ingenic_dma_hwdesc {} __aligned();

struct ingenic_dma_hwdescs {};

struct jz_soc_info {};

struct ingenic_drm_private_state {};

struct ingenic_drm {};

struct ingenic_drm_bridge {};

static inline struct ingenic_drm_bridge *
to_ingenic_drm_bridge(struct drm_encoder *encoder)
{}

static inline struct ingenic_drm_private_state *
to_ingenic_drm_priv_state(struct drm_private_state *state)
{}

static struct ingenic_drm_private_state *
ingenic_drm_get_priv_state(struct ingenic_drm *priv, struct drm_atomic_state *state)
{}

static struct ingenic_drm_private_state *
ingenic_drm_get_new_priv_state(struct ingenic_drm *priv, struct drm_atomic_state *state)
{}

static bool ingenic_drm_writeable_reg(struct device *dev, unsigned int reg)
{}

static const struct regmap_config ingenic_drm_regmap_config =;

static inline struct ingenic_drm *drm_device_get_priv(struct drm_device *drm)
{}

static inline struct ingenic_drm *drm_crtc_get_priv(struct drm_crtc *crtc)
{}

static inline struct ingenic_drm *drm_nb_get_priv(struct notifier_block *nb)
{}

static inline dma_addr_t dma_hwdesc_addr(const struct ingenic_drm *priv,
					 unsigned int idx)
{}

static int ingenic_drm_update_pixclk(struct notifier_block *nb,
				     unsigned long action,
				     void *data)
{}

static void ingenic_drm_bridge_atomic_enable(struct drm_bridge *bridge,
					     struct drm_bridge_state *old_bridge_state)
{}

static void ingenic_drm_crtc_atomic_enable(struct drm_crtc *crtc,
					   struct drm_atomic_state *state)
{}

static void ingenic_drm_bridge_atomic_disable(struct drm_bridge *bridge,
					      struct drm_bridge_state *old_bridge_state)
{}

static void ingenic_drm_crtc_atomic_disable(struct drm_crtc *crtc,
					    struct drm_atomic_state *state)
{}

static void ingenic_drm_crtc_update_timings(struct ingenic_drm *priv,
					    struct drm_display_mode *mode)
{}

static int ingenic_drm_crtc_atomic_check(struct drm_crtc *crtc,
					 struct drm_atomic_state *state)
{}

static enum drm_mode_status
ingenic_drm_crtc_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *mode)
{}

static void ingenic_drm_crtc_atomic_begin(struct drm_crtc *crtc,
					  struct drm_atomic_state *state)
{}

static void ingenic_drm_crtc_atomic_flush(struct drm_crtc *crtc,
					  struct drm_atomic_state *state)
{}

static int ingenic_drm_plane_atomic_check(struct drm_plane *plane,
					  struct drm_atomic_state *state)
{}

static void ingenic_drm_plane_enable(struct ingenic_drm *priv,
				     struct drm_plane *plane)
{}

void ingenic_drm_plane_disable(struct device *dev, struct drm_plane *plane)
{}

static void ingenic_drm_plane_atomic_disable(struct drm_plane *plane,
					     struct drm_atomic_state *state)
{}

void ingenic_drm_plane_config(struct device *dev,
			      struct drm_plane *plane, u32 fourcc)
{}

bool ingenic_drm_map_noncoherent(const struct device *dev)
{}

static void ingenic_drm_update_palette(struct ingenic_drm *priv,
				       const struct drm_color_lut *lut)
{}

static void ingenic_drm_plane_atomic_update(struct drm_plane *plane,
					    struct drm_atomic_state *state)
{}

static void ingenic_drm_encoder_atomic_mode_set(struct drm_encoder *encoder,
						struct drm_crtc_state *crtc_state,
						struct drm_connector_state *conn_state)
{}

static int ingenic_drm_bridge_attach(struct drm_bridge *bridge,
				     enum drm_bridge_attach_flags flags)
{}

static int ingenic_drm_bridge_atomic_check(struct drm_bridge *bridge,
					   struct drm_bridge_state *bridge_state,
					   struct drm_crtc_state *crtc_state,
					   struct drm_connector_state *conn_state)
{}

static u32 *
ingenic_drm_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
					     struct drm_bridge_state *bridge_state,
					     struct drm_crtc_state *crtc_state,
					     struct drm_connector_state *conn_state,
					     u32 output_fmt,
					     unsigned int *num_input_fmts)
{}

static irqreturn_t ingenic_drm_irq_handler(int irq, void *arg)
{}

static int ingenic_drm_enable_vblank(struct drm_crtc *crtc)
{}

static void ingenic_drm_disable_vblank(struct drm_crtc *crtc)
{}

static struct drm_framebuffer *
ingenic_drm_gem_fb_create(struct drm_device *drm, struct drm_file *file,
			  const struct drm_mode_fb_cmd2 *mode_cmd)
{}

static struct drm_gem_object *
ingenic_drm_gem_create_object(struct drm_device *drm, size_t size)
{}

static struct drm_private_state *
ingenic_drm_duplicate_state(struct drm_private_obj *obj)
{}

static void ingenic_drm_destroy_state(struct drm_private_obj *obj,
				      struct drm_private_state *state)
{}

DEFINE_DRM_GEM_DMA_FOPS(ingenic_drm_fops);

static const struct drm_driver ingenic_drm_driver_data =;

static const struct drm_plane_funcs ingenic_drm_primary_plane_funcs =;

static const struct drm_crtc_funcs ingenic_drm_crtc_funcs =;

static const struct drm_plane_helper_funcs ingenic_drm_plane_helper_funcs =;

static const struct drm_crtc_helper_funcs ingenic_drm_crtc_helper_funcs =;

static const struct drm_encoder_helper_funcs ingenic_drm_encoder_helper_funcs =;

static const struct drm_bridge_funcs ingenic_drm_bridge_funcs =;

static const struct drm_mode_config_funcs ingenic_drm_mode_config_funcs =;

static struct drm_mode_config_helper_funcs ingenic_drm_mode_config_helpers =;

static const struct drm_private_state_funcs ingenic_drm_private_state_funcs =;

static void ingenic_drm_unbind_all(void *d)
{}

static void __maybe_unused ingenic_drm_release_rmem(void *d)
{}

static void ingenic_drm_configure_hwdesc(struct ingenic_drm *priv,
					 unsigned int hwdesc,
					 unsigned int next_hwdesc, u32 id)
{}

static void ingenic_drm_configure_hwdesc_palette(struct ingenic_drm *priv)
{}

static void ingenic_drm_configure_hwdesc_plane(struct ingenic_drm *priv,
					       unsigned int plane)
{}

static void ingenic_drm_atomic_private_obj_fini(struct drm_device *drm, void *private_obj)
{}

static int ingenic_drm_bind(struct device *dev, bool has_components)
{}

static int ingenic_drm_bind_with_components(struct device *dev)
{}

static void ingenic_drm_unbind(struct device *dev)
{}

static const struct component_master_ops ingenic_master_ops =;

static int ingenic_drm_probe(struct platform_device *pdev)
{}

static void ingenic_drm_remove(struct platform_device *pdev)
{}

static void ingenic_drm_shutdown(struct platform_device *pdev)
{}

static int ingenic_drm_suspend(struct device *dev)
{}

static int ingenic_drm_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(ingenic_drm_pm_ops,
				ingenic_drm_suspend, ingenic_drm_resume);

static const u32 jz4740_formats[] =;

static const u32 jz4725b_formats_f1[] =;

static const u32 jz4725b_formats_f0[] =;

static const u32 jz4770_formats_f1[] =;

static const u32 jz4770_formats_f0[] =;

static const struct jz_soc_info jz4740_soc_info =;

static const struct jz_soc_info jz4725b_soc_info =;

static const struct jz_soc_info jz4760_soc_info =;

static const struct jz_soc_info jz4760b_soc_info =;

static const struct jz_soc_info jz4770_soc_info =;

static const struct jz_soc_info jz4780_soc_info =;

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

static struct platform_driver ingenic_drm_driver =;

static int ingenic_drm_init(void)
{}
module_init();

static void ingenic_drm_exit(void)
{}
module_exit(ingenic_drm_exit);

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