#include <linux/component.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/firmware.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/reset.h>
#include <linux/seq_file.h>
#include <drm/drm_atomic.h>
#include <drm/drm_device.h>
#include <drm/drm_fb_dma_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_dma_helper.h>
#include "sti_compositor.h"
#include "sti_drv.h"
#include "sti_hqvdp_lut.h"
#include "sti_plane.h"
#include "sti_vtg.h"
#define HQVDP_FMW_NAME …
#define HQVDP_DMEM …
#define HQVDP_PMEM …
#define HQVDP_RD_PLUG …
#define HQVDP_RD_PLUG_CONTROL …
#define HQVDP_RD_PLUG_PAGE_SIZE …
#define HQVDP_RD_PLUG_MIN_OPC …
#define HQVDP_RD_PLUG_MAX_OPC …
#define HQVDP_RD_PLUG_MAX_CHK …
#define HQVDP_RD_PLUG_MAX_MSG …
#define HQVDP_RD_PLUG_MIN_SPACE …
#define HQVDP_WR_PLUG …
#define HQVDP_WR_PLUG_CONTROL …
#define HQVDP_WR_PLUG_PAGE_SIZE …
#define HQVDP_WR_PLUG_MIN_OPC …
#define HQVDP_WR_PLUG_MAX_OPC …
#define HQVDP_WR_PLUG_MAX_CHK …
#define HQVDP_WR_PLUG_MAX_MSG …
#define HQVDP_WR_PLUG_MIN_SPACE …
#define HQVDP_MBX …
#define HQVDP_MBX_IRQ_TO_XP70 …
#define HQVDP_MBX_INFO_HOST …
#define HQVDP_MBX_IRQ_TO_HOST …
#define HQVDP_MBX_INFO_XP70 …
#define HQVDP_MBX_SW_RESET_CTRL …
#define HQVDP_MBX_STARTUP_CTRL1 …
#define HQVDP_MBX_STARTUP_CTRL2 …
#define HQVDP_MBX_GP_STATUS …
#define HQVDP_MBX_NEXT_CMD …
#define HQVDP_MBX_CURRENT_CMD …
#define HQVDP_MBX_SOFT_VSYNC …
#define PLUG_CONTROL_ENABLE …
#define PLUG_PAGE_SIZE_256 …
#define PLUG_MIN_OPC_8 …
#define PLUG_MAX_OPC_64 …
#define PLUG_MAX_CHK_2X …
#define PLUG_MAX_MSG_1X …
#define PLUG_MIN_SPACE_1 …
#define SW_RESET_CTRL_FULL …
#define SW_RESET_CTRL_CORE …
#define STARTUP_CTRL1_RST_DONE …
#define STARTUP_CTRL1_AUTH_IDLE …
#define STARTUP_CTRL2_FETCH_EN …
#define INFO_XP70_FW_READY …
#define INFO_XP70_FW_PROCESSING …
#define INFO_XP70_FW_INITQUEUES …
#define SOFT_VSYNC_HW …
#define SOFT_VSYNC_SW_CMD …
#define SOFT_VSYNC_SW_CTRL_IRQ …
#define POLL_MAX_ATTEMPT …
#define POLL_DELAY_MS …
#define SCALE_FACTOR …
#define SCALE_MAX_FOR_LEG_LUT_F …
#define SCALE_MAX_FOR_LEG_LUT_E …
#define SCALE_MAX_FOR_LEG_LUT_D …
#define SCALE_MAX_FOR_LEG_LUT_C …
enum sti_hvsrc_orient { … };
struct sti_hqvdp_top { … };
#define TOP_CONFIG_INTER_BTM …
#define TOP_CONFIG_INTER_TOP …
#define TOP_CONFIG_PROGRESSIVE …
#define TOP_MEM_FORMAT_DFLT …
#define MAX_WIDTH …
#define MAX_HEIGHT …
#define MIN_WIDTH …
#define MIN_HEIGHT …
struct sti_hqvdp_vc1re { … };
struct sti_hqvdp_fmd { … };
struct sti_hqvdp_csdi { … };
#define CSDI_CONFIG_PROG …
#define CSDI_CONFIG_INTER_DIR …
#define CSDI_CONFIG2_DFLT …
#define CSDI_DCDI_CONFIG_DFLT …
struct sti_hqvdp_hvsrc { … };
#define HVSRC_PARAM_CTRL_DFLT …
struct sti_hqvdp_iqi { … };
#define IQI_CONFIG_DFLT …
#define IQI_CON_BRI_DFLT …
#define IQI_SAT_GAIN_DFLT …
#define IQI_PXF_CONF_DFLT …
struct sti_hqvdp_top_status { … };
struct sti_hqvdp_fmd_status { … };
struct sti_hqvdp_csdi_status { … };
struct sti_hqvdp_hvsrc_status { … };
struct sti_hqvdp_iqi_status { … };
#define NB_VDP_CMD …
struct sti_hqvdp_cmd { … };
struct sti_hqvdp { … };
#define to_sti_hqvdp(x) …
static const uint32_t hqvdp_supported_formats[] = …;
static int sti_hqvdp_get_free_cmd(struct sti_hqvdp *hqvdp)
{ … }
static int sti_hqvdp_get_curr_cmd(struct sti_hqvdp *hqvdp)
{ … }
static int sti_hqvdp_get_next_cmd(struct sti_hqvdp *hqvdp)
{ … }
#define DBGFS_DUMP(reg) …
static const char *hqvdp_dbg_get_lut(u32 *coef)
{ … }
static void hqvdp_dbg_dump_cmd(struct seq_file *s, struct sti_hqvdp_cmd *c)
{ … }
static int hqvdp_dbg_show(struct seq_file *s, void *data)
{ … }
static struct drm_info_list hqvdp_debugfs_files[] = …;
static void hqvdp_debugfs_init(struct sti_hqvdp *hqvdp, struct drm_minor *minor)
{ … }
static void sti_hqvdp_update_hvsrc(enum sti_hvsrc_orient orient, int scale,
struct sti_hqvdp_hvsrc *hvsrc)
{ … }
static bool sti_hqvdp_check_hw_scaling(struct sti_hqvdp *hqvdp,
struct drm_display_mode *mode,
int src_w, int src_h,
int dst_w, int dst_h)
{ … }
static void sti_hqvdp_disable(struct sti_hqvdp *hqvdp)
{ … }
static int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data)
{ … }
static void sti_hqvdp_init(struct sti_hqvdp *hqvdp)
{ … }
static void sti_hqvdp_init_plugs(struct sti_hqvdp *hqvdp)
{ … }
static void sti_hqvdp_start_xp70(struct sti_hqvdp *hqvdp)
{ … }
static int sti_hqvdp_atomic_check(struct drm_plane *drm_plane,
struct drm_atomic_state *state)
{ … }
static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane,
struct drm_atomic_state *state)
{ … }
static void sti_hqvdp_atomic_disable(struct drm_plane *drm_plane,
struct drm_atomic_state *state)
{ … }
static const struct drm_plane_helper_funcs sti_hqvdp_helpers_funcs = …;
static int sti_hqvdp_late_register(struct drm_plane *drm_plane)
{ … }
static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = …;
static struct drm_plane *sti_hqvdp_create(struct drm_device *drm_dev,
struct device *dev, int desc)
{ … }
static int sti_hqvdp_bind(struct device *dev, struct device *master, void *data)
{ … }
static void sti_hqvdp_unbind(struct device *dev,
struct device *master, void *data)
{ … }
static const struct component_ops sti_hqvdp_ops = …;
static int sti_hqvdp_probe(struct platform_device *pdev)
{ … }
static void sti_hqvdp_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id hqvdp_of_match[] = …;
MODULE_DEVICE_TABLE(of, hqvdp_of_match);
struct platform_driver sti_hqvdp_driver = …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;