sde_vdc_helper.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef __SDE_VDC_HELPER_H__
  6. #define __SDE_VDC_HELPER_H__
  7. #include "msm_drv.h"
  8. #define VDC_BPP(bits_per_pixel) (bits_per_pixel >> 4)
  9. #define VDC_NUM_BUF_RANGES (DSC_NUM_BUF_RANGES - 1)
  10. #define VDC_FLAT_QP_LUT_SIZE 8
  11. #define VDC_MAX_QP_LUT_SIZE 8
  12. #define VDC_TAR_DEL_LUT_SIZE 16
  13. #define VDC_LBDA_BRATE_LUT_SIZE 16
  14. #define VDC_LBDA_BF_LUT_SIZE 16
  15. #define VDC_LBDA_BRATE_REG_SIZE 64
  16. #define VDC_VIDEO_MODE 0
  17. #define VDC_CMD_MODE 1
  18. #define VDC_TRAFFIC_SYNC_PULSES 0
  19. #define VDC_TRAFFIC_SYNC_START_EVENTS 1
  20. #define VDC_TRAFFIC_BURST_MODE 2
  21. #define MAX_PIPELINE_LATENCY 68
  22. #define OB_DATA_WIDTH 128
  23. #define OUT_BUF_FULL_THRESH 2
  24. #define OUT_BUF_UF_MARGIN 3
  25. #define OUT_BUF_OF_MARGIN_TC_10 5
  26. #define OUT_BUF_OF_MARGIN_OB 3
  27. #define OUTPUT_DATA_WIDTH 64
  28. #define OB0_RAM_DEPTH 912
  29. #define OB1_RAM_DEPTH 736
  30. #define SSM_MAX_SE_SIZE 128
  31. #define RC_TARGET_RATE_EXTRA_FTBLS 2
  32. #define NUM_ACTIVE_HS 1
  33. #define MAX_PIXELS_PER_HS_LINE 5120
  34. #define SDE_VDC_PPS_SIZE 128
  35. /**
  36. * sde_vdc_populate_config - populates the VDC encoder parameters
  37. * for a given panel configuration
  38. */
  39. int sde_vdc_populate_config(struct msm_display_vdc_info *vdc_info,
  40. int intf_width, int traffic_mode);
  41. /**
  42. * sde_vdc_create_pps_buf_cmd- creates the PPS buffer from the VDC
  43. * parameters according to the VDC specification
  44. */
  45. int sde_vdc_create_pps_buf_cmd(struct msm_display_vdc_info *vdc_info,
  46. char *buf, int pps_id, u32 size);
  47. void sde_vdc_intf_prog_params(struct msm_display_vdc_info *vdc_info,
  48. int intf_width);
  49. #endif /* __SDE_VDC_HELPER_H__ */