[PATCH] dt-bindings: display: anx7814: Add definition for anx7816

2023-09-19 Thread Alicja Michalska
As requested by Robert Foss , this patch adds definition for anx7816. It supplements the patch submitted to dri-devel. Signed-off-by: Alicja Michalska --- .../devicetree/bindings/display/bridge/analogix,anx7814.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetre

[PATCH 0/1] Add missing plane settings when async update

2023-09-19 Thread Hsiao Chien Sung
Fix an issue that plane coordinate was not saved when calling async update. Hsiao Chien Sung (1): drm/mediatek: Add missing plane settings when async update drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.18.0

Re: [PATCH v5 00/14] add support MDP3 on MT8195 platform

2023-09-19 Thread 何宗原
On Fri, 2023-09-15 at 12:27 +0200, Hans Verkuil wrote: > > External email : Please do not click links or open attachments until > you have verified the sender or the content. > Hi Moudy, > > On 12/09/2023 09:57, Moudy Ho wrote: > > Changes since v4: > > - Rebase on v6.6-rc1 > > - Remove a

[PATCH 0/1] Fix errors when reporting rotation capability

2023-09-19 Thread Hsiao Chien Sung
This bug is found when running IGT tests. For CRTCs that doesn't support rotation should still return DRM_MODE_ROTATE_0. Since both OVL and OVL adaptor on MTK chip doesn't support rotation, return the capability of the hardware accordingly. Hsiao Chien Sung (1): drm/mediatek: Fix errors when re

[PATCH v2 02/11] soc: mediatek: Support GCE jump to absolute

2023-09-19 Thread Hsiao Chien Sung
Add a new API to jump to the head of cmdq packet by appending a jump command at the end of it. Signed-off-by: Hsiao Chien Sung --- drivers/soc/mediatek/mtk-cmdq-helper.c | 16 include/linux/soc/mediatek/mtk-cmdq.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/drivers

[PATCH v2 03/11] soc: mediatek: Disable 9-bit alpha in ETHDR

2023-09-19 Thread Hsiao Chien Sung
ETHDR 9-bit alpha should be disabled by default, otherwise alpha blending will not work. Signed-off-by: Hsiao Chien Sung --- drivers/soc/mediatek/mtk-mmsys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c index ffb75711a1da

[PATCH v2 09/11] drm/mediatek: Support CRC in display driver

2023-09-19 Thread Hsiao Chien Sung
Register CRC related function pointers to support CRC retrieval. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 258 +++- drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 39 +++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 35 +++ 3 files chang

[PATCH v2 06/11] drm/mediatek: Support alpha blending in display driver

2023-09-19 Thread Hsiao Chien Sung
Support alpha blending by adding correct blend mode and alpha property in plane initialization. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/

[RFC PATCH v2 1/9] drm/panel: nv3052c: Document known register names

2023-09-19 Thread John Watts
Many of these registers have a known name in the public datasheet. Document them as comments for reference. Signed-off-by: John Watts Reviewed-by: Jessica Zhang --- .../gpu/drm/panel/panel-newvision-nv3052c.c | 261 +- 1 file changed, 132 insertions(+), 129 deletions(-) diff

[PATCH v2] drm/atomic-helper: prevent uaf in wait_for_vblanks

2023-09-19 Thread José Pekkarinen
Kasan reported the following in my system: [ 3935.321003] == [ 3935.321022] BUG: KASAN: slab-use-after-free in drm_atomic_helper_wait_for_vblanks.part.0+0x116/0x450 [drm_kms_helper] [ 3935.321124] Read of size 1 at addr 88818a6f

[PATCH v2 00/11] Support IGT in display driver

2023-09-19 Thread Hsiao Chien Sung
This series adds support for running IGT (Intel GPU Tool) tests with MediaTek display driver. The following changes will be applied: 1. Add a new API for creating GCE thread loop to retrieve CRCs from the hardware component 2. Support hardware CRC calculation in both VDOSYS0 and VDOSYS1 3. Supp

Re: [RFC PATCH v2 3/9] drm/panel: nv3052c: Sleep for 150ms after reset

2023-09-19 Thread John Watts
On Mon, Sep 18, 2023 at 11:34:51PM +0200, Paul Cercueil wrote: > The driver is guaranteed to always reset the panel in sleep-in mode - > as long as the panel was off when the driver started. > > What I'd suggest if you really need to support a case where the panel > was enabled by the bootloader,

[PATCH v2 01/11] soc: mediatek: Add register definitions for GCE

2023-09-19 Thread Hsiao Chien Sung
Add register definitions for GCE so users can use them as a buffer to store data. Signed-off-by: Hsiao Chien Sung --- include/linux/soc/mediatek/mtk-cmdq.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq

[RFC PATCH v2 3/9] drm/panel: nv3052c: Sleep for 150ms after reset

2023-09-19 Thread John Watts
The current code waits after resets for 5 to 20 milliseconds. This is appropriate when resetting a sleeping panel, but an awake panel requires at least 120ms of waiting. Sleep for 150ms so the panel always completes it reset properly. Signed-off-by: John Watts --- drivers/gpu/drm/panel/panel-ne

[PATCH 1/1] drm/mediatek: Add missing plane settings when async update

2023-09-19 Thread Hsiao Chien Sung
Fix an issue that plane coordinate was not saved when calling async update. Fixes: 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update") Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

