[PATCH 2/3] accel/habanalabs/gaudi2: drop support for never released firmware

2024-02-25 Thread Oded Gabbay
From: Ohad Sharabi Firmware files below 1.11 were never released to customers so no need to support them externally. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 47 ++-- 1 file changed, 3 i

[PATCH 3/3] accel/habanalabs/gaudi2: use single function to compare FW versions

2024-02-25 Thread Oded Gabbay
From: Ohad Sharabi Currently, the code contains 2 types of FW version comparison functions: - hl_is_fw_sw_ver_[below/equal_or_greater]() - gaudi2 specific function of the type gaudi2_is_fw_ver_[below/above]x_y_z() Moreover, some functions use the inner FW version which should be only stage dur

[PATCH 1/3] accel/habanalabs/gaudi2: initialize field in correct function

2024-02-25 Thread Oded Gabbay
From: Ohad Sharabi supports_advanced_cpucp_rc is an asic property which should be initialized in the gaudi2_set_fixed_properties(), where all of the asic properties are initialized. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/g

RE: [PATCH v2] drm/lcdif: Do not disable clocks on already suspended hardware

2024-02-25 Thread Ying Liu
On Monday, February 26, 2024 3:28 PM, Marek Vasut wrote: > 0, and would trigger a warning from clocks core about this condition. s/clocks/clock/ Liu Ying

Re: [PATCH v2 1/3] dt-bindings: display: msm: dp-controller: document X1E80100 compatible

2024-02-25 Thread Krzysztof Kozlowski
On 24/02/2024 23:34, Dmitry Baryshkov wrote: > On Thu, 22 Feb 2024 at 17:55, Abel Vesa wrote: >> >> Add the X1E80100 to the list of compatibles and document the is-edp >> flag. The controllers are expected to operate in DP mode by default, >> and this flag can be used to select eDP mode. >> >> Sig

[PATCH] nouveau: report byte usage in VRAM usage.

2024-02-25 Thread Dave Airlie
From: Dave Airlie Turns out usage is always in bytes not shifted. Fixes: 72fa02fdf833 ("nouveau: add an ioctl to report vram usage") Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouvea

ttm usage inconsistency

2024-02-25 Thread Dave Airlie
This is probably something I knew about and forgot, but I'll ask if anyone has considered cleaning it up (or maybe I should fix nouveau). nouveau sets up the resource manager using vram_size >> PAGE_SHIFT as the bounds, but the bo sizes are in bytes, hence usage ends up being accounted in bytes, s

[PATCH v2] drm/lcdif: Do not disable clocks on already suspended hardware

2024-02-25 Thread Marek Vasut
In case the LCDIF is enabled in DT but unused, the clocks used by the LCDIF are not enabled. Those clocks may even have a use count of 0 in case there are no other users of those clocks. This can happen e.g. in case the LCDIF drives HDMI bridge which has no panel plugged into the HDMI connector. D

Re: [PATCH v2 0/6] Pinephone video out fixes (flipping between two frames)

2024-02-25 Thread Frank Oltmanns
Hi Jernej, hi Maxime, hi Ondřej, On 2024-02-19 at 10:41:19 +0100, Frank Oltmanns wrote: > Hi Ondřej, > > On 2024-02-11 at 20:25:29 +0100, Ondřej Jirman wrote: >> Hi Frank, >> >> On Sun, Feb 11, 2024 at 04:09:16PM +0100, Frank Oltmanns wrote: >>> Hi Ondřej, >>> >>> On 2024-02-05 at 17:02:00 +0100

Re: [PATCH RFC 01/12] kbuild: create destination directory for _shipped handling

2024-02-25 Thread Masahiro Yamada
On Mon, Feb 26, 2024 at 11:11 AM Dmitry Baryshkov wrote: > > The driver might decide to put the _shipped files to the subdir. Please stop this sentence. This sounds like we are not learning. https://lore.kernel.org/all/CAHk-=wgSEi_ZrHdqr=20xv+d6dr5G895CbOAi8ok+7-CQUN=f...@mail.gmail.com/

Re: [PATCH RFC 00/12] drm/msm: add support for regenerating shipped xml.h headers

