aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-11-02 19:17:08 -0400
committerDave Airlie <airlied@redhat.com>2017-11-02 19:17:08 -0400
commitbf6eb600e5b835a96d676b2b9df603362a1e714c (patch)
tree4d3b9c7e2bfcee6bfec7150f96a31622893a37b0
parent9ad472e337f830118bb589f756d2759f642228bb (diff)
parentd34ded7ece57782e75bf31bb145836b9f280750f (diff)
Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-next
nouveau next fixes. Fixes arm32 build. * 'linux-4.15' of git://github.com/skeggsb/linux: drm/nouveau/bios/timing: mark expected switch fall-throughs drm/nouveau/devinit/nv04: mark expected switch fall-throughs drm/nouveau/bios: make const arrays hwsq_signature and edid_sig static drm/nouveau/core/memory: fix missing mutex unlock drm/nouveau/mmu: swap out round for ALIGN
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bios.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/memory.c1
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c5
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c12
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c4
5 files changed, 16 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index c4ef3a0a737e..66bf2aff4a3e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -1968,7 +1968,7 @@ static int load_nv17_hw_sequencer_ucode(struct drm_device *dev,
1968 * The microcode entries are found by the "HWSQ" signature. 1968 * The microcode entries are found by the "HWSQ" signature.
1969 */ 1969 */
1970 1970
1971 const uint8_t hwsq_signature[] = { 'H', 'W', 'S', 'Q' }; 1971 static const uint8_t hwsq_signature[] = { 'H', 'W', 'S', 'Q' };
1972 const int sz = sizeof(hwsq_signature); 1972 const int sz = sizeof(hwsq_signature);
1973 int hwsq_offset; 1973 int hwsq_offset;
1974 1974
@@ -1984,7 +1984,7 @@ uint8_t *nouveau_bios_embedded_edid(struct drm_device *dev)
1984{ 1984{
1985 struct nouveau_drm *drm = nouveau_drm(dev); 1985 struct nouveau_drm *drm = nouveau_drm(dev);
1986 struct nvbios *bios = &drm->vbios; 1986 struct nvbios *bios = &drm->vbios;
1987 const uint8_t edid_sig[] = { 1987 static const uint8_t edid_sig[] = {
1988 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }; 1988 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 };
1989 uint16_t offset = 0; 1989 uint16_t offset = 0;
1990 uint16_t newoffset; 1990 uint16_t newoffset;
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/memory.c b/drivers/gpu/drm/nouveau/nvkm/core/memory.c
index 29f4b4070b55..e85a08ecd9da 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/memory.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/memory.c
@@ -64,6 +64,7 @@ nvkm_memory_tags_get(struct nvkm_memory *memory, struct nvkm_device *device,
64 } 64 }
65 65
66 refcount_inc(&tags->refcount); 66 refcount_inc(&tags->refcount);
67 mutex_unlock(&fb->subdev.mutex);
67 *ptags = tags; 68 *ptags = tags;
68 return 0; 69 return 0;
69 } 70 }
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c
index 7e83c3985020..20ff5173cf8f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c
@@ -115,16 +115,21 @@ nvbios_timingEp(struct nvkm_bios *bios, int idx,
115 switch (min_t(u8, *hdr, 25)) { 115 switch (min_t(u8, *hdr, 25)) {
116 case 25: 116 case 25:
117 p->timing_10_24 = nvbios_rd08(bios, data + 0x18); 117 p->timing_10_24 = nvbios_rd08(bios, data + 0x18);
118 /* fall through */
118 case 24: 119 case 24:
119 case 23: 120 case 23:
120 case 22: 121 case 22:
121 p->timing_10_21 = nvbios_rd08(bios, data + 0x15); 122 p->timing_10_21 = nvbios_rd08(bios, data + 0x15);
123 /* fall through */
122 case 21: 124 case 21:
123 p->timing_10_20 = nvbios_rd08(bios, data + 0x14); 125 p->timing_10_20 = nvbios_rd08(bios, data + 0x14);
126 /* fall through */
124 case 20: 127 case 20:
125 p->timing_10_CWL = nvbios_rd08(bios, data + 0x13); 128 p->timing_10_CWL = nvbios_rd08(bios, data + 0x13);
129 /* fall through */
126 case 19: 130 case 19:
127 p->timing_10_18 = nvbios_rd08(bios, data + 0x12); 131 p->timing_10_18 = nvbios_rd08(bios, data + 0x12);
132 /* fall through */
128 case 18: 133 case 18:
129 case 17: 134 case 17:
130 p->timing_10_16 = nvbios_rd08(bios, data + 0x10); 135 p->timing_10_16 = nvbios_rd08(bios, data + 0x10);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
index 158977f8a6e6..c3dae05348eb 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
@@ -119,11 +119,11 @@ powerctrl_1_shift(int chip_version, int reg)
119 119
120 switch (reg) { 120 switch (reg) {
121 case 0x680520: 121 case 0x680520:
122 shift += 4; 122 shift += 4; /* fall through */
123 case 0x680508: 123 case 0x680508:
124 shift += 4; 124 shift += 4; /* fall through */
125 case 0x680504: 125 case 0x680504:
126 shift += 4; 126 shift += 4; /* fall through */
127 case 0x680500: 127 case 0x680500:
128 shift += 4; 128 shift += 4;
129 } 129 }
@@ -245,11 +245,11 @@ setPLL_double_highregs(struct nvkm_devinit *init, u32 reg1,
245 245
246 switch (reg1) { 246 switch (reg1) {
247 case 0x680504: 247 case 0x680504:
248 shift_c040 += 2; 248 shift_c040 += 2; /* fall through */
249 case 0x680500: 249 case 0x680500:
250 shift_c040 += 2; 250 shift_c040 += 2; /* fall through */
251 case 0x680520: 251 case 0x680520:
252 shift_c040 += 2; 252 shift_c040 += 2; /* fall through */
253 case 0x680508: 253 case 0x680508:
254 shift_c040 += 2; 254 shift_c040 += 2;
255 } 255 }
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
index 6446bc61b084..e35d3e17cd7c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
@@ -1349,12 +1349,12 @@ nvkm_vmm_get_locked(struct nvkm_vmm *vmm, bool getref, bool mapref, bool sparse,
1349 1349
1350 addr = this->addr; 1350 addr = this->addr;
1351 if (vmm->func->page_block && prev && prev->page != p) 1351 if (vmm->func->page_block && prev && prev->page != p)
1352 addr = roundup(addr, vmm->func->page_block); 1352 addr = ALIGN(addr, vmm->func->page_block);
1353 addr = ALIGN(addr, 1ULL << align); 1353 addr = ALIGN(addr, 1ULL << align);
1354 1354
1355 tail = this->addr + this->size; 1355 tail = this->addr + this->size;
1356 if (vmm->func->page_block && next && next->page != p) 1356 if (vmm->func->page_block && next && next->page != p)
1357 tail = rounddown(tail, vmm->func->page_block); 1357 tail = ALIGN_DOWN(addr, vmm->func->page_block);
1358 1358
1359 if (addr <= tail && tail - addr >= size) { 1359 if (addr <= tail && tail - addr >= size) {
1360 rb_erase(&this->tree, &vmm->free); 1360 rb_erase(&this->tree, &vmm->free);