]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: correct the calculation of first_pd_entry_in_global_pt
authorZhang, Xiong Y <xiong.y.zhang@intel.com>
Sat, 27 Apr 2013 09:53:33 +0000 (09:53 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 27 Apr 2013 12:07:16 +0000 (14:07 +0200)
commit5bbef734535be4d279f0ad52f4865232e42c0b35
treef8f57d0ca7f3c61025b359fb297226ee03fab536
parent22a804d3f1509142725e4023ad42d38a371350fa
drm/i915: correct the calculation of first_pd_entry_in_global_pt

When ppgtt is enabled, dev_priv->gtt.total has excluded the gtt space
occupied by ppgtt table in i915_gem_init_global_gtt() function. So the
calculation of first_pd_entry_in_global_pt doesn't need to subtract
I915_PPGTT_PD_ENTRIES again. Or else PPGTT directory table will be
destroyed by global gtt allocation.

This regression has been introduced in

commit a5a00a371ee2b84644bb86cf28727722140d92b6
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Thu Jan 24 14:45:00 2013 -0800

    drm/i915: remove intel_gtt structure

The breakage is pretty subtile since the old gtt_total_entries
included the pde range, whereas the new on did not.

Cc: stable@vger.kernel.org
Signed-off-by: Xiong Zhang<xiong.y.zhang@intel.com>
[danvet: Add regression citation and cc: stable. Thanks to Chris for
correcting my wrong guess about which commit broke things.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_gtt.c