mdfld_output.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Copyright (c) 2010 Intel Corporation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicensen
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice (including the next
  12. * paragraph) shall be included in all copies or substantial portions of the
  13. * Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  18. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. * DEALINGS IN THE SOFTWARE.
  22. *
  23. * Authors:
  24. * Thomas Eaton <thomas.g.eaton@intel.com>
  25. * Scott Rowe <scott.m.rowe@intel.com>
  26. */
  27. #ifndef MDFLD_OUTPUT_H
  28. #define MDFLD_OUTPUT_H
  29. #include "psb_drv.h"
  30. #define TPO_PANEL_WIDTH 84
  31. #define TPO_PANEL_HEIGHT 46
  32. #define TMD_PANEL_WIDTH 39
  33. #define TMD_PANEL_HEIGHT 71
  34. struct mdfld_dsi_config;
  35. enum panel_type {
  36. TPO_VID,
  37. TMD_VID,
  38. HDMI,
  39. TC35876X,
  40. };
  41. struct panel_info {
  42. u32 width_mm;
  43. u32 height_mm;
  44. /* Other info */
  45. };
  46. struct panel_funcs {
  47. const struct drm_encoder_funcs *encoder_funcs;
  48. const struct drm_encoder_helper_funcs *encoder_helper_funcs;
  49. struct drm_display_mode * (*get_config_mode)(struct drm_device *);
  50. int (*get_panel_info)(struct drm_device *, int, struct panel_info *);
  51. int (*reset)(int pipe);
  52. void (*drv_ic_init)(struct mdfld_dsi_config *dsi_config, int pipe);
  53. };
  54. int mdfld_output_init(struct drm_device *dev);
  55. struct backlight_device *mdfld_get_backlight_device(void);
  56. int mdfld_set_brightness(struct backlight_device *bd);
  57. int mdfld_get_panel_type(struct drm_device *dev, int pipe);
  58. extern const struct drm_crtc_helper_funcs mdfld_helper_funcs;
  59. extern const struct panel_funcs mdfld_tmd_vid_funcs;
  60. extern const struct panel_funcs mdfld_tpo_vid_funcs;
  61. extern void mdfld_disable_crtc(struct drm_device *dev, int pipe);
  62. extern void mdfldWaitForPipeEnable(struct drm_device *dev, int pipe);
  63. extern void mdfldWaitForPipeDisable(struct drm_device *dev, int pipe);
  64. #endif