Skip to content

Commit

Permalink
drm/i915: call intel_enable_gtt
Browse files Browse the repository at this point in the history
When drm/i915 is in control of the gtt, we need to call
the enable function at all the relevant places ourselves.

Reviewed-by: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Daniel Vetter committed Jun 12, 2012
1 parent 32e3cd6 commit 8ecd1a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/char/agp/intel-gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ static void i830_write_entry(dma_addr_t addr, unsigned int entry,
writel(addr | pte_flags, intel_private.gtt + entry);
}

static bool intel_enable_gtt(void)
bool intel_enable_gtt(void)
{
u8 __iomem *reg;

Expand Down Expand Up @@ -823,6 +823,7 @@ static bool intel_enable_gtt(void)

return true;
}
EXPORT_SYMBOL(intel_enable_gtt);

static int i830_setup(void)
{
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -3689,6 +3689,9 @@ i915_gem_init_hw(struct drm_device *dev)
drm_i915_private_t *dev_priv = dev->dev_private;
int ret;

if (!intel_enable_gtt())
return -EIO;

i915_gem_l3_remap(dev);

i915_gem_init_swizzling(dev);
Expand Down
2 changes: 2 additions & 0 deletions include/drm/intel-gtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev,
struct agp_bridge_data *bridge);
void intel_gmch_remove(void);

bool intel_enable_gtt(void);

void intel_gtt_chipset_flush(void);
void intel_gtt_unmap_memory(struct scatterlist *sg_list, int num_sg);
void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries);
Expand Down

0 comments on commit 8ecd1a6

Please sign in to comment.