linux-stable/drivers/gpu/drm/gma500
Paul Kocialkowski 5d358e7e2b drm/gma500: Fixup fbdev stolen size usage evaluation
[ Upstream commit fd1a5e521c ]

psbfb_probe performs an evaluation of the required size from the stolen
GTT memory, but gets it wrong in two distinct ways:
- The resulting size must be page-size-aligned;
- The size to allocate is derived from the surface dimensions, not the fb
  dimensions.

When two connectors are connected with different modes, the smallest will
be stored in the fb dimensions, but the size that needs to be allocated must
match the largest (surface) dimensions. This is what is used in the actual
allocation code.

Fix this by correcting the evaluation to conform to the two points above.
It allows correctly switching to 16bpp when one connector is e.g. 1920x1080
and the other is 1024x768.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191107153048.843881-1-paul.kocialkowski@bootlin.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-24 08:34:35 +01:00
..
accel_2d.c drm/gma500: Move GEM BO to drm_framebuffer 2018-05-18 14:52:48 +01:00
backlight.c
blitter.c
blitter.h
cdv_device.c drm: Don't pass the index to drm_property_add_enum() 2018-04-27 16:46:50 +03:00
cdv_device.h
cdv_intel_crt.c drm/gma500: fix mode_valid's return type 2018-04-25 09:38:28 +02:00
cdv_intel_display.c
cdv_intel_dp.c drm: drop _mode_ from update_edit_property() 2018-07-13 18:40:27 +02:00
cdv_intel_hdmi.c drm: drop _mode_ from update_edit_property() 2018-07-13 18:40:27 +02:00
cdv_intel_lvds.c drm/gma500/cdv: Check vbt config bits when detecting lvds panels 2019-06-11 12:20:54 +02:00
framebuffer.c drm/gma500: Fixup fbdev stolen size usage evaluation 2020-02-24 08:34:35 +01:00
framebuffer.h drm/gma500: Move GEM BO to drm_framebuffer 2018-05-18 14:52:48 +01:00
gem.c drivers/gpu/drm/gma500/: change return type to vm_fault_t 2018-08-23 18:48:43 -07:00
gem.h
gma_device.c drm/gma500: Deprecate pci_get_bus_and_slot() 2018-01-11 17:27:40 -06:00
gma_device.h
gma_display.c drm: drop _mode_ from drm_mode_connector_attach_encoder 2018-07-13 18:40:27 +02:00
gma_display.h
gtt.c
gtt.h drm/gma500: Move GEM BO to drm_framebuffer 2018-05-18 14:52:48 +01:00
intel_bios.c drm/gma500/cdv: Check vbt config bits when detecting lvds panels 2019-06-11 12:20:54 +02:00
intel_bios.h drm: gma500: Changed __attribute__((packed)) to __packed 2018-07-12 08:48:25 +02:00
intel_gmbus.c
intel_i2c.c
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mdfld_device.c
mdfld_dsi_dpi.c drm: drop _mode_ from drm_mode_connector_attach_encoder 2018-07-13 18:40:27 +02:00
mdfld_dsi_dpi.h
mdfld_dsi_output.c drm/gma500: fix mode_valid's return type 2018-04-25 09:38:28 +02:00
mdfld_dsi_output.h
mdfld_dsi_pkg_sender.c
mdfld_dsi_pkg_sender.h
mdfld_intel_display.c drm/gma500: Fix compile warning 2018-06-26 16:23:46 +03:00
mdfld_output.c
mdfld_output.h
mdfld_tmd_vid.c
mdfld_tpo_vid.c
mid_bios.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
mid_bios.h
mmu.c gma500: mmu: unmap the correct address 2017-10-30 11:21:55 +01:00
mmu.h
oaktrail.h
oaktrail_crtc.c drm/gma500: fix memory disclosures due to uninitialized bytes 2019-12-31 16:35:22 +01:00
oaktrail_device.c
oaktrail_hdmi.c drm: drop _mode_ from update_edit_property() 2018-07-13 18:40:27 +02:00
oaktrail_hdmi_i2c.c
oaktrail_lvds.c drm: drop _mode_ from update_edit_property() 2018-07-13 18:40:27 +02:00
oaktrail_lvds_i2c.c
opregion.c
opregion.h
power.c
power.h
psb_device.c
psb_device.h
psb_drv.c pci-v4.16-changes 2018-02-06 09:59:40 -08:00
psb_drv.h drm/gma500/cdv: Check vbt config bits when detecting lvds panels 2019-06-11 12:20:54 +02:00
psb_intel_display.c
psb_intel_drv.h drm/gma500: fix psb_intel_lvds_mode_valid()'s return type 2018-04-25 09:38:37 +02:00
psb_intel_lvds.c drm/gma500: fix psb_intel_lvds_mode_valid()'s return type 2018-04-25 09:38:37 +02:00
psb_intel_modes.c drm: drop _mode_ from update_edit_property() 2018-07-13 18:40:27 +02:00
psb_intel_reg.h
psb_intel_sdvo.c drm: drop _mode_ from update_edit_property() 2018-07-13 18:40:27 +02:00
psb_intel_sdvo_regs.h
psb_irq.c
psb_irq.h
psb_lid.c drm: gma500: Convert timers to use timer_setup() 2017-11-01 11:44:52 -07:00
psb_reg.h
tc35876x-dsi-lvds.c
tc35876x-dsi-lvds.h