2024-02-25 Thread Masahiro Yamada
l.h_shipped}| 37 +- > .../mdp5.xml.h => registers/mdp5.xml.h_shipped}| 39 +- > .../gpu/drm/msm/registers/mdp_common.xml.h_shipped | 114 ++ > drivers/gpu/drm/msm/registers/sfpb.xml.h_shipped | 67 + > drivers/gpu/drm/msm/registers/xml/dsi.xml | 390 ++ > drivers/gpu/drm/msm/registers/xml/dsi_phy_10nm.xml | 102 ++ > drivers/gpu/drm/msm/registers/xml/dsi_phy_14nm.xml | 135 ++ > drivers/gpu/drm/msm/registers/xml/dsi_phy_20nm.xml | 100 ++ > drivers/gpu/drm/msm/registers/xml/dsi_phy_28nm.xml | 180 +++ > .../drm/msm/registers/xml/dsi_phy_28nm_8960.xml| 134 ++ > drivers/gpu/drm/msm/registers/xml/dsi_phy_7nm.xml | 230 > drivers/gpu/drm/msm/registers/xml/edp.xml | 239 > .../drm/msm/registers/xml/freedreno_copyright.xml | 40 + > drivers/gpu/drm/msm/registers/xml/hdmi.xml | 1015 +++ > drivers/gpu/drm/msm/registers/xml/mdp4.xml | 480 +++ > drivers/gpu/drm/msm/registers/xml/mdp5.xml | 806 > drivers/gpu/drm/msm/registers/xml/mdp_common.xml | 89 ++ > drivers/gpu/drm/msm/registers/xml/mmss_cc.xml | 48 + > drivers/gpu/drm/msm/registers/xml/msm.xml | 32 + > drivers/gpu/drm/msm/registers/xml/rules-ng.xsd | 457 +++ > drivers/gpu/drm/msm/registers/xml/sfpb.xml | 17 + > scripts/Makefile.lib |2 +- > 47 files changed, 8034 insertions(+), 587 deletions(-) > --- > base-commit: ffa0c87f172bf7a0132aa960db412f8d63b2f533 > change-id: 20240225-fd-xml-shipped-ba9a321cdedf > > Best regards, > -- > Dmitry Baryshkov > -- Best Regards Masahiro Yamada

RE: [PATCH] drm/lcdif: Do not disable clock on already suspended hardware

2024-02-25 Thread Ying Liu
On Friday, January 19, 2024 2:39 AM, Marek Vasut wrote: > In case the LCDIF is enabled in DT but unused, the clock used by the Nit: s/clock/clocks/ > LCDIF are not enabled. Those clock may even have a use count of 0 in Ditto. > case there are no other users of those clock. This can happen e.g.

Re: [PATCH v2 5/6] drm/panel: st7703: Drive XBD599 panel at higher clock rate

2024-02-25 Thread Icenowy Zheng
在 2024-02-25星期日的 17:46 +0100,Frank Oltmanns写道: > Hi Maxime, > > On 2024-02-22 at 11:29:51 +0100, Maxime Ripard > wrote: > > [[PGP Signed Part:Undecided]] > > On Sun, Feb 11, 2024 at 04:42:43PM +0100, Frank Oltmanns wrote: > > > > > > On 2024-02-08 at 20:05:08 +0100, Maxime Ripard > > > wrote: >

Re: [PATCH v4 2/4] drm/bridge: add lvds controller support for sam9x7

2024-02-25 Thread Dharma.B
Hi Folks, Your feedback is valuable, and I'm eager to address any concerns or make improvements as needed. Thank you for your consideration. On 09/02/24 8:37 pm, Dharma B - I70843 wrote: > Add a new LVDS controller driver for sam9x7 which does the following: > - Prepares and enables the LVDS Per

[PATCH] drm/qxl: remove redundant code

2024-02-25 Thread Jiapeng Chong
Variable num_relocs is not effectively used, so delete it. Having two labels seems somewhat redundant; the 'out_free_release' can be removed, leaving 'out_free_bos'. drivers/gpu/drm/qxl/qxl_ioctl.c:148:14: warning: variable 'num_relocs' set but not used. Reported-by: Abaci Robot Closes: https:/

Re: [PATCH 3/3] drm/xe/xe2: fix 64-bit division in pte_update_size

2024-02-25 Thread Lucas De Marchi
On Sat, Feb 24, 2024 at 01:15:01PM +0100, Arnd Bergmann wrote: From: Arnd Bergmann This function does not build on 32-bit targets when the compiler fails to reduce DIV_ROUND_UP() into a shift: ld.lld: error: undefined symbol: __aeabi_uldivmod referenced by xe_migrate.c drivers/g

Re: [PATCH 2/3] drm/xe/mmio: fix build warning for BAR resize on 32-bit

2024-02-25 Thread Lucas De Marchi
On Sat, Feb 24, 2024 at 01:15:00PM +0100, Arnd Bergmann wrote: From: Arnd Bergmann clang complains about a nonsensical test on builds with a 32-bit phys_addr_t, which means resizing will always fail: drivers/gpu/drm/xe/xe_mmio.c:109:23: error: result of comparison of constant 4294967296 with

Re: [PATCH 1/3] drm/xe/kunit: fix link failure with built-in xe

2024-02-25 Thread Lucas De Marchi
On Sat, Feb 24, 2024 at 01:14:59PM +0100, Arnd Bergmann wrote: From: Arnd Bergmann When the driver is built-in but the tests are in loadable modules, the helpers don't actually get put into the driver: ERROR: modpost: "xe_kunit_helper_alloc_xe_device" [drivers/gpu/drm/xe/tests/xe_test.ko] und

