mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 21:53:28 +07:00
bbbe775ec5
The Amlogic Meson Display controller is composed of several components : DMC|---------------VPU (Video Processing Unit)----------------|------HHI------| | vd1 _______ _____________ _________________ | | D |-------| |----| | | | | HDMI PLL | D | vd2 | VIU | | Video Post | | Video Encoders |<---|-----VCLK | R |-------| |----| Processing | | | | | | osd2 | | | |---| Enci ----------|----|-----VDAC------| R |-------| CSC |----| Scalers | | Encp ----------|----|----HDMI-TX----| A | osd1 | | | Blenders | | Encl ----------|----|---------------| M |-------|______|----|____________| |________________| | | ___|__________________________________________________________|_______________| VIU: Video Input Unit --------------------- The Video Input Unit is in charge of the pixel scanout from the DDR memory. It fetches the frames addresses, stride and parameters from the "Canvas" memory. This part is also in charge of the CSC (Colorspace Conversion). It can handle 2 OSD Planes and 2 Video Planes. VPP: Video Post Processing -------------------------- The Video Post Processing is in charge of the scaling and blending of the various planes into a single pixel stream. There is a special "pre-blending" used by the video planes with a dedicated scaler and a "post-blending" to merge with the OSD Planes. The OSD planes also have a dedicated scaler for one of the OSD. VENC: Video Encoders -------------------- The VENC is composed of the multiple pixel encoders : - ENCI : Interlace Video encoder for CVBS and Interlace HDMI - ENCP : Progressive Video Encoder for HDMI - ENCL : LCD LVDS Encoder The VENC Unit gets a Pixel Clocks (VCLK) from a dedicated HDMI PLL and clock tree and provides the scanout clock to the VPP and VIU. The ENCI is connected to a single VDAC for Composite Output. The ENCI and ENCP are connected to an on-chip HDMI Transceiver. This driver is a DRM/KMS driver using the following DRM components : - GEM-CMA - PRIME-CMA - Atomic Modesetting - FBDev-CMA For the following SoCs : - GXBB Family (S905) - GXL Family (S905X, S905D) - GXM Family (S912) The current driver only supports the CVBS PAL/NTSC output modes, but the CRTC/Planes management should support bigger modes. But Advanced Colorspace Conversion, Scaling and HDMI Modes will be added in a second time. The Device Tree bindings makes use of the endpoints video interface definitions to connect to the optional CVBS and in the future the HDMI Connector nodes. HDMI Support is planned for a next release. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
73 lines
2.2 KiB
C
73 lines
2.2 KiB
C
/*
|
|
* Copyright (C) 2016 BayLibre, SAS
|
|
* Author: Neil Armstrong <narmstrong@baylibre.com>
|
|
*
|
|
* 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.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
/*
|
|
* Video Encoders
|
|
* - ENCI : Interlace Video Encoder
|
|
* - ENCI_DVI : Interlace Video Encoder for DVI/HDMI
|
|
* - ENCP : Progressive Video Encoder
|
|
*/
|
|
|
|
#ifndef __MESON_VENC_H
|
|
#define __MESON_VENC_H
|
|
|
|
enum {
|
|
MESON_VENC_MODE_NONE = 0,
|
|
MESON_VENC_MODE_CVBS_PAL,
|
|
MESON_VENC_MODE_CVBS_NTSC,
|
|
};
|
|
|
|
struct meson_cvbs_enci_mode {
|
|
unsigned int mode_tag;
|
|
unsigned int hso_begin; /* HSO begin position */
|
|
unsigned int hso_end; /* HSO end position */
|
|
unsigned int vso_even; /* VSO even line */
|
|
unsigned int vso_odd; /* VSO odd line */
|
|
unsigned int macv_max_amp; /* Macrovision max amplitude */
|
|
unsigned int video_prog_mode;
|
|
unsigned int video_mode;
|
|
unsigned int sch_adjust;
|
|
unsigned int yc_delay;
|
|
unsigned int pixel_start;
|
|
unsigned int pixel_end;
|
|
unsigned int top_field_line_start;
|
|
unsigned int top_field_line_end;
|
|
unsigned int bottom_field_line_start;
|
|
unsigned int bottom_field_line_end;
|
|
unsigned int video_saturation;
|
|
unsigned int video_contrast;
|
|
unsigned int video_brightness;
|
|
unsigned int video_hue;
|
|
unsigned int analog_sync_adj;
|
|
};
|
|
|
|
/* CVBS Timings and Parameters */
|
|
extern struct meson_cvbs_enci_mode meson_cvbs_enci_pal;
|
|
extern struct meson_cvbs_enci_mode meson_cvbs_enci_ntsc;
|
|
|
|
void meson_venci_cvbs_mode_set(struct meson_drm *priv,
|
|
struct meson_cvbs_enci_mode *mode);
|
|
unsigned int meson_venci_get_field(struct meson_drm *priv);
|
|
|
|
void meson_venc_enable_vsync(struct meson_drm *priv);
|
|
void meson_venc_disable_vsync(struct meson_drm *priv);
|
|
|
|
void meson_venc_init(struct meson_drm *priv);
|
|
|
|
#endif /* __MESON_VENC_H */
|