RE: [PATCH] drm/radeon: ERROR: "foo* bar" should be "foo *bar"

2023-07-14 Thread SHANMUGAM, SRINIVASAN
[Public] Reviewed-by: Srinivasan Shanmugam -Original Message- From: amd-gfx On Behalf Of shijie...@208suo.com Sent: Friday, July 14, 2023 1:36 PM To: Deucher, Alexander ; Pan, Xinhui ; airl...@gmail.com; dan...@ffwll.ch Cc: dri-devel@lists.freedesktop.org;

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Luben Tuikov
On 2023-07-14 05:57, Christian König wrote: > Am 14.07.23 um 11:49 schrieb Asahi Lina: >> On 14/07/2023 17.43, Christian König wrote: >>> Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are independencly reference counted.

Re: [PATCH v2] drm/msm/dsi: Enable DATABUS_WIDEN for DSI command mode

2023-07-14 Thread Dmitry Baryshkov
On 15/07/2023 03:59, Jessica Zhang wrote: On 7/14/2023 3:30 PM, Dmitry Baryshkov wrote: On Fri, 14 Jul 2023 at 22:03, Jessica Zhang wrote: On 7/13/2023 6:23 PM, Dmitry Baryshkov wrote: On 14/07/2023 03:21, Jessica Zhang wrote: DSI 6G v2.5.x+ and DPU 7.x+ support a data-bus widen mode

Re: [PATCH v2] drm/msm/dsi: Enable DATABUS_WIDEN for DSI command mode

2023-07-14 Thread Jessica Zhang
On 7/14/2023 3:30 PM, Dmitry Baryshkov wrote: On Fri, 14 Jul 2023 at 22:03, Jessica Zhang wrote: On 7/13/2023 6:23 PM, Dmitry Baryshkov wrote: On 14/07/2023 03:21, Jessica Zhang wrote: DSI 6G v2.5.x+ and DPU 7.x+ support a data-bus widen mode that allows DSI to send 48 bits of

Re: [PATCH v2 05/13] drm/msm/dpu: use devres-managed allocation for MDP TOP

2023-07-14 Thread Jessica Zhang
On 7/7/2023 4:12 PM, Dmitry Baryshkov wrote: Use devm_kzalloc to create MDP TOP structure. This allows us to remove corresponding kfree and drop dpu_hw_mdp_destroy() function. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 17 +++--

Re: [RFC 2/2] drm/i915: Remove PAT hack from i915_gem_object_can_bypass_llc

2023-07-14 Thread Matt Roper
On Fri, Jul 14, 2023 at 11:11:30AM +0100, Tvrtko Ursulin wrote: > > On 14/07/2023 06:43, Yang, Fei wrote: > > > From: Tvrtko Ursulin > > > > > > According to the comment in i915_gem_object_can_bypass_llc the > > > purpose of the function is to return false if the platform/object > > > has a

Re: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: : trailing statements should be on next line

2023-07-14 Thread Lyude Paul
NAK - checkpatch.pl is a (strongish) guideline, but not a rule. In the cases corrected in the patch series here, we format the switch cases on single lines as it dramatically improves the readability of what is otherwise just a /long/ list of slightly different static mappings. I don't believe

Re: [PATCH v2] drm/msm/dsi: Enable DATABUS_WIDEN for DSI command mode

2023-07-14 Thread Dmitry Baryshkov
On Fri, 14 Jul 2023 at 22:03, Jessica Zhang wrote: > > > > On 7/13/2023 6:23 PM, Dmitry Baryshkov wrote: > > On 14/07/2023 03:21, Jessica Zhang wrote: > >> DSI 6G v2.5.x+ and DPU 7.x+ support a data-bus widen mode that allows DSI > >> to send 48 bits of compressed data per pclk instead of 24. >

Re: [PATCH v2] drm/msm/dsi: Enable DATABUS_WIDEN for DSI command mode

2023-07-14 Thread Dmitry Baryshkov
On Fri, 14 Jul 2023 at 23:09, Jessica Zhang wrote: > > > > On 7/14/2023 12:41 AM, Dmitry Baryshkov wrote: > > On 14/07/2023 03:21, Jessica Zhang wrote: > >> DSI 6G v2.5.x+ and DPU 7.x+ support a data-bus widen mode that allows DSI > > > > sm8250 has widebus support in DP and thus in DPU,

Re: [Freedreno] [PATCH 1/2] drm/msm/adreno: Fix warn splat for devices without revn

2023-07-14 Thread Abhinav Kumar
On 7/4/2023 9:36 AM, Rob Clark wrote: From: Rob Clark Recently, a WARN_ON() was introduced to ensure that revn is filled before adreno_is_aXYZ is called. This however doesn't work very well when revn is 0 by design (such as for A635). Cc: Konrad Dybcio Fixes: cc943f43ece7

