Skip to content
Snippets Groups Projects
Select Git revision
  • 765e7fbf081d0e8bd22b35468a1c016358b46179
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

amdgpu_fb.c

Blame
  • atmel_hlcdc_output.c 6.28 KiB
    /*
     * Copyright (C) 2014 Traphandler
     * Copyright (C) 2014 Free Electrons
     * Copyright (C) 2014 Atmel
     *
     * Author: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
     * Author: Boris BREZILLON <boris.brezillon@free-electrons.com>
     *
     * This program is free software; you can redistribute it and/or modify it
     * under the terms of the GNU General Public License version 2 as published by
     * the Free Software Foundation.
     *
     * 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/>.
     */
    
    #include <linux/of_graph.h>
    
    #include <drm/drmP.h>
    #include <drm/drm_of.h>
    
    #include "atmel_hlcdc_dc.h"
    
    /**
     * Atmel HLCDC RGB connector structure
     *
     * This structure stores RGB slave device information.
     *
     * @connector: DRM connector
     * @encoder: DRM encoder
     * @dc: pointer to the atmel_hlcdc_dc structure
     * @panel: panel connected on the RGB output
     */
    struct atmel_hlcdc_rgb_output {
    	struct drm_connector connector;
    	struct drm_encoder encoder;
    	struct atmel_hlcdc_dc *dc;
    	struct drm_panel *panel;
    };
    
    static inline struct atmel_hlcdc_rgb_output *
    drm_connector_to_atmel_hlcdc_rgb_output(struct drm_connector *connector)
    {
    	return container_of(connector, struct atmel_hlcdc_rgb_output,
    			    connector);
    }
    
    static inline struct atmel_hlcdc_rgb_output *
    drm_encoder_to_atmel_hlcdc_rgb_output(struct drm_encoder *encoder)
    {
    	return container_of(encoder, struct atmel_hlcdc_rgb_output, encoder);
    }
    
    static void atmel_hlcdc_rgb_encoder_enable(struct drm_encoder *encoder)
    {
    	struct atmel_hlcdc_rgb_output *rgb =
    			drm_encoder_to_atmel_hlcdc_rgb_output(encoder);
    
    	if (rgb->panel) {
    		drm_panel_prepare(rgb->panel);
    		drm_panel_enable(rgb->panel);
    	}
    }
    
    static void atmel_hlcdc_rgb_encoder_disable(struct drm_encoder *encoder)