Re: [PATCH v2] drm: fix indirect goto into statement expression UB

2023-07-31 Thread Boris Brezillon
On Fri, 28 Jul 2023 10:17:57 -0700 Nathan Chancellor wrote: > + people from trailers of 09593216bff1 > > On Thu, Jul 27, 2023 at 03:50:58PM -0700, ndesaulni...@google.com wrote: > > A new diagnostic in clang-17 now produces the following build error: > > > > drivers/gpu/drm/tests/drm_exec_test.

[PATCH] fbdev/amifb: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper

2023-07-31 Thread Atul Raut
Replacing zero-length arrays with C99 flexible-array members because they are deprecated. Use the new DECLARE_FLEX_ARRAY() auxiliary macro instead of defining a zero-length array. This fixes warnings such as: ./drivers/video/fbdev/amifb.c:690:6-10: WARNING use flexible-array member instead (http

[PATCH v2 0/3] drm/display: simplify support for transparent DRM bridges

2023-07-31 Thread Dmitry Baryshkov
Supporting DP/USB-C can result in a chain of several transparent bridges (PHY, redrivers, mux, etc). This results in drivers having similar boilerplate code for such bridges. Next, these drivers are susceptible to -EPROBE_DEFER loops: the next bridge can either be probed from the bridge->attach ca

[PATCH v2 3/3] usb: typec: nb7vpq904m: switch to DRM_SIMPLE_BRIDGE

2023-07-31 Thread Dmitry Baryshkov
Switch to using the new DRM_SIMPLE_BRIDGE helper to create the transparent DRM bridge device instead of handcoding corresponding functionality. Signed-off-by: Dmitry Baryshkov --- drivers/usb/typec/mux/Kconfig | 2 +- drivers/usb/typec/mux/nb7vpq904m.c | 44 ++

[PATCH v2 2/3] phy: qcom: qmp-combo: switch to DRM_SIMPLE_BRIDGE

2023-07-31 Thread Dmitry Baryshkov
Switch to using the new DRM_SIMPLE_BRIDGE helper to create the transparent DRM bridge device instead of handcoding corresponding functionality. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/Kconfig | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 44 ++

[PATCH v2 1/3] drm/display: add transparent bridge helper

2023-07-31 Thread Dmitry Baryshkov
Define a helper for creating simple transparent bridges which serve the only purpose of linking devices into the bridge chain up to the last bridge representing the connector. This is especially useful for DP/USB-C bridge chains, which can span across several devices, but do not require any additio

Re: [RFC PATCH 06/10] drm/sched: Submit job before starting TDR

2023-07-31 Thread Boris Brezillon
+the PVR devs On Mon, 31 Jul 2023 01:00:59 + Matthew Brost wrote: > On Thu, May 04, 2023 at 01:23:05AM -0400, Luben Tuikov wrote: > > On 2023-04-03 20:22, Matthew Brost wrote: > > > If the TDR is set to a value, it can fire before a job is submitted in > > > drm_sched_main. The job should

Re: [PATCH 3/4] fbdev: Use _DMAMEM_ infix for DMA-memory helpers

2023-07-31 Thread Thomas Zimmermann
Hi Am 30.07.23 um 18:20 schrieb Helge Deller: On 7/29/23 21:26, Thomas Zimmermann wrote: Change the infix for fbdev's DMA-memory helpers from _DMA_ to _DMAMEM_. The helpers perform operations within DMA-able memory, Since "DMA" stands for "Direct Memory Access", people already know that it op

Re: [PATCH v10] drm: Add initial ci/ subdirectory

2023-07-31 Thread Juan A.
On Sat, 2023-07-29 at 12:08 +0300, David Heidelberg wrote: > Hello Maira, > > Regarding the second question about V3D and V3DV: in the Mesa3D CI, > we > currently use downstream kernels, so we don't build the kernel for > Raspberry Pi. > > > BM_BOOTFS option can point to a link tarball conta

Re: [PATCH v2] drm/mediatek: Add valid modifier check

2023-07-31 Thread Chen-Yu Tsai
On Thu, Jul 27, 2023 at 11:04 AM CK Hu (胡俊光) wrote: > > Hi, Justin: > > On Wed, 2023-07-26 at 15:52 -0400, Justin Green wrote: > > > > External email : Please do not click links or open attachments until > > you have verified the sender or the content. > > Add a check to mtk_drm_mode_fb_create()

Re: [PATCH RESEND v6 03/11] drm/mediatek: gamma: Support SoC specific LUT size

2023-07-31 Thread 胡俊光

Re: [PATCH 3/4] fbdev: Use _DMAMEM_ infix for DMA-memory helpers

2023-07-31 Thread Helge Deller
On 7/31/23 09:30, Thomas Zimmermann wrote: Hi Am 30.07.23 um 18:20 schrieb Helge Deller: On 7/29/23 21:26, Thomas Zimmermann wrote: Change the infix for fbdev's DMA-memory helpers from _DMA_ to _DMAMEM_. The helpers perform operations within DMA-able memory, Since "DMA" stands for "Direct Me

[PATCH] drm/ssd130x: clean up some inconsistent indenting

2023-07-31 Thread Jiapeng Chong
No functional modification involved. drivers/gpu/drm/solomon/ssd130x.c:715 ssd130x_primary_plane_duplicate_state() warn: inconsistent indenting. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6034 Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/solomon/ssd130

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

2023-07-31 Thread Christian König
Am 21.07.23 um 12:33 schrieb Asahi Lina: [SNIP] I've already tried to explain the issue. The DRM scheduler design, as it stands today, makes it impractical to write a safe Rust abstraction for it. This is a fact. Christian has repeatedly NAKed my attempts at changing it to make such a safe a

Re: [PATCH] drm/ssd130x: clean up some inconsistent indenting

2023-07-31 Thread Javier Martinez Canillas
Jiapeng Chong writes: Hello Jiapeng, Thanks for your patch. > No functional modification involved. > > drivers/gpu/drm/solomon/ssd130x.c:715 ssd130x_primary_plane_duplicate_state() > warn: inconsistent indenting. > > Reported-by: Abaci Robot Interesting that checkpatch didn't catch this, eve

Re: [PATCH v7 2/4] drm/mediatek: Fix using wrong drm private data to bind mediatek-drm

2023-07-31 Thread 林睿祥

Re: [PATCH v7 2/4] drm/mediatek: Fix using wrong drm private data to bind mediatek-drm

2023-07-31 Thread Eugen Hristev
On 7/31/23 11:21, Jason-JH Lin (林睿祥) wrote: Hi Eugen, Thanks for the reviews. On Fri, 2023-07-28 at 11:47 +0300, Eugen Hristev wrote: Hi, On 7/27/23 19:41, Jason-JH.Lin wrote: Add checking the length of each data path before assigning drm private data into all_drm_priv array. Fixes: 1ef7ed4

[PATCH] drm/amd/display: check attr flag before set cursor degamma on DCN3+

2023-07-31 Thread Melissa Wen
Don't set predefined degamma curve to cursor plane if the cursor attribute flag is not set. Applying a degamma curve to the cursor by default breaks userspace expectation. Checking the flag before performing any color transformation prevents too dark cursor gamma in DCN3+ on many Linux desktop envi

Re: [PATCH -next v3] drm/bridge: fix -Wunused-const-variable= warning

2023-07-31 Thread Robert Foss
On Mon, 31 Jul 2023 10:13:45 +0800, Zhu Wang wrote: > When building with W=1, the following warning occurs. > > drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c:48:17: warning: > ‘anx781x_i2c_addresses’ defined but not used [-Wunused-const-variable=] > static const u8 anx781x_i2c_addresses[]

[PATCH] drm/amd/pm: Clean up errors in smu_v11_0_pptable.h

2023-07-31 Thread Ran Sun
Fix the following errors reported by checkpatch: ERROR: trailing whitespace ERROR: open brace '{' following struct go on the same line ERROR: code indent should use tabs where possible Signed-off-by: Ran Sun --- .../gpu/drm/amd/pm/swsmu/inc/smu_v11_0_pptable.h | 15 ++- 1 file chan

[PATCH] drm/amd/pm: Clean up errors in amdgpu_smu.h

2023-07-31 Thread Ran Sun
Fix the following errors reported by checkpatch: ERROR: open brace '{' following enum go on the same line ERROR: open brace '{' following struct go on the same line Signed-off-by: Ran Sun --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 36 +++ 1 file changed, 12 insertions(+

Re: [PATCH v7 3/4] drm/mediatek: Add ability to support dynamic connector selection

2023-07-31 Thread 林睿祥

Re: [PATCH] drm/ioctl: turn on -Woverride-init for IOCTL table

2023-07-31 Thread Jani Nikula
On Thu, 20 Jul 2023, Simon Ser wrote: > Recently two patches [1] [2] have hit a case of mistakenly picking > an IOCTL number which was already in-use. This is hard to debug > because the last definition wins and there is no indication that > there is a conflict. > > Fix this by enabling -Werror=ov

Re: [PATCH v2] drm: fix indirect goto into statement expression UB

2023-07-31 Thread Christian König
Am 31.07.23 um 09:03 schrieb Boris Brezillon: On Fri, 28 Jul 2023 10:17:57 -0700 Nathan Chancellor wrote: + people from trailers of 09593216bff1 On Thu, Jul 27, 2023 at 03:50:58PM -0700, ndesaulni...@google.com wrote: A new diagnostic in clang-17 now produces the following build error: driv

Re: [PATCH v2 3/3] usb: typec: nb7vpq904m: switch to DRM_SIMPLE_BRIDGE

2023-07-31 Thread kernel test robot
Hi Dmitry, kernel test robot noticed the following build errors: [auto build test ERROR on drm-misc/drm-misc-next] [also build test ERROR on usb/usb-testing usb/usb-next usb/usb-linus drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.5-rc4 next-20230731] [cannot apply to drm-intel

Re: [PATCH] drm/i915: fix application of sizeof to pointer

2023-07-31 Thread Jani Nikula
On Thu, 20 Jul 2023, sunran...@208suo.com wrote: > The coccinelle check report: > ./drivers/scsi/csiostor/csio_mb.c:1554:46-52: ERROR: application > of sizeof to pointer Please don't just assume coccinelle is right, and send "fixes" based on the cocci reports alone. You need to read and understand

Re: [PATCH v7 3/4] drm/mediatek: Add ability to support dynamic connector selection

2023-07-31 Thread 林睿祥

Re: [PATCH v7 3/4] drm/mediatek: Add ability to support dynamic connector selection

2023-07-31 Thread 胡俊光

Re: [PATCH RESEND v6 09/11] drm/mediatek: gamma: Add support for 12-bit LUT and MT8195

2023-07-31 Thread AngeloGioacchino Del Regno
Il 28/07/23 14:58, Alexandre Mergnat ha scritto: Hi Angelo On 27/07/2023 15:06, AngeloGioacchino Del Regno wrote: +/* For 10 bit LUT layout, R/G/B are in the same register */   #define DISP_GAMMA_LUT_10BIT_R    GENMASK(29, 20)   #define DISP_GAMMA_LUT_10BIT_G    GENMASK(19, 10)

Re: [PATCH v3 1/1] drm/i915: Move abs_diff() to math.h

2023-07-31 Thread Jani Nikula
On Mon, 24 Jul 2023, Andy Shevchenko wrote: > abs_diff() belongs to math.h. Move it there. > This will allow others to use it. > > Signed-off-by: Andy Shevchenko > Reviewed-by: Jiri Slaby # tty/serial > --- > v3: added tag (Jiri), removed space after a cast (fdo CI) > drivers/gpu/drm/i915/displ

Re: [PATCH v3] drm/i915: Fix premature release of request's reusable memory

2023-07-31 Thread Andi Shyti
Hi Janusz, On Thu, Jul 20, 2023 at 11:35:44AM +0200, Janusz Krzysztofik wrote: > Infinite waits for completion of GPU activity have been observed in CI, > mostly inside __i915_active_wait(), triggered by igt@gem_barrier_race or > igt@perf@stress-open-close. Root cause analysis, based of ftrace du

Re: [PATCH RESEND v6 03/11] drm/mediatek: gamma: Support SoC specific LUT size

2023-07-31 Thread AngeloGioacchino Del Regno
Il 31/07/23 09:49, CK Hu (胡俊光) ha scritto: Hi, Angelo: On Thu, 2023-07-27 at 11:46 +0200, AngeloGioacchino Del Regno wrote: Newer SoCs support a bigger Gamma LUT table: wire up a callback to retrieve the correct LUT size for each different Gamma IP. Co-developed-by: Jason-JH.Lin Signed-off-by

[PATCH 05/14] dt-bindings: display: rockchip-vop: Document rv1126 vop

2023-07-31 Thread Jagan Teki
Document the VOP for Rockchip RV1126. Signed-off-by: Jagan Teki --- Cc: dri-devel@lists.freedesktop.org Cc: devicet...@vger.kernel.org Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: Sandy Huang Cc: David Airlie Cc: Daniel Vetter .../devicetree/bindings/display/rockchip/rockc

[PATCH 06/14] drm/rockchip: vop: Add rv1126 vop_lite support

2023-07-31 Thread Jagan Teki
RV1126 VOP_LITE supports the video output processing ofMIPI DSI, RGB display interfaces with max output resolution of 1920x1080. Add support for rv1126 vop. Signed-off-by: Jagan Teki --- Cc: dri-devel@lists.freedesktop.org Cc: Sandy Huang Cc: David Airlie Cc: Daniel Vetter drivers/gpu/drm/r

[PATCH 07/14] dt-bindings: display: rockchip-dw-mipi-dsi: Document rv1126 DSI

2023-07-31 Thread Jagan Teki
Document the MIPI DSI for Rockchip RV1126. Signed-off-by: Jagan Teki --- Cc: dri-devel@lists.freedesktop.org Cc: devicet...@vger.kernel.org Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: Sandy Huang Cc: David Airlie Cc: Daniel Vetter .../bindings/display/rockchip/rockchip,dw

[PATCH 08/14] drm/rockchip: dsi: Add rv1126 MIPI DSI support

2023-07-31 Thread Jagan Teki
RV1126 MIPI DSI supports V1.2 DPHY with 4 lanes and 1Gbps transfer rate for lane. Add support for it. Signed-off-by: Jagan Teki --- Cc: dri-devel@lists.freedesktop.org Cc: Sandy Huang Cc: David Airlie Cc: Daniel Vetter .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 20 +++

Re: [PATCH] drm/i915: Replace i915->gt0 with to_gt(i915)

2023-07-31 Thread Jani Nikula
On Tue, 25 Jul 2023, Andi Shyti wrote: > Quite surprised to see that around i915 there are still i915->gt0 > references. Replace them with the to_gt() helper. Please remind me why we still have i915->gt0 at all. Why aren't we just using i915->gt[0] instead? BR, Jani. > > Signed-off-by: Andi Shy

Re: [PATCH v2] drm/bridge: Add debugfs print for bridge chains

2023-07-31 Thread Tomi Valkeinen
On 25/07/2023 14:37, Laurent Pinchart wrote: Hi Tomi, Thank you for the patch. On Fri, Jul 21, 2023 at 06:01:39PM +0300, Tomi Valkeinen wrote: DRM bridges are not visible to the userspace and it may not be immediately clear if the chain is somehow constructed incorrectly. I have had two separa

Re: [v3 2/3] ASoC: mediatek: mt8186: correct the HDMI widgets

2023-07-31 Thread Mark Brown
On Mon, Jul 31, 2023 at 02:08:02AM +0800, Jiaxin Yu wrote: > Use SND_SOC_DAPM_LINE instead of SND_SOC_DAPM_OUTPUT to trigger > DAPM events to hdmi-codec when userspace control the DPAM pin. Why? signature.asc Description: PGP signature

Re: [PATCH RESEND v6 09/11] drm/mediatek: gamma: Add support for 12-bit LUT and MT8195

2023-07-31 Thread Alexandre Mergnat
On 31/07/2023 12:27, AngeloGioacchino Del Regno wrote: Il 28/07/23 14:58, Alexandre Mergnat ha scritto: Hi Angelo On 27/07/2023 15:06, AngeloGioacchino Del Regno wrote: +/* For 10 bit LUT layout, R/G/B are in the same register */   #define DISP_GAMMA_LUT_10BIT_R    GENMASK(29, 20)  

Re: [PATCH drm-misc-next v8 01/12] drm: manager to keep track of GPUs VA mappings

2023-07-31 Thread Maxime Ripard
Hi Boris, On Fri, Jul 28, 2023 at 02:26:12PM +0200, Boris Brezillon wrote: > On Fri, 28 Jul 2023 13:31:36 +0200 > Maxime Ripard wrote: > > > Hi Danilo, > > > > On Thu, Jul 20, 2023 at 02:14:22AM +0200, Danilo Krummrich wrote: > > > Add infrastructure to keep track of GPU virtual address (VA) ma

Re: [PATCH RESEND v6 03/11] drm/mediatek: gamma: Support SoC specific LUT size

2023-07-31 Thread AngeloGioacchino Del Regno
Il 31/07/23 12:40, AngeloGioacchino Del Regno ha scritto: Il 31/07/23 09:49, CK Hu (胡俊光) ha scritto: Hi, Angelo: On Thu, 2023-07-27 at 11:46 +0200, AngeloGioacchino Del Regno wrote: Newer SoCs support a bigger Gamma LUT table: wire up a callback to retrieve the correct LUT size for each differ

[PATCH v3] drm/bridge: Add debugfs print for bridge chains

2023-07-31 Thread Tomi Valkeinen
DRM bridges are not visible to the userspace and it may not be immediately clear if the chain is somehow constructed incorrectly. I have had two separate instances of a bridge driver failing to do a drm_bridge_attach() call, resulting in the bridge connector not being part of the chain. In some sit

Re: [PATCH v5 9/9] drm: selftest: convert drm_mm selftest to KUnit

2023-07-31 Thread Maxime Ripard
Hi David, On Tue, Jul 25, 2023 at 05:54:32PM +0800, David Gow wrote: > On Tue, 25 Jul 2023 at 16:38, Maxime Ripard wrote: > > On Thu, Apr 27, 2023 at 03:14:39PM +0200, Maxime Ripard wrote: > > > Hi, > > > > > > On Fri, Jul 08, 2022 at 05:30:52PM -0300, Maíra Canal wrote: > > > > From: Arthur Gril

Re: [PATCH v2] drm/panel: Enable DSC and CMD mode for Visionox VTDR6130 panel

2023-07-31 Thread neil . armstrong
Hi, On 28/07/2023 03:26, Paloma Arellano wrote: Enable display compression (DSC v1.2) and CMD mode for 1080x2400 Visionox VTDR6130 AMOLED DSI panel. In addition, this patch will set the default to command mode with DSC enabled. Note: This patch has only been validated DSC over command mode as D

Re: [PATCH v2 00/11] drm: kunit: Switch to kunit actions

2023-07-31 Thread Maxime Ripard
On Thu, 20 Jul 2023 13:15:45 +0200, Maxime Ripard wrote: > Since v6.5-rc1, kunit gained a devm/drmm-like mechanism that makes tests > resources much easier to cleanup. > > This series converts the existing tests to use those new actions where > relevant. > > Let me know what you think, > Maxime >

Re: [PATCH v3 00/11] drm: kunit: Switch to kunit actions

2023-07-31 Thread Maxime Ripard
On Fri, 28 Jul 2023 11:06:13 +0200, Maxime Ripard wrote: > Since v6.5-rc1, kunit gained a devm/drmm-like mechanism that makes tests > resources much easier to cleanup. > > This series converts the existing tests to use those new actions where > relevant. > > Let me know what you think, > Maxime >

[PATCH -next] drm/ingenic: remove redundant of_match_ptr

2023-07-31 Thread Zhu Wang
The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr here. Even for drivers that do not depend on CONFIG_OF, it's almost always better to leave out the of_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with a

Re: [PATCH v10] drm: Add initial ci/ subdirectory

2023-07-31 Thread Helen Mae Koike Fornazier
Hello all, Thanks for your comments. On Friday, July 28, 2023 11:37 -03, Rob Clark wrote: > On Thu, Jul 27, 2023 at 10:26 PM Daniel Stone wrote: > > > > On Thu, 27 Jul 2023 at 22:47, Rob Clark wrote: > > > > I did run into a bit of a chicken vs. egg problem with testing the "in > > > > tree"

Re: [PATCH] drm/tests: Alloc drm_device on drm_exec tests

2023-07-31 Thread Maxime Ripard
Hi, On Fri, Jul 28, 2023 at 02:43:14PM -0300, Arthur Grillo Queiroz Cabral wrote: > >> drivers/gpu/drm/tests/drm_exec_test.c | 36 +-- > >> 1 file changed, 29 insertions(+), 7 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/tests/drm_exec_test.c > >> b/drivers/gpu/drm

Re: [PATCH v14 02/12] drm/shmem-helper: Add pages_pin_count field

2023-07-31 Thread Dmitry Osipenko
On 7/25/23 11:32, Boris Brezillon wrote: >> Can we make it an atomic_t, so we can avoid taking the lock when the >> GEM has already been pinned. That's something I need to be able to grab >> a pin-ref in a path where the GEM resv lock is already held[1]. We could >> of course expose the locked vers

Re: [PATCH v14 02/12] drm/shmem-helper: Add pages_pin_count field

2023-07-31 Thread Dmitry Osipenko
On 7/31/23 15:27, Dmitry Osipenko wrote: > On 7/25/23 11:32, Boris Brezillon wrote: >>> Can we make it an atomic_t, so we can avoid taking the lock when the >>> GEM has already been pinned. That's something I need to be able to grab >>> a pin-ref in a path where the GEM resv lock is already held[1]

[PATCH -next] drm/exynos: remove redundant of_match_ptr

2023-07-31 Thread Zhu Wang
The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr here. Even for drivers that do not depend on CONFIG_OF, it's almost always better to leave out the of_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with a

[PATCH 1/2] drm/exec: use unique instead of local label

2023-07-31 Thread Christian König
GCC forbids to jump to labels in loop conditions and a new clang check stumbled over this. So instead using a local label inside the loop condition use an unique label outside of it. Fixes: commit 09593216bff1 ("drm: execution context for GEM buffers v7") Link: https://gcc.gnu.org/onlinedocs/gcc/

[PATCH 2/2] drm/exec: add test case for using a drm_exec multiple times

2023-07-31 Thread Christian König
Not really a common use case, but let's make sure that we don't accidentially break that somehow. CC: Boris Brezillon Signed-off-by: Christian König --- drivers/gpu/drm/tests/drm_exec_test.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_exe

Re: [PATCH] fbdev/amifb: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper

2023-07-31 Thread Helge Deller
On 7/31/23 04:18, Atul Raut wrote: Replacing zero-length arrays with C99 flexible-array members because they are deprecated. Use the new DECLARE_FLEX_ARRAY() auxiliary macro instead of defining a zero-length array. This fixes warnings such as: ./drivers/video/fbdev/amifb.c:690:6-10: WARNING use

Re: [PATCH 2/3] video: fbdev: ssd1307fb: Print the PWM's label instead of its number

2023-07-31 Thread Helge Deller
On 7/28/23 16:58, Uwe Kleine-König wrote: struct pwm_device::pwm is a write-only variable in the pwm core and used nowhere apart from this and another dev_dbg. So it isn't useful to identify the used PWM. Emit the PWM's label instead in the debug message. Signed-off-by: Uwe Kleine-König appli

[PATCH -next] drm/tve200: remove redundant of_match_ptr

2023-07-31 Thread Zhu Wang
The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr here. Even for drivers that do not depend on CONFIG_OF, it's almost always better to leave out the of_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with a

Re: [PATCH] drm/panel: r66451: select CONFIG_DRM_DISPLAY_DP_HELPER

2023-07-31 Thread Neil Armstrong
Hi, On Wed, 19 Jul 2023 15:09:21 +0200, Arnd Bergmann wrote: > The newly added driver only builds when DRM_DISPLAY_DP_HELPER is enabled: > > x86_64-linux-ld: drivers/gpu/drm/panel/panel-visionox-r66451.o: in function > `visionox_r66451_enable': > panel-visionox-r66451.c:(.text+0x105): undefined

Re: [PATCH] drm: panel: simple: specify bpc for powertip_ph800480t013_idf02

2023-07-31 Thread Neil Armstrong
On 27/07/2023 19:24, Dmitry Baryshkov wrote: Specify bpc value for the powertip_ph800480t013_idf02 panel to stop drm code from complaining about unexpected bpc value (0). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/panel/panel-simple.c | 1 + 1 file changed, 1 insertion(+) diff --gi

Re: [PATCH 2/2] drm/panel: ilitek-ili9881c: Add TDO TL050HDV35 LCD panel

2023-07-31 Thread Neil Armstrong
On 19/07/2023 12:26, Matus Gajdos wrote: Add support for TDO TL050HDV35-H1311A LCD panel. Signed-off-by: Matus Gajdos --- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 194 ++ 1 file changed, 194 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/d

[PATCH -next] drm/rockchip: remove redundant of_match_ptr

2023-07-31 Thread Zhu Wang
The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr here. Even for drivers that do not depend on CONFIG_OF, it's almost always better to leave out the of_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with a

Re: [PATCH v2 2/3] drm/panel: Support for startek-kd070fhfid015 MIPI-DSI panel

2023-07-31 Thread Neil Armstrong
Hi, On 13/07/2023 11:07, amerg...@baylibre.com wrote: From: Guillaume La Roque This driver support the Startek KD070FHFID015, which is a 7-inch TFT LCD display using MIPI DSI interface. Signed-off-by: Guillaume La Roque Signed-off-by: Alexandre Mergnat --- drivers/gpu/drm/panel/Kconfig

Re: [PATCH v2 3/3] arm64: defconfig: enable STARTEK KD070FHFID015 panel

2023-07-31 Thread Neil Armstrong
On 13/07/2023 11:07, Alexandre Mergnat wrote: Build Startek KD070FHFID015 panel driver. This MIPI-DSI display can be used for the mt8365-evk board for example. Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/con

Re: [PATCH] drm/panel: Add prepare_prev_first flag to Visionox VTDR6130

2023-07-31 Thread Neil Armstrong
Hi, On 26/07/2023 00:56, Jessica Zhang wrote: Due to a recent introduction of the pre_enable_prev_first bridge flag [1], the panel driver will be probed before the DSI is enabled, causing the DCS commands to fail to send. Ensure that DSI is enabled before panel probe by setting the prepare_prev

Re: [PATCH] drm/panel: r66451: select CONFIG_DRM_DISPLAY_DP_HELPER

2023-07-31 Thread Neil Armstrong
Hi, On Wed, 19 Jul 2023 15:09:21 +0200, Arnd Bergmann wrote: > The newly added driver only builds when DRM_DISPLAY_DP_HELPER is enabled: > > x86_64-linux-ld: drivers/gpu/drm/panel/panel-visionox-r66451.o: in function > `visionox_r66451_enable': > panel-visionox-r66451.c:(.text+0x105): undefined

Re: [PATCH 0/2] drm/panel: ilitek-ili9881c: Add TDO TL050HDV35-H1311A LCD panel

2023-07-31 Thread Neil Armstrong
Hi, On Wed, 19 Jul 2023 12:26:13 +0200, Matus Gajdos wrote: > The first patch updates the DT documentation and the second is the > update of the ilitek ili9881c driver. > > Matus Gajdos (2): > dt-bindings: ili9881c: Add TDO TL050HDV35 LCD panel > drm/panel: ilitek-ili9881c: Add TDO TL050HDV35

Re: [PATCH] drm: panel: simple: specify bpc for powertip_ph800480t013_idf02

2023-07-31 Thread Neil Armstrong
Hi, On Thu, 27 Jul 2023 20:24:45 +0300, Dmitry Baryshkov wrote: > Specify bpc value for the powertip_ph800480t013_idf02 panel to stop drm > code from complaining about unexpected bpc value (0). > > Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next) [1/1] d

[PATCH -next] drm/i2c: tda998x: remove redundant of_match_ptr

2023-07-31 Thread Zhu Wang
The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr here. Even for drivers that do not depend on CONFIG_OF, it's almost always better to leave out the of_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with a

Re: [PATCH v14 12/12] drm/gem: Add _unlocked postfix to drm_gem_pin/unpin()

2023-07-31 Thread Dmitry Osipenko
On 7/25/23 10:53, Boris Brezillon wrote: > On Sun, 23 Jul 2023 02:47:46 +0300 > Dmitry Osipenko wrote: > >> Make clear that drm_gem_pin/unpin() functions take reservation lock by >> adding _unlocked postfix to the function names. >> >> Suggested-by: Boris Brezillon >> Signed-off-by: Dmitry Osipe

[PATCH v7 00/13] MediaTek DDP GAMMA - 12-bit LUT support

2023-07-31 Thread AngeloGioacchino Del Regno
Changes in v7: - Added check for NULL dev for AAL-gamma case - Added get_lut_size callback for AAL-gamma - Added comment to clarify SoC 10/12 bits support and old vs new register layout as suggested by Alexandre M. Changes in v6: - Fixed smatch warning in patch 11/11, ref.: https://lore.

[PATCH v7 06/13] drm/mediatek: gamma: Use bitfield macros

2023-07-31 Thread AngeloGioacchino Del Regno
Make the code more robust and improve readability by using bitfield macros instead of open coding bit operations. While at it, also add a definition for LUT_BITS_DEFAULT. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Jason-JH.Lin Reviewed-by: Alexandre Mergnat --- drivers/gpu/drm/med

[PATCH v7 03/13] drm/mediatek: gamma: Support SoC specific LUT size

2023-07-31 Thread AngeloGioacchino Del Regno
Newer SoCs support a bigger Gamma LUT table: wire up a callback to retrieve the correct LUT size for each different Gamma IP. Co-developed-by: Jason-JH.Lin Signed-off-by: Jason-JH.Lin [Angelo: Rewritten commit message/description + porting] Signed-off-by: AngeloGioacchino Del Regno Reviewed-by

[PATCH v7 05/13] drm/mediatek: gamma: Enable the Gamma LUT table only after programming

2023-07-31 Thread AngeloGioacchino Del Regno
Move the write to DISP_GAMMA_CFG to enable the Gamma LUT to after programming the actual table to avoid potential visual glitches during table modification. Note: GAMMA should get enabled in between vblanks, but this requires many efforts in order to make this happen, as that requires migrating al

[PATCH v7 07/13] drm/mediatek: gamma: Support specifying number of bits per LUT component

2023-07-31 Thread AngeloGioacchino Del Regno
New SoCs, like MT8195, not only may support bigger lookup tables, but have got a different register layout to support bigger precision: support specifying the number of `lut_bits` for each SoC and use it in mtk_gamma_set_common() to perform the right calculation. Signed-off-by: AngeloGioacchino De

[PATCH v7 11/13] drm/mediatek: gamma: Program gamma LUT type for descending or rising

2023-07-31 Thread AngeloGioacchino Del Regno
All of the SoCs that don't have dithering control in the gamma IP have got a GAMMA_LUT_TYPE bit that tells to the IP if the LUT is "descending" (bit set) or "rising" (bit cleared): make sure to set it correctly after programming the LUT. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Jas

[PATCH v7 12/13] drm/mediatek: aal: Rewrite kerneldoc for struct mtk_disp_aal

2023-07-31 Thread AngeloGioacchino Del Regno
The kerneldoc for struct mtk_disp_aal was entirely wrong: rewrite it to actually document the structure. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_disp_aal.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk

[PATCH v7 04/13] drm/mediatek: gamma: Improve and simplify HW LUT calculation

2023-07-31 Thread AngeloGioacchino Del Regno
Use drm_color_lut_extract() to avoid open-coding the bits reduction calculations for each color channel and use a struct drm_color_lut to temporarily store the information instead of an array of u32. Also, slightly improve the precision of the HW LUT calculation in the LUT DIFF case by performing

[PATCH v7 08/13] drm/mediatek: gamma: Support multi-bank gamma LUT

2023-07-31 Thread AngeloGioacchino Del Regno
Newer Gamma IP have got multiple LUT banks: support specifying the size of the LUT banks and handle bank-switching before programming the LUT in mtk_gamma_set_common() in preparation for adding support for MT8195 and newer SoCs. Suggested-by: Jason-JH.Lin [Angelo: Refactored original commit] Sign

[PATCH v7 13/13] drm/mediatek: gamma: Add kerneldoc for struct mtk_disp_gamma

2023-07-31 Thread AngeloGioacchino Del Regno
The mtk_disp_gamma structure was completely undocumented: add some kerneldoc documentation to it. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp

[PATCH v7 09/13] drm/mediatek: gamma: Add support for 12-bit LUT and MT8195

2023-07-31 Thread AngeloGioacchino Del Regno
Add support for 12-bit gamma lookup tables and introduce the first user for it: MT8195. While at it, also reorder the variables in mtk_gamma_set_common() and rename `lut_base` to `lut0_base` to improve readability. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Jason-JH.Lin Reviewed-by:

[PATCH v7 01/13] drm/mediatek: gamma: Adjust mtk_drm_gamma_set_common parameters

2023-07-31 Thread AngeloGioacchino Del Regno
From: "Jason-JH.Lin" Adjust the parameters in mtk_drm_gamma_set_common() - add (struct device *dev) to get lut_diff from gamma's driver data - remove (bool lut_diff) and use false as default value in the function Signed-off-by: Jason-JH.Lin Signed-off-by: AngeloGioacchino Del Regno Review

[PATCH v7 02/13] drm/mediatek: gamma: Reduce indentation in mtk_gamma_set_common()

2023-07-31 Thread AngeloGioacchino Del Regno
Invert the check for state->gamma_lut and move it at the beginning of the function to reduce indentation: this prepares the code for keeping readability on later additions. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Jason-JH.Lin Reviewed-by

[PATCH v7 10/13] drm/mediatek: gamma: Make sure relay mode is disabled

2023-07-31 Thread AngeloGioacchino Del Regno
Disable relay mode at the end of LUT programming to make sure that the processed image goes through. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Jason-JH.Lin Reviewed-by: Alexandre Mergnat --- drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 4 1 file changed, 4 insertions(+) diff

Re: [PATCH] fbdev: fbmem: mark registered_fb static

2023-07-31 Thread Helge Deller
On 7/14/23 02:37, Min-Hua Chen wrote: Mark registered_fb, num_registered_fb, fbcon_registered_fb, and fbcon_num_registered_fb static to fix the following sparse warnings: drivers/video/fbdev/core/fbmem.c:51:16: sparse: warning: symbol 'registered_fb' was not declared. Should it be static? drive

Re: [PATCH -next] drm/exynos: remove redundant of_match_ptr

2023-07-31 Thread Krzysztof Kozlowski
On 31/07/2023 14:33, Zhu Wang wrote: > The driver depends on CONFIG_OF, so it is not necessary to use > of_match_ptr here. > > Even for drivers that do not depend on CONFIG_OF, it's almost always > better to leave out the of_match_ptr(), since the only thing it can > possibly do is to save a few b

[PATCH -next] drm/mcde: remove redundant of_match_ptr

2023-07-31 Thread Zhu Wang
The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr here. Even for drivers that do not depend on CONFIG_OF, it's almost always better to leave out the of_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with a

[PATCH -next] drm/omap: remove redundant of_match_ptr

2023-07-31 Thread Zhu Wang
The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr here. Even for drivers that do not depend on CONFIG_OF, it's almost always better to leave out the of_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with a

[PATCH -next] drm/amdgpu: Remove a lot of unnecessary ternary operators

2023-07-31 Thread Ruan Jinjie
Ther are many ternary operators, the true or false judgement of which is unnecessary in C language semantics. Signed-off-by: Ruan Jinjie --- drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 2 +- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c

Re: [PATCH v14 02/12] drm/shmem-helper: Add pages_pin_count field

2023-07-31 Thread Boris Brezillon
+Danilo, to confirm my understanding of the gpuva remap operation is correct. On Mon, 31 Jul 2023 15:27:31 +0300 Dmitry Osipenko wrote: > On 7/25/23 11:32, Boris Brezillon wrote: > >> Can we make it an atomic_t, so we can avoid taking the lock when the > >> GEM has already been pinned. That's so

Re: [PATCH v3 0/4] mm: convert to vma_is_initial_heap/stack()

2023-07-31 Thread Peter Zijlstra
On Fri, Jul 28, 2023 at 01:00:39PM +0800, Kefeng Wang wrote: > Kefeng Wang (4): > mm: factor out VMA stack and heap checks > drm/amdkfd: use vma_is_initial_stack() and vma_is_initial_heap() > selinux: use vma_is_initial_stack() and vma_is_initial_heap() > perf/core: use vma_is_initial_stac

Re: [PATCH v3] drm/bridge: Add debugfs print for bridge chains

2023-07-31 Thread Alexander Stein
Hi Tomi, Am Montag, 31. Juli 2023, 14:13:14 CEST schrieb Tomi Valkeinen: > DRM bridges are not visible to the userspace and it may not be > immediately clear if the chain is somehow constructed incorrectly. I > have had two separate instances of a bridge driver failing to do a > drm_bridge_attach(

[PATCH v3 0/3] Add startek-kd070fhfid015 display support

2023-07-31 Thread Alexandre Mergnat
Add the support of the Startek KD070FHFID015 panel. It's a 7-inch TFT LCD display with a resolution of 1024 x 600 pixels. I use this display plugged to my mt8365-evk board. This serie come from a bigger one [1]. Then I addressed the previous comments for the related commits here. [1]: https://l

[PATCH v3 2/3] drm/panel: Support for startek-kd070fhfid015 MIPI-DSI panel

2023-07-31 Thread amergnat
From: Guillaume La Roque This driver support the Startek KD070FHFID015, which is a 7-inch TFT LCD display using MIPI DSI interface. Signed-off-by: Guillaume La Roque Reviewed-by: Neil Armstrong Signed-off-by: Alexandre Mergnat --- drivers/gpu/drm/panel/Kconfig | 11 + d

[PATCH v3 3/3] arm64: defconfig: enable STARTEK KD070FHFID015 panel

2023-07-31 Thread Alexandre Mergnat
Build Startek KD070FHFID015 panel driver. This MIPI-DSI display can be used for the mt8365-evk board for example. Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig inde

[PATCH v3 1/3] dt-bindings: display: panel: add startek kd070fhfid015 support

2023-07-31 Thread Alexandre Mergnat
The Startek KD070FHFID015 is a 7-inch TFT LCD display with a resolution of 1024 x 600 pixels. Reviewed-by: Conor Dooley Signed-off-by: Alexandre Mergnat --- .../display/panel/startek,kd070fhfid015.yaml | 69 ++ 1 file changed, 69 insertions(+) diff --git a/Documentat

[PATCH] drivers: gpu: drm: nouveau: fix invalid variable name

2023-07-31 Thread Konstantin Meskhidze
This commit fixes logic error in function 'nvkm_dp_train': argument of function nvkm_dp_train_link might be rate, not ret Co-developed-by: Ivanov Mikhail Signed-off-by: Konstantin Meskhidze --- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH] drm/amd/display: check attr flag before set cursor degamma on DCN3+

2023-07-31 Thread Harry Wentland
On 2023-07-31 04:35, Melissa Wen wrote: > Don't set predefined degamma curve to cursor plane if the cursor > attribute flag is not set. Applying a degamma curve to the cursor by > default breaks userspace expectation. Checking the flag before > performing any color transformation prevents too da

Re: [PATCH v10] drm: Add initial ci/ subdirectory

2023-07-31 Thread Rob Clark
On Mon, Jul 31, 2023 at 5:25 AM Helen Mae Koike Fornazier wrote: > > Hello all, > > Thanks for your comments. > > On Friday, July 28, 2023 11:37 -03, Rob Clark wrote: > > > On Thu, Jul 27, 2023 at 10:26 PM Daniel Stone wrote: > > > > > > On Thu, 27 Jul 2023 at 22:47, Rob Clark wrote: > > > > >

[PATCH v4 0/3] Add startek-kd070fhfid015 display support

2023-07-31 Thread Alexandre Mergnat
Add the support of the Startek KD070FHFID015 panel. It's a 7-inch TFT LCD display with a resolution of 1024 x 600 pixels. I use this display plugged to my mt8365-evk board. This serie come from a bigger one [1]. Then I addressed the previous comments for the related commits here. [1]: https://l

  1   2   >