Re: [PATCH 01/10] accel/amdxdna: Add a new driver for AMD AI Engine

2024-07-20 Thread Markus Elfring
… > +++ b/drivers/accel/amdxdna/aie2_pci.h > @@ -0,0 +1,144 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (C) 2023-2024, Advanced Micro Devices, Inc. > + */ > + > +#ifndef _AIE2_PCI_H_ > +#define _AIE2_PCI_H_ … Please omit leading underscores from such identifiers. https://wik

[PATCH v7 00/28] media: mediatek: add driver to support secure video decoder

2024-07-20 Thread Yunfei Dong
The patch series used to enable secure video playback (SVP) on MediaTek hardware in the Linux kernel. Memory Definitions: secure memory - Memory allocated in the TEE (Trusted Execution Environment) which is inaccessible in the REE (Rich Execution Environment, i.e. linux kernel/user space). secure

[PATCH v7 03/28] media: videobuf2: calculate restricted memory size

2024-07-20 Thread Yunfei Dong
Getting the physical address with sg_dma_address for restricted memory, only return the first physical address size since sg may not be physical continuous, then leading to the dmabuf size is small than buf size. Need to bypass continuous checking for restricted memory. Signed-off-by: Yunfei Dong

[PATCH v7 06/28] dma-heap: Provide accessors so that in-kernel drivers can allocate dmabufs from specific heaps

2024-07-20 Thread Yunfei Dong
From: John Stultz This allows drivers who don't want to create their own DMA-BUF exporter to be able to allocate DMA-BUFs directly from existing DMA-BUF Heaps. There is some concern that the premise of DMA-BUF heaps is that userland knows better about what type of heap memory is needed for a pip

[PATCH v7 05/28] dma-heap: Add proper kref handling on dma-buf heaps

2024-07-20 Thread Yunfei Dong
From: John Stultz Add proper reference counting on the dma_heap structure. While existing heaps are built-in, we may eventually have heaps loaded from modules, and we'll need to be able to properly handle the references to the heaps Signed-off-by: John Stultz Signed-off-by: T.J. Mercier Signed

[PATCH v7 08/28] media: mediatek: vcodec: build decoder OPTEE driver as module

2024-07-20 Thread Yunfei Dong
The tee_* function make the driver depends on the TEE driver, isolate the decoder OPTEE client into a separate module, and make it depends on CONFIG_TEE. The driver can open/close the TEE driver dynamically. Signed-off-by: Yunfei Dong --- .../media/platform/mediatek/vcodec/Kconfig| 12 ++

[PATCH v7 07/28] media: mediatek: vcodec: add tee client interface to communiate with optee-os

2024-07-20 Thread Yunfei Dong
Open tee context to initialize the environment in order to communication with optee-os, then open tee session as the communication pipeline for lat and core to send data for hardware decode. Signed-off-by: Yunfei Dong --- .../platform/mediatek/vcodec/decoder/Makefile | 1 + .../vcodec/decoder/

[PATCH v7 09/28] media: mediatek: vcodec: allocate tee share memory

2024-07-20 Thread Yunfei Dong
Allocate two share memory for each lat and core hardware used to share information with optee-os. Msg buffer used to send ipi command and get ack command with optee-os, data buffer used to store vsi information which used for hardware decode. Signed-off-by: Yunfei Dong --- .../vcodec/decoder/mtk

[PATCH v7 10/28] media: mediatek: vcodec: send share memory data to optee

2024-07-20 Thread Yunfei Dong
Setting msg and vsi information to shared buffer, then call tee invoke function to send it to optee-os. Signed-off-by: Yunfei Dong --- .../vcodec/decoder/mtk_vcodec_dec_optee.c | 156 +- .../vcodec/decoder/mtk_vcodec_dec_optee.h | 74 + 2 files changed, 226 inser

[PATCH v7 13/28] media: mediatek: vcodec: using shared memory as vsi address

2024-07-20 Thread Yunfei Dong
The vsi buffer is allocated by tee share memory for svp mode, using the share memory virtual address to store vsi data. Signed-off-by: Yunfei Dong --- .../mediatek/vcodec/decoder/vdec/vdec_h264_req_multi_if.c | 8 ++-- .../media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c | 8 ++-- 2

[PATCH v7 12/28] media: mediatek: vcodec: add interface to allocate/free secure memory