[PULL] drm-xe-next

2024-02-25 Thread Lucas De Marchi
Hi Dave and Sima, Here's the PR for drm-xe-next for Linux v6.9. It's a big list of changes, but it contains several fixes for things noticed throughout the v6.8 cycle after being merged upstream, added to the linux-next, etc. Approximately 30% are fixes already sent or on its way to v6.8. First,

[PATCH v4 2/3] drm/msm/dpu: split dpu_encoder_wait_for_event into two functions

2024-02-25 Thread Dmitry Baryshkov
Stop multiplexing several events via the dpu_encoder_wait_for_event() function. Split it into two distinct functions two allow separate handling of those events. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 70 +

[PATCH v4 1/3] drm/msm/dpu: make "vblank timeout" more useful

2024-02-25 Thread Dmitry Baryshkov
We have several reports of vblank timeout messages. However after some debugging it was found that there might be different causes to that. To allow us to identify the DPU block that gets stuck, include the actual CTL_FLUSH value into the timeout message. Reviewed-by: Abhinav Kumar Signed-off-by:

[PATCH v4 3/3] drm/msm/dpu: capture snapshot on the first commit_done timeout

2024-02-25 Thread Dmitry Baryshkov
In order to debug commit_done timeouts, capture the devcoredump state when the first timeout occurs after the encoder has been enabled. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 9 + 1 file changed, 9 insertions(+) diff

[PATCH v4 0/3] drm/msm/dpu: debug commit_done timeouts

2024-02-25 Thread Dmitry Baryshkov
new funcsions (Abhinav) - Link to v3: https://lore.kernel.org/r/20240225-fd-dpu-debug-timeout-v3-0-252f2b21c...@linaro.org Changes in v3: - Capture the snapshot only on the first comit_done timeout (Abhinav) - Link to v2: https://lore.kernel.org/r/20240208-fd-dpu-debug-timeout-v2-1-9f907f1bd

Re: [PATCH] drm/nouveau: use dedicated wq for fence uevents work

