Re: [Intel-gfx] [PATCH v5] drm/i915: Make IRQ reset and postinstall multi-gt aware

2023-04-18 Thread Andrzej Hajda
On 18.04.2023 01:53, Andi Shyti wrote: In multi-gt systems IRQs need to be reset and enabled per GT. This might add some redundancy when handling interrupts for engines that might not exist in every tile, but helps to keep the code cleaner and more understandable. Signed-off-by: Andi Shyti Cc:

Re: [Intel-gfx] [PATCH] drm/i915/guc/slpc: Provide sysfs for efficient freq

2023-04-18 Thread Andi Shyti
Hi Vinay, On Mon, Apr 17, 2023 at 11:04:31PM -0700, Belgaumkar, Vinay wrote: > > On 4/17/2023 6:39 PM, Andi Shyti wrote: > > Hi Vinay, > > > > Looks good, just few minor comments below, > > > > [...] > > > > > @@ -267,13 +267,11 @@ static int run_test(struct intel_gt *gt, int > > > test_type)

Re: Integer overflow leads to uninitialization vulnerability in amdgpu_cs_parser_init

2023-04-18 Thread whitehat002 whitehat002
Sorry, I found that the latest code function has become amdgpu_cs_pass1, and radeon_cs_parser_init has the same problem.And i will send the patch. whitehat002 whitehat002 于2023年4月18日周二 11:39写道: > Hello, > > I am going to file a security bug. > > VULNERABILITY DETAILS > > ioctl$AMDGPU_CS will cal

[PATCH 2/2] ata: libata-core: Apply ATI NCQ horkage to ASPEED as well

