Lyude Paul wrote a nice intro to vblank in the following mail:
https://lore.kernel.org/dri-devel/faf63d8a9ed23c16af69762f59d0dca6b2bf085f.…
Reading this I managed to spot a glimmer of hope that I one
day would understand some of the fuzz around vblank.
To let others benefit from the description I went ahead
and added the description to drm_vblank.c.
Lyude - I added a "Co-developed-by: ..."
Can I get your s-o-b on the patch, to document that
you are OK with this to go in.
When checking the …
[View More]output with "make htmldocs" I noticed
several drm related warnings.
I went ahead a fixed most of them resulting in a few extre patches.
There are some warnings in amdgpu land - I have left
them for the AMD people to figure out:
amdgpu_vm.c:92: warning: Function parameter or member 'vm' not described in 'amdgpu_vm_eviction_lock'
amdgpu_xgmi.c:1: warning: no structured comments found
amdgpu_ras.c:1: warning: no structured comments found
amdgpu_dm.h:305: warning: Function parameter or member 'hdcp_workqueue' not described in 'amdgpu_display_manager'
Sam
Sam Ravnborg (6):
drm/vblank: Add intro to documentation
drm/fb: fix kernel-doc in drm_framebuffer.h
drm/sched: fix kernel-doc in gpu_scheduler.h
drm: writeback: document callbacks
drm/dp_mst: add kernel-doc for drm_dp_mst_port.fec_capable
drm/bridge: fix kernel-doc warning in panel.c
drivers/gpu/drm/bridge/panel.c | 1 +
drivers/gpu/drm/drm_vblank.c | 15 +++++++++++++++
include/drm/drm_dp_mst_helper.h | 4 ++++
include/drm/drm_framebuffer.h | 4 ++--
include/drm/drm_modeset_helper_vtables.h | 31 +++++++++++++++++++++++++++++++
include/drm/gpu_scheduler.h | 1 +
6 files changed, 54 insertions(+), 2 deletions(-)
[View Less]
Scatterlist elements contains both pages and DMA addresses, but one
should not assume 1:1 relation between them. The sg->length is the size
of the physical memory chunk described by the sg->page, while
sg_dma_len(sg) is the size of the DMA (IO virtual) chunk described by
the sg_dma_address(sg).
The proper way of extracting both: pages and DMA addresses of the whole
buffer described by a scatterlist it to iterate independently over the
sg->pages/sg->length and sg_dma_address(sg)/…
[View More]sg_dma_len(sg) entries.
Fixes: 42e67b479eab ("drm/prime: use dma length macro when mapping sg")
Signed-off-by: Marek Szyprowski <m.szyprowski(a)samsung.com>
Reviewed-by: Alex Deucher <alexander.deucher(a)amd.com>
---
drivers/gpu/drm/drm_prime.c | 37 +++++++++++++++++++++++++------------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index 1de2cde2277c..282774e469ac 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -962,27 +962,40 @@ int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages,
unsigned count;
struct scatterlist *sg;
struct page *page;
- u32 len, index;
+ u32 page_len, page_index;
dma_addr_t addr;
+ u32 dma_len, dma_index;
- index = 0;
+ /*
+ * Scatterlist elements contains both pages and DMA addresses, but
+ * one shoud not assume 1:1 relation between them. The sg->length is
+ * the size of the physical memory chunk described by the sg->page,
+ * while sg_dma_len(sg) is the size of the DMA (IO virtual) chunk
+ * described by the sg_dma_address(sg).
+ */
+ page_index = 0;
+ dma_index = 0;
for_each_sg(sgt->sgl, sg, sgt->nents, count) {
- len = sg_dma_len(sg);
+ page_len = sg->length;
page = sg_page(sg);
+ dma_len = sg_dma_len(sg);
addr = sg_dma_address(sg);
- while (len > 0) {
- if (WARN_ON(index >= max_entries))
+ while (pages && page_len > 0) {
+ if (WARN_ON(page_index >= max_entries))
return -1;
- if (pages)
- pages[index] = page;
- if (addrs)
- addrs[index] = addr;
-
+ pages[page_index] = page;
page++;
+ page_len -= PAGE_SIZE;
+ page_index++;
+ }
+ while (addrs && dma_len > 0) {
+ if (WARN_ON(dma_index >= max_entries))
+ return -1;
+ addrs[dma_index] = addr;
addr += PAGE_SIZE;
- len -= PAGE_SIZE;
- index++;
+ dma_len -= PAGE_SIZE;
+ dma_index++;
}
}
return 0;
--
2.17.1
[View Less]
Changes since v3:
- refine drive-strength-microamp as from 3000 to 6000.
Changes since v2:
- fix the title of commit message.
- rename mipitx-current-drive to drive-strength-microamp
Changes since v1:
- fix coding style.
- change mtk_mipi_tx_config_calibration_data() to void
Jitao Shi (4):
dt-bindings: display: mediatek: add property to control mipi tx drive
current
dt-bindings: display: mediatek: get mipitx calibration data from nvmem
drm/mediatek: add the mipitx driving …
[View More]control
drm/mediatek: config mipitx impedance with calibration data
.../display/mediatek/mediatek,dsi.txt | 10 +++
drivers/gpu/drm/mediatek/mtk_mipi_tx.c | 14 ++++
drivers/gpu/drm/mediatek/mtk_mipi_tx.h | 1 +
drivers/gpu/drm/mediatek/mtk_mt8183_mipi_tx.c | 64 +++++++++++++++++++
4 files changed, 89 insertions(+)
--
2.21.0
[View Less]
Please see the bisection report below about a boot failure.
Reports aren't automatically sent to the public while we're
trialing new bisection features on kernelci.org but this one
looks valid.
This bisection was run with exynos_defconfig but the issue can
also be reproduced with multi_v7_defconfig. It doesn't appear to
be affecting any other platforms on kernelci.org. This looks
like a DRM driver problem, the kernel image boots fine without
the modules installed. It actually started …
[View More]failing on Tuesday in
mainline.
Guillaume
On 02/04/2020 19:38, kernelci.org bot wrote:
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This automated bisection report was sent to you on the basis *
> * that you may be involved with the breaking commit it has *
> * found. No manual investigation has been done to verify it, *
> * and the root cause of the problem may be somewhere else. *
> * *
> * If you do send a fix, please include this trailer: *
> * Reported-by: "kernelci.org bot" <bot(a)kernelci.org> *
> * *
> * Hope this helps! *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
> mainline/master bisection: baseline.login on peach-pi
>
> Summary:
> Start: 56a451b780676 Merge tag 'ntb-5.7' of git://github.com/jonmason/ntb
> Plain log: https://storage.kernelci.org//mainline/master/v5.6-3277-g56a451b78067/arm/e…
> HTML log: https://storage.kernelci.org//mainline/master/v5.6-3277-g56a451b78067/arm/e…
> Result: 42e67b479eab6 drm/prime: use dma length macro when mapping sg
>
> Checks:
> revert: PASS
> verify: PASS
>
> Parameters:
> Tree: mainline
> URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> Branch: master
> Target: peach-pi
> CPU arch: arm
> Lab: lab-collabora
> Compiler: gcc-8
> Config: exynos_defconfig
> Test case: baseline.login
>
> Breaking commit found:
>
> -------------------------------------------------------------------------------
> commit 42e67b479eab6d26459b80b4867298232b0435e7
> Author: Shane Francis <bigbeeshane(a)gmail.com>
> Date: Wed Mar 25 09:07:39 2020 +0000
>
> drm/prime: use dma length macro when mapping sg
>
> As dma_map_sg can reorganize scatter-gather lists in a
> way that can cause some later segments to be empty we should
> always use the sg_dma_len macro to fetch the actual length.
>
> This could now be 0 and not need to be mapped to a page or
> address array
>
> Fixes: be62dbf554c5 ("iommu/amd: Convert AMD iommu driver to the dma-iommu api")
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206461
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206895
> Bug: https://gitlab.freedesktop.org/drm/amd/issues/1056
> Signed-off-by: Shane Francis <bigbeeshane(a)gmail.com>
> Reviewed-by: Michael J. Ruhl <michael.j.ruhl(a)intel.com>
> Signed-off-by: Alex Deucher <alexander.deucher(a)amd.com>
> Link: https://patchwork.freedesktop.org/patch/msgid/20200325090741.21957-2-bigbee…
> Cc: stable(a)vger.kernel.org
>
> diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
> index 86d9b0e45c8c6..1de2cde2277ca 100644
> --- a/drivers/gpu/drm/drm_prime.c
> +++ b/drivers/gpu/drm/drm_prime.c
> @@ -967,7 +967,7 @@ int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages,
>
> index = 0;
> for_each_sg(sgt->sgl, sg, sgt->nents, count) {
> - len = sg->length;
> + len = sg_dma_len(sg);
> page = sg_page(sg);
> addr = sg_dma_address(sg);
> -------------------------------------------------------------------------------
>
>
> Git bisection log:
>
> -------------------------------------------------------------------------------
> git bisect start
> # good: [8b614cb8f1dcac8ca77cf4dd85f46ef3055f8238] Merge tag '5.6-rc4-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6
> git bisect good 8b614cb8f1dcac8ca77cf4dd85f46ef3055f8238
> # bad: [56a451b780676bc1cdac011735fe2869fa2e9abf] Merge tag 'ntb-5.7' of git://github.com/jonmason/ntb
> git bisect bad 56a451b780676bc1cdac011735fe2869fa2e9abf
> # bad: [59838093be51ee9447f6ad05483d697b6fa0368d] Merge tag 'driver-core-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
> git bisect bad 59838093be51ee9447f6ad05483d697b6fa0368d
> # bad: [32db9f10d52c97ffc407c7dad81c6fafcad730b2] Merge tag 'arm-soc-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
> git bisect bad 32db9f10d52c97ffc407c7dad81c6fafcad730b2
> # good: [78511edc2dd4c7b9f74f3b544093c854b7bd7744] Merge tag 'pm-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
> git bisect good 78511edc2dd4c7b9f74f3b544093c854b7bd7744
> # good: [76ccd234269bd05debdbc12c96eafe62dd9a6180] Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> git bisect good 76ccd234269bd05debdbc12c96eafe62dd9a6180
> # good: [81573b18f26defe672a7d960f9af9ac2c97f324d] selftests/net/forwarding: add Makefile to install tests
> git bisect good 81573b18f26defe672a7d960f9af9ac2c97f324d
> # good: [9efcc4a129363187c9bf15338692f107c5c9b6f0] afs: Fix unpinned address list during probing
> git bisect good 9efcc4a129363187c9bf15338692f107c5c9b6f0
> # bad: [823846c3107197b6eae9fb656a23e986926d6c07] Merge tag 'riscv-for-linus-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
> git bisect bad 823846c3107197b6eae9fb656a23e986926d6c07
> # bad: [7bf8df68cba0536479aead32297e47908922582c] Merge tag 'drm-fixes-2020-03-27' of git://anongit.freedesktop.org/drm/drm
> git bisect bad 7bf8df68cba0536479aead32297e47908922582c
> # good: [fbf66796a0aedbaea248c7ade1459ccd0dd4cb44] Input: move the new KEY_SELECTIVE_SCREENSHOT keycode
> git bisect good fbf66796a0aedbaea248c7ade1459ccd0dd4cb44
> # bad: [5117c363eb213d5503f5b7e39c9bfafd46388184] Merge tag 'drm-misc-fixes-2020-03-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
> git bisect bad 5117c363eb213d5503f5b7e39c9bfafd46388184
> # bad: [0199172f933342d8b1011aae2054a695c25726f4] drm/amdgpu: fix scatter-gather mapping with user pages
> git bisect bad 0199172f933342d8b1011aae2054a695c25726f4
> # bad: [42e67b479eab6d26459b80b4867298232b0435e7] drm/prime: use dma length macro when mapping sg
> git bisect bad 42e67b479eab6d26459b80b4867298232b0435e7
> # first bad commit: [42e67b479eab6d26459b80b4867298232b0435e7] drm/prime: use dma length macro when mapping sg
> -------------------------------------------------------------------------------
>
[View Less]
From: Colin Ian King <colin.king(a)canonical.com>
The variable ret is being initialized with a value that is never read
and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king(a)canonical.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/…
[View More]drm/vmwgfx/vmwgfx_surface.c
index 7ef51fa84b01..126f93c0b0b8 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@ -1651,7 +1651,7 @@ vmw_gb_surface_reference_internal(struct drm_device *dev,
struct vmw_surface_metadata *metadata;
struct ttm_base_object *base;
uint32_t backup_handle;
- int ret = -EINVAL;
+ int ret;
ret = vmw_surface_handle_reference(dev_priv, file_priv, req->sid,
req->handle_type, &base);
--
2.25.1
[View Less]
Hi Linus,
This is the second pull, it has some changes to mm in it that should
all have acks on them. The first dax constify arg patch got an ack on
the list from Matthew Wilcox and Dan Williams after the MR was sent,
but I didn't think it was worth a resend for that.
This adds support for hugepages to TTM and has been tested with the
vmwgfx drivers, though I expect other drivers to start using it.
Dave.
drm-next-2020-04-03-1:
drm: add support for hugepages to TTM
The following changes …
[View More]since commit 59e7a8cc2dcf335116d500d684bfb34d1d97a6fe:
Merge tag 'drm-msm-next-2020-03-22' of
https://gitlab.freedesktop.org/drm/msm into drm-next (2020-03-31
16:34:55 +1000)
are available in the Git repository at:
git://anongit.freedesktop.org/drm/drm tags/drm-next-2020-04-03-1
for you to fetch changes up to 0e7e6198af28c1573267aba1be33dd0b7fb35691:
Merge branch 'ttm-transhuge' of
git://people.freedesktop.org/~thomash/linux into drm-next (2020-04-03
09:07:49 +1000)
----------------------------------------------------------------
drm: add support for hugepages to TTM
----------------------------------------------------------------
Dave Airlie (1):
Merge branch 'ttm-transhuge' of
git://people.freedesktop.org/~thomash/linux into drm-next
Thomas Hellstrom (VMware) (9):
fs: Constify vma argument to vma_is_dax
mm: Introduce vma_is_special_huge
mm: Split huge pages on write-notify or COW
mm: Add vmf_insert_pfn_xxx_prot() for huge page-table entries
drm/ttm, drm/vmwgfx: Support huge TTM pagefaults
drm/vmwgfx: Support huge page faults
drm: Add a drm_get_unmapped_area() helper
drm/vmwgfx: Introduce a huge page aligning TTM range manager
drm/vmwgfx: Hook up the helpers to align buffer objects
drivers/gpu/drm/drm_file.c | 141 ++++++++++++++++++++++++
drivers/gpu/drm/ttm/ttm_bo_vm.c | 161 +++++++++++++++++++++++++++-
drivers/gpu/drm/vmwgfx/Makefile | 1 +
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 13 +++
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 12 +++
drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c | 76 ++++++++++++-
drivers/gpu/drm/vmwgfx/vmwgfx_thp.c | 166 +++++++++++++++++++++++++++++
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c | 5 +-
include/drm/drm_file.h | 9 ++
include/drm/ttm/ttm_bo_api.h | 3 +-
include/linux/fs.h | 2 +-
include/linux/huge_mm.h | 41 ++++++-
include/linux/mm.h | 17 +++
mm/huge_memory.c | 44 ++++++--
mm/memory.c | 27 +++--
16 files changed, 692 insertions(+), 28 deletions(-)
create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
[View Less]
The R-Car DU driver creates a zpos property, ranging from 1 to 7, for
all the overlay planes, but leaves the primary plane without a zpos
property. The DRM/KMS API doesn't clearly specify if this is acceptable,
of it the property is mandatory for all planes when exposed for some of
the planes. Nonetheless, weston v8.0 has been reported to have trouble
handling this situation.
The DRM core offers support for immutable zpos properties. Creating an
immutable zpos property set to 0 for the primary …
[View More]planes seems to be a
good way forward, as it shouldn't introduce any regression, and can fix
the issue. Do so.
Reported-by: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas(a)ideasonboard.com>
---
drivers/gpu/drm/rcar-du/rcar_du_plane.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
index c6430027169f..a0021fc25b27 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
@@ -785,13 +785,15 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp)
drm_plane_create_alpha_property(&plane->plane);
- if (type == DRM_PLANE_TYPE_PRIMARY)
- continue;
-
- drm_object_attach_property(&plane->plane.base,
- rcdu->props.colorkey,
- RCAR_DU_COLORKEY_NONE);
- drm_plane_create_zpos_property(&plane->plane, 1, 1, 7);
+ if (type == DRM_PLANE_TYPE_PRIMARY) {
+ drm_plane_create_zpos_immutable_property(&plane->plane,
+ 0);
+ } else {
+ drm_object_attach_property(&plane->plane.base,
+ rcdu->props.colorkey,
+ RCAR_DU_COLORKEY_NONE);
+ drm_plane_create_zpos_property(&plane->plane, 1, 1, 7);
+ }
}
return 0;
--
Regards,
Laurent Pinchart
[View Less]