linux/drivers/gpu/drm
Mario Limonciello c886061bbd drm/amd/display: Validate backlight caps are sane
commit 327e62f47e upstream.

Currently amdgpu takes backlight caps provided by the ACPI tables
on systems as is.  If the firmware sets maximums that are too low
this means that users don't get a good experience.

To avoid having to maintain a quirk list of such systems, do a sanity
check on the values.  Check that the spread is at least half of the
values that amdgpu would use if no ACPI table was found and if not
use the amdgpu defaults.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3020
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-10-04 16:29:47 +02:00
..
amd drm/amd/display: Validate backlight caps are sane 2024-10-04 16:29:47 +02:00
arm drm: komeda: Fix an issue related to normalized zpos 2024-09-30 16:25:11 +02:00
armada fbdev: Use _IOMEM_ infix for I/O-memory helpers 2023-07-31 20:06:52 +02:00
aspeed drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-11-20 11:59:10 +01:00
ast drm/ast: Fix soft lockup 2024-04-17 11:19:34 +02:00
atmel-hlcdc drm: atmel-hlcdc: Support inverting the pixel clock polarity 2023-08-10 08:44:34 +02:00
bridge drm/bridge: lontium-lt8912b: Validate mode in drm_bridge_funcs::mode_valid() 2024-10-04 16:29:10 +02:00
ci drm/ci: update device type for volteer devices 2024-06-12 11:11:56 +02:00
display drm/dp_mst: Skip CSN if topology probing is not done yet 2024-08-14 13:59:00 +02:00
etnaviv drm/etnaviv: don't block scheduler when GPU is still active 2024-08-03 08:54:32 +02:00
exynos drivers:drm:exynos_drm_gsc:Fix wrong assignment in gsc_bind() 2024-10-04 16:29:12 +02:00
fsl-dcu drm/fsl-dcu: Convert to platform remove callback returning void 2023-06-08 09:04:10 -07:00
gma500 drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes 2024-08-03 08:54:15 +02:00
gud drm/gud: use vmalloc_array and vcalloc 2023-07-04 12:05:08 +02:00
hisilicon drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
hyperv drm/hyperv: Fix a compilation issue because of not including screen_info.h 2023-07-09 17:00:09 +02:00
i2c drm-misc-next for v6.6: 2023-07-17 15:37:57 +02:00
i915 drm/i915/guc: prevent a possible int overflow in wq offsets 2024-09-18 19:24:10 +02:00
imx drm/imx/ipuv3: do not return negative values from .get_modes() 2024-04-03 15:28:33 +02:00
ingenic drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
kmb drm/kmb: Use GEM DMA fbdev emulation 2023-03-14 17:07:48 +01:00
lib drm/selftests: add drm buddy alloc range testcase 2022-02-23 10:44:43 +01:00
lima drm/lima: set gp bus_stop bit before hard reset 2024-08-29 17:33:34 +02:00
logicvc drm/logicvc: Kconfig: select REGMAP and REGMAP_MMIO 2023-10-25 12:05:25 +02:00
loongson drm/loongson: Fix error handling in lsdc_pixel_pll_setup() 2023-11-20 11:59:08 +01:00
mcde drm/mcde: remove redundant of_match_ptr 2023-08-07 22:58:52 +02:00
mediatek drm/mediatek: Use spin_lock_irqsave() for CRTC event lock 2024-10-04 16:29:10 +02:00
meson drm/meson: plane: Add error handling 2024-09-08 07:54:46 +02:00
mgag200 drm/mgag200: Bind I2C lifetime to DRM device 2024-08-14 13:59:01 +02:00
msm drm/msm: fix %s null argument error 2024-10-04 16:29:12 +02:00
mxsfb drm/lcdif: Do not disable clocks on already suspended hardware 2024-06-12 11:11:57 +02:00
nouveau drm/nouveau/fb: restore init() for ramgp102 2024-09-18 19:24:10 +02:00
omapdrm drm/omapdrm: Fix console with deferred ops 2024-06-12 11:11:56 +02:00
panel drm/panel: nt36523: Set 120Hz fps for xiaomi,elish panels 2024-08-29 17:33:57 +02:00
panfrost drm/panfrost: Mark simple_ondemand governor as softdep 2024-08-03 08:54:32 +02:00
pl111 drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-11-20 11:59:10 +01:00
qxl drm/qxl: Add check for drm_cvt_mode 2024-08-03 08:53:52 +02:00
radeon drm/radeon/evergreen_cs: fix int overflow errors in cs track offsets 2024-10-04 16:29:09 +02:00
renesas drm:rcar-du: Enable ABGR and XBGR formats 2023-08-14 13:47:30 +03:00
rockchip drm/rockchip: dw_hdmi: Fix reading EDID when using a forced mode 2024-10-04 16:29:09 +02:00
scheduler dma-buf: add dma_fence_timestamp helper 2023-10-05 11:05:58 +02:00
solomon pwm: Rename pwm_apply_state() to pwm_apply_might_sleep() 2024-06-12 11:12:24 +02:00
sprd drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
sti drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
stm drm/stm: ltdc: check memory returned by devm_kzalloc() 2024-10-04 16:29:08 +02:00
sun4i drm/sun4i: hdmi: Move mode_set into enable 2024-06-16 13:47:32 +02:00
tegra drm/tegra: Zero-initialize iosys_map 2024-08-29 17:33:27 +02:00
tests drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:35:31 -08:00
tidss drm/tidss: Fix sync-lost issue with two displays 2024-03-26 18:19:52 -04:00
tilcdc drm/tilcdc: Fix irq free on unload 2024-01-25 15:35:31 -08:00
tiny drm/tiny: correctly print struct resource * on error 2023-10-12 10:57:07 +02:00
ttm drm/ttm: Print the memory decryption status just once 2024-05-17 12:02:34 +02:00
tve200 drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-11-20 11:59:10 +01:00
udl drm/udl: Remove DRM_CONNECTOR_POLL_HPD 2024-08-03 08:54:28 +02:00
v3d drm/v3d: Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout() 2023-07-27 13:01:27 -03:00
vboxvideo drm: Disable the cursor plane on atomic contexts with virtualized drivers 2024-01-31 16:19:08 -08:00
vc4 drm/vc4: hdmi: Handle error case of pm_runtime_resume_and_get 2024-10-04 16:29:10 +02:00
vgem drm/vgem: Drop struct drm_vgem_gem_object 2023-03-20 08:14:27 -03:00
virtio drm/virtio: Fix type of dma-fence context variable 2024-08-11 12:47:26 +02:00
vkms drm/vkms: Avoid reading beyond LUT array 2024-03-26 18:19:42 -04:00
vmwgfx drm/vmwgfx: Prevent unmapping active read buffers 2024-10-04 16:29:43 +02:00
xen drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
xlnx drm: zynqmp_kms: Fix AUX bus not getting unregistered 2024-08-03 08:53:49 +02:00
drm_agpsupport.c drm: Include <asm/agp.h> iff CONFIG_AGP is set 2021-05-11 14:13:33 +02:00
drm_aperture.c video/aperture: Drop primary argument 2023-04-16 14:17:55 +02:00
drm_atomic.c drm/atomic: Fix potential use-after-free in nonblocking commits 2023-07-21 09:53:30 -07:00
drm_atomic_helper.c drm/atomic-helpers: Invoke end_fb_access while owning plane state 2023-12-13 18:45:25 +01:00
drm_atomic_state_helper.c drm/atomic-helper: fix kernel-doc problems 2023-01-19 09:16:04 +01:00
drm_atomic_uapi.c drm/atomic: log errors in drm_mode_atomic_ioctl() 2023-06-23 16:34:25 +02:00
drm_auth.c drm: Fix FD ownership check in drm_master_check_perm() 2024-01-01 12:42:25 +00:00
drm_blend.c drm/drm_blend: Remove usage of deprecated DRM_DEBUG_ATOMIC 2023-01-10 16:14:13 +01:00
drm_bridge.c drm/bridge: Fix improper bridge init order with pre_enable_prev_first 2024-06-12 11:11:55 +02:00
drm_bridge_connector.c drm/bridge_connector: Handle drm_connector_init_with_ddc() failures 2023-07-29 20:56:42 +02:00
drm_buddy.c drm/buddy: fix range bias 2024-03-06 14:48:40 +00:00
drm_bufs.c drm/nouveau: Remove support for legacy contexts/buffers 2023-01-13 09:22:02 +01:00
drm_cache.c drm for 5.18-rc1 2022-03-24 16:19:43 -07:00
drm_client.c drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
drm_client_modeset.c drm/client: fix null pointer dereference in drm_client_modeset_probe 2024-08-14 13:58:53 +02:00
drm_color_mgmt.c drm: fix whitespace in drm_plane_create_color_properties() 2022-08-04 15:24:46 +02:00
drm_connector.c drm/connector: Add \n to message about demoting connector force-probes 2024-05-17 12:02:26 +02:00
drm_context.c drm/nouveau: Remove support for legacy contexts/buffers 2023-01-13 09:22:02 +01:00
drm_crtc.c drm/crtc: fix uninitialized variable use 2024-01-20 11:51:47 +01:00
drm_crtc_helper.c drm/fb-helper: Remove unnecessary include statements 2022-11-05 17:12:04 +01:00
drm_crtc_helper_internal.h drm/dp: Move DP declarations into separate header file 2022-01-17 11:25:44 +01:00
drm_crtc_internal.h drm/edid: move edid load declarations to internal header 2022-10-26 09:53:56 +03:00
drm_damage_helper.c drm: Allow drivers to indicate the damage helpers to ignore damage clips 2024-01-31 16:19:08 -08:00
drm_debugfs.c drm: Update file owner during use 2024-01-01 12:42:25 +00:00
drm_debugfs_crc.c drm/doc: document how userspace should find out CRTC index 2021-06-10 19:14:47 +02:00
drm_displayid.c drm/displayid: provide access to DisplayID version and primary use case 2023-02-27 02:58:38 +03:00
drm_dma.c drm: remove usage of drm_pci_alloc/free 2021-04-26 18:19:15 +02:00
drm_drv.c drm: Expand max DRM device number to full MINORBITS 2024-09-30 16:25:13 +02:00
drm_dumb_buffers.c drm: remove dumb_destroy callback 2023-02-10 12:19:27 +01:00
drm_edid.c drm/edid: Parse topology block for all DispID structure v1.x 2024-06-12 11:12:05 +02:00
drm_edid_load.c drm/edid/firmware: stop using a throwaway platform device 2022-11-16 14:54:44 +02:00
drm_encoder.c drm/encoder: Introduce drmm_encoder_init 2022-07-13 10:46:05 +02:00
drm_encoder_slave.c drm: encoder_slave: use new I2C API 2020-06-19 09:20:21 +02:00
drm_exec.c drm/drm_exec: Work around a WW mutex lockdep oddity 2023-09-07 10:30:12 +02:00
drm_fb_dma_helper.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
drm_fb_helper.c drm/fb-helper: Don't schedule_work() to flush frame buffer during panic() 2024-09-08 07:54:29 +02:00
drm_fbdev_dma.c drm/fbdev-dma: Only set smem_start is enable per module option 2024-07-05 09:34:03 +02:00
drm_fbdev_generic.c drm/fbdev-generic: Do not set physical framebuffer address 2024-06-16 13:47:37 +02:00
drm_file.c accel: Use XArray instead of IDR for minors 2024-09-30 16:25:13 +02:00
drm_flip_work.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_format_helper.c drm/format-helper: Support the AB24/XB24 formats 2023-01-23 15:02:41 +01:00
drm_fourcc.c drm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats 2022-11-23 20:34:46 +01:00
drm_framebuffer.c drm/framebuffer: Fix use of uninitialized variable 2024-02-05 20:14:26 +00:00
drm_gem.c drm: Do not overrun array in drm_gem_get_pages() 2023-10-12 10:44:06 +02:00
drm_gem_atomic_helper.c drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() 2022-12-05 13:35:37 +01:00
drm_gem_dma_helper.c - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
drm_gem_framebuffer_helper.c drm/gem-fb-helper: Consistenly use drm_dbg_kms() 2023-07-28 11:46:02 +02:00
drm_gem_shmem_helper.c drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE) 2024-06-21 14:38:42 +02:00
drm_gem_ttm_helper.c drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
drm_gem_vram_helper.c drm/vram-helper: fix function names in vram helper doc 2023-05-08 09:16:18 +02:00
drm_gpuva_mgr.c drm/gpuva_mgr: remove unused prev pointer in __drm_gpuva_sm_map() 2023-08-24 14:27:14 +02:00
drm_hashtab.c drm: Declare hashtable as legacy 2021-11-30 09:41:28 +01:00
drm_internal.h accel: Use XArray instead of IDR for minors 2024-09-30 16:25:13 +02:00
drm_ioc32.c drm: Replace DRM_DEBUG with drm_dbg_core in file and ioctl handling 2023-01-03 18:20:57 +01:00
drm_ioctl.c drm: Update file owner during use 2024-01-01 12:42:25 +00:00
drm_irq.c drm: Build drm_irq.o only if CONFIG_DRM_LEGACY has been set 2021-10-22 16:20:12 +02:00
drm_kms_helper_common.c drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_lease.c drm_lease.c: copy user-array safely 2023-11-28 17:19:40 +00:00
drm_legacy.h drm: Declare hashtable as legacy 2021-11-30 09:41:28 +01:00
drm_legacy_misc.c drm: IRQ midlayer is now legacy 2021-08-10 20:14:01 +02:00
drm_lock.c drm : Insert blank lines after declarations. 2020-07-02 15:26:00 +02:00
drm_managed.c Merge drm/drm-next into drm-misc-next 2023-07-24 15:44:47 +02:00
drm_memory.c drm: Mark AGP implementation and ioctls as legacy 2021-05-10 15:46:58 +02:00
drm_mipi_dbi.c drm/mipi-dbi: Lock SPI bus before setting D/C GPIO 2023-08-02 13:18:07 +02:00
drm_mipi_dsi.c drm/mipi-dsi: use correct return type for the DSC functions 2024-06-12 11:12:04 +02:00
drm_mm.c lib/stackdepot: allow optional init and stack_table allocation by kvmalloc() 2022-01-22 08:33:37 +02:00
drm_mode_config.c drm/debugfs: create debugfs late register functions 2022-12-22 14:58:55 -03:00
drm_mode_object.c drm/kms: log when querying an object not included in lease 2023-06-23 16:38:00 +02:00
drm_modes.c drm: Fix comment on mode parsing 2023-02-20 14:56:52 +01:00
drm_modeset_helper.c drm: Check output polling initialized before disabling 2024-04-13 13:07:36 +02:00
drm_modeset_lock.c lib/stackdepot: allow optional init and stack_table allocation by kvmalloc() 2022-01-22 08:33:37 +02:00
drm_of.c drm: of: Add drm_of_get_dsi_bus helper function 2023-01-27 09:39:21 +01:00
drm_panel.c drm/panel: do not return negative error codes from drm_panel_get_modes() 2024-04-03 15:28:33 +02:00
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for Ayn Loki Max 2024-09-18 19:24:05 +02:00
drm_pci.c drm: Mark IRQ_BUSID ioctl as legacy 2021-05-17 21:19:48 +02:00
drm_plane.c drm: Disable the cursor plane on atomic contexts with virtualized drivers 2024-01-31 16:19:08 -08:00
drm_plane_helper.c drm: Remove references to removed transitional helpers 2023-07-29 21:25:16 +02:00
drm_prime.c drm/prime: Unbreak virtgpu dma-buf export 2024-04-10 16:35:58 +02:00
drm_print.c drm_print: add _ddebug descriptor to drm_*dbg prototypes 2022-09-24 15:02:02 +02:00
drm_privacy_screen.c drm-misc-next for v5.18: 2022-02-25 05:50:18 +10:00
drm_privacy_screen_x86.c drm-misc-next for v5.18: 2022-02-01 19:02:41 +10:00
drm_probe_helper.c drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes 2024-04-13 13:07:41 +02:00
drm_property.c drm: property: Replace strncpy() with strscpy_pad() 2021-10-07 05:42:13 +03:00
drm_rect.c gpu/drm: fix repeated words in comments 2022-10-24 09:27:04 +02:00
drm_scatter.c gpu/drm: remove the powerpc hack in drm_legacy_sg_alloc 2020-06-02 10:59:11 -07:00
drm_self_refresh_helper.c drm/atomic: fix self-refresh helpers crtc state dereference 2019-11-06 13:00:21 -05:00
drm_simple_kms_helper.c drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() 2022-12-05 13:35:37 +01:00
drm_suballoc.c drm/suballoc: Extract amdgpu_sa.c as generic suballocation helper 2023-03-01 17:18:19 +01:00
drm_syncobj.c drm/syncobj: Fix syncobj leak in drm_syncobj_eventfd_ioctl 2024-09-18 19:24:09 +02:00
drm_sysfs.c drm/sysfs: rename drm_sysfs_connector_status_event() 2023-06-23 15:54:00 +02:00
drm_trace.h drm: Add high-precision time to vblank trace event 2019-09-03 09:46:18 +02:00
drm_trace_points.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_vblank.c drm/vblank: Fix for drivers that do not drm_vblank_init() 2023-04-04 22:38:03 +02:00
drm_vblank_work.c This tree adds the sched_set_fifo*() encapsulation APIs to remove 2020-08-06 11:55:43 -07:00
drm_vm.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
drm_vma_manager.c drm/drm_vma_manager: Add drm_vma_node_allow_once() 2023-01-19 14:16:55 +01:00
drm_writeback.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
Kconfig drm/ttm/tests: depend on UML || COMPILE_TEST 2024-03-26 18:19:13 -04:00
Makefile drm: manager to keep track of GPUs VA mappings 2023-07-20 05:15:53 +02:00