[PATCH v2 05/11] drm/mediatek: Adjust DRM mode configs for IGT

2023-09-19 Thread Hsiao Chien Sung
IGT (Intel GPU Tool) could commit the following planes during the test: kms_plane: The sub-tests pixel-format-* will create planes with size of 1 or 4512 pixels, these size will be rejected by the original mode configs. Adjust minimum and maximum value of both plane width and height. kms_cursor_

[RFC PATCH v2 8/9] dt-bindings: vendor-prefixes: Add fascontek

2023-09-19 Thread John Watts
Fascontek manufactures LCD panels such as the FS035VG158. Signed-off-by: John Watts Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentat

[RFC PATCH v2 4/9] drm/panel: nv3052c: Wait before entering sleep mode

2023-09-19 Thread John Watts
The panel needs us to wait 120ms between exiting and entering sleep. Guarantee that by always waiting 150ms before entering sleep mode. Signed-off-by: John Watts --- drivers/gpu/drm/panel/panel-newvision-nv3052c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panel/panel

[PATCH v2 08/11] drm/mediatek: Support alpha blending in VDOSYS1

2023-09-19 Thread Hsiao Chien Sung
Support premultiply and coverage alpha blending modes. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 48 ++-- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_ethdr.c b/drivers/gpu/drm/mediatek/mtk_

Re: [RFC PATCH v2 3/9] drm/panel: nv3052c: Sleep for 150ms after reset

2023-09-19 Thread John Watts
On Mon, Sep 18, 2023 at 01:19:03PM -0700, Jessica Zhang wrote: > Hi John, > > Just wondering, is there some context to this change? I.e., was this made to > fix a specific issue? > > This seems like a pretty significant increase in wait time so, if it's not a > fix, I'm not sure if this would be

[PATCH v2 04/11] drm/mediatek: Add OVL compatible name for MT8195

2023-09-19 Thread Hsiao Chien Sung
Add OVL compatible name for MT8195. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 93552d76b6e7..7759a06e5c0e 100644 --- a/driv

[RFC PATCH v2 5/9] drm/panel: nv3052c: Allow specifying registers per panel

2023-09-19 Thread John Watts
Panel initialization registers are per-display and not tied to the controller itself. Different panels will specify their own registers. Attach the sequences to the panel info struct so future panels can specify their own sequences. Signed-off-by: John Watts Reviewed-by: Jessica Zhang --- .../g

[RFC PATCH v2 2/9] drm/panel: nv3052c: Add SPI device IDs

2023-09-19 Thread John Watts
SPI drivers needs their own list of compatible device IDs in order for automatic module loading to work. Add those for this driver. Signed-off-by: John Watts Reviewed-by: Jessica Zhang --- drivers/gpu/drm/panel/panel-newvision-nv3052c.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a

[RFC PATCH v2 7/9] dt-bindings: display: panel: Clean up leadtek, ltk035c5444t properties

2023-09-19 Thread John Watts
Remove common properties listed in common yaml files. Add required properties needed to describe the panel. Signed-off-by: John Watts --- .../bindings/display/panel/leadtek,ltk035c5444t.yaml | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetre

[PATCH v2 07/11] drm/mediatek: Support alpha blending in VDOSYS0

2023-09-19 Thread Hsiao Chien Sung
Support premultiply and coverage alpha blending modes. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 202 +--- 1 file changed, 178 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/

[RFC PATCH v2 0/9] Add FS035VG158 panel

2023-09-19 Thread John Watts
Hello there, This RFC introduces support for the FS035VG158 LCD panel, cleaning up the nv3052c driver on the way and documentating existing panel code. John. v1 -> v2: - Fixed a variable declaration style error - Cleaned up device tree yaml John Watts (9): drm/panel: nv3052c: Document known r

RE: [PATCH v2 1/2] dt-bindings: backlight: Add MPS MP3309C

2023-09-19 Thread Flavio Suligoi
HI Rob, ... > Subject: Re: [PATCH v2 1/2] dt-bindings: backlight: Add MPS MP3309C > ... > > + > > + mps,overvoltage-protection-microvolt: > > +description: Overvoltage protection (13.5V, 24V or 35.5V). If missing, > > the > > + hardware default of 35.5V is used. > > default: 355000

Re: WARNING: CPU: 14 PID: 125 at drivers/gpu/drm/drm_mode_object.c:45 drm_mode_object_add+0x80/0x90 [drm]

2023-09-19 Thread Toralf Förster
On 9/18/23 16:17, Alex Deucher wrote: Yes. Fixed in this commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=69a959610229 Alex A cool, backport is in  6.5.4-rc1 Thx! -- Toralf

Re: [RFC PATCH v2 3/9] drm/panel: nv3052c: Sleep for 150ms after reset

2023-09-19 Thread John Watts
On Mon, Sep 18, 2023 at 11:01:15PM +0200, Paul Cercueil wrote: > The datasheet does say a 5ms sleep time is necesary after a reset. I > assume the 120ms delay you quote is when a *software* reset is > performed in Sleep-out mode. The code here does a hard-reset. > > Cheers, > -Paul Hello Paul, S

[PATCH v2 11/11] drm/mediatek: Support CRC in VDOSYS1

