Re: [PATCH v5 3/7] drm: sun4i: dsi: Convert to bridge driver

2021-11-29 Thread Jagan Teki
On Fri, Nov 26, 2021 at 9:34 PM Maxime Ripard wrote: > > On Thu, Nov 25, 2021 at 09:44:14PM +0530, Jagan Teki wrote: > > On Thu, Nov 25, 2021 at 9:40 PM Maxime Ripard wrote: > > > > > > On Thu, Nov 25, 2021 at 07:55:41PM +0530, Jagan Teki wrote: > > > > Hi, > > > > > > > > On Thu, Nov 25, 2021 at

Re: [PATCH 4/4] drm: rcar-du: mipi-dsi: Support bridge probe ordering

2021-11-29 Thread Jagan Teki
Hi Kieran, On Fri, Nov 26, 2021 at 3:45 PM Kieran Bingham wrote: > > The bridge probe ordering for DSI devices has been clarified and further > documented in > > To support connecting with the SN65DSI86 device after commit c3b75d4734cb > ("drm/bridge: sn65dsi86: Register and attach our DSI device

Re: [PATCH] fbdev: replace snprintf in show functions with sysfs_emit

2021-11-29 Thread Greg KH
On Tue, Nov 30, 2021 at 08:05:08AM +0800, davidcomponent...@gmail.com wrote: > From: Yang Guang > > coccinelle report: > ./drivers/video/fbdev/core/fbcon.c:2680:8-16: > WARNING: use scnprintf or sprintf > ./drivers/video/fbdev/core/fbcon.c:2655:8-16: > WARNING: use scnprintf or sprintf > > Use s

Re: [PATCH 1/3] drm/simpledrm: Bind to OF framebuffers in /chosen

2021-11-29 Thread Javier Martinez Canillas
> > > > > > Simpledrm is just a driver, but this is platform setup code. Why is this > > > code located here and not under arch/ or drivers/firmware/? > > > Agreed. Creating platform devices is something for platform code and not really a DRM driver. > > > I know that other drivers do similar thi

Re: [PATCH] lontium-lt9611: check a different register bit for HDMI sensing

2021-11-29 Thread Vinod Koul
On 16-11-21, 18:07, Peter Collingbourne wrote: > It has been observed that with certain monitors such as the HP Z27n, > the register 0x825e reads a value of 0x79 when the HDMI cable is > connected and 0x78 when it is disconnected, i.e. bit 0 appears > to correspond to the HDMI connection status and

Re: [PATCH] drm: rcar-du: crtc: Support external DSI dot clock

2021-11-29 Thread Laurent Pinchart
Hi Kieran, Thank you for the patch. On Fri, Nov 26, 2021 at 09:35:14AM +, Kieran Bingham wrote: > On platforms with an external clock, both the group and crtc must be > handled accordingly to correctly pass through the external clock and > configure the DU to use the external rate. > > The C

[PATCH v9 19/22] drm/mediatek: modify mediatek-drm for mt8195 multi mmsys support

2021-11-29 Thread Nancy . Lin
MT8195 have two mmsys. Modify drm for MT8195 multi-mmsys support. The two mmsys (vdosys0 and vdosys1) will bring up two drm drivers, only one drm driver register as the drm device. Each drm driver binds its own component. The last bind drm driver allocates and registers the drm device to drm core.

[PATCH v9 15/22] drm/mediatek: add display merge async reset control

2021-11-29 Thread Nancy . Lin
Add merge async reset control in mtk_merge_stop. Async hw doesn't do self reset on each sof signal(start of frame), so need to reset the async to clear the hw status for the next merge start. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 4 1 file changed, 4 inser

[PATCH v9 09/22] soc: mediatek: change the mutex defines and the mutex_mod type

2021-11-29 Thread Nancy . Lin
This is a preparation for adding support for mt8195 vdosys1 mutex. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements, so change it to support multi-bit control. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mtk-mutex.c | 24

[PATCH v9 17/22] drm/mediatek: add mediatek-drm plane color encoding info

2021-11-29 Thread Nancy . Lin
Add plane color encoding information for color space conversion. It's a preparation for adding support for mt8195 ovl_adaptor mdp_rdma csc control. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + drivers/gpu/drm/mediatek/mtk_drm_plane.h |

[PATCH v9 05/22] soc: mediatek: add mtk-mmsys support for mt8195 vdosys1

2021-11-29 Thread Nancy . Lin
Add mt8195 vdosys1 clock driver name and routing table to the driver data of mtk-mmsys. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h| 136 + drivers/soc/mediatek/mtk-mmsys.c | 10 ++ include/linux/soc/mediatek/mtk-mmsys.h | 2 + 3 files ch

[PATCH v9 12/22] drm/mediatek: add display merge advance config API for MT8195

2021-11-29 Thread Nancy . Lin
Add merge new advance config API. The original merge API is mtk_ddp_comp_funcs function prototype. The API interface parameters cannot be modified, so add a new config API for extension. This is the preparation for ovl_adaptor merge control. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --

[PATCH v9 00/22] Add MediaTek SoC DRM (vdosys1) support for mt8195

2021-11-29 Thread Nancy . Lin
The hardware path of vdosys1 with DPTx output need to go through by several modules, such as, OVL_ADAPTOR and MERGE. Add DRM and these modules support by the patches below: Changes in v9: - rebase on kernel-5.16-rc1 - rebase on vdosys0 series v13. (ref [5]) - fix ovl_adaptor sub driver is brough

[PATCH v9 18/22] drm/mediatek: add ovl_adaptor support for MT8195

2021-11-29 Thread Nancy . Lin
Add ovl_adaptor driver for MT8195. Ovl_adaptor is an encapsulated module and designed for simplified DRM control flow. This module is composed of 8 RDMAs, 4 MERGEs and an ETHDR. Two RDMAs merge into one layer, so this module support 4 layers. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu -

[PATCH v9 22/22] arm64: dts: mt8195: add display node for vdosys1

2021-11-29 Thread Nancy . Lin
Add display node for vdosys1. Signed-off-by: Nancy.Lin --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 222 +++ 1 file changed, 222 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index e136761345db..a69a7b57e070

[PATCH v9 03/22] dt-bindings: mediatek: add ethdr definition for mt8195

2021-11-29 Thread Nancy . Lin
Add vdosys1 ETHDR definition. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- .../display/mediatek/mediatek,ethdr.yaml | 147 ++ 1 file changed, 147 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,ethdr.yaml diff --git

[PATCH v9 20/22] drm/mediatek: add drm ovl_adaptor sub driver for MT8195

2021-11-29 Thread Nancy . Lin
Add drm ovl_adaptor sub driver. Bring up ovl_adaptor sub driver if the component exists in the path. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 16 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 30 --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp

[PATCH v9 14/22] drm/mediatek: add display merge mute/unmute support for MT8195

2021-11-29 Thread Nancy . Lin
Add merge mute/unmute setting for MT8195. MT8195 Vdosys1 merge1~merge4 support HW mute function. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_disp

[PATCH v9 21/22] drm/mediatek: add mediatek-drm of vdosys1 support for MT8195

2021-11-29 Thread Nancy . Lin
Add driver data of mt8195 vdosys1 to mediatek-drm. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 36430f956b4f..e851

[PATCH v9 01/22] dt-bindings: mediatek: add vdosys1 RDMA definition for mt8195

2021-11-29 Thread Nancy . Lin
Add vdosys1 RDMA definition. Signed-off-by: Nancy.Lin --- .../arm/mediatek/mediatek,mdp-rdma.yaml | 77 +++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mdp-rdma.yaml diff --git a/Documentation/devicetree/bi

[PATCH v9 11/22] drm/mediatek: add display MDP RDMA support for MT8195

2021-11-29 Thread Nancy . Lin
Add MDP_RDMA driver for MT8195. MDP_RDMA is the DMA engine of the ovl_adaptor component. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/Makefile | 3 +- drivers/gpu/drm/mediatek/mtk_disp_drv.h | 7 + drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 + dr

[PATCH v9 13/22] drm/mediatek: add display merge start/stop API for cmdq support

2021-11-29 Thread Nancy . Lin
Add merge start/stop API for cmdq support. The ovl_adaptor merges are configured with each drm plane update. Need to enable/disable merge with cmdq making sure all the settings taken effect in the same vblank. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_

[PATCH v9 16/22] drm/mediatek: add ETHDR support for MT8195

2021-11-29 Thread Nancy . Lin
ETHDR is a part of ovl_adaptor. ETHDR is designed for HDR video and graphics conversion in the external display path. It handles multiple HDR input types and performs tone mapping, color space/color format conversion, and then combine different layers, output the required HDR or SDR signal to the s

[PATCH v9 06/22] soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1

2021-11-29 Thread Nancy . Lin
Add mmsys config API. The config API is used for config mmsys reg. Some mmsys regs need to be setting according to the HW engine binding to the mmsys simultaneously. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h| 62 ++ drivers/soc/mediatek/mtk-mmsy

[PATCH v9 10/22] soc: mediatek: add mtk-mutex support for mt8195 vdosys1

2021-11-29 Thread Nancy . Lin
Add mtk-mutex support for mt8195 vdosys1. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mtk-mutex.c | 54 1 file changed, 54 insertions(+)

[PATCH v9 08/22] soc: mediatek: mmsys: modify reset controller for MT8195 vdosys1

2021-11-29 Thread Nancy . Lin
MT8195 vdosys1 has more than 32 reset bits and a different reset base than other chips. Modify mmsys for support 64 bit and different reset base. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h | 1 + drivers/soc/mediatek/mtk-mmsys.c| 21 - drivers/soc/m

[PATCH v9 04/22] dt-bindings: reset: mt8195: add vdosys1 reset control bit

2021-11-29 Thread Nancy . Lin
Add vdosys1 reset control bit for MT8195 platform. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- include/dt-bindings/reset/mt8195-resets.h | 12 1 file changed, 12 insertions(+) diff --git a/include/dt-bindings/reset/mt8195-resets.h b/include/dt-bindings/reset/mt8195-re

[PATCH v9 02/22] dt-bindings: mediatek: add vdosys1 MERGE property for mt8195

2021-11-29 Thread Nancy . Lin
MT8195 vdosys1 merge1 to merge4 have HW mute function. Add MERGE additional mute property description. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu Acked-By: AngeloGioacchino Del Regno --- .../devicetree/bindings/display/mediatek/mediatek,merge.yaml | 4 1 file changed, 4 insertio

[PATCH v9 07/22] soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1

2021-11-29 Thread Nancy . Lin
Add cmdq support for mtk-mmsys config API. The mmsys config register settings need to take effect with the other HW settings(like OVL_ADAPTOR...) at the same vblanking time. If we use CPU to write the mmsys reg, we can't guarantee all the settings can be written in the same vblanking time. Cmdq is

Re: [PATCH 4/4] drm: rcar-du: mipi-dsi: Support bridge probe ordering

2021-11-29 Thread Laurent Pinchart
Hi Kieran, Thank you for the patch. On Fri, Nov 26, 2021 at 10:15:18AM +, Kieran Bingham wrote: > The bridge probe ordering for DSI devices has been clarified and further > documented in In what ? :-) > To support connecting with the SN65DSI86 device after commit c3b75d4734cb > ("drm/bridge

Re: [PATCH 3/4] drm: rcar-du: mipi-dsi: Ensure correct fout is reported

2021-11-29 Thread Laurent Pinchart
Hi Kieran, Thank you for the patch. On Fri, Nov 26, 2021 at 10:15:17AM +, Kieran Bingham wrote: > The debug reporting for the clock calculations was erroneously reporting > the last calculation of fout, rather than the fout that was determined > to have the least error, and therefore be the v

Re: [PATCH 2/4] drm: rcar-du: Select DRM_MIPI_DSI with DRM_RCAR_MIPI_DSI

2021-11-29 Thread Laurent Pinchart
Hi Kieran, Thank you for the patch. On Fri, Nov 26, 2021 at 10:15:16AM +, Kieran Bingham wrote: > The RCAR_MIPI_DSI uses the DRM_MIPI_DSI interface. > > Ensure that it is selected when the option is enabled. > > Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart I'll squash it

Re: [PATCH 1/4] drm: rcar-du: Fix Makefile indentation for DSI

2021-11-29 Thread Laurent Pinchart
Hi Kieran, Thank you for the patch. On Fri, Nov 26, 2021 at 10:15:15AM +, Kieran Bingham wrote: > From: Kieran Bingham > > Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart > --- > drivers/gpu/drm/rcar-du/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > d

Re: [PATCH] drm: rcar-du: Add DSI support to rcar_du_output_name

2021-11-29 Thread Laurent Pinchart
Hi Kieran, Thank you for the patch. On Mon, Nov 29, 2021 at 05:08:45PM +, Kieran Bingham wrote: > The DSI output names were not added when the DSI pipeline support was > introduced. > > Add the correct labels for these outputs, and fix the sort order to > match 'enum rcar_du_output' while we

Re: [Freedreno] [PATCH v3 01/13] drm/msm/dsi: add support for dsc data

2021-11-29 Thread Abhinav Kumar
Hi Vinod On 11/15/2021 10:22 PM, Vinod Koul wrote: Display Stream Compression (DSC) parameters need to be calculated. Add helpers and struct msm_display_dsc_config in msm_drv for this msm_display_dsc_config uses drm_dsc_config for DSC parameters. Signed-off-by: Vinod Koul --- drivers/gpu/drm

[PATCH v2] drm/i915/dp: Perform 30ms delay after source OUI write

2021-11-29 Thread Lyude Paul
While working on supporting the Intel HDR backlight interface, I noticed that there's a couple of laptops that will very rarely manage to boot up without detecting Intel HDR backlight support - even though it's supported on the system. One example of such a laptop is the Lenovo P17 1st generation.

linux-next: manual merge of the drm tree with the drm-misc-fixes tree

2021-11-29 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the drm tree got a conflict in: drivers/gpu/drm/vc4/vc4_kms.c between commits: f927767978d2 ("drm/vc4: kms: Fix return code check") d354699e2292 ("drm/vc4: kms: Don't duplicate pending commit") from the drm-misc-fixes tree and commit: 16e101051f32 (

Re: [PATCH 1/5] dt-bindings: display: vc4: Add optional phandle to firmware

2021-11-29 Thread Rob Herring
On Wed, Nov 17, 2021 at 03:50:36PM +0100, Maxime Ripard wrote: > The firmware can free all the resources it was using to run the display > engine that won't be needed once the kernel has taken over. > > Thus, we need a phandle to the firmware DT node to be able to send that > message when relevant

Re: [PATCH 04/12] drm/rockchip: dw_hdmi: add regulator support

2021-11-29 Thread Rob Herring
On Wed, Nov 17, 2021 at 03:33:39PM +0100, Sascha Hauer wrote: > The RK3568 has HDMI_TX_AVDD0V9 and HDMI_TX_AVDD_1V8 supply inputs needed > for the HDMI port. add support for these to the driver for boards which > have them supplied by switchable regulators. > > Signed-off-by: Sascha Hauer > --- >

[PATCH] drm: rcar-du: Fix CRTC timings when CMM is used

2021-11-29 Thread Laurent Pinchart
When the CMM is enabled, an offset of 25 pixels must be subtracted from the HDS (horizontal display start) and HDE (horizontal display end) registers. Fix the timings calculation, and take this into account in the mode validation. This fixes a visible horizontal offset in the image with VGA monito

Re: [PATCH v4.5 12/14] dt-bindings: msm/dp: Add bindings for HDCP registers

2021-11-29 Thread Rob Herring
On Mon, 15 Nov 2021 20:21:48 +, Sean Paul wrote: > From: Sean Paul > > This patch adds the bindings for the MSM DisplayPort HDCP registers > which are required to write the HDCP key into the display controller as > well as the registers to enable HDCP authentication/key > exchange/encryption.

Re: [PATCH v1 1/2] dt-bindings: sharp,lq101r1sx01: Add compatible for LQ101R1SX03

2021-11-29 Thread Rob Herring
On Sun, Nov 14, 2021 at 11:07:16PM +0300, Dmitry Osipenko wrote: > From: Anton Bambura > > LQ101R1SX03 is compatible with LQ101R1SX01, document it. Then sounds like '"sharp,lq101r1sx03", "sharp,lq101r1sx01"' would be the appropriate compatible value. Do that, and you don't need a driver change

Re: [PATCH v1 1/2] dt-bindings: display: simple: Add HannStar HSD101PWW2

2021-11-29 Thread Rob Herring
On Sun, 14 Nov 2021 23:04:30 +0300, Dmitry Osipenko wrote: > From: Svyatoslav Ryhel > > Add HannStar HSD101PWW2 10.1" WXGA (1280x800) TFT-LCD LVDS panel > to the list of compatibles. > > Signed-off-by: Svyatoslav Ryhel > --- > .../devicetree/bindings/display/panel/panel-simple.yaml | 2

Re: [PATCH] drm/msm/gpu: Don't allow zero fence_id

2021-11-29 Thread Rob Clark
On Mon, Nov 29, 2021 at 10:18 AM Rob Clark wrote: > > From: Rob Clark > > Elsewhere we treat zero as "no fence" and __msm_gem_submit_destroy() > skips removal from fence_idr. We could alternately change this to use > negative values for "no fence" but I think it is more clear to not allow > zero

Re: [PATCH 6/6] Documentation/gpu: Add DC glossary

2021-11-29 Thread ydirson
Hi Rodrigo, That will really be helpful! I know drawing the line is a difficult problem (and can even make things harder when searching), but maybe it would make sense to keep generic acronyms not specific to amdgpu in a separate list. I bet a number of them would be useful in the scope of other

[PATCH v7] drm/i915: Update error capture code to avoid using the current vma state

2021-11-29 Thread Thomas Hellström
With asynchronous migrations, the vma state may be several migrations ahead of the state that matches the request we're capturing. Address that by introducing an i915_vma_snapshot structure that can be used to snapshot relevant state at request submission. In order to make sure we access the correc

Re: [PATCH] dt-bindings: display: sync formats with simplefb.h

2021-11-29 Thread Rob Herring
On Mon, 08 Nov 2021 19:33:22 +0100, David Heidelberg wrote: > Sync all formats from simplefb.h into documentation. > > Signed-off-by: David Heidelberg > --- > .../bindings/display/simple-framebuffer.yaml | 12 > 1 file changed, 12 insertions(+) > Applied, thanks!

Re: [PATCH 6/6] Documentation/gpu: Add DC glossary

2021-11-29 Thread Alex Deucher
On Thu, Nov 25, 2021 at 10:40 AM Rodrigo Siqueira wrote: > > In the DC driver, we have multiple acronyms that are not obvious most of > the time. This commit introduces a DC glossary in order to make it > easier to navigate through our driver. > > Signed-off-by: Rodrigo Siqueira > --- > Document

[Bug 211277] sometimes crash at s2ram-wake (Ryzen 3500U): amdgpu, drm, commit_tail, amdgpu_dm_atomic_commit_tail

2021-11-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=211277 --- Comment #86 from James Zhu (jam...@amd.com) --- Hi @kolAflash, thanks so much for your effort on this verification! Would you mind help apply those patches on 5.12 stable to check also? it should be automatically merged. Thanks! James -- Yo

Re: [PATCH 1/3] drm/simpledrm: Bind to OF framebuffers in /chosen

2021-11-29 Thread Rob Herring
On Fri, Nov 19, 2021 at 9:24 PM Hector Martin wrote: > > On 18/11/2021 18.19, Thomas Zimmermann wrote: > > Hi > > > > Am 17.11.21 um 15:58 schrieb Hector Martin: > >> @@ -897,5 +898,21 @@ static struct platform_driver > >> simpledrm_platform_driver = { > >> > >>module_platform_driver(simpledr

[PATCH] drm: fix error found in some cases after the patch d1af5cd86997

2021-11-29 Thread Claudio Suarez
The patch d1af5cd86997 ("drm: get rid of DRM_DEBUG_* log calls in drm core, files drm_a*.c") fails when the drm_device cannot be found in the parameter plane_state. Fix it. Reported-by: kernel test robot Fixes: d1af5cd86997 ("drm: get rid of DRM_DEBUG_* log calls in drm core, files drm_a*.c") Si

[Bug 211277] sometimes crash at s2ram-wake (Ryzen 3500U): amdgpu, drm, commit_tail, amdgpu_dm_atomic_commit_tail

2021-11-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=211277 --- Comment #85 from kolAflash (kolafl...@kolahilft.de) --- (In reply to James Zhu from comment #77) > Created attachment 299697 [details] > backport patch for 5.10 stable. > > Hi @kolAflash, before I send out them to public for review,. could yo

Re: [PATCH] drm/etnaviv: constify static struct cooling_ops

2021-11-29 Thread Christian Gmeiner
Am So., 28. Nov. 2021 um 21:20 Uhr schrieb Rikard Falkeborn : > > The only usage of cooling_ops is to pass its address to > thermal_of_cooling_device_register(), which takes a pointer to const > struct thermal_cooling_device_ops as input. Make it const to allow the > compiler to put it in read-only

[PATCH] drm/msm/gpu: Don't allow zero fence_id

2021-11-29 Thread Rob Clark
From: Rob Clark Elsewhere we treat zero as "no fence" and __msm_gem_submit_destroy() skips removal from fence_idr. We could alternately change this to use negative values for "no fence" but I think it is more clear to not allow zero as a valid fence_id. Signed-off-by: Rob Clark --- drivers/gp

Re: [PATCH v4] dma-buf: system_heap: Use 'for_each_sgtable_sg' in pages free flow

2021-11-29 Thread John Stultz
On Thu, Nov 25, 2021 at 11:48 PM wrote: > > From: Guangming > > For previous version, it uses 'sg_table.nent's to traverse sg_table in pages > free flow. > However, 'sg_table.nents' is reassigned in 'dma_map_sg', it means the number > of > created entries in the DMA adderess space. > So, use 'sg

Re: [PATCH v2 0/3] drm: Make DRM hashtable legacy

2021-11-29 Thread Alex Deucher
On Mon, Nov 29, 2021 at 4:48 AM Thomas Zimmermann wrote: > > Clean up the last non-legacy users of DRM's hashtable code and put > the code behind CONFIG_DRM_LEGACY. > > TTM only includes the header file, but does not use the hashtable. > The vmwgfx driver uses the hashtable internally. Copy the DR

Re: [RE]: [PATCH v3 10/10] vfio/ccw: Move the lifecycle of the struct vfio_ccw_private to the mdev

2021-11-29 Thread Eric Farman
On Wed, 2021-11-24 at 12:25 +, Liu, Yi L wrote: > > From: Jason Gunthorpe > > Sent: Fri, 1 Oct 2021 14:52:51 -0300 > > > > The css_driver's main purpose is to create/destroy the mdev and > > relay the > > shutdown, irq, sch_event, and chp_event css_driver ops to the > > single > > created vfi

[PATCH] drm: rcar-du: Add DSI support to rcar_du_output_name

2021-11-29 Thread Kieran Bingham
The DSI output names were not added when the DSI pipeline support was introduced. Add the correct labels for these outputs, and fix the sort order to match 'enum rcar_du_output' while we are here. Fixes: b291fdcf5114 ("drm: rcar-du: Add r8a779a0 device support") Suggested-by: Biju Das Signed-off

[PATCH v5] drm/msm/dp: employ bridge mechanism for display enable and disable

2021-11-29 Thread Kuogee Hsieh
Currently the msm_dp_*** functions implement the same sequence which would happen when drm_bridge is used. hence get rid of this intermediate layer and align with the drm_bridge usage to avoid customized implementation. Signed-off-by: Kuogee Hsieh Changes in v2: -- revise commit text -- rename d

Re: [PATCH v3] drm/msm/dp: employ bridge mechanism for display enable and disable

2021-11-29 Thread Kuogee Hsieh
On 11/24/2021 11:45 AM, Dmitry Baryshkov wrote: On 15/11/2021 21:48, Kuogee Hsieh wrote: Currently the msm_dp_*** functions implement the same sequence which would happen when drm_bridge is used. hence get rid of this intermediate layer and align with the drm_bridge usage to avoid customized

[PATCH v2] dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()

2021-11-29 Thread Thomas Hellström
If a dma_fence_array is reported signaled by a call to dma_fence_is_signaled(), it may leak the PENDING_ERROR status. Fix this by clearing the PENDING_ERROR status if we return true in dma_fence_array_signaled(). v2: - Update Cc list, and add R-b. Fixes: 1f70b8b812f3 ("dma-fence: Propagate error

Re: [i-g-t 00/14] Add IGT support for plane color management

2021-11-29 Thread Harry Wentland
On 2021-11-29 04:20, Pekka Paalanen wrote: > On Fri, 26 Nov 2021 11:54:55 -0500 > Harry Wentland wrote: > >> On 2021-11-18 04:50, Pekka Paalanen wrote: >>> On Mon, 15 Nov 2021 15:17:45 +0530 >>> Bhanuprakash Modem wrote: >>> From the Plane Color Management feature design, userspace ca

Re: [PATCH] drm/msm: Initialize MDSS irq domain at probe time

2021-11-29 Thread AngeloGioacchino Del Regno
Il 29/11/21 15:53, Dmitry Baryshkov ha scritto: Hi, On Mon, 29 Nov 2021 at 17:15, AngeloGioacchino Del Regno wrote: Il 29/11/21 03:20, Dmitry Baryshkov ha scritto: Hi, On 25/11/2021 18:09, AngeloGioacchino Del Regno wrote: Since commit 8f59ee9a570c ("drm/msm/dsi: Adjust probe order"), the

Re: [igt-dev] [i-g-t 07/14] tests/kms_color: New negative tests for plane level color mgmt

2021-11-29 Thread Harry Wentland
On 2021-11-18 04:19, Pekka Paalanen wrote: > On Mon, 15 Nov 2021 15:17:52 +0530 > Bhanuprakash Modem wrote: > >> Negative check for: >> * plane gamma lut sizes >> * plane degamma lut sizes >> * plane ctm matrix sizes >> >> Cc: Harry Wentland >> Cc: Ville Syrjälä >> Cc: Juha-Pekka Heikkila

Re: [PATCH] drm/msm: Initialize MDSS irq domain at probe time

2021-11-29 Thread Dmitry Baryshkov
Hi, On Mon, 29 Nov 2021 at 17:15, AngeloGioacchino Del Regno wrote: > > Il 29/11/21 03:20, Dmitry Baryshkov ha scritto: > > Hi, > > > > On 25/11/2021 18:09, AngeloGioacchino Del Regno wrote: > >> Since commit 8f59ee9a570c ("drm/msm/dsi: Adjust probe order"), the > >> DSI host gets initialized ear

Re: [PATCH v2 0/6] drm/vc4: kms: Misc fixes for HVS commits

2021-11-29 Thread Maxime Ripard
On Wed, 17 Nov 2021 10:45:21 +0100, Maxime Ripard wrote: > The conversion to DRM commit helpers (f3c420fe19f8, "drm/vc4: kms: Convert to > atomic helpers") introduced a number of issues in corner cases, most of them > showing themselves in the form of either a vblank timeout or use-after-free > err

Re: [PATCH] drm/msm: Initialize MDSS irq domain at probe time

2021-11-29 Thread AngeloGioacchino Del Regno
Il 29/11/21 03:20, Dmitry Baryshkov ha scritto: Hi, On 25/11/2021 18:09, AngeloGioacchino Del Regno wrote: Since commit 8f59ee9a570c ("drm/msm/dsi: Adjust probe order"), the DSI host gets initialized earlier, but this caused unability to probe the entire stack of components because they all dep

[PATCH v2 09/16] drm/i915: Ensure i915_vma tests do not get -ENOSPC with the locking changes.

2021-11-29 Thread Maarten Lankhorst
Now that we require locking to evict, multiple vmas from the same object might not be evicted. This is expected and required, because execbuf will move to short-term pinning by using the lock only. This will cause these tests to fail, because they create a ton of vma's for the same object. Unbind

[PATCH v2 15/16] drm/i915: Remove support for unlocked i915_vma unbind

2021-11-29 Thread Maarten Lankhorst
Now that we require the object lock for all ops, some code handling race conditions can be removed. This is required to not take short-term pins inside execbuf. Signed-off-by: Maarten Lankhorst Acked-by: Niranjana Vishwanathapura --- drivers/gpu/drm/i915/i915_vma.c | 40 +--

[PATCH v2 10/16] drm/i915: Make i915_gem_evict_vm work correctly for already locked objects

2021-11-29 Thread Maarten Lankhorst
i915_gem_execbuf will call i915_gem_evict_vm() after failing to pin all objects in the first round. We are about to remove those short-term pins, but even without those the objects are still locked. Add a special case to allow i915_gem_evict_vm to evict locked objects as well. This might also allo

[PATCH v2 12/16] drm/i915: Add i915_vma_unbind_unlocked, and take obj lock for i915_vma_unbind

2021-11-29 Thread Maarten Lankhorst
We want to remove more members of i915_vma, which requires the locking to be held more often. Start requiring gem object lock for i915_vma_unbind, as it's one of the callers that may unpin pages. Some special care is needed when evicting, because the last reference to the object may be held by th

[PATCH v2 16/16] drm/i915: Remove short-term pins from execbuf, v5.

2021-11-29 Thread Maarten Lankhorst
Add a flag PIN_VALIDATE, to indicate we don't need to pin and only protected by the object lock. This removes the need to unpin, which is done by just releasing the lock. eb_reserve is slightly reworked for readability, but the same steps are still done: - First pass pins with NONBLOCK. - Second

[PATCH v2 04/16] drm/i915: Take object lock in i915_ggtt_pin if ww is not set

2021-11-29 Thread Maarten Lankhorst
i915_vma_wait_for_bind needs the vma lock held, fix the caller. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_vma.c | 40 +++-- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915

[PATCH v2 13/16] drm/i915: Require object lock when freeing pages during destruction

2021-11-29 Thread Maarten Lankhorst
TTM already requires this, and we require it for delayed destroy. Signed-off-by: Maarten Lankhorst Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_object.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915

[PATCH v2 05/16] drm/i915: Force ww lock for i915_gem_object_ggtt_pin_ww

2021-11-29 Thread Maarten Lankhorst
We will need the lock to unbind the vma, and wait for bind to complete. Remove the special casing for the !ww path, and force ww locking for all. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_drv.h | 7 ++- drivers/gpu/drm/i915/i915_gem.c | 26 ++ 2

[PATCH v2 08/16] drm/i915: Pass trylock context to callers

2021-11-29 Thread Maarten Lankhorst
We are moving away from short term pinning, and need a way to evict objects locked by the current context. Pass the ww context to all eviction functions, so that they can evict objects that are already locked by the current ww context. On top of that, this slightly improves ww handling because the

[PATCH v2 02/16] drm/i915: Change shrink ordering to use locking around unbinding.

2021-11-29 Thread Maarten Lankhorst
Call drop_pages with the gem object lock held, instead of the other way around. This will allow us to drop the vma bindings with the gem object lock held. We plan to require the object lock for unpinning in the future, and this is an easy target. Signed-off-by: Maarten Lankhorst Reviewed-by: Nir

[PATCH v2 11/16] drm/i915: Call i915_gem_evict_vm in vm_fault_gtt to prevent new ENOSPC errors

2021-11-29 Thread Maarten Lankhorst
Now that we cannot unbind kill the currently locked object directly because we're removing short term pinning, we may have to unbind the object from gtt manually, using a i915_gem_evict_vm() call. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 18

[PATCH v2 03/16] drm/i915: Remove pages_mutex and intel_gtt->vma_ops.set/clear_pages members, v2.

2021-11-29 Thread Maarten Lankhorst
Big delta, but boils down to moving set_pages to i915_vma.c, and removing the special handling, all callers use the defaults anyway. We only remap in ggtt, so default case will fall through. Because we still don't require locking in i915_vma_unpin(), handle this by using xchg in get_pages(), as it

[PATCH v2 01/16] drm/i915: Remove unused bits of i915_vma/active api

2021-11-29 Thread Maarten Lankhorst
When reworking the code to move the eviction fence to the object, the best code is removed code. Remove some functions that are unused, and change the function definition if it's only used in 1 place. Signed-off-by: Maarten Lankhorst Reviewed-by: Niranjana Vishwanathapura [mlankhorst: Remove ne

[PATCH v2 07/16] drm/i915: Take trylock during eviction, v2.

2021-11-29 Thread Maarten Lankhorst
Now that freeing objects takes the object lock when destroying the backing pages, we can confidently take the object lock even for dead objects. Use this fact to take the object lock in the shrinker, without requiring a reference to the object, so all calls to unbind take the object lock. This is

[PATCH v2 14/16] drm/i915: Remove assert_object_held_shared

2021-11-29 Thread Maarten Lankhorst
This duck tape workaround is no longer required, unbind and destroy are fixed to take the obj->resv mutex before destroying and obj->mm.lock has been removed, always requiring obj->resv as well. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_object.c | 4 ++-- drivers/g

[PATCH v2 00/16] drm/i915: Remove short term pins from execbuf.

2021-11-29 Thread Maarten Lankhorst
New version of the series, with feedback from previous series added. First 11 patches are clean, some small fixes might required still for all to pass. Maarten Lankhorst (16): drm/i915: Remove unused bits of i915_vma/active api drm/i915: Change shrink ordering to use locking around unbinding

[PATCH v2 06/16] drm/i915: Ensure gem_contexts selftests work with unbind changes.

2021-11-29 Thread Maarten Lankhorst
In the next commit, we don't evict when refcount = 0. igt_vm_isolation() continuously tries to pin/unpin at same address, but also calls put() on the object, which means the object may not be unpinned in time. Instead of this, re-use the same object over and over, so they can be unbound as requir

Re: [PATCH 28/28] drm/i915: Remove short-term pins from execbuf, v4.

2021-11-29 Thread Maarten Lankhorst
On 25-10-2021 17:02, Matthew Auld wrote: > On Thu, 21 Oct 2021 at 11:37, Maarten Lankhorst > wrote: >> Add a flag PIN_VALIDATE, to indicate we don't need to pin and only >> protected by the object lock. >> >> This removes the need to unpin, which is done by just releasing the >> lock. >> >> eb_res

Re: [Intel-gfx] [PATCH 15/28] drm/i915: Add lock for unbinding to i915_gem_object_ggtt_pin_ww

2021-11-29 Thread Maarten Lankhorst
On 21-10-2021 19:48, Matthew Auld wrote: > On Thu, 21 Oct 2021 at 11:37, Maarten Lankhorst > wrote: >> Signed-off-by: Maarten Lankhorst > Needs a proper commit message. What about this? >> --- >> drivers/gpu/drm/i915/i915_gem.c | 9 - >> 1 file changed, 8 insertions(+), 1 deletion(-)

Re: [PATCH] dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()

2021-11-29 Thread Joonas Lahtinen
(Switching to my @linux.intel.com address) Quoting Christian König (2021-11-29 14:55:37) > Am 29.11.21 um 13:46 schrieb Thomas Hellström: > > On Mon, 2021-11-29 at 13:33 +0100, Christian König wrote: > >> Am 29.11.21 um 13:23 schrieb Thomas Hellström: > >>> Hi, Christian, > >>> > >>> On Mon, 2021-

Re: [PATCH v3 1/9] drm: vkms: Replace the deprecated drm_mode_config_init

2021-11-29 Thread Igor Torrente
Hi Nícolas, On Thu, Nov 25, 2021 at 1:37 AM Nícolas F. R. A. Prado wrote: > > Hi Igor, > > just some nits on the commit message. > > On Mon, Nov 22, 2021 at 04:43:52PM -0300, Igor Torrente wrote: > > The `drm_mode_config_init` was deprecated since c3b790e commit, and it's > > When referring to o

Re: [PATCH] dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()

2021-11-29 Thread Christian König
Am 29.11.21 um 13:46 schrieb Thomas Hellström: On Mon, 2021-11-29 at 13:33 +0100, Christian König wrote: Am 29.11.21 um 13:23 schrieb Thomas Hellström: Hi, Christian, On Mon, 2021-11-29 at 09:21 +0100, Christian König wrote: Am 29.11.21 um 08:35 schrieb Thomas Hellström: If a dma_fence_array

Re: [PATCH] dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()

2021-11-29 Thread Thomas Hellström
On Mon, 2021-11-29 at 13:33 +0100, Christian König wrote: > Am 29.11.21 um 13:23 schrieb Thomas Hellström: > > Hi, Christian, > > > > On Mon, 2021-11-29 at 09:21 +0100, Christian König wrote: > > > Am 29.11.21 um 08:35 schrieb Thomas Hellström: > > > > If a dma_fence_array is reported signaled by

Re: [Intel-gfx] [PATCH 14/28] drm/i915: Take object lock in i915_ggtt_pin if ww is not set

2021-11-29 Thread Maarten Lankhorst
On 21-10-2021 19:39, Matthew Auld wrote: > On Thu, 21 Oct 2021 at 11:37, Maarten Lankhorst > wrote: >> i915_vma_wait_for_bind needs the vma lock held, fix the caller. >> >> Signed-off-by: Maarten Lankhorst >> --- >> drivers/gpu/drm/i915/i915_vma.c | 40 +++-- >> 1 fil

Re: [Intel-gfx] [PATCH 13/28] drm/i915: Remove pages_mutex and intel_gtt->vma_ops.set/clear_pages members

2021-11-29 Thread Maarten Lankhorst
On 22-10-2021 12:59, Matthew Auld wrote: > On Thu, 21 Oct 2021 at 18:30, Matthew Auld > wrote: >> On Thu, 21 Oct 2021 at 11:36, Maarten Lankhorst >> wrote: >>> Big delta, but boils down to moving set_pages to i915_vma.c, and removing >>> the special handling, all callers use the defaults anyway.

[PATCH v4 1/2] i915/gvt: Introduce the mmio_info_table.c to support VFIO new mdev API

2021-11-29 Thread Zhi Wang
From: Zhi Wang To support the new mdev interfaces and the re-factor patches from Christoph, which moves the GVT-g code into a dedicated module, the GVT-g initialization path has to be separated into two phases: a) Early initialization. The early initialization of GVT requires to be done when lo

[PATCH v4 2/2] i915/gvt: save the MMIO snapshot in the early init of GVT-g

2021-11-29 Thread Zhi Wang
From: Zhi Wang To support the early init of GVT-g, which will be put in i915, after the GVT-g is moved into a dedicated module, we need to save the MMIO snapshot in the early init of GVT-g, when the HW hasn't been touched. v3: - Fix errors when CONFIG_DRM_I915_WERROR is turned on. (Jani) Cc: C

Re: [PATCH] dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()

2021-11-29 Thread Christian König
Am 29.11.21 um 13:23 schrieb Thomas Hellström: Hi, Christian, On Mon, 2021-11-29 at 09:21 +0100, Christian König wrote: Am 29.11.21 um 08:35 schrieb Thomas Hellström: If a dma_fence_array is reported signaled by a call to dma_fence_is_signaled(), it may leak the PENDING_ERROR status. Fix this

Re: [PATCH] dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()

2021-11-29 Thread Thomas Hellström
Hi, Christian, On Mon, 2021-11-29 at 09:21 +0100, Christian König wrote: > Am 29.11.21 um 08:35 schrieb Thomas Hellström: > > If a dma_fence_array is reported signaled by a call to > > dma_fence_is_signaled(), it may leak the PENDING_ERROR status. > > > > Fix this by clearing the PENDING_ERROR st

Re: [PATCH 22/26] dma-buf: add enum dma_resv_usage

2021-11-29 Thread Christian König
Am 25.11.21 um 16:59 schrieb Daniel Vetter: [SNIP] + * + * For example when asking for WRITE fences then the KERNEL fences are returned + * as well. Similar when asked for READ fences then both WRITE and KERNEL + * fences are returned as well. + */ +enum dma_resv_usage { + /** +* @

[PATCH 23/28] dma-buf: specify usage while adding fences to dma_resv obj v2

2021-11-29 Thread Christian König
Instead of distingting between shared and exclusive fences specify the fence usage while adding fences. Rework all drivers to use this interface instead and deprecate the old one. v2: some kerneldoc comments suggested by Daniel Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c

[PATCH 22/28] dma-buf: add enum dma_resv_usage v3

2021-11-29 Thread Christian König
This change adds the dma_resv_usage enum and allows us to specify why a dma_resv object is queried for its containing fences. Additional to that a dma_resv_usage_rw() helper function is added to aid retrieving the fences for a read or write userspace submission. This is then deployed to the diffe

[PATCH 27/28] amdgpu: remove DMA-buf fence workaround

2021-11-29 Thread Christian König
Not needed any more now we have that inside the framework. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 52 +++-- 2 files changed, 6 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/dr

  1   2   >