[PATCH 07/11] sysctl: Add size to register_sysctl

2023-06-22 Thread Joel Granados
In order to remove the end element from the ctl_table struct arrays, we explicitly define the size when registering the targes. We add a size argument to register_sysctl and change all the callers to pass the ARRAY_SIZE of their table arg. Signed-off-by: Joel Granados --- arch/arm/kernel/isa.c

[PATCH 2/2] drm/panel: ilitek-ili9881c: add support for Elida HJ080BE31IA1 panel

2023-06-22 Thread Dongjin Kim
HJ080BE31IA1 is a panel by Elida and utilizes the Ilitek ILI9881C controller. This patch is to add the initialization sequence and timing to ILI9881C driver, tested on Hardkernel ODROID-M1. Signed-off-by: Dongjin Kim --- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 236 ++ 1

[PATCH 1/2] dt-bindings: ili9881c: add compatible string for Elida hj080be31ia1

2023-06-22 Thread Dongjin Kim
Elida hj080be31ia1 is a 8" MIPI display panel. It utilizes an ILI9881C controller chip, so its compatible string should be added to ilitek,ili9881c file. Add the compatible string for it. Signed-off-by: Dongjin Kim --- .../devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 1 + 1 fi

[PATCH 09/11] sysctl: Remove the end element in sysctl table arrays

2023-06-22 Thread Joel Granados
Remove the empty end element from all the arrays that are passed to the register sysctl calls. In some files this means reducing the explicit array size by one. Also make sure that we are using the size in ctl_table_header instead of evaluating the .procname element. Signed-off-by: Joel Granados

Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays

2023-06-22 Thread Jani Nikula
On Wed, 21 Jun 2023, Joel Granados wrote: > On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: >> On Wed, 21 Jun 2023, Joel Granados wrote: >> > Remove the empty end element from all the arrays that are passed to the >> > register sysctl calls. In some files this means reducing the expl

[PATCH] drm/amd/display: fix comment typo

2023-06-22 Thread Yueh-Shun Li
Spell "transmission" properly. Found by searching for keyword "tranm". Signed-off-by: Yueh-Shun Li --- .../gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_stream_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_stream_enc

Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays

2023-06-22 Thread Joel Granados
On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: > On Wed, 21 Jun 2023, Joel Granados wrote: > > Remove the empty end element from all the arrays that are passed to the > > register sysctl calls. In some files this means reducing the explicit > > array size by one. Also make sure that

Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays

2023-06-22 Thread Joel Granados
On Wed, Jun 21, 2023 at 04:15:46PM +0300, Jani Nikula wrote: > On Wed, 21 Jun 2023, Joel Granados wrote: > > On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: > >> On Wed, 21 Jun 2023, Joel Granados wrote: > >> > Remove the empty end element from all the arrays that are passed to the >

[PATCH] drm/arm/komeda: Remove component framework and add a simple encoder

2023-06-22 Thread Faiz Abbas
The Komeda driver always expects the remote connector node to initialize an encoder. It uses the component aggregator framework which consists of component->bind() calls used to initialize the remote encoder and attach it to the crtc. This is different from other drm implementations which expect th

[lvc-project] [PATCH] drm/radeon: remove useless conditions

2023-06-22 Thread Igor Artemiev
Comparisons of 'table' and 'vddc_sclk_table' with NULL are useless since 'table' and 'vddc_sclk_table' are initialized by an addresses and cannot be NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Igor Artemiev --- drivers/gpu/drm/radeon/kv_dpm.c | 22

Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays

2023-06-22 Thread Jani Nikula
On Wed, 21 Jun 2023, Joel Granados wrote: > Remove the empty end element from all the arrays that are passed to the > register sysctl calls. In some files this means reducing the explicit > array size by one. Also make sure that we are using the size in > ctl_table_header instead of evaluating the

Re: [PATCH] drm/ttm: fix bulk_move corruption when adding a entry

2023-06-22 Thread Christian König
Am 21.06.23 um 17:42 schrieb Yunxiang Li: When the resource is the first in the bulk_move range, adding it again (thus moving it to the tail) will corrupt the list since the first pointer is not moved. This eventually lead to null pointer deref in ttm_lru_bulk_move_del() Good catch. Fixes: f

Re: [PATCH 1/2] drm/amdgpu: fix missing fence reserve in amdgpu_vm_sdma_commit

2023-06-22 Thread Christian König
Am 21.06.23 um 18:23 schrieb Yunxiang Li: When amdgpu_bo_fence is converted to dma_resv_add_fence, the reserve was removed in that process, so putting it back. The slots for this are reserved in amdgpu_vm_get_pd_bo():     /* Two for VM updates, one for TTM and one for the CS job */    

Re: [RFC PATCH v3 3/4] drm/amdgpu: Implement DRM_IOCTL_GET_RESET

2023-06-22 Thread Christian König
Am 21.06.23 um 18:38 schrieb André Almeida: Em 21/06/2023 04:40, Christian König escreveu: Am 21.06.23 um 02:57 schrieb André Almeida: Implement get_reset ioctl for amdgpu Well that pretty much won't work since the jobs are destroyed much later than the contexts. Why does this prevents t

[PATCH v1 0/2] udmabuf: Add back support for mapping hugetlb pages

2023-06-22 Thread Vivek Kasireddy
The first patch ensures that the mappings needed for handling mmap operation would be managed by using the pfn instead of struct page. The second patch restores support for mapping hugetlb pages where subpages of a hugepage are not directly used anymore (main reason for revert) and instead the huge

[PATCH v1 1/2] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2023-06-22 Thread Vivek Kasireddy
Add VM_PFNMAP to vm_flags in the mmap handler to ensure that the mappings would be managed without using struct page. And, in the vm_fault handler, use vmf_insert_pfn to share the page's pfn to userspace instead of directly sharing the page (via struct page *). Cc: Mike Kravetz Cc: David Hildenb

[PATCH v1 2/2] udmabuf: Add back support for mapping hugetlb pages

2023-06-22 Thread Vivek Kasireddy
A user or admin can configure a VMM (Qemu) Guest's memory to be backed by hugetlb pages for various reasons. However, a Guest OS would still allocate (and pin) buffers that are backed by regular 4k sized pages. In order to map these buffers and create dma-bufs for them on the Host, we first need to

Re: [PATCH v3 3/4] drm/mediatek: Add casting before assign

2023-06-22 Thread 林睿祥

Re: [PATCH v2] drm/panel: simple: Add connector_type for innolux_at043tn24

2023-06-22 Thread Neil Armstrong
Hi, On Tue, 20 Jun 2023 08:22:02 -0300, Fabio Estevam wrote: > The innolux at043tn24 display is a parallel LCD. Pass the 'connector_type' > information to avoid the following warning: > > panel-simple panel: Specify missing connector_type > > Thanks, Applied to https://anongit.freedesktop.org/

Re: [RFC PATCH v3 1/4] drm/doc: Document DRM device reset expectations

2023-06-22 Thread Pekka Paalanen
On Wed, 21 Jun 2023 13:28:34 -0300 André Almeida wrote: > Em 21/06/2023 04:58, Pekka Paalanen escreveu: > > On Tue, 20 Jun 2023 21:57:16 -0300 > > André Almeida wrote: > > > >> Create a section that specifies how to deal with DRM device resets for > >> kernel and userspace drivers. > >> > >>

Re: [RFC PATCH v3 2/4] drm: Create DRM_IOCTL_GET_RESET

2023-06-22 Thread Pekka Paalanen
On Wed, 21 Jun 2023 13:33:56 -0300 André Almeida wrote: > Em 21/06/2023 05:09, Pekka Paalanen escreveu: > > On Tue, 20 Jun 2023 21:57:17 -0300 > > André Almeida wrote: > > > >> Create a new DRM ioctl operation to get the numbers of resets for a > >> given context. The numbers reflect just the

Re: [PATCH v4 3/3] drm/panel-fannal-c3004: Add fannal c3004 DSI panel

2023-06-22 Thread Linus Walleij
On Wed, Jun 21, 2023 at 5:09 PM Paulo Pavacic wrote: > A lot of modifications to st7701 are required. I believe it would > result in a driver that doesn't look or work the same. e.g compare > delays between initialization sequences of panel-fannal-c3004 and > panel-st7701. I think it would be opt

Re: [PATCH v1 0/2] udmabuf: Add back support for mapping hugetlb pages