Re: [PATCH v2 01/13] drm/msm/dpu: cleanup dpu_kms_hw_init error path

2023-07-14 Thread Jessica Zhang
On 7/7/2023 4:12 PM, Dmitry Baryshkov wrote: It was noticed that dpu_kms_hw_init()'s error path contains several labels which point to the same code path. Replace all of them with a single label. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov ---

[Bug 199979] amdgpu: changing pwm1_enable from 1 to 2 does not resume automatic fan control

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

Re: [PATCH v2] drm/msm/dsi: Enable DATABUS_WIDEN for DSI command mode

2023-07-14 Thread Jessica Zhang
On 7/14/2023 12:41 AM, Dmitry Baryshkov wrote: On 14/07/2023 03:21, Jessica Zhang wrote: DSI 6G v2.5.x+ and DPU 7.x+ support a data-bus widen mode that allows DSI sm8250 has widebus support in DP and thus in DPU, according to the published DT. Thus the 'DPU 7.x+' is not fully correct.

Re: [PATCH v3 1/3] drm/panel: Fix IS_ERR() vs NULL check in nt35950_probe()

2023-07-14 Thread Sam Ravnborg
Hi Gaosheng, On Fri, Jul 14, 2023 at 09:48:18AM +0800, Gaosheng Cui wrote: > The mipi_dsi_device_register_full() returns an ERR_PTR() on failure, > we should use IS_ERR() to check the return value. Correct - so the code is indeed wrong. Can you update it so we print the error code as this can be

Re: [Freedreno] [PATCH v3 2/3] drm/msm: Fix IS_ERR() vs NULL check in a5xx_submit_in_rb()

2023-07-14 Thread Abhinav Kumar
On 7/14/2023 12:10 PM, Abhinav Kumar wrote: On 7/13/2023 6:48 PM, Gaosheng Cui wrote: The msm_gem_get_vaddr() returns an ERR_PTR() on failure, we should use IS_ERR() to check the return value. use IS_ERR_OR_NULL() I can even fix this while applying Actually even subject line needs

Re: [PATCH v5 2/2] arm64: dts: qcom: sdm845-db845c: Mark cont splash memory region as reserved

2023-07-14 Thread Caleb Connolly
On 13/07/2023 17:52, Amit Pundir wrote: > Adding a reserved memory region for the framebuffer memory > (the splash memory region set up by the bootloader). > > Signed-off-by: Amit Pundir Reviewed-by: Caleb Connolly > --- > v5: Re-sending with updated dt-bindings patch in mdss-common >

Re: [PATCH v3 2/3] drm/msm: Fix IS_ERR() vs NULL check in a5xx_submit_in_rb()

2023-07-14 Thread Abhinav Kumar
On 7/13/2023 6:48 PM, Gaosheng Cui wrote: The msm_gem_get_vaddr() returns an ERR_PTR() on failure, we should use IS_ERR() to check the return value. use IS_ERR_OR_NULL() I can even fix this while applying Fixes: 6a8bd08d0465 ("drm/msm: add sudo flag to submit ioctl") Signed-off-by:

Re: [PATCH v2] drm/msm/dsi: Enable DATABUS_WIDEN for DSI command mode

2023-07-14 Thread Jessica Zhang
On 7/13/2023 6:23 PM, Dmitry Baryshkov wrote: On 14/07/2023 03:21, Jessica Zhang wrote: DSI 6G v2.5.x+ and DPU 7.x+ support a data-bus widen mode that allows DSI to send 48 bits of compressed data per pclk instead of 24. For all chipsets that support this mode, enable it whenever DSC is

Re: [PATCH] dma-buf/dma-resv: Stop leaking on krealloc() failure

2023-07-14 Thread Ville Syrjälä
On Fri, Jul 14, 2023 at 08:56:15AM +0200, Christian König wrote: > Am 13.07.23 um 21:47 schrieb Ville Syrjala: > > From: Ville Syrjälä > > > > Currently dma_resv_get_fences() will leak the previously > > allocated array if the fence iteration got restarted and > > the krealloc_array() fails. > >

Re: [git pull] drm fixes for 6.5-rc2

2023-07-14 Thread pr-tracker-bot
The pull request you sent on Fri, 14 Jul 2023 14:39:37 +1000: > git://anongit.freedesktop.org/drm/drm tags/drm-fixes-2023-07-14-1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/3a97a2993e7e7392292323fefc46d79bf9633e44 Thank you! -- Deet-doot-dot, I am a bot.

