/* * Copyright (C) 2011 Samsung Electronics Co.Ltd * Authors: * Seung-Woo Kim <sw0312.kim@samsung.com> * Inki Dae <inki.dae@samsung.com> * Joonyoung Shim <jy0922.shim@samsung.com> * * Based on drivers/media/video/s5p-tv/mixer_reg.c * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * */#include<drm/drmP.h>#include"regs-mixer.h"#include"regs-vp.h"#include<linux/kernel.h>#include<linux/spinlock.h>#include<linux/wait.h>#include<linux/i2c.h>#include<linux/platform_device.h>#include<linux/interrupt.h>#include<linux/irq.h>#include<linux/delay.h>#include<linux/pm_runtime.h>#include<linux/clk.h>#include<linux/regulator/consumer.h>#include<linux/of.h>#include<linux/component.h>#include<drm/exynos_drm.h>#include"exynos_drm_drv.h"#include"exynos_drm_crtc.h"#include"exynos_drm_iommu.h"#include"exynos_mixer.h"#define get_mixer_manager(dev) platform_get_drvdata(to_platform_device(dev))#define MIXER_WIN_NR 3#define MIXER_DEFAULT_WIN 0structhdmi_win_data{dma_addr_tdma_addr;dma_addr_tchroma_dma_addr;uint32_tpixel_format;unsignedintbpp;unsignedintcrtc_x;unsignedintcrtc_y;unsignedintcrtc_width;unsignedintcrtc_height;unsignedintfb_x;unsignedintfb_y;unsignedintfb_width;unsignedintfb_height;unsignedintsrc_width;unsignedintsrc_height;unsignedintmode_width;unsignedintmode_height;unsignedintscan_flags;boolenabled;boolresume;};structmixer_resources{intirq;void__iomem*mixer_regs;void__iomem*vp_regs;spinlock_treg_slock;structclk*mixer;structclk*vp;structclk*sclk_mixer;structclk*sclk_hdmi;structclk*sclk_dac;};enummixer_version_id{MXR_VER_0_0_0_16,MXR_VER_16_0_33_0,MXR_VER_128_0_0_184,};structmixer_context{structplatform_device*pdev;structdevice*dev;structdrm_device*drm_dev;intpipe;boolinterlace;boolpowered;boolvp_enabled;u32int_en;struct