Revert "drm/amd/display: fix dereferencing possible ERR_PTR()"
PATCH 1/2 Revert "drm/amd/display: fix dereferencing possible ERR_PTR()"
This reverts commit cd2d6c92a8e39d7e50a5af9fcc67d07e6a89e91d.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -3
@@ -4998,9 +4998,6 @@ static int dm_atomic_check_plane_state_fb(struct drm_atomic_state *state,return -EDEADLK ; crtc_state =drm_atomic_get_crtc_state (plane_state->state, crtc); -if (IS_ERR (crtc_state)) -return PTR_ERR (crtc_state); -if (crtc->primary == plane && crtc_state->active) {if (!plane_state->fb)return -EINVAL ;
Signature · 6 lines
2.17.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180412145152.20224-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 Revert "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)"
This seems to cause flickering and lock-ups for a wide range of users. Revert until we've found a proper fix for the flickering and lock-ups.
This reverts commit 36cc549d59864b7161f0e23d710c1c4d1b9cf022.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 28 ------------------- 1 file changed, 28 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -28
@@ -4982,30 +4982,6 @@ static int dm_update_planes_state(struct dc *dc,return ret; } -static int dm_atomic_check_plane_state_fb (struct drm_atomic_state *state, -struct drm_crtc *crtc) -{ -struct drm_plane *plane; -struct drm_crtc_state *crtc_state; - -WARN_ON (!drm_atomic_get_new_crtc_state (state, crtc)); - -drm_for_each_plane_mask (plane, state->dev, crtc->state->plane_mask) { -struct drm_plane_state *plane_state = -drm_atomic_get_plane_state (state, plane); - -if (IS_ERR (plane_state)) -return -EDEADLK ; - - crtc_state =drm_atomic_get_crtc_state (plane_state->state, crtc); -if (crtc->primary == plane && crtc_state->active) { -if (!plane_state->fb) -return -EINVAL ; - } - } -return 0 ; -} -static int amdgpu_dm_atomic_check (struct drm_device *dev,struct drm_atomic_state *state) {
@@ -5032,10 +5008,6 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,struct dm_crtc_state *dm_new_crtc_state =to_dm_crtc_state (new_crtc_state);struct dm_crtc_state *dm_old_crtc_state =to_dm_crtc_state (old_crtc_state); - ret =dm_atomic_check_plane_state_fb (state, crtc); -if (ret) - goto fail; -if (!drm_atomic_crtc_needs_modeset (new_crtc_state) && !new_crtc_state->color_mgmt_changed && (dm_old_crtc_state->freesync_enabled == dm_new_crtc_state->freesync_enabled))
Signature · 6 lines
2.17.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180412145152.20224-2-harry.wentland-5C7GfCeVMHo@public.gmane.org
Michel Dänzer
Reviewed-byRe: [PATCH 2/2] Revert "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)"
Quoted 9 lines · Harry Wentland
This seems to cause flickering and lock-ups for a wide range of users. Revert until we've found a proper fix for the flickering and lock-ups.
This reverts commit
36cc549d59864b7161f0e23d710c1c4d1b9cf022.Cc Shirish S <[email protected]>Cc Alex Deucher <[email protected]>Signed-off-by Harry Wentland <[email protected]>
Thanks Harry, both patches are
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): a0f8eeb2-b1bf-7f31-a37d-52ea4623fd66-otUistvHUpPR7s880joybQ@public.gmane.org
S, Shirish
Reviewed-by Michel DänzerRE: [PATCH 2/2] Revert "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)"
Hi Harry, Alex,
The solution given while reviewing my patch was that "DC should support enabling a CRTC without a framebuffer."
Since the revert is a temporary workaround to address issue at hand and considering the bigger regression it will cause on ChromeOS(explained below), I would strongly recommend that the revert should not be mainlined (to linus tree), until a proper fix for both the issues i.e., flickering and BUG hit on atomic is found.
For the sake of everyone's understanding in the list below is a brief background.
Mainline patch from intel folks, "846c7df drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2." introduces a slight behavioral change to rmfb. Instead of disabling a crtc when the primary plane is disabled, it now preserves it.
This change leads to BUG hit while performing atomic commit on amd driver leading to reboot/system instability on ChromeOS which has enabled drm atomic way of rendering, I also remember it causing some issue on other OS as well.
Thanks & Regards,
Shirish S
-----Original Message-----
From: Michel Dänzer [mailto:[email protected]]
Sent: Thursday, April 12, 2018 8:39 PM
To: Wentland, Harry <[email protected]>
Cc: [email protected]; Deucher, Alexander <[email protected]>; S, Shirish <[email protected]>
Subject: Re: [PATCH 2/2] Revert "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)"
Quoted 9 lines · Harry Wentland
This seems to cause flickering and lock-ups for a wide range of users. Revert until we've found a proper fix for the flickering and lock-ups.
This reverts commit
36cc549d59864b7161f0e23d710c1c4d1b9cf022.Cc Shirish S <[email protected]>Cc Alex Deucher <[email protected]>Signed-off-by Harry Wentland <[email protected]>
Thanks Harry, both patches are
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BLUPR12MB0452B66C9CBA14E859DB5DB6F2B30-7LeqcoF/[email protected]
Re: [PATCH 2/2] Revert "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)"
Quoted 3 lines · Shirish
Hi Harry, Alex,
The solution given while reviewing my patch was that "DC should support enabling a CRTC without a framebuffer."
I think it's weird that an enabled CRTC would end up having a NULL FB during normal operation in the first place. Any idea how that happens?
Quoted 10 lines
Since the revert is a temporary workaround to address issue at hand and considering the bigger regression it will cause on ChromeOS(explained below), I would strongly recommend that the revert should not be mainlined (to linus tree), until a proper fix for both the issues i.e., flickering and BUG hit on atomic is found.
For the sake of everyone's understanding in the list below is a brief background.
Mainline patch from intel folks, "846c7df drm/atomic: Try to preserve the crtc enabled state in
drm_atomic_remove_fb, v2." introduces a slight behavioral change to rmfb. Instead of disabling a crtc when the primary plane is disabled, it now preserves it.This change leads to BUG hit while performing atomic commit on amd driver leading to reboot/system instability on ChromeOS which has enabled drm atomic way of rendering, I also remember it causing some issue on other OS as well.
Can you provide more information about "some issue on other OS"? Otherwise I'm afraid this is a no-brainer, since nobody's using ChromeOS with an AMD GPU in the wild, whereas many people have been running into issues with these commits in the wild, especially since they're in the 4.16 release.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 557349ff-2d22-887f-0892-acfcd5cca1a5-otUistvHUpPR7s880joybQ@public.gmane.org
Re: [PATCH 2/2] Revert "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)"
Quoted 8 lines · Michel Dänzer
Quoted 3 lines · Shirish
Hi Harry, Alex,
The solution given while reviewing my patch was that "DC should support enabling a CRTC without a framebuffer."
I think it's weird that an enabled CRTC would end up having a NULL FB during normal operation in the first place. Any idea how that happens?
I think we've only seen that with ChromeOS and in one case on Ubuntu. If I remember right it was when running GDM with Wayland and logging into X. I imagine our DDX driver never pulls this scenario on us.
Technically this would be a reasonable case for our HW, i.e. we could keep pipe running and blanked and just not scan-out a FB.
Quoted 9 lines
Quoted 9 lines
Since the revert is a temporary workaround to address issue at hand and considering the bigger regression it will cause on ChromeOS(explained below), I would strongly recommend that the revert should not be mainlined (to linus tree), until a proper fix for both the issues i.e., flickering and BUG hit on atomic is found.
For the sake of everyone's understanding in the list below is a brief background.
Mainline patch from intel folks, "846c7df drm/atomic: Try to preserve the crtc enabled state in
drm_atomic_remove_fb, v2." introduces a slight behavioral change to rmfb. Instead of disabling a crtc when the primary plane is disabled, it now preserves it.
Quoted 9 lines
Quoted 2 lines
This change leads to BUG hit while performing atomic commit on amd driver leading to reboot/system instability on ChromeOS which has enabled drm atomic way of rendering, I also remember it causing some issue on other OS as well.
Can you provide more information about "some issue on other OS"? Otherwise I'm afraid this is a no-brainer, since nobody's using ChromeOS with an AMD GPU in the wild, whereas many people have been running into issues with these commits in the wild, especially since they're in the 4.16 release.
I tend to agree with Michel here, there's been quite the fallout from that patch for people's daily drivers.
Harry
Quoted 1 line
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx