Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2 Stub out console_lock/unlock and drm_f...



details:   https://anonhg.NetBSD.org/src/rev/a28245e652de
branches:  trunk
changeset: 744840:a28245e652de
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Feb 14 04:37:09 2020 +0000

description:
Stub out console_lock/unlock and drm_fb_helper_set_suspend.

Reduce some more diffs.

diffstat:

 sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c |  12 ++----------
 sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c     |   6 ++----
 sys/external/bsd/drm2/dist/drm/drm_fb_helper.c            |  10 +++++++---
 sys/external/bsd/drm2/dist/drm/i915/i915_drv.c            |   8 ++------
 sys/external/bsd/drm2/dist/drm/i915/intel_fbdev.c         |   8 ++++----
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c    |  10 ++++------
 sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c     |  10 ++--------
 sys/external/bsd/drm2/include/linux/console.h             |  12 +++++++++++-
 sys/external/bsd/drm2/include/linux/fb.h                  |   5 ++++-
 9 files changed, 38 insertions(+), 43 deletions(-)

diffs (truncated from 352 to 300 lines):

diff -r 6f5b32cc28bd -r a28245e652de sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c
--- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c Fri Feb 14 04:36:55 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c Fri Feb 14 04:37:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdgpu_device.c,v 1.5 2020/02/14 04:35:19 riastradh Exp $      */
+/*     $NetBSD: amdgpu_device.c,v 1.6 2020/02/14 04:37:09 riastradh Exp $      */
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *          Jerome Glisse
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_device.c,v 1.5 2020/02/14 04:35:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_device.c,v 1.6 2020/02/14 04:37:09 riastradh Exp $");
 
 #include <linux/console.h>
 #include <linux/slab.h>
@@ -1893,13 +1893,11 @@
        }
 #endif
 
-#ifndef __NetBSD__             /* XXX amdgpu fb */
        if (fbcon) {
                console_lock();
                amdgpu_fbdev_set_suspend(adev, 1);
                console_unlock();
        }
-#endif
        return 0;
 }
 
@@ -1922,11 +1920,9 @@
        if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
                return 0;
 
-#ifndef __NetBSD__             /* XXX amdgpu fb */
        if (fbcon) {
                console_lock();
        }
-#endif
 #ifndef __NetBSD__             /* pmf handles this for us.  */
        if (resume) {
                pci_set_power_state(dev->pdev, PCI_D0);
@@ -1957,10 +1953,8 @@
 
        r = amdgpu_late_init(adev);
        if (r) {
-#ifndef __NetBSD__
                if (fbcon)
                        console_unlock();
-#endif
                return r;
        }
 
@@ -2012,12 +2006,10 @@
        dev->dev->power.disable_depth--;
 #endif
 
-#ifndef __NetBSD__             /* XXX amdgpu fb */
        if (fbcon) {
                amdgpu_fbdev_set_suspend(adev, 0);
                console_unlock();
        }
-#endif
 
        return 0;
 }
diff -r 6f5b32cc28bd -r a28245e652de sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c
--- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c     Fri Feb 14 04:36:55 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c     Fri Feb 14 04:37:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdgpu_fb.c,v 1.4 2020/02/14 04:35:19 riastradh Exp $  */
+/*     $NetBSD: amdgpu_fb.c,v 1.5 2020/02/14 04:37:09 riastradh Exp $  */
 
 /*
  * Copyright © 2007 David Airlie
@@ -26,7 +26,7 @@
  *     David Airlie
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_fb.c,v 1.4 2020/02/14 04:35:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_fb.c,v 1.5 2020/02/14 04:37:09 riastradh Exp $");
 
 #include <linux/module.h>
 #include <linux/slab.h>
@@ -438,11 +438,9 @@
 
 void amdgpu_fbdev_set_suspend(struct amdgpu_device *adev, int state)
 {
-#ifndef __NetBSD__             /* XXX amdgpu fb suspend */
        if (adev->mode_info.rfbdev)
                drm_fb_helper_set_suspend(&adev->mode_info.rfbdev->helper,
                        state);
-#endif
 }
 
 int amdgpu_fbdev_total_size(struct amdgpu_device *adev)
diff -r 6f5b32cc28bd -r a28245e652de sys/external/bsd/drm2/dist/drm/drm_fb_helper.c
--- a/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c    Fri Feb 14 04:36:55 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c    Fri Feb 14 04:37:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_fb_helper.c,v 1.13 2019/11/05 04:09:51 msaitoh Exp $       */
+/*     $NetBSD: drm_fb_helper.c,v 1.14 2020/02/14 04:37:09 riastradh Exp $     */
 
 /*
  * Copyright (c) 2006-2009 Red Hat Inc.
@@ -30,7 +30,7 @@
  *      Jesse Barnes <jesse.barnes%intel.com@localhost>
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_fb_helper.c,v 1.13 2019/11/05 04:09:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_fb_helper.c,v 1.14 2020/02/14 04:37:09 riastradh Exp $");
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
@@ -864,7 +864,11 @@
 }
 EXPORT_SYMBOL(drm_fb_helper_fini);
 
-#ifndef __NetBSD__             /* XXX fb info */
+#ifdef __NetBSD__              /* XXX fb info */
+void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state)
+{
+}
+#else
 /**
  * drm_fb_helper_unlink_fbi - wrapper around unlink_framebuffer
  * @fb_helper: driver-allocated fbdev helper
diff -r 6f5b32cc28bd -r a28245e652de sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c    Fri Feb 14 04:36:55 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c    Fri Feb 14 04:37:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_drv.c,v 1.17 2019/12/05 20:03:09 maya Exp $       */
+/*     $NetBSD: i915_drv.c,v 1.18 2020/02/14 04:37:09 riastradh Exp $  */
 
 /* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*-
  */
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_drv.c,v 1.17 2019/12/05 20:03:09 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_drv.c,v 1.18 2020/02/14 04:37:09 riastradh Exp $");
 
 #include <linux/device.h>
 #include <linux/acpi.h>
