vs_type.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2020 VeriSilicon Holdings Co., Ltd.
  4. */
  5. #ifndef __VS_TYPE_H__
  6. #define __VS_TYPE_H__
  7. #include <linux/version.h>
  8. #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)
  9. #include <drm/drmP.h>
  10. #endif
  11. #include <drm/drm_plane.h>
  12. #include <drm/drm_plane_helper.h>
  13. struct vs_plane_info {
  14. const char *name;
  15. u8 id;
  16. enum drm_plane_type type;
  17. unsigned int num_formats;
  18. const u32 *formats;
  19. u8 num_modifiers;
  20. const u64 *modifiers;
  21. unsigned int min_width;
  22. unsigned int min_height;
  23. unsigned int max_width;
  24. unsigned int max_height;
  25. unsigned int rotation;
  26. unsigned int blend_mode;
  27. unsigned int color_encoding;
  28. /* 0 means no de-gamma LUT */
  29. unsigned int degamma_size;
  30. int min_scale; /* 16.16 fixed point */
  31. int max_scale; /* 16.16 fixed point */
  32. u8 zpos; /* default zorder value,
  33. * and 255 means unsupported zorder capability */
  34. bool watermark;
  35. bool color_mgmt;
  36. bool roi;
  37. };
  38. struct vs_dc_info {
  39. const char *name;
  40. u8 panel_num;
  41. /* planes */
  42. u8 plane_num;
  43. const struct vs_plane_info *planes;
  44. u8 layer_num;
  45. unsigned int max_bpc;
  46. unsigned int color_formats;
  47. /* 0 means no gamma LUT */
  48. u16 gamma_size;
  49. u8 gamma_bits;
  50. u16 pitch_alignment;
  51. bool pipe_sync;
  52. bool mmu_prefetch;
  53. bool background;
  54. bool panel_sync;
  55. bool cap_dec;
  56. };
  57. #endif /* __VS_TYPE_H__ */