2023-06-22 Thread David Hildenbrand
On 22.06.23 09:27, Vivek Kasireddy wrote: The first patch ensures that the mappings needed for handling mmap operation would be managed by using the pfn instead of struct page. The second patch restores support for mapping hugetlb pages where subpages of a hugepage are not directly used anymore (

Re: [PATCH] drm/bridge: tc358764: Use BIT() macro for actual bits

2023-06-22 Thread rfoss
From: Robert Foss On Thu, 15 Jun 2023 22:16:35 +0200, Marek Vasut wrote: > None of these four bits are bitfields, use BIT() macro and treat > them as bits. No functional change. > > Applied, thanks! [1/1] drm/bridge: tc358764: Use BIT() macro for actual bits https://cgit.freedesktop.org

[PATCH 01/39] dt-bindings: display: Add Renesas SH-Mobile LCDC bindings

2023-06-22 Thread Geert Uytterhoeven
Add device tree bindings for the LCD Controller (LCDC) found in Renesas SuperH SH-Mobile and ARM SH/R-Mobile SOCs. Based on a plain text prototype by Laurent Pinchart. Signed-off-by: Geert Uytterhoeven Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: devicet...@vger.kernel.org ---

[PATCH 18/39] drm: renesas: shmobile: Embed drm_device in shmob_drm_device

2023-06-22 Thread Geert Uytterhoeven
Embedding drm_device in shmob_drm_device allows us to use the DRM managed API to allocate both structures in one go, simplifying error handling. Signed-off-by: Geert Uytterhoeven --- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 12 +++--- .../gpu/drm/renesas/shmobile/shmob_drm_drv.c | 41 +++

[PATCH 08/39] drm: renesas: shmobile: Use %p4cc to print fourcc code

2023-06-22 Thread Geert Uytterhoeven
Replace the last printing of an hexadecimal fourcc format code by a pretty-printed format name, using the "%p4cc" format specifier. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dri

[PATCH 00/39] drm: renesas: shmobile: Atomic conversion + DT support

2023-06-22 Thread Geert Uytterhoeven
Hi all, It has been 3 years since the last conversion of a DRM driver to atomic modesetting, so I guess it's time for another one? ;-) Currently, there are two drivers for the LCD controller on Renesas SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs: 1. sh_mobile_lcdcfb, using th

[PATCH 10/39] drm: renesas: shmobile: Improve shmob_drm_format_info table

2023-06-22 Thread Geert Uytterhoeven
Improve the table containing hardware information related to the supported plane formats: 1. Move (part of) the overlay format register settings from multiple switch() statements spread across the code into the table, like is already done for the primary plane register settings, 2. Re

[PATCH 27/39] drm: renesas: shmobile: Rename shmob_drm_plane.plane

2023-06-22 Thread Geert Uytterhoeven
Rename the "plane" member of the shmob_drm_plane subclass structure to "base", to improve readability. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/renesas/s

[PATCH 04/39] drm: renesas: shmobile: Fix ARGB32 overlay format typo

2023-06-22 Thread Geert Uytterhoeven
When configurating a CHn Source Image Format Register (LDBBSIFR), one should use the corresponding LDBBSIFR_RPKF_* definition for overlay planes, not the DDFR_PKF_* definition for the primary plane. Fortunately both definitions resolve to the same value, so this bug did not cause any harm. Signed

[PATCH 29/39] drm: renesas: shmobile: Move shmob_drm_crtc_finish_page_flip()

2023-06-22 Thread Geert Uytterhoeven
Move the shmob_drm_crtc_finish_page_flip() function up, to avoid having to move it during the modification in the next change. Signed-off-by: Geert Uytterhoeven --- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 40 +++ 1 file changed, 24 insertions(+), 16 deletions(-) diff --g

[PATCH 19/39] drm: renesas: shmobile: Convert container helpers to static inline functions

2023-06-22 Thread Geert Uytterhoeven
Replace to conversion helper macros using container_of() by static inline functions, to improve type-safety. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 11 --- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 5 - 2 files changed,

[PATCH 30/39] drm: renesas: shmobile: Wait for page flip when turning CRTC off

2023-06-22 Thread Geert Uytterhoeven
Turning a CRTC off will prevent a queued page flip from ever completing, potentially confusing userspace. Wait for queued page flips to complete before turning the CRTC off to avoid this. Signed-off-by: Geert Uytterhoeven --- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 37 ++

[PATCH 32/39] drm: renesas: shmobile: Shutdown the display on remove

2023-06-22 Thread Geert Uytterhoeven
When the device is unbound from the driver, the display may be active. Make sure it gets shut down. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c b/dri

[PATCH 31/39] drm: renesas: shmobile: Turn vblank on/off when enabling/disabling CRTC

2023-06-22 Thread Geert Uytterhoeven
The DRM core vblank handling mechanism requires drivers to forcefully turn vblank reporting off when disabling the CRTC, and to restore the vblank reporting status when enabling the CRTC. Implement this using the drm_crtc_vblank_{on,off}() helpers. Note that drm_crtc_vblank_off() must be called at

[PATCH 17/39] drm: renesas: shmobile: Use drmm_universal_plane_alloc()

2023-06-22 Thread Geert Uytterhoeven
According to the comments for drm_universal_plane_init(), the plane structure should not be allocated with devm_kzalloc(). Fix lifetime issues by using drmm_universal_plane_alloc() instead. Signed-off-by: Geert Uytterhoeven --- Plane (and connector) structures are still allocated with devm_kzall

[PATCH 28/39] drm: renesas: shmobile: Use drm_crtc_handle_vblank()

2023-06-22 Thread Geert Uytterhoeven
Replace the call to the legacy drm_handle_vblank() function with a call to the new drm_crtc_handle_vblank() helper. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/renesas/s

[PATCH 25/39] drm: renesas: shmobile: Rename shmob_drm_crtc.crtc

2023-06-22 Thread Geert Uytterhoeven
Rename the "crtc" member of the shmob_drm_crtc subclass structure to "base", to improve readability. Signed-off-by: Geert Uytterhoeven --- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 26 +-- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.h | 2 +- 2 files changed, 14 insertions

[PATCH 15/39] drm: renesas: shmobile: Improve error handling

2023-06-22 Thread Geert Uytterhoeven
Prepare for DT conversion, where panel probe can be deferred, by streamlining error propagation and handling: - Use dev_err_probe() to avoid printing error messages in case of probe deferral, - Propagate errors where needed. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/s

[PATCH 23/39] drm: renesas: shmobile: Move interface handling to connector setup

2023-06-22 Thread Geert Uytterhoeven
Move legacy interface handling to the connector setup code. Set up bus_flags and bus_formats in display_info according to the bus format and panel information from platform data, to make it more similar with DT-based connector/bridge/panel setup. This will allows us to use the same LCD interface se

[PATCH 36/39] drm: renesas: shmobile: Use suspend/resume helpers

2023-06-22 Thread Geert Uytterhoeven
Replace the custom suspend/resume handling by calls into drm_mode_config_helper_{suspend,resume}(). Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 13 - drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h | 2 -- drivers/gpu/drm/renesas/shmob

[PATCH 03/39] drm: renesas: shmobile: Fix overlay plane disable

2023-06-22 Thread Geert Uytterhoeven
Merely writing zero to the CHn Source Image Format Register is not sufficient to disable a plane, as the programmed register value is not propagated immediately to the current side. This can be seen when using the -P option of modetest: the extra plane is displayed correctly, but does not disappea

[PATCH 26/39] drm: renesas: shmobile: Rename shmob_drm_connector.connector

2023-06-22 Thread Geert Uytterhoeven
Rename the "connector" member of the shmob_drm_connector subclass structure to "base", to improve readability. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 4 ++-- drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h | 2 +- 2 files changed, 3 insertions

[PATCH 05/39] drm: renesas: shmobile: Correct encoder/connector types

2023-06-22 Thread Geert Uytterhoeven
The first encoder output on the SH-Mobile LCD Controller is a DPI parallel bus. However, at the time of introduction of the driver, no encoder or connector types were defined yet for the DPI parallel bus, hence the driver used the ones for LVDS instead. Adjust the types accordingly. Signed-off-b

[PATCH 06/39] drm: renesas: shmobile: Add support for Runtime PM

2023-06-22 Thread Geert Uytterhoeven
The SH-Mobile LCD Controller is part of a PM Domain on all relevant SoCs (clock domain on all, power domain on some). Hence it may not be sufficient to manage the LCDC module clock explicitly (e.g. if the selected clock source differs from SHMOB_DRM_CLK_BUS). Fix this by using Runtime PM instead.

[PATCH 38/39] drm: renesas: shmobile: Atomic conversion part 3

2023-06-22 Thread Geert Uytterhoeven
Complete the conversion to atomic mode setting by converting the connector, and setting the DRIVER_ATOMIC flag. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 5 + drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 2 +- 2 files changed, 2 insertio

[PATCH 16/39] drm: renesas: shmobile: Convert to use devm_request_irq()

2023-06-22 Thread Geert Uytterhoeven
Convert to managed IRQ handling, to simplify cleanup. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/renesas/sh

[PATCH 13/39] drm: renesas: shmobile: Rename input clocks

2023-06-22 Thread Geert Uytterhoeven
From: Laurent Pinchart Prepare for DT bindings by using more appropriate names for the input clocks. Note that all LDDCKR_ICKSEL_* definitions but the one for the bus clock are valid only for SH7724, so the clock selection code needs to be updated when extending clock support to other SoCs. Sig

[PATCH 20/39] drm: renesas: shmobile: Replace .dev_private with container_of()

2023-06-22 Thread Geert Uytterhoeven
Now that drm_device is embedded in shmob_drm_device, we can use a container_of()-based helper to get the shmob_drm_device pointer from the drm_device, instead of using the deprecated drm_device.dev_private field. While at it, restore reverse Xmas tree ordering of local variable declarations. Sign

[PATCH 02/39] media: uapi: Add MEDIA_BUS_FMT_RGB666_2X9 variants

2023-06-22 Thread Geert Uytterhoeven
Add the RGB666 9:9 formats MEDIA_BUS_FMT_RGB666_2X9_BE and MEDIA_BUS_FMT_RGB666_2X9_LE. The former is supported by the SH-Mobile LCD Controller. Signed-off-by: Geert Uytterhoeven Cc: Mauro Carvalho Chehab Cc: linux-me...@vger.kernel.org --- .../media/v4l/subdev-formats.rst | 144 +

[PATCH 12/39] drm: renesas: shmobile: Don't set display info width and height twice

2023-06-22 Thread Geert Uytterhoeven
From: Laurent Pinchart The display info width_mm and height_mm fields are set at init time and never overwritten, don't set them a second time when getting modes. Signed-off-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 3 --- 1

[PATCH 14/39] drm: renesas: shmobile: Remove support for SYS panels

2023-06-22 Thread Geert Uytterhoeven
From: Laurent Pinchart SYS panels are not used, and have no defined DT bindings. Remove their support to avoid impeding DT support. It can always be added back later. Signed-off-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven --- Changes compared to Laurent's original: - Remove "/*

[PATCH 35/39] drm: renesas: shmobile: Atomic conversion part 2

2023-06-22 Thread Geert Uytterhoeven
Implement atomic mode setting for the CRTC, using the existing dpms callback. Signed-off-by: Geert Uytterhoeven --- This works, but I had expected that crtc_helper_funcs.atomic_check should point to drm_crtc_helper_atomic_check() instead, as the primary plane cannot be disabled. However in doing

[PATCH 07/39] drm: renesas: shmobile: Restore indentation of shmob_drm_setup_clocks()

2023-06-22 Thread Geert Uytterhoeven
Commit 56550d94cbaeaa19 ("Drivers: gpu: remove __dev* attributes.") forgot to realign the continuation of the parameter section of shmob_drm_setup_clocks(). Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH 24/39] drm: renesas: shmobile: Unify plane allocation

