Skip to content
Snippets Groups Projects
Select Git revision
  • 335e3713afb87b72c3e4740e5775355648806b32
  • master default
  • b4/phy-realtek-clock-fix
  • b4/rk3576-rock4d-phy-timings
  • b4/dw-wdt-fix-initial-timeout
  • radxa-v6.1-vendor-kernel
  • b4/fusb302-race-condition-fix
  • b4/rk3576-rock4d-phy-handling-fixes
  • b4/rk3588-evb1-hdmi-rx
  • b4/rk3576-fix-fspi-pmdomain
  • b4/usbc-for-rock5bp
  • b4/rock5bp-for-upstream
  • rockchip-devel
  • rk3588-test
  • rk3588-test-vendor-cam
  • lf-6.6.y_6.6.23-2.0.0_var01-panfrost
  • rk3588-linked-clk-gate-for-upstream
  • rk3588-gpu-pwr-domain-for-upstream
  • rk3588-rock5b-usbc-for-upstream
  • rk3588-evb1-for-upstream
  • imx95-upstream-with-vendor-display-stack
  • v5.17
  • v5.17-rc8
  • v5.17-rc7
  • v5.17-rc6
  • v5.17-rc5
  • v5.17-rc4
  • v5.17-rc3
  • v5.17-rc2
  • v5.17-rc1
  • v5.16
  • v5.16-rc8
  • v5.16-rc7
  • v5.16-rc6
  • v5.16-rc5
  • v5.16-rc4
  • v5.16-rc3
  • v5.16-rc2
  • v5.16-rc1
  • v5.15
  • v5.15-rc7
41 results

meson_venc.h

Blame
  • meson_venc.h 2.47 KiB
    /*
     * 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,
    	MESON_VENC_MODE_HDMI,
    };
    
    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;
    };
    
    /* HDMI Clock parameters */
    bool meson_venc_hdmi_supported_vic(int vic);
    bool meson_venc_hdmi_venc_repeat(int vic);
    
    /* 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);
    void meson_venc_hdmi_mode_set(struct meson_drm *priv, int vic,
    			      struct drm_display_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 */