diff options
| -rw-r--r-- | drivers/gpu/drm/nouveau/core/core/engine.c | 23 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/core/include/core/device.h | 1 |
2 files changed, 19 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/core/core/engine.c b/drivers/gpu/drm/nouveau/core/core/engine.c index c8bed4a26833..1f6954ae9dd3 100644 --- a/drivers/gpu/drm/nouveau/core/core/engine.c +++ b/drivers/gpu/drm/nouveau/core/core/engine.c | |||
| @@ -42,11 +42,24 @@ nouveau_engine_create_(struct nouveau_object *parent, | |||
| 42 | if (ret) | 42 | if (ret) |
| 43 | return ret; | 43 | return ret; |
| 44 | 44 | ||
| 45 | if ( parent && | 45 | if (parent) { |
| 46 | !nouveau_boolopt(nv_device(parent)->cfgopt, iname, enable)) { | 46 | struct nouveau_device *device = nv_device(parent); |
| 47 | if (!enable) | 47 | int engidx = nv_engidx(nv_object(engine)); |
| 48 | nv_warn(engine, "disabled, %s=1 to enable\n", iname); | 48 | |
| 49 | return -ENODEV; | 49 | if (device->disable_mask & (1ULL << engidx)) { |
| 50 | if (!nouveau_boolopt(device->cfgopt, iname, false)) { | ||
| 51 | nv_debug(engine, "engine disabled by hw/fw\n"); | ||
| 52 | return -ENODEV; | ||
| 53 | } | ||
| 54 | |||
| 55 | nv_warn(engine, "ignoring hw/fw engine disable\n"); | ||
| 56 | } | ||
| 57 | |||
| 58 | if (!nouveau_boolopt(device->cfgopt, iname, enable)) { | ||
| 59 | if (!enable) | ||
| 60 | nv_warn(engine, "disabled, %s=1 to enable\n", iname); | ||
| 61 | return -ENODEV; | ||
| 62 | } | ||
| 50 | } | 63 | } |
| 51 | 64 | ||
| 52 | INIT_LIST_HEAD(&engine->contexts); | 65 | INIT_LIST_HEAD(&engine->contexts); |
diff --git a/drivers/gpu/drm/nouveau/core/include/core/device.h b/drivers/gpu/drm/nouveau/core/include/core/device.h index 24809c10b4b3..7b8ea221b00d 100644 --- a/drivers/gpu/drm/nouveau/core/include/core/device.h +++ b/drivers/gpu/drm/nouveau/core/include/core/device.h | |||
| @@ -71,6 +71,7 @@ struct nouveau_device { | |||
| 71 | const char *dbgopt; | 71 | const char *dbgopt; |
| 72 | const char *name; | 72 | const char *name; |
| 73 | const char *cname; | 73 | const char *cname; |
| 74 | u64 disable_mask; | ||
| 74 | 75 | ||
| 75 | enum { | 76 | enum { |
| 76 | NV_04 = 0x04, | 77 | NV_04 = 0x04, |
