18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright (c) 2010 Intel Corporation 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 58c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 68c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation 78c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicensen 88c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 98c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice (including the next 128c2ecf20Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the 138c2ecf20Sopenharmony_ci * Software. 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 168c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 178c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 188c2ecf20Sopenharmony_ci * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 198c2ecf20Sopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 208c2ecf20Sopenharmony_ci * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 218c2ecf20Sopenharmony_ci * DEALINGS IN THE SOFTWARE. 228c2ecf20Sopenharmony_ci * 238c2ecf20Sopenharmony_ci * Authors: 248c2ecf20Sopenharmony_ci * Thomas Eaton <thomas.g.eaton@intel.com> 258c2ecf20Sopenharmony_ci * Scott Rowe <scott.m.rowe@intel.com> 268c2ecf20Sopenharmony_ci*/ 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#ifndef MDFLD_OUTPUT_H 298c2ecf20Sopenharmony_ci#define MDFLD_OUTPUT_H 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#include "psb_drv.h" 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#define TPO_PANEL_WIDTH 84 348c2ecf20Sopenharmony_ci#define TPO_PANEL_HEIGHT 46 358c2ecf20Sopenharmony_ci#define TMD_PANEL_WIDTH 39 368c2ecf20Sopenharmony_ci#define TMD_PANEL_HEIGHT 71 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_cistruct mdfld_dsi_config; 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_cienum panel_type { 418c2ecf20Sopenharmony_ci TPO_VID, 428c2ecf20Sopenharmony_ci TMD_VID, 438c2ecf20Sopenharmony_ci HDMI, 448c2ecf20Sopenharmony_ci TC35876X, 458c2ecf20Sopenharmony_ci}; 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_cistruct panel_info { 488c2ecf20Sopenharmony_ci u32 width_mm; 498c2ecf20Sopenharmony_ci u32 height_mm; 508c2ecf20Sopenharmony_ci /* Other info */ 518c2ecf20Sopenharmony_ci}; 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_cistruct panel_funcs { 548c2ecf20Sopenharmony_ci const struct drm_encoder_helper_funcs *encoder_helper_funcs; 558c2ecf20Sopenharmony_ci struct drm_display_mode * (*get_config_mode)(struct drm_device *); 568c2ecf20Sopenharmony_ci int (*get_panel_info)(struct drm_device *, int, struct panel_info *); 578c2ecf20Sopenharmony_ci int (*reset)(struct drm_device *, int); 588c2ecf20Sopenharmony_ci void (*drv_ic_init)(struct mdfld_dsi_config *dsi_config, int pipe); 598c2ecf20Sopenharmony_ci}; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ciint mdfld_output_init(struct drm_device *dev); 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_cistruct backlight_device *mdfld_get_backlight_device(void); 648c2ecf20Sopenharmony_ciint mdfld_set_brightness(struct backlight_device *bd); 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ciint mdfld_get_panel_type(struct drm_device *dev, int pipe); 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ciextern const struct drm_crtc_helper_funcs mdfld_helper_funcs; 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ciextern const struct panel_funcs mdfld_tmd_vid_funcs; 718c2ecf20Sopenharmony_ciextern const struct panel_funcs mdfld_tpo_vid_funcs; 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ciextern void mdfld_disable_crtc(struct drm_device *dev, int pipe); 748c2ecf20Sopenharmony_ciextern void mdfldWaitForPipeEnable(struct drm_device *dev, int pipe); 758c2ecf20Sopenharmony_ciextern void mdfldWaitForPipeDisable(struct drm_device *dev, int pipe); 768c2ecf20Sopenharmony_ci#endif 77