2023-06-22 Thread Geert Uytterhoeven
Unify primary and overlay plane allocation: - Enhance shmob_drm_plane_create() so it can be used to create the primary plane, too, - Move overlay plane creation next to primary plane creation. As overlay plane index zero now means the primary plane, this requires shifting all overlay plane

[PATCH 09/39] drm: renesas: shmobile: Add missing YCbCr formats

2023-06-22 Thread Geert Uytterhoeven
The primary plane supports various YCbCr formats, and the CRTC code already knows how to handle them. Enable support for the missing formats by adding them to the table of supported modes. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 6 ++ 1 file

[PATCH 33/39] drm: renesas: shmobile: Cleanup encoder

2023-06-22 Thread Geert Uytterhoeven
Most unused callbacks can be NULL pointers these days. Drop a bunch of empty encoder callbacks. Signed-off-by: Geert Uytterhoeven --- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 26 --- 1 file changed, 26 deletions(-) diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_c

[PATCH 34/39] drm: renesas: shmobile: Atomic conversion part 1

2023-06-22 Thread Geert Uytterhoeven
Implement atomic mode setting for both the primary and overlay planes. This involves: - Moving the primary plane handling code from CRTC mode setting to plane handling shared by primary and overlay planes, - Adding basic CRTC and mode config atomic mode setting ops, which don't do much