[PATCH 4/4] drm/tests: Add test case for drm_internal_framebuffer_create()

2023-07-14 Thread Carlos Eduardo Gallo Filho
Introduce a test to cover the creation of a framebuffer with a setted modifier and a driver that don't support modifiers. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 21 1 file changed, 21 insertions(+) diff --git

[PATCH 3/4] drm/tests: Add parameters to the drm_test_framebuffer_create test

2023-07-14 Thread Carlos Eduardo Gallo Filho
Extend the existing test case to cover: 1. Invalid flag atribute in the struct drm_mode_fb_cmd2. 2. Pixel format which requires non-linear modifier with DRM_FORMAT_MOD_LINEAR set. 3. Non-zero buffer offset for an unused plane Signed-off-by: Carlos Eduardo Gallo Filho ---

[PATCH 2/4] drm/tests: Add test for drm_framebuffer_check_src_coords()

2023-07-14 Thread Carlos Eduardo Gallo Filho
Add a parametrized test for the drm_framebuffer_check_src_coords function. Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/tests/drm_framebuffer_test.c | 107 +++ 1 file changed, 107 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c

[PATCH 1/4] drm: Add kernel-doc for drm_framebuffer_check_src_coords()

2023-07-14 Thread Carlos Eduardo Gallo Filho
Signed-off-by: Carlos Eduardo Gallo Filho --- drivers/gpu/drm/drm_framebuffer.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index aff3746dedfb..49df3ca3b3ee 100644 ---

[PATCH 0/4] Add documentation and KUnit tests for functions on drm_framebuffer.c

2023-07-14 Thread Carlos Eduardo Gallo Filho
This series adds documentation and unit tests for drm_framebuffer_check_src_coords() and drm_internal_framebuffer_create() functions on drm_framebuffer.c, including new parameters to the, until then, only existent test. Many thanks, Carlos Carlos Eduardo Gallo Filho (4): drm: Add kernel-doc

[PATCH] fb: Explicitly include correct DT includes

2023-07-14 Thread Rob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result,

[PATCH] backlight: qcom-wled: Explicitly include correct DT includes

2023-07-14 Thread Rob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result,

[PATCH] phy: Explicitly include correct DT includes

2023-07-14 Thread Rob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result,

[PATCH] gpu/host1x: Explicitly include correct DT includes

2023-07-14 Thread Rob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result,

[PATCH] char: Explicitly include correct DT includes

2023-07-14 Thread Rob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result,

RE: [RFC 2/2] drm/i915: Remove PAT hack from i915_gem_object_can_bypass_llc

2023-07-14 Thread Yang, Fei
> On 14/07/2023 06:43, Yang, Fei wrote: >>> From: Tvrtko Ursulin >>> >>> According to the comment in i915_gem_object_can_bypass_llc the >>> purpose of the function is to return false if the platform/object has >>> a caching mode where GPU can bypass the LLC. >>> >>> So far the only platforms

Re: [PATCH v4 21/21] dyndbg-doc: add classmap info to howto

2023-07-14 Thread jim . cromie
On Thu, Jul 13, 2023 at 1:13 PM Randy Dunlap wrote: > > > > On 7/13/23 09:36, Jim Cromie wrote: > > Add some basic info on classmap usage and api > > > > Signed-off-by: Jim Cromie > > --- > > .../admin-guide/dynamic-debug-howto.rst | 64 ++- > > 1 file changed, 63

Re: [PATCH v4 20/21] config TEST_DYNAMIC_DEBUG default m

2023-07-14 Thread jim . cromie
On Thu, Jul 13, 2023 at 1:04 PM Randy Dunlap wrote: > > Hi Jim, > > On 7/13/23 09:36, Jim Cromie wrote: > > Signed-off-by: Jim Cromie > > --- > > lib/Kconfig.debug | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > index

Re: [PATCH 1/1] drm/bridge: Fix handling of bridges with pre_enable_prev_first flag

