]> Git Repo - linux.git/commitdiff
Merge branch 'linux-4.10' of git://github.com/skeggsb/linux into drm-next
authorDave Airlie <[email protected]>
Thu, 17 Nov 2016 00:08:29 +0000 (10:08 +1000)
committerDave Airlie <[email protected]>
Thu, 17 Nov 2016 00:08:29 +0000 (10:08 +1000)
- GP102/GP104 devinit (suspend/resume, optimus) hang fix
- GP102/GP104 hardware cursor fix
- Fix for a regression on some non-MST monitors that was caused by the
MST work
- Workaround for certain laptops where ACPI sends display hotkey presses
on a modeset, causing gnome-settings-daemon to go into a continuous loop

* 'linux-4.10' of git://github.com/skeggsb/linux:
  drm/nouveau/disp/gp102: rename from gp104
  drm/nouveau/ce/gp102: rename from gp104
  drm/nouveau/fb/gp102: rename from gp104
  drm/nouveau/disp/gp102: fix cursor/overlay immediate channel indices
  drm/nouveau/disp/nv50-: specify ctrl/user separately when constructing classes
  drm/nouveau/disp/nv50-: split chid into chid.ctrl and chid.user
  drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE
  drm/nouveau/devinit/gm200: drop pmu reset sequence
  drm/nouveau/devinit/gm200: replace while loops with PTIMER-based timeout loops
  drm/nouveau/pmu/gp102: initial implementation
  drm/nouveau/pmu/gp100: initial implementation
  drm/nouveau/pmu: execute reset before running devinit
  drm/nouveau/pmu: move ucode handling into gt215 implementation
  drm/nouveau/core: initial support for GP102
  drm/nouveau/device/pci: fix oops if no mmu subdev present
  drm/nouveau/kms/nv50: avoid touching DP_MSTM_CTRL if !DP_MST_CAP

1  2 
drivers/gpu/drm/nouveau/nouveau_display.c

index 5698687bc19745f389686826b8b11dcaa4da0ded,37839d6afabcecd8f7cce21533b8d7a16b3a3916..bd37ae1275823b6f6f17ff806fde9728dccbc700
@@@ -24,6 -24,7 +24,7 @@@
   *
   */
  
+ #include <acpi/video.h>
  #include <drm/drmP.h>
  #include <drm/drm_atomic.h>
  #include <drm/drm_atomic_helper.h>
@@@ -348,6 -349,55 +349,55 @@@ static struct nouveau_drm_prop_enum_lis
        }                                                                      \
  } while(0)
  
+ #ifdef CONFIG_ACPI
+ /*
+  * Hans de Goede: This define belongs in acpi/video.h, I've submitted a patch
+  * to the acpi subsys to move it there from drivers/acpi/acpi_video.c .
+  * This should be dropped once that is merged.
+  */
+ #ifndef ACPI_VIDEO_NOTIFY_PROBE
+ #define ACPI_VIDEO_NOTIFY_PROBE                       0x81
+ #endif
+ static void
+ nouveau_display_acpi_work(struct work_struct *work)
+ {
+       struct nouveau_drm *drm = container_of(work, typeof(*drm), acpi_work);
+       pm_runtime_get_sync(drm->dev->dev);
+       drm_helper_hpd_irq_event(drm->dev);
+       pm_runtime_mark_last_busy(drm->dev->dev);
+       pm_runtime_put_sync(drm->dev->dev);
+ }
+ static int
+ nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val,
+                         void *data)
+ {
+       struct nouveau_drm *drm = container_of(nb, typeof(*drm), acpi_nb);
+       struct acpi_bus_event *info = data;
+       if (!strcmp(info->device_class, ACPI_VIDEO_CLASS)) {
+               if (info->type == ACPI_VIDEO_NOTIFY_PROBE) {
+                       /*
+                        * This may be the only indication we receive of a
+                        * connector hotplug on a runtime suspended GPU,
+                        * schedule acpi_work to check.
+                        */
+                       schedule_work(&drm->acpi_work);
+                       /* acpi-video should not generate keypresses for this */
+                       return NOTIFY_BAD;
+               }
+       }
+       return NOTIFY_DONE;
+ }
+ #endif
  int
  nouveau_display_init(struct drm_device *dev)
  {
@@@ -380,14 -430,14 +430,14 @@@ nouveau_display_fini(struct drm_device 
        struct nouveau_display *disp = nouveau_display(dev);
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct drm_connector *connector;
 -      int head;
 +      struct drm_crtc *crtc;
  
        if (!suspend)
                drm_crtc_force_disable_all(dev);
  
        /* Make sure that drm and hw vblank irqs get properly disabled. */
 -      for (head = 0; head < dev->mode_config.num_crtc; head++)
 -              drm_vblank_off(dev, head);
 +      drm_for_each_crtc(crtc, dev)
 +              drm_crtc_vblank_off(crtc);
  
        /* disable flip completion events */
        nvif_notify_put(&drm->flip);
@@@ -488,7 -538,7 +538,7 @@@ nouveau_display_create(struct drm_devic
  
        if (nouveau_modeset != 2 && drm->vbios.dcb.entries) {
                static const u16 oclass[] = {
-                       GP104_DISP,
+                       GP102_DISP,
                        GP100_DISP,
                        GM200_DISP,
                        GM107_DISP,
        }
  
        nouveau_backlight_init(dev);
+ #ifdef CONFIG_ACPI
+       INIT_WORK(&drm->acpi_work, nouveau_display_acpi_work);
+       drm->acpi_nb.notifier_call = nouveau_display_acpi_ntfy;
+       register_acpi_notifier(&drm->acpi_nb);
+ #endif
        return 0;
  
  vblank_err:
@@@ -547,6 -603,9 +603,9 @@@ nouveau_display_destroy(struct drm_devi
  {
        struct nouveau_display *disp = nouveau_display(dev);
  
+ #ifdef CONFIG_ACPI
+       unregister_acpi_notifier(&nouveau_drm(dev)->acpi_nb);
+ #endif
        nouveau_backlight_exit(dev);
        nouveau_display_vblank_fini(dev);
  
@@@ -723,7 -782,7 +782,7 @@@ nouveau_display_resume(struct drm_devic
        struct nouveau_display *disp = nouveau_display(dev);
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct drm_crtc *crtc;
 -      int ret, head;
 +      int ret;
  
        if (dev->mode_config.funcs->atomic_commit) {
                nouveau_display_init(dev);
  
        drm_helper_resume_force_mode(dev);
  
 -      /* Make sure that drm and hw vblank irqs get resumed if needed. */
 -      for (head = 0; head < dev->mode_config.num_crtc; head++)
 -              drm_vblank_on(dev, head);
 -
        list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
                struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
  
This page took 0.068194 seconds and 4 git commands to generate.