Fix Xorg abort on exit in RHEL 7.7+

Submitted by Grigorev, Slava on Sept. 10, 2019, 7:47 p.m.

Details

Message ID 20190910194637.29819-1-slava.grigorev@amd.com
State New
Headers show
Series "Fix Xorg abort on exit in RHEL 7.7+" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Grigorev, Slava Sept. 10, 2019, 7:47 p.m.
RHEL adds an extra LeaveVT calls to xf86CrtcCloseScreen when they build X server
for the purpose to drop drm master.

Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
---
 src/amdgpu_kms.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 3280972..9efc482 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -2285,7 +2285,9 @@  void AMDGPULeaveVT_KMS(ScrnInfoPtr pScrn)
 				struct drmmode_fb *black_fb =
 					amdgpu_pixmap_get_fb(black_scanout.pixmap);
 
-				amdgpu_pixmap_clear(black_scanout.pixmap);
+				if (!dixPrivateKeyRegistered(rrPrivKey))
+					amdgpu_pixmap_clear(black_scanout.pixmap);
+
 				amdgpu_glamor_finish(pScrn);
 
 				for (i = 0; i < xf86_config->num_crtc; i++) {

Comments

Hi Slava,


xf86-video-amdgpu patches are submitted & reviewed as GitLab merge
requests now. Please log into your GitLab account, click the "Fork"
button on https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu ,
push the change to a new branch of your resulting personal GitLab
project, and click on the URL in "git push"'s output to create an MR.


Thanks,


On 2019-09-10 9:47 p.m., Grigorev, Slava wrote:
> RHEL adds an extra LeaveVT calls to xf86CrtcCloseScreen when they build X server
> for the purpose to drop drm master.
> 
> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
> ---
>  src/amdgpu_kms.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
> index 3280972..9efc482 100644
> --- a/src/amdgpu_kms.c
> +++ b/src/amdgpu_kms.c
> @@ -2285,7 +2285,9 @@ void AMDGPULeaveVT_KMS(ScrnInfoPtr pScrn)
>  				struct drmmode_fb *black_fb =
>  					amdgpu_pixmap_get_fb(black_scanout.pixmap);
>  
> -				amdgpu_pixmap_clear(black_scanout.pixmap);
> +				if (!dixPrivateKeyRegistered(rrPrivKey))
> +					amdgpu_pixmap_clear(black_scanout.pixmap);
> +
>  				amdgpu_glamor_finish(pScrn);
>  
>  				for (i = 0; i < xf86_config->num_crtc; i++) {
>