[PATCH] drm/radeon: avoid a possible array overflow

2018-12-18 Thread Yang Xiao
From: Young Xiao When looking up the connector type make sure the index is valid. Avoids a later crash if we read past the end of the array. See commit e1718d97aa88 ("drm/amdgpu: avoid a possible array overflow") for detail. Signed-off-by: Young Xiao ---

[PATCH] drm/i915: avoid division by zero on skl_calc_wrpll_link

2018-12-18 Thread Yang Xiao
From: Young Xiao If for some unexpected reason the registers all read zero it's better to WARN and return instead of dividing by zero and completely freezing the machine. See commit 0e005888b833 ("drm/i915: avoid division by zero on cnl_calc_wrpll_link") for detail. Signed-off-by: Young Xiao

[PATCH] drm: radeon: fix overflow on 32bit systems

2018-11-28 Thread Yang Xiao
From: Young Xiao the type mem->start is unsigned long, so this can overflow on 32bit system, since the type addr is uint64_t. Signed-off-by: Young Xiao --- drivers/gpu/drm/radeon/radeon_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_vm.c

[PATCH] drm/amd/display: fix uninitialized symbol 'id' in bios_parser_get_src_obj

2018-11-28 Thread Yang Xiao
From: Young Xiao See commit a8f976473196 ("drm/amd/display: Bunch of smatch error and warning fixes in DC") for detail. Signed-off-by: Young Xiao --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] drm/amd/amdgpu: Test for PCI root bus before assuming bus->self

2018-11-27 Thread Yang Xiao
From: Young_X If we assign an amd device to a virtual mechine, we can no longer assume a fixed hardware topology, like the GPU having a parent device. This patch simply adds pci_is_root_bus() tests to avoid passing a NULL pointer to PCI access functions. See commit