- Regression fix from atomic conversion (rotation on the original G80). - Concurrency fix when clearing compression tags. - Fixes DP link training issues on GP102/4/6. - Fixes backlight handling in the presence of Apple GMUX. - Improvements to GPU error recovery in a number of scenarios. - GP106 support. * 'linux-4.10' of git://github.com/skeggsb/linux: drm/nouveau/kms/nv50: fix atomic regression on original G80 drm/nouveau/bl: Do not register interface if Apple GMUX detected drm/nouveau/bl: Assign different names to interfaces drm/nouveau/bios/dp: fix handling of LevelEntryTableIndex on DP table 4.2 drm/nouveau/ltc: protect clearing of comptags with mutex drm/nouveau/gr/gf100-: handle GPC/TPC/MPC trap drm/nouveau/core: recognise GP106 chipset drm/nouveau/ttm: wait for bo fence to signal before unmapping vmas drm/nouveau/gr/gf100-: FECS intr handling is not relevant on proprietary ucode drm/nouveau/gr/gf100-: properly ack all FECS error interrupts drm/nouveau/fifo/gf100-: recover from host mmu faults
Unified · Split
| @@ -30,12 +30,37 @@ · 29 unmodified lines | ||
| 30 | 30 | * Register locations derived from NVClock by Roderick Colenbrander |
| 31 | 31 | */ |
| 32 | 32 | |
| 33 | +#include <linux/apple-gmux.h> | |
| 33 | 34 | #include <linux/backlight.h> |
| 35 | +#include <linux/idr.h> | |
| 34 | 36 | |
| 35 | 37 | #include "nouveau_drv.h" |
| 36 | 38 | #include "nouveau_reg.h" |
| 37 | 39 | #include "nouveau_encoder.h" |
| 38 | 40 | |
| 41 | +static struct ida bl_ida; | |
| 42 | +#define BL_NAME_SIZE 15 // 12 for name + 2 for digits + 1 for '\0' | |
| 43 | + | |
| 44 | +struct backlight_connector { | |
| 45 | + struct list_head head; | |
| 46 | + int id; | |
| 47 | +}; | |
| 48 | + | |
| 49 | +static bool | |
| 50 | +nouveau_get_backlight_name(char backlight_name[BL_NAME_SIZE], struct backlight_connector | |
| 51 | + *connector) | |
| 52 | +{ | |
| 53 | + const int nb = ida_simple_get(&bl_ida, 0, 0, GFP_KERNEL); | |
| 54 | + if (nb < 0 || nb >= 100) | |
| 55 | + return false; | |
| 56 | + if (nb > 0) | |
| 57 | + snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight%d", nb); | |
| 58 | + else | |
| 59 | + snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight"); | |
| 60 | + connector->id = nb; | |
| 61 | + return true; | |
| 62 | +} | |
| 63 | + | |
| 39 | 64 | static int |
| 40 | 65 | nv40_get_intensity(struct backlight_device *bd) |
| 41 | 66 | { |
| @@ -74,6 +99,8 @@ nv40_backlight_init(struct drm_connector *connector) · 32 unmodified lines | ||
| 74 | 99 | struct nvif_object *device = &drm->device.object; |
| 75 | 100 | struct backlight_properties props; |
| 76 | 101 | struct backlight_device *bd; |
| 102 | + struct backlight_connector bl_connector; | |
| 103 | + char backlight_name[BL_NAME_SIZE]; | |
| 77 | 104 | |
| 78 | 105 | if (!(nvif_rd32(device, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK)) |
| 79 | 106 | return 0; |
| @@ -81,10 +108,19 @@ nv40_backlight_init(struct drm_connector *connector) · 1 unmodified line | ||
| 81 | 108 | memset(&props, 0, sizeof(struct backlight_properties)); |
| 82 | 109 | props.type = BACKLIGHT_RAW; |
| 83 | 110 | props.max_brightness = 31; |
| 84 | − bd = backlight_device_register("nv_backlight", connector->kdev, drm, | |
| 111 | + if (!nouveau_get_backlight_name(backlight_name, &bl_connector)) { | |
| 112 | + NV_ERROR(drm, "Failed to retrieve a unique name for the backlight interface\n"); | |
| 113 | + return 0; | |
| 114 | + } | |
| 115 | + bd = backlight_device_register(backlight_name , connector->kdev, drm, | |
| 85 | 116 | &nv40_bl_ops, &props); |
| 86 | − if (IS_ERR(bd)) | |
| 117 | + | |
| 118 | + if (IS_ERR(bd)) { | |
| 119 | + if (bl_connector.id > 0) | |
| 120 | + ida_simple_remove(&bl_ida, bl_connector.id); | |
| 87 | 121 | return PTR_ERR(bd); |
| 122 | + } | |
| 123 | + list_add(&bl_connector.head, &drm->bl_connectors); | |
| 88 | 124 | drm->backlight = bd; |
| 89 | 125 | bd->props.brightness = nv40_get_intensity(bd); |
| 90 | 126 | backlight_update_status(bd); |
| @@ -182,6 +218,8 @@ nv50_backlight_init(struct drm_connector *connector) · 91 unmodified lines | ||
| 182 | 218 | struct backlight_properties props; |
| 183 | 219 | struct backlight_device *bd; |
| 184 | 220 | const struct backlight_ops *ops; |
| 221 | + struct backlight_connector bl_connector; | |
| 222 | + char backlight_name[BL_NAME_SIZE]; | |
| 185 | 223 | |
| 186 | 224 | nv_encoder = find_encoder(connector, DCB_OUTPUT_LVDS); |
| 187 | 225 | if (!nv_encoder) { |
| @@ -203,11 +241,20 @@ nv50_backlight_init(struct drm_connector *connector) · 15 unmodified lines | ||
| 203 | 241 | memset(&props, 0, sizeof(struct backlight_properties)); |
| 204 | 242 | props.type = BACKLIGHT_RAW; |
| 205 | 243 | props.max_brightness = 100; |
| 206 | − bd = backlight_device_register("nv_backlight", connector->kdev, | |
| 244 | + if (!nouveau_get_backlight_name(backlight_name, &bl_connector)) { | |
| 245 | + NV_ERROR(drm, "Failed to retrieve a unique name for the backlight interface\n"); | |
| 246 | + return 0; | |
| 247 | + } | |
| 248 | + bd = backlight_device_register(backlight_name , connector->kdev, | |
| 207 | 249 | nv_encoder, ops, &props); |
| 208 | − if (IS_ERR(bd)) | |
| 250 | + | |
| 251 | + if (IS_ERR(bd)) { | |
| 252 | + if (bl_connector.id > 0) | |
| 253 | + ida_simple_remove(&bl_ida, bl_connector.id); | |
| 209 | 254 | return PTR_ERR(bd); |
| 255 | + } | |
| 210 | 256 | |
| 257 | + list_add(&bl_connector.head, &drm->bl_connectors); | |
| 211 | 258 | drm->backlight = bd; |
| 212 | 259 | bd->props.brightness = bd->ops->get_brightness(bd); |
| 213 | 260 | backlight_update_status(bd); |
| @@ -221,6 +268,13 @@ nouveau_backlight_init(struct drm_device *dev) · 7 unmodified lines | ||
| 221 | 268 | struct nvif_device *device = &drm->device; |
| 222 | 269 | struct drm_connector *connector; |
| 223 | 270 | |
| 271 | + if (apple_gmux_present()) { | |
| 272 | + NV_INFO(drm, "Apple GMUX detected: not registering Nouveau backlight interface\n"); | |
| 273 | + return 0; | |
| 274 | + } | |
| 275 | + | |
| 276 | + INIT_LIST_HEAD(&drm->bl_connectors); | |
| 277 | + | |
| 224 | 278 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
| 225 | 279 | if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && |
| 226 | 280 | connector->connector_type != DRM_MODE_CONNECTOR_eDP) |
| @@ -247,9 +301,27 @@ void · 20 unmodified lines | ||
| 247 | 301 | nouveau_backlight_exit(struct drm_device *dev) |
| 248 | 302 | { |
| 249 | 303 | struct nouveau_drm *drm = nouveau_drm(dev); |
| 304 | + struct backlight_connector *connector; | |
| 305 | + | |
| 306 | + list_for_each_entry(connector, &drm->bl_connectors, head) { | |
| 307 | + if (connector->id >= 0) | |
| 308 | + ida_simple_remove(&bl_ida, connector->id); | |
| 309 | + } | |
| 250 | 310 | |
| 251 | 311 | if (drm->backlight) { |
| 252 | 312 | backlight_device_unregister(drm->backlight); |
| 253 | 313 | drm->backlight = NULL; |
| 254 | 314 | } |
| 255 | 315 | } |
| 316 | + | |
| 317 | +void | |
| 318 | +nouveau_backlight_ctor(void) | |
| 319 | +{ | |
| 320 | + ida_init(&bl_ida); | |
| 321 | +} | |
| 322 | + | |
| 323 | +void | |
| 324 | +nouveau_backlight_dtor(void) | |
| 325 | +{ | |
| 326 | + ida_destroy(&bl_ida); | |
| 327 | +} | |
| @@ -1209,6 +1209,7 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) · 1208 unmodified lines | ||
| 1209 | 1209 | nvbo->page_shift != vma->vm->mmu->lpg_shift)) { |
| 1210 | 1210 | nvkm_vm_map(vma, new_mem->mm_node); |
| 1211 | 1211 | } else { |
| 1212 | + WARN_ON(ttm_bo_wait(bo, false, false)); | |
| 1212 | 1213 | nvkm_vm_unmap(vma); |
| 1213 | 1214 | } |
| 1214 | 1215 | } |
| @@ -91,6 +91,8 @@ int nouveau_crtc_set_config(struct drm_mode_set *set); · 90 unmodified lines | ||
| 91 | 91 | #ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT |
| 92 | 92 | extern int nouveau_backlight_init(struct drm_device *); |
| 93 | 93 | extern void nouveau_backlight_exit(struct drm_device *); |
| 94 | +extern void nouveau_backlight_ctor(void); | |
| 95 | +extern void nouveau_backlight_dtor(void); | |
| 94 | 96 | #else |
| 95 | 97 | static inline int |
| 96 | 98 | nouveau_backlight_init(struct drm_device *dev) |
| @@ -101,6 +103,14 @@ nouveau_backlight_init(struct drm_device *dev) · 4 unmodified lines | ||
| 101 | 103 | static inline void |
| 102 | 104 | nouveau_backlight_exit(struct drm_device *dev) { |
| 103 | 105 | } |
| 106 | + | |
| 107 | +static inline void | |
| 108 | +nouveau_backlight_ctor(void) { | |
| 109 | +} | |
| 110 | + | |
| 111 | +static inline void | |
| 112 | +nouveau_backlight_dtor(void) { | |
| 113 | +} | |
| 104 | 114 | #endif |
| 105 | 115 | |
| 106 | 116 | struct drm_framebuffer * |
| @@ -1122,6 +1122,7 @@ nouveau_drm_init(void) · 1121 unmodified lines | ||
| 1122 | 1122 | #endif |
| 1123 | 1123 | |
| 1124 | 1124 | nouveau_register_dsm_handler(); |
| 1125 | + nouveau_backlight_ctor(); | |
| 1125 | 1126 | return drm_pci_init(&driver_pci, &nouveau_drm_pci_driver); |
| 1126 | 1127 | } |
| 1127 | 1128 | |
| @@ -1132,6 +1133,7 @@ nouveau_drm_exit(void) · 4 unmodified lines | ||
| 1132 | 1133 | return; |
| 1133 | 1134 | |
| 1134 | 1135 | drm_pci_exit(&driver_pci, &nouveau_drm_pci_driver); |
| 1136 | + nouveau_backlight_dtor(); | |
| 1135 | 1137 | nouveau_unregister_dsm_handler(); |
| 1136 | 1138 | |
| 1137 | 1139 | #ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER |
| @@ -163,6 +163,7 @@ struct nouveau_drm { · 162 unmodified lines | ||
| 163 | 163 | struct nvbios vbios; |
| 164 | 164 | struct nouveau_display *display; |
| 165 | 165 | struct backlight_device *backlight; |
| 166 | + struct list_head bl_connectors; | |
| 166 | 167 | struct work_struct hpd_work; |
| 167 | 168 | #ifdef CONFIG_ACPI |
| 168 | 169 | struct notifier_block acpi_nb; |
| @@ -1726,6 +1726,11 @@ nv50_head_core_set(struct nv50_head *head, struct nv50_head_atom *asyh) · 1725 unmodified lines | ||
| 1726 | 1726 | evo_data(push, asyh->core.handle); |
| 1727 | 1727 | evo_mthd(push, 0x08c0 + head->base.index * 0x400, 1); |
| 1728 | 1728 | evo_data(push, (asyh->core.y << 16) | asyh->core.x); |
| 1729 | + /* EVO will complain with INVALID_STATE if we have an | |
| 1730 | + * active cursor and (re)specify HeadSetContextDmaIso | |
| 1731 | + * without also updating HeadSetOffsetCursor. | |
| 1732 | + */ | |
| 1733 | + asyh->set.curs = asyh->curs.visible; | |
| 1729 | 1734 | } else |
| 1730 | 1735 | if (core->base.user.oclass < GF110_DISP_CORE_CHANNEL_DMA) { |
| 1731 | 1736 | evo_mthd(push, 0x0860 + head->base.index * 0x400, 1); |
| @@ -2241,6 +2241,35 @@ nv134_chipset = { · 2240 unmodified lines | ||
| 2241 | 2241 | .fifo = gp100_fifo_new, |
| 2242 | 2242 | }; |
| 2243 | 2243 | |
| 2244 | +static const struct nvkm_device_chip | |
| 2245 | +nv136_chipset = { | |
| 2246 | + .name = "GP106", | |
| 2247 | + .bar = gf100_bar_new, | |
| 2248 | + .bios = nvkm_bios_new, | |
| 2249 | + .bus = gf100_bus_new, | |
| 2250 | + .devinit = gm200_devinit_new, | |
| 2251 | + .fb = gp102_fb_new, | |
| 2252 | + .fuse = gm107_fuse_new, | |
| 2253 | + .gpio = gk104_gpio_new, | |
| 2254 | + .i2c = gm200_i2c_new, | |
| 2255 | + .ibus = gm200_ibus_new, | |
| 2256 | + .imem = nv50_instmem_new, | |
| 2257 | + .ltc = gp100_ltc_new, | |
| 2258 | + .mc = gp100_mc_new, | |
| 2259 | + .mmu = gf100_mmu_new, | |
| 2260 | + .pci = gp100_pci_new, | |
| 2261 | + .pmu = gp102_pmu_new, | |
| 2262 | + .timer = gk20a_timer_new, | |
| 2263 | + .top = gk104_top_new, | |
| 2264 | + .ce[0] = gp102_ce_new, | |
| 2265 | + .ce[1] = gp102_ce_new, | |
| 2266 | + .ce[2] = gp102_ce_new, | |
| 2267 | + .ce[3] = gp102_ce_new, | |
| 2268 | + .disp = gp102_disp_new, | |
| 2269 | + .dma = gf119_dma_new, | |
| 2270 | + .fifo = gp100_fifo_new, | |
| 2271 | +}; | |
| 2272 | + | |
| 2244 | 2273 | static int |
| 2245 | 2274 | nvkm_device_event_ctor(struct nvkm_object *object, void *data, u32 size, |
| 2246 | 2275 | struct nvkm_notify *notify) |
| @@ -2677,6 +2706,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func, · 430 unmodified lines | ||
| 2677 | 2706 | case 0x130: device->chip = &nv130_chipset; break; |
| 2678 | 2707 | case 0x132: device->chip = &nv132_chipset; break; |
| 2679 | 2708 | case 0x134: device->chip = &nv134_chipset; break; |
| 2709 | + case 0x136: device->chip = &nv136_chipset; break; | |
| 2680 | 2710 | default: |
| 2681 | 2711 | nvdev_error(device, "unknown chipset (%08x)\n", boot0); |
| 2682 | 2712 | goto done; |
| @@ -180,7 +180,8 @@ gf100_fifo_recover(struct gf100_fifo *fifo, struct nvkm_engine *engine, · 179 unmodified lines | ||
| 180 | 180 | list_del_init(&chan->head); |
| 181 | 181 | chan->killed = true; |
| 182 | 182 | |
| 183 | − fifo->recover.mask |= 1ULL << engine->subdev.index; | |
| 183 | + if (engine != &fifo->base.engine) | |
| 184 | + fifo->recover.mask |= 1ULL << engine->subdev.index; | |
| 184 | 185 | schedule_work(&fifo->recover.work); |
| 185 | 186 | } |
| 186 | 187 | |
| @@ -743,14 +743,14 @@ gk104_fifo_fault_engine[] = { · 742 unmodified lines | ||
| 743 | 743 | { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR }, |
| 744 | 744 | { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM }, |
| 745 | 745 | { 0x06, "SCHED" }, |
| 746 | − { 0x07, "HOST0" }, | |
| 747 | − { 0x08, "HOST1" }, | |
| 748 | − { 0x09, "HOST2" }, | |
| 749 | − { 0x0a, "HOST3" }, | |
| 750 | − { 0x0b, "HOST4" }, | |
| 751 | − { 0x0c, "HOST5" }, | |
| 752 | − { 0x0d, "HOST6" }, | |
| 753 | − { 0x0e, "HOST7" }, | |
| 746 | + { 0x07, "HOST0", NULL, NVKM_ENGINE_FIFO }, | |
| 747 | + { 0x08, "HOST1", NULL, NVKM_ENGINE_FIFO }, | |
| 748 | + { 0x09, "HOST2", NULL, NVKM_ENGINE_FIFO }, | |
| 749 | + { 0x0a, "HOST3", NULL, NVKM_ENGINE_FIFO }, | |
| 750 | + { 0x0b, "HOST4", NULL, NVKM_ENGINE_FIFO }, | |
| 751 | + { 0x0c, "HOST5", NULL, NVKM_ENGINE_FIFO }, | |
| 752 | + { 0x0d, "HOST6", NULL, NVKM_ENGINE_FIFO }, | |
| 753 | + { 0x0e, "HOST7", NULL, NVKM_ENGINE_FIFO }, | |
| 754 | 754 | { 0x0f, "HOSTSR" }, |
| 755 | 755 | { 0x10, "MSVLD", NULL, NVKM_ENGINE_MSVLD }, |
| 756 | 756 | { 0x11, "MSPPP", NULL, NVKM_ENGINE_MSPPP }, |
| @@ -32,14 +32,14 @@ gm107_fifo_fault_engine[] = { · 31 unmodified lines | ||
| 32 | 32 | { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR }, |
| 33 | 33 | { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM }, |
| 34 | 34 | { 0x06, "SCHED" }, |
| 35 | − { 0x07, "HOST0" }, | |
| 36 | − { 0x08, "HOST1" }, | |
| 37 | − { 0x09, "HOST2" }, | |
| 38 | − { 0x0a, "HOST3" }, | |
| 39 | − { 0x0b, "HOST4" }, | |
| 40 | − { 0x0c, "HOST5" }, | |
| 41 | − { 0x0d, "HOST6" }, | |
| 42 | − { 0x0e, "HOST7" }, | |
| 35 | + { 0x07, "HOST0", NULL, NVKM_ENGINE_FIFO }, | |
| 36 | + { 0x08, "HOST1", NULL, NVKM_ENGINE_FIFO }, | |
| 37 | + { 0x09, "HOST2", NULL, NVKM_ENGINE_FIFO }, | |
| 38 | + { 0x0a, "HOST3", NULL, NVKM_ENGINE_FIFO }, | |
| 39 | + { 0x0b, "HOST4", NULL, NVKM_ENGINE_FIFO }, | |
| 40 | + { 0x0c, "HOST5", NULL, NVKM_ENGINE_FIFO }, | |
| 41 | + { 0x0d, "HOST6", NULL, NVKM_ENGINE_FIFO }, | |
| 42 | + { 0x0e, "HOST7", NULL, NVKM_ENGINE_FIFO }, | |
| 43 | 43 | { 0x0f, "HOSTSR" }, |
| 44 | 44 | { 0x13, "PERF" }, |
| 45 | 45 | { 0x17, "PMU" }, |
| @@ -30,17 +30,17 @@ gp100_fifo_fault_engine[] = { · 29 unmodified lines | ||
| 30 | 30 | { 0x03, "IFB", NULL, NVKM_ENGINE_IFB }, |
| 31 | 31 | { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR }, |
| 32 | 32 | { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM }, |
| 33 | − { 0x06, "HOST0" }, | |
| 34 | − { 0x07, "HOST1" }, | |
| 35 | − { 0x08, "HOST2" }, | |
| 36 | − { 0x09, "HOST3" }, | |
| 37 | − { 0x0a, "HOST4" }, | |
| 38 | − { 0x0b, "HOST5" }, | |
| 39 | − { 0x0c, "HOST6" }, | |
| 40 | − { 0x0d, "HOST7" }, | |
| 41 | − { 0x0e, "HOST8" }, | |
| 42 | − { 0x0f, "HOST9" }, | |
| 43 | − { 0x10, "HOST10" }, | |
| 33 | + { 0x06, "HOST0", NULL, NVKM_ENGINE_FIFO }, | |
| 34 | + { 0x07, "HOST1", NULL, NVKM_ENGINE_FIFO }, | |
| 35 | + { 0x08, "HOST2", NULL, NVKM_ENGINE_FIFO }, | |
| 36 | + { 0x09, "HOST3", NULL, NVKM_ENGINE_FIFO }, | |
| 37 | + { 0x0a, "HOST4", NULL, NVKM_ENGINE_FIFO }, | |
| 38 | + { 0x0b, "HOST5", NULL, NVKM_ENGINE_FIFO }, | |
| 39 | + { 0x0c, "HOST6", NULL, NVKM_ENGINE_FIFO }, | |
| 40 | + { 0x0d, "HOST7", NULL, NVKM_ENGINE_FIFO }, | |
| 41 | + { 0x0e, "HOST8", NULL, NVKM_ENGINE_FIFO }, | |
| 42 | + { 0x0f, "HOST9", NULL, NVKM_ENGINE_FIFO }, | |
| 43 | + { 0x10, "HOST10", NULL, NVKM_ENGINE_FIFO }, | |
| 44 | 44 | { 0x13, "PERF" }, |
| 45 | 45 | { 0x17, "PMU" }, |
| 46 | 46 | { 0x18, "PTP" }, |
| @@ -1041,6 +1041,13 @@ gf100_gr_trap_tpc(struct gf100_gr *gr, int gpc, int tpc) · 1040 unmodified lines | ||
| 1041 | 1041 | stat &= ~0x00000008; |
| 1042 | 1042 | } |
| 1043 | 1043 | |
| 1044 | + if (stat & 0x00000010) { | |
| 1045 | + u32 trap = nvkm_rd32(device, TPC_UNIT(gpc, tpc, 0x0430)); | |
| 1046 | + nvkm_error(subdev, "GPC%d/TPC%d/MPC: %08x\n", gpc, tpc, trap); | |
| 1047 | + nvkm_wr32(device, TPC_UNIT(gpc, tpc, 0x0430), 0xc0000000); | |
| 1048 | + stat &= ~0x00000010; | |
| 1049 | + } | |
| 1050 | + | |
| 1044 | 1051 | if (stat) { |
| 1045 | 1052 | nvkm_error(subdev, "GPC%d/TPC%d/%08x: unknown\n", gpc, tpc, stat); |
| 1046 | 1053 | } |
| @@ -1258,7 +1265,7 @@ gf100_gr_ctxctl_isr(struct gf100_gr *gr) · 211 unmodified lines | ||
| 1258 | 1265 | struct nvkm_device *device = subdev->device; |
| 1259 | 1266 | u32 stat = nvkm_rd32(device, 0x409c18); |
| 1260 | 1267 | |
| 1261 | − if (stat & 0x00000001) { | |
| 1268 | + if (!gr->firmware && (stat & 0x00000001)) { | |
| 1262 | 1269 | u32 code = nvkm_rd32(device, 0x409814); |
| 1263 | 1270 | if (code == E_BAD_FWMTHD) { |
| 1264 | 1271 | u32 class = nvkm_rd32(device, 0x409808); |
| @@ -1270,15 +1277,14 @@ gf100_gr_ctxctl_isr(struct gf100_gr *gr) · 5 unmodified lines | ||
| 1270 | 1277 | nvkm_error(subdev, "FECS MTHD subc %d class %04x " |
| 1271 | 1278 | "mthd %04x data %08x\n", |
| 1272 | 1279 | subc, class, mthd, data); |
| 1273 | − | |
| 1274 | − nvkm_wr32(device, 0x409c20, 0x00000001); | |
| 1275 | − stat &= ~0x00000001; | |
| 1276 | 1280 | } else { |
| 1277 | 1281 | nvkm_error(subdev, "FECS ucode error %d\n", code); |
| 1278 | 1282 | } |
| 1283 | + nvkm_wr32(device, 0x409c20, 0x00000001); | |
| 1284 | + stat &= ~0x00000001; | |
| 1279 | 1285 | } |
| 1280 | 1286 | |
| 1281 | − if (stat & 0x00080000) { | |
| 1287 | + if (!gr->firmware && (stat & 0x00080000)) { | |
| 1282 | 1288 | nvkm_error(subdev, "FECS watchdog timeout\n"); |
| 1283 | 1289 | gf100_gr_ctxctl_debug(gr); |
| 1284 | 1290 | nvkm_wr32(device, 0x409c20, 0x00080000); |
| @@ -207,8 +207,11 @@ nvbios_dpcfg_match(struct nvkm_bios *bios, u16 outp, u8 pc, u8 vs, u8 pe, · 206 unmodified lines | ||
| 207 | 207 | if (*ver >= 0x30) { |
| 208 | 208 | const u8 vsoff[] = { 0, 4, 7, 9 }; |
| 209 | 209 | idx = (pc * 10) + vsoff[vs] + pe; |
| 210 | − if (*ver >= 0x40 && *hdr >= 0x12) | |
| 210 | + if (*ver >= 0x40 && *ver <= 0x41 && *hdr >= 0x12) | |
| 211 | 211 | idx += nvbios_rd08(bios, outp + 0x11) * 40; |
| 212 | + else | |
| 213 | + if (*ver >= 0x42) | |
| 214 | + idx += nvbios_rd08(bios, outp + 0x11) * 10; | |
| 212 | 215 | } else { |
| 213 | 216 | while ((data = nvbios_dpcfg_entry(bios, outp, ++idx, |
| 214 | 217 | ver, hdr, cnt, len))) { |
| @@ -47,8 +47,10 @@ nvkm_ltc_tags_clear(struct nvkm_ltc *ltc, u32 first, u32 count) · 46 unmodified lines | ||
| 47 | 47 | |
| 48 | 48 | BUG_ON((first > limit) || (limit >= ltc->num_tags)); |
| 49 | 49 | |
| 50 | + mutex_lock(<c->subdev.mutex); | |
| 50 | 51 | ltc->func->cbc_clear(ltc, first, limit); |
| 51 | 52 | ltc->func->cbc_wait(ltc); |
| 53 | + mutex_unlock(<c->subdev.mutex); | |
| 52 | 54 | } |
| 53 | 55 | |
| 54 | 56 | int |