linux_dsm_epyc7002/drivers/gpu/drm/i915
Ben Widawsky 7ad47cf252 drm/i915/bdw: Reorganize PT allocations
The previous allocation mechanism would get 2 contiguous allocations,
one for the page directories, and one for the page tables. As each page
table is 1 page, and there are 512 of these per page directory, this
goes to 2MB. An unfriendly request at best. Worse still, our HW now
supports 4 page directories, and a 2MB allocation is not allowed.

In order to fix this, this patch attempts to split up each page table
allocation into a single, discrete allocation. There is nothing really
fancy about the patch itself, it just has to manage an extra pointer
indirection, and have a fancier bit of logic to free up the pages.

To accommodate some of the added complexity, two new helpers are
introduced to allocate, and free the page table pages.

NOTE: I really wanted to split the way we do allocations, and the way in
which we identify the page table/page directory being used. I found
splitting this functionality up to be too unwieldy. I apologize in
advance to the reviewer. I'd recommend looking at the result, rather
than the diff.

v2/NOTE2: This patch predated commit:
6f1cc99351
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Dec 31 15:50:31 2013 +0000

    drm/i915: Avoid dereference past end of page arr

It fixed the same issue as that patch, but because of the limbo state of
PPGTT, Chris patch was merged instead. The excess churn is a result of
my using my original patch, which has my preferred naming. Primarily
act_* is changed to which_*, but it's mostly the same otherwise. I've
kept the convention Chris used for the pte wrap (I had something
slightly different, and broken - but fixable)

v3: Rename which_p[..]e to drop which_ (Chris)
Remove BUG_ON in inner loop (Chris)
Redo the pde/pdpe wrap logic (Chris)

v4: s/1MB/2MB in commit message (Imre)
Plug leaking gen8_pt_pages in both the error path, as well as general
free case (Imre)

