Re: [PATCH] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Patrik Jakobsson
On Fri, Jan 27, 2023 at 05:58:34PM +0100, Takashi Iwai wrote: > When a fbdev with deferred I/O is once opened and closed, the dirty > pages still remain queued in the pageref list, and eventually later > those may be processed in the delayed work. This may lead to a > corruption of pages, hitting

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Miko Larsson
On Sun, 2023-01-29 at 09:28 +0100, Takashi Iwai wrote: > When a fbdev with deferred I/O is once opened and closed, the dirty > pages still remain queued in the pageref list, and eventually later > those may be processed in the delayed work.  This may lead to a > corruption of pages, hitting an Oops

Re: [PATCHv2] fbcon: Check font dimension limits

2023-01-30 Thread Miko Larsson
On Sun, 2023-01-29 at 16:17 +0100, Samuel Thibault wrote: > blit_x and blit_y are u32, so fbcon currently cannot support fonts > larger than 32x32. > > The 32x32 case also needs shifting an unsigned int, to properly set > bit > 31, otherwise we get "UBSAN: shift-out-of-bounds in fbcon_set_font", >

Re: [PATCH 00/35] Documentation: correct lots of spelling errors (series 1)

2023-01-30 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Alexei Starovoitov : On Thu, 26 Jan 2023 22:39:30 -0800 you wrote: > Correct many spelling errors in Documentation/ as reported by codespell. > > Maintainers of specific kernel subsystems are only Cc-ed on their > respective patches,

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Thomas Zimmermann
Hi Am 29.01.23 um 09:28 schrieb Takashi Iwai: When a fbdev with deferred I/O is once opened and closed, the dirty pages still remain queued in the pageref list, and eventually later those may be processed in the delayed work. This may lead to a corruption of pages, hitting an Oops. Do you hav

Re: [PATCH v3 01/10] drm/client: Test for connectors before sending hotplug event

2023-01-30 Thread Thomas Zimmermann
Hi Am 27.01.23 um 19:02 schrieb Simon Ser: On Wednesday, January 25th, 2023 at 21:04, Thomas Zimmermann wrote: Not having connectors indicates a driver bug. Is it? What if all connectors are of the DP-MST type, ie. they are created on-the-fly? My commit message was nonsense. I even write

Re: [PATCH 1/2] dt-bindings: display: bridge: Add NXP i.MX93 parallel display format configuration

2023-01-30 Thread Liu Ying
On Sun, 2023-01-29 at 12:46 +0100, Krzysztof Kozlowski wrote: > On 28/01/2023 04:47, Liu Ying wrote: > > NXP i.MX93 mediamix blk-ctrl contains one DISPLAY_MUX register > > which > > configures parallel display format by using the > > "PARALLEL_DISP_FORMAT" > > field. Add device tree bindings for th

Re: [PATCH] drm/i915/pcode: Wait 10 seconds for pcode to settle

2023-01-30 Thread Andi Shyti
Hi GG, thanks for the deep analysis! > Hi Andi, > In the call flow invoked by intel_pcode_init(), I've added brief comments > where further clarification is needed in this scenario, and a description of > the suspicious scenario at the bottom. > >

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Takashi Iwai
On Mon, 30 Jan 2023 09:28:36 +0100, Thomas Zimmermann wrote: > > Hi > > Am 29.01.23 um 09:28 schrieb Takashi Iwai: > > When a fbdev with deferred I/O is once opened and closed, the dirty > > pages still remain queued in the pageref list, and eventually later > > those may be processed in the dela

Re: [PATCH RESEND] drm/logicvc: Drop obsolete dependency on COMPILE_TEST

2023-01-30 Thread Paul Kocialkowski
Hi Jean, On Fri 27 Jan 23, 12:01, Jean Delvare wrote: > Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it > is possible to test-build any driver which depends on OF on any > architecture by explicitly selecting OF. Therefore depending on > COMPILE_TEST as an alternative is no lo

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Thomas Zimmermann
Hi Am 30.01.23 um 09:52 schrieb Takashi Iwai: On Mon, 30 Jan 2023 09:28:36 +0100, Thomas Zimmermann wrote: Hi Am 29.01.23 um 09:28 schrieb Takashi Iwai: When a fbdev with deferred I/O is once opened and closed, the dirty pages still remain queued in the pageref list, and eventually later tho

[PATCH] drm/msm/a3xx: Implement .gpu_busy

2023-01-30 Thread Konrad Dybcio
Add support for gpu_busy on a3xx, which is required for devfreq support. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c index 94

