linux/drivers/gpu/drm/xilinx/xilinx_drm_plane.h
<<
>>
Prefs
   1/*
   2 * Xilinx DRM plane header for Xilinx
   3 *
   4 *  Copyright (C) 2013 Xilinx, Inc.
   5 *
   6 *  Author: Hyun Woo Kwon <hyunk@xilinx.com>
   7 *
   8 * This software is licensed under the terms of the GNU General Public
   9 * License version 2, as published by the Free Software Foundation, and
  10 * may be copied, distributed, and modified under those terms.
  11 *
  12 * This program is distributed in the hope that it will be useful,
  13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15 * GNU General Public License for more details.
  16 */
  17
  18#ifndef _XILINX_DRM_PLANE_H_
  19#define _XILINX_DRM_PLANE_H_
  20
  21struct drm_crtc;
  22struct drm_plane;
  23
  24/* plane operations */
  25void xilinx_drm_plane_dpms(struct drm_plane *base_plane, int dpms);
  26void xilinx_drm_plane_commit(struct drm_plane *base_plane);
  27int xilinx_drm_plane_mode_set(struct drm_plane *base_plane,
  28                              struct drm_framebuffer *fb,
  29                              int crtc_x, int crtc_y,
  30                              unsigned int crtc_w, unsigned int crtc_h,
  31                              u32 src_x, u32 src_y,
  32                              u32 src_w, u32 src_h);
  33int xilinx_drm_plane_get_max_width(struct drm_plane *base_plane);
  34u32 xilinx_drm_plane_get_format(struct drm_plane *base_plane);
  35unsigned int xilinx_drm_plane_get_align(struct drm_plane *base_plane);
  36
  37/* plane manager operations */
  38struct xilinx_drm_plane_manager;
  39
  40void
  41xilinx_drm_plane_manager_mode_set(struct xilinx_drm_plane_manager *manager,
  42                                  unsigned int crtc_w, unsigned int crtc_h);
  43void xilinx_drm_plane_manager_dpms(struct xilinx_drm_plane_manager *manager,
  44                                   int dpms);
  45struct drm_plane *
  46xilinx_drm_plane_create_primary(struct xilinx_drm_plane_manager *manager,
  47                                unsigned int possible_crtcs);
  48int xilinx_drm_plane_create_planes(struct xilinx_drm_plane_manager *manager,
  49                                   unsigned int possible_crtcs);
  50
  51bool xilinx_drm_plane_check_format(struct xilinx_drm_plane_manager *manager,
  52                                   u32 format);
  53int xilinx_drm_plane_get_num_planes(struct xilinx_drm_plane_manager *manager);
  54
  55void xilinx_drm_plane_restore(struct xilinx_drm_plane_manager *manager);
  56
  57struct xilinx_drm_plane_manager *
  58xilinx_drm_plane_probe_manager(struct drm_device *drm);
  59void xilinx_drm_plane_remove_manager(struct xilinx_drm_plane_manager *manager);
  60
  61#endif /* _XILINX_DRM_PLANE_H_ */
  62