xref: /linux/drivers/gpu/drm/i915/soc/intel_dram.h (revision 260f6f4fda93c8485c8037865c941b42b9cba5d2)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2020 Intel Corporation
4  */
5 
6 #ifndef __INTEL_DRAM_H__
7 #define __INTEL_DRAM_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_i915_private;
12 struct drm_device;
13 
14 struct dram_info {
15 	bool wm_lv_0_adjust_needed;
16 	u8 num_channels;
17 	bool symmetric_memory;
18 	enum intel_dram_type {
19 		INTEL_DRAM_UNKNOWN,
20 		INTEL_DRAM_DDR3,
21 		INTEL_DRAM_DDR4,
22 		INTEL_DRAM_LPDDR3,
23 		INTEL_DRAM_LPDDR4,
24 		INTEL_DRAM_DDR5,
25 		INTEL_DRAM_LPDDR5,
26 		INTEL_DRAM_GDDR,
27 		INTEL_DRAM_GDDR_ECC,
28 		__INTEL_DRAM_TYPE_MAX,
29 	} type;
30 	u8 num_qgv_points;
31 	u8 num_psf_gv_points;
32 };
33 
34 void intel_dram_edram_detect(struct drm_i915_private *i915);
35 int intel_dram_detect(struct drm_i915_private *i915);
36 unsigned int i9xx_fsb_freq(struct drm_i915_private *i915);
37 const struct dram_info *intel_dram_info(struct drm_device *drm);
38 
39 #endif /* __INTEL_DRAM_H__ */
40