Re: [PATCH] [v2] accel: fix CONFIG_DRM dependencies

2023-01-30 Thread Stanislaw Gruszka
On Fri, Jan 27, 2023 at 11:14:55PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > At the moment, accel drivers can be built-in even with CONFIG_DRM=m, > but this causes a link failure: > > x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_dev_init': > ivpu_drv.c:(.text+0x1

Re: [PATCH] backlight: ktz8866: Convert to i2c's .probe_new()

2023-01-30 Thread Lee Jones
On Fri, 27 Jan 2023, Uwe Kleine-König wrote: > The probe function doesn't make use of the i2c_device_id * parameter so > it can be trivially converted. > > Signed-off-by: Uwe Kleine-König > --- > Hello, > > there is an ongoing effort to convert all drivers to .probe_new to > eventually drop .pr

Re: [PATCH] drm/i915: Fix potential bit_17 double-free

2023-01-30 Thread Tvrtko Ursulin
On 27/01/2023 20:05, Rob Clark wrote: From: Rob Clark A userspace with multiple threads racing I915_GEM_SET_TILING to set the tiling to I915_TILING_NONE could trigger a double free of the bit_17 bitmask. (Or conversely leak memory on the transition to tiled.) Move allocation/free'ing of the

[PATCH 2/6] drm/i915/ttm: audit remaining bo->resource