2023-04-18 Thread Patrick McLean
We have some machines with ASPEED SATA controllers, and are seeing the same NCQ issues that ATI controllers (I am not sure if it's a rebranded ATI controller, or they both have some faulty implementation). This NCQ breakage is consistent across a few different types of drives. Instead of maintaini

Integer overflow leads to uninitialization vulnerability in amdgpu_cs_parser_init

2023-04-18 Thread whitehat002 whitehat002
Hello, I am going to file a security bug. VULNERABILITY DETAILS ioctl$AMDGPU_CS will call amdgpu_cs_ioctl which will call amdgpu_cs_parser_init. The type of size is unsigned(4 bytes)[1]. And size is assigned from p->chunks[i].length_dw[2] which is assigned from user_chunk.length_dw[3], which typ

[PATCH 1/2] gpu: Move ASPEED vendor ID definition to pci_ids.h

2023-04-18 Thread Patrick McLean
Currently the ASPEED PCI vendor ID is defined in drivers/gpu/drm/ast/ast_drv.c, move that to include/linux/pci_ids.h with all the rest of the PCI vendor ID definitions. Rename the definition to follow the format that the other definitions follow. Signed-off-by: Patrick McLean --- drivers/gpu/drm

Re: [PATCH 1/5] dt-bindings: display/msm: Add reg bus interconnect

2023-04-18 Thread Krzysztof Kozlowski
On 17/04/2023 17:30, Konrad Dybcio wrote: > Apart from the already handled data bus (MAS_MDP_Pn<->DDR), there's > another path that needs to be handled to ensure MDSS functions properly, > namely the "reg bus", a.k.a the CPU-MDSS interconnect. > > Gating that path may have a variety of effects.. f

Re: [PATCH] drm/ast: Fix ARM compatibility

2023-04-18 Thread Thomas Zimmermann
Hi Am 18.04.23 um 03:23 schrieb Jammy Huang: Hi Thomas, The Intel(x86) CPUs have a separate address space for "IO", but the ARM architecture only has "memory", so all IO devices are accessed as if they were memory. Which means ARM does not support isolated IO. Here is a related discussion on

Re: [PATCH v3 00/19] arch: Consolidate

2023-04-18 Thread Thomas Zimmermann
Hi Am 17.04.23 um 16:12 schrieb Arnd Bergmann: On Mon, Apr 17, 2023, at 14:56, Thomas Zimmermann wrote: Various architectures provide with helpers for fbdev framebuffer devices. Share the contained code where possible. There is already , which implements generic (as in 'empty') functions of th

Re: [PATCH v2 1/5] drm: shmobile: Use %p4cc to print fourcc codes

2023-04-18 Thread Laurent Pinchart
Hi Geert, Thank you for the patch. On Mon, Apr 17, 2023 at 03:40:21PM +0200, Geert Uytterhoeven wrote: > Replace the printing of hexadecimal fourcc format codes by > pretty-printed format names, using the "%p4cc" format specifier. > > Signed-off-by: Geert Uytterhoeven > Reviewed-by: Thomas Zimm

Re: [PATCH v2 0/5] drm: shmobile: Fixes and enhancements

2023-04-18 Thread Laurent Pinchart
Hi Geert, On Mon, Apr 17, 2023 at 03:40:20PM +0200, Geert Uytterhoeven wrote: > Hi all, > > Currently, there are two drivers for the LCD controller on Renesas > SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs: > 1. sh_mobile_lcdcfb, using the fbdev framework, > 2. shmob_drm, usin

Re: [PATCH 1/3] drm/msm/dpu: Drop unused members from HW structs

2023-04-18 Thread Marijn Suijten
On 2023-04-17 18:54:18, Abhinav Kumar wrote: > > On 4/17/2023 4:14 PM, Marijn Suijten wrote: > > Some of these members were initialized while never read, while others > > were not even assigned any value at all. Drop them to save some space, > > and above all confusion when looking at these membe

Re: [PATCH] drm/ast: Fix ARM compatibility

2023-04-18 Thread Jammy Huang
Hi Thomas, Thanks for you reminder. The comment you mentioned is added in 2014 for AST2400 rev 0x20, which means MMIO is not enable by default before that revision. I will send another patch to handle it. On 2023/4/18 下午 03:24, Thomas Zimmermann wrote: Hi Am 18.04.23 um 03:23 schrieb Jammy

Re: [PATCH 2/2] ata: libata-core: Apply ATI NCQ horkage to ASPEED as well

2023-04-18 Thread Damien Le Moal
On 4/18/23 14:24, Christoph Hellwig wrote: > On Mon, Apr 17, 2023 at 06:17:20PM -0700, Patrick McLean wrote: >> We have some machines with ASPEED SATA controllers, and are seeing the same >> NCQ >> issues that ATI controllers (I am not sure if it's a rebranded ATI >> controller, >> or they both h

Re: [PATCH v2 0/5] drm: shmobile: Fixes and enhancements

2023-04-18 Thread Geert Uytterhoeven
Hi Laurent, On Tue, Apr 18, 2023 at 9:49 AM Laurent Pinchart wrote: > On Mon, Apr 17, 2023 at 03:40:20PM +0200, Geert Uytterhoeven wrote: > > Currently, there are two drivers for the LCD controller on Renesas > > SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs: > > 1. sh_mobile_lcdcfb, u

[PATCH v6 00/20] Add Tegra20 parallel video input capture

2023-04-18 Thread Luca Ceresoli
New in v6: a oneliner fix to patch 14 for an unlock imbalance in MIPI CSI calibration (Tegra210 only). Many thanks to Hans for testing and spotting this! Full details follow. Tegra20 and other Tegra SoCs have a video input (VI) peripheral that can receive from either MIPI CSI-2 or parallel video

[PATCH v6 01/20] dt-bindings: display: tegra: add Tegra20 VIP

2023-04-18 Thread Luca Ceresoli
VIP is the parallel video capture component within the video input subsystem of Tegra20 (and other Tegra chips, apparently). Signed-off-by: Luca Ceresoli Reviewed-by: Krzysztof Kozlowski Reviewed-by: Dmitry Osipenko --- No changes in v6 No changes in v5 Changed in v4: - Added review tags -

[PATCH v6 02/20] dt-bindings: display: tegra: vi: add 'vip' property and example

2023-04-18 Thread Luca Ceresoli
The Tegra20 VI peripheral can receive parallel input from the VIP parallel input module. Add it to the allowed properties and augment the existing nvidia,tegra20-vi example to show a 'vip' property. Signed-off-by: Luca Ceresoli Reviewed-by: Rob Herring --- No changes in v6 No changes in v5 Ch

[PATCH v6 04/20] staging: media: tegra-video: document tegra_channel_get_remote_source_subdev

2023-04-18 Thread Luca Ceresoli
Clarify what this function does. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- No changes in v6 No changes in v5 Changed in v4: - Added review tags No changes in v3 No changes in v2 --- drivers/staging/media/tegra-video/vi.c | 3 +++ 1 file changed, 3 insertions(+) diff --

[PATCH v6 03/20] staging: media: tegra-video: improve documentation of tegra_video_format fields

2023-04-18 Thread Luca Ceresoli
Some fields are irrelevant for Tegra20/VIP. Add a note to clarify that. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- No changes in v6 No changes in v5 Changed in v4: - Added review tags No changes in v3 No changes in v2 --- drivers/staging/media/tegra-video/vi.h | 6 +++---

[PATCH v6 06/20] staging: media: tegra-video: improve error messages

2023-04-18 Thread Luca Ceresoli
tegra_vi_channels_alloc() can primarily fail for two reasons: 1. "ports" node not found 2. port_num > vi->soc->vi_max_channels Case 1 prints nothing, case 2 has a dev_err(). The caller [tegra_vi_init()] has a generic dev_err() on any failure. This mean that in case 2 we print two messages, and

[PATCH v6 07/20] staging: media: tegra-video: slightly simplify cleanup on errors

2023-04-18 Thread Luca Ceresoli
of_node_put(node) does nothing if node == NULL, so it can be moved to the cleanup section at the bottom. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- No changes in v6 No changes in v5 Changed in v4: - Added review tags No changes in v3 No changes in v2 --- drivers/staging/

[PATCH v6 05/20] staging: media: tegra-video: fix typos in comment

2023-04-18 Thread Luca Ceresoli
Add "skip" in "so we can *skip* the current channel" or it doesn't make sense. Also add articles where appropriate to fix English grammar. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- No changes in v6 No changes in v5 Changed in v4: - Added review tags No changes in v3 No

[PATCH v6 09/20] staging: media: tegra-video: move tegra210_csi_soc to C file

2023-04-18 Thread Luca Ceresoli
This declaration is used only in csi.c, no need to export it elsewhere. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- No changes in v6 No changes in v5 Changed in v4: - Added review tags This patch was added in v3. --- drivers/staging/media/tegra-video/csi.c | 4 drive

[PATCH v6 08/20] staging: media: tegra-video: move private struct declaration to C file

2023-04-18 Thread Luca Ceresoli
struct tegra_vi_graph_entity is an internal implementation detail of the VI module. Move its declaration from vi.h to vi.c. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- No changes in v6 No changes in v5 Changed in v4: - Added review tags No changes in v3 No changes in v2 --

[PATCH v6 11/20] staging: media: tegra-video: Kconfig: allow TPG only on Tegra210

2023-04-18 Thread Luca Ceresoli
We are about to add support for the Tegra20 parallel video capture, which has no TPG. In preparation for that, limit the VIDEO_TEGRA_TPG option to Tegra210 which is the only implementation currently provided by this driver. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- No chang

[PATCH v6 12/20] staging: media: tegra-video: move tegra_channel_fmt_align to a per-soc op

2023-04-18 Thread Luca Ceresoli
tegra_channel_fmt_align() takes care of the size constraints, alignment and rounding requirements of the Tegra210 VI peripheral. Tegra20 has different constraints. In preparation for adding Tegra20 support, move this function to a new op in the soc-specific `struct tegra_vi_ops` . Also move to te

[PATCH v6 10/20] staging: media: tegra-video: remove unneeded include

2023-04-18 Thread Luca Ceresoli
There is only a pointer reference to struct tegra_vi in video.h, thus vi.h is not needed. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- No changes in v6 No changes in v5 Changed in v4: - Added review tags No changes in v3 No changes in v2 --- drivers/staging/media/tegra-vid

[PATCH v6 13/20] staging: media: tegra-video: move default format to soc-specific data

2023-04-18 Thread Luca Ceresoli
The tegra_default_format in vi.c is specific to Tegra210 CSI. In preparation for adding Tegra20 VIP support, move the default format to a new field in the soc-specific `struct tegra_vi_soc`. Instead of an entire format struct, only store a pointer to an item in the existing format array. No funct

[PATCH v6 14/20] staging: media: tegra-video: move MIPI calibration calls from VI to CSI

2023-04-18 Thread Luca Ceresoli
The CSI module does not handle all the MIPI lane calibration procedure, leaving a small part of it to the VI module. In doing this, tegra_channel_enable_stream() (vi.c) manipulates the private data of the upstream subdev casting it to struct 'tegra_csi_channel', which will be wrong after introducin

[PATCH v6 15/20] staging: media: tegra-video: add a per-soc enable/disable op

2023-04-18 Thread Luca Ceresoli
The Tegra20 VI needs an additional operation to enable the VI, add an operation for that. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- No changes in v6 No changes in v5 Changed in v4: - Added review tags No changes in v3 No changes in v2 --- drivers/staging/media/tegra-vid

[PATCH v6 16/20] staging: media: tegra-video: move syncpt init/free to a per-soc op

2023-04-18 Thread Luca Ceresoli
tegra_channel_host1x_syncpt_init() gets the host1x syncpts needed for the Tegra210 implementation, and tegra_channel_host1x_syncpts_free() puts them. Tegra20 needs to get and put a different syncpt. In preparation for adding Tegra20 support, move these functions to new ops in the soc-specific `str

[PATCH v6 17/20] staging: media: tegra-video: add syncpts for Tegra20 to struct tegra_vi

2023-04-18 Thread Luca Ceresoli
In preparation to implement Tegra20 parallel video capture, add a variable to hold the required syncpt and document all the syncpt variables. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- No changes in v6 No changes in v5 Changed in v4: - Added review tags Changed in v3: -

[PATCH v6 18/20] staging: media: tegra-video: add hooks for planar YUV and H/V flip

2023-04-18 Thread Luca Ceresoli
Tegra20 supports planar YUV422 capture, which can be implemented by writing U and V base address registers in addition to the "main" base buffer address register. It also supports H and V flip, which among others requires to write the start address (i.e. the 1st offset to write, at the end of the

[PATCH v6 19/20] staging: media: tegra-video: add H/V flip controls

2023-04-18 Thread Luca Ceresoli
Tegra20 can do horizontal and vertical image flip, but Tegra210 cannot (either the hardware, or this driver). In preparation to adding Tegra20 support, add a flag in struct tegra_vi_soc so the generic vi.c code knows whether the flip controls should be added or not. Also provide a generic impleme

[PATCH v6 20/20] staging: media: tegra-video: add support for Tegra20 parallel input

2023-04-18 Thread Luca Ceresoli
The VI peripheral of Tegra supports capturing from MIPI CSI-2 or parallel video (called VIP in the docs). The staging tegra-video driver currently implements MIPI CSI-2 video capture for Tegra210. Add support for parallel video capture (VIP) on Tegra20. With the generalizations added to the VI dri

Re: [PATCH] drm/panel: novatek-nt35950: Only unregister DSI1 if it exists

2023-04-18 Thread AngeloGioacchino Del Regno
Il 17/04/23 17:41, Konrad Dybcio ha scritto: Commit 5dd45b66742a ("drm/panel: novatek-nt35950: Improve error handling") introduced logic to unregister DSI1 on any sort of probe failure, as that's not done automatically by kernel APIs. It did not however account for cases where only one DSI host

Re: [PATCH v5 14/20] staging: media: tegra-video: move MIPI calibration calls from VI to CSI

2023-04-18 Thread Luca Ceresoli
Hi Hans, On Fri, 14 Apr 2023 17:51:34 +0200 Hans Verkuil wrote: > Hi Luca, > > I just encountered an error in this patch, so I have rejected the PR I made. > > See below for the details: > > On 07/04/2023 15:38, Luca Ceresoli wrote: > > The CSI module does not handle all the MIPI lane calibra

Re: [PATCH v3 03/11] iio: buffer-dma: Get rid of outgoing queue

2023-04-18 Thread Paul Cercueil
Hi Jonathan, Le dimanche 16 avril 2023 à 15:24 +0100, Jonathan Cameron a écrit : > On Mon,  3 Apr 2023 17:47:52 +0200 > Paul Cercueil wrote: > > > The buffer-dma code was using two queues, incoming and outgoing, to > > manage the state of the blocks in use. > > > > While this totally works, it

Re: [PATCH v2 0/5] drm: shmobile: Fixes and enhancements

2023-04-18 Thread Laurent Pinchart
Hi Geert, On Tue, Apr 18, 2023 at 10:00:35AM +0200, Geert Uytterhoeven wrote: > On Tue, Apr 18, 2023 at 9:49 AM Laurent Pinchart wrote: > > On Mon, Apr 17, 2023 at 03:40:20PM +0200, Geert Uytterhoeven wrote: > > > Currently, there are two drivers for the LCD controller on Renesas > > > SuperH-base

Re: [PATCH v5 14/20] staging: media: tegra-video: move MIPI calibration calls from VI to CSI

2023-04-18 Thread Hans Verkuil
On 18/04/2023 10:07, Luca Ceresoli wrote: > Hi Hans, > > On Fri, 14 Apr 2023 17:51:34 +0200 > Hans Verkuil wrote: > >> Hi Luca, >> >> I just encountered an error in this patch, so I have rejected the PR I made. >> >> See below for the details: >> >> On 07/04/2023 15:38, Luca Ceresoli wrote: >>>

Re: [RFC PATCH v2 0/2] Imagination Technologies PowerVR DRM driver

2023-04-18 Thread Daniel Vetter
On Thu, Apr 13, 2023 at 11:34:17AM +0100, Sarah Walker wrote: > This patch adds the initial DRM driver for Imagination Technologies PowerVR > GPUs, starting with those based on our Rogue architecture. It's worth pointing > out that this is a new driver, written from the ground up, rather than a > r

Re: [RFC 1/3] drm/doc: Relax fdinfo string constraints

2023-04-18 Thread Tvrtko Ursulin
On 17/04/2023 21:12, Rob Clark wrote: From: Rob Clark The restriction about no whitespace, etc, really only applies to the usage of strings in keys. Values can contain anything (other than newline). Signed-off-by: Rob Clark --- Documentation/gpu/drm-usage-stats.rst | 29 ++---

Re: [PATCH] drm/panel: novatek-nt35950: Only unregister DSI1 if it exists

2023-04-18 Thread Neil Armstrong
Hi, On Mon, 17 Apr 2023 17:41:08 +0200, Konrad Dybcio wrote: > Commit 5dd45b66742a ("drm/panel: novatek-nt35950: Improve error handling") > introduced logic to unregister DSI1 on any sort of probe failure, as > that's not done automatically by kernel APIs. > > It did not however account for cases

Re: [RFC 2/3] drm/msm: Rework get_comm_cmdline() helper

2023-04-18 Thread Tvrtko Ursulin
On 17/04/2023 21:12, Rob Clark wrote: From: Rob Clark Make it work in terms of ctx so that it can be re-used for fdinfo. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 ++-- drivers/gpu/drm/msm/msm_drv.c | 2 ++ drivers/gpu/drm/msm/msm_gpu.c

Re: [PATCH 3/6] drm: bridge: samsung-dsim: Fetch pll-clock-frequency automatically

2023-04-18 Thread Marek Vasut
On 4/18/23 04:29, Adam Ford wrote: On Sun, Apr 16, 2023 at 5:08 PM Marek Vasut wrote: On 4/15/23 12:41, Adam Ford wrote: Fetch the clock rate of "sclk_mipi" (or "pll_clk") instead of having an entry in the device tree for samsung,pll-clock-frequency. Signed-off-by: Adam Ford --- drivers/

Re: [PATCH v3] drm/fbdev-generic: prohibit potential out-of-bounds access

2023-04-18 Thread Daniel Vetter
On Mon, Apr 17, 2023 at 07:32:19PM +0800, Sui Jingfeng wrote: > The fbdev test of IGT may write after EOF, which lead to out-of-bound > access for the drm drivers using fbdev-generic. For example, on a x86 > + aspeed bmc card platform, with a 1680x1050 resolution display, running > fbdev test if IG

Re: [RFC 2/3] drm/msm: Rework get_comm_cmdline() helper

2023-04-18 Thread Daniel Vetter
On Tue, Apr 18, 2023 at 09:27:49AM +0100, Tvrtko Ursulin wrote: > > On 17/04/2023 21:12, Rob Clark wrote: > > From: Rob Clark > > > > Make it work in terms of ctx so that it can be re-used for fdinfo. > > > > Signed-off-by: Rob Clark > > --- > > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 +

Re: [PATCH 1/2] gpu: Move ASPEED vendor ID definition to pci_ids.h

2023-04-18 Thread Daniel Vetter
On Mon, Apr 17, 2023 at 06:17:19PM -0700, Patrick McLean wrote: > Currently the ASPEED PCI vendor ID is defined in > drivers/gpu/drm/ast/ast_drv.c, > move that to include/linux/pci_ids.h with all the rest of the PCI vendor ID > definitions. Rename the definition to follow the format that the other

Re: [PATCH 2/2] ata: libata-core: Apply ATI NCQ horkage to ASPEED as well

2023-04-18 Thread Sergei Shtylyov
Hello! On 4/18/23 4:17 AM, Patrick McLean wrote: > We have some machines with ASPEED SATA controllers, and are seeing the same > NCQ > issues that ATI controllers (I am not sure if it's a rebranded ATI controller, > or they both have some faulty implementation). This NCQ breakage is consistent >

Re: [PATCH RFC 12/18] rust: drm: sched: Add GPU scheduler abstraction

2023-04-18 Thread Daniel Vetter
On Wed, Apr 05, 2023 at 09:29:02PM +0200, Daniel Vetter wrote: > On Wed, Apr 05, 2023 at 05:43:01PM +0200, Daniel Vetter wrote: > > On Tue, Mar 07, 2023 at 11:25:37PM +0900, Asahi Lina wrote: > > > +/// An armed DRM scheduler job (not yet submitted) > > > +pub struct ArmedJob<'a, T: JobImpl>(Box>,

Re: [PATCH 3/6] drm: bridge: samsung-dsim: Fetch pll-clock-frequency automatically

2023-04-18 Thread Lucas Stach
Am Dienstag, dem 18.04.2023 um 10:30 +0200 schrieb Marek Vasut: > On 4/18/23 04:29, Adam Ford wrote: > > On Sun, Apr 16, 2023 at 5:08 PM Marek Vasut wrote: > > > > > > On 4/15/23 12:41, Adam Ford wrote: > > > > Fetch the clock rate of "sclk_mipi" (or "pll_clk") instead of > > > > having an entry

Re: [PATCH 1/2] gpu: Move ASPEED vendor ID definition to pci_ids.h

2023-04-18 Thread Sergei Shtylyov
On 4/18/23 4:17 AM, Patrick McLean wrote: > Currently the ASPEED PCI vendor ID is defined in > drivers/gpu/drm/ast/ast_drv.c, > move that to include/linux/pci_ids.h with all the rest of the PCI vendor ID > definitions. Rename the definition to follow the format that the other > definitions follow

Re: [PATCH] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-04-18 Thread Jani Nikula
On Tue, 18 Apr 2023, Wayne Lin wrote: > [Why & How] > The sequence for collecting down_reply/up_request from source > perspective should be: > > Request_n->repeat (get partial reply of Request_n->clear message ready > flag to ack DPRX that the message is received) till all partial > replies for Re

Re: [RFC 3/3] drm/msm: Add comm/cmdline fields

2023-04-18 Thread Tvrtko Ursulin
On 17/04/2023 21:12, Rob Clark wrote: From: Rob Clark Normally this would be the same information that can be obtained in other ways. But in some cases the process opening the drm fd is merely a sort of proxy for the actual process using the GPU. This is the case for guest VM processes usin

Re: [RFC 3/6] drm: Add fdinfo memory stats

2023-04-18 Thread Tvrtko Ursulin
On 17/04/2023 20:39, Rob Clark wrote: On Mon, Apr 17, 2023 at 8:56 AM Tvrtko Ursulin wrote: From: Tvrtko Ursulin Add support to dump GEM stats to fdinfo. Signed-off-by: Tvrtko Ursulin --- Documentation/gpu/drm-usage-stats.rst | 12 +++ drivers/gpu/drm/drm_file.c| 52 ++

Re: [PATCH v3] drm/fbdev-generic: prohibit potential out-of-bounds access

2023-04-18 Thread Thomas Zimmermann
Hi Am 18.04.23 um 10:32 schrieb Daniel Vetter: On Mon, Apr 17, 2023 at 07:32:19PM +0800, Sui Jingfeng wrote: The fbdev test of IGT may write after EOF, which lead to out-of-bound access for the drm drivers using fbdev-generic. For example, on a x86 + aspeed bmc card platform, with a 1680x1050 r

[Bug 217348] Regression nvidia dkms driver installation

2023-04-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=217348 Artem S. Tashkinov (a...@gmx.com) changed: What|Removed |Added Status|NEW |RESOLVED Reso

Re: [RFC 0/3] drm: Add comm/cmdline fdinfo fields

2023-04-18 Thread Konrad Dybcio
Looks like the 'PATCH' part of your subject was cut off! Konrad On 17.04.2023 22:12, Rob Clark wrote: > From: Rob Clark > > When many of the things using the GPU are processes in a VM guest, the > actual client process is just a proxy. The msm driver has a way to let > the proxy tell the kerne

Re: [PATCH v4 3/5] drm/tests: Add test cases for drm_rect_calc_vscale()

2023-04-18 Thread Maíra Canal
On 4/17/23 22:42, Arthur Grillo Queiroz Cabral wrote: On 17/04/23 13:19, Maíra Canal wrote: On 4/6/23 08:53, Arthur Grillo wrote: Insert parameterized test for the drm_rect_calc_vscale() to ensure correctness and prevent future regressions. Besides the test for the usual case, tests the excep

[PATCH 01/10] accel/habanalabs: add helper to extract the FW major/minor

2023-04-18 Thread Oded Gabbay
From: Dafna Hirschfeld the helper is extract_u32_until_given_char and can later be used to also get the major/minor of the sw version. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/firmware_if.c | 69 --

[PATCH 04/10] accel/habanalabs: check fw version using sw version

2023-04-18 Thread Oded Gabbay
From: Dafna Hirschfeld The fw inner version is less trustable, instead use the fw general sw release version. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 10 -- drivers/accel/habanalabs/gaudi2/

[PATCH 06/10] accel/habanalabs: unsecure TPC bias registers

2023-04-18 Thread Oded Gabbay
From: Ofir Bitton User needs to be able to perform downcast / upcast of fp8_143 dtype. Hence bias register needs to be accessed by the user. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2_security.c | 1 + 1 file chan

[PATCH 05/10] accel/habanalabs: do soft-reset using cpucp packet

2023-04-18 Thread Oded Gabbay
From: Dafna Hirschfeld This is done depending on the FW version. The cpucp method is preferable and saves scratchpads resource. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/firmware_if.c | 14 ++ drivers/accel

[PATCH 02/10] accel/habanalabs: rename fw_{major/minor}_version to fw_inner_{major/minor}_ver

2023-04-18 Thread Oded Gabbay
From: Dafna Hirschfeld We later want to add fields for Firmware SW version. The current extracted FW version is the inner FW versioning so the new name is better and also better differentiate from the FW's SW version. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded

[PATCH 03/10] accel/habanalabs: extract and save the FW's SW major/minor/sub-minor

2023-04-18 Thread Oded Gabbay
From: Dafna Hirschfeld It is not always possible to know the FW's SW version from the inner FW version. Therefore we should extract the general SW version in addition to the FW version and use it in functions like 'hl_is_fw_ver_below_1_9' etc. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded G

[PATCH 08/10] accel/habanalabs: add unregister timestamp uapi

2023-04-18 Thread Oded Gabbay
From: farah kassabri Add uapi to allow user to unregister timestamp record. This is needed when the user wishes to re-use the same record with different interrupt id. For that, the user must first unregister it from the current interrupt id and then register it with the new id. Signed-off-by: fa

[PATCH 09/10] accel/habanalabs: minimize encapsulation signal mutex lock time

2023-04-18 Thread Oded Gabbay
From: Koby Elbaz Sync Stream Encapsulated Signal Handlers can be managed from different contexts, and as such they are protected via a spin_lock. However, spin_lock was unnecessarily protecting a larger code section than really needed, covering a sleepable code section as well. Since spin_lock di

[PATCH 10/10] accel/habanalabs: refactor abort of completions and waits

2023-04-18 Thread Oded Gabbay
From: Koby Elbaz Aborting CS completions should be in command_submission.c but aborting waiting for user interrupts should be in device.c. This separation is also for adding more abort operations in the future. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay ---

[PATCH 07/10] accel/habanalabs: call to HW/FW err returns 0 when no events exist

2023-04-18 Thread Oded Gabbay
From: Moti Haimovski This commit modifies the call to retrieve HW or FW error events to return success when no events are pending, as done in the calls to other events. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../habanalabs/common/habanalabs_ioct

RE: [PATCH] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-04-18 Thread Lin, Wayne
[Public] Hi Jani Nikula, Appreciate your time and feedback! Will adjust the patch. Some comments inline. > -Original Message- > From: Jani Nikula > Sent: Tuesday, April 18, 2023 4:53 PM > To: Lin, Wayne ; dri-devel@lists.freedesktop.org; > amd-...@lists.freedesktop.org > Cc: ly...@redha

[PATCH v2] drm/scheduler: set entity to NULL in drm_sched_entity_pop_job()

2023-04-18 Thread Danilo Krummrich
It already happend a few times that patches slipped through which implemented access to an entity through a job that was already removed from the entities queue. Since jobs and entities might have different lifecycles, this can potentially cause UAF bugs. In order to make it obvious that a jobs en

[RFC PATCH 0/3] Init flow fixes for Samsung DSIM and TI SN65DSI84

2023-04-18 Thread Frieder Schrempf
From: Frieder Schrempf This patchset contains a proposal to fix the initialization flow for the display pipeline used on our i.MX8MM Kontron boards: i.MX8MM LCDIF -> i.MX8MM DSIM -> TI SN65DSI84 -> 7" LVDS Panel Without these changes the display works most of the time, but fails to come up oc

[RFC PATCH 1/3] drm: bridge: samsung-dsim: Fix i.MX8M enable flow to meet spec

2023-04-18 Thread Frieder Schrempf
From: Frieder Schrempf According to the documentation [1] the proper enable flow is: 1. Enable DSI link and keep data lanes in LP-11 (stop state) 2. Disable stop state to bring data lanes into HS mode Currently we do this all at once within enable(), which doesn't allow to meet the requirements

[RFC PATCH 2/3] drm/bridge: ti-sn65dsi83: Fix enable/disable flow to meet spec

2023-04-18 Thread Frieder Schrempf
From: Frieder Schrempf The datasheet describes the following initialization flow including minimum delay times between each step: 1. DSI data lanes need to be in LP-11 and the clock lane in HS mode 2. toggle EN signal 3. initialize registers 4. enable PLL 5. soft reset 6. enable DSI stream 7. ch

[RFC PATCH 3/3] drm: bridge: samsung-dsim: Remove init quirk for Exynos

2023-04-18 Thread Frieder Schrempf
From: Frieder Schrempf Assuming that with the init flow fixed to meet the documentation at [1] and the pre_enable_prev_first flag set in downstream bridge/panel drivers which require it, we can use the default flow for Exynos as already done for i.MX8M. [1] https://docs.kernel.org/gpu/drm-kms-he

Re: [RFC 3/6] drm: Add fdinfo memory stats

2023-04-18 Thread Tvrtko Ursulin
On 17/04/2023 17:20, Christian König wrote: Am 17.04.23 um 17:56 schrieb Tvrtko Ursulin: From: Tvrtko Ursulin Add support to dump GEM stats to fdinfo. Signed-off-by: Tvrtko Ursulin ---   Documentation/gpu/drm-usage-stats.rst | 12 +++   drivers/gpu/drm/drm_file.c    | 52 +++

Re: [PATCH 2/6] drm: bridge: samsung-dsim: Fix PMS Calculator on imx8m[mnp]

2023-04-18 Thread Adam Ford
On Mon, Apr 17, 2023 at 2:00 AM Alexander Stein wrote: > > Hi, > > Am Montag, 17. April 2023, 00:31:24 CEST schrieb Adam Ford: > > On Sun, Apr 16, 2023 at 5:07 PM Marek Vasut wrote: > > > On 4/15/23 12:40, Adam Ford wrote: > > > > According to Table 13-45 of the i.MX8M Mini Reference Manual, the

Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

2023-04-18 Thread Matthias Brugger
On 14/04/2023 07:43, Uwe Kleine-König wrote: Hello, On Wed, Apr 12, 2023 at 01:27:13PM +0200, AngeloGioacchino Del Regno wrote: Add a compatible string for MediaTek Helio X10 MT6795's display PWM block: this is the same as MT8173. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Uwe

RE: [PATCH] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-04-18 Thread Jani Nikula
On Tue, 18 Apr 2023, "Lin, Wayne" wrote: > [Public] > > Hi Jani Nikula, > > Appreciate your time and feedback! Will adjust the patch. > Some comments inline. > >> -Original Message- >> From: Jani Nikula >> Sent: Tuesday, April 18, 2023 4:53 PM >> To: Lin, Wayne ; dri-devel@lists.freedeskt

[PATCH v2 0/5] MDSS reg bus interconnect

2023-04-18 Thread Konrad Dybcio
v1 -> v2: - Fix "Mbps" -> "MBps" [5/5] - Add an interconnects: entry in dt-bindings (and not only -names..) [1/5] v1: https://lore.kernel.org/r/20230417-topic-dpu_regbus-v1-0-06fbdc164...@linaro.org Apart from the already handled data bus (MAS_MDP_Pn<->DDR), there's another path that needs to be

[PATCH v2 1/5] dt-bindings: display/msm: Add reg bus interconnect

2023-04-18 Thread Konrad Dybcio
Apart from the already handled data bus (MAS_MDP_Pn<->DDR), there's another path that needs to be handled to ensure MDSS functions properly, namely the "reg bus", a.k.a the CPU-MDSS interconnect. Gating that path may have a variety of effects.. from none to otherwise inexplicable DSI timeouts.. D

[PATCH v2 4/5] drm/msm/mdss: Handle the reg bus ICC path

2023-04-18 Thread Konrad Dybcio
Apart from the already handled data bus (MAS_MDP_Pn<->DDR), there's another path that needs to be handled to ensure MDSS functions properly, namely the "reg bus", a.k.a the CPU-MDSS interconnect. Gating that path may have a variety of effects.. from none to otherwise inexplicable DSI timeouts.. O

[PATCH v2 5/5] drm/msm/dpu1: Handle the reg bus ICC path

2023-04-18 Thread Konrad Dybcio
Apart from the already handled data bus (MAS_MDP_Pn<->DDR), there's another path that needs to be handled to ensure MDSS functions properly, namely the "reg bus", a.k.a the CPU-MDSS interconnect. Gating that path may have a variety of effects.. from none to otherwise inexplicable DSI timeouts.. O

[PATCH v2 3/5] drm/msm/mdss: Rename path references to mdp_path

2023-04-18 Thread Konrad Dybcio
The DPU1 driver needs to handle all MDPn<->DDR paths, as well as CPU<->SLAVE_DISPLAY_CFG. The former ones share how their values are calculated, but the latter one has static predefines spanning all SoCs. In preparation for supporting the CPU<->SLAVE_DISPLAY_CFG path, rename the path-related struc

[PATCH v2 2/5] drm/msm/dpu1: Rename path references to mdp_path

2023-04-18 Thread Konrad Dybcio
The DPU1 driver needs to handle all MDPn<->DDR paths, as well as CPU<->SLAVE_DISPLAY_CFG. The former ones share how their values are calculated, but the latter one has static predefines spanning all SoCs. In preparation for supporting the CPU<->SLAVE_DISPLAY_CFG path, rename the path-related struc

Re: [PATCH v2 02/17] drm/msm/dpu: Remove TE2 block and feature from DPU >= 7.0.0 hardware

2023-04-18 Thread Konrad Dybcio
On 17.04.2023 22:21, Marijn Suijten wrote: > No hardware beyond kona (sm8250) defines the TE2 PINGPONG sub-block > offset downstream. Even though neither downstream nor upstream utilizes > these registers in any way, remove the erroneous specification for > SC8280XP, SM8350 and SM8450 to preven

Re: [PATCH v2 03/17] drm/msm/dpu: Move non-MDP_TOP INTF_INTR offsets out of hwio header

2023-04-18 Thread Konrad Dybcio
On 17.04.2023 22:21, Marijn Suijten wrote: > These offsets do not fall under the MDP TOP block and do not fit the > comment right above. Move them to dpu_hw_interrupts.c next to the > repsective MDP_INTF_x_OFF interrupt block offsets. > > Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")

Re: [PATCH v2 04/17] drm/msm/dpu: Fix PP_BLK_DIPHER -> DITHER typo

2023-04-18 Thread Konrad Dybcio
On 17.04.2023 22:21, Marijn Suijten wrote: > SM8550 only comes with a DITHER subblock inside the PINGPONG block, > hence the name and a block length of zero. However, the PP_BLK macro > name was typo'd to DIPHER rather than DITHER. > > Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550"

Re: [PATCH v2 05/17] drm/msm/dpu: Remove duplicate register defines from INTF

2023-04-18 Thread Konrad Dybcio
On 17.04.2023 22:21, Marijn Suijten wrote: > The INTF_FRAME_LINE_COUNT_EN, INTF_FRAME_COUNT and INTF_LINE_COUNT > registers are already defined higher up, in the right place when sorted > numerically. > > Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") > Signed-off-by: Marijn Suijten >

Re: [PATCH v2 06/17] drm/msm/dpu: Remove extraneous register define indentation

2023-04-18 Thread Konrad Dybcio
On 17.04.2023 22:21, Marijn Suijten wrote: > A bunch of registers are indented with two extra spaces, looking as if > these are values corresponding to the previous register which is not the > case, rather these are simply also register offsets and should only have > a single space separating th

Re: [PATCH v2 07/17] drm/msm/dpu: Sort INTF registers numerically

2023-04-18 Thread Konrad Dybcio
On 17.04.2023 22:21, Marijn Suijten wrote: > A bunch of registers were appended at the end in e.g. 91143873a05d > ("drm/msm/dpu: Add MISR register support for interface") rather than > being inserted in a place that maintains numerical sorting. Restore > that. > > Signed-off-by: Marijn Suijten

Re: [PATCH v2 08/17] drm/msm/dpu: Drop unused poll_timeout_wr_ptr PINGPONG callback

2023-04-18 Thread Konrad Dybcio
On 17.04.2023 22:21, Marijn Suijten wrote: > This callback was migrated from downstream when DPU1 was first > introduced to mainline, but never used by any component. Drop it to > save some lines and unnecessary confusion. > > Suggested-by: Dmitry Baryshkov > Signed-off-by: Marijn Suijten >

[PATCH 5.10 063/124] fbmem: Reject FB_ACTIVATE_KD_TEXT from userspace

2023-04-18 Thread Greg Kroah-Hartman
From: Daniel Vetter commit 6fd33ac7916689b8f051a185defe4dd515b0 upstream. This is an oversight from dc5bdb68b5b3 ("drm/fb-helper: Fix vt restore") - I failed to realize that nasty userspace could set this. It's not pretty to mix up kernel-internal and userspace uapi flags like this, but sin

[PATCH 5.15 12/91] fbmem: Reject FB_ACTIVATE_KD_TEXT from userspace

2023-04-18 Thread Greg Kroah-Hartman
From: Daniel Vetter commit 6fd33ac7916689b8f051a185defe4dd515b0 upstream. This is an oversight from dc5bdb68b5b3 ("drm/fb-helper: Fix vt restore") - I failed to realize that nasty userspace could set this. It's not pretty to mix up kernel-internal and userspace uapi flags like this, but sin

[PATCH 6.1 019/134] fbmem: Reject FB_ACTIVATE_KD_TEXT from userspace

2023-04-18 Thread Greg Kroah-Hartman
From: Daniel Vetter commit 6fd33ac7916689b8f051a185defe4dd515b0 upstream. This is an oversight from dc5bdb68b5b3 ("drm/fb-helper: Fix vt restore") - I failed to realize that nasty userspace could set this. It's not pretty to mix up kernel-internal and userspace uapi flags like this, but sin

[PATCH 6.2 020/139] fbmem: Reject FB_ACTIVATE_KD_TEXT from userspace

2023-04-18 Thread Greg Kroah-Hartman
From: Daniel Vetter commit 6fd33ac7916689b8f051a185defe4dd515b0 upstream. This is an oversight from dc5bdb68b5b3 ("drm/fb-helper: Fix vt restore") - I failed to realize that nasty userspace could set this. It's not pretty to mix up kernel-internal and userspace uapi flags like this, but sin

Re: [PATCH v2 10/17] drm/msm/dpu: Disable pingpong TE on DPU 5.0.0 and above

2023-04-18 Thread Konrad Dybcio
On 17.04.2023 22:21, Marijn Suijten wrote: > Since hardware revision 5.0.0 the TE configuration moved out of the > PINGPONG block into the INTF block. Writing these registers has no > effect, and is omitted downstream via the DPU/SDE_PINGPONG_TE feature > flag. This flag is only added to PINGP

Re: [PATCH v2 13/17] drm/msm/dpu: Factor out shared interrupt register in INTF_BLK macro

2023-04-18 Thread Konrad Dybcio
On 17.04.2023 22:21, Marijn Suijten wrote: > As the INTF block is going to attain more interrupts that don't share > the same MDP_SSPP_TOP0_INTR register, factor out the _reg argument for > the caller to construct the right interrupt index (register and bit > index) to not make the interrupt bit

Re: [PATCH v2 14/17] drm/msm/dpu: Document and enable TEAR interrupts on DSI interfaces

2023-04-18 Thread Konrad Dybcio
On 17.04.2023 22:21, Marijn Suijten wrote: > All SoCs since DPU 5.0.0 have the tear interrupt registers moved out of > the PINGPONG block and into the INTF block. Wire up these interrupts > and IRQ masks on all supported hardware. > > Signed-off-by: Marijn Suijten > --- Acked-by: Konrad Dybci

  1   2   3   >