2023-07-14 Thread Dave Stevenson
Hi Frieder On Mon, 10 Jul 2023 at 08:46, Frieder Schrempf wrote: > > On 07.07.23 21:00, Vladimir Lypak wrote: > > [Sie erhalten nicht häufig E-Mails von vladimir.ly...@gmail.com. Weitere > > Informationen, warum dies wichtig ist, finden Sie unter > >

[PATCH v5 3/4] fbdev: Split frame buffer support in FB and FB_CORE symbols

2023-07-14 Thread Javier Martinez Canillas
Currently the CONFIG_FB option has to be enabled even if no legacy fbdev drivers are needed (e.g: only to have support for framebuffer consoles). The DRM subsystem has a fbdev emulation layer, but depends on CONFIG_FB and so it can only be enabled if that dependency is enabled as well. That

[PATCH v5 4/4] drm: Make FB_CORE to be selected if DRM fbdev emulation is enabled

2023-07-14 Thread Javier Martinez Canillas
Now that fbdev core has been split in FB_CORE and FB, make the DRM symbol to select the FB_CORE option if the DRM fbdev emulation layer is enabled. This allows to disable the CONFIG_FB option if is not needed, which will avoid the need to explicitly disable each of the legacy fbdev drivers.

[PATCH v5 2/4] fbdev: Move core fbdev symbols to a separate Kconfig file

2023-07-14 Thread Javier Martinez Canillas
The drivers/video/fbdev/Kconfig defines both symbols for fbdev drivers and core fbdev symbols, that can be enabled independently of the fbdev drivers. Split the Kconfig in two, one that only has the symbols for fbdev drivers and another one that contains the fbdev core symbols. Suggested-by:

[PATCH v5 1/4] video: Add auxiliary display drivers to Graphics support menu

2023-07-14 Thread Javier Martinez Canillas
The drivers in this subsystem are for character-based LCD displays, which can fall into the same category of the DRM/KMS and fbdev drivers that are located under the "Graphics support" menu. Add auxdisplay there as well. Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas

[PATCH v5 0/4] Allow disabling all native fbdev drivers and only keeping DRM emulation

2023-07-14 Thread Javier Martinez Canillas
This patch series splits the fbdev core support in two different Kconfig symbols: FB and FB_CORE. The motivation for this is to allow CONFIG_FB to be disabled, while still having the the core fbdev support needed for the CONFIG_DRM_FBDEV_EMULATION to be enabled. The motivation is automatically

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

2023-07-14 Thread Jeffrey Hugo
On 7/14/2023 5:47 AM, Pranjal Ramajor Asha Kanojiya wrote: On 7/11/2023 1:51 PM, 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

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

2023-07-14 Thread Jeffrey Hugo
On 7/14/2023 5:44 AM, Pranjal Ramajor Asha Kanojiya wrote: On 7/11/2023 1:51 PM, Dan Carpenter wrote: 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

[PATCH v3 5/5] drm/amdgpu: Create version number for coredumps

2023-07-14 Thread André Almeida
Even if there's nothing currently parsing amdgpu's coredump files, if we eventually have such tools they will be glad to find a version field to properly read the file. Create a version number to be displayed on top of coredump file, to be incremented when the file format or content get changed.

[PATCH v3 4/5] drm/amdgpu: Move coredump code to amdgpu_reset file

2023-07-14 Thread André Almeida
Giving that we use codedump just for device resets, move it's functions and structs to a more semantic file, the amdgpu_reset.{c, h}. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 9 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 80 --

[PATCH v3 2/5] drm/amdgpu: Allocate coredump memory in a nonblocking way

2023-07-14 Thread André Almeida
During a GPU reset, a normal memory reclaim could block to reclaim memory. Giving that coredump is a best effort mechanism, it shouldn't disturb the reset path. Change its memory allocation flag to a nonblocking one. Signed-off-by: André Almeida Reviewed-by: Christian König ---

[PATCH v3 3/5] drm/amdgpu: Rework coredump to use memory dynamically

2023-07-14 Thread André Almeida
Instead of storing coredump information inside amdgpu_device struct, move if to a proper separated struct and allocate it dynamically. This will make it easier to further expand the logged information. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 14 +++--

[PATCH v3 1/5] drm/amdgpu: Create a module param to disable soft recovery

2023-07-14 Thread André Almeida
Create a module parameter to disable soft recoveries on amdgpu, making every recovery go through the device reset path. This option makes easier to force device resets for testing and debugging purposes. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +

[PATCH v3 0/5] drm/amdgpu: Add new reset option and rework coredump

2023-07-14 Thread André Almeida
Hi, The goal of this patchset is to improve debugging device resets on amdgpu. The first patch creates a new module parameter to disable soft recoveries, ensuring every recovery go through the full device reset, making easier to generate resets from userspace tools like [0] and [1]. This is

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

2023-07-14 Thread Jeffrey Hugo
On 7/14/2023 5:42 AM, Pranjal Ramajor Asha Kanojiya wrote: On 7/11/2023 1:50 PM, Dan Carpenter wrote: 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

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

2023-07-14 Thread Jeffrey Hugo
On 7/14/2023 5:41 AM, Pranjal Ramajor Asha Kanojiya wrote: On 7/11/2023 1:50 PM, Dan Carpenter wrote: 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

Re: [PATCH 0/2] eventfd: simplify signal helpers

2023-07-14 Thread Jason Gunthorpe
On Fri, Jul 14, 2023 at 09:05:21AM +0200, Christian Brauner wrote: > I have no skin in the game aside from having to drop this conversion > which I'm fine to do if there are actually users for this btu really, > that looks a lot like abusing an api that really wasn't designed for > this. Yeah, I

Re: [PATCH 3/5] drm/amdkfd: use vma_is_stack() and vma_is_heap()

2023-07-14 Thread Felix Kuehling
Am 2023-07-14 um 10:26 schrieb Vlastimil Babka: On 7/12/23 18:24, Felix Kuehling wrote: Allocations in the heap and stack tend to be small, with several allocations sharing the same page. Sharing the same page for different allocations with different access patterns leads to thrashing when we

Re: [RFC PATCH 3/3] drm/file: drop DRM_MINOR_CONTROL

2023-07-14 Thread Thomas Zimmermann
Hi Am 14.07.23 um 16:37 schrieb Simon Ser: On Friday, July 14th, 2023 at 16:28, Thomas Zimmermann wrote: Hi Simon Am 14.07.23 um 12:46 schrieb Simon Ser: This entry should never be used by the kernel. Record the historical context in a comment. Signed-off-by: Simon Ser Cc: Christian

Re: [RFC PATCH 3/3] drm/file: drop DRM_MINOR_CONTROL

2023-07-14 Thread Simon Ser
On Friday, July 14th, 2023 at 16:28, Thomas Zimmermann wrote: > Hi Simon > > Am 14.07.23 um 12:46 schrieb Simon Ser: > > This entry should never be used by the kernel. Record the historical > > context in a comment. > > > > Signed-off-by: Simon Ser > > Cc: Christian König > > Cc: James Zhu

[PATCH v4 17/17] arm64: dts: ti: k3-am62-main: Add GPU device node [DO NOT MERGE]

2023-07-14 Thread Sarah Walker
Add the Series AXE GPU node to the AM62 device tree. Signed-off-by: Sarah Walker --- arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index

[PATCH v4 16/17] drm/imagination: Add driver documentation

2023-07-14 Thread Sarah Walker
Add documentation for the UAPI and for the virtual memory design. Signed-off-by: Sarah Walker --- Documentation/gpu/drivers.rst | 2 + Documentation/gpu/imagination/index.rst | 14 + Documentation/gpu/imagination/uapi.rst| 174 +++

[PATCH v4 15/17] drm/imagination: Add firmware trace to debugfs

2023-07-14 Thread Sarah Walker
Firmware trace is exposed at /sys/debug/dri//pvr_fw/trace_0. Trace is enabled via the group mask at /sys/debug/dri//pvr_params/fw_trace_mask. Changes since v3: - Use drm_dev_{enter,exit} Signed-off-by: Sarah Walker --- drivers/gpu/drm/imagination/Makefile | 4 +

[PATCH v4 14/17] drm/imagination: Implement job submission and scheduling

2023-07-14 Thread Sarah Walker
Implement job submission ioctl. Job scheduling is implemented using drm_sched. Jobs are submitted in a stream format. This is intended to allow the UAPI data format to be independent of the actual FWIF structures in use, which vary depending on the GPU in use. The stream formats are documented

[PATCH v4 13/17] drm/imagination: Implement context creation/destruction ioctls

2023-07-14 Thread Sarah Walker
Implement ioctls for the creation and destruction of contexts. Contexts are used for job submission and each is associated with a particular job type. Changes since v3: - Use drm_dev_{enter,exit} Signed-off-by: Sarah Walker --- drivers/gpu/drm/imagination/Makefile | 4 +

[PATCH v4 12/17] drm/imagination: Implement free list and HWRT create and destroy ioctls

2023-07-14 Thread Sarah Walker
Implement ioctls to create and destroy free lists and HWRT datasets. Free lists are used for GPU-side memory allocation during geometry processing. HWRT datasets are the FW-side structures representing render targets. Changes since v3: - Support free list grow requests from FW - Use

Re: [RFC PATCH 3/3] drm/file: drop DRM_MINOR_CONTROL

2023-07-14 Thread Thomas Zimmermann
Hi Simon Am 14.07.23 um 12:46 schrieb Simon Ser: This entry should never be used by the kernel. Record the historical context in a comment. Signed-off-by: Simon Ser Cc: Christian König Cc: James Zhu Cc: Marek Olšák Cc: Daniel Vetter --- include/drm/drm_file.h | 4 +++- 1 file changed,

[PATCH v4 11/17] drm/imagination: Implement MIPS firmware processor and MMU support

2023-07-14 Thread Sarah Walker
Add support for the MIPS firmware processor, used in the Series AXE GPU. The MIPS firmware processor uses a separate MMU to the rest of the GPU, so this patch adds support for that as well. Changes since v3: - Get regs resource (removed from GPU resources commit) Signed-off-by: Sarah Walker ---

[PATCH v4 10/17] drm/imagination: Implement firmware infrastructure and META FW support

2023-07-14 Thread Sarah Walker
The infrastructure includes parsing of the firmware image, initialising FW-side structures, handling the kernel and firmware command ringbuffers and starting & stopping the firmware processor. This patch also adds the necessary support code for the META firmware processor. Changes since v3: -

[PATCH v4 09/17] drm/imagination: Implement power management

2023-07-14 Thread Sarah Walker
Add power management to the driver, using runtime pm. The power off sequence depends on firmware commands which are not implemented in this patch. Changes since v3: - Don't power device when calling pvr_device_gpu_fini() - Documentation for pvr_dev->lost has been improved - pvr_power_init()

[PATCH v4 07/17] drm/imagination: Add GPU ID parsing and firmware loading

2023-07-14 Thread Sarah Walker
Read the GPU ID register at probe time and select the correct features/quirks/enhancements. Use the GPU ID to form the firmware file name and load the firmware. The features/quirks/enhancements arrays are currently hardcoded in the driver for the supported GPUs. We are looking at moving this

[PATCH v4 05/17] drm/imagination: Get GPU resources

2023-07-14 Thread Sarah Walker
Acquire clock and register resources, and enable/map as appropriate. Changes since v3: - Remove regulator resource (not used on supported platform) - Use devm helpers - Use devm_clk_get_optional() for optional clocks - Don't prepare clocks on resource acquisition - Drop

Re: [PATCH 3/5] drm/amdkfd: use vma_is_stack() and vma_is_heap()

2023-07-14 Thread Vlastimil Babka
On 7/12/23 18:24, Felix Kuehling wrote: > Allocations in the heap and stack tend to be small, with several > allocations sharing the same page. Sharing the same page for different > allocations with different access patterns leads to thrashing when we > migrate data back and forth on GPU and

[PATCH v4 02/17] dt-bindings: gpu: Add Imagination Technologies PowerVR GPU

2023-07-14 Thread Sarah Walker
Add the device tree binding documentation for the Series AXE GPU used in TI AM62 SoCs. Changes since v3: - Remove oneOf in compatible property - Remove power-supply (not used on AM62) Changes since v2: - Add commit message description - Remove mt8173-gpu support (not currently supported) - Drop

[PATCH v4 04/17] drm/imagination: Add skeleton PowerVR driver

2023-07-14 Thread Sarah Walker
This adds the basic skeleton of the driver. The driver registers itself with DRM on probe. Ioctl handlers are currently implemented as stubs. Changes since v3: - Clarify supported GPU generations in driver description - Use drm_dev_unplug() when removing device - Change from_* and to_* functions

[PATCH v4 03/17] drm/imagination/uapi: Add PowerVR driver UAPI

2023-07-14 Thread Sarah Walker
Add the UAPI implementation for the PowerVR driver. Signed-off-by: Sarah Walker --- MAINTAINERS|1 + include/uapi/drm/pvr_drm.h | 1304 2 files changed, 1305 insertions(+) create mode 100644 include/uapi/drm/pvr_drm.h diff --git

[PATCH v4 01/17] sizes.h: Add entries between 32G and 64T

2023-07-14 Thread Sarah Walker
From: Matt Coster Signed-off-by: Matt Coster Reviewed-by: Linus Walleij --- include/linux/sizes.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/sizes.h b/include/linux/sizes.h index 84aa448d8bb3..c3a00b967d18 100644 --- a/include/linux/sizes.h +++

[PATCH v4 00/17] Imagination Technologies PowerVR DRM driver

2023-07-14 Thread Sarah Walker
This patch series 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 refactored version of our existing downstream driver

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

2023-07-14 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 Reviewed-by: Christian König --- drivers/gpu/drm/ttm/tests/ttm_device_test.c | 158 1

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

2023-07-14 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 ---

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

2023-07-14 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 v5 1/3] drm/ttm: Introduce KUnit test

2023-07-14 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 +

Re: [PATCH v3 09/17] drm/imagination: Implement power management

2023-07-14 Thread Frank Binns
Hi Maxime, On Fri, 2023-07-07 at 14:48 +0200, Maxime Ripard wrote: > On Tue, Jun 13, 2023 at 03:47:52PM +0100, Sarah Walker wrote: > > @@ -503,21 +506,31 @@ pvr_device_init(struct pvr_device *pvr_dev) > > if (err) > > goto err_device_clk_fini; > > > > + /* Explicitly

Re: [PATCH v3 05/17] drm/imagination: Get GPU resources

2023-07-14 Thread Frank Binns
Hi Maxime, On Fri, 2023-07-07 at 14:47 +0200, Maxime Ripard wrote: > On Tue, Jun 13, 2023 at 03:47:48PM +0100, Sarah Walker wrote: > > Acquire clock, regulator and register resources, and enable/map as > > appropriate. > > > > Signed-off-by: Sarah Walker > > --- > >

Re: [PATCH v3 04/17] drm/imagination: Add skeleton PowerVR driver

2023-07-14 Thread Frank Binns
Hi Maxime, Thank you for your feedback (comments below). On Fri, 2023-07-07 at 14:46 +0200, Maxime Ripard wrote: > Hi, > > [I just noticed I dropped the Cc list, resending] > > Thanks for contributing this driver, it's awesome to see it moving > forward. > > And congrats on the documentation

Re: [PATCH 4/8] drm/ssd130x: Add support for DRM_FORMAT_R1

2023-07-14 Thread Javier Martinez Canillas
Geert Uytterhoeven writes: Hello Geert, > Hi Javier, [...] >> > >> > The display should not be updated after .remove(), so I think plain >> > devm_kcalloc() should be fine. >> >> That was precisely my point, that there could be atomic commits even after >> the driver has been removed (e.g: if

Re: [PATCH 4/8] drm/ssd130x: Add support for DRM_FORMAT_R1

2023-07-14 Thread Geert Uytterhoeven
Hi Javier, On Fri, Jul 14, 2023 at 2:35 PM Javier Martinez Canillas wrote: > Geert Uytterhoeven writes: > > On Fri, Jul 14, 2023 at 12:14 PM Javier Martinez Canillas > > wrote: > >> Geert Uytterhoeven writes: > >> Thanks a lot for your patch, this has been on my TODO for some time! > >> > >>

Re: [PATCH 4/8] drm/ssd130x: Add support for DRM_FORMAT_R1

2023-07-14 Thread Javier Martinez Canillas
Geert Uytterhoeven writes: Hello Geert, > Hi Javier, > > On Fri, Jul 14, 2023 at 12:14 PM Javier Martinez Canillas > wrote: >> Geert Uytterhoeven writes: >> Thanks a lot for your patch, this has been on my TODO for some time! >> >> > The native display format is monochrome light-on-dark (R1).

Re: [PATCH v2 5/6] drm/amdgpu: Log IBs and ring name at coredump

2023-07-14 Thread André Almeida
Em 14/07/2023 04:57, Christian König escreveu: Am 13.07.23 um 23:32 schrieb André Almeida: Log the IB addresses used by the hung job along with the stuck ring name. Note that due to nested IBs, the one that caused the reset itself may be in not listed address. Signed-off-by: André Almeida

Re: [PATCH v2 4/6] drm/amdgpu: Limit info in coredump for kernel threads

2023-07-14 Thread André Almeida
Em 14/07/2023 04:52, Christian König escreveu: Am 13.07.23 um 23:32 schrieb André Almeida: If a kernel thread caused the reset, the information available to be logged will be limited, so return early in the dump function. Why? The register values and vram lost state should still be valid.

[PATCH 2/2] backlight: lp855x: Catch errors when changing brightness

2023-07-14 Thread Artur Weber
The lp855x_bl_update_status function's return type is int, but it always returns 0, without checking for the results of the write_byte/pwm_ctrl functions called within. Make this function return the return values of the functions it calls, and modify the lp855x_pwm_ctrl function to return errors.

[PATCH 1/2] backlight: lp855x: Initialize PWM state on first brightness change

2023-07-14 Thread Artur Weber
As pointed out by Uwe Kleine-König[1], the changes introduced in commit c1ff7da03e16 ("video: backlight: lp855x: Get PWM for PWM mode during probe") caused the PWM state set up by the bootloader to be re-set when the driver is probed. This differs from the behavior from before that patch, where

[PATCH 0/2] backlight: lp855x: Fixes after c1ff7da03e16

2023-07-14 Thread Artur Weber
Two small fixes after commit c1ff7da03e16 ("video: backlight: lp855x: Get PWM for PWM mode during probe"), stemming from a review[1] by Uwe Kleine-König. [1] https://lore.kernel.org/all/20230614083953.e4kkweddjz7wz...@pengutronix.de/ Signed-off-by: Artur Weber Artur Weber (2): backlight:

Re: [PATCH 1/3] drm/drv: use enum drm_minor_type when appropriate

2023-07-14 Thread James Zhu
Hi Simon Thanks! Reviewed-by:JamesZhufortheseries.Best Regards! James Zhu On 2023-07-14 06:46, Simon Ser wrote: This makes it easier to figure out what the "type" variable can be set to when reading the implementation of these functions. Signed-off-by: Simon Ser Cc: Christian König Cc: James

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Asahi Lina
On 14/07/2023 19.18, Christian König wrote: Am 14.07.23 um 12:06 schrieb Asahi Lina: On 14/07/2023 18.57, Christian König wrote: Am 14.07.23 um 11:49 schrieb Asahi Lina: On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can

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

2023-07-14 Thread Pranjal Ramajor Asha Kanojiya
On 7/11/2023 1:51 PM, 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

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

2023-07-14 Thread Pranjal Ramajor Asha Kanojiya
On 7/11/2023 1:51 PM, Dan Carpenter wrote: 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

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

2023-07-14 Thread Pranjal Ramajor Asha Kanojiya
On 7/11/2023 1:51 PM, Dan Carpenter wrote: 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

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

2023-07-14 Thread Pranjal Ramajor Asha Kanojiya
On 7/11/2023 1:50 PM, Dan Carpenter wrote: 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 <

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

2023-07-14 Thread Pranjal Ramajor Asha Kanojiya
On 7/11/2023 1:50 PM, Dan Carpenter wrote: 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

Re: [PATCH 6/8] drm/fb-helper: Pass buffer format via drm_fb_helper_surface_size

2023-07-14 Thread Geert Uytterhoeven
Hi Javier, On Fri, Jul 14, 2023 at 12:25 PM Javier Martinez Canillas wrote: > Geert Uytterhoeven writes: > > drm_fb_helper_single_fb_probe() first calls drm_fb_helper_find_sizes(), > > followed by drm_fbdev_generic_helper_fb_probe(): > > - The former tries to find a suitable buffer format,

Re: [PATCH 5/8] drm/client: Convert drm_mode_create_dumb() to drm_mode_addfb2()

2023-07-14 Thread Geert Uytterhoeven
Hi Simon, On Fri, Jul 14, 2023 at 1:01 PM Simon Ser wrote: > On Thursday, July 13th, 2023 at 15:17, Geert Uytterhoeven > wrote: > > Currently drm_client_buffer_addfb() uses the legacy drm_mode_addfb(), > > which uses bpp and depth to guess the wanted buffer format. > > However,

Re: [PATCH 4/8] drm/ssd130x: Add support for DRM_FORMAT_R1

2023-07-14 Thread Geert Uytterhoeven
Hi Javier, On Fri, Jul 14, 2023 at 12:14 PM Javier Martinez Canillas wrote: > Geert Uytterhoeven writes: > Thanks a lot for your patch, this has been on my TODO for some time! > > > The native display format is monochrome light-on-dark (R1). > > Hence add support for R1, so monochrome

[PATCH v4] drm/syncobj: add IOCTL to register an eventfd

2023-07-14 Thread Simon Ser
Introduce a new DRM_IOCTL_SYNCOBJ_EVENTFD IOCTL which signals an eventfd from a syncobj. This is useful for Wayland compositors to handle wait-before-submit. Wayland clients can send a timeline point to the compositor before the point has materialized yet, then compositors can wait for the point

Re: [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-14 Thread Thomas Zimmermann
Hi Am 13.07.23 um 17:14 schrieb Tvrtko Ursulin: On 13/07/2023 16:09, Thomas Zimmermann wrote: Hi Am 13.07.23 um 16:41 schrieb Sean Paul: On Thu, Jul 13, 2023 at 9:04 AM Uwe Kleine-König wrote: hello Sean, On Wed, Jul 12, 2023 at 02:31:02PM -0400, Sean Paul wrote: I'd really prefer this

[PATCH] drm/radeon: ERROR: "foo* bar" should be "foo *bar"

2023-07-14 Thread shijie001
Fix five occurrences of the checkpatch.pl error: ERROR: "foo* bar" should be "foo *bar" ERROR: that open brace { should be on the previous line Signed-off-by: Jie Shi --- drivers/gpu/drm/radeon/radeon_audio.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 5/8] drm/client: Convert drm_mode_create_dumb() to drm_mode_addfb2()

2023-07-14 Thread Simon Ser
On Thursday, July 13th, 2023 at 15:17, Geert Uytterhoeven wrote: > Currently drm_client_buffer_addfb() uses the legacy drm_mode_addfb(), > which uses bpp and depth to guess the wanted buffer format. > However, drm_client_buffer_addfb() already knows the exact buffer > format, so there is no

  1   2   3   >