@@ -741,9 +741,7 @@
        intel_uncore_forcewake_reset(dev, false);
        intel_opregion_fini(dev);
 
-#ifndef __NetBSD__             /* XXX fb */
        intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED, true);
-#endif
 
        dev_priv->suspend_count++;
 
@@ -870,9 +868,7 @@
 
        intel_opregion_init(dev);
 
-#ifndef __NetBSD__             /* XXX fb */
        intel_fbdev_set_suspend(dev, FBINFO_STATE_RUNNING, false);
-#endif
 
        mutex_lock(&dev_priv->modeset_restore_lock);
        dev_priv->modeset_restore = MODESET_DONE;
diff -r 6f5b32cc28bd -r a28245e652de sys/external/bsd/drm2/dist/drm/i915/intel_fbdev.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_fbdev.c Fri Feb 14 04:36:55 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_fbdev.c Fri Feb 14 04:37:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_fbdev.c,v 1.9 2018/08/27 07:55:39 riastradh Exp $        */
+/*     $NetBSD: intel_fbdev.c,v 1.10 2020/02/14 04:37:09 riastradh Exp $       */
 
 /*
  * Copyright © 2007 David Airlie
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_fbdev.c,v 1.9 2018/08/27 07:55:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_fbdev.c,v 1.10 2020/02/14 04:37:09 riastradh Exp $");
 
 #include <linux/async.h>
 #include <linux/module.h>
@@ -790,9 +790,9 @@
        dev_priv->fbdev = NULL;
 }
 
-#ifndef __NetBSD__             /* XXX fb suspend */
 void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous)
 {
+#ifndef __NetBSD__             /* XXX fb suspend */
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct intel_fbdev *ifbdev = dev_priv->fbdev;
        struct fb_info *info;
@@ -838,8 +838,8 @@
 
        drm_fb_helper_set_suspend(&ifbdev->helper, state);
        console_unlock();
+#endif
 }
-#endif
 
 void intel_fbdev_output_poll_changed(struct drm_device *dev)
 {
diff -r 6f5b32cc28bd -r a28245e652de sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c    Fri Feb 14 04:36:55 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c    Fri Feb 14 04:37:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_fbcon.c,v 1.8 2020/02/12 20:31:46 jdolecek Exp $       */
+/*     $NetBSD: nouveau_fbcon.c,v 1.9 2020/02/14 04:37:09 riastradh Exp $      */
 
 /*
  * Copyright © 2007 David Airlie
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_fbcon.c,v 1.8 2020/02/12 20:31:46 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_fbcon.c,v 1.9 2020/02/14 04:37:09 riastradh Exp $");
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -273,11 +273,11 @@
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nouveau_fbdev *fbcon = drm->fbcon;
        if (fbcon && drm->channel) {
+               console_lock();
 #ifndef __NetBSD__             /* XXX nouveau fbaccel */
-               console_lock();
                fbcon->helper.fbdev->flags |= FBINFO_HWACCEL_DISABLED;
+#endif
                console_unlock();
-#endif
                nouveau_channel_idle(drm->channel);
                nvif_object_fini(&fbcon->twod);
                nvif_object_fini(&fbcon->blit);
@@ -585,7 +585,6 @@
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
        if (drm->fbcon) {
-#ifndef __NetBSD__
                console_lock();
                if (state == FBINFO_STATE_RUNNING)
                        nouveau_fbcon_accel_restore(dev);
@@ -593,7 +592,6 @@
                if (state != FBINFO_STATE_RUNNING)
                        nouveau_fbcon_accel_save_disable(dev);
                console_unlock();
-#endif
        }
 }
 
diff -r 6f5b32cc28bd -r a28245e652de sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c     Fri Feb 14 04:36:55 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c     Fri Feb 14 04:37:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_device.c,v 1.8 2020/02/14 04:35:20 riastradh Exp $      */
+/*     $NetBSD: radeon_device.c,v 1.9 2020/02/14 04:37:09 riastradh Exp $      */
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *          Jerome Glisse
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_device.c,v 1.8 2020/02/14 04:35:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_device.c,v 1.9 2020/02/14 04:37:09 riastradh Exp $");
 
 #include <linux/console.h>
 #include <linux/slab.h>
@@ -1844,13 +1844,11 @@
        }
 #endif
 
-#ifndef __NetBSD__             /* XXX radeon fb */
        if (fbcon) {
                console_lock();
                radeon_fbdev_set_suspend(rdev, 1);
                console_unlock();
        }
-#endif
        return 0;
 }
 
@@ -1873,11 +1871,9 @@
        if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
                return 0;
 
-#ifndef __NetBSD__             /* XXX radeon fb */
        if (fbcon) {
                console_lock();
        }
-#endif
 #ifndef __NetBSD__             /* pmf handles this for us.  */
        if (resume) {
                pci_set_power_state(dev->pdev, PCI_D0);
@@ -1963,12 +1959,10 @@
        if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled)



Home | Main Index | Thread Index | Old Index