Skip to content

Commit 4cf09f1

Browse files
committed
Merge tag 'drm-misc-fixes-2024-04-04' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
Short summary of fixes pull: display: - fix typos in kerneldoc nouveau: - uvmm: fix remap address calculation - minor cleanups panfrost: - fix power-transition timeouts prime: - unbreak dma-buf export for virt-gpu Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 39cd87c + fddf092 commit 4cf09f1

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

drivers/gpu/drm/display/drm_dp_dual_mode_helper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* @adapter: I2C adapter for the DDC bus
5353
* @offset: register offset
5454
* @buffer: buffer for return data
55-
* @size: sizo of the buffer
55+
* @size: size of the buffer
5656
*
5757
* Reads @size bytes from the DP dual mode adaptor registers
5858
* starting at @offset.
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(drm_dp_dual_mode_read);
116116
* @adapter: I2C adapter for the DDC bus
117117
* @offset: register offset
118118
* @buffer: buffer for write data
119-
* @size: sizo of the buffer
119+
* @size: size of the buffer
120120
*
121121
* Writes @size bytes to the DP dual mode adaptor registers
122122
* starting at @offset.

drivers/gpu/drm/drm_prime.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,12 @@ int drm_gem_map_attach(struct dma_buf *dma_buf,
582582
{
583583
struct drm_gem_object *obj = dma_buf->priv;
584584

585-
if (!obj->funcs->get_sg_table)
585+
/*
586+
* drm_gem_map_dma_buf() requires obj->get_sg_table(), but drivers
587+
* that implement their own ->map_dma_buf() do not.
588+
*/
589+
if (dma_buf->ops->map_dma_buf == drm_gem_map_dma_buf &&
590+
!obj->funcs->get_sg_table)
586591
return -ENOSYS;
587592

588593
return drm_gem_pin(obj);

drivers/gpu/drm/nouveau/nouveau_uvmm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,15 +812,15 @@ op_remap(struct drm_gpuva_op_remap *r,
812812
struct drm_gpuva_op_unmap *u = r->unmap;
813813
struct nouveau_uvma *uvma = uvma_from_va(u->va);
814814
u64 addr = uvma->va.va.addr;
815-
u64 range = uvma->va.va.range;
815+
u64 end = uvma->va.va.addr + uvma->va.va.range;
816816

817817
if (r->prev)
818818
addr = r->prev->va.addr + r->prev->va.range;
819819

820820
if (r->next)
821-
range = r->next->va.addr - addr;
821+
end = r->next->va.addr;
822822

823-
op_unmap_range(u, addr, range);
823+
op_unmap_range(u, addr, end - addr);
824824
}
825825

826826
static int

drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ gf100_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
420420
return ret;
421421
} else {
422422
ret = nvkm_memory_map(gr->attrib_cb, 0, chan->vmm, chan->attrib_cb,
423-
&args, sizeof(args));;
423+
&args, sizeof(args));
424424
if (ret)
425425
return ret;
426426
}

drivers/gpu/drm/panfrost/panfrost_gpu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,19 +441,19 @@ void panfrost_gpu_power_off(struct panfrost_device *pfdev)
441441

442442
gpu_write(pfdev, SHADER_PWROFF_LO, pfdev->features.shader_present);
443443
ret = readl_relaxed_poll_timeout(pfdev->iomem + SHADER_PWRTRANS_LO,
444-
val, !val, 1, 1000);
444+
val, !val, 1, 2000);
445445
if (ret)
446446
dev_err(pfdev->dev, "shader power transition timeout");
447447

448448
gpu_write(pfdev, TILER_PWROFF_LO, pfdev->features.tiler_present);
449449
ret = readl_relaxed_poll_timeout(pfdev->iomem + TILER_PWRTRANS_LO,
450-
val, !val, 1, 1000);
450+
val, !val, 1, 2000);
451451
if (ret)
452452
dev_err(pfdev->dev, "tiler power transition timeout");
453453

454454
gpu_write(pfdev, L2_PWROFF_LO, pfdev->features.l2_present);
455455
ret = readl_poll_timeout(pfdev->iomem + L2_PWRTRANS_LO,
456-
val, !val, 0, 1000);
456+
val, !val, 0, 2000);
457457
if (ret)
458458
dev_err(pfdev->dev, "l2 power transition timeout");
459459
}

0 commit comments

Comments
 (0)