2023-09-19 Thread Hsiao Chien Sung
We choose Mixer as CRC generator in VDOSYS1 since its frame done event will trigger vblanks, we can know when is safe to retrieve CRC of the frame. In VDOSYS1, there's no image procession after Mixer, unlike OVL in VDOSYS0, Mixer's CRC will include all the effects that are applied to the frame. S

[RFC PATCH v2 9/9] dt-bindings: display: panel: add Fascontek FS035VG158 panel

2023-09-19 Thread John Watts
This is a small 3.5" 640x480 IPS LCD panel. Signed-off-by: John Watts --- .../display/panel/fascontek,fs035vg158.yaml | 56 +++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/fascontek,fs035vg158.yaml diff --git a/Documen

Re: [PATCH 1/2] video: fbdev: core: cfbcopyarea: fix sloppy typing

2023-09-19 Thread Helge Deller
On 9/18/23 22:52, Sergey Shtylyov wrote: In cfb_copyarea(), when initializing *unsigned long const* bits_per_line __u32 typed fb_fix_screeninfo::line_length gets multiplied by 8u -- which might overflow __u32; multiplying by 8UL instead should fix that... Also, that bits_per_line constant is used

Re: [PATCH 2/2] video: fbdev: core: syscopyarea: fix sloppy typing

2023-09-19 Thread Helge Deller
On 9/18/23 22:52, Sergey Shtylyov wrote: In sys_copyarea(), when initializing *unsigned long const* bits_per_line __u32 typed fb_fix_screeninfo::line_length gets multiplied by 8u -- which might overflow __u32; multiplying by 8UL instead should fix that... Also, that bits_per_line constant is used

Re: [RFT PATCH 5/6] drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers

2023-09-19 Thread Tomi Valkeinen
On 02/09/2023 02:39, Douglas Anderson wrote: Based on grepping through the source code these drivers appear to be missing a call to drm_atomic_helper_shutdown() at system shutdown time and at driver remove (or unbind) time. Among other things, this means that if a panel is in use that it won't be

[PATCH] drm/tilcdc: Fix irq free on unload

2023-09-19 Thread Tomi Valkeinen
false; + priv->irq_enabled = true; return 0; } --- base-commit: 0663e1da5ba8e6459e3555ac12c62741668c0d30 change-id: 20230919-lcdc-9e09e94f4e93 Best regards, -- Tomi Valkeinen

Re: [RFT PATCH 2/6] drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers

2023-09-19 Thread Tomi Valkeinen
On 02/09/2023 02:39, Douglas Anderson wrote: Based on grepping through the source code these drivers appear to be missing a call to drm_atomic_helper_shutdown() at system shutdown time. Among other things, this means that if a panel is in use that it won't be cleanly powered off at system shutdow

Re: [PATCH] drm/mediatek: Add spinlock for setting vblank event in atomic_begin

2023-09-19 Thread 林睿祥

Re: [RFC][PATCH v2 0/2] drm/panic: Add a drm panic handler

2023-09-19 Thread Jocelyn Falempe
On 19/09/2023 01:19, Noralf Trønnes wrote: Hi, On 9/15/23 10:28, Jocelyn Falempe wrote: This introduces a new drm panic handler, which displays a message when a panic occurs. So when fbcon is disabled, you can still see a kernel panic. This is one of the missing feature, when disabling VT/fbc

Re: Decrypting tt maps in ttm

2023-09-19 Thread Christian König
Am 19.09.23 um 08:56 schrieb Thomas Hellström: On 9/19/23 07:39, Christian König wrote: Am 19.09.23 um 03:26 schrieb Zack Rusin: On Mon, 2023-09-18 at 16:21 -0400, Alex Deucher wrote: !! External Email On Mon, Sep 18, 2023 at 3:06 PM Thomas Hellström wrote: On 9/18/23 17:52, Zack Rusin wr

[REGRESSION] [BISECTED] Panic in gen8_ggtt_insert_entries() with v6.5

2023-09-19 Thread Oleksandr Natalenko
/cc Matthew Wilcox and Andrew Morton because of folios (please see below). On sobota 2. září 2023 18:14:12 CEST Oleksandr Natalenko wrote: > Hello. > > Since v6.5 kernel the following HW: > > * Lenovo T460s laptop with Skylake GT2 [HD Graphics 520] (rev 07) > * Lenovo T490s laptop with WhiskeyLa

Re: [RFC 1/4] accel/ivpu: Allocate vpu_addr in gem->open() callback

2023-09-19 Thread Stanislaw Gruszka
On Mon, Sep 11, 2023 at 09:19:03AM -0600, Jeffrey Hugo wrote: > On 9/1/2023 10:48 AM, Stanislaw Gruszka wrote: > > From: Jacek Lawrynowicz > > > > gem->open() is called during handle creation for a gem object. > > It is called during prime import and in BO_CREATE ioctl. > > I feel like the "why"

Re: [RFT PATCH 03/15] drm/ingenic: Call drm_atomic_helper_shutdown() at shutdown time

2023-09-19 Thread Maxime Ripard
On Thu, Sep 14, 2023 at 03:29:16PM -0700, Doug Anderson wrote: > Hi, > > On Thu, Sep 14, 2023 at 1:14 AM Maxime Ripard wrote: > > > > > > So it doesn't have any relationship with the unbind/remove timing, and > > > > for all we know it can be there indefinitely, while the application > > > > cont

