[Nouveau] [Bug 110572] Regularly System Crash: (ca. 1 hour) nouveau 0000:08:00.0: gr: PGRAPH TLB flush idle timeout fail and nouveau 0000:08:00.0: mmu: ce0 mmu invalidate timeout

2019-05-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110572

Linux Freak  changed:

   What|Removed |Added

Summary|System Crash: nouveau   |Regularly System Crash:
   |:08:00.0: gr: PGRAPH|(ca. 1 hour) nouveau
   |TLB flush idle timeout fail |:08:00.0: gr: PGRAPH
   |and nouveau :08:00.0:   |TLB flush idle timeout fail
   |mmu: ce0 mmu invalidate |and nouveau :08:00.0:
   |timeout |mmu: ce0 mmu invalidate
   ||timeout

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

[Nouveau] [Bug 110572] System Crash: nouveau 0000:08:00.0: gr: PGRAPH TLB flush idle timeout fail and nouveau 0000:08:00.0: mmu: ce0 mmu invalidate timeout

2019-05-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110572

--- Comment #1 from Linux Freak  ---
Enabling also warnings gives a lot of more useful information:

journalctl -p 4 -b -0

see at:
https://forum.manjaro.org/t/system-crash-nouveau-00-0-gr-pgraph-tlb-flush-idle-timeout-fail-and-nouveau-00-0-mmu-ce0-mmu-invalidate-timeout/85154

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

[Nouveau] [Bug 110572] System Crash: nouveau 0000:08:00.0: gr: PGRAPH TLB flush idle timeout fail and nouveau 0000:08:00.0: mmu: ce0 mmu invalidate timeout

2019-05-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110572

Linux Freak  changed:

   What|Removed |Added

   Severity|major   |critical

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

Re: [Nouveau] [PATCH v2 1/4] drm: don't set the pci power state if the pci subsystem handles the ACPI bits

2019-05-08 Thread Lyude Paul
Reviewed-by: Lyude Paul 