[PATCH 21/39] drm: renesas: shmobile: Use struct videomode in platform data

2023-06-22 Thread Geert Uytterhoeven
From: Laurent Pinchart Replace the drm_mode_modeinfo field with videomode that includes more signal polarity flags. This simplifies driver handling of panel modes and prepares for DT support. Signed-off-by: Laurent Pinchart [geert: Simplify] Signed-off-by: Geert Uytterhoeven --- Changes compa

[PATCH 22/39] drm: renesas: shmobile: Use media bus formats in platform data

2023-06-22 Thread Geert Uytterhoeven
Replace the custom shmob_drm_interface enumeration values with standard media bus formats. This simplifies driver handling of bus formats and prepares for DT support. Signed-off-by: Geert Uytterhoeven --- .../gpu/drm/renesas/shmobile/shmob_drm_drv.c | 52 +-- include/linux/plat

[PATCH 37/39] drm: renesas: shmobile: Remove internal CRTC state tracking

2023-06-22 Thread Geert Uytterhoeven
Now the suspend/resume methods no longer need to look at internal driver state, the dpms and started fields in the shmob_drm_crtc structure can be removed, as well as the shmob_drm_crtc_dpms() wrapper. Signed-off-by: Geert Uytterhoeven --- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 35 -

[PATCH 11/39] drm: renesas: shmobile: Remove backlight support

2023-06-22 Thread Geert Uytterhoeven
From: Laurent Pinchart Backlight support should be implemented by panels, not by the LCDC driver. As the feature is currently unused anyway, remove it. Signed-off-by: Laurent Pinchart [geert: Cleanups] Signed-off-by: Geert Uytterhoeven --- Changes compared to Laurent's original: - Rebase,

[PATCH 39/39] drm: renesas: shmobile: Add DT support

2023-06-22 Thread Geert Uytterhoeven
Add DT support, by: 1. Creating a panel bridge from DT, and attaching it to the encoder, 2. Replacing the custom connector with a bridge connector, 3. Obtaining clock configuration based on the compatible value. Note that for now the driver uses a fixed clock configuration selecting the bus

[PATCH] drm/udl: Convert to drm_crtc_helper_atomic_check()

2023-06-22 Thread Geert Uytterhoeven
Use the drm_crtc_helper_atomic_check() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven --- Compile-tested only. --- drivers/gpu/drm/udl/udl_modeset.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_mod

[PATCH] fbdev: sh_mobile_lcdcfb: Fix ARGB32 overlay format typo

2023-06-22 Thread Geert Uytterhoeven
When configurating a CHn Source Image Format Register (LDBBSIFR), one should use the corresponding LDBBSIFR_RPKF_* definition for overlay planes, not the DDFR_PKF_* definition for the primary plane. Fortunately both definitions resolve to the same value, so this bug did not cause any harm. Signed

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-22 Thread Tvrtko Ursulin
On 21/06/2023 19:51, Thomas Hellström (Intel) wrote: On 6/21/23 18:35, Ira Weiny wrote: Thomas Hellström (Intel) wrote: I think one thing worth mentioning in the context of this patch is that IIRC kmap_local_page() will block offlining of the mapping CPU until kunmap_local(), so while I have

