linux_dsm_epyc7002/drivers/gpu/drm
Paulo Zanoni 3badb49f08 drm/i915: don't allocate fbcon from stolen memory if it's too big
Technology has evolved and now we have eDP panels with 3200x1800
resolution. In the meantime, the BIOS guys didn't change the default
32mb for stolen memory. On top of that, we can't assume our users will
be able to increase the default stolen memory size to more than 32mb -
I'm not even sure all BIOSes allow that.

So just the fbcon buffer alone eats 22mb of my stolen memroy, and due
to the BDW/SKL restriction of not using the last 8mb of stolen memory,
all that's left for FBC is 2mb! Since fbcon is not the coolest feature
ever, I think it's better to save our precious stolen resource to FBC
and the other guys.

On the other hand, we really want to use as much stolen memory as
possible, since on some older systems the stolen memory may be a
considerable percentage of the total available memory.

This patch tries to achieve a little balance using a simple heuristic:
if the fbcon wants more than half of the available stolen memory,
don't use stolen memory in order to leave some for FBC and the other
features.

The long term plan should be to implement a way to set priorities for
stolen memory allocation and then evict low priority users when the
high priority ones need the memory. While we still don't have that,
let's try to make FBC usable with the simple solution.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-10-09 09:31:58 +02:00
..
amd Merge tag 'topic/drm-misc-2015-09-25' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-09-30 08:35:45 +10:00
armada
ast
atmel-hlcdc drm/atomic: Make prepare_fb/cleanup_fb only take state, v3. 2015-09-08 13:45:54 +02:00
bochs
bridge Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next 2015-08-27 13:01:57 +10:00
cirrus
exynos Linux 4.3-rc2 2015-09-24 17:18:41 +02:00
fsl-dcu Merge tag 'topic/drm-misc-2015-09-25' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-09-30 08:35:45 +10:00
gma500 drm/gma500: Remove DP_LINK_STATUS_SIZE redefinition 2015-09-24 20:14:25 +02:00
i2c Linux 4.3-rc2 2015-09-24 17:18:41 +02:00
i810
i915 drm/i915: don't allocate fbcon from stolen memory if it's too big 2015-10-09 09:31:58 +02:00
imx Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next 2015-08-27 13:01:57 +10:00
mga
mgag200 drm/mgag200: Fix driver_load error handling 2015-09-24 08:10:44 +10:00
msm Linux 4.3-rc2 2015-09-24 17:18:41 +02:00
nouveau drm: Stop using linedur_ns and pixeldur_ns for vblank timestamps 2015-09-24 20:14:21 +02:00
omapdrm drm: Spell vga_switcheroo consistently 2015-09-24 20:14:19 +02:00
panel
qxl drm/qxl: only report first monitor as connected if we have no state 2015-09-24 08:08:17 +10:00
r128
radeon Merge tag 'topic/drm-misc-2015-09-25' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-09-30 08:35:45 +10:00
rcar-du drm/atomic-helper: Add option to update planes only on active crtc 2015-09-08 13:49:08 +02:00
rockchip drm/rockchip: vop: support plane scale 2015-08-26 14:16:26 +08:00
savage
shmobile
sis
sti drm/atomic-helper: Add option to update planes only on active crtc 2015-09-08 13:49:08 +02:00
tdfx
tegra drm/tegra: Handle I2C_WRITE_STATUS_UPDATE for address only writes 2015-09-08 20:15:42 +02:00
tilcdc
ttm drm/ttm: Fix memory space allocation v2 2015-09-15 00:57:01 -07:00
udl
vgem mm: mark most vm_operations_struct const 2015-09-10 13:29:01 -07:00
via
virtio
vmwgfx Merge tag 'vmwgfx-fixes-4.3-150924' of git://people.freedesktop.org/~thomash/linux into drm-fixes 2015-09-24 18:36:04 +10:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c Linux 4.3-rc2 2015-09-24 17:18:41 +02:00
drm_atomic.c drm: drm_atomic_crtc_get_property should be static 2015-09-24 20:14:26 +02:00
drm_auth.c
drm_bridge.c
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc_helper.c
drm_crtc_internal.h
drm_crtc.c drm/core: Preserve the fb id on close. 2015-09-24 20:14:24 +02:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c Linux 4.3-rc2 2015-09-24 17:18:41 +02:00
drm_dp_mst_topology.c Linux 4.2-rc8 2015-08-24 16:36:42 +10:00
drm_drv.c drm: move drm_class into drm_sysfs.c 2015-09-09 15:05:17 +02:00
drm_edid_load.c drm: Constify generic_edid_names[] 2015-09-08 13:45:52 +02:00
drm_edid.c drm: Make drm_av_sync_delay() 'mode' argument const 2015-09-09 14:53:54 +02:00
drm_encoder_slave.c
drm_fb_cma_helper.c
drm_fb_helper.c drm/fbdev: Update legacy plane->fb refcounting for atomic restore 2015-09-24 20:14:20 +02:00
drm_flip_work.c
drm_fops.c
drm_gem_cma_helper.c
drm_gem.c
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h drm: move drm_class into drm_sysfs.c 2015-09-09 15:05:17 +02:00
drm_ioc32.c
drm_ioctl.c drm: Allow also control clients to check the drm version 2015-09-24 00:24:24 -07:00
drm_irq.c drm/irq: Add drm_crtc_vblank_count_and_time() 2015-09-24 20:27:17 +02:00
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dsi.c
drm_mm.c drm/mm: Do DRM_MM_CREATE_TOP adj_start calculation after color_adjust 2015-09-08 13:45:47 +02:00
drm_modes.c
drm_modeset_lock.c drm/atomic: Make sure lock is held in trylock contexts. 2015-09-08 13:45:53 +02:00
drm_of.c
drm_panel.c
drm_pci.c
drm_plane_helper.c drm/atomic: Make prepare_fb/cleanup_fb only take state, v3. 2015-09-08 13:45:54 +02:00
drm_platform.c
drm_prime.c
drm_probe_helper.c
drm_rect.c
drm_scatter.c
drm_sysfs.c drm: move drm_class into drm_sysfs.c 2015-09-09 15:05:17 +02:00
drm_trace_points.c
drm_trace.h
drm_vm.c
drm_vma_manager.c
Kconfig Merge branch 'drm-next-fsl-dcu' of https://github.com/Jianwei-Wang/linux-drm-fsl-dcu into drm-next 2015-08-20 14:11:17 +10:00
Makefile drm/layerscape: Add Freescale DCU DRM driver 2015-08-19 22:23:04 -04:00