On Tue, 2019-05-07 at 22:12 +0200, Karol Herbst wrote:
> v2: rework detection of if Nouveau calling a DSM method or not
> 
> Signed-off-by: Karol Herbst 
> ---
>  drm/nouveau/nouveau_acpi.c |  7 ++-
>  drm/nouveau/nouveau_acpi.h |  2 ++
>  drm/nouveau/nouveau_drm.c  | 14 +++---
>  drm/nouveau/nouveau_drv.h  |  2 ++
>  4 files changed, 21 insertions(+), 4 deletions(-)
> 
> diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c
> index ffb19585..92dfc900 100644
> --- a/drm/nouveau/nouveau_acpi.c
> +++ b/drm/nouveau/nouveau_acpi.c
> @@ -358,6 +358,12 @@ void nouveau_register_dsm_handler(void)
>   vga_switcheroo_register_handler(_dsm_handler, 0);
>  }
>  
> +bool nouveau_runpm_calls_dsm(void)
> +{
> + return nouveau_dsm_priv.optimus_detected &&
> + !nouveau_dsm_priv.optimus_skip_dsm;
> +}
> +
>  /* Must be called for Optimus models before the card can be turned off */
>  void nouveau_switcheroo_optimus_dsm(void)
>  {
> @@ -371,7 +377,6 @@ void nouveau_switcheroo_optimus_dsm(void)
>  
>   nouveau_optimus_dsm(nouveau_dsm_priv.dhandle,
> NOUVEAU_DSM_OPTIMUS_CAPS,
>   NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN, );
> -
>  }
>  
>  void nouveau_unregister_dsm_handler(void)
> diff --git a/drm/nouveau/nouveau_acpi.h b/drm/nouveau/nouveau_acpi.h
> index b86294fc..0f5d7aa0 100644
> --- a/drm/nouveau/nouveau_acpi.h
> +++ b/drm/nouveau/nouveau_acpi.h
> @@ -13,6 +13,7 @@ void nouveau_switcheroo_optimus_dsm(void);
>  int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len);
>  bool nouveau_acpi_rom_supported(struct device *);
>  void *nouveau_acpi_edid(struct drm_device *, struct drm_connector *);
> +bool nouveau_runpm_calls_dsm(void);
>  #else
>  static inline bool nouveau_is_optimus(void) { return false; };
>  static inline bool nouveau_is_v1_dsm(void) { return false; };
> @@ -22,6 +23,7 @@ static inline void nouveau_switcheroo_optimus_dsm(void) {}
>  static inline bool nouveau_acpi_rom_supported(struct device *dev) { return
> false; }
>  static inline int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset,
> int len) { return -EINVAL; }
>  static inline void *nouveau_acpi_edid(struct drm_device *dev, struct
> drm_connector *connector) { return NULL; }
> +static inline bool nouveau_runpm_calls_dsm(void) { return false; }
>  #endif
>  
>  #endif
> diff --git a/drm/nouveau/nouveau_drm.c b/drm/nouveau/nouveau_drm.c
> index 5020265b..09e68e61 100644
> --- a/drm/nouveau/nouveau_drm.c
> +++ b/drm/nouveau/nouveau_drm.c
> @@ -556,6 +556,7 @@ nouveau_drm_device_init(struct drm_device *dev)
>   nouveau_fbcon_init(dev);
>   nouveau_led_init(dev);
>  
> + drm->runpm_dsm = nouveau_runpm_calls_dsm();
>   if (nouveau_pmops_runtime()) {
>   pm_runtime_use_autosuspend(dev->dev);
>   pm_runtime_set_autosuspend_delay(dev->dev, 5000);
> @@ -903,6 +904,7 @@ nouveau_pmops_runtime_suspend(struct device *dev)
>  {
>   struct pci_dev *pdev = to_pci_dev(dev);
>   struct drm_device *drm_dev = pci_get_drvdata(pdev);
> + struct nouveau_drm *drm = nouveau_drm(drm_dev);
>   int ret;
>  
>   if (!nouveau_pmops_runtime()) {
> @@ -910,12 +912,15 @@ nouveau_pmops_runtime_suspend(struct device *dev)
>   return -EBUSY;
>   }
>  
> + drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
>   nouveau_switcheroo_optimus_dsm();
>   ret = nouveau_do_suspend(drm_dev, true);
>   pci_save_state(pdev);
>   pci_disable_device(pdev);
>   pci_ignore_hotplug(pdev);
> - pci_set_power_state(pdev, PCI_D3cold);
> + if (drm->runpm_dsm)
> + pci_set_power_state(pdev, PCI_D3cold);
> +
>   drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF;
>   return ret;
>  }
> @@ -925,7 +930,8 @@ nouveau_pmops_runtime_resume(struct device *dev)
>  {
>   struct pci_dev *pdev = to_pci_dev(dev);
>   struct drm_device *drm_dev = pci_get_drvdata(pdev);
> - struct nvif_device *device = _drm(drm_dev)->client.device;
> + struct nouveau_drm *drm = nouveau_drm(drm_dev);
> + struct nvif_device *device = >client.device;
>   int ret;
>  
>   if (!nouveau_pmops_runtime()) {
> @@ -933,7 +939,9 @@ nouveau_pmops_runtime_resume(struct device *dev)
>   return -EBUSY;
>   }
>  
> - pci_set_power_state(pdev, PCI_D0);
> + drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
> + if (drm->runpm_dsm)
> + pci_set_power_state(pdev, PCI_D0);
>   pci_restore_state(pdev);
>   ret = pci_enable_device(pdev);
>   if (ret)
> diff --git a/drm/nouveau/nouveau_drv.h b/drm/nouveau/nouveau_drv.h
> index da847244..941600e9 100644
> --- a/drm/nouveau/nouveau_drv.h
> +++ b/drm/nouveau/nouveau_drv.h
> @@ -214,6 +214,8 @@ struct nouveau_drm {
>   struct nouveau_svm *svm;
>  
>   struct nouveau_dmem *dmem;
> +
> + bool runpm_dsm;
>  };
>  
>  static inline struct nouveau_drm *
-- 
Cheers,
Lyude Paul


[Nouveau] [PATCH v4 04/11] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state

2019-05-08 Thread Sean Paul
From: Sean Paul 

Everyone who implements connector_helper_funcs->atomic_check reaches
into the connector state to get the atomic state. Instead of continuing
this pattern, change the callback signature to just give atomic state
and let the driver determine what it does and does not need from it.

Eventually all atomic functions should do this, but that's just too much
busy work for me.

Changes in v3:
- Added to the set
Changes in v4:
- None

Link to v3: 
https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-5-s...@poorly.run

Cc: Daniel Vetter 
Cc: Ville Syrjälä 
Cc: Jani Nikula 
Cc: Joonas Lahtinen 
Cc: Rodrigo Vivi 
Cc: Ben Skeggs 
Cc: Laurent Pinchart 
Cc: Kieran Bingham 
Cc: Eric Anholt 
Acked-by: Daniel Vetter 
Signed-off-by: Sean Paul 
---
 drivers/gpu/drm/drm_atomic_helper.c  |  4 ++--
 drivers/gpu/drm/i915/intel_atomic.c  |  8 +---
 drivers/gpu/drm/i915/intel_dp_mst.c  |  7 ---
 drivers/gpu/drm/i915/intel_drv.h |  2 +-
 drivers/gpu/drm/i915/intel_sdvo.c|  9 +
 drivers/gpu/drm/i915/intel_tv.c  |  8 +---
 drivers/gpu/drm/nouveau/dispnv50/disp.c  |  5 +++--
 drivers/gpu/drm/rcar-du/rcar_lvds.c  | 12 +++-
 drivers/gpu/drm/vc4/vc4_txp.c|  7 ---
 include/drm/drm_modeset_helper_vtables.h |  2 +-
 10 files changed, 37 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c 
b/drivers/gpu/drm/drm_atomic_helper.c
index e8b7187a8494..ee945d6f1cba 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -683,7 +683,7 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
}
 
if (funcs->atomic_check)
-   ret = funcs->atomic_check(connector, 
new_connector_state);
+   ret = funcs->atomic_check(connector, state);
if (ret)
return ret;
 
@@ -725,7 +725,7 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
continue;
 
if (funcs->atomic_check)
-   ret = funcs->atomic_check(connector, 
new_connector_state);
+   ret = funcs->atomic_check(connector, state);
if (ret)
return ret;
}
diff --git a/drivers/gpu/drm/i915/intel_atomic.c 
b/drivers/gpu/drm/i915/intel_atomic.c
index b844e8840c6f..e8a5b82e9242 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -103,12 +103,14 @@ int intel_digital_connector_atomic_set_property(struct 
drm_connector *connector,
 }
 
 int intel_digital_connector_atomic_check(struct drm_connector *conn,
-struct drm_connector_state *new_state)
+struct drm_atomic_state *state)
 {
+   struct drm_connector_state *new_state =
+   drm_atomic_get_new_connector_state(state, conn);
struct intel_digital_connector_state *new_conn_state =
to_intel_digital_connector_state(new_state);
struct drm_connector_state *old_state =
-   drm_atomic_get_old_connector_state(new_state->state, conn);
+   drm_atomic_get_old_connector_state(state, conn);
struct intel_digital_connector_state *old_conn_state =
to_intel_digital_connector_state(old_state);
struct drm_crtc_state *crtc_state;
@@ -118,7 +120,7 @@ int intel_digital_connector_atomic_check(struct 
drm_connector *conn,
if (!new_state->crtc)
return 0;
 
-   crtc_state = drm_atomic_get_new_crtc_state(new_state->state, 
new_state->crtc);
+   crtc_state = drm_atomic_get_new_crtc_state(state, new_state->crtc);
 
/*
 * These properties are handled by fastset, and might not end
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c 
b/drivers/gpu/drm/i915/intel_dp_mst.c
index 19d81cef2ab6..89cfec128ba0 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -143,9 +143,10 @@ static int intel_dp_mst_compute_config(struct 
intel_encoder *encoder,
 
 static int
 intel_dp_mst_atomic_check(struct drm_connector *connector,
- struct drm_connector_state *new_conn_state)
+ struct drm_atomic_state *state)
 {
-   struct drm_atomic_state *state = new_conn_state->state;
+   struct drm_connector_state *new_conn_state =
+   drm_atomic_get_new_connector_state(state, connector);
struct drm_connector_state *old_conn_state =
drm_atomic_get_old_connector_state(state, connector);
struct intel_connector *intel_connector =
@@ -155,7 +156,7 @@ intel_dp_mst_atomic_check(struct drm_connector *connector,
struct drm_dp_mst_topology_mgr *mgr;
int ret;
 
-   ret = intel_digital_connector_atomic_check(connector, new_conn_state);
+   ret =