Lines Matching refs:dev
30 __FBSDID("$FreeBSD: releng/11.0/sys/dev/drm2/i915/i915_gem_stolen.c 296548 2016-03-08 20:33:02Z dumbbell $");
32 #include <dev/drm2/drmP.h>
33 #include <dev/drm2/i915/i915_drm.h>
34 #include <dev/drm2/i915/i915_drv.h>
48 static unsigned long i915_stolen_to_physical(struct drm_device *dev)
66 if (INTEL_INFO(dev)->gen >= 6) {
71 pci_read_config_dword(dev->dev, 0xB0, &base);
73 } else if (INTEL_INFO(dev)->gen > 3 || IS_G33(dev)) {
75 pci_read_config_dword(dev->dev, 0xA4, &base);
77 } else if (IS_GEN3(dev)) {
92 static void i915_warn_stolen(struct drm_device *dev)
98 static void i915_setup_compression(struct drm_device *dev, int size)
100 struct drm_i915_private *dev_priv = dev->dev_private;
106 intel_disable_fbc(dev);
118 if (!(IS_GM45(dev) || HAS_PCH_SPLIT(dev))) {
135 if (HAS_PCH_SPLIT(dev))
137 else if (IS_GM45(dev)) {
155 i915_warn_stolen(dev);
158 static void i915_cleanup_compression(struct drm_device *dev)
160 struct drm_i915_private *dev_priv = dev->dev_private;
167 void i915_gem_cleanup_stolen(struct drm_device *dev)
169 if (I915_HAS_FBC(dev) && i915_powersave)
170 i915_cleanup_compression(dev);
173 int i915_gem_init_stolen(struct drm_device *dev)
175 struct drm_i915_private *dev_priv = dev->dev_private;
178 dev_priv->mm.stolen_base = i915_stolen_to_physical(dev);
189 if (I915_HAS_FBC(dev) && i915_powersave) {
199 i915_setup_compression(dev, cfb_size);