v5: Rename leftover "which_" variables (Imre)
Add the pde = 0 wrap that was missed from v3 (Imre)

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
[danvet: Squash in fixup from Ben.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-05 21:29:41 +01:00
..
dvo_ch7xxx.c
dvo_ch7017.c
dvo_ivch.c
dvo_ns2501.c drm/i915/ns2501: Rip out the reenable hack 2013-11-04 16:32:31 +01:00
dvo_sil164.c
dvo_tfp410.c
dvo.h
i915_debugfs.c drm/i915: get/put runtime PM without holding rps.hw_lock 2014-03-04 15:13:04 +01:00
i915_dma.c drm/i915: delay master/sarea deref for legacy ioctls 2014-02-12 23:50:06 +01:00
i915_drv.c drm/i915: Restore rps/rc6 on reset 2014-02-07 10:25:10 +01:00
i915_drv.h drm/i915/bdw: Reorganize PT allocations 2014-03-05 21:29:41 +01:00
i915_gem_context.c drm/i915/bdw: Free PPGTT struct 2014-03-04 15:53:58 +01:00
i915_gem_debug.c
i915_gem_dmabuf.c drm/i915: Pin pages whilst allocating for dma-buf vmap() 2013-11-29 15:51:20 +01:00
i915_gem_evict.c drm/i915: Consolidate binding parameters into flags 2014-02-14 14:16:58 +01:00
i915_gem_execbuffer.c drm/i915: Only bind each object rather than for every execbuffer 2014-02-14 14:18:38 +01:00
i915_gem_gtt.c drm/i915/bdw: Reorganize PT allocations 2014-03-05 21:29:41 +01:00
i915_gem_stolen.c drm/i915: Fix the offset issue for the stolen GEM objects 2014-01-28 09:04:42 +01:00
i915_gem_tiling.c drm/i915: Make pin count per VMA 2013-12-18 15:27:49 +01:00
i915_gem.c drm/i915: Only bind each object rather than for every execbuffer 2014-02-14 14:18:38 +01:00
i915_gpu_error.c drm/i915: Generate a hang error code 2014-02-05 17:17:10 +01:00
i915_ioc32.c
i915_irq.c drm/i915: sprinkle static 2014-03-02 21:19:51 +01:00
i915_params.c drm/i915: Provide a command line option to disable display 2014-02-12 18:53:01 +01:00
i915_reg.h drm/i915: Change IVB WIZ hashing mode to 16x4 2014-03-04 15:39:05 +01:00
i915_suspend.c drm/i915: Kill most of the FBC register save/restore 2014-01-25 21:17:03 +01:00
i915_sysfs.c drm/i915: Update rps interrupt limits 2014-02-07 10:26:17 +01:00
i915_trace_points.c
i915_trace.h drm/i915: Consolidate binding parameters into flags 2014-02-14 14:16:58 +01:00
i915_ums.c drm/i915: Only restore backlight combination mode reg for ums 2014-01-24 17:22:45 +01:00
intel_acpi.c ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro 2013-11-14 23:17:21 +01:00
intel_bios.c drm/i915: move module parameters into a struct, in a new file 2014-01-27 17:16:45 +01:00
intel_bios.h drm/i915: parse backlight modulation frequency from the BIOS VBT 2013-12-16 10:02:48 +01:00
intel_crt.c drm/i915: add unregister callback to connector 2014-02-14 11:24:47 +01:00
intel_ddi.c drm/i915: Consolidate FUSE_STRAP in one set of defines 2014-02-12 18:52:52 +01:00
intel_display.c drm/i915: rename modeset_update_power_wells 2014-03-04 15:11:28 +01:00
intel_dp.c drm/i915: dp: fix order of dp aux i2c device cleanup 2014-02-14 11:24:59 +01:00
intel_drv.h drm/i915: add unregister callback to connector 2014-02-14 11:24:47 +01:00
intel_dsi_cmd.c
intel_dsi_cmd.h
intel_dsi_pll.c drm/i915: Try harder to get best m, n, p values with minimal error 2013-12-11 23:52:18 +01:00
intel_dsi.c drm/i915: add unregister callback to connector 2014-02-14 11:24:47 +01:00
intel_dsi.h drm/i915: Parametrize the dphy and other spec specific parameters 2013-12-11 23:52:20 +01:00
intel_dvo.c drm/i915: add unregister callback to connector 2014-02-14 11:24:47 +01:00
intel_fbdev.c drm/i915: don't preserve inherited configs with nothing on v2 2014-02-13 11:52:44 +01:00
intel_hdmi.c drm/i915: add unregister callback to connector 2014-02-14 11:24:47 +01:00
intel_i2c.c drm/i915/vlv: split CCK and DDR freq usage 2013-11-05 19:28:47 +01:00
intel_lvds.c drm/i915: add unregister callback to connector 2014-02-14 11:24:47 +01:00
intel_modes.c
intel_opregion.c drm/i915: Eliminate lots of WARNs when there's no backlight present 2014-01-22 10:34:38 +01:00
intel_overlay.c drm/i915: tune down user-triggerable dmesg noise in the cursor/overlay code 2014-02-14 19:02:32 +01:00
intel_panel.c drm/i915: Initialize downclock mode in panel init 2014-02-12 18:53:05 +01:00
intel_pm.c drm/i915: Add a comment about WIZ hashing vs. thread counts 2014-03-04 15:39:35 +01:00
intel_ringbuffer.c drm/i915: Handle set_cache_level errors in the status page setup 2014-02-14 14:18:00 +01:00
intel_ringbuffer.h drm/i915: Use hangcheck score to find guilty context 2014-02-04 11:57:24 +01:00
intel_sdvo_regs.h drm/i915: use __packed instead of __attribute__((packed)) 2013-12-03 18:19:49 +01:00
intel_sdvo.c drm/i915: sdvo: add i2c sysfs symlink to the connector's directory 2014-02-14 11:25:14 +01:00
intel_sideband.c drm/i915: Use FLISDSI interface for band gap reset 2013-12-11 23:52:17 +01:00
intel_sprite.c drm/i915: Shuffle sprite register writes into a tighter group 2014-01-24 17:22:53 +01:00
intel_tv.c drm/i915: add unregister callback to connector 2014-02-14 11:24:47 +01:00
intel_uncore.c Merge branch 'topic/ppgtt' into drm-intel-next-queued 2014-01-25 21:14:57 +01:00
Kconfig i915, fbdev: Fix Kconfig typo 2013-11-21 21:59:02 +01:00
Makefile drm/i915: move module parameters into a struct, in a new file 2014-01-27 17:16:45 +01:00