| From 20c2d0a631c088478598f0e4c8790f5a129a22cf Mon Sep 17 00:00:00 2001 |
| From: Ben Widawsky <ben@bwidawsk.net> |
| Date: Sat, 25 May 2013 12:26:36 -0700 |
| Subject: drm/i915: use mappable size for fb kickout |
| |
| The GTT start is either 0 in the KMS case, or some value which is set |
| only after the init IOCTL in the UMS case. In both cases, we don't have |
| this information until after we've tried to kick out the firmware fb. |
| |
| This patch should have no functional change since we kzalloc the GTT |
| struct anyway. It only clarifies the situation for people who end up |
| having to look at that code. |
| |
| This weirdness was introduced in: |
| |
| commit 93d187993b783c68383a884091a600d9ad499ea6 |
| Author: Ben Widawsky <ben@bwidawsk.net> |
| Date: Thu Jan 17 12:45:17 2013 -0800 |
| |
| drm/i915: Remove use of gtt_mappable_entries |
| |
| Signed-off-by: Ben Widawsky <ben@bwidawsk.net> |
| Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> |
| (cherry picked from commit f64e29227d80cc15c37c7dbf7030ffc8c415cbd4) |
| Signed-off-by: Darren Hart <dvhart@linux.intel.com> |
| --- |
| drivers/gpu/drm/i915/i915_dma.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/drivers/gpu/drm/i915/i915_dma.c |
| +++ b/drivers/gpu/drm/i915/i915_dma.c |
| @@ -1415,7 +1415,7 @@ static void i915_kick_out_firmware_fb(st |
| return; |
| |
| ap->ranges[0].base = dev_priv->gtt.mappable_base; |
| - ap->ranges[0].size = dev_priv->gtt.mappable_end - dev_priv->gtt.start; |
| + ap->ranges[0].size = dev_priv->gtt.mappable_end; |
| |
| primary = |
| pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; |