Re: [PATCH v2 0/1] tee: Add tee_shm_register_fd

2022-08-16 Thread Jens Wiklander
Hi Olivier, On Fri, Aug 12, 2022 at 4:31 PM Olivier Masse wrote: > > Add a new ioctl called TEE_IOC_SHM_REGISTER_FD to register a > shared memory from a dmabuf file descriptor. > This new ioctl will allow the Linux Kernel to register a buffer > to be used by the Secure Data Path OPTEE OS

Re: [PATCH v2 1/3] media: vsp1: add premultiplied alpha support

2022-08-16 Thread Takanari Hayama
Hi, > 2022/08/11 2:41、Sergey Shtylyov のメール: > > Hello! > > On 8/10/22 11:37 AM, Takanari Hayama wrote: > >> To support DRM blend mode in R-Car DU driver, we must be able to pass >> a plane with the premultiplied alpha. Adding a new property to >> vsp1_du_atomic_config allows the R-Car DU

Re: [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported

2022-08-16 Thread Jani Nikula
On Tue, 16 Aug 2022, Kai-Heng Feng wrote: > On mobile workstations like HP ZBook Fury G8, iGFX's DP-IN can switch to > dGFX so external monitors are routed to dGFX, and more monitors can be > supported as result. > > To switch the DP-IN to dGFX, the driver needs to invoke _DSM function 20 > on

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-16 Thread Andy Shevchenko
On Mon, Aug 15, 2022 at 11:20 PM Laurent Pinchart wrote: > On Mon, Aug 15, 2022 at 05:33:06PM +0100, Mark Brown wrote: ... > However, should a devm_clk_get_enable() or similar function be > implemented, we'll run into trouble. And in 5.19 we have devm_clk_get_enable(), are we already in

Re: [PATCH v2 1/3] dma-buf: Add ioctl to query mmap coherency/cache info

2022-08-16 Thread Christian König
Am 15.08.22 um 23:15 schrieb Rob Clark: From: Rob Clark This is a fairly narrowly focused interface, providing a way for a VMM in userspace to tell the guest kernel what pgprot settings to use when mapping a buffer to guest userspace. For buffers that get mapped into guest userspace,

[PATCH] drm: Fix all occurences of the "the the" typo

2022-08-16 Thread Bo Liu
There are double "the" in messages in file drm_dp_helper.c, i915_irq.c and panel-novatek-nt35510.c, fix it. Signed-off-by: Bo Liu --- drivers/gpu/drm/display/drm_dp_helper.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 2 +- drivers/gpu/drm/panel/panel-novatek-nt35510.c | 2 +-

Re: [PATCH] drm: Fix all occurences of the "the the" typo

2022-08-16 Thread Jani Nikula
On Tue, 16 Aug 2022, Bo Liu wrote: > There are double "the" in messages in file drm_dp_helper.c, > i915_irq.c and panel-novatek-nt35510.c, fix it. Please split to three patches. BR, Jani. > > Signed-off-by: Bo Liu > --- > drivers/gpu/drm/display/drm_dp_helper.c | 2 +- >

Re: [EXT] Re: [PATCH v2 0/1] tee: Add tee_shm_register_fd

2022-08-16 Thread Olivier Masse
Hi Jens, On mar., 2022-08-16 at 10:17 +0200, Jens Wiklander wrote: > Caution: EXT Email > > Hi Olivier, > > On Fri, Aug 12, 2022 at 4:31 PM Olivier Masse > wrote: > > > > Add a new ioctl called TEE_IOC_SHM_REGISTER_FD to register a > > shared memory from a dmabuf file descriptor. > > This new

[PATCH v7 2/8] util_macros: Add exact_type macro to catch type mis-match while compiling

2022-08-16 Thread Gwan-gyeong Mun
It adds exact_type and exactly_pgoff_t macro to catch type mis-match while compiling. The existing typecheck() macro outputs build warnings, but the newly added exact_type() macro uses the BUILD_BUG_ON() macro to generate a build break when the types are different and can be used to detect

[PATCH v7 4/8] drm/i915: Check for integer truncation on scatterlist creation

2022-08-16 Thread Gwan-gyeong Mun
From: Chris Wilson There is an impedance mismatch between the scatterlist API using unsigned int and our memory/page accounting in unsigned long. That is we may try to create a scatterlist for a large object that overflows returning a small table into which we try to fit very many pages. As the

[PATCH v7 5/8] drm/i915: Check for integer truncation on the configuration of ttm place

2022-08-16 Thread Gwan-gyeong Mun
There is an impedance mismatch between the first/last valid page frame number of ttm place in unsigned and our memory/page accounting in unsigned long. As the object size is under the control of userspace, we have to be prudent and catch the conversion errors. To catch the implicit truncation as

[PATCH v7 8/8] drm/i915: Remove truncation warning for large objects

2022-08-16 Thread Gwan-gyeong Mun
From: Chris Wilson Having addressed the issues surrounding incorrect types for local variables and potential integer truncation in using the scatterlist API, we have closed all the loop holes we had previously identified with dangerously large object creation. As such, we can eliminate the

[PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-16 Thread Gwan-gyeong Mun
It moves overflows_type utility macro into overflow header from i915_utils header. The overflows_type can be used to catch the truncation between data types. And it adds safe_conversion() macro which performs a type conversion (cast) of an source value into a new variable, checking that the

[PATCH v7 3/8] drm/i915/gem: Typecheck page lookups

2022-08-16 Thread Gwan-gyeong Mun
From: Chris Wilson We need to check that we avoid integer overflows when looking up a page, and so fix all the instances where we have mistakenly used a plain integer instead of a more suitable long. Be pedantic and add integer typechecking to the lookup so that we can be sure that we are safe.

[PATCH v7 6/8] drm/i915: Check if the size is too big while creating shmem file

2022-08-16 Thread Gwan-gyeong Mun
The __shmem_file_setup() function returns -EINVAL if size is greater than MAX_LFS_FILESIZE. To handle the same error as other code that returns -E2BIG when the size is too large, it add a code that returns -E2BIG when the size is larger than the size that can be handled. v4: If BITS_PER_LONG is

[PATCH v7 0/8] Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation

2022-08-16 Thread Gwan-gyeong Mun
This patch series fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation, etc. We need to check that we avoid integer overflows when looking up a page, and so fix all the instances where we have mistakenly used a plain integer instead

[PATCH v7 7/8] drm/i915: Use error code as -E2BIG when the size of gem ttm object is too large

2022-08-16 Thread Gwan-gyeong Mun
The ttm_bo_init_reserved() functions returns -ENOSPC if the size is too big to add vma. The direct function that returns -ENOSPC is drm_mm_insert_node_in_range(). To handle the same error as other code returning -E2BIG when the size is too large, it converts return value to -E2BIG.

[PULL] drm-misc-fixes

2022-08-16 Thread Maxime Ripard
Hi Dave, Daniel, Here's the few patches that got stuck in drm-misc-fixes Maxime drm-misc-fixes-2022-08-16: One patch for imx/dcss to get rid of a warning message, one off-by-one fix and GA103 support for nouveau, a refcounting fix for meson, a NULL pointer dereference fix for ttm, a error check

Re: [PATCH v1 05/35] drm/connector: Add TV standard property

2022-08-16 Thread Maxime Ripard
On Tue, Aug 16, 2022 at 11:42:20AM +0200, Noralf Trønnes wrote: > > > Den 16.08.2022 10.26, skrev Maxime Ripard: > > Hi, > > > > On Mon, Aug 08, 2022 at 02:44:56PM +0200, Noralf Trønnes wrote: > >> Den 29.07.2022 18.34, skrev Maxime Ripard: > >>> The TV mode property has been around for a while

[PATCH] drm/display: Fix all occurences of the "the the" typo

2022-08-16 Thread Bo Liu
There is an unexpected word "the" in the file drm_dp_helper.c, fix it. Signed-off-by: Bo Liu --- drivers/gpu/drm/display/drm_dp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c index

[PATCH] drm/i915: Fix all occurences of the "the the" typo

2022-08-16 Thread Bo Liu
There is an unexpected word "the" in the file i915_irq.c, fix it. Signed-off-by: Bo Liu --- drivers/gpu/drm/i915/i915_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 73cebc6aa650..783a6ca41a61

Re: [PATCH 2/4] dt-bindings: display: sun6i-dsi: Add the A100 variant

2022-08-16 Thread Krzysztof Kozlowski
On 13/08/2022 01:58, Samuel Holland wrote: > Hi Krzysztof, > > On 8/12/22 5:49 AM, Krzysztof Kozlowski wrote: >> On 12/08/2022 10:42, Samuel Holland wrote: >>> The "40nm" MIPI DSI controller found in the A100 and D1 SoCs has the >>> same register layout as previous SoC integrations. However, its

[PATCH 2/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()

2022-08-16 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to XRGB2101010. Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 63 +++ 1 file changed, 63 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c

[PATCH 3/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_gray8()

2022-08-16 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to grayscale. Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 62 +++ 1 file changed, 62 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c

[PATCH 1/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb888()

2022-08-16 Thread José Expósito
Extend the existing test cases to test the conversion from XRGB to RGB888. Signed-off-by: José Expósito --- .../gpu/drm/tests/drm_format_helper_test.c| 65 +++ 1 file changed, 65 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c

[PATCH 0/3] KUnit tests for RGB888, XRGB2101010 and grayscale

2022-08-16 Thread José Expósito
Hello everyone, This series is a follow up on my work adding KUnit test to the XRGB conversion functions. This time RGB888, XRGB2101010 and gray8 are added. Best wishes, Jose José Expósito (3): drm/format-helper: Add KUnit tests for drm_fb_xrgb_to_rgb888() drm/format-helper: Add

Re: [PATCH v1 05/35] drm/connector: Add TV standard property

2022-08-16 Thread Maxime Ripard
Hi, On Mon, Aug 08, 2022 at 02:44:56PM +0200, Noralf Trønnes wrote: > Den 29.07.2022 18.34, skrev Maxime Ripard: > > The TV mode property has been around for a while now to select and get the > > current TV mode output on an analog TV connector. > > > > Despite that property name being generic,

Re: [PATCH v6 5/8] drm/i915: Check for integer truncation on the configuration of ttm place

2022-08-16 Thread Gwan-gyeong Mun
On 8/15/22 5:03 PM, Jani Nikula wrote: On Sat, 13 Aug 2022, Gwan-gyeong Mun wrote: There is an impedance mismatch between the first/last valid page frame number of ttm place in unsigned and our memory/page accounting in unsigned long. As the object size is under the control of userspace, we

Re: [PATCH 3/3] i915-pmu: Add extra check NULL

2022-08-16 Thread Jani Nikula
On Tue, 16 Aug 2022, Denis Arefev wrote: > Found by Linux Verification Center (linuxtesting.org) with SVACE. The subject prefix should be something along the lines of "drm/i915/pmu". The subject is misleading; there are no functional changes here, just whitespace changes. I'm guessing you

Re: [PATCH v2 1/6] drm/i2c/sil164: Drop no-op remove function

2022-08-16 Thread Wolfram Sang
On Mon, Aug 15, 2022 at 10:02:25AM +0200, Uwe Kleine-König wrote: > A remove callback that just returns 0 is equivalent to no callback at all > as can be seen in i2c_device_remove(). So simplify accordingly. > > Signed-off-by: Uwe Kleine-König Applied to an immutable branch, thanks!

Re: [PATCH v2 0/6] i2c: Make remove callback return void

2022-08-16 Thread Wolfram Sang
> As some conflicts are expected I sent this early after -rc1 such that it > can be included early into next and be put on an immutable branch for > subsystems to resolve merge conflicts. I pushed the series out now, so it should hit -next tomorrow. The immutable branch is here:

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-16 Thread Andy Shevchenko
On Tue, Aug 16, 2022 at 8:37 AM Laurent Pinchart wrote: > On Mon, Aug 15, 2022 at 01:58:55PM -0700, Stephen Boyd wrote: > > Quoting Laurent Pinchart (2022-08-15 11:52:36) > > > On Mon, Aug 15, 2022 at 05:33:06PM +0100, Mark Brown wrote: ... > > > we'll run into trouble. Supplying active high

Re: [PATCH v5 04/13] dt-bindings: memory-controllers: add canaan k210 sram controller

2022-08-16 Thread Krzysztof Kozlowski
On 06/07/2022 00:52, Conor Dooley wrote: > From: Conor Dooley > > The k210 U-Boot port has been using the clocks defined in the > devicetree to bring up the board's SRAM, but this violates the > dt-schema. As such, move the clocks to a dedicated node with > the same compatible string & document

[PATCH] MAINTAINERS: Update email of Neil Armstrong

2022-08-16 Thread Neil Armstrong
From: Neil Armstrong My professional e-mail will change and the BayLibre one will bounce after mid-september of 2022. This updates the MAINTAINERS file, the YAML bindings and adds an entry in the .mailmap file. Signed-off-by: Neil Armstrong --- .mailmap |

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-16 Thread Mark Brown
On Tue, Aug 16, 2022 at 07:56:06AM +0300, Matti Vaittinen wrote: > On 8/16/22 01:55, Mark Brown wrote: > > On Tue, Aug 16, 2022 at 12:17:17AM +0300, Laurent Pinchart wrote: > > > These devres helpers give > > > a false sense of security to driver authors and they will end up > > > introducing

Re: [RFC PATCH 02/14] drm/qaic: Add uapi and core driver file

2022-08-16 Thread Krzysztof Kozlowski
On 15/08/2022 21:42, Jeffrey Hugo wrote: > Add the QAIC driver uapi file and core driver file that binds to the PCIe > device. The core driver file also creates the drm device and manages all > the interconnections between the different parts of the driver. Thank you for your patch. There is

Re: [EXT] Re: [PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-16 Thread Olivier Masse
Hi Brian, On ven., 2022-08-12 at 17:39 +0100, Brian Starkey wrote: > Caution: EXT Email > > Hi, > > On Mon, Aug 08, 2022 at 02:39:53PM +, Olivier Masse wrote: > > Hi Brian, > > > > On ven., 2022-08-05 at 16:41 +0100, Brian Starkey wrote: > > > Caution: EXT Email > > > > > > Hi Olivier, >

Re: [PATCH v8 2/2] drm/gem: Don't map imported GEMs

2022-08-16 Thread Dmitry Osipenko
On 8/16/22 14:44, Dmitry Osipenko wrote: > On 8/12/22 18:01, Rob Clark wrote: >> On Fri, Aug 12, 2022 at 7:57 AM Rob Clark wrote: >>> >>> On Fri, Aug 12, 2022 at 4:26 AM Dmitry Osipenko >>> wrote: On 8/11/22 02:19, Rob Clark wrote: > On Wed, Aug 10, 2022 at 3:23 PM Dmitry Osipenko

Re: [PATCH v1 04/35] drm/modes: Introduce 480i and 576i modes

2022-08-16 Thread Maxime Ripard
On Tue, Aug 02, 2022 at 04:16:29PM +0200, Thomas Zimmermann wrote: > Hi > > Am 02.08.22 um 15:58 schrieb Jani Nikula: > > On Fri, 29 Jul 2022, Maxime Ripard wrote: > > > Multiple drivers (meson, vc4) define the analog TV 525-lines and 625-lines > > > modes in the drivers. > > > > > > Since

Re: [PATCH] drm/rockchip: vop2: Fix eDP/HDMI sync polarities

2022-08-16 Thread Michael Riesch
Hi Sascha, On 8/15/22 15:39, Sascha Hauer wrote: > The hsync/vsync polarities were not honoured for the eDP and HDMI ports. > Add the register settings to configure the polarities as requested by the > DRM_MODE_FLAG_PHSYNC/DRM_MODE_FLAG_PVSYNC flags. Amazingly enough it worked even without this

Re: [PATCH v1 07/35] drm/modes: Only consider bpp and refresh before options

2022-08-16 Thread Maxime Ripard
Hi Geert, Thanks for your review On Fri, Aug 12, 2022 at 03:25:39PM +0200, Geert Uytterhoeven wrote: > Hi Maxime, > > On Fri, Jul 29, 2022 at 6:35 PM Maxime Ripard wrote: > > Some video= options might have a value that contains a dash. However, the > > command line parsing mode considers all

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-16 Thread Mark Brown
On Tue, Aug 16, 2022 at 11:06:21AM +, Vaittinen, Matti wrote: > I wonder if writing such 'release callbacks' is compulsory? I mean, if I > was writing a driver to some new (to me) subsystem and was required to > write an explicit release-callback for a resource - then it'd surely > rang a

Re: [PATCH v8 2/2] drm/gem: Don't map imported GEMs

2022-08-16 Thread Dmitry Osipenko
On 8/12/22 18:01, Rob Clark wrote: > On Fri, Aug 12, 2022 at 7:57 AM Rob Clark wrote: >> >> On Fri, Aug 12, 2022 at 4:26 AM Dmitry Osipenko >> wrote: >>> >>> On 8/11/22 02:19, Rob Clark wrote: On Wed, Aug 10, 2022 at 3:23 PM Dmitry Osipenko wrote: > > On 8/11/22 01:03, Rob

Re: [PATCH v1 20/35] drm/vc4: vec: Switch for common modes

2022-08-16 Thread Maxime Ripard
Hi, On Fri, Jul 29, 2022 at 08:12:07PM +0200, Mateusz Kwiatkowski wrote: > I'm just noting that the modelines you defined in drm_modes.c are different > to the ones you're removing here. > > The horizontal sync differences probably doesn't matter too much, VC4 uses > those only as a hint anyway

Re: [PATCH v8 2/2] drm/gem: Don't map imported GEMs

2022-08-16 Thread Christian König
Am 16.08.22 um 13:44 schrieb Dmitry Osipenko: [SNIP] The other complication I noticed is that we don't seem to keep around the fd after importing to a GEM handle. And I could imagine that doing so could cause issues with too many fd's. So I guess the best thing is to keep the status quo and

Re: [PATCH v2 4/7] regulator: core: Allow specifying an initial load w/ the bulk API

2022-08-16 Thread Yongqin Liu
HI, Douglas With this change, I get one kernel panic with my hikey960 android-mainline based Android build, if it's reverted, then the build could boot to the home screen successfully. >From the log information I shared here, not sure if you have any idea what I could do to have the hikey960

Re: [PATCH v1 05/35] drm/connector: Add TV standard property

2022-08-16 Thread Maxime Ripard
Hi Geert, On Fri, Aug 12, 2022 at 03:25:18PM +0200, Geert Uytterhoeven wrote: > > --- a/drivers/gpu/drm/drm_connector.c > > +++ b/drivers/gpu/drm/drm_connector.c > > @@ -1649,11 +1650,40 @@ EXPORT_SYMBOL(drm_mode_create_tv_margin_properties); > > * 0 on success or a negative error code on

Re: [PATCH v1 04/35] drm/modes: Introduce 480i and 576i modes

2022-08-16 Thread Maxime Ripard
Hi Geert, On Fri, Aug 12, 2022 at 03:18:58PM +0200, Geert Uytterhoeven wrote: > Hi Maxime, > > Thanks for your patch! > > On Fri, Jul 29, 2022 at 6:35 PM Maxime Ripard wrote: > > Multiple drivers (meson, vc4) define the analog TV 525-lines and 625-lines > > modes in the drivers. > > Nit:

Re: [PATCH 3/5] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-16 Thread Nicolas Dufresne
Hi, Le mardi 02 août 2022 à 11:58 +0200, Olivier Masse a écrit : > add Linaro secure heap bindings: linaro,secure-heap Just a curiosity, how is this specific to Linaro OPTEE OS ? Shouldn't it be "de- linaro-ified" somehow ? regards, Nicolas > use genalloc to allocate/free buffer from buffer

Re: [PATCH v1 05/35] drm/connector: Add TV standard property

2022-08-16 Thread Geert Uytterhoeven
Hi Maxime, On Tue, Aug 16, 2022 at 3:20 PM Maxime Ripard wrote: > On Fri, Aug 12, 2022 at 03:25:18PM +0200, Geert Uytterhoeven wrote: > > > --- a/drivers/gpu/drm/drm_connector.c > > > +++ b/drivers/gpu/drm/drm_connector.c > > > @@ -1649,11 +1650,40 @@ > > >

Re: [PATCH 0/3] KUnit tests for RGB888, XRGB2101010 and grayscale

2022-08-16 Thread Maíra Canal
Hi José, Tested the whole series on UML, x86, i386 and PPC. All looks fine! Tested-by: Maíra Canal Best Regards, - Maíra Canal On 8/16/22 07:29, José Expósito wrote: Hello everyone, This series is a follow up on my work adding KUnit test to the XRGB conversion functions. This time

Re: [PATCH 4/4] drm/format-helper: Add drm_fb_build_fourcc_list() helper

2022-08-16 Thread Thomas Zimmermann
Hi Am 12.08.22 um 20:19 schrieb Sam Ravnborg: Hi Thomas, On Wed, Aug 10, 2022 at 01:20:53PM +0200, Thomas Zimmermann wrote: Add drm_fb_build_fourcc_list() function that builds a list of supported formats from native and emulated ones. Helpful for all drivers that do format conversion as part

Re: [PATCH v1 09/35] drm/modes: Move named modes parsing to a separate function

2022-08-16 Thread Maxime Ripard
On Fri, Aug 12, 2022 at 03:27:17PM +0200, Geert Uytterhoeven wrote: > Hi Maxime, > > On Fri, Jul 29, 2022 at 6:36 PM Maxime Ripard wrote: > > The current construction of the named mode parsing doesn't allow to extend > > it easily. Let's move it to a separate function so we can add more > >

[PATCH v4] drm/msm: Make .remove and .shutdown HW shutdown consistent

2022-08-16 Thread Javier Martinez Canillas
Drivers' .remove and .shutdown callbacks are executed on different code paths. The former is called when a device is removed from the bus, while the latter is called at system shutdown time to quiesce the device. This means that some overlap exists between the two, because both have to take care

[PATCH v2 0/4] drm/probe-helper, modes: Helpers for single-mode displays

2022-08-16 Thread Thomas Zimmermann
This patchset moves code from simpledrm to probe and display-mode helpers. The new functions will be useful for the upcoming driver for PowerPC displays. [1] Where possible, existing drivers are being converted to use them. v2: * replace 'static' and 'hw' naming with 'fixed' * use

[PATCH v2 3/4] drm/modes: Add initializer macro DRM_MODE_INIT()

2022-08-16 Thread Thomas Zimmermann
The macro DRM_MODE_INIT() initializes an instance of struct drm_display_mode with typical parameters. Convert simpledrm and also update the macro DRM_SIMPLE_MODE(). Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/tiny/simpledrm.c | 23 -

[PATCH v2 1/4] drm/probe-helper: Add drm_connector_helper_get_modes_fixed()

2022-08-16 Thread Thomas Zimmermann
Add drm_connector_helper_get_modes_fixed(), which duplicates a single display mode for a connector. Convert drivers. v2: * rename 'static' and 'hw' to 'fixed' everywhere * fix typo 'there' to 'their' (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg ---

[PATCH v2 2/4] drm/probe-helper: Add drm_crtc_helper_mode_valid_fixed()

2022-08-16 Thread Thomas Zimmermann
Add drm_crtc_helper_mode_valid_fixed(), which validates a given mode against a display hardware's mode. Convert simpledrm and use it in a few other drivers with static modes. v2: * rename 'static' and 'hw' to 'fixed' everywhere Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg

[PATCH v2 4/4] drm/format-helper: Add drm_fb_build_fourcc_list() helper

2022-08-16 Thread Thomas Zimmermann
Add drm_fb_build_fourcc_list() function that builds a list of supported formats from native and emulated ones. Helpful for all drivers that do format conversion as part of their plane updates. Update current caller. v2: * use u32 instead of uint32_t (Sam) * print a warning if

Re: [PATCH v1 34/35] drm/modes: Introduce the tv_mode property as a command-line option

2022-08-16 Thread Maxime Ripard
On Fri, Aug 12, 2022 at 03:31:19PM +0200, Geert Uytterhoeven wrote: > Hi Maxime, > > On Fri, Jul 29, 2022 at 6:37 PM Maxime Ripard wrote: > > Our new tv mode option allows to specify the TV mode from a property. > > However, it can still be useful, for example to avoid any boot time > >

Re: [PATCH 3/4] drm/udl: Kill pending URBs at suspend and disconnect

2022-08-16 Thread Takashi Iwai
On Tue, 09 Aug 2022 11:19:30 +0200, Takashi Iwai wrote: > > On Tue, 09 Aug 2022 11:13:46 +0200, > Thomas Zimmermann wrote: > > > > Hi > > > > Am 09.08.22 um 11:03 schrieb Takashi Iwai: > > > On Tue, 09 Aug 2022 09:41:19 +0200, > > > Thomas Zimmermann wrote: > > >> > > >> Hi > > >> > > >> Am

Re: [PATCH v8 2/2] drm/gem: Don't map imported GEMs

2022-08-16 Thread Rob Clark
On Tue, Aug 16, 2022 at 4:45 AM Dmitry Osipenko wrote: > > On 8/12/22 18:01, Rob Clark wrote: > > On Fri, Aug 12, 2022 at 7:57 AM Rob Clark wrote: > >> > >> On Fri, Aug 12, 2022 at 4:26 AM Dmitry Osipenko > >> wrote: > >>> > >>> On 8/11/22 02:19, Rob Clark wrote: > On Wed, Aug 10, 2022 at

Re: [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported

2022-08-16 Thread Kai-Heng Feng
On Wed, Aug 17, 2022 at 2:24 AM Lyude Paul wrote: > > On Tue, 2022-08-16 at 19:29 +0800, Kai-Heng Feng wrote: > > On Tue, Aug 16, 2022 at 4:06 PM Jani Nikula > > wrote: > > > > > > On Tue, 16 Aug 2022, Kai-Heng Feng wrote: > > > > On mobile workstations like HP ZBook Fury G8, iGFX's DP-IN can

Re: [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported

2022-08-16 Thread Kai-Heng Feng
On Wed, Aug 17, 2022 at 2:36 AM Lyude Paul wrote: > > On Tue, 2022-08-16 at 14:24 -0400, Lyude Paul wrote: > > On Tue, 2022-08-16 at 19:29 +0800, Kai-Heng Feng wrote: > > > On Tue, Aug 16, 2022 at 4:06 PM Jani Nikula > > > wrote: > > > > > > > > On Tue, 16 Aug 2022, Kai-Heng Feng wrote: > > >

Re: [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported

2022-08-16 Thread Kai-Heng Feng
On Wed, Aug 17, 2022 at 2:50 AM Karol Herbst wrote: > > On Tue, Aug 16, 2022 at 4:53 AM Kai-Heng Feng > wrote: > > > > On mobile workstations like HP ZBook Fury G8, iGFX's DP-IN can switch to > > dGFX so external monitors are routed to dGFX, and more monitors can be > > supported as result. > >

[PATCH libdrm v3 0/2] Add Writeback Support for Modetest

2022-08-16 Thread Jessica Zhang
Add writeback support to modetest with the below options: - Passing in -c will now also show the writeback connector - Test a built-in mode on writeback connector - Test a custom mode from user input on writeback connector Usage: "./modetest -M msm -x : -a -P @:+0+0@RG24." Refer

Re: [PATCH] drm/i915/guc: skip scrub_ctbs selftest if reset is disabled

2022-08-16 Thread John Harrison
On 7/8/2022 15:41, Daniele Ceraolo Spurio wrote: The test needs GT reset to trigger the scrubbing logic, so we can only run it when reset is enabled. Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Matthew Brost Reviewed-by: John Harrison ---

Re: build failure of next-20220811 due to b1a63a0b48ad ("drm/amd/display: consider DSC pass-through during mode validation")

2022-08-16 Thread Stephen Rothwell
Hi all, On Fri, 12 Aug 2022 09:07:31 +1000 Stephen Rothwell wrote: > > On Thu, 11 Aug 2022 18:10:48 +0100 "Sudip Mukherjee (Codethink)" > wrote: > > > > Not sure if it has been reported, builds of riscv, alpha, s390, arm, > > arm64, xtensa, mips, csky allmodconfig have failed to build

Re: [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported

2022-08-16 Thread Kai-Heng Feng
On Wed, Aug 17, 2022 at 9:49 AM Karol Herbst wrote: > > On Wed, Aug 17, 2022 at 3:18 AM Kai-Heng Feng > wrote: > > > > On Wed, Aug 17, 2022 at 2:50 AM Karol Herbst wrote: > > > > > > On Tue, Aug 16, 2022 at 4:53 AM Kai-Heng Feng > > > wrote: > > > > > > > > On mobile workstations like HP ZBook

Re: [PATCH 3/3] drm: omapdrm: Do no allocate non-scanout GEMs through DMM/TILER

2022-08-16 Thread Yongqin Liu
Hi, Ivaylo On Mon, 15 Aug 2022 at 14:23, Ivaylo Dimitrov wrote: > > Hi Liu, > > On 14.08.22 г. 17:27 ч., Yongqin Liu wrote: > > Hi, IvayIo > > > > Thanks very much for the reply! > > > > On Sat, 13 Aug 2022 at 14:58, Ivaylo Dimitrov > > wrote: > >> > >> Hi Liu, > >> > >> On 12.08.22 г. 7:35 ч.,

Re: [Intel-gfx] [PATCH v2 2/2] drm/i915/dg2: Add additional tuning settings

2022-08-16 Thread Lucas De Marchi
On Tue, Aug 16, 2022 at 02:06:01PM -0700, Matt Roper wrote: Some additional MMIO tuning settings have appeared in the bspec's performance tuning guide section. One of the tuning settings here is also documented as formal workaround Wa_22012654132 for some steppings of DG2. However the tuning

Re: [RFC PATCH 02/14] drm/qaic: Add uapi and core driver file

2022-08-16 Thread Krzysztof Kozlowski
On 16/08/2022 21:22, Jeffrey Hugo wrote: > + if (datapath_polling) { > + poll_datapath = true; > + pr_info("qaic: driver initializing in datapath polling mode\n"); No pr() in normal path of init/exit. >>> >>> This is not the normal path. datapath_polling is a

[PATCH v2 2/2] drm/i915/dg2: Add additional tuning settings

2022-08-16 Thread Matt Roper
Some additional MMIO tuning settings have appeared in the bspec's performance tuning guide section. One of the tuning settings here is also documented as formal workaround Wa_22012654132 for some steppings of DG2. However the tuning setting applies to all DG2 variants and steppings, making it a

Re: [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported

2022-08-16 Thread Karol Herbst
On Wed, Aug 17, 2022 at 3:18 AM Kai-Heng Feng wrote: > > On Wed, Aug 17, 2022 at 2:50 AM Karol Herbst wrote: > > > > On Tue, Aug 16, 2022 at 4:53 AM Kai-Heng Feng > > wrote: > > > > > > On mobile workstations like HP ZBook Fury G8, iGFX's DP-IN can switch to > > > dGFX so external monitors are

RE: [Intel-gfx] [RFC 1/1] drm/i915/dgfx: Avoid parent bridge rpm on mmap mappings

2022-08-16 Thread Gupta, Anshuman
> -Original Message- > From: Vivi, Rodrigo > Sent: Tuesday, August 9, 2022 8:36 PM > To: Gupta, Anshuman > Cc: intel-...@lists.freedesktop.org; dan...@ffwll.ch; Wilson, Chris P > ; dri-devel@lists.freedesktop.org > Subject: Re: [Intel-gfx] [RFC 1/1] drm/i915/dgfx: Avoid parent bridge

GPU device resource reservations with cgroups?

2022-08-16 Thread Jeffrey Hugo
Hello cgroup experts, I have a GPU device [1] that supports organizing its resources for the purposes of supporting containers. I am attempting to determine how to represent this in the upstream kernel, and I wonder if it fits in cgroups. The device itself has a number of resource types –

Re: [PATCH] drm/amdgpu: Fix use-after-free on amdgpu_bo_list mutex

2022-08-16 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Aug 15, 2022 at 10:56 AM Melissa Wen wrote: > > On 08/15, Maíra Canal wrote: > > If amdgpu_cs_vm_handling returns r != 0, then it will unlock the > > bo_list_mutex inside the function amdgpu_cs_vm_handling and again on > > amdgpu_cs_parser_fini. This problem

drm warning with mainline due to 467e30171b5b ("drm/vc4: hdmi: Move HDMI reset to pm_resume")

2022-08-16 Thread Sudip Mukherjee (Codethink)
Hi All, Not sure if it has been reported but the mainline kernel shows a drm warning on RPI4B. [ 14.821276] WARNING: CPU: 3 PID: 187 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:487 vc5_hdmi_reset+0x1f8/0x240 [vc4] [ 14.837288] Modules linked in: hci_uart btqca btrtl btbcm btintel btsdio(+)

[PATCH 2/3] iommu/dma: Move public interfaces to linux/iommu.h

2022-08-16 Thread Robin Murphy
The iommu-dma layer is now mostly encapsulated by iommu_dma_ops, with only a couple more public interfaces left pertaining to MSI integration. Since these depend on the main IOMMU API header anyway, move their declarations there, taking the opportunity to update the half-baked comments to proper

[PATCH 1/3] iommu/dma: Clean up Kconfig

2022-08-16 Thread Robin Murphy
Although iommu-dma is a per-architecture chonce, that is currently implemented in a rather haphazard way. Selecting from the arch Kconfig was the original logical approach, but is complicated by having to manage dependencies; conversely, selecting from drivers ends up hiding the architecture

[PATCH 0/3] iommu/dma: Some housekeeping

2022-08-16 Thread Robin Murphy
Hi All, It's been a while now since iommu-dma grew from a library of DMA ops helpers for arch code into something more abstracted and closely coupled to the IOMMU API core, so it seemed about time to do some housekeeping in the more neglected areas to reflect that. The header reorganisation does

[PATCH 1/2] drm/i915/uc: Support for version reduced and multiple firmware files

2022-08-16 Thread John . C . Harrison
From: John Harrison There was a misunderstanding in how firmware file compatibility should be managed within i915. This has been clarified as: i915 must support all existing firmware releases forever new minor firmware releases should replace prior versions only backwards compatibility

[PATCH 2/2] drm/i915/uc: Enable version reduced firmware files for newest platforms

2022-08-16 Thread John . C . Harrison
From: John Harrison Going forwards, the intention is for GuC firmware files to be named for their major version only and HuC firmware files to have no version number in the name at all. This patch adds those entries for DG2 and ADL-P/S. Signed-off-by: John Harrison ---

Re: [PATCH v2 1/3] dma-buf: Add ioctl to query mmap coherency/cache info

2022-08-16 Thread Rob Clark
On Tue, Aug 16, 2022 at 1:27 AM Christian König wrote: > > Am 15.08.22 um 23:15 schrieb Rob Clark: > > From: Rob Clark > > > > This is a fairly narrowly focused interface, providing a way for a VMM > > in userspace to tell the guest kernel what pgprot settings to use when > > mapping a buffer to

Re: [PATCH v2 1/3] dma-buf: Add ioctl to query mmap coherency/cache info

2022-08-16 Thread Christian König
Am 16.08.22 um 16:26 schrieb Rob Clark: On Tue, Aug 16, 2022 at 1:27 AM Christian König wrote: Am 15.08.22 um 23:15 schrieb Rob Clark: From: Rob Clark This is a fairly narrowly focused interface, providing a way for a VMM in userspace to tell the guest kernel what pgprot settings to use

Re: [PATCH v2 1/3] dma-buf: Add ioctl to query mmap coherency/cache info

2022-08-16 Thread Rob Clark
On Tue, Aug 16, 2022 at 9:51 AM Christian König wrote: > > Am 16.08.22 um 16:26 schrieb Rob Clark: > > On Tue, Aug 16, 2022 at 1:27 AM Christian König > > wrote: > >> Am 15.08.22 um 23:15 schrieb Rob Clark: > >>> From: Rob Clark > >>> > >>> This is a fairly narrowly focused interface, providing

Re: [RFC PATCH 02/14] drm/qaic: Add uapi and core driver file

2022-08-16 Thread Jeffrey Hugo
On 8/16/2022 12:00 PM, Krzysztof Kozlowski wrote: On 16/08/2022 20:47, Jeffrey Hugo wrote: +static int qaic_pci_probe(struct pci_dev *pdev, + const struct pci_device_id *id) +{ + int ret; + int i; + int mhi_irq; + struct qaic_device *qdev; + +

Re: [PATCH v8 2/2] drm/gem: Don't map imported GEMs

2022-08-16 Thread Dmitry Osipenko
On 8/16/22 15:03, Christian König wrote: > Am 16.08.22 um 13:44 schrieb Dmitry Osipenko: >> [SNIP] >>> The other complication I noticed is that we don't seem to keep around >>> the fd after importing to a GEM handle.  And I could imagine that >>> doing so could cause issues with too many fd's.  So

Re: [PATCH v1 09/35] drm/modes: Move named modes parsing to a separate function

2022-08-16 Thread Geert Uytterhoeven
Hi Maxime, On Tue, Aug 16, 2022 at 3:46 PM Maxime Ripard wrote: > On Fri, Aug 12, 2022 at 03:27:17PM +0200, Geert Uytterhoeven wrote: > > On Fri, Jul 29, 2022 at 6:36 PM Maxime Ripard wrote: > > > The current construction of the named mode parsing doesn't allow to extend > > > it easily. Let's

Re: [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported

2022-08-16 Thread Lyude Paul
On Tue, 2022-08-16 at 19:29 +0800, Kai-Heng Feng wrote: > On Tue, Aug 16, 2022 at 4:06 PM Jani Nikula > wrote: > > > > On Tue, 16 Aug 2022, Kai-Heng Feng wrote: > > > On mobile workstations like HP ZBook Fury G8, iGFX's DP-IN can switch to > > > dGFX so external monitors are routed to dGFX,

Re: [PATCH 3/4] drm/udl: Kill pending URBs at suspend and disconnect

2022-08-16 Thread Thomas Zimmermann
Hi Takashi Am 16.08.22 um 15:55 schrieb Takashi Iwai: On Tue, 09 Aug 2022 11:19:30 +0200, Takashi Iwai wrote: On Tue, 09 Aug 2022 11:13:46 +0200, Thomas Zimmermann wrote: Hi Am 09.08.22 um 11:03 schrieb Takashi Iwai: On Tue, 09 Aug 2022 09:41:19 +0200, Thomas Zimmermann wrote: Hi Am

[PATCH v6] drm: Add initial ci/ subdirectory

2022-08-16 Thread Tomeu Vizoso
And use it to store expectations about what the DRM drivers are supposed to pass in the IGT test suite. Also include a configuration file that points to the out-of-tree CI scripts. By storing the test expectations along the code we can make sure both stay in sync with each other, and so we can

[PATCH 08/12] drm/udl: Drop unneeded alignment

2022-08-16 Thread Takashi Iwai
The alignment of damaged area was needed for the original udlfb driver that tried to trim the superfluous copies between front and backend buffers and handle data in long int. It's not the case for udl DRM driver, hence we can omit the whole unneeded alignment, as well as the dead code.

[PATCH 12/12] drm/udl: Sync pending URBs at the end of suspend

2022-08-16 Thread Takashi Iwai
It's better to perform the sync at the very last of the suspend instead of the pipe-disable function, so that we can catch all pending URBs (if any). While we're at it, drop the error code from udl_sync_pending_urb() since we basically ignore it; instead, give a clear error message indicating a

Re: [PATCH v7 06/13] dt-bindings: mfd: Add MediaTek MT6370

2022-08-16 Thread Rob Herring
On Tue, Aug 9, 2022 at 7:14 AM Lee Jones wrote: > > On Fri, 05 Aug 2022, ChiaEn Wu wrote: > > > From: ChiYuan Huang > > > > Add MediaTek MT6370 binding documentation. > > > > Reviewed-by: Krzysztof Kozlowski > > Signed-off-by: ChiYuan Huang > > Signed-off-by: ChiaEn Wu > > --- > >

[PATCH 07/12] drm/udl: Add parameter to set number of URBs

2022-08-16 Thread Takashi Iwai
From: Thomas Zimmermann For further debugging and optimization purpose, allow users to adjust the number of URBs via a new module parameter, numurbs. Signed-off-by: Thomas Zimmermann Signed-off-by: Takashi Iwai --- drivers/gpu/drm/udl/udl_main.c | 9 - 1 file changed, 8

[PATCH 09/12] drm/udl: Fix potential URB leaks

2022-08-16 Thread Takashi Iwai
A couple of error handlings forgot to process the URB completion. Those are both with WARN_ON() so should be visible, but we must fix them in anyway. Fixes: 7350b2a3fbc6 ("drm/udl: Replace BUG_ON() with WARN_ON()") Signed-off-by: Takashi Iwai --- drivers/gpu/drm/udl/udl_main.c | 8 +---

Re: [PATCH 3/4] drm/udl: Kill pending URBs at suspend and disconnect

2022-08-16 Thread Takashi Iwai
On Tue, 16 Aug 2022 16:01:34 +0200, Thomas Zimmermann wrote: > > Hi Takashi > > Am 16.08.22 um 15:55 schrieb Takashi Iwai: > > On Tue, 09 Aug 2022 11:19:30 +0200, > > Takashi Iwai wrote: > >> > >> On Tue, 09 Aug 2022 11:13:46 +0200, > >> Thomas Zimmermann wrote: > >>> > >>> Hi > >>> > >>> Am

[PATCH 10/12] drm/udl: Fix inconsistent urbs.count value during udl_free_urb_list()

2022-08-16 Thread Takashi Iwai
In the current design, udl_get_urb() may be called asynchronously during the driver freeing its URL list via udl_free_urb_list(). The problem is that the sync is determined by comparing the urbs.count and urbs.available fields, while we clear urbs.count field only once after udl_free_urb_list()

[PATCH 06/12] drm/udl: Increase the default URB list size to 20

2022-08-16 Thread Takashi Iwai
It seems that the current size (4) for the URB list is too small on some devices, and it resulted in the occasional stalls. Increase the default URB list size to 20 for working around it. Signed-off-by: Takashi Iwai --- drivers/gpu/drm/udl/udl_main.c | 2 +- 1 file changed, 1 insertion(+), 1

  1   2   >