2024-02-25 Thread Dave Airlie
On Sat, 24 Feb 2024 at 03:01, Danilo Krummrich wrote: > > On Fri, Feb 23, 2024 at 10:14:53AM +1000, Dave Airlie wrote: > > On Fri, 23 Feb 2024 at 00:45, Danilo Krummrich wrote: > > > > > > Using the kernel global workqueue to signal fences can lead to > > > unexpected deadlocks. Some other work (

[PATCH] drm/exynos: use KMEM_CACHE() to create g2d_runqueue_node cache

2024-02-25 Thread Kunwu Chan
Use the KMEM_CACHE() macro instead of kmem_cache_create() to simplify the creation of SLAB caches when the default values are used. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/e

[PATCH] drm/xe: use KMEM_CACHE() to create xe_hw_fence cache

2024-02-25 Thread Kunwu Chan
Use the KMEM_CACHE() macro instead of kmem_cache_create() to simplify the creation of SLAB caches when the default values are used. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/xe/xe_hw_fence.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_hw_fence

[PATCH RFC 12/12] drm/msm: sync shipped headers database

2024-02-25 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/registers/dsi.xml.h_shipped| 38 --- .../drm/msm/registers/dsi_phy_10nm.xml.h_shipped | 37 --- .../drm/msm/registers/dsi_phy_14nm.xml.h_shipped | 37 --- .../drm/msm/registers/dsi_phy_20nm.xml.h_shipped | 37 --

[PATCH RFC 11/12] drm/msm: tie regeneration of shipped headers

2024-02-25 Thread Dmitry Baryshkov
Finally add support for regeneration of the shipped autogenerated register headers. Pass DRM_MSM_GENERATE_HEADERS=1 to make to force regeneration. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 27 +++ drivers/gpu/drm/msm/registers/.gitigno

[PATCH RFC 07/12] drm/msm/headergen: use asprintf instead of custom aprintf

2024-02-25 Thread Dmitry Baryshkov
Replace custom aprintf() function with the standard asprintf(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/aprintf.c | 38 drivers/gpu/drm/msm/headergen2/rnn.c | 5 - drivers/gpu/drm/msm/headergen2/util.h| 2 -- 3 files chang

[PATCH RFC 09/12] drm/msm/headergen: generate _shipped files

2024-02-25 Thread Dmitry Baryshkov
Change headergen semantics to generate the .xml.h_shipped files instead of just generating headers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/headergen2.c | 33 +++-- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH RFC 02/12] drm/msm/mdp5: add writeback block bases

2024-02-25 Thread Dmitry Baryshkov
In order to stop patching the mdp5 headers, import definitions for the writeback blocks. This part is extracted from the old Rob's patch. Co-developed-by: Rob Clark Signed-off-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h | 11 +++ 1 file ch

[PATCH RFC 08/12] drm/msm/headergen: don't output full file paths

2024-02-25 Thread Dmitry Baryshkov
In order to reduce noise, include just the file name into the generated file headers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/headergen2.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/headergen2/headergen2.c b/drivers/

[PATCH RFC 05/12] drm/msm: use _shipped suffix for all xml.h files

2024-02-25 Thread Dmitry Baryshkov
Move non-GPU xml.h files into the ./registers subdir and add the _shipped suffix. The GPU files are left intact for now, since they require processing via a gen_headers.py, while display headers are regenerated using headergen2 Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile

[PATCH RFC 06/12] drm/msm/headergen: import source files from freedreno/envytools

2024-02-25 Thread Dmitry Baryshkov
Import headergen2 sources at the commit d88cafa3ac3e ("freedreno/decode: try harder to not crash in disasm") from https://gitlab.freedesktop.org/freedreno/envytools. This tool has been used to generate drm/msm header files from the corresponding XML files. This required committing changes to the Me

[PATCH RFC 03/12] drm/msm/hdmi: drop qfprom.xml.h

2024-02-25 Thread Dmitry Baryshkov
The qfprom.xml.h contains definitions for the nvmem code. They are not used in the existing code. Also if we were to use them later, we should have used nvmem cell API instead of using these defs. Drop the file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/qfprom.xml.h | 61 -

[PATCH RFC 04/12] drm/msm/dsi: drop mmss_cc.xml.h

2024-02-25 Thread Dmitry Baryshkov
The mmss_cc.xml.h file describes bits of the MMSS clock controller on APQ8064 / MSM8960 platforms. They are not used by the driver and do not belong to the DRM MSM driver. Drop the file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/mmss_cc.xml.h | 131 -

[PATCH RFC 00/12] drm/msm: add support for regenerating shipped xml.h headers

2024-02-25 Thread Dmitry Baryshkov
msm/registers/xml/sfpb.xml | 17 + scripts/Makefile.lib |2 +- 47 files changed, 8034 insertions(+), 587 deletions(-) --- base-commit: ffa0c87f172bf7a0132aa960db412f8d63b2f533 change-id: 20240225-fd-xml-shipped-ba9a321cdedf Best regards, -- Dmitry Baryshkov

[PATCH RFC 01/12] kbuild: create destination directory for _shipped handling

2024-02-25 Thread Dmitry Baryshkov
The driver might decide to put the _shipped files to the subdir. In such case the cmd_copy might fail because the destination directory is not present. Call mkdir -p to make sure that the destination directory is present. Signed-off-by: Dmitry Baryshkov --- scripts/Makefile.lib | 2 +- 1 file ch

Re: [PATCH v3 3/3] drm/msm/dpu: capture snapshot on the first commit_done timeout

2024-02-25 Thread Abhinav Kumar
On 2/25/2024 11:57 AM, Abhinav Kumar wrote: On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: In order to debug commit_done timeouts, capture the devcoredump state when the first timeout occurs after the encoder has been enabled. Signed-off-by: Dmitry Baryshkov ---   drivers/gpu/drm/msm/disp/

Re: [PATCH v3 2/3] drm/msm/dpu: split dpu_encoder_wait_for_event into two functions

2024-02-25 Thread Abhinav Kumar
On 2/25/2024 12:52 PM, Dmitry Baryshkov wrote: On Sun, 25 Feb 2024 at 21:49, Abhinav Kumar wrote: On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: Stop multiplexing several events via the dpu_encoder_wait_for_event() function. Split it into two distinct functions two allow separate handling

Re: [PATCH next v2 08/11] minmax: Add min_const() and max_const()

2024-02-25 Thread Dave Airlie
On Mon, 26 Feb 2024 at 07:26, David Laight wrote: > > ... > > Yes, yes, that may end up requiring getting rid of some current users of > > > > #define MIN(a,b) ((a)<(b) ? (a):(b)) > > > > but dammit, we don't actually have _that_ many of them, and why should > > we have random drivers doing that

Re: linux-next: build failure after merge of the drm-misc tree

2024-02-25 Thread Stephen Rothwell
Hi all, On Mon, 26 Feb 2024 08:41:16 +1100 Stephen Rothwell wrote: > > On Tue, 20 Feb 2024 08:48:21 +1100 Stephen Rothwell > wrote: > > > > On Mon, 12 Feb 2024 15:15:54 +0200 Jani Nikula > > wrote: > > > > > > On Tue, 06 Feb 2024, Stephen Rothwell wrote: > > > > > > > > After mergin

Re: linux-next: build failure after merge of the drm-misc tree

2024-02-25 Thread Stephen Rothwell
Hi all, On Tue, 20 Feb 2024 08:48:21 +1100 Stephen Rothwell wrote: > > On Mon, 12 Feb 2024 15:15:54 +0200 Jani Nikula > wrote: > > > > On Tue, 06 Feb 2024, Stephen Rothwell wrote: > > > > > > After merging the drm-misc tree, today's linux-next build (i386 defconfig) > > > failed like this:

RE: [PATCH next v2 08/11] minmax: Add min_const() and max_const()

2024-02-25 Thread David Laight
... > Yes, yes, that may end up requiring getting rid of some current users of > > #define MIN(a,b) ((a)<(b) ? (a):(b)) > > but dammit, we don't actually have _that_ many of them, and why should > we have random drivers doing that anyway? They look like they could be changed to min(). It is ev

RE: [PATCH next v2 08/11] minmax: Add min_const() and max_const()

2024-02-25 Thread David Laight
From: Linus Torvalds > Sent: 25 February 2024 17:14 > > On Sun, 25 Feb 2024 at 08:53, David Laight wrote: > > > > The expansions of min() and max() contain statement expressions so are > > not valid for static intialisers. > > min_const() and max_const() are expressions so can be used for static

Re: [PATCH v3 1/3] drm/msm/dpu: make "vblank timeout" more useful

2024-02-25 Thread Abhinav Kumar
On 2/25/2024 12:57 PM, Dmitry Baryshkov wrote: On Sun, 25 Feb 2024 at 21:44, Abhinav Kumar wrote: On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: We have several reports of vblank timeout messages. However after some debugging it was found that there might be different causes to that. To a

Re: [PATCH v3 1/3] drm/msm/dpu: make "vblank timeout" more useful

2024-02-25 Thread Dmitry Baryshkov
On Sun, 25 Feb 2024 at 21:44, Abhinav Kumar wrote: > > > > On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: > > We have several reports of vblank timeout messages. However after some > > debugging it was found that there might be different causes to that. > > To allow us to identify the DPU block tha

Re: [PATCH v3 2/3] drm/msm/dpu: split dpu_encoder_wait_for_event into two functions

2024-02-25 Thread Dmitry Baryshkov
On Sun, 25 Feb 2024 at 21:49, Abhinav Kumar wrote: > > > > On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: > > Stop multiplexing several events via the dpu_encoder_wait_for_event() > > function. Split it into two distinct functions two allow separate > > handling of those events. > > > > I understan

Re: [PATCH v3 3/3] drm/msm/dpu: capture snapshot on the first commit_done timeout

2024-02-25 Thread Abhinav Kumar
On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: In order to debug commit_done timeouts, capture the devcoredump state when the first timeout occurs after the encoder has been enabled. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 9 + 1 file chang

Re: [PATCH v3 2/3] drm/msm/dpu: split dpu_encoder_wait_for_event into two functions

2024-02-25 Thread Abhinav Kumar
On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: Stop multiplexing several events via the dpu_encoder_wait_for_event() function. Split it into two distinct functions two allow separate handling of those events. I understand the idea but would handling of those events be really distinct? Like

Re: [PATCH v3 1/3] drm/msm/dpu: make "vblank timeout" more useful

2024-02-25 Thread Abhinav Kumar
On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: We have several reports of vblank timeout messages. However after some debugging it was found that there might be different causes to that. To allow us to identify the DPU block that gets stuck, include the actual CTL_FLUSH value into the timeout m

[drm-misc:drm-misc-next 1/3] drivers/gpu/drm/i915/display/intel_dp.c:4233:8: error: call to undeclared function 'intel_dp_vsc_sdp_pack'; ISO C99 and later do not support implicit function declarations

2024-02-25 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next head: de8de2c8acb931ce6197a04376a7078ccf50e821 commit: 47f419e07111acecab3b529d4ae31a28985f5b61 [1/3] drm/dp: move intel_dp_vsc_sdp_pack() to generic helper config: i386-buildonly-randconfig-003-20240225 (https://download.01.org

Re: [PATCH next v2 08/11] minmax: Add min_const() and max_const()

2024-02-25 Thread Linus Torvalds
On Sun, 25 Feb 2024 at 08:53, David Laight wrote: > > The expansions of min() and max() contain statement expressions so are > not valid for static intialisers. > min_const() and max_const() are expressions so can be used for static > initialisers. I hate the name. Naming shouldn't be about an i

[PATCH next v2 11/11] minmax: min() and max() don't need to return constant expressions

2024-02-25 Thread David Laight
After changing the handful of places max() was used to size an on-stack array to use max_const() it is no longer necessary for min() and max() to return constant expressions from constant inputs. Remove the associated logic to reduce the expanded text. Remove the 'hack' that allowed max(bool, bool

[PATCH next v2 10/11] block: Use a boolean expression instead of max() on booleans

2024-02-25 Thread David Laight
blk_stack_limits() contains: t->zoned = max(t->zoned, b->zoned); These are bool, so can be replaced by bitwise or. However it generates: error: comparison of constant '0' with boolean expression is always true [-Werror=bool-compare] inside the signedness check that max() does unless a '+ 0

[PATCH next v2 09/11] tree-wide: minmax: Replace all the uses of max() for array sizes with max_const()

2024-02-25 Thread David Laight
These are the only uses of max() that require a constant value from constant parameters. There don't seem to be any similar uses of min(). Replacing the max() by max_const() lets min()/max() be simplified speeding up compilation. max_const() will convert enums to int (or unsigned int) so that the

[PATCH next v2 08/11] minmax: Add min_const() and max_const()

2024-02-25 Thread David Laight
The expansions of min() and max() contain statement expressions so are not valid for static intialisers. min_const() and max_const() are expressions so can be used for static initialisers. The arguments are checked for being constant and for negative signed values being converted to large unsigned

[PATCH next v2 07/11] minmax: minmax: Add __types_ok3() and optimise defines with 3 arguments

2024-02-25 Thread David Laight
min3() and max3() were added to optimise nested min(x, min(y, z)) sequences, but only moved where the expansion was requiested. Add a separate implementation for 3 argument calls. These are never required to generate constant expressions to remove that logic. Signed-off-by: David Laight --- inc

[PATCH next v2 06/11] minmax: Remove 'constexpr' check from __careful_clamp()

2024-02-25 Thread David Laight
Nothing requires that clamp() return a constant expression. The logic to do so significantly increases the .i file. Remove the check and directly expand __clamp_once() from clamp_t() since the type check can't fail. Signed-off-by: David Laight --- include/linux/minmax.h | 14 +++--- 1 fi

[PATCH next v2 05/11] minmax: Move the signedness check out of __cmp_once() and __clamp_once()

2024-02-25 Thread David Laight
There is no need to do the signedness/type check when the arguments are being cast to a fixed type. So move the check out of __xxx_once() into __careful_xxx(). Signed-off-by: David Laight --- include/linux/minmax.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) Changes for

[PATCH next v2 04/11] minmax: Replace multiple __UNIQUE_ID() by directly using __COUNTER__

2024-02-25 Thread David Laight
Provided __COUNTER__ is passed through an extra #define it can be pasted onto multiple local variables to give unique names. This saves having 3 __UNIQUE_ID() for #defines with three locals and look less messy in general. Stop the umin()/umax() lines being overlong by factoring out the zero-extens

[PATCH next v2 03/11] minmax: Simplify signedness check

2024-02-25 Thread David Laight
It is enough to check that both 'x' and 'y' are valid for either a signed compare or an unsigned compare. For unsigned they must be an unsigned type or a positive constant. For signed they must be signed after unsigned char/short are promoted. The predicate for _Static_assert() only needs to be a

[PATCH next v2 02/11] minmax: Use _Static_assert() instead of static_assert()

2024-02-25 Thread David Laight
The wrapper just adds two more lines of error output when the test fails. Signed-off-by: David Laight --- include/linux/minmax.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) Changes for v2: - Typographical and spelling corrections to the commit messages. Patches unchanged. d

[PATCH next v2 01/11] minmax: Put all the clamp() definitions together

2024-02-25 Thread David Laight
The defines for clamp() have got separated, move togther for readability. Update description of signedness check. Signed-off-by: David Laight --- include/linux/minmax.h | 120 +++-- 1 file changed, 56 insertions(+), 64 deletions(-) Changes for v2: - Typograph

Re: [PATCH v2 5/6] drm/panel: st7703: Drive XBD599 panel at higher clock rate

2024-02-25 Thread Frank Oltmanns
Hi Maxime, On 2024-02-22 at 11:29:51 +0100, Maxime Ripard wrote: > [[PGP Signed Part:Undecided]] > On Sun, Feb 11, 2024 at 04:42:43PM +0100, Frank Oltmanns wrote: >> >> On 2024-02-08 at 20:05:08 +0100, Maxime Ripard wrote: >> > [[PGP Signed Part:Undecided]] >> > Hi Frank, >> > >> > On Mon, Feb 0

[PATCH next v2 00/11] minmax: Optimise to reduce .i line length

2024-02-25 Thread David Laight
The changes to minmax.h that changed the type check to a signedness check significantly increased the length of the expansion. In some cases it has also significantly increased compile type. This is particularly noticable for nested expansions. The fact that _Static_assert() only requires a compil

Re: [PATCH v7 25/36] drm/connector: hdmi: Add Infoframes generation

2024-02-25 Thread Dmitry Baryshkov
On Thu, 22 Feb 2024 at 20:16, Maxime Ripard wrote: > > Infoframes in KMS is usually handled by a bunch of low-level helpers > that require quite some boilerplate for drivers. This leads to > discrepancies with how drivers generate them, and which are actually > sent. > > Now that we have everythin

Re: [PATCH v7 00/36] drm/connector: Create HDMI Connector infrastructure

2024-02-25 Thread Dmitry Baryshkov
Hi Maxime, On Thu, 22 Feb 2024 at 20:14, Maxime Ripard wrote: > > Hi, > > Here's a series that creates some extra infrastructure specifically > targeted at HDMI controllers. > > The idea behind this series came from a recent discussion on IRC during > which we discussed infoframes generation of i

[PATCH v3 3/3] drm/msm/dpu: capture snapshot on the first commit_done timeout

2024-02-25 Thread Dmitry Baryshkov
In order to debug commit_done timeouts, capture the devcoredump state when the first timeout occurs after the encoder has been enabled. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/msm

[PATCH v3 1/3] drm/msm/dpu: make "vblank timeout" more useful

2024-02-25 Thread Dmitry Baryshkov
We have several reports of vblank timeout messages. However after some debugging it was found that there might be different causes to that. To allow us to identify the DPU block that gets stuck, include the actual CTL_FLUSH value into the timeout message. Signed-off-by: Dmitry Baryshkov --- driv

[PATCH v3 2/3] drm/msm/dpu: split dpu_encoder_wait_for_event into two functions

2024-02-25 Thread Dmitry Baryshkov
Stop multiplexing several events via the dpu_encoder_wait_for_event() function. Split it into two distinct functions two allow separate handling of those events. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 74 + drivers/gpu/drm/ms

[PATCH v3 0/3] drm/msm/dpu: debug commit_done timeouts

2024-02-25 Thread Dmitry Baryshkov
In order to debug commit_done timeouts ([1]) display the sticky bits of the CTL_FLUSH register and capture the devcore dump when the first such timeout occurs. [1] https://gitlab.freedesktop.org/drm/msm/-/issues/33 Signed-off-by: Dmitry Baryshkov --- Changes in v3: - Capture the snapshot only on

Re: [PATCH v7 19/36] drm/connector: hdmi: Compute bpc and format automatically

2024-02-25 Thread Alex Bee
Hi Maxime, Am 22.02.24 um 19:14 schrieb Maxime Ripard: Now that we have all the infrastructure needed, we can add some code that will, for a given connector state and mode, compute the best output format and bpc. The algorithm is equivalent to the one already found in i915 and vc4. Signed-off-

Re: [PATCH 01/13] accel/habanalabs/gaudi2: use single function to compare FW versions

2024-02-25 Thread Ohad Sharabi
On 24/02/2024 0:38, Carl Vanderlip wrote: > [You don't often get email from quic_ca...@quicinc.com. Learn why this > is important at https://aka.ms/LearnAboutSenderIdentification ] > > On 2/20/2024 8:01 AM, Oded Gabbay wrote:> From: Ohad Sharabi > > > > > Currently, the code contains 2 types of F

Re: [drm-drm-misc:drm-misc-next v2] dt-bindings: nt35510: document 'port' property

2024-02-25 Thread Dario Binacchi
Hi, On Wed, Feb 14, 2024 at 10:47 AM Alexandre TORGUE wrote: > > Hi Heiko > > On 1/31/24 16:53, Conor Dooley wrote: > > On Wed, Jan 31, 2024 at 10:28:44AM +0100, Dario Binacchi wrote: > >> Allow 'port' property (coming from panel-common.yaml) to be used in DTS: > >> > >>st/stm32f769-disco-mb1

Re: [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-02-25 Thread Kent Overstreet
On Fri, Feb 23, 2024 at 01:46:53PM -0500, Steven Rostedt wrote: > On Fri, 23 Feb 2024 10:30:45 -0800 > Jeff Johnson wrote: > > > On 2/23/2024 9:56 AM, Steven Rostedt wrote: > > > From: "Steven Rostedt (Google)" > > > > > > [ > > >This is a treewide change. I will likely re-create this patch

[PATCH 0/3] panel-simple: add support for Crystal Clear CMT430B19N00

2024-02-25 Thread Jérémie Dautheribes
This patch series add support for the Crystal Clear Technology CMT430B19N00 4.3" 480x272 TFT-LCD panel. It also adds Crystal Clear Technology to vendor-prefixes.yaml. Please note that unfortunately there is no public datasheet available for this panel. Jérémie Dautheribes (3): dt-bindings: Add

[PATCH 3/3] drm/panel: simple: add CMT430B19N00 LCD panel support

2024-02-25 Thread Jérémie Dautheribes
Add support for Crystal Clear Technology CMT430B19N00 4.3" 480x272 TFT-LCD panel. Signed-off-by: Jérémie Dautheribes --- drivers/gpu/drm/panel/panel-simple.c | 29 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/

Re: [PATCH v2 2/7] clk: qcom: clk-alpha-pll: Add HUAYRA_2290 support

2024-02-25 Thread Trilok Soni
On 2/23/2024 1:21 PM, Konrad Dybcio wrote: > + /* Wait 50us for PLL_LOCK_DET bit to go high */ > + usleep_range(50, 55); > + > + /* Enable PLL output */ > + regmap_update_bits(regmap, PLL_MODE(pll), PLL_OUTCTRL, PLL_OUTCTRL); > +} > +EXPORT_SYMBOL(clk_huayra_2290_pll_configure); Pl

[PATCH 1/3] dt-bindings: Add Crystal Clear Technology vendor prefix

2024-02-25 Thread Jérémie Dautheribes
Update Documentation/devicetree/bindings/vendor-prefixes.yaml to include "cct" as a vendor prefix for "Crystal Clear Technology". CCT is the vendor of the CMT430B19N00 TFT-LCD panel. Signed-off-by: Jérémie Dautheribes --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file chan

[PATCH 2/3] dt-bindings: display: simple: add support for Crystal Clear CMT430B19N00

2024-02-25 Thread Jérémie Dautheribes
Add Crystal Clear Technology CMT430B19N00 4.3" 480x272 TFT-LCD panel compatible string. Signed-off-by: Jérémie Dautheribes --- .../devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/pan

Re: [PATCH 2/2] drm/tiny: Add driver for the sharp LS027B7DH01 Memory LCD

2024-02-25 Thread Mehdi Djait
Hi Thomas, Thank you for the review. On Wed, Nov 29, 2023 at 05:21:19PM +0100, Thomas Zimmermann wrote: > Hi, > > thanks for the patches. > > Am 29.11.23 um 15:29 schrieb Mehdi Djait: > > Introduce a DRM driver for the sharp LS027B7DH01 Memory LCD. > > > > LS027B7DH01 is a 2.7" 400x240 monoch

[PATCH v12 6/8] udmabuf: Convert udmabuf driver to use folios

2024-02-25 Thread Vivek Kasireddy
This is mainly a preparatory patch to use memfd_pin_folios() API for pinning folios. Using folios instead of pages makes sense as the udmabuf driver needs to handle both shmem and hugetlb cases. However, the function vmap_udmabuf() still needs a list of pages; so, we collect all the head pages into

[PATCH v12 7/8] udmabuf: Pin the pages using memfd_pin_folios() API

2024-02-25 Thread Vivek Kasireddy
Using memfd_pin_folios() will ensure that the pages are pinned correctly using FOLL_PIN. And, this also ensures that we don't accidentally break features such as memory hotunplug as it would not allow pinning pages in the movable zone. Using this new API also simplifies the code as we no longer ha

[PATCH v12 8/8] selftests/udmabuf: Add tests to verify data after page migration

2024-02-25 Thread Vivek Kasireddy
Since the memfd pages associated with a udmabuf may be migrated as part of udmabuf create, we need to verify the data coherency after successful migration. The new tests added in this patch try to do just that using 4k sized pages and also 2 MB sized huge pages for the memfd. Successful completion

[PATCH v12 4/8] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2024-02-25 Thread Vivek Kasireddy
Add VM_PFNMAP to vm_flags in the mmap handler to ensure that the mappings would be managed without using struct page. And, in the vm_fault handler, use vmf_insert_pfn to share the page's pfn to userspace instead of directly sharing the page (via struct page *). Cc: David Hildenbrand Cc: Daniel V

[PATCH v12 0/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-02-25 Thread Vivek Kasireddy
Currently, some drivers (e.g, Udmabuf) that want to longterm-pin the pages/folios associated with a memfd, do so by simply taking a reference on them. This is not desirable because the pages/folios may reside in Movable zone or CMA block. Therefore, having drivers use memfd_pin_folios() API ensure

[PATCH v12 2/8] mm/gup: Introduce check_and_migrate_movable_folios()

2024-02-25 Thread Vivek Kasireddy
This helper is the folio equivalent of check_and_migrate_movable_pages(). Therefore, all the rules that apply to check_and_migrate_movable_pages() also apply to this one as well. Currently, this helper is only used by memfd_pin_folios(). This patch also includes changes to rename and convert the i

[PATCH v12 5/8] udmabuf: Add back support for mapping hugetlb pages

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

[PATCH v12 1/8] mm/gup: Introduce unpin_folio/unpin_folios helpers

2024-02-25 Thread Vivek Kasireddy
These helpers are the folio versions of unpin_user_page/unpin_user_pages. They are currently only useful for unpinning folios pinned by memfd_pin_folios() or other associated routines. However, they could find new uses in the future, when more and more folio-only helpers are added to GUP. Cc: Davi

[PATCH v12 3/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-02-25 Thread Vivek Kasireddy
For drivers that would like to longterm-pin the folios associated with a memfd, the memfd_pin_folios() API provides an option to not only pin the folios via FOLL_PIN but also to check and migrate them if they reside in movable zone or CMA block. This API currently works with memfds but it should wo