[PATCH] drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource

2023-07-11 Thread zhangshida
From: Shida Zhang Quiet down this gcc warning generated by gcc (Debian 10.2.1-6) 10.2.1 20210110: ../drivers/gpu/drm/i915/soc/intel_gmch.c: In function ‘intel_alloc_mchbar_resource’: ../drivers/gpu/drm/i915/soc/intel_gmch.c:41:6: error: variable ‘mchbar_addr’ set but not used [-Werror=unused-b

Re: [PATCH v4 2/8] drm/atomic: Add support for mouse hotspots

2023-07-11 Thread Pekka Paalanen
On Mon, 10 Jul 2023 10:46:56 -0700 Michael Banack wrote: > On 7/10/23 01:17, Pekka Paalanen wrote: > > On Fri, 7 Jul 2023 13:54:21 -0700 > > Michael Banack wrote: ... > >> So I guess I would vote for trying to include something to that effect > >> as context or explanation, but not try to stri

Re: [PATCH RESEND] drm/bridge: anx7625: Use common macros for DP power sequencing commands

2023-07-11 Thread Jani Nikula
On Tue, 11 Jul 2023, Chen-Yu Tsai wrote: > On Mon, Jul 10, 2023 at 6:32 PM Jani Nikula > wrote: >> >> On Mon, 10 Jul 2023, Chen-Yu Tsai wrote: >> > The DRM DP code has macros for the DP power sequencing commands. Use >> > them in the anx7625 driver instead of raw numbers. >> > >> > Fixes: 548b5

Re: [PATCH 02/15] phy: qualcomm: add QMP HDMI PHY driver

2023-07-11 Thread Vinod Koul
On 23-05-23, 15:14, Dmitry Baryshkov wrote: > Port Qualcomm QMP HDMI PHY to the generic PHY framework. Split the > generic part and the msm8996 part. When adding support for msm8992/4 and > msm8998 (which also employ QMP for HDMI PHY), one will have to provide > the PLL programming part only. > >

Re: [PATCH] drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource

2023-07-11 Thread Jani Nikula
On Tue, 11 Jul 2023, zhangshida wrote: > From: Shida Zhang > > Quiet down this gcc warning generated by > gcc (Debian 10.2.1-6) 10.2.1 20210110: > > ../drivers/gpu/drm/i915/soc/intel_gmch.c: In function > ‘intel_alloc_mchbar_resource’: > ../drivers/gpu/drm/i915/soc/intel_gmch.c:41:6: error: vari

Re: [PATCH] phy: phy-mtk-dp: Fix an error code in probe()

2023-07-11 Thread Vinod Koul
On Tue, 11 Jul 2023 09:13:25 +0300, Dan Carpenter wrote: > Negative -EINVAL was intended instead of positive EINVAL. > > Applied, thanks! [1/1] phy: phy-mtk-dp: Fix an error code in probe() commit: 03966c3950d36d6b671158be3794eb7211434faa Best regards, -- ~Vinod

Re: [PATCH] phy: mediatek: hdmi: mt8195: fix prediv bad upper limit test

2023-07-11 Thread Vinod Koul
On Tue, 30 May 2023 10:43:07 +0200, Guillaume Ranquet wrote: > The pll prediv calculus searchs for the smallest prediv that gets > the ns_hdmipll_ck in the range of 5 GHz to 12 GHz. > > A typo in the upper bound test was testing for 5Ghz to 1Ghz > > Applied, thanks! [1/1] phy: mediatek: hdmi

Re: [Freedreno] [PATCH RFC v4 1/7] drm: Introduce solid fill DRM plane property

2023-07-11 Thread Pekka Paalanen
On Mon, 10 Jul 2023 16:12:06 -0700 Jessica Zhang wrote: > On 6/30/2023 1:27 AM, Pekka Paalanen wrote: > > On Thu, 29 Jun 2023 17:25:00 -0700 > > Jessica Zhang wrote: > > > >> Document and add support for solid_fill property to drm_plane. In > >> addition, add support for setting and getting t

Re: [PATCH 0/3] MediaTek MIPI-DSI PHY: Cleanups

2023-07-11 Thread Vinod Koul
On Thu, 25 May 2023 13:52:55 +0200, AngeloGioacchino Del Regno wrote: > This series performs some cleanups to the MediaTek mipi-dsi PHY, used in > various MediaTek SoCs; in particular, it's migrating this driver to > register its clock as clk_hw provider instead and makes use of the devm > functi

Re: [PATCH] drm/scheduler: Add missing RCU flag to fence slab

2023-07-11 Thread Christian König
Am 10.07.23 um 23:15 schrieb Luben Tuikov: On 2023-07-10 16:56, Rob Clark wrote: From: Rob Clark Fixes the KASAN splat: == BUG: KASAN: use-after-free in msm_ioctl_wait_fence+0x31c/0x7b0 Read of size 4 at addr ff80

Re: [Intel-gfx] [PATCH 1/5] drm/i915: Add ability for tracking buffer objects per client

2023-07-11 Thread Iddamsetty, Aravind
On 10-07-2023 18:50, Tvrtko Ursulin wrote: > > On 10/07/2023 11:44, Iddamsetty, Aravind wrote: >> On 07-07-2023 18:32, Tvrtko Ursulin wrote: >>> From: Tvrtko Ursulin >>> >>> In order to show per client memory usage lets add some infrastructure >>> which enables tracking buffer objects owned by

Re: [RFC PATCH 01/10] dma-buf: add support for paged attachment mappings

2023-07-11 Thread Christian König
Am 11.07.23 um 00:32 schrieb Mina Almasry: Currently dmabuf p2p memory doesn't present itself in the form of struct pages and the memory can't be easily used with code that expects memory in that form. Well, this won't fly at all. First of all DMA-buf is *not* about passing struct pages around

Re: [PATCH 5/5 v3] accel/qaic: Fix a leak in map_user_pages()

2023-07-11 Thread Dafna Hirschfeld
On 11.07.2023 09:13, Dan Carpenter wrote: If get_user_pages_fast() allocates some pages but not as many as we wanted, then the current code leaks those pages. Call put_page() on the pages before returning. Fixes: 129776ac2e38 ("accel/qaic: Add control path") Signed-off-by: Dan Carpenter Revi

Re: [PATCH] drm/loongson: Fix two warnings because of passing wrong type

2023-07-11 Thread Jani Nikula
On Mon, 10 Jul 2023, suijingfeng wrote: > Hi, > > On 2023/7/10 18:26, Jani Nikula wrote: >> On Mon, 10 Jul 2023, Sui Jingfeng wrote: >>> When accessing I/O memory, we should pass '__iomem *' type instead of >>> 'void *' simply, otherwise sparse tests will complain. After applied >>> this patch, t

[PATCH 0/5 v4] accel/qaic: Improve bounds checking in encode/decode

2023-07-11 Thread Dan Carpenter
Fixed in v4: Send the correct [PATCH 1/5] patch. Fixed in v3: Redo messed up threading Fixed two things in v2: Include the file. Change the >= in encode and decode to >. regards, dan carpenter

[PATCH 1/5 v4] accel/qaic: tighten bounds checking in encode_message()

2023-07-11 Thread Dan Carpenter
There are several issues in this code. The check at the start of the loop: if (user_len >= user_msg->len) { This check does not ensure that we have enough space for the trans_hdr (8 bytes). Instead the check needs to be: if (user_len > user_msg->len - sizeof(*trans_hdr)) { Tha

[PATCH 2/5 v4] accel/qaic: tighten bounds checking in decode_message()

2023-07-11 Thread Dan Carpenter
Copy the bounds checking from encode_message() to decode_message(). This patch addresses the following concerns. Ensure that there is enough space for at least one header so that we don't have a negative size later. if (msg_hdr_len < sizeof(*trans_hdr)) Ensure that we have enough space

[PATCH 3/5 v4] accel/qaic: Add consistent integer overflow checks

2023-07-11 Thread Dan Carpenter
The encode_dma() function has integer overflow checks. The encode_passthrough(), encode_activate() and encode_status() functions did not. I added integer overflow checking everywhere. I also updated the integer overflow checking in encode_dma() to use size_add() so everything is consistent. Fix

[PATCH 4/5 v4] accel/qaic: move and expand integer overflow checks for map_user_pages()

2023-07-11 Thread Dan Carpenter
The integer overflow checking for find_and_map_user_pages() was done in encode_dma(). Presumably this was to do it before the allocation. But it's not super important that the failure path is a fast path and it hurts readability to put the check so far from the where the variable is used. Move t

[PATCH 5/5 v4] accel/qaic: Fix a leak in map_user_pages()

2023-07-11 Thread Dan Carpenter
If get_user_pages_fast() allocates some pages but not as many as we wanted, then the current code leaks those pages. Call put_page() on the pages before returning. Fixes: 129776ac2e38 ("accel/qaic: Add control path") Signed-off-by: Dan Carpenter --- no change drivers/accel/qaic/qaic_control.c

Re: [PATCH RESEND] drm/bridge: anx7625: Use common macros for DP power sequencing commands

2023-07-11 Thread Chen-Yu Tsai
On Tue, Jul 11, 2023 at 3:23 PM Jani Nikula wrote: > > On Tue, 11 Jul 2023, Chen-Yu Tsai wrote: > > On Mon, Jul 10, 2023 at 6:32 PM Jani Nikula > > wrote: > >> > >> On Mon, 10 Jul 2023, Chen-Yu Tsai wrote: > >> > The DRM DP code has macros for the DP power sequencing commands. Use > >> > them

Re: [PATCH] drm/panel: Add avdd/avee delay for Starry-himax83102-j02 and Starry-ili9882t panel

2023-07-11 Thread cong yang
Hi, On Fri, Jul 7, 2023 at 11:15 PM Doug Anderson wrote: > > Hi, > > On Thu, Jul 6, 2023 at 6:20 PM cong yang > wrote: > > > > Hi, > > > > On Fri, Jul 7, 2023 at 3:32 AM Doug Anderson wrote: > > > > > > Hi, > > > > > > On Mon, Jul 3, 2023 at 10:07 PM Cong Yang > > > wrote: > > > > > > > > From

Re: [PATCH v5 6/6] drm/doc: Define KMS atomic state set

2023-07-11 Thread Daniel Vetter
On Fri, Jul 07, 2023 at 07:40:59PM -0300, André Almeida wrote: > From: Pekka Paalanen > > Specify how the atomic state is maintained between userspace and > kernel, plus the special case for async flips. > > Signed-off-by: Pekka Paalanen > Signed-off-by: André Almeida > --- > v4: total rework

[PATCH] drm/virtio: remove some redundant code

2023-07-11 Thread Su Hui
virtio_gpu_get_vbuf always be successful, so remove the error judgment. Signed-off-by: Su Hui --- drivers/gpu/drm/virtio/virtgpu_vq.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index b1a00c0c25a7..7a2680b3f1a7

Re: [PATCH 2/5] drm/i915: Record which client owns a VM

2023-07-11 Thread Iddamsetty, Aravind
On 07-07-2023 18:32, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > To enable accounting of indirect client memory usage (such as page tables) > in the following patch, lets start recording the creator of each PPGTT. > > Signed-off-by: Tvrtko Ursulin > --- > drivers/gpu/drm/i915/gem/i915_

Re: [Intel-gfx] [PATCH 3/5] drm/i915: Track page table backing store usage

2023-07-11 Thread Iddamsetty, Aravind
On 07-07-2023 18:32, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Account page table backing store against the owning client memory usage > stats. > > Signed-off-by: Tvrtko Ursulin > --- > drivers/gpu/drm/i915/gt/intel_gtt.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git

[PATCH] drm/panel-edp: Add AUO B116XAB01.4 (HW:0A) panel entry

2023-07-11 Thread Chen-Yu Tsai
This panel is found at least on the MT8183-based Juniper Chromebook, also known as the Acer Chromebook Spin 311. It matches the common delay_200_500_e50 set of delay timings. Add an entry for it. Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/panel/panel-edp.c | 1 + 1 file changed, 1 insertio

[PATCH 0/2] Two memory leak fixes in drm_client_modeset.c

2023-07-11 Thread Jocelyn Falempe
Jocelyn Falempe (2): drm/client: Fix memory leak in drm_client_target_cloned drm/client: Fix memory leak in drm_client_modeset_probe drivers/gpu/drm/drm_client_modeset.c | 8 1 file changed, 8 insertions(+) base-commit: 2f98e686ef59b5d19af5847d755798e2031bee3a -- 2.41.0

[PATCH 1/2] drm/client: Fix memory leak in drm_client_target_cloned

2023-07-11 Thread Jocelyn Falempe
dmt_mode is allocated and never freed in this function. It was found with the ast driver, but most drivers using generic fbdev setup are probably affected. This fixes the following kmemleak report: backtrace: [] drm_mode_duplicate+0x45/0x220 [drm] [] d

Re: [PATCH] phy: phy-mtk-dp: Fix an error code in probe()

2023-07-11 Thread AngeloGioacchino Del Regno
Il 11/07/23 08:13, Dan Carpenter ha scritto: Negative -EINVAL was intended instead of positive EINVAL. Fixes: 6a23afad443a ("phy: phy-mtk-dp: Add driver for DP phy") Signed-off-by: Dan Carpenter Reviewed-by: AngeloGioacchino Del Regno

[PATCH 2/2] drm/client: Fix memory leak in drm_client_modeset_probe

2023-07-11 Thread Jocelyn Falempe
When a new mode is set to modeset->mode, the previous mode should be freed. This fixes the following kmemleak report: drm_mode_duplicate+0x45/0x220 [drm] drm_client_modeset_probe+0x944/0xf50 [drm] __drm_fb_helper_initial_config_and_unlock+0xb4/0x2c0 [drm_kms_helper] drm_fbdev_client_hotplug+0x2bc/

Re: [PATCH 1/2] drm/client: Fix memory leak in drm_client_target_cloned

2023-07-11 Thread Javier Martinez Canillas
Jocelyn Falempe writes: Hello Jocelyn, > dmt_mode is allocated and never freed in this function. > It was found with the ast driver, but most drivers using generic fbdev > setup are probably affected. > > This fixes the following kmemleak report: > backtrace: > [] drm_mod

Re: [PATCH 2/2] drm/client: Fix memory leak in drm_client_modeset_probe

2023-07-11 Thread Javier Martinez Canillas
Jocelyn Falempe writes: > When a new mode is set to modeset->mode, the previous mode should be freed. > This fixes the following kmemleak report: > > drm_mode_duplicate+0x45/0x220 [drm] > drm_client_modeset_probe+0x944/0xf50 [drm] > __drm_fb_helper_initial_config_and_unlock+0xb4/0x2c0 [drm_kms_he

Re: [Intel-gfx] [PATCH 4/5] drm/i915: Account ring buffer and context state storage

2023-07-11 Thread Iddamsetty, Aravind
On 07-07-2023 18:32, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Account ring buffers and logical context space against the owning client > memory usage stats. > > Signed-off-by: Tvrtko Ursulin > --- > drivers/gpu/drm/i915/gt/intel_context.c | 13 + > drivers/gpu/drm/i915/i

Re: [PATCH] drm/virtio: remove some redundant code

2023-07-11 Thread Markus Elfring
> virtio_gpu_get_vbuf always be successful, > so remove the error judgment. How do you think about to improve this change description any more? Regards, Markus

Re: [Intel-gfx] [PATCH 1/5] drm/i915: Add ability for tracking buffer objects per client

2023-07-11 Thread Tvrtko Ursulin
On 11/07/2023 08:48, Iddamsetty, Aravind wrote: On 10-07-2023 18:50, Tvrtko Ursulin wrote: On 10/07/2023 11:44, Iddamsetty, Aravind wrote: On 07-07-2023 18:32, Tvrtko Ursulin wrote: From: Tvrtko Ursulin In order to show per client memory usage lets add some infrastructure which enables tr

Re: [PATCH 2/2] drm/client: Fix memory leak in drm_client_modeset_probe

2023-07-11 Thread Thomas Zimmermann
Am 11.07.23 um 11:20 schrieb Jocelyn Falempe: When a new mode is set to modeset->mode, the previous mode should be freed. This fixes the following kmemleak report: drm_mode_duplicate+0x45/0x220 [drm] drm_client_modeset_probe+0x944/0xf50 [drm] __drm_fb_helper_initial_config_and_unlock+0xb4/0x2c

Re: [Intel-gfx] [PATCH 4/5] drm/i915: Account ring buffer and context state storage

2023-07-11 Thread Tvrtko Ursulin
On 11/07/2023 10:29, Iddamsetty, Aravind wrote: On 07-07-2023 18:32, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Account ring buffers and logical context space against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_context.c | 13 ++

Re: [PATCH 1/2] drm/client: Fix memory leak in drm_client_target_cloned

2023-07-11 Thread Thomas Zimmermann
Am 11.07.23 um 11:20 schrieb Jocelyn Falempe: dmt_mode is allocated and never freed in this function. It was found with the ast driver, but most drivers using generic fbdev setup are probably affected. This fixes the following kmemleak report: backtrace: [] drm_mode_d

Re: i915 build issue

2023-07-11 Thread Jani Nikula
On Tue, 11 Jul 2023, John Garry wrote: > Hi guys, > > Did anyone else notice this build issue on v6.5-rc1: > > drivers/gpu/drm/i915/i915_pci.c:143:15: error: expected expression > before ‘,’ token >GEN3_FEATURES, > ^ > drivers/gpu/drm/i915/i915_pci.c:151:15: error: expected exp

Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers

2023-07-11 Thread Miguel Ojeda
On Tue, Jul 11, 2023 at 8:10 AM Thomas Zimmermann wrote: > > I'd like to take the patchset into drm-misc. It's part of a larger > cleanup of the fbdev modules and its interfaces. Sounds good, thanks! Cheers, Miguel

Re: XDC 2023: Registration & Call for Proposals now open!

2023-07-11 Thread Ricardo Garcia
New reminder that the XDC 2023 Registration and Call for Proposals are open till the end of this week. The deadline is July 17. Please submit your proposals ASAP! You can find more information about XDC 2023 in previous emails below. Thanks again for your attention, -Ricardo On Tue, 2023-06-27 at

Re: [PATCH] drm/client: Send hotplug event after registering a client

2023-07-11 Thread Dmitry Baryshkov
On 11/07/2023 09:07, Thomas Zimmermann wrote: Hi Am 10.07.23 um 23:11 schrieb Dmitry Baryshkov: [...] ---   drivers/gpu/drm/armada/armada_fbdev.c |  4   drivers/gpu/drm/drm_client.c  | 21 +   drivers/gpu/drm/drm_fbdev_dma.c   |  4   drivers/

[RFC v4 0/3] Introduce KUnit tests for TTM subsystem

2023-07-11 Thread Karolina Stolarek
This series introduces KUnit[1] tests for TTM (Translation Table Manager) subsystem, a memory manager used by graphics drivers to create and manage memory buffers across different memory domains, such as system memory or VRAM. Unit tests implemented here cover two data structures: - ttm_device -

[RFC v4 1/3] drm/ttm: Introduce KUnit tests

2023-07-11 Thread Karolina Stolarek
Add the initial version of unit tests for ttm_device struct, together with helper functions. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/Kconfig | 15 +++ drivers/gpu/drm/ttm/Makefile | 1 + drivers/gpu/drm/ttm/tests/.kunitconfig| 4 + dr

[RFC v4 3/3] drm/ttm/tests: Add tests for ttm_pool

2023-07-11 Thread Karolina Stolarek
Add KUnit tests that exercise page allocation using page pools and freeing pages, either by returning them to the pool or freeing them. Add a basic test for ttm_pool cleanup. Introduce helpers to create a dummy ttm_buffer_object. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/Mak

[RFC v4 2/3] drm/ttm/tests: Add tests for ttm_device

2023-07-11 Thread Karolina Stolarek
Test initialization and cleanup of the ttm_device struct, including some error paths. Verify the creation of page pools if use_dma_alloc param is true. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_device_test.c | 159 1 file changed, 159 insertions(+)

i915 build issue

2023-07-11 Thread John Garry
Hi guys, Did anyone else notice this build issue on v6.5-rc1: drivers/gpu/drm/i915/i915_pci.c:143:15: error: expected expression before ‘,’ token GEN3_FEATURES, ^ drivers/gpu/drm/i915/i915_pci.c:151:15: error: expected expression before ‘,’ token GEN3_FEATURES,

Re: i915 build issue

2023-07-11 Thread John Garry
On 11/07/2023 10:58, Jani Nikula wrote: I didn't notice anything on dri-devel mailing list about this. I presume you're using CONFIG_WERROR=y or W=e. I'm just using whatever vanilla x86_64_defconfig gives. See [1] and [2]. I'm undecided how we should treat this. Ok. Thanks, John

Re: i915 build issue

2023-07-11 Thread Jani Nikula
On Tue, 11 Jul 2023, John Garry wrote: > On 11/07/2023 10:58, Jani Nikula wrote: >>> I didn't notice anything on dri-devel mailing list about this. >> I presume you're using CONFIG_WERROR=y or W=e. > > I'm just using whatever vanilla x86_64_defconfig gives. > >> >> See [1] and [2]. I'm undecided

[PATCH 01/12] accel/habanalabs/gaudi2: un-secure register for engine cores interrupt

2023-07-11 Thread Oded Gabbay
From: Tomer Tayar The F/W dynamically allocates one of the PSOC scratchpad registers for the engine cores, so they can raise events towards the F/W. To allow the engine cores to access this register, this register must be non-secured. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-

[PATCH 02/12] accel/habanalabs/gaudi2: unsecure tpc count registers

2023-07-11 Thread Oded Gabbay
From: Ofir Bitton As TPC kernels now must use those registers we unsecure them. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2_security.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/accel/habanalabs/ga

[PATCH 05/12] accel/habanalabs: handle f/w reserved dram space request

2023-07-11 Thread Oded Gabbay
From: Dani Liberman It is possible for FW to request reserved space in dram. If the device supports this option, it will retrieve the size from the f/w and will reserve it. Currently we add the common code infrastructure to support it. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Sig

[PATCH 03/12] accel/habanalabs/gaudi2: prepare to remove soft_rst_irq

2023-07-11 Thread Oded Gabbay
From: Igor Grinberg The soft reset has transitioned to CPUCP packet instead of plain register write and is about to be removed from the struct cpu_dyn_regs. As a preparation for removing the gic_host_soft_rst_irq field from struct cpu_dyn_regs, switch to use the plain macro - this keeps the backw

[PATCH 06/12] accel/habanalabs: set default device release watchdog T/O as 30 sec

2023-07-11 Thread Oded Gabbay
From: Tomer Tayar After being notified about certain errors, user is expected to finish his post-errors actions and to release the device within some timeout, after which is deice is being reset. The default timeout value is 5 sec, which in some case is not enough for a user application to collec

[PATCH 09/12] accel/habanalabs: update sysfs-driver-habanalabs with the accel path

2023-07-11 Thread Oded Gabbay
From: Tomer Tayar Replace "/sys/class/habanalabs/hl/..." with "/sys/class/accel/accel/device/...". Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../ABI/testing/sysfs-driver-habanalabs | 64 +-- 1 file changed, 32 insertions(+), 32 d

[PATCH 08/12] accel/habanalabs: register compute device as an accel device

2023-07-11 Thread Oded Gabbay
From: Tomer Tayar Register the compute device as an accel device, and remove the creation of the habanalabs compute char device. The IOCTLs in this patch are still handled by the current driver handler. Moving to DRM IOCTL handling requires moving the IOCTLs numbers to a specific range, so it wi

[PATCH 07/12] accel/habanalabs: add info ioctl for engine error reports

2023-07-11 Thread Oded Gabbay
From: Ofir Bitton User gets notification for every engine error report, but he still lacks the exact engine information. Hence, we allow user to query for the exact engine reported an error. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/haba

[PATCH 10/12] accel/habanalabs: update debugfs-driver-habanalabs with the accel path

2023-07-11 Thread Oded Gabbay
From: Tomer Tayar Replace "/sys/kernel/debug/habanalabs/hl/..." with "/sys/kernel/debug/accel//...". Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../ABI/testing/debugfs-driver-habanalabs | 84 +-- 1 file changed, 42 insertions(+), 42

[PATCH 04/12] accel/habanalabs/gaudi2: fix missing check of kernel ctx

2023-07-11 Thread Oded Gabbay
If we are initializing the kernel context when we have a Gaudi2 device, we don't need to do any late initializing of that context with specific Gaudi2 code. Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acce

[PATCH 11/12] accel/habanalabs: Move ioctls to the device specific ioctls range

2023-07-11 Thread Oded Gabbay
From: Tomer Tayar To use drm_ioctl(), move the ioctls to the device specific ioctls range at [DRM_COMMAND_BASE, DRM_COMMAND_END). Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../accel/habanalabs/common/command_buffer.c | 5 +- .../habanalabs/common/co

[PATCH 12/12] accel/habanalabs: release user interfaces earlier in device fini

2023-07-11 Thread Oded Gabbay
From: Tomer Tayar Currently the sysfs/debugfs interfaces and device un-registration are done as the last thing in hl_device_fini(), after several finalizations and releases are done. While a disabled flag is set at the beginning of hl_device_fini(), and it is being checked when handling user acce

Re: [PATCH] drm/virtio: remove some redundant code

2023-07-11 Thread Dan Carpenter
On Tue, Jul 11, 2023 at 05:00:31PM +0800, Su Hui wrote: > virtio_gpu_get_vbuf always be successful, > so remove the error judgment. > No, just ignore the static checker false positive in this case. The intent of the code is clear that if it did have an error it should return an error pointer. r

Re: [PATCH v4 2/2] phy: mtk-mipi-csi: add driver for CSI phy

2023-07-11 Thread Vinod Koul
On 20-06-23, 14:18, Julien Stephan wrote: > From: Phi-bang Nguyen > > This is a new driver that supports the MIPI CSI CD-PHY version 0.5 > > The number of PHYs depend on the SoC. > Each PHY can support D-PHY only or CD-PHY configuration. > The driver supports only D-PHY mode, so CD-PHY > compati

Re: [RFC PATCH 01/10] dma-buf: add support for paged attachment mappings

2023-07-11 Thread Mina Almasry
On Tue, Jul 11, 2023 at 12:59 AM Christian König wrote: > > Am 11.07.23 um 00:32 schrieb Mina Almasry: > > Currently dmabuf p2p memory doesn't present itself in the form of struct > > pages and the memory can't be easily used with code that expects memory > > in that form. > > Well, this won't fly

Re: [RFC PATCH 01/10] dma-buf: add support for paged attachment mappings

2023-07-11 Thread Christian König
Hi Mina, Am 11.07.23 um 13:44 schrieb Mina Almasry: On Tue, Jul 11, 2023 at 12:59 AM Christian König wrote: Am 11.07.23 um 00:32 schrieb Mina Almasry: Currently dmabuf p2p memory doesn't present itself in the form of struct pages and the memory can't be easily used with code that expects memo

Re: [RFC v4 2/3] drm/ttm/tests: Add tests for ttm_device

2023-07-11 Thread Christian König
Am 11.07.23 um 12:34 schrieb Karolina Stolarek: Test initialization and cleanup of the ttm_device struct, including some error paths. Verify the creation of page pools if use_dma_alloc param is true. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_device_test.c | 159 +++

Re: [PATCH 4/4] drm/i915: Implement fbdev emulation as in-kernel client

2023-07-11 Thread Thomas Zimmermann
Hi Am 28.03.23 um 17:31 schrieb Jani Nikula: [...] + +err_drm_fb_helper_fini: + drm_fb_helper_fini(fb_helper); +err_drm_err: + drm_err(dev, "Failed to setup radeon fbdev emulation (ret=%d)\n", ret); ^^ Hrrmmh. ;) O:) + return r

[Bug 205089] amdgpu : drm:amdgpu_cs_ioctl : Failed to initialize parser -125

2023-07-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205089 hermann-...@gmx.de changed: What|Removed |Added CC||hermann-...@gmx.de --- Comment #56 f

[Bug 205089] amdgpu : drm:amdgpu_cs_ioctl : Failed to initialize parser -125

2023-07-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205089 --- Comment #57 from hermann-...@gmx.de --- I've tried a lot of things. Changing Kernel, Upgrading to the next major OS Version. replacing the graphics card and more. Nothing helped. Unfortunately I did ignore a SATA error message in the syste

drm_exec context for amdgpu

2023-07-11 Thread Christian König
Hi Alex, so apart from some RADV semaphore issue which seems to be unrelated to this changes our CI systems are happy with the changes. Can I get some ack to push them through drm-misc-next? Thanks, Christian.

[PATCH 4/6] drm/amdgpu: use drm_exec for GEM and CSA handling v2

2023-07-11 Thread Christian König
Start using the new component here as well. v2: ignore duplicates to allow per VM BO mappings Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 78 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 81 - 2 files changed, 72 ins

[PATCH 3/6] drm/amdkfd: switch over to using drm_exec v2

2023-07-11 Thread Christian König
Avoids quite a bit of logic and kmalloc overhead. v2: fix multiple problems pointed out by Felix Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/Kconfig| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 5 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 299

[PATCH 2/6] drm: add drm_exec selftests v4

2023-07-11 Thread Christian König
Exercise at least all driver facing functions of this new component. v2: add array test as well v3: some kunit cleanups v4: more tests and cleanups Signed-off-by: Christian König --- drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/tests/Makefile| 3 +- drivers/gpu/drm/t

[PATCH 6/6] drm/amdgpu: use the new drm_exec object for CS v3

2023-07-11 Thread Christian König
Use the new component here as well and remove the old handling. v2: drop dupplicate handling v3: fix memory leak pointed out by Tatsuyuki Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 71 ++- drivers/gp

[PATCH 5/6] drm/amdgpu: use drm_exec for MES testing

2023-07-11 Thread Christian König
Start using the new component here as well. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 90 - 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.

[PATCH 1/6] drm: execution context for GEM buffers v7

2023-07-11 Thread Christian König
This adds the infrastructure for an execution context for GEM buffers which is similar to the existing TTMs execbuf util and intended to replace it in the long term. The basic functionality is that we abstracts the necessary loop to lock many different GEM buffers with automated deadlock and dupli

[PATCH 0/6] PCI/VGA: Fix typos, comments and copyright

2023-07-11 Thread Sui Jingfeng
From: Sui Jingfeng Various improve. Sui Jingfeng (6): PCI/VGA: Use unsigned type for the io_state variable PCI/VGA: Deal with PCI VGA compatible devices only PCI/VGA: drop the inline of vga_update_device_decodes() function PCI/VGA: Move the new_state assignment out the loop PCI/VGA: Ti

[PATCH 1/6] PCI/VGA: Use unsigned type for the io_state variable

2023-07-11 Thread Sui Jingfeng
From: Sui Jingfeng The io_state variable in the vga_arb_write() function is declared with unsigned int type, while the vga_str_to_iostate() function takes int * type. To keep them consistent, replace the third argument of vga_str_to_iostate() function with the unsigned int * type. Signed-off-by:

[PATCH 2/6] PCI/VGA: Deal with PCI VGA compatible devices only

2023-07-11 Thread Sui Jingfeng
From: Sui Jingfeng Currently, vgaarb only cares about PCI VGA-compatible class devices. While vga_arbiter_del_pci_device() gets called unbalanced when some PCI device is about to be removed. This happens even during the boot process. Another reason is that the vga_arb_device_init() function is

[PATCH 3/6] PCI/VGA: drop the inline of vga_update_device_decodes() function

2023-07-11 Thread Sui Jingfeng
From: Sui Jingfeng The vga_update_device_decodes() function is NOT a trivial function, It is not performance critical either. So, drop the inline. This patch also make the parameter and argument consistent, use unsigned int type instead of the signed type to store the decode. Change the second a

[PATCH 4/6] PCI/VGA: Move the new_state assignment out the loop

2023-07-11 Thread Sui Jingfeng
From: Sui Jingfeng In the vga_arbiter_notify_clients() function, the value of the 'new_state' variable will be 'false' on systems that have more than one PCI VGA card. Its value will be 'true' on systems that have one or no PCI VGA compatible card. In other words, its value is not relevant to the

[PATCH 5/6] PCI/VGA: Tidy up the code and comment format

2023-07-11 Thread Sui Jingfeng
From: Sui Jingfeng This patch replaces the leading space with a tab and removes the double blank line and fix various typos, no functional change. Reviewed-by: Andi Shyti Signed-off-by: Sui Jingfeng --- drivers/pci/vgaarb.c | 101 - include/linux/vgaa

[PATCH 6/6] PCI/VGA: Replace full MIT license text with SPDX identifier

2023-07-11 Thread Sui Jingfeng
From: Sui Jingfeng Per Documentation/process/license-rules.rst, the SPDX MIT identifier is equivalent to including the entire MIT license text from LICENSES/preferred/MIT. Replace the MIT license text with the equivalent SPDX identifier. Signed-off-by: Sui Jingfeng Reviewed-by: Andi Shyti ---

Consider switching to WQ_UNBOUND messages (was: Re: [PATCH v2 6/7] workqueue: Report work funcs that trigger automatic CPU_INTENSIVE mechanism)

2023-07-11 Thread Geert Uytterhoeven
Hi Tejun, On Fri, May 12, 2023 at 9:54 PM Tejun Heo wrote: > Workqueue now automatically marks per-cpu work items that hog CPU for too > long as CPU_INTENSIVE, which excludes them from concurrency management and > prevents stalling other concurrency-managed work items. If a work function > keeps

[PATCH 1/5] drm/debugfs: drop debugfs_init() for the render and accel node v2

2023-07-11 Thread Christian König
We want to remove per minor debugfs directories. Start by stopping drivers from adding anything inside of those in the mid layer callback. v2: drop it for the accel node as well Signed-off-by: Christian König Tested-by: Stanislaw Gruszka --- drivers/accel/drm_accel.c | 3 --- drivers/gpu/d

DRM debugfs cleanup take 5 (resend)

2023-07-11 Thread Christian König
Hi guys, sorry for the delay, just sending it out to the list once more to get some acks and rbs. Apart from that the CI systems seems to be happy with that and I think it can get merged now. Regards, Christian.

[PATCH 4/5] drm/debugfs: remove dev->debugfs_list and debugfs_mutex v2

2023-07-11 Thread Christian König
The mutex was completely pointless in the first place since any parallel adding of files to this list would result in random behavior since the list is filled and consumed multiple times. Completely drop that approach and just create the files directly but return -ENODEV while opening the file whe

[PATCH 5/5] drm/debugfs: rework drm_debugfs_create_files implementation

2023-07-11 Thread Christian König
Use managed memory allocation for this. That allows us to not keep track of all the files any more. Signed-off-by: Christian König --- drivers/accel/drm_accel.c | 2 - drivers/gpu/drm/drm_debugfs.c | 75 +- drivers/gpu/drm/drm_drv.c | 2 - drivers/gpu

[PATCH 2/5] drm/debugfs: disallow debugfs access when device isn't registered

2023-07-11 Thread Christian König
During device bringup it might be that we can't access the debugfs files. Return -ENODEV until the registration is completed on access. Signed-off-by: Christian König --- drivers/gpu/drm/drm_debugfs.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/drm_debugfs.c b/driv

[PATCH 3/5] drm/debugfs: rework debugfs directory creation v4

2023-07-11 Thread Christian König
Instead of the per minor directories only create a single debugfs directory for the whole device directly when the device is initialized. For DRM devices each minor gets a symlink to the per device directory for now until we can be sure that this isn't useful any more in any way. Accel devices cr

Re: Consider switching to WQ_UNBOUND messages (was: Re: [PATCH v2 6/7] workqueue: Report work funcs that trigger automatic CPU_INTENSIVE mechanism)

2023-07-11 Thread Geert Uytterhoeven
On Tue, Jul 11, 2023 at 3:55 PM Geert Uytterhoeven wrote: > > Hi Tejun, > > On Fri, May 12, 2023 at 9:54 PM Tejun Heo wrote: > > Workqueue now automatically marks per-cpu work items that hog CPU for too > > long as CPU_INTENSIVE, which excludes them from concurrency management and > > prevents st

Re: [PATCH v7] drm/msm: stop storing the array of CRTCs in struct msm_drm_private

2023-07-11 Thread Dmitry Baryshkov
On Fri, 19 May 2023 18:07:34 +0300, Dmitry Baryshkov wrote: > The array of CRTC in the struct msm_drm_private duplicates a list of > CRTCs in the drm_device. Drop it and use the existing list for CRTC > enumeration. > > Applied, thanks! [1/1] drm/msm: stop storing the array of CRTCs in struct

Re: [PATCH 0/5] arm64: dts: qcom: qrb5165-rb5: enable DP support

2023-07-11 Thread Dmitry Baryshkov
On Sun, 09 Jul 2023 07:19:21 +0300, Dmitry Baryshkov wrote: > Implement DisplayPort support for the Qualcomm RB5 platform. > > Note: while testing this, I had link training issues with several > dongles with DP connectors. Other DisplayPort-USB-C dongles (with HDMI > or VGA connectors) work perf

Re: [PATCH v2 0/2] DSIPHY RPM

2023-07-11 Thread Dmitry Baryshkov
On Tue, 20 Jun 2023 13:43:19 +0200, Konrad Dybcio wrote: > Some recent SoCs use power rails that we model as GENPDs to power the > DSIPHY. This series attempts to make such configurations suspendable. > > Tested on SM6375. > > Applied, thanks! [1/2] drm/msm/dsi: Use pm_runtime_resume_and_get

Re: [PATCH 0/2] DPU1 GC1.8 wiring-up

2023-07-11 Thread Dmitry Baryshkov
On Thu, 20 Apr 2023 03:14:53 +0200, Konrad Dybcio wrote: > Almost all SoCs from SDM845 to SM8550 inclusive feature a GC1.8 > dspp sub-block in addition to PCCv4. The other block differ a bit > more, but none of them are supported upstream. > > This series adds configures the GCv1.8 on all the re

Re: [PATCH v3 0/4] Qualcomm REFGEN regulator

2023-07-11 Thread Dmitry Baryshkov
On Mon, 03 Jul 2023 20:15:53 +0200, Konrad Dybcio wrote: > Recent Qualcomm SoCs have a REFGEN (reference voltage generator) regulator > responsible for providing a reference voltage to some on-SoC IPs (like DSI > or PHYs). It can be turned off when unused to save power. > > This series introduce

Re: [PATCH v5 00/19] drm/msm/dpu: another catalog rework

2023-07-11 Thread Dmitry Baryshkov
On Tue, 04 Jul 2023 05:21:17 +0300, Dmitry Baryshkov wrote: > Having a macro with 10 arguments doesn't seem like a good idea. It makes > it inherently harder to compare the actual structure values. Also this > leads to adding macros covering varieties of the block. > > As it was previously discu

Re: [PATCH v2] drm/msm/dsi: Enable BURST_MODE for command mode for DSI 6G v1.3+

2023-07-11 Thread Dmitry Baryshkov
On Tue, 27 Jun 2023 13:31:45 -0700, Jessica Zhang wrote: > During a frame transfer in command mode, there could be frequent > LP11 <-> HS transitions when multiple DCS commands are sent mid-frame or > if the DSI controller is running on slow clock and is throttled. To > minimize frame latency due

Re: [PATCH v2 0/3] dt-bindings: display: msm: document the SM8[345]50 displayport MDSS subnode

2023-07-11 Thread Dmitry Baryshkov
On Fri, 23 Jun 2023 14:32:52 +0200, Neil Armstrong wrote: > Document the displayport subnode to fix the bindings check error: > > arch/arm64/boot/dts/qcom/sm8550-mtp.dtb: display-subsystem@ae0: > Unevaluated properties are not allowed ('displayport-controller@ae9' was > unexpected) >

  1   2   3   >