[PATCH v2] drm/amdgpu: Add check to prevenet IH overflow

2021-01-06 Thread Defang Bo
is that we end up processing the buffer overflow over and over again because the bit is never cleared. Resulting in a random system lockup because of an infinite loop in an interrupt handler. Signed-off-by: Defang Bo --- Changes since v1: - Modify the subject and replace the wrong register. --- -

[PATCH] drm/amdgpu:fix IH overflow on Cz

2021-01-05 Thread Defang Bo
that we end up processing the buffer overflow over and over again because the bit is never cleared. Resulting in a random system lockup because of an infinite loop in an interrupt handler. Signed-off-by: Defang Bo --- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 39 ---

[PATCH v2] drm/amdgpu:fix IH overflow on Cz

2021-01-05 Thread Defang Bo
is that we end up processing the buffer overflow over and over again because the bit is never cleared. Resulting in a random system lockup because of an infinite loop in an interrupt handler. Signed-off-by: Defang Bo --- Changes since v1: - Modify the code and correct the wrong fix. --- --- driv

[PATCH] drm/amdgpu:fix IH overflow on Tonga

2021-01-05 Thread Defang Bo
is that we end up processing the buffer overflow over and over again because the bit is never cleared. Resulting in a random system lockup because of an infinite loop in an interrupt handler. Signed-off-by: Defang Bo --- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 35 ++--

[PATCH] drm/amdgpu:fix IH overflow on Iceland

2021-01-05 Thread Defang Bo
that we end up processing the buffer overflow over and over again because the bit is never cleared. Resulting in a random system lockup because of an infinite loop in an interrupt handler. Signed-off-by: Defang Bo --- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 37 +-

[PATCH] drm/omapdrm: don't deref error pointer in the omap_fbdev_create error path

2020-12-28 Thread Defang Bo
he unnecessary checks in label fail. Signed-off-by: Defang Bo --- drivers/gpu/drm/omapdrm/omap_fbdev.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c index 3f6cfc2..7ba07c8 100644 --- a/dr

[PATCH] drivers/gpu/drm/ast: Fix infinite loop if read fails

2020-12-28 Thread Defang Bo
nders the system unusable. [How] Fix this by erroring out if an error is detected. Signed-off-by: Defang Bo --- drivers/gpu/drm/ast/ast_post.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c index 8902c2f

[PATCH] drm/radeon:avoid null pointer dereference when dev is not bound

2020-12-28 Thread Defang Bo
[Why] Similar to commit<0fa375e6>. If the set_state/can_switch code access the drm_device when dev is not bound, a null pointer dereference can happen. [How] Add sanity checks to prevent it. Signed-off-by: Defang Bo --- drivers/gpu/drm/radeon/radeon_device.c | 6 ++ 1 file chan

[PATCH] drm/amd/display: avoid null pointer dereference in dm_set_vblank

2020-12-25 Thread Defang Bo
[Why] Similar to commit("drm/amd/display: Guard against null crtc in CRC IRQ"), a null pointer deference can occur if crtc is null in dm_set_vblank. [How] Check that CRTC is non-null before accessing its fields. Signed-off-by: Defang Bo --- drivers/gpu/drm/amd/display/amdgpu_dm/a

[PATCH] drm/omapdrm: don't deref error pointer in the omap_fbdev_create error path

2020-12-25 Thread Defang Bo
From: bodefang Similar to commit <789d4c300>("drm/msm: don't deref error pointer in the msm_fbdev_create error path") the error pointer returned by omap_framebuffer_init gets passed to drm_framebuffer_remove. The latter handles only Null pointers,thus a nasty crash will occur. Signed-off-by: b

[PATCH 2/2] drivers/gpu/drm/ast: Fix infinite loop if read fails

2020-12-25 Thread Defang Bo
ror is detected. Signed-off-by: Defang Bo --- drivers/gpu/drm/ast/ast_post.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c index ef19c70..86e4d23 100644 --- a/drivers/gpu/drm/ast/ast_post.c +++ b/drivers/gpu/d

[PATCH 1/2] drivers/gpu/drm/ast: Fix infinite loop if read fails

2020-12-25 Thread Defang Bo
ror is detected. Signed-off-by: Defang Bo --- drivers/gpu/drm/ast/ast_post.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c index 8902c2f..ef19c70 100644 --- a/drivers/gpu/drm/ast/ast_post.c +++ b/drivers/g