2024-07-20 Thread Yunfei Dong
Calling dma heap interface to allocate/free secure memory when playing secure video. Signed-off-by: Yunfei Dong --- .../media/platform/mediatek/vcodec/Kconfig| 1 + .../mediatek/vcodec/common/mtk_vcodec_util.c | 117 +- .../mediatek/vcodec/common/mtk_vcodec_util.h | 8 +

[PATCH v7 14/28] media: mediatek: vcodec: add single allocation format

2024-07-20 Thread Yunfei Dong
Define one uncompressed capture format V4L2_PIX_FMT_MS21 in order to support single allocation memory. The memory consists of two plans: luma and chroma, luma is stored at the start and chrome is stored at the end. Signed-off-by: Yunfei Dong --- Documentation/userspace-api/media/v4l/pixfmt-reser

[PATCH v7 16/28] media: mediatek: vcodec: support single allocation buffer

2024-07-20 Thread Yunfei Dong
The buffer count of capture format V4L2_PIX_FMT_MS21 is different with V4L2_PIX_FMT_MM21. V4L2_PIX_FMT_MS21 has two memory to store luma and chrome planes, V4L2_PIX_FMT_MS21 only has one. Adding condition to separate them. The dma address is secure handle for secure video playback, the handle may

[PATCH v7 18/28] media: mediatek: vcodec: remove parse nal_info in kernel

2024-07-20 Thread Yunfei Dong
The hardware can parse syntax to get nal_info, needn't to use cpu. Signed-off-by: Yunfei Dong --- .../vcodec/decoder/vdec/vdec_h264_req_multi_if.c| 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_h264_

[PATCH v7 19/28] media: mediatek: vcodec: disable wait interrupt for svp mode

2024-07-20 Thread Yunfei Dong
Waiting interrupt in optee-os for svp mode, need to disable it in kernel in case of interrupt is cleaned. Signed-off-by: Yunfei Dong --- .../vcodec/decoder/mtk_vcodec_dec_hw.c| 34 +-- .../vcodec/decoder/mtk_vcodec_dec_pm.c| 6 +- .../decoder/vdec/vdec_h264_req_multi_if.

[PATCH v7 20/28] media: mediatek: vcodec: support tee decoder

2024-07-20 Thread Yunfei Dong
Initialize tee private data to support secure decoder. Release tee related information for each instance when decoder done. Signed-off-by: Yunfei Dong --- .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/media/platform

[PATCH v7 17/28] media: mediatek: vcodec: re-construct h264 driver to support svp mode

2024-07-20 Thread Yunfei Dong
Need secure buffer size to convert secure handle to secure pa in optee-os, re-construct the vsi struct to store each secure buffer size. Separate svp and normal wait interrupt condition for svp mode waiting hardware interrupt in optee-os. Signed-off-by: Yunfei Dong --- .../decoder/vdec/vdec_h26

[PATCH v7 22/28] media: mediatek: vcodec: support hevc svp for mt8188

2024-07-20 Thread Yunfei Dong
Change hevc driver to support secure video playback(svp) for mt8188. Need to map shared memory with optee interface and wait interrupt in optee-os. Signed-off-by: Yunfei Dong --- .../decoder/vdec/vdec_hevc_req_multi_if.c | 88 +++ 1 file changed, 53 insertions(+), 35 deletion

[PATCH v7 21/28] media: mediatek: vcodec: move vdec init interface to setup callback

2024-07-20 Thread Yunfei Dong
Getting secure video playback (svp) flag when request output buffer, then calling init interface to init svp parameters in optee-os. Signed-off-by: Yunfei Dong --- .../mediatek/vcodec/decoder/mtk_vcodec_dec.c | 141 +++--- 1 file changed, 91 insertions(+), 50 deletions(-) diff --gi

[PATCH v7 26/28] media: mediatek: vcodec: rename vsi to extend vsi

2024-07-20 Thread Yunfei Dong
rename vsi to extend vsi struct for adding some extend param to support secure video playback. Signed-off-by: Yunfei Dong --- .../decoder/vdec/vdec_h264_req_multi_if.c | 174 +- 1 file changed, 88 insertions(+), 86 deletions(-) diff --git a/drivers/media/platform/mediatek/v

[PATCH v7 27/28] media: mediatek: vcodec: adding non extend struct

2024-07-20 Thread Yunfei Dong
Adding non extend struct to support two different architecture. Signed-off-by: Yunfei Dong --- .../decoder/vdec/vdec_h264_req_multi_if.c | 76 ++- 1 file changed, 73 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_h264_req

[PATCH v7 28/28] media: mediatek: vcodec: support extend h264 driver

2024-07-20 Thread Yunfei Dong
Rename the extend interface with _ex and sync the non extend driver. Adding capability to separate extend and non extend driver. Signed-off-by: Yunfei Dong --- .../vcodec/decoder/mtk_vcodec_dec_drv.h | 2 + .../decoder/vdec/vdec_h264_req_multi_if.c | 382 +- 2 files c

Re: [PATCH v2 0/3] drm: backlight quirk infrastructure and lower minimum for Framework AMD 13

2024-07-20 Thread Thomas Weißschuh
Hi Hans, On 2024-07-18 10:25:18+, Hans de Goede wrote: > On 6/24/24 6:15 PM, Thomas Weißschuh wrote: > > On 2024-06-24 11:11:40+, Hans de Goede wrote: > >> On 6/23/24 10:51 AM, Thomas Weißschuh wrote: > >>> The value of "min_input_signal" returned from ATIF on a Framework AMD 13 > >>> is "

RE: [PATCH v1 4/5] drm/virtio: Import prime buffers from other devices as guest blobs

2024-07-20 Thread Kasireddy, Vivek
Hi Dmitry, > > +static void virtgpu_dma_buf_move_notify(struct dma_buf_attachment > *attach) > > +{ > > + struct drm_gem_object *obj = attach->importer_priv; > > + struct virtio_gpu_device *vgdev = obj->dev->dev_private; > > + struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj); > > +

Re: [PATCH] drm/amdgpu: convert bios_hardcoded_edid to drm_edid

2024-07-20 Thread Thomas Weißschuh
Hi amdgpu maintainers, did you get a chance to look at the patch and the suspected bug? Thanks, Thomas On 2024-06-16 20:14:45+, Thomas Weißschuh wrote: > On 2024-06-16 11:12:03+, Thomas Weißschuh wrote: > > Instead of manually passing around 'struct edid *' and its size, > > use 'struct

[PATCH v7 04/28] dma-buf: heaps: Deduplicate docs and adopt common format

2024-07-20 Thread Yunfei Dong
From: "T.J. Mercier" The docs for dma_heap_get_name were incorrect, and since they were duplicated in the header they were wrong there too. The docs formatting was inconsistent so I tried to make it more consistent across functions since I'm already in here doing cleanup. Remove multiple unused

[PATCH v7 15/28] media: mediatek: vcodec: support single allocation format

2024-07-20 Thread Yunfei Dong
Changing driver to support single allocation format V4L2_PIX_FMT_MS21. Signed-off-by: Yunfei Dong --- .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec.c| 4 +++- .../mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c | 9 - 2 files changed, 11 insertions(+), 2 deletions(-) diff

[PATCH v7 25/28] media: mediatek: vcodec: remove vsi data from common interface

2024-07-20 Thread Yunfei Dong
Remove vsi related data from common interface to be compatible with the extend vsi with secure video playback change. Signed-off-by: Yunfei Dong --- .../decoder/vdec/vdec_h264_req_multi_if.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/med

[PATCH v7 01/28] v4l2: add restricted memory flags

2024-07-20 Thread Yunfei Dong
From: Jeffrey Kardatzke Adds a V4L2 flag which indicates that a queue is using restricted dmabufs and the corresponding capability flag. Signed-off-by: Jeffrey Kardatzke Signed-off-by: Yunfei Dong [Yunfei: Change reviewer's comments] --- Documentation/userspace-api/media/v4l/buffer.rst

[PATCH v7 24/28] media: mediatek: vcodec: support vp9 svp decoder for mt8188

2024-07-20 Thread Yunfei Dong
From: Yilong Zhou Change vp9 driver to support secure video playback(svp) for mt8188. Need to map shared memory with optee interface and wait interrupt in optee-os. Signed-off-by: Yilong Zhou Signed-off-by: Yunfei Dong [Yunfei: Fix the checkpatch warning] --- .../vcodec/decoder/vdec/vdec_vp9_

[PATCH v7 02/28] v4l2: handle restricted memory flags in queue setup

2024-07-20 Thread Yunfei Dong
From: Jeffrey Kardatzke Validates the restricted memory flags when setting up a queue and ensures the queue has the proper capability. Signed-off-by: Jeffrey Kardatzke Signed-off-by: Yunfei Dong [Yunfei: Change reviewer's comments] --- .../media/common/videobuf2/videobuf2-core.c | 29 ++

[PATCH v7 23/28] media: mediatek: vcodec: support av1 svp decoder for mt8188

2024-07-20 Thread Yunfei Dong
From: Xiaoyong Lu Change av1 driver to support secure video playback(svp) for mt8188. Need to map shared memory with optee interface and wait interrupt in optee-os. Signed-off-by: Xiaoyong Lu Signed-off-by: Yunfei Dong --- .../vcodec/decoder/vdec/vdec_av1_req_lat_if.c | 104 +++---

Re: [PATCH 02/10] accel/amdxdna: Support hardware mailbox

2024-07-20 Thread Markus Elfring
… > +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c > @@ -0,0 +1,582 @@ … > +int xdna_mailbox_send_msg(struct mailbox_channel *mb_chann, > + const struct xdna_mailbox_msg *msg, u64 tx_timeout) > +{ > + struct xdna_msg_header *header; > + struct mailbox_msg *mb_msg; I pr

[PATCH v7 11/28] media: mediatek: vcodec: initialize msg and vsi information

2024-07-20 Thread Yunfei Dong
Initialize the msg and vsi information before send to optee, then calling tee invoke command to send. For the optee communication interface is different with scp, adding condition to separate them. Signed-off-by: Yunfei Dong --- .../vcodec/decoder/mtk_vcodec_dec_drv.h | 2 + .../mediatek

Re: [PATCH v7 01/28] v4l2: add restricted memory flags

2024-07-20 Thread Hans Verkuil
Hi Yunfei, First a high-level comment: Adding a new V4L2 uAPI also requires patches to v4l-utils, specifically v4l2-ctl and v4l2-compliance (i.e. new tests are needed for this flag). This will also help you test the driver. Some more comments below: On 20/07/2024 09:15, Yunfei Dong wrote: > Fr

Re: [PATCH 03/10] accel/amdxdna: Add hardware resource solver

2024-07-20 Thread Markus Elfring
> The AI Engine consists of 2D array of tiles arranged as columns. The > resource solver provides the interfaces to manage allocation of the tile > columns for a hardware context. The basic column allocation and release > functions are provided. Can such a change description be improved with imper

Re: [PATCH v7 02/28] v4l2: handle restricted memory flags in queue setup

2024-07-20 Thread Hans Verkuil
On 20/07/2024 09:15, Yunfei Dong wrote: > From: Jeffrey Kardatzke > > Validates the restricted memory flags when setting up a queue and > ensures the queue has the proper capability. > > Signed-off-by: Jeffrey Kardatzke > Signed-off-by: Yunfei Dong > [Yunfei: Change reviewer's comments] > ---

Re: [PATCH v7 03/28] media: videobuf2: calculate restricted memory size

2024-07-20 Thread Hans Verkuil
On 20/07/2024 09:15, Yunfei Dong wrote: > Getting the physical address with sg_dma_address for restricted memory, > only return the first physical address size since sg may not be physical > continuous, then leading to the dmabuf size is small than buf size. Need > to bypass continuous checking for

Re: [PATCH v7 02/28] v4l2: handle restricted memory flags in queue setup

2024-07-20 Thread Hans Verkuil
On 20/07/2024 09:15, Yunfei Dong wrote: > From: Jeffrey Kardatzke > > Validates the restricted memory flags when setting up a queue and > ensures the queue has the proper capability. > > Signed-off-by: Jeffrey Kardatzke > Signed-off-by: Yunfei Dong > [Yunfei: Change reviewer's comments] > ---

Re: [PATCH 04/10] accel/amdxdna: Add hardware context

2024-07-20 Thread Markus Elfring
> … The tile columns belong to … which …? … > +++ b/drivers/accel/amdxdna/aie2_ctx.c > @@ -0,0 +1,181 @@ … > +void aie2_hwctx_fini(struct amdxdna_hwctx *hwctx) > +{ > + struct amdxdna_dev *xdn

[PATCH] drm/edid: add non-desktop quirk to Pimax VR Headsets

2024-07-20 Thread Sefa Eyeoglu
See https://gitlab.freedesktop.org/drm/misc/kernel/-/issues/40 Signed-off-by: Sefa Eyeoglu --- drivers/gpu/drm/drm_edid.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index f68a41eeb1fa..41879d67599d 100644 --- a/drivers/gpu/drm

Re: [PATCH v4 0/4] drm/panic: Add a QR code panic screen

2024-07-20 Thread Mitchell Levy
I am trying to test this patchset on my setup, but I cannot get it working. In case it's relevant, I'm running under HyperV. Any troubleshooting steps/suggestions would definitely be appreciated. Thanks! Mitchell On 7/17/2024 7:24 AM, Jocelyn Falempe wrote: This series adds a new panic screen

[drm-misc:drm-misc-next 1/4] drm_atomic_uapi.c:(.text+0x1e40): multiple definition of `drm_panic_is_enabled'; drivers/gpu/drm/drm_atomic.o:drm_atomic.c:(.text+0x2ca0): first defined here

2024-07-20 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next head: 7e33fc2ff6754b5ff39b11297f713cd0841d9962 commit: 9f774c42a908affba615bbed7463dd4f904dd5f1 [1/4] drm/panic: Add drm_panic_is_enabled() config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20240720/202407202247

Re: [PATCH v7 05/28] dma-heap: Add proper kref handling on dma-buf heaps

2024-07-20 Thread Markus Elfring
… > +++ b/drivers/dma-buf/dma-heap.c … > +static void dma_heap_release(struct kref *ref) > +{ … > + mutex_lock(&heap_list_lock); > + list_del(&heap->list); > + mutex_unlock(&heap_list_lock); … Under which circumstances would you become interested to apply a statement like “guard(mutex)

[drm-misc:drm-misc-next 1/4] ld.lld: error: duplicate symbol: drm_panic_is_enabled

2024-07-20 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next head: 7e33fc2ff6754b5ff39b11297f713cd0841d9962 commit: 9f774c42a908affba615bbed7463dd4f904dd5f1 [1/4] drm/panic: Add drm_panic_is_enabled() config: i386-buildonly-randconfig-001-20240720 (https://download.01.org/0day-ci/archive

[drm-misc:drm-misc-next 4/4] drivers/gpu/drm/drm_panic.c:712:6: error: no previous prototype for 'drm_panic_is_enabled'

2024-07-20 Thread kernel test robot
Hi Jocelyn, First bad commit (maybe != root cause): tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next head: 7e33fc2ff6754b5ff39b11297f713cd0841d9962 commit: 3a9b77cee7502f7450c725d4ead2c4a44924d158 [4/4] drm/panic: Remove build time dependency with FRAMEBUFFER_CONSOLE config: i3

[drm-misc:drm-misc-next 2/4] ERROR: modpost: "panic_cpu" [drivers/video/fbdev/core/fb.ko] undefined!

2024-07-20 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next head: 7e33fc2ff6754b5ff39b11297f713cd0841d9962 commit: d20a9f568f99591886ec73b80ff7283486710643 [2/4] fbcon: Add an option to disable fbcon in panic config: i386-randconfig-005-20240720 (https://download.01.org/0day-ci/archive

[drm-misc:drm-misc-next 4/4] drivers/gpu/drm/drm_panic.c:712:6: error: no previous prototype for function 'drm_panic_is_enabled'

2024-07-20 Thread kernel test robot
Hi Jocelyn, First bad commit (maybe != root cause): tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next head: 7e33fc2ff6754b5ff39b11297f713cd0841d9962 commit: 3a9b77cee7502f7450c725d4ead2c4a44924d158 [4/4] drm/panic: Remove build time dependency with FRAMEBUFFER_CONSOLE config: x8

[drm-misc:drm-misc-next 3/4] drivers/gpu/drm/drm_crtc_internal.h:324: multiple definition of `drm_panic_is_enabled'; drivers/gpu/drm/drm_atomic_helper.o:drivers/gpu/drm/drm_crtc_internal.h:324: first

2024-07-20 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next head: 7e33fc2ff6754b5ff39b11297f713cd0841d9962 commit: c2c2a91f3868515969a758042887fdc722216525 [3/4] drm/fb-helper: Set skip_panic if the drm driver supports drm panic config: i386-randconfig-011-20240720 (https://download.01