[PATCH v2] drm/sched: Call drm_sched_fence_set_parent() from drm_sched_fence_scheduled()

2023-06-22 Thread Boris Brezillon
Drivers that can delegate waits to the firmware/GPU pass the scheduled fence to drm_sched_job_add_dependency(), and issue wait commands to the firmware/GPU at job submission time. For this to be possible, they need all their 'native' dependencies to have a valid parent since this is where the actua

Re: [PATCH v6] drm/sched: Make sure we wait for all dependencies in kill_jobs_cb()

2023-06-22 Thread Boris Brezillon
On Wed, 21 Jun 2023 11:03:48 -0400 Luben Tuikov wrote: > On 2023-06-21 10:53, Boris Brezillon wrote: > > On Wed, 21 Jun 2023 10:41:22 -0400 > > Luben Tuikov wrote: > > > >> On 2023-06-21 10:18, Boris Brezillon wrote: > >>> Hello Luben, > >>> > >>> On Wed, 21 Jun 2023 09:56:40 -0400 > >>> Lu

Re: [RFC PATCH v3 2/4] drm: Create DRM_IOCTL_GET_RESET

2023-06-22 Thread Christian König
Am 22.06.23 um 10:22 schrieb Pekka Paalanen: On Wed, 21 Jun 2023 13:33:56 -0300 André Almeida wrote: Em 21/06/2023 05:09, Pekka Paalanen escreveu: On Tue, 20 Jun 2023 21:57:17 -0300 André Almeida wrote: Create a new DRM ioctl operation to get the numbers of resets for a given context. T

Re: [PATCH] drm: bridge: dw_hdmi: fix connector access for scdc

2023-06-22 Thread Neil Armstrong
Hi ! On 01/06/2023 14:31, Adrián Larumbe wrote: Commit 5d844091f237 ("drm/scdc-helper: Pimp SCDC debugs") changed the scdc interface to pick up an i2c adapter from a connector instead. However, in the case of dw-hdmi, the wrong connector was being used to pass i2c adapter information, since dw-h

Re: [PATCH] drm/i2c: Switch i2c drivers back to use .probe()

2023-06-22 Thread Javier Martinez Canillas
Uwe Kleine-König writes: Hello Uwe, > Hello, > > On Sun, Jun 11, 2023 at 10:27:40PM +0200, Uwe Kleine-König wrote: >> After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() >> call-back type"), all drivers being converted to .probe_new() and then >> commit 03c835f498b5 ("i2c: Switch .

Re: [PATCH 1/5] drm/bridge: tc358762: Split register programming from pre-enable to enable

2023-06-22 Thread rfoss
From: Robert Foss On Thu, 15 Jun 2023 22:18:58 +0200, Marek Vasut wrote: > Move the register programming part, which actually enables the bridge and > makes it push data out of its DPI side, into the enable callback. The DSI > host like DSIM may not be able to transmit commands in pre_enable, mov

Re: [PATCH 04/39] drm: renesas: shmobile: Fix ARGB32 overlay format typo

2023-06-22 Thread Sergei Shtylyov
Hello! On 6/22/23 12:21 PM, Geert Uytterhoeven wrote: > When configurating Configuring? My spellchecker trips. :-) > a CHn Source Image Format Register (LDBBSIFR), one > should use the corresponding LDBBSIFR_RPKF_* definition for overlay > planes, not the DDFR_PKF_* definition for the primar

Re: [PATCH v2 2/2] drm/panel: simple: Add support for Mitsubishi AA084XE01

2023-06-22 Thread Miquel Raynal
Hello, miquel.ray...@bootlin.com wrote on Mon, 19 Jun 2023 09:43:48 +0200: > From: Thomas Weber > > Add support for the Mitsubishi AA084XE01 panel which is an 8.4 inch XGA > TFT-LCD module for industrial use. > > Link: https://www.mouser.fr/datasheet/2/274/aa084xe01_e-364171.pdf > Signed-off-b

Re: [PATCH v2] drm: bridge: dw-mipi-dsi: Fix enable/disable of DSI controller

2023-06-22 Thread rfoss
From: Robert Foss On Sun, 18 Jun 2023 00:48:25 +0200, Ondřej Jirman wrote: > From: Ondrej Jirman > > Before this patch, booting to Linux VT and doing a simple: > > echo 2 > /sys/class/graphics/fb0/blank > echo 0 > /sys/class/graphics/fb0/blank > > [...] Applied, thanks! [1/1] drm: bridg

[PATCH] i915: avoid unused-but-set-variable warning

2023-06-22 Thread Arnd Bergmann
From: Arnd Bergmann The mchbar_addr variable is only used inside of an #ifdef: drivers/gpu/drm/i915/soc/intel_gmch.c:41:6: error: variable 'mchbar_addr' set but not used [-Werror,-Wunused-but-set-variable] Change this to an IS_ENABLED() check to let the compiler see how it's used and no longer

