linux/drivers/gpu/drm/i915/soc/intel_dram.c

// SPDX-License-Identifier: MIT
/*
 * Copyright © 2020 Intel Corporation
 */

#include <linux/string_helpers.h>

#include "i915_drv.h"
#include "i915_reg.h"
#include "intel_dram.h"
#include "intel_mchbar_regs.h"
#include "intel_pcode.h"
#include "vlv_sideband.h"

struct dram_dimm_info {};

struct dram_channel_info {};

#define DRAM_TYPE_STR

static const char *intel_dram_type_str(enum intel_dram_type type)
{}

#undef DRAM_TYPE_STR

static bool pnv_is_ddr3(struct drm_i915_private *i915)
{}

static unsigned int pnv_mem_freq(struct drm_i915_private *dev_priv)
{}

static unsigned int ilk_mem_freq(struct drm_i915_private *dev_priv)
{}

static unsigned int chv_mem_freq(struct drm_i915_private *i915)
{}

static unsigned int vlv_mem_freq(struct drm_i915_private *i915)
{}

static void detect_mem_freq(struct drm_i915_private *i915)
{}

unsigned int i9xx_fsb_freq(struct drm_i915_private *i915)
{}

static unsigned int ilk_fsb_freq(struct drm_i915_private *dev_priv)
{}

static void detect_fsb_freq(struct drm_i915_private *i915)
{}

static int intel_dimm_num_devices(const struct dram_dimm_info *dimm)
{}

/* Returns total Gb for the whole DIMM */
static int skl_get_dimm_size(u16 val)
{}

static int skl_get_dimm_width(u16 val)
{}

static int skl_get_dimm_ranks(u16 val)
{}

/* Returns total Gb for the whole DIMM */
static int icl_get_dimm_size(u16 val)
{}

static int icl_get_dimm_width(u16 val)
{}

static int icl_get_dimm_ranks(u16 val)
{}

static bool
skl_is_16gb_dimm(const struct dram_dimm_info *dimm)
{}

static void
skl_dram_get_dimm_info(struct drm_i915_private *i915,
		       struct dram_dimm_info *dimm,
		       int channel, char dimm_name, u16 val)
{}

static int
skl_dram_get_channel_info(struct drm_i915_private *i915,
			  struct dram_channel_info *ch,
			  int channel, u32 val)
{}

static bool
intel_is_dram_symmetric(const struct dram_channel_info *ch0,
			const struct dram_channel_info *ch1)
{}

static int
skl_dram_get_channels_info(struct drm_i915_private *i915)
{}

static enum intel_dram_type
skl_get_dram_type(struct drm_i915_private *i915)
{}

static int
skl_get_dram_info(struct drm_i915_private *i915)
{}

/* Returns Gb per DRAM device */
static int bxt_get_dimm_size(u32 val)
{}

static int bxt_get_dimm_width(u32 val)
{}

static int bxt_get_dimm_ranks(u32 val)
{}

static enum intel_dram_type bxt_get_dimm_type(u32 val)
{}

static void bxt_get_dimm_info(struct dram_dimm_info *dimm, u32 val)
{}

static int bxt_get_dram_info(struct drm_i915_private *i915)
{}

static int icl_pcode_read_mem_global_info(struct drm_i915_private *dev_priv)
{}

static int gen11_get_dram_info(struct drm_i915_private *i915)
{}

static int gen12_get_dram_info(struct drm_i915_private *i915)
{}

static int xelpdp_get_dram_info(struct drm_i915_private *i915)
{}

void intel_dram_detect(struct drm_i915_private *i915)
{}

static u32 gen9_edram_size_mb(struct drm_i915_private *i915, u32 cap)
{}

void intel_dram_edram_detect(struct drm_i915_private *i915)
{}