History

Merge branch 'linux-4.10' of git://github.com/skeggsb/linux into drm-next

- 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

Dave Airlie committed 9 years ago

Commit 2cf026a2 parents a77a1ad 19d53d014 files · +171 −38Browse files

Unified · Split

14 files
  1. drivers/gpu/drm/nouveau/nouveau_backlight.c +76 −4
  2. drivers/gpu/drm/nouveau/nouveau_bo.c +1 −0
  3. drivers/gpu/drm/nouveau/nouveau_display.h +10 −0
  4. drivers/gpu/drm/nouveau/nouveau_drm.c +2 −0
  5. drivers/gpu/drm/nouveau/nouveau_drv.h +1 −0
  6. drivers/gpu/drm/nouveau/nv50_display.c +5 −0
  7. drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +30 −0
  8. drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c +2 −1
  9. drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +8 −8
  10. drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c +8 −8
  11. drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c +11 −11
  12. drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +11 −5
  13. drivers/gpu/drm/nouveau/nvkm/subdev/bios/dp.c +4 −1
  14. drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c +2 −0
drivers/gpu/drm/nouveau/nouveau_backlight.c+76−4
@@ -30,12 +30,37 @@ · 29 unmodified lines
30 * Register locations derived from NVClock by Roderick Colenbrander30 * Register locations derived from NVClock by Roderick Colenbrander
31 */31 */
32 32
33#include <linux/apple-gmux.h>
33#include <linux/backlight.h>34#include <linux/backlight.h>
35#include <linux/idr.h>
34 36
35#include "nouveau_drv.h"37#include "nouveau_drv.h"
36#include "nouveau_reg.h"38#include "nouveau_reg.h"
37#include "nouveau_encoder.h"39#include "nouveau_encoder.h"
38 40
41static struct ida bl_ida;
42#define BL_NAME_SIZE 15 // 12 for name + 2 for digits + 1 for '\0'
43
44struct backlight_connector {
45 struct list_head head;
46 int id;
47};
48
49static bool
50nouveau_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
39static int64static int
40nv40_get_intensity(struct backlight_device *bd)65nv40_get_intensity(struct backlight_device *bd)
41{66{
@@ -74,6 +99,8 @@ nv40_backlight_init(struct drm_connector *connector) · 32 unmodified lines
74 struct nvif_object *device = &drm->device.object;99 struct nvif_object *device = &drm->device.object;
75 struct backlight_properties props;100 struct backlight_properties props;
76 struct backlight_device *bd;101 struct backlight_device *bd;
102 struct backlight_connector bl_connector;
103 char backlight_name[BL_NAME_SIZE];
77 104
78 if (!(nvif_rd32(device, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK))105 if (!(nvif_rd32(device, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK))
79 return 0;106 return 0;
@@ -81,10 +108,19 @@ nv40_backlight_init(struct drm_connector *connector) · 1 unmodified line
81 memset(&props, 0, sizeof(struct backlight_properties));108 memset(&props, 0, sizeof(struct backlight_properties));
82 props.type = BACKLIGHT_RAW;109 props.type = BACKLIGHT_RAW;
83 props.max_brightness = 31;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 &nv40_bl_ops, &props);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 return PTR_ERR(bd);121 return PTR_ERR(bd);
122 }
123 list_add(&bl_connector.head, &drm->bl_connectors);
88 drm->backlight = bd;124 drm->backlight = bd;
89 bd->props.brightness = nv40_get_intensity(bd);125 bd->props.brightness = nv40_get_intensity(bd);
90 backlight_update_status(bd);126 backlight_update_status(bd);
@@ -182,6 +218,8 @@ nv50_backlight_init(struct drm_connector *connector) · 91 unmodified lines
182 struct backlight_properties props;218 struct backlight_properties props;
183 struct backlight_device *bd;219 struct backlight_device *bd;
184 const struct backlight_ops *ops;220 const struct backlight_ops *ops;
221 struct backlight_connector bl_connector;
222 char backlight_name[BL_NAME_SIZE];
185 223
186 nv_encoder = find_encoder(connector, DCB_OUTPUT_LVDS);224 nv_encoder = find_encoder(connector, DCB_OUTPUT_LVDS);
187 if (!nv_encoder) {225 if (!nv_encoder) {
@@ -203,11 +241,20 @@ nv50_backlight_init(struct drm_connector *connector) · 15 unmodified lines
203 memset(&props, 0, sizeof(struct backlight_properties));241 memset(&props, 0, sizeof(struct backlight_properties));
204 props.type = BACKLIGHT_RAW;242 props.type = BACKLIGHT_RAW;
205 props.max_brightness = 100;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 nv_encoder, ops, &props);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 return PTR_ERR(bd);254 return PTR_ERR(bd);
255 }
210 256
257 list_add(&bl_connector.head, &drm->bl_connectors);
211 drm->backlight = bd;258 drm->backlight = bd;
212 bd->props.brightness = bd->ops->get_brightness(bd);259 bd->props.brightness = bd->ops->get_brightness(bd);
213 backlight_update_status(bd);260 backlight_update_status(bd);
@@ -221,6 +268,13 @@ nouveau_backlight_init(struct drm_device *dev) · 7 unmodified lines
221 struct nvif_device *device = &drm->device;268 struct nvif_device *device = &drm->device;
222 struct drm_connector *connector;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 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {278 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
225 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&279 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
226 connector->connector_type != DRM_MODE_CONNECTOR_eDP)280 connector->connector_type != DRM_MODE_CONNECTOR_eDP)
@@ -247,9 +301,27 @@ void · 20 unmodified lines
247nouveau_backlight_exit(struct drm_device *dev)301nouveau_backlight_exit(struct drm_device *dev)
248{302{
249 struct nouveau_drm *drm = nouveau_drm(dev);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 if (drm->backlight) {311 if (drm->backlight) {
252 backlight_device_unregister(drm->backlight);312 backlight_device_unregister(drm->backlight);
253 drm->backlight = NULL;313 drm->backlight = NULL;
254 }314 }
255}315}
316
317void
318nouveau_backlight_ctor(void)
319{
320 ida_init(&bl_ida);
321}
322
323void
324nouveau_backlight_dtor(void)
325{
326 ida_destroy(&bl_ida);
327}
drivers/gpu/drm/nouveau/nouveau_bo.c+1−0
@@ -1209,6 +1209,7 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) · 1208 unmodified lines
1209 nvbo->page_shift != vma->vm->mmu->lpg_shift)) {1209 nvbo->page_shift != vma->vm->mmu->lpg_shift)) {
1210 nvkm_vm_map(vma, new_mem->mm_node);1210 nvkm_vm_map(vma, new_mem->mm_node);
1211 } else {1211 } else {
1212 WARN_ON(ttm_bo_wait(bo, false, false));
1212 nvkm_vm_unmap(vma);1213 nvkm_vm_unmap(vma);
1213 }1214 }
1214 }1215 }
drivers/gpu/drm/nouveau/nouveau_display.h+10−0
@@ -91,6 +91,8 @@ int nouveau_crtc_set_config(struct drm_mode_set *set); · 90 unmodified lines
91#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT91#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT
92extern int nouveau_backlight_init(struct drm_device *);92extern int nouveau_backlight_init(struct drm_device *);
93extern void nouveau_backlight_exit(struct drm_device *);93extern void nouveau_backlight_exit(struct drm_device *);
94extern void nouveau_backlight_ctor(void);
95extern void nouveau_backlight_dtor(void);
94#else96#else
95static inline int97static inline int
96nouveau_backlight_init(struct drm_device *dev)98nouveau_backlight_init(struct drm_device *dev)
@@ -101,6 +103,14 @@ nouveau_backlight_init(struct drm_device *dev) · 4 unmodified lines
101static inline void103static inline void
102nouveau_backlight_exit(struct drm_device *dev) {104nouveau_backlight_exit(struct drm_device *dev) {
103}105}
106
107static inline void
108nouveau_backlight_ctor(void) {
109}
110
111static inline void
112nouveau_backlight_dtor(void) {
113}
104#endif114#endif
105 115
106struct drm_framebuffer *116struct drm_framebuffer *
drivers/gpu/drm/nouveau/nouveau_drm.c+2−0
@@ -1122,6 +1122,7 @@ nouveau_drm_init(void) · 1121 unmodified lines
1122#endif1122#endif
1123 1123
1124 nouveau_register_dsm_handler();1124 nouveau_register_dsm_handler();
1125 nouveau_backlight_ctor();
1125 return drm_pci_init(&driver_pci, &nouveau_drm_pci_driver);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 return;1133 return;
1133 1134
1134 drm_pci_exit(&driver_pci, &nouveau_drm_pci_driver);1135 drm_pci_exit(&driver_pci, &nouveau_drm_pci_driver);
1136 nouveau_backlight_dtor();
1135 nouveau_unregister_dsm_handler();1137 nouveau_unregister_dsm_handler();
1136 1138
1137#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER1139#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
drivers/gpu/drm/nouveau/nouveau_drv.h+1−0
@@ -163,6 +163,7 @@ struct nouveau_drm { · 162 unmodified lines
163 struct nvbios vbios;163 struct nvbios vbios;
164 struct nouveau_display *display;164 struct nouveau_display *display;
165 struct backlight_device *backlight;165 struct backlight_device *backlight;
166 struct list_head bl_connectors;
166 struct work_struct hpd_work;167 struct work_struct hpd_work;
167#ifdef CONFIG_ACPI168#ifdef CONFIG_ACPI
168 struct notifier_block acpi_nb;169 struct notifier_block acpi_nb;
drivers/gpu/drm/nouveau/nv50_display.c+5−0
@@ -1726,6 +1726,11 @@ nv50_head_core_set(struct nv50_head *head, struct nv50_head_atom *asyh) · 1725 unmodified lines
1726 evo_data(push, asyh->core.handle);1726 evo_data(push, asyh->core.handle);
1727 evo_mthd(push, 0x08c0 + head->base.index * 0x400, 1);1727 evo_mthd(push, 0x08c0 + head->base.index * 0x400, 1);
1728 evo_data(push, (asyh->core.y << 16) | asyh->core.x);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 } else1734 } else
1730 if (core->base.user.oclass < GF110_DISP_CORE_CHANNEL_DMA) {1735 if (core->base.user.oclass < GF110_DISP_CORE_CHANNEL_DMA) {
1731 evo_mthd(push, 0x0860 + head->base.index * 0x400, 1);1736 evo_mthd(push, 0x0860 + head->base.index * 0x400, 1);
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c+30−0
@@ -2241,6 +2241,35 @@ nv134_chipset = { · 2240 unmodified lines
2241 .fifo = gp100_fifo_new,2241 .fifo = gp100_fifo_new,
2242};2242};
2243 2243
2244static const struct nvkm_device_chip
2245nv136_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
2244static int2273static int
2245nvkm_device_event_ctor(struct nvkm_object *object, void *data, u32 size,2274nvkm_device_event_ctor(struct nvkm_object *object, void *data, u32 size,
2246 struct nvkm_notify *notify)2275 struct nvkm_notify *notify)
@@ -2677,6 +2706,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func, · 430 unmodified lines
2677 case 0x130: device->chip = &nv130_chipset; break;2706 case 0x130: device->chip = &nv130_chipset; break;
2678 case 0x132: device->chip = &nv132_chipset; break;2707 case 0x132: device->chip = &nv132_chipset; break;
2679 case 0x134: device->chip = &nv134_chipset; break;2708 case 0x134: device->chip = &nv134_chipset; break;
2709 case 0x136: device->chip = &nv136_chipset; break;
2680 default:2710 default:
2681 nvdev_error(device, "unknown chipset (%08x)\n", boot0);2711 nvdev_error(device, "unknown chipset (%08x)\n", boot0);
2682 goto done;2712 goto done;
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c+2−1
@@ -180,7 +180,8 @@ gf100_fifo_recover(struct gf100_fifo *fifo, struct nvkm_engine *engine, · 179 unmodified lines
180 list_del_init(&chan->head);180 list_del_init(&chan->head);
181 chan->killed = true;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 schedule_work(&fifo->recover.work);185 schedule_work(&fifo->recover.work);
185}186}
186 187
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c+8−8
@@ -743,14 +743,14 @@ gk104_fifo_fault_engine[] = { · 742 unmodified lines
743 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },743 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
744 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },744 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
745 { 0x06, "SCHED" },745 { 0x06, "SCHED" },
746 { 0x07, "HOST0" },746 { 0x07, "HOST0", NULL, NVKM_ENGINE_FIFO },
747 { 0x08, "HOST1" },747 { 0x08, "HOST1", NULL, NVKM_ENGINE_FIFO },
748 { 0x09, "HOST2" },748 { 0x09, "HOST2", NULL, NVKM_ENGINE_FIFO },
749 { 0x0a, "HOST3" },749 { 0x0a, "HOST3", NULL, NVKM_ENGINE_FIFO },
750 { 0x0b, "HOST4" },750 { 0x0b, "HOST4", NULL, NVKM_ENGINE_FIFO },
751 { 0x0c, "HOST5" },751 { 0x0c, "HOST5", NULL, NVKM_ENGINE_FIFO },
752 { 0x0d, "HOST6" },752 { 0x0d, "HOST6", NULL, NVKM_ENGINE_FIFO },
753 { 0x0e, "HOST7" },753 { 0x0e, "HOST7", NULL, NVKM_ENGINE_FIFO },
754 { 0x0f, "HOSTSR" },754 { 0x0f, "HOSTSR" },
755 { 0x10, "MSVLD", NULL, NVKM_ENGINE_MSVLD },755 { 0x10, "MSVLD", NULL, NVKM_ENGINE_MSVLD },
756 { 0x11, "MSPPP", NULL, NVKM_ENGINE_MSPPP },756 { 0x11, "MSPPP", NULL, NVKM_ENGINE_MSPPP },
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c+8−8
@@ -32,14 +32,14 @@ gm107_fifo_fault_engine[] = { · 31 unmodified lines
32 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },32 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
33 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },33 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
34 { 0x06, "SCHED" },34 { 0x06, "SCHED" },
35 { 0x07, "HOST0" },35 { 0x07, "HOST0", NULL, NVKM_ENGINE_FIFO },
36 { 0x08, "HOST1" },36 { 0x08, "HOST1", NULL, NVKM_ENGINE_FIFO },
37 { 0x09, "HOST2" },37 { 0x09, "HOST2", NULL, NVKM_ENGINE_FIFO },
38 { 0x0a, "HOST3" },38 { 0x0a, "HOST3", NULL, NVKM_ENGINE_FIFO },
39 { 0x0b, "HOST4" },39 { 0x0b, "HOST4", NULL, NVKM_ENGINE_FIFO },
40 { 0x0c, "HOST5" },40 { 0x0c, "HOST5", NULL, NVKM_ENGINE_FIFO },
41 { 0x0d, "HOST6" },41 { 0x0d, "HOST6", NULL, NVKM_ENGINE_FIFO },
42 { 0x0e, "HOST7" },42 { 0x0e, "HOST7", NULL, NVKM_ENGINE_FIFO },
43 { 0x0f, "HOSTSR" },43 { 0x0f, "HOSTSR" },
44 { 0x13, "PERF" },44 { 0x13, "PERF" },
45 { 0x17, "PMU" },45 { 0x17, "PMU" },
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c+11−11
@@ -30,17 +30,17 @@ gp100_fifo_fault_engine[] = { · 29 unmodified lines
30 { 0x03, "IFB", NULL, NVKM_ENGINE_IFB },30 { 0x03, "IFB", NULL, NVKM_ENGINE_IFB },
31 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },31 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
32 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },32 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
33 { 0x06, "HOST0" },33 { 0x06, "HOST0", NULL, NVKM_ENGINE_FIFO },
34 { 0x07, "HOST1" },34 { 0x07, "HOST1", NULL, NVKM_ENGINE_FIFO },
35 { 0x08, "HOST2" },35 { 0x08, "HOST2", NULL, NVKM_ENGINE_FIFO },
36 { 0x09, "HOST3" },36 { 0x09, "HOST3", NULL, NVKM_ENGINE_FIFO },
37 { 0x0a, "HOST4" },37 { 0x0a, "HOST4", NULL, NVKM_ENGINE_FIFO },
38 { 0x0b, "HOST5" },38 { 0x0b, "HOST5", NULL, NVKM_ENGINE_FIFO },
39 { 0x0c, "HOST6" },39 { 0x0c, "HOST6", NULL, NVKM_ENGINE_FIFO },
40 { 0x0d, "HOST7" },40 { 0x0d, "HOST7", NULL, NVKM_ENGINE_FIFO },
41 { 0x0e, "HOST8" },41 { 0x0e, "HOST8", NULL, NVKM_ENGINE_FIFO },
42 { 0x0f, "HOST9" },42 { 0x0f, "HOST9", NULL, NVKM_ENGINE_FIFO },
43 { 0x10, "HOST10" },43 { 0x10, "HOST10", NULL, NVKM_ENGINE_FIFO },
44 { 0x13, "PERF" },44 { 0x13, "PERF" },
45 { 0x17, "PMU" },45 { 0x17, "PMU" },
46 { 0x18, "PTP" },46 { 0x18, "PTP" },
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c+11−5
@@ -1041,6 +1041,13 @@ gf100_gr_trap_tpc(struct gf100_gr *gr, int gpc, int tpc) · 1040 unmodified lines
1041 stat &= ~0x00000008;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 if (stat) {1051 if (stat) {
1045 nvkm_error(subdev, "GPC%d/TPC%d/%08x: unknown\n", gpc, tpc, stat);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 struct nvkm_device *device = subdev->device;1265 struct nvkm_device *device = subdev->device;
1259 u32 stat = nvkm_rd32(device, 0x409c18);1266 u32 stat = nvkm_rd32(device, 0x409c18);
1260 1267
1261 if (stat & 0x00000001) {1268 if (!gr->firmware && (stat & 0x00000001)) {
1262 u32 code = nvkm_rd32(device, 0x409814);1269 u32 code = nvkm_rd32(device, 0x409814);
1263 if (code == E_BAD_FWMTHD) {1270 if (code == E_BAD_FWMTHD) {
1264 u32 class = nvkm_rd32(device, 0x409808);1271 u32 class = nvkm_rd32(device, 0x409808);
@@ -1270,15 +1277,14 @@ gf100_gr_ctxctl_isr(struct gf100_gr *gr) · 5 unmodified lines
1270 nvkm_error(subdev, "FECS MTHD subc %d class %04x "1277 nvkm_error(subdev, "FECS MTHD subc %d class %04x "
1271 "mthd %04x data %08x\n",1278 "mthd %04x data %08x\n",
1272 subc, class, mthd, data);1279 subc, class, mthd, data);
1273
1274 nvkm_wr32(device, 0x409c20, 0x00000001);
1275 stat &= ~0x00000001;
1276 } else {1280 } else {
1277 nvkm_error(subdev, "FECS ucode error %d\n", code);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 nvkm_error(subdev, "FECS watchdog timeout\n");1288 nvkm_error(subdev, "FECS watchdog timeout\n");
1283 gf100_gr_ctxctl_debug(gr);1289 gf100_gr_ctxctl_debug(gr);
1284 nvkm_wr32(device, 0x409c20, 0x00080000);1290 nvkm_wr32(device, 0x409c20, 0x00080000);
drivers/gpu/drm/nouveau/nvkm/subdev/bios/dp.c+4−1
@@ -207,8 +207,11 @@ nvbios_dpcfg_match(struct nvkm_bios *bios, u16 outp, u8 pc, u8 vs, u8 pe, · 206 unmodified lines
207 if (*ver >= 0x30) {207 if (*ver >= 0x30) {
208 const u8 vsoff[] = { 0, 4, 7, 9 };208 const u8 vsoff[] = { 0, 4, 7, 9 };
209 idx = (pc * 10) + vsoff[vs] + pe;209 idx = (pc * 10) + vsoff[vs] + pe;
210 if (*ver >= 0x40 && *hdr >= 0x12)210 if (*ver >= 0x40 && *ver <= 0x41 && *hdr >= 0x12)
211 idx += nvbios_rd08(bios, outp + 0x11) * 40;211 idx += nvbios_rd08(bios, outp + 0x11) * 40;
212 else
213 if (*ver >= 0x42)
214 idx += nvbios_rd08(bios, outp + 0x11) * 10;
212 } else {215 } else {
213 while ((data = nvbios_dpcfg_entry(bios, outp, ++idx,216 while ((data = nvbios_dpcfg_entry(bios, outp, ++idx,
214 ver, hdr, cnt, len))) {217 ver, hdr, cnt, len))) {
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c+2−0
@@ -47,8 +47,10 @@ nvkm_ltc_tags_clear(struct nvkm_ltc *ltc, u32 first, u32 count) · 46 unmodified lines
47 47
48 BUG_ON((first > limit) || (limit >= ltc->num_tags));48 BUG_ON((first > limit) || (limit >= ltc->num_tags));
49 49
50 mutex_lock(&ltc->subdev.mutex);
50 ltc->func->cbc_clear(ltc, first, limit);51 ltc->func->cbc_clear(ltc, first, limit);
51 ltc->func->cbc_wait(ltc);52 ltc->func->cbc_wait(ltc);
53 mutex_unlock(&ltc->subdev.mutex);
52}54}
53 55
54int56int

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t