Module Name:    src
Committed By:   riastradh
Date:           Mon Aug  7 16:35:06 UTC 2023

Modified Files:
        src/sys/external/bsd/drm2/radeon: radeon_pci.c

Log Message:
radeon: Suspend ioctls while device is suspended.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/external/bsd/drm2/radeon/radeon_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/radeon/radeon_pci.c
diff -u src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.23 src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.24
--- src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.23	Tue Mar  7 20:23:00 2023
+++ src/sys/external/bsd/drm2/radeon/radeon_pci.c	Mon Aug  7 16:35:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeon_pci.c,v 1.23 2023/03/07 20:23:00 mrg Exp $	*/
+/*	$NetBSD: radeon_pci.c,v 1.24 2023/08/07 16:35:06 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.23 2023/03/07 20:23:00 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.24 2023/08/07 16:35:06 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "genfb.h"
@@ -72,6 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: radeon_pci.c
 #include <drm/drm_device.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_fb_helper.h>
+#include <drm/drm_ioctl.h>
 #include <drm/drm_pci.h>
 
 #if NGENFB > 0
@@ -366,6 +367,8 @@ radeon_do_suspend(device_t self, const p
 	int ret;
 	bool is_console = true; /* XXX */
 
+	drm_suspend_ioctl(dev);
+
 	ret = radeon_suspend_kms(dev, true, is_console, false);
 	if (ret)
 		return false;
@@ -383,9 +386,10 @@ radeon_do_resume(device_t self, const pm
 
 	ret = radeon_resume_kms(dev, true, is_console);
 	if (ret)
-		return false;
+		goto out;
 
-	return true;
+out:	drm_resume_ioctl(dev);
+	return ret == 0;
 }
 
 static void

Reply via email to