Re: [PATCH v3 1/7] drm/msm/dp: tie dp_display_irq_handler() with dp driver

2023-09-19 Thread Dmitry Baryshkov
On Mon, 18 Sept 2023 at 20:03, Kuogee Hsieh wrote: > > > On 9/15/2023 5:29 PM, Dmitry Baryshkov wrote: > > On Sat, 16 Sept 2023 at 00:38, Kuogee Hsieh wrote: > >> Currently the dp_display_irq_handler() is executed at msm_dp_modeset_init() > >> which ties irq registration to the DPU device's life

Re: [PATCH v3 2/7] drm/msm/dp: replace is_connected with link_ready

2023-09-19 Thread Dmitry Baryshkov
On Mon, 18 Sept 2023 at 20:09, Kuogee Hsieh wrote: > > > On 9/15/2023 6:51 PM, Dmitry Baryshkov wrote: > > On Sat, 16 Sept 2023 at 00:38, Kuogee Hsieh wrote: > >> The is_connected flag is set to true after DP mainlink successfully > >> finish link training. Replace the is_connected flag with link

Re: [PATCH v3 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes

2023-09-19 Thread Dmitry Baryshkov
On Mon, 18 Sept 2023 at 23:16, Kuogee Hsieh wrote: > > > On 9/15/2023 5:41 PM, Dmitry Baryshkov wrote: > > On Sat, 16 Sept 2023 at 00:38, Kuogee Hsieh wrote: > >> Currently DP driver use drm_helper_hpd_irq_event(), bypassing drm bridge > >> framework, to report HPD status changes to user space fr

Re: [PATCH v11] drm: Add initial ci/ subdirectory

2023-09-19 Thread Maxime Ripard
On Fri, Sep 15, 2023 at 04:08:42PM +0100, Daniel Stone wrote: > > > I don't quite see the same picture from your side though. For example, > > > my reading of what you've said is that flaky tests are utterly > > > unacceptable, as are partial runs, and we shouldn't pretend otherwise. > > > With you

Re: [RFC 3/4] accel/ivpu: Remove support for uncached buffers

2023-09-19 Thread Stanislaw Gruszka
On Mon, Sep 11, 2023 at 09:24:42AM -0600, Jeffrey Hugo wrote: > On 9/1/2023 10:48 AM, Stanislaw Gruszka wrote: > > From: Jacek Lawrynowicz > > > > Usages of DRM_IVPU_BO_UNCACHED should be replaced by DRM_IVPU_BO_WC. > > There is no functional benefit from DRM_IVPU_BO_UNCACHED if these > > buffers

Re: [PATCH v3 6/7] drm/msm/dp: add pm_runtime_force_suspend()/resume()

2023-09-19 Thread Dmitry Baryshkov
On Mon, 18 Sept 2023 at 20:48, Kuogee Hsieh wrote: > > > On 9/15/2023 6:21 PM, Dmitry Baryshkov wrote: > > On Sat, 16 Sept 2023 at 00:38, Kuogee Hsieh wrote: > >> Add pm_runtime_force_suspend()/resume() to complete incorporating pm > >> runtime framework into DP driver. Both dp_pm_prepare() and d

Re: [PATCH][V3] drm/amd/display: Remove unwanted drm edid references

2023-09-19 Thread Jani Nikula
On Mon, 18 Sep 2023, Alex Hung wrote: > [WHY] > edid_override and drm_edid_override_connector_update, according to drm > documentation, should not be referred outside drm_edid. > > [HOW] > Remove and replace them accordingly. This can tested by IGT's > kms_hdmi_inject test. > > Signed-off-by: Alex

Re: [PATCH v11] drm: Add initial ci/ subdirectory

2023-09-19 Thread Maxime Ripard
On Mon, Sep 18, 2023 at 06:35:13PM -0300, Helen Koike wrote: > > > > I don't quite see the same picture from your side though. For example, > > > > my reading of what you've said is that flaky tests are utterly > > > > unacceptable, as are partial runs, and we shouldn't pretend otherwise. > > > > W

Re: [PATCH] drm/meson: fix memory leak on ->hpd_notify callback

2023-09-19 Thread Jani Nikula
On Fri, 15 Sep 2023, Neil Armstrong wrote: > On 14/09/2023 15:10, Jani Nikula wrote: >> The EDID returned by drm_bridge_get_edid() needs to be freed. >> >> Fixes: 0af5e0b41110 ("drm/meson: encoder_hdmi: switch to bridge >> DRM_BRIDGE_ATTACH_NO_CONNECTOR") >> Cc: Neil Armstrong >> Cc: Sam Ravnbo

[PATCH 1/3] accel/habanalabs: remove unused asic functions

2023-09-19 Thread Oded Gabbay
asic_dma_{un}map_single() asic-specific functions are no longer called from the common code, so delete these functions. In addition, delete the gaudi2 implementation as they are also not called. Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 8 drivers/a

[PATCH 2/3] accel/habanalabs: add traces for dma mappings

2023-09-19 Thread Oded Gabbay
From: Ohad Sharabi In order to get a full picture of DMA mappings (e.g. to track DMAR errors), DMA mappings APIs should be covered. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- include/trace/events/habanalabs.h | 43 +++ 1 fi

[PATCH 3/3] accel/habanalabs: trace dma map sgtable

2023-09-19 Thread Oded Gabbay
From: Ohad Sharabi Traces the DMA [un]map_sgtable using the new traces we added. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 46 +++- drivers/accel/habanalabs/common/habanalabs.h | 25 +

Re: [PATCH v3 1/4] drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man

2023-09-19 Thread Karolina Stolarek
On 18.09.2023 14:45, Christian König wrote: Am 18.09.23 um 13:48 schrieb Karolina Stolarek: On 12.09.2023 14:54, Christian König wrote: Am 12.09.23 um 13:49 schrieb Karolina Stolarek: Test initialization of ttm_resource using different memory domains. Add tests for a system memory manager and

[PATCH] drm: exynos: dsi: Convert to platform remove callback returning void

2023-09-19 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve he

[LINUX KERNEL PATCH v5 0/1] add freeze_mode for virtio_pci and add S3 support for virtgpu

2023-09-19 Thread Jiqian Chen
Hi all, This is the v5 of kernel patches and v5 makes below changes: * Since this series patches add a new mechanism that let virtgpu and Qemu can negotiate their reset behavior, and other guys hope me can improve this mechanism to virtio pci level, so that other virtio devices can also benef

[LINUX KERNEL PATCH v5 1/2] virtio_pci: Add freeze_mode for virtio_pci_common_cfg

2023-09-19 Thread Jiqian Chen
When guest vm does S3, Qemu will reset and clear some things of virtio devices, but guest can't aware that, so that may cause some problems. For excample, Qemu calls virtio_reset->virtio_gpu_gl_reset, that will destroy render resources of virtio-gpu. As a result, after guest resume, the display can

[LINUX KERNEL PATCH v5 2/2] virtgpu: Add freeze and restore func to reinit vqs

2023-09-19 Thread Jiqian Chen
When we suspended guest VM, it called into Qemu to call virtio_reset->__virtio_queue_reset, this cleared all virtqueue information of virtgpu on Qemu end, but guest kernel still keep the virtqueus. As a result, after guest resumed, if guest sent ctrl/cursor requests to Qemu through virtqueue, but n

Re: [PATCH 10/10] arm64: dts: mt8195-cherry: Add secure mbox settings for vdosys

2023-09-19 Thread AngeloGioacchino Del Regno
Il 19/09/23 05:03, Jason-JH.Lin ha scritto: Add a secure mailbox channel to support secure video path on vdosys0 and vdosys1. Signed-off-by: Jason-JH.Lin --- arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/me

Re: [PATCH] drm/mediatek: Add spinlock for setting vblank event in atomic_begin

2023-09-19 Thread AngeloGioacchino Del Regno
Il 19/09/23 09:37, Jason-JH Lin (林睿祥) ha scritto: Hi Angelo Thanks for the reviews. Hi Fei, Thanks for the testing. On Mon, 2023-09-18 at 18:47 +0800, Fei Shao wrote: External email : Please do not click links or open attachments until you have verified the sender or the content.

Re: [PATCH] drm/mediatek/dp: fix memory leak on ->get_edid callback audio detection

2023-09-19 Thread Jani Nikula
On Fri, 15 Sep 2023, Chen-Yu Tsai wrote: > On Thu, Sep 14, 2023 at 11:53 PM Jani Nikula wrote: >> >> The sads returned by drm_edid_to_sad() needs to be freed. >> >> Fixes: e71a8ebbe086 ("drm/mediatek: dp: Audio support for MT8195") >> Cc: Guillaume Ranquet >> Cc: Bo-Chen Chen >> Cc: AngeloGioac

Re: [PATCH] drm/mediatek/dp: fix memory leak on ->get_edid callback audio detection

2023-09-19 Thread Chen-Yu Tsai
On Tue, Sep 19, 2023 at 7:02 PM Jani Nikula wrote: > > On Fri, 15 Sep 2023, Chen-Yu Tsai wrote: > > On Thu, Sep 14, 2023 at 11:53 PM Jani Nikula wrote: > >> > >> The sads returned by drm_edid_to_sad() needs to be freed. > >> > >> Fixes: e71a8ebbe086 ("drm/mediatek: dp: Audio support for MT8195")

Re: [PATCH v4 00/10] DRM scheduler changes for Xe

2023-09-19 Thread Danilo Krummrich
Hi Matt, On 9/19/23 07:01, Matthew Brost wrote: As a prerequisite to merging the new Intel Xe DRM driver [1] [2], we have been asked to merge our common DRM scheduler patches first. This a continuation of a RFC [3] with all comments addressed, ready for a full review, and hopefully in state whi

[PATCH] drm/i915: Fix aux invalidation with proper pipe_control flag

2023-09-19 Thread Nirmoy Das
The suggestion from the spec is to do l3 fabric flush not L3 flush. Fixes: 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before invalidation") Cc: Jonathan Cavitt Cc: Andi Shyti Cc: # v5.8+ Cc: Nirmoy Das Cc: Andrzej Hajda Cc: Tvrtko Ursulin Cc: Matt Roper Cc: Lucas De Marchi Cc: Teja

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-19 Thread Christian König
Am 13.09.23 um 17:46 schrieb Danilo Krummrich: On 9/13/23 17:33, Christian König wrote: Am 13.09.23 um 17:15 schrieb Danilo Krummrich: On 9/13/23 16:26, Christian König wrote: Am 13.09.23 um 14:16 schrieb Danilo Krummrich: As mentioned in a different mail thread, the reply is based on the ass

Re: [PATCH] drm/meson: fix memory leak on ->hpd_notify callback

2023-09-19 Thread neil . armstrong
On 19/09/2023 11:54, Jani Nikula wrote: On Fri, 15 Sep 2023, Neil Armstrong wrote: On 14/09/2023 15:10, Jani Nikula wrote: The EDID returned by drm_bridge_get_edid() needs to be freed. Fixes: 0af5e0b41110 ("drm/meson: encoder_hdmi: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR") Cc: Neil A

Re: [PATCH] drm/i915: Fix aux invalidation with proper pipe_control flag

2023-09-19 Thread Andi Shyti
Hi Nirmoy, On Tue, Sep 19, 2023 at 01:47:16PM +0200, Nirmoy Das wrote: > The suggestion from the spec is to do l3 fabric flush not L3 flush. > > Fixes: 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before > invalidation") please put this in one line. > Cc: Jonathan Cavitt > Cc: Andi Shyti

[PATCH] drm/tests: Remove slow tests

2023-09-19 Thread Maxime Ripard
Both the drm_buddy and drm_mm tests have been converted from selftest to kunit recently. However, both share the same "exploratary" nature and will, in each test, try to discover bugs over multiple iterations and random variations of their parameters. This is fine in itself but leads to very slow

Re: [PATCH v10 3/4] drm: renesas: Add RZ/G2L DU Support

2023-09-19 Thread Jacopo Mondi
Hi Biju On Mon, Sep 18, 2023 at 08:09:58AM +, Biju Das wrote: > Hi Jacopo Mondi, > > Looks like you are happy with my response for V10. I will send V11 soon. Sorry for the late reply.. See below, I only see two "controversial" points > > Cheers, > Biju > > > -Original Message- > > F

Re: [PATCH] drm/i915: Fix aux invalidation with proper pipe_control flag

2023-09-19 Thread Tapani Pälli
On 19.9.2023 15.11, Andi Shyti wrote: Hi Nirmoy, On Tue, Sep 19, 2023 at 01:47:16PM +0200, Nirmoy Das wrote: The suggestion from the spec is to do l3 fabric flush not L3 flush. Fixes: 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before invalidation") please put this in one line. Cc:

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-19 Thread Thomas Hellström
Hi Christian On 9/19/23 14:07, Christian König wrote: Am 13.09.23 um 17:46 schrieb Danilo Krummrich: On 9/13/23 17:33, Christian König wrote: Am 13.09.23 um 17:15 schrieb Danilo Krummrich: On 9/13/23 16:26, Christian König wrote: Am 13.09.23 um 14:16 schrieb Danilo Krummrich: As mentioned in

Re: [PATCH 2/4] drm/i915/vlv_dsi: Add DMI quirk for wrong I2C bus and panel size on Lenovo Yoga Tablet 2 series (v2)

2023-09-19 Thread Jani Nikula
On Sat, 16 Sep 2023, Hans de Goede wrote: > On the Lenovo Yoga Tablet 2 830 / 1050 there are 2 problems: > > 1. The I2C MIPI sequence elements reference bus 3. ACPI has I2C1 - I2C7 >which under Linux become bus 0 - 6. And the MIPI sequence reference >to bus 3 is indented for I2C3 which is

Re: [PATCH] drm/i915: Fix aux invalidation with proper pipe_control flag

2023-09-19 Thread Andrzej Hajda
On 19.09.2023 13:47, Nirmoy Das wrote: The suggestion from the spec is to do l3 fabric flush not L3 flush. Fixes: 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before invalidation") Cc: Jonathan Cavitt Cc: Andi Shyti Cc: # v5.8+ Cc: Nirmoy Das Cc: Andrzej Hajda Cc: Tvrtko Ursulin C

[PATCH] MAINTAINERS: Update drm-misc entry to match all drivers

2023-09-19 Thread Maxime Ripard
We've had a number of times when a patch slipped through and we couldn't pick them up either because our MAINTAINERS entry only covers the framework and thus we weren't Cc'd. Let's take another approach where we match everything, and remove all the drivers that are not maintained through drm-misc.

Re: [REGRESSION] [BISECTED] Panic in gen8_ggtt_insert_entries() with v6.5

2023-09-19 Thread Oleksandr Natalenko
/cc Bagas as well (see below). On úterý 19. září 2023 10:26:42 CEST Oleksandr Natalenko wrote: > /cc Matthew Wilcox and Andrew Morton because of folios (please see below). > > On sobota 2. září 2023 18:14:12 CEST Oleksandr Natalenko wrote: > > Hello. > > > > Since v6.5 kernel the following HW: >

[PATCH] omap: dsi: do not WARN on detach if dsidev was never attached

2023-09-19 Thread H. Nikolaus Schaller
dsi_init_output() called by dsi_probe() may fail. In that case mipi_dsi_host_unregister() is called which may call omap_dsi_host_detach() with uninitialized dsi->dsidev because omap_dsi_host_attach() was never called before. This happens if the panel driver asks for an EPROBE_DEFER. So let's supp

Re: [PATCH] MAINTAINERS: Update drm-misc entry to match all drivers

2023-09-19 Thread Jani Nikula
On Tue, 19 Sep 2023, Maxime Ripard wrote: > We've had a number of times when a patch slipped through and we couldn't > pick them up either because our MAINTAINERS entry only covers the > framework and thus we weren't Cc'd. > > Let's take another approach where we match everything, and remove all >

Re: [PATCH v2] drm/simpledrm: Add support for multiple "power-domains"

2023-09-19 Thread Javier Martinez Canillas
"Sven Peter" writes: > Hi, > > > On Mon, Sep 18, 2023, at 09:11, Thomas Zimmermann wrote: >> Hi >> >> Am 12.09.23 um 22:22 schrieb Janne Grunau via B4 Relay: >>> From: Janne Grunau >>> >>> Multiple power domains need to be handled explicitly in each driver. The >>> driver core can not handle it

Re: [Intel-gfx] [REGRESSION] [BISECTED] Panic in gen8_ggtt_insert_entries() with v6.5

2023-09-19 Thread Bagas Sanjaya
On Tue, Sep 19, 2023 at 03:23:28PM +0200, Oleksandr Natalenko wrote: > /cc Bagas as well (see below). > > On úterý 19. září 2023 10:26:42 CEST Oleksandr Natalenko wrote: > > /cc Matthew Wilcox and Andrew Morton because of folios (please see below). > > > > On sobota 2. září 2023 18:14:12 CEST Ole

Re: [REGRESSION] Panic in gen8_ggtt_insert_entries() with v6.5

2023-09-19 Thread Bagas Sanjaya
On Sat, Sep 02, 2023 at 06:14:12PM +0200, Oleksandr Natalenko wrote: > Hello. > > Since v6.5 kernel the following HW: > > * Lenovo T460s laptop with Skylake GT2 [HD Graphics 520] (rev 07) > * Lenovo T490s laptop with WhiskeyLake-U GT2 [UHD Graphics 620] (rev 02) > > is affected by the following

Re: [Intel-gfx] [REGRESSION] [BISECTED] Panic in gen8_ggtt_insert_entries() with v6.5

2023-09-19 Thread Oleksandr Natalenko
On úterý 19. září 2023 16:03:03 CEST Bagas Sanjaya wrote: > … > > > [1] https://gitlab.freedesktop.org/drm/intel/-/issues/9256 > > > > Bagas, > > > > would you mind adding this to the regression tracker please? > > > > Will add shortly, thanks! Thank you. Please consider correcting the title

[GIT PULL] drm: renesas: shmobile: Atomic conversion + DT support (was: Re: [PATCH v4 00/41] drm: renesas: shmobile: Atomic conversion + DT support)

2023-09-19 Thread Geert Uytterhoeven
Hi David, Daniel, The following changes since commit 0663e1da5ba8e6459e3555ac12c62741668c0d30: drm/dp_mst: Tune down error message during payload addition (2023-09-18 16:38:21 +0300) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.

Re: [PATCH -next] drm: xlnx: zynqmp_dpsub: Use devm_clk_get_enabled() helper function

2023-09-19 Thread Tomi Valkeinen
On 29/08/2023 10:55, Laurent Pinchart wrote: Hi Jinjie, (CC'ing Tomi) Thank you for the patch. On Fri, Aug 25, 2023 at 03:23:24PM +0800, Jinjie Ruan wrote: The devm_clk_get_enabled() helper: - calls devm_clk_get() - calls clk_prepare_enable() and registers what is needed in order to

[PATCH v4 1/4] drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man

2023-09-19 Thread Karolina Stolarek
Test initialization of ttm_resource using different memory domains. Add tests for a system memory manager and functions that can be tested without a fully-featured resource manager. Update ttm_bo_kunit_init() to initialize BO's kref and a genuine GEM drm object. Export ttm_resource_alloc for test p

[PATCH v4 3/4] drm/ttm/tests: Add tests for ttm_bo functions

2023-09-19 Thread Karolina Stolarek
Test reservation and release of TTM buffer objects. Add tests to check pin and unpin operations. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/Makefile| 1 + drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 619 ++ drivers/gpu/drm/ttm/tests/ttm_kunit

[PATCH v4 2/4] drm/ttm/tests: Add tests for ttm_tt

2023-09-19 Thread Karolina Stolarek
Test initialization, creation and destruction of ttm_tt instances. Export ttm_tt_destroy and ttm_tt_create symbols for testing purposes. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/Makefile| 1 + drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 20 ++ drivers/gpu

[PATCH v4 4/4] drm/ttm/tests: Fix argument in ttm_tt_kunit_init()

2023-09-19 Thread Karolina Stolarek
Remove a leftover definition of page order and pass an empty flag value in ttm_pool_pre_populated(). Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/tests/ttm_pool_test.c b/d

[PATCH v4 0/4] Improve test coverage of TTM

2023-09-19 Thread Karolina Stolarek
Add tests for building blocks of the TTM subsystem, such as ttm_resource, ttm_resource_manager, ttm_tt and ttm_buffer_object. This series covers basic functions such as initialization, allocation and clean-up of each struct. Testing of ttm_buffer_object also includes locking and unlocking the objec

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-19 Thread Danilo Krummrich
On 9/19/23 14:21, Thomas Hellström wrote: Hi Christian On 9/19/23 14:07, Christian König wrote: Am 13.09.23 um 17:46 schrieb Danilo Krummrich: On 9/13/23 17:33, Christian König wrote: Am 13.09.23 um 17:15 schrieb Danilo Krummrich: On 9/13/23 16:26, Christian König wrote: Am 13.09.23 um 14:1

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-19 Thread Thomas Hellström
On 9/19/23 17:16, Danilo Krummrich wrote: On 9/19/23 14:21, Thomas Hellström wrote: Hi Christian On 9/19/23 14:07, Christian König wrote: Am 13.09.23 um 17:46 schrieb Danilo Krummrich: On 9/13/23 17:33, Christian König wrote: Am 13.09.23 um 17:15 schrieb Danilo Krummrich: On 9/13/23 16:26

Re: [GIT PULL] drm: renesas: shmobile: Atomic conversion + DT support (was: Re: [PATCH v4 00/41] drm: renesas: shmobile: Atomic conversion + DT support)

2023-09-19 Thread Laurent Pinchart
On Tue, Sep 19, 2023 at 04:28:40PM +0200, Geert Uytterhoeven wrote: > Hi David, Daniel, > > The following changes since commit 0663e1da5ba8e6459e3555ac12c62741668c0d30: > > drm/dp_mst: Tune down error message during payload addition > (2023-09-18 16:38:21 +0300) > > are available in the Git re

Re: [REGRESSION] [BISECTED] Panic in gen8_ggtt_insert_entries() with v6.5

2023-09-19 Thread Matthew Wilcox
On Tue, Sep 19, 2023 at 10:26:42AM +0200, Oleksandr Natalenko wrote: > Andrzej asked me to try to revert commits 0b62af28f249, e0b72c14d8dc and > 1e0877d58b1e, and reverting those fixed the i915 crash for me. The > e0b72c14d8dc and 1e0877d58b1e commits look like just prerequisites, so I > assume

Re: [REGRESSION] [BISECTED] Panic in gen8_ggtt_insert_entries() with v6.5

2023-09-19 Thread Matthew Wilcox
On Tue, Sep 19, 2023 at 04:43:41PM +0100, Matthew Wilcox wrote: > Could I ask you to try this patch? I'll follow up with another patch > later because I think I made another assumption that may not be valid. Ah, no, never mind. I thought we could start in the middle of a folio, but we always sta

Re: [PATCH 01/15] dt-bindings: mailbox: Add property for CMDQ secure driver

2023-09-19 Thread Rob Herring
On Tue, Sep 19, 2023 at 03:21:50AM +0800, Jason-JH.Lin wrote: > Add mboxes to define a GCE loopping thread as a secure irq handler. > Add mediatek,event to define a GCE software event siganl as a secure > irq. > > These 2 properties are required for CMDQ secure driver. > > Signed-off-by: Jason-JH

Re: [PATCH] drm/atomic-helper: prevent uaf in wait_for_vblanks

2023-09-19 Thread Michel Dänzer
On 9/18/23 18:53, José Pekkarinen wrote: > Kasan reported the following in my system: > > [ 3935.321003] > == > [ 3935.321022] BUG: KASAN: slab-use-after-free in > drm_atomic_helper_wait_for_vblanks.part.0+0x116/0x450 [drm_kms_helpe

Re: [PATCH v3 1/1] backlight: hid_bl: Add VESA VCP HID backlight driver

2023-09-19 Thread Julius Zint
On Wed, 6 Sep 2023, Hans de Goede wrote: > Hi Julius, > > On 9/4/23 21:02, Julius Zint wrote: > > > > > > On Mon, 4 Sep 2023, Thomas Weißschuh wrote: > > > >> +Cc Hans who ins involved with the backlight subsystem > >> > >> Hi Julius, > >> > >> today I stumbled upon a mail from Hans [0], whi

[PATCH] drm: remove drm_bridge_hpd_disable() from drm_bridge_connector_destroy()

2023-09-19 Thread Abhinav Kumar
drm_bridge_hpd_enable()/drm_bridge_hpd_disable() callbacks call into the respective driver's hpd_enable()/hpd_disable() ops. These ops control the HPD enable/disable logic which in some cases like MSM can be a dedicate hardware block to control the HPD. During probe_defer cases, a connector can be

Re: [PATCH] dt-bindings: display: anx7814: Add definition for anx7816

2023-09-19 Thread Rob Herring
On Mon, Sep 18, 2023 at 11:49:44PM +0200, Alicja Michalska wrote: > As requested by Robert Foss , this patch adds > definition for anx7816. It supplements the patch submitted to dri-devel. Please apply with the driver change. > > Signed-off-by: Alicja Michalska > --- > .../devicetree/bindings/

Re: [PATCH] dt-bindings: display: anx7814: Add definition for anx7816

2023-09-19 Thread Rob Herring
On Mon, 18 Sep 2023 23:49:44 +0200, Alicja Michalska wrote: > As requested by Robert Foss , this patch adds > definition for anx7816. It supplements the patch submitted to dri-devel. > > Signed-off-by: Alicja Michalska > --- > .../devicetree/bindings/display/bridge/analogix,anx7814.yaml |

  1   2   >