2023-01-30 Thread Matthew Auld
In the near future TTM will have NULL bo->resource when the object is initially created, plus after calling into pipeline-gutting. Try to handle the remaining cases. In practice NULL bo->resource should be taken to mean swapped-out or purged object. References: 516198d317d8 ("drm/i915: audit bo->r

[PATCH 1/6] drm/i915/ttm: fix sparse warning

2023-01-30 Thread Matthew Auld
Sparse complains with: drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: expected restricted vm_fault_t [assigned] [usertype] ret drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got int Fixes: 516198d317d8 ("drm/i915: audit bo->resource usage v3") Reported-by: kernel test

[PATCH 5/6] drm/ttm: stop allocating a dummy resource for pipelined gutting

2023-01-30 Thread Matthew Auld
From: Christian König That should not be necessary any more when drivers should at least be able to handle a move without a resource. Signed-off-by: Christian König Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld --- drivers/gpu/drm/ttm/ttm_bo_util.c | 15 ++- 1 file change

[PATCH 6/6] drm/ttm: prevent moving of pinned BOs

2023-01-30 Thread Matthew Auld
From: Christian König We have checks for this in the individual drivers move callback, but it's probably better to generally forbid that on a higher level. Also stops exporting ttm_resource_compat() since that's not necessary any more after removing the extra checks in vmwgfx. Signed-off-by: Ch

[PATCH 3/6] drm/ttm: clear the ttm_tt when bo->resource is NULL

2023-01-30 Thread Matthew Auld
In the next few patches, when initially creating a ttm BO, the bo->resource is NULL, and the driver is then expected to handle the initial dummy move. However, if this is created as a system resource the first ttm_tt we create will always have the clear value set to false. Previously the initial t

[PATCH 4/6] drm/ttm: stop allocating dummy resources during BO creation

2023-01-30 Thread Matthew Auld
From: Christian König That should not be necessary any more when drivers should at least be able to handle the move without a resource. Signed-off-by: Christian König Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld --- drivers/gpu/drm/ttm/ttm_bo.c | 7 --- 1 file changed, 7 deletio

Re: [Intel-gfx] [PATCH 1/6] drm/i915/ttm: fix sparse warning

2023-01-30 Thread Andrzej Hajda
On 30.01.2023 11:12, Matthew Auld wrote: Sparse complains with: drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: expected restricted vm_fault_t [assigned] [usertype] ret drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got int Fixes: 516198d317d8 ("drm/i915: audit bo->re

Re: [Intel-gfx] [PATCH 2/6] drm/i915/ttm: audit remaining bo->resource

2023-01-30 Thread Andrzej Hajda
On 30.01.2023 11:12, Matthew Auld wrote: In the near future TTM will have NULL bo->resource when the object is initially created, plus after calling into pipeline-gutting. Try to handle the remaining cases. In practice NULL bo->resource should be taken to mean swapped-out or purged object. Refer

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Takashi Iwai
On Mon, 30 Jan 2023 10:28:16 +0100, Thomas Zimmermann wrote: > > Hi > > Am 30.01.23 um 09:52 schrieb Takashi Iwai: > > On Mon, 30 Jan 2023 09:28:36 +0100, > > Thomas Zimmermann wrote: > >> > >> Hi > >> > >> Am 29.01.23 um 09:28 schrieb Takashi Iwai: > >>> When a fbdev with deferred I/O is once

Re: [Intel-gfx] [PATCH 2/6] drm/i915/ttm: audit remaining bo->resource

2023-01-30 Thread Matthew Auld
On Mon, 30 Jan 2023 at 11:00, Andrzej Hajda wrote: > > On 30.01.2023 11:12, Matthew Auld wrote: > > In the near future TTM will have NULL bo->resource when the object is > > initially created, plus after calling into pipeline-gutting. Try to > > handle the remaining cases. In practice NULL bo->res

Re: [PATCH v10 00/11] Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers

2023-01-30 Thread Dmitry Osipenko
On 1/27/23 11:13, Gerd Hoffmann wrote: > On Thu, Jan 26, 2023 at 01:55:09AM +0300, Dmitry Osipenko wrote: >> Hello Thomas and Gerd, >> >> On 1/9/23 00:04, Dmitry Osipenko wrote: >>> This series: >>> >>> 1. Makes minor fixes for drm_gem_lru and Panfrost >>> 2. Brings refactoring for older code >

[PATCH v2 3/6] drm/ttm: clear the ttm_tt when bo->resource is NULL

2023-01-30 Thread Matthew Auld
In the next few patches, when initially creating a ttm BO, the bo->resource is NULL, and the driver is then expected to handle the initial dummy move. However, if this is created as a system resource the first ttm_tt we create will always have the clear value set to false. Previously the initial t

[PATCH v2 1/6] drm/i915/ttm: fix sparse warning

2023-01-30 Thread Matthew Auld
Sparse complains with: drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: expected restricted vm_fault_t [assigned] [usertype] ret drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got int Fixes: 516198d317d8 ("drm/i915: audit bo->resource usage v3") Reported-by: kernel test

[PATCH v2 5/6] drm/ttm: stop allocating a dummy resource for pipelined gutting

2023-01-30 Thread Matthew Auld
From: Christian König That should not be necessary any more when drivers should at least be able to handle a move without a resource. Signed-off-by: Christian König Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld --- drivers/gpu/drm/ttm/ttm_bo_util.c | 15 ++- 1 file change

[PATCH v2 4/6] drm/ttm: stop allocating dummy resources during BO creation

2023-01-30 Thread Matthew Auld
From: Christian König That should not be necessary any more when drivers should at least be able to handle the move without a resource. Signed-off-by: Christian König Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld --- drivers/gpu/drm/ttm/ttm_bo.c | 7 --- 1 file changed, 7 deletio

[PATCH v2 6/6] drm/ttm: prevent moving of pinned BOs

2023-01-30 Thread Matthew Auld
From: Christian König We have checks for this in the individual drivers move callback, but it's probably better to generally forbid that on a higher level. Also stops exporting ttm_resource_compat() since that's not necessary any more after removing the extra checks in vmwgfx. Signed-off-by: Ch

[PATCH v2 2/6] drm/i915/ttm: audit remaining bo->resource

2023-01-30 Thread Matthew Auld
In the near future TTM will have NULL bo->resource when the object is initially created, plus after calling into pipeline-gutting. Try to handle the remaining cases. In practice NULL bo->resource should be taken to mean swapped-out or purged object. v2 (Andrzej): - Rather make i915_ttm_cpu_maps_

Re: [PATCH v2 1/6] drm/i915/ttm: fix sparse warning

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 1:06 PM, Matthew Auld wrote: Sparse complains with: drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: expected restricted vm_fault_t [assigned] [usertype] ret drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got int Fixes: 516198d317d8 ("drm/i915: audit bo-

Re: [Intel-gfx] [PATCH v2 2/6] drm/i915/ttm: audit remaining bo->resource

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 1:06 PM, Matthew Auld wrote: In the near future TTM will have NULL bo->resource when the object is initially created, plus after calling into pipeline-gutting. Try to handle the remaining cases. In practice NULL bo->resource should be taken to mean swapped-out or purged object. v2

Re: [PATCH v2 3/6] drm/ttm: clear the ttm_tt when bo->resource is NULL

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 1:06 PM, Matthew Auld wrote: In the next few patches, when initially creating a ttm BO, the bo->resource is NULL, and the driver is then expected to handle the initial dummy move. However, if this is created as a system resource the first ttm_tt we create will always have the clea

Re: [PATCH v2 4/6] drm/ttm: stop allocating dummy resources during BO creation

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 1:06 PM, Matthew Auld wrote: From: Christian König That should not be necessary any more when drivers should at least be able to handle the move without a resource. Signed-off-by: Christian König Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Acked-by: Nirmoy Das --

Re: [PATCH v2 5/6] drm/ttm: stop allocating a dummy resource for pipelined gutting

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 1:06 PM, Matthew Auld wrote: From: Christian König That should not be necessary any more when drivers should at least be able to handle a move without a resource. Signed-off-by: Christian König Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Acked-by: Nirmoy Das ---

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Takashi Iwai
On Mon, 30 Jan 2023 09:52:43 +0100, Takashi Iwai wrote: > > > There's a call to cancel_delayed_work_sync() in the new helper > > fb_deferred_io_release(). Is this the right function? Maybe > > flush_delayed_work() is a better choice. > > I thought of that, but took a shorter path. > OK, let's che

[PATCH v2 0/6] drm/debugfs: Make the debugfs structure more generic

2023-01-30 Thread Maíra Canal
This series is the first step to introduce a debugfs structure to KMS objects and it is inspired by the feedback provided in [1]. Thanks, Jani and Daniel for all the feedback provided! This first step is making the current API more generic and preparing it to receive the KMS objects in the future.

[PATCH v2 1/6] drm/debugfs: Introduce wrapper for debugfs list

2023-01-30 Thread Maíra Canal
Introduce a struct wrapper for all the debugfs-related stuff: the list of debugfs files and the mutex that protects it. This will make it easier to initialize all the debugfs list in a DRM object and will create a good abstraction for a possible implementation of the debugfs infrastructure for KMS

Re: [PATCH] drm/arm/malidp: use sysfs_emit in show function callback

2023-01-30 Thread Liviu Dudau
On Sat, Jan 28, 2023 at 02:21:26AM +0530, Deepak R Varma wrote: > According to Documentation/filesystems/sysfs.rst, the show() callback > function of kobject attributes should strictly use sysfs_emit() instead > of sprintf() family functions. > Issue identified using the device_attr_show.cocci Cocc

[PATCH v2 2/6] drm/debugfs: Make drm_device use the struct drm_debugfs_files

2023-01-30 Thread Maíra Canal
The struct drm_debugfs_files encapsulates all the debugfs-related objects, so that they can be initialized and destroyed with two helpers. Therefore, make the struct drm_device use the struct drm_debugfs_files instead of instantiating the debugfs list and mutex separated. Signed-off-by: Maíra Cana

[PATCH v2 3/6] drm/debugfs: Create wrapper to add files to debugfs list

2023-01-30 Thread Maíra Canal
Create a helper to encapsulate the code that adds a new debugfs file to a linked list related to a object. Moreover, the helper also provides more flexibily, as the parameter is a struct drm_debugfs_files. Signed-off-by: Maíra Canal --- drivers/gpu/drm/drm_debugfs.c | 11 --- 1 file chan

[PATCH v2 4/6] drm/debugfs: Create wrapper to register debugfs

2023-01-30 Thread Maíra Canal
Create a helper to encapsulate the code that creates a new debugfs files from a linked list related to an object. Moreover, the helper also provides more flexibily on the type of the object. Signed-off-by: Maíra Canal --- drivers/gpu/drm/drm_debugfs.c | 25 + 1 file chang

[PATCH v2 5/6] drm/debugfs: Make the show callback pass the pointer to the right object

2023-01-30 Thread Maíra Canal
Currently, the drivers need to access the struct drm_debugfs_entry to get the proper device on the show callback. There is no need for such thing, as you can wrap the show callback in order to provide to the driver the proper parameters: the struct seq_file, the struct drm_device and the driver-spe

[PATCH v2 6/6] drm/debugfs: Make the struct drm_debugfs_entry independent of DRM device

2023-01-30 Thread Maíra Canal
In order to turn the API more expansible to other DRM objects, such as the struct drm_connector, make the struct drm_debugfs_entry hold a void pointer and cast the void pointer to the struct drm_device when needed. Signed-off-by: Maíra Canal --- drivers/gpu/drm/drm_debugfs.c | 4 ++-- include/dr

[RFC PATCH v8] media: mediatek: vcodec: support stateless AV1 decoder

2023-01-30 Thread Xiaoyong Lu
Add mediatek av1 decoder linux driver which use the stateless API in MT8195. Signed-off-by: Xiaoyong Lu --- Changes from v7: - change V4L2_CID_STATELESS_AV1_PROFILE to V4L2_CID_MPEG_VIDEO_AV1_PROFILE, V4L2_CID_STATELESS_AV1_LEVEL to V4L2_CID_MPEG_VIDEO_AV1_LEVEL to match av1 uAPI V4. - remove vs

Re: [PATCH v12 00/18] drm: Add Samsung MIPI DSIM bridge

2023-01-30 Thread Rasmus Villemoes
On 27/01/2023 12.30, Marek Vasut wrote: > On 1/27/23 12:04, Jagan Teki wrote: >>> Thanks, but that's exactly what I'm doing, and I don't see any >>> modification of imx8mp.dtsi in that branch. I'm basically looking for >>> help to do the equivalent of >>> >>>    88775338cd58 - arm64: dts: imx8mm:

Re: [RESEND PATCH v11 02/18] drm: bridge: panel: Add devm_drm_of_dsi_get_bridge helper

2023-01-30 Thread Maxime Ripard
On Fri, Jan 27, 2023 at 11:09:26PM +0530, Jagan Teki wrote: > Hi, > > On Thu, Jan 26, 2023 at 8:48 PM Jagan Teki wrote: > > > > On Thu, Jan 26, 2023 at 5:42 PM Maxime Ripard wrote: > > > > > > Hi, > > > > > > On Mon, Jan 23, 2023 at 08:41:56PM +0530, Jagan Teki wrote: > > > > Add devm OF helper

[GIT PULL] mediatek drm next for 6.3

2023-01-30 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Reduce the time of dsi from LP11 to sending cmd 2. Remove dependency on GEM DMA helper 3. Drop unbalanced obj unref 4. Fix the fallback for mediatek,mt8186-disp-ccorr 5. Fixup for error path. Regards, Chun-Kuang. The following changes since commit 1b929c02af

Re: [RESEND PATCH v11 02/18] drm: bridge: panel: Add devm_drm_of_dsi_get_bridge helper

2023-01-30 Thread Maxime Ripard
On Thu, Jan 26, 2023 at 08:48:48PM +0530, Jagan Teki wrote: > On Thu, Jan 26, 2023 at 5:42 PM Maxime Ripard wrote: > > > > Hi, > > > > On Mon, Jan 23, 2023 at 08:41:56PM +0530, Jagan Teki wrote: > > > Add devm OF helper to return the next DSI bridge in the chain. > > > > > > Unlike general bridge

Re: [PATCH drm-next 05/14] drm/nouveau: new VM_BIND uapi interfaces

2023-01-30 Thread Christian König
Am 27.01.23 um 21:25 schrieb David Airlie: [SNIP] What we have inside the kernel is the information what happens if an address X is accessed. On AMD HW this can be: 1. Route to the PCIe bus because the mapped BO is stored in system memory. 2. Route to the internal MC because the mapped BO is st

Re: [PATCH drm-next 05/14] drm/nouveau: new VM_BIND uapi interfaces

2023-01-30 Thread Christian König
Am 29.01.23 um 19:46 schrieb Danilo Krummrich: On 1/27/23 22:09, Danilo Krummrich wrote: On 1/27/23 16:17, Christian König wrote: Am 27.01.23 um 15:44 schrieb Danilo Krummrich: [SNIP] What you want is one component for tracking the VA allocations (drm_mm based) and a different component/int

Re: [PATCH v2 1/1] tee: new ioctl to a register tee_shm from a dmabuf file descriptor

2023-01-30 Thread Etienne Carriere
Hello Christian, Olivier, On Fri, 27 Jan 2023 at 12:19, Christian König wrote: > > Hi guys, > > Am 27.01.23 um 11:54 schrieb Olivier Masse: > > Hi Joakim, > > Hi Etienne, > > > > Let me bring back this pull request for OPTEE Linux driver. > > > > Last feedback was from Christian König and Sumit

[PATCH] drm/format-helper: Use KUNIT_EXPECT_MEMEQ macro

2023-01-30 Thread Maíra Canal
Commit b8a926bea8b1 ("kunit: Introduce KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ macros") introduced a new macro to compare blocks of memory and, if the test fails, print the result in a human-friendly format. Therefore, use KUNIT_EXPECT_MEMEQ to compare memory blocks in replacement of the KUNIT_E

Re: [RESEND PATCH v11 02/18] drm: bridge: panel: Add devm_drm_of_dsi_get_bridge helper

2023-01-30 Thread Jagan Teki
On Mon, Jan 30, 2023 at 6:28 PM Maxime Ripard wrote: > > On Thu, Jan 26, 2023 at 08:48:48PM +0530, Jagan Teki wrote: > > On Thu, Jan 26, 2023 at 5:42 PM Maxime Ripard wrote: > > > > > > Hi, > > > > > > On Mon, Jan 23, 2023 at 08:41:56PM +0530, Jagan Teki wrote: > > > > Add devm OF helper to retur

Re: [RESEND PATCH v11 02/18] drm: bridge: panel: Add devm_drm_of_dsi_get_bridge helper

2023-01-30 Thread Jagan Teki
On Mon, Jan 30, 2023 at 6:26 PM Maxime Ripard wrote: > > On Fri, Jan 27, 2023 at 11:09:26PM +0530, Jagan Teki wrote: > > Hi, > > > > On Thu, Jan 26, 2023 at 8:48 PM Jagan Teki > > wrote: > > > > > > On Thu, Jan 26, 2023 at 5:42 PM Maxime Ripard wrote: > > > > > > > > Hi, > > > > > > > > On Mon,

Re: [REGRESSION] GM20B probe fails after commit 2541626cfb79

2023-01-30 Thread Diogo Ivo
On Mon, Jan 30, 2023 at 08:36:06AM +1000, Ben Skeggs wrote: > On Fri, 27 Jan 2023 at 20:42, Diogo Ivo wrote: > > > > On Fri, Jan 27, 2023 at 04:00:59PM +1000, Ben Skeggs wrote: > > > On Fri, 20 Jan 2023 at 21:37, Diogo Ivo > > > wrote: > > > > > > > > On Wed, Jan 18, 2023 at 11:28:49AM +1000, Be

[PATCH v4 00/21] Add Tegra20 parallel video input capture

2023-01-30 Thread Luca Ceresoli
Tegra20 and other Tegra SoCs have a video input (VI) peripheral that can receive from either MIPI CSI-2 or parallel video (called respectively "CSI" and "VIP" in the documentation). The kernel currently has a staging driver for Tegra210 CSI capture. This patch set adds support for Tegra20 VIP captu

[PATCH v4 01/21] dt-bindings: display: tegra: add Tegra20 VIP

2023-01-30 Thread Luca Ceresoli
VIP is the parallel video capture component within the video input subsystem of Tegra20 (and other Tegra chips, apparently). Signed-off-by: Luca Ceresoli Reviewed-by: Krzysztof Kozlowski Reviewed-by: Dmitry Osipenko --- Changed in v4: - Added review tags - remove leftover lines after remova

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

2023-01-30 Thread Luca Ceresoli
The Tegra20 VI peripheral can receive parallel input from the VIP parallel input module. Add it to the allowed properties and augment the existing nvidia,tegra20-vi example to show a 'vip' property. Signed-off-by: Luca Ceresoli --- Changed in v4: - complete the removal of 'channel@0' Changed

[PATCH v4 03/21] staging: media: tegra-video: fix .vidioc_enum_fmt_vid_cap to return all formats

2023-01-30 Thread Luca Ceresoli
The .vidioc_enum_fmt_vid_cap (called tegra_channel_enum_format() here) should return all the supported formats. Instead the current implementation computes the intersection between the formats it supports and those supported by the first subdev in the stream (typically the image sensor). Remove al

[PATCH v4 04/21] staging: media: tegra-video: improve documentation of tegra_video_format fields

2023-01-30 Thread Luca Ceresoli
Some fields are irrelevant for Tegra20/VIP. Add a note to clarify that. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- Changed in v4: - Added review tags No changes in v3 No changes in v2 --- drivers/staging/media/tegra-video/vi.h | 6 +++--- 1 file changed, 3 insertions(+),

[PATCH v4 06/21] staging: media: tegra-video: fix typos in comment

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

[PATCH v4 05/21] staging: media: tegra-video: document tegra_channel_get_remote_source_subdev

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

[PATCH v4 08/21] staging: media: tegra-video: slightly simplify cleanup on errors

2023-01-30 Thread Luca Ceresoli
of_node_put(node) does nothing if node == NULL, so it can be moved to the cleanup section at the bottom. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- Changed in v4: - Added review tags No changes in v3 No changes in v2 --- drivers/staging/media/tegra-video/vi.c | 8 +++-

[PATCH v4 09/21] staging: media: tegra-video: move private struct declaration to C file

2023-01-30 Thread Luca Ceresoli
struct tegra_vi_graph_entity is an internal implementation detail of the VI module. Move its declaration from vi.h to vi.c. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- Changed in v4: - Added review tags No changes in v3 No changes in v2 --- drivers/staging/media/tegra-vide

[PATCH v4 10/21] staging: media: tegra-video: move tegra210_csi_soc to C file

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

Re: [PATCH v3 01/21] dt-bindings: display: tegra: add Tegra20 VIP

2023-01-30 Thread Luca Ceresoli
Hi Dmitry, On Wed, 25 Jan 2023 01:15:22 +0300 Dmitry Osipenko wrote: > On 12/29/22 16:31, Luca Ceresoli wrote: > > VIP is the parallel video capture component within the video input > > subsystem of Tegra20 (and other Tegra chips, apparently). > > > > Signed-off-by: Luca Ceresoli ... > Revie

[PATCH v4 12/21] staging: media: tegra-video: Kconfig: allow TPG only on Tegra210

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

[PATCH v4 11/21] staging: media: tegra-video: remove unneeded include

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

[PATCH v4 13/21] staging: media: tegra-video: move tegra_channel_fmt_align to a per-soc op

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

[PATCH v4 07/21] staging: media: tegra-video: improve error messages

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

[PATCH v4 14/21] staging: media: tegra-video: move default format to soc-specific data

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

[PATCH v4 16/21] staging: media: tegra-video: add a per-soc enable/disable op

2023-01-30 Thread Luca Ceresoli
The Tegra20 VI needs an additional operation to enable the VI, add an operation for that. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- Changed in v4: - Added review tags No changes in v3 No changes in v2 --- drivers/staging/media/tegra-video/vi.c | 7 +++ drivers/stagin

[PATCH v4 15/21] staging: media: tegra-video: move MIPI calibration calls from VI to CSI

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

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

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

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

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

[PATCH v4 19/21] staging: media: tegra-video: add hooks for planar YUV and H/V flip

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

[PATCH v4 17/21] staging: media: tegra-video: move syncpt init/free to a per-soc op

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

[PATCH v4 18/21] staging: media: tegra-video: add syncpts for Tegra20 to struct tegra_vi

2023-01-30 Thread Luca Ceresoli
In preparation to implement Tegra20 parallel video capture, add a variable to hold the required syncpt and document all the syncpt variables. Signed-off-by: Luca Ceresoli Reviewed-by: Dmitry Osipenko --- Changed in v4: - Added review tags Changed in v3: - recycle mw_ack_sp[0] instead of add

Re: [PATCH] drm/i915/pcode: Wait 10 seconds for pcode to settle

2023-01-30 Thread Rodrigo Vivi
On Mon, Jan 30, 2023 at 09:48:31AM +0100, Andi Shyti wrote: > Hi GG, > > thanks for the deep analysis! > > > Hi Andi, > > In the call flow invoked by intel_pcode_init(), I've added brief comments > > where further clarification is needed in this scenario, and a description of > > the suspicious s

Re: [PATCH 0/2] drm/tegra: handle implicit scanout modifiers

2023-01-30 Thread Diogo Ivo
On Tue, Jan 24, 2023 at 03:25:09PM +0100, Thierry Reding wrote: > On Fri, Jan 20, 2023 at 10:58:56AM +, Diogo Ivo wrote: > > Hello! > > > > This patch series adds support for correctly displaying tiled > > framebuffers when no modifiers are reported by userspace. > > > > Patch 1 adds the sect

[PATCH v12 01/14] drm/msm/disp/dpu: check for crtc enable rather than crtc active to release shared resources

2023-01-30 Thread Vinod Polimera
According to KMS documentation, The driver must not release any shared resources if active is set to false but enable still true. Fixes: ccc862b957c6 ("drm/msm/dpu: Fix reservation failures in modeset") Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu

[PATCH v12 00/14] Add PSR support for eDP

2023-01-30 Thread Vinod Polimera
Changes in v2: - Use dp bridge to set psr entry/exit instead of dpu_enocder. - Don't modify whitespaces. - Set self refresh aware from atomic_check. - Set self refresh aware only if psr is supported. - Provide a stub for msm_dp_display_set_psr. - Move dp functions to bridge code. Chang

[PATCH v12 02/14] drm/msm/disp/dpu: get timing engine status from intf status register

2023-01-30 Thread Vinod Polimera
Recommended way of reading the interface timing gen status is via status register. Timing gen status register will give a reliable status of the interface especially during ON/OFF transitions. This support was added from DPU version 5.0.0. Signed-off-by: Vinod Polimera --- drivers/gpu/drm/msm/di

[PATCH v12 03/14] drm/msm/disp/dpu: wait for extra vsync till timing engine status is disabled

2023-01-30 Thread Vinod Polimera
There can be a race between timing gen disable and vblank irq. The wait post timing gen disable may return early but intf disable sequence might not be completed. Ensure that, intf status is disabled before we retire the function. Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov ---

[PATCH v12 05/14] drm: add helper functions to retrieve old and new crtc

2023-01-30 Thread Vinod Polimera
Add new helper functions, drm_atomic_get_old_crtc_for_encoder and drm_atomic_get_new_crtc_for_encoder to retrieve the corresponding crtc for the encoder. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Douglas Anderson Reviewed-by: Daniel Vetter --- drivers/gpu/

[PATCH v12 04/14] drm/msm/disp/dpu: reset the datapath after timing engine disable

2023-01-30 Thread Vinod Polimera
Reset the datapath after disabling the timing gen, such that it can start on a clean slate when the intf is enabled back. This was a recommended sequence from the DPU HW programming guide. Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_

[PATCH v12 07/14] drm/msm/dp: Add basic PSR support for eDP

2023-01-30 Thread Vinod Polimera
Add support for basic panel self refresh (PSR) feature for eDP. Add a new interface to set PSR state in the sink from DPU. Program the eDP controller to issue PSR enter and exit SDP to the sink. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov ---

[PATCH v12 06/14] drm/msm/dp: use atomic callbacks for DP bridge ops

2023-01-30 Thread Vinod Polimera
Use atomic variants for DP bridge callback functions so that the atomic state can be accessed in the interface drivers. The atomic state will help the driver find out if the display is in self refresh state. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Ba

[PATCH v12 09/14] drm/msm/dp: disable self_refresh_aware after entering psr

2023-01-30 Thread Vinod Polimera
From: Sankeerth Billakanti Updated frames get queued if self_refresh_aware is set when the sink is in psr. To support bridge enable and avoid queuing of update frames, reset the self_refresh_aware state after entering psr. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera ---

[PATCH v12 08/14] drm/msm/dp: use the eDP bridge ops to validate eDP modes

2023-01-30 Thread Vinod Polimera
The eDP and DP interfaces shared the bridge operations and the eDP specific changes were implemented under is_edp check. To add psr support for eDP, we started using a new set of eDP bridge ops. We are moving the eDP specific code in the dp_bridge_mode_valid function to a new eDP function, edp_brid

[PATCH v12 11/14] drm/bridge: add psr support for panel bridge callbacks

2023-01-30 Thread Vinod Polimera
This change will handle the psr entry exit cases in the panel bridge atomic callback functions. For example, the panel power should not turn off if the panel is entering psr. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Daniel Vetter --- drivers/gpu/drm/bridge

[PATCH v12 10/14] drm/bridge: use atomic enable/disable callbacks for panel bridge

2023-01-30 Thread Vinod Polimera
Use atomic variants for panel bridge callback functions such that certain states like self-refresh can be accessed as part of enable/disable sequence. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Reviewed-by: Daniel Vetter --- drivers/gpu/drm

[PATCH v12 12/14] drm/msm/disp/dpu: use atomic enable/disable callbacks for encoder functions

2023-01-30 Thread Vinod Polimera
Use atomic variants for encoder callback functions such that certain states like self-refresh can be accessed as part of enable/disable sequence. Signed-off-by: Kalyan Thota Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ++-

[PATCH v12 13/14] drm/msm/disp/dpu: add PSR support for eDP interface in dpu driver

2023-01-30 Thread Vinod Polimera
Enable PSR on eDP interface using drm self-refresh librabry. This patch uses a trigger from self-refresh library to enter/exit into PSR, when there are no updates from framework. Signed-off-by: Kalyan Thota Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dis

[PATCH v12 14/14] drm/msm/disp/dpu: update dpu_enc crtc state on crtc enable/disable during self refresh

2023-01-30 Thread Vinod Polimera
Populate the enocder software structure to reflect the updated crtc appropriately during crtc enable/disable for a new commit while taking care of the self refresh transitions when crtc disable is triggered from the drm self refresh library. Signed-off-by: Vinod Polimera --- drivers/gpu/drm/msm/

[v1 2/3] drm/msm/disp/dpu1: add dspps into reservation if there is a ctm request

2023-01-30 Thread Kalyan Thota
Add dspp blocks into the topology for reservation, if there is a ctm request for that composition. Changes in v1: - Minor nits (Dmitry) Signed-off-by: Kalyan Thota Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 13 ++--- 1 file changed, 6 insertions(+),

[PATCH 0/3] Reserve dspps based on user request

2023-01-30 Thread Kalyan Thota
This series will enable color features on sc7280 target which has primary panel as eDP The series removes dspp allocation based on encoder type and allows the dspp reservation based on user request via ctm. The series will release/reserve the dpu resources when ever there is a topology change

  1   2   >