#include "ingenic-drm.h"
#include "ingenic-ipu.h"
#include <linux/clk.h>
#include <linux/component.h>
#include <linux/gcd.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/time.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fb_dma_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_plane.h>
#include <drm/drm_property.h>
#include <drm/drm_vblank.h>
struct ingenic_ipu;
struct soc_info { … };
struct ingenic_ipu_private_state { … };
struct ingenic_ipu { … };
#define I2F(i) …
#define F2I(f) …
#define FMUL(fa, fb) …
#define SHARPNESS_INCR …
static inline struct ingenic_ipu *plane_to_ingenic_ipu(struct drm_plane *plane)
{ … }
static inline struct ingenic_ipu_private_state *
to_ingenic_ipu_priv_state(struct drm_private_state *state)
{ … }
static struct ingenic_ipu_private_state *
ingenic_ipu_get_priv_state(struct ingenic_ipu *priv, struct drm_atomic_state *state)
{ … }
static struct ingenic_ipu_private_state *
ingenic_ipu_get_new_priv_state(struct ingenic_ipu *priv, struct drm_atomic_state *state)
{ … }
static inline s32 cubic_conv(s32 f_a, s32 f_x)
{ … }
static void jz4760_set_coefs(struct ingenic_ipu *ipu, unsigned int reg,
unsigned int sharpness, bool downscale,
unsigned int weight, unsigned int offset)
{ … }
static void jz4725b_set_coefs(struct ingenic_ipu *ipu, unsigned int reg,
unsigned int sharpness, bool downscale,
unsigned int weight, unsigned int offset)
{ … }
static void ingenic_ipu_set_downscale_coefs(struct ingenic_ipu *ipu,
unsigned int reg,
unsigned int num,
unsigned int denom)
{ … }
static void ingenic_ipu_set_integer_upscale_coefs(struct ingenic_ipu *ipu,
unsigned int reg,
unsigned int num)
{ … }
static void ingenic_ipu_set_upscale_coefs(struct ingenic_ipu *ipu,
unsigned int reg,
unsigned int num,
unsigned int denom)
{ … }
static void ingenic_ipu_set_coefs(struct ingenic_ipu *ipu, unsigned int reg,
unsigned int num, unsigned int denom)
{ … }
static int reduce_fraction(unsigned int *num, unsigned int *denom)
{ … }
static inline bool osd_changed(struct drm_plane_state *state,
struct drm_plane_state *oldstate)
{ … }
static void ingenic_ipu_plane_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static int ingenic_ipu_plane_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void ingenic_ipu_plane_atomic_disable(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static const struct drm_plane_helper_funcs ingenic_ipu_plane_helper_funcs = …;
static int
ingenic_ipu_plane_atomic_get_property(struct drm_plane *plane,
const struct drm_plane_state *state,
struct drm_property *property, u64 *val)
{ … }
static int
ingenic_ipu_plane_atomic_set_property(struct drm_plane *plane,
struct drm_plane_state *state,
struct drm_property *property, u64 val)
{ … }
static const struct drm_plane_funcs ingenic_ipu_plane_funcs = …;
static struct drm_private_state *
ingenic_ipu_duplicate_state(struct drm_private_obj *obj)
{ … }
static void ingenic_ipu_destroy_state(struct drm_private_obj *obj,
struct drm_private_state *state)
{ … }
static const struct drm_private_state_funcs ingenic_ipu_private_state_funcs = …;
static irqreturn_t ingenic_ipu_irq_handler(int irq, void *arg)
{ … }
static const struct regmap_config ingenic_ipu_regmap_config = …;
static int ingenic_ipu_bind(struct device *dev, struct device *master, void *d)
{ … }
static void ingenic_ipu_unbind(struct device *dev,
struct device *master, void *d)
{ … }
static const struct component_ops ingenic_ipu_ops = …;
static int ingenic_ipu_probe(struct platform_device *pdev)
{ … }
static void ingenic_ipu_remove(struct platform_device *pdev)
{ … }
static const u32 jz4725b_ipu_formats[] = …;
static const struct soc_info jz4725b_soc_info = …;
static const u32 jz4760_ipu_formats[] = …;
static const struct soc_info jz4760_soc_info = …;
static const struct of_device_id ingenic_ipu_of_match[] = …;
MODULE_DEVICE_TABLE(of, ingenic_ipu_of_match);
static struct platform_driver ingenic_ipu_driver = …;
struct platform_driver *ingenic_ipu_driver_ptr = …;