[PATCH] drm/drm_gem.c: Remove surplus else after return

2023-06-22 Thread Sui Jingfeng
else is not generally useful after return Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/drm_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 1a5a2cd0d4ec..c18686f434d4 100644 --- a/drivers/gpu/drm/drm_gem.

[PATCH 0/4] drm/ttm: Fixes around resources and bulk moves

2023-06-22 Thread Thomas Hellström
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A couple of ttm fixes for issues that either were hit while developing the xe driver or, for the resource leak patches, discovered during code inspection. Thomas Hellström (4): drm/ttm: Fix ttm_lru_bulk_mo

[PATCH v3 2/2] drm/panel: simple: Add support for Mitsubishi AA084XE01

2023-06-22 Thread Miquel Raynal
From: Thomas Weber Add support for the Mitsubishi AA084XE01 panel which is an 8.4 inch XGA TFT-LCD module for industrial use. Link: https://www.mouser.fr/datasheet/2/274/aa084xe01_e-364171.pdf Signed-off-by: Thomas Weber Signed-off-by: Miquel Raynal --- Changes in v3: * Fix connector type. C

[PATCH v3 1/2] dt-bindings: display: simple: Add Mitsubishi AA084XE01 panel

2023-06-22 Thread Miquel Raynal
Add Mitsubishi AA084XE01 8.4" XGA TFT LCD panel compatible string. Signed-off-by: Miquel Raynal Acked-by: Krzysztof Kozlowski --- Changes in v3: * None. Changes in v2: * Collected tag. .../devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) di

[PATCH 1/4] drm/ttm: Fix ttm_lru_bulk_move_pos_tail()

2023-06-22 Thread Thomas Hellström
The value of pos->first was not updated when the first resource of the range was moved. This could lead to errors like the one below. Fix this by updating pos->first when needed. <3> [218.963342] BUG: KASAN: null-ptr-deref in ttm_lru_bulk_move_del+0xc5/0x180 [ttm] <3> [218.963456] Read of size 8

[PATCH] drm/amdgpu: fix building without DEBUG_FS

2023-06-22 Thread Arnd Bergmann
From: Arnd Bergmann The debugfs file is defined unconditionally, but the registration is hidden in an #ifdef, which causes a warning: drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c:110:37: error: unused variable 'amdgpu_rap_debugfs_ops' [-Werror,-Wunused-const-variable] static const struct file_operat

[PATCH 2/4] drm/ttm: Don't shadow the operation context

2023-06-22 Thread Thomas Hellström
ttm_bo_swapout() shadows the ttm operation context which may cause major confusion in driver callbacks when swapping out !TTM_PL_SYSTEM memory. Fix this by reusing the operation context argument to ttm_bo_swapout(). Cc: "Christian König" Cc: Roger He Cc: Cc: Cc: # v4.16+ Fixes: dc947770cf34 (

[PATCH 3/4] drm/ttm: Don't leak a resource on eviction error

2023-06-22 Thread Thomas Hellström
On eviction errors other than -EMULTIHOP we were leaking a resource. Fix. Fixes: 403797925768 ("drm/ttm: Fix multihop assert on eviction.") Cc: Andrey Grodzovsky Cc: Christian König Cc: Christian Koenig Cc: Huang Rui Cc: dri-devel@lists.freedesktop.org Cc: # v5.15+ Signed-off-by: Thomas Hells

[PATCH 4/4] drm/ttm: Don't leak a resource on swapout move error

2023-06-22 Thread Thomas Hellström
If moving the bo to system for swapout failed, we were leaking a resource. Fix. Fixes: bfa3357ef9ab ("drm/ttm: allocate resource object instead of embedding it v2") Cc: Christian König Cc: "Christian König" Cc: dri-devel@lists.freedesktop.org Cc: # v5.14+ Signed-off-by: Thomas Hellström ---

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

2023-06-22 Thread Dan Carpenter
On Wed, Jun 21, 2023 at 08:53:41PM -0600, Jeffrey Hugo wrote: > On 6/21/2023 1:21 AM, Dan Carpenter wrote: > > (I think this is the first cover letter I have ever written). > > > > These patches are based on review and not from testing. > > Thank you for your review. I look forward to reading yo

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

2023-06-22 Thread Pranjal Ramajor Asha Kanojiya
On 6/21/2023 12:51 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 (user

Re: [PATCH v2 5/5] drm/rockchip: vop2: Add missing call to crtc reset helper

2023-06-22 Thread Sascha Hauer
On Wed, Jun 21, 2023 at 10:33:23PM +, Jonas Karlman wrote: > Add missing call to crtc reset helper to properly vblank reset. > > Also move vop2_crtc_reset and call vop2_crtc_destroy_state to simplify > and remove duplicated code. > > Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") > Sig

Re: [PATCH v2 3/5] drm/rockchip: vop: Fix call to crtc reset helper

2023-06-22 Thread Sascha Hauer
On Wed, Jun 21, 2023 at 10:33:20PM +, Jonas Karlman wrote: > Allocation of crtc_state may fail in vop_crtc_reset, causing an invalid > pointer to be passed to __drm_atomic_helper_crtc_reset. > > Fix this by adding a NULL check of crtc_state, similar to other drivers. > > Fixes: 01e2eaf40c9d (

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

2023-06-22 Thread Dan Carpenter
On Thu, Jun 22, 2023 at 04:54:03PM +0530, Pranjal Ramajor Asha Kanojiya wrote: > > > On 6/21/2023 12:51 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 th

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

2023-06-22 Thread Dan Carpenter
On Thu, Jun 22, 2023 at 02:43:57PM +0300, Dan Carpenter wrote: > > > - if (!user_msg->count) { > > > + if (!user_msg->count || > > > + user_msg->len < sizeof(*trans_hdr)) { > > Can we have something like this here > > user_msg->len < sizeof(*trans_hdr) * user_msg->count, no? > > This check was

Re: [PATCH 3/4] drm/ttm: Don't leak a resource on eviction error

2023-06-22 Thread Nirmoy Das
On 6/22/2023 12:14 PM, Thomas Hellström wrote: On eviction errors other than -EMULTIHOP we were leaking a resource. Fix. Fixes: 403797925768 ("drm/ttm: Fix multihop assert on eviction.") Cc: Andrey Grodzovsky Cc: Christian König Cc: Christian Koenig Cc: Huang Rui Cc: dri-devel@lists.freede

Re: [PATCH 4/4] drm/ttm: Don't leak a resource on swapout move error

2023-06-22 Thread Nirmoy Das
On 6/22/2023 12:14 PM, Thomas Hellström wrote: If moving the bo to system for swapout failed, we were leaking a resource. Fix. Fixes: bfa3357ef9ab ("drm/ttm: allocate resource object instead of embedding it v2") Cc: Christian König Cc: "Christian König" Cc: dri-devel@lists.freedesktop.org C

Re: [Intel-gfx] [PATCH 1/4] drm/ttm: Fix ttm_lru_bulk_move_pos_tail()

2023-06-22 Thread Nirmoy Das
Hi Thomas, Saw a fix from Yunxiang for this: https://patchwork.freedesktop.org/patch/543652/?series=119697&rev=1 Regards, Nirmoy On 6/22/2023 12:14 PM, Thomas Hellström wrote: The value of pos->first was not updated when the first resource of the range was moved. This could lead to errors

Re: [PATCH 1/4] drm/ttm: Fix ttm_lru_bulk_move_pos_tail()

2023-06-22 Thread Christian König
Teddy already stumbled over this as well, but this patch here looks better. Going to review and push it to drm-misc-fixes asap. Thanks, Christian. Am 22.06.23 um 12:14 schrieb Thomas Hellström: The value of pos->first was not updated when the first resource of the range was moved. This could l

Re: [PATCH] drm/i915/gt: Remove incorrect hard coded cache coherrency setting

2023-06-22 Thread Nirmoy Das
Hi Zhanjun, please restart the CI, https://patchwork.freedesktop.org/series/119485/ It seems to be stuck. On 6/17/2023 12:11 AM, Zhanjun Dong wrote: The previouse i915_gem_object_create_internal already set it with proper value before function return. This hard coded setting is incorrect fo

Re: [PATCH] MAINTAINERS: Add myself as reviewer for mgag200 and ast drivers

2023-06-22 Thread Jocelyn Falempe
On 31/05/2023 09:08, Thomas Zimmermann wrote: Hi Am 30.05.23 um 16:26 schrieb Jocelyn Falempe: I've contributed to these two drivers, fixing bugs and performance issues. Thanks for the work you're doing. Signed-off-by: Jocelyn Falempe Acked-by: Thomas Zimmermann Applied to drm-misc

Re: [PATCH] drm/mgag200: Fix a warning reported by Fi.CI.SPARSE

2023-06-22 Thread Jocelyn Falempe
This patch was already sent by Tom Rix last month: https://patchwork.freedesktop.org/series/117881/ I can push it to drm-misc-next, if Thomas is ok. Best regards, -- Jocelyn On 21/06/2023 21:11, Sui Jingfeng wrote: drivers/gpu/drm/mgag200/mgag200_drv.c:23:5: warning: symbol 'mgag200_modeset'

Re: [PATCH] drm: bridge: dw_hdmi: fix connector access for scdc

2023-06-22 Thread Neil Armstrong
Hi, On Thu, 01 Jun 2023 13:31:53 +0100, Adrián Larumbe wrote: > Commit 5d844091f237 ("drm/scdc-helper: Pimp SCDC debugs") changed the scdc > interface to pick up an i2c adapter from a connector instead. However, in > the case of dw-hdmi, the wrong connector was being used to pass i2c adapter > inf

  1   2   3   >