Re: [PATCH v1 24/35] drm/vc4: vec: Add support for more analog TV standards

2022-07-29 Thread Mateusz Kwiatkowski
Hi Maxime, I think that declaring PAL-B and SECAM-B as the only supported 576i norms is a bit random. Norms B, D, G, H, I, K, K1 and L (for both PAL and SECAM) are essentially identical if we're talking about baseband signals, AFAIK they only differ when those are modulated as RF signals. I'

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

2022-07-29 Thread Mateusz Kwiatkowski
Hi Maxime, 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 and generates sync autonomously, so the slight differences will only

Re: [PATCH v1 14/35] drm/atomic-helper: Add an analog TV atomic_check implementation

2022-07-29 Thread Mateusz Kwiatkowski
Hi Maxime, I'm pretty sure that PAL-60 and SECAM-60 should be tied to the 480i mode. Those are non-standard "norms" that use 60 Hz sync (which is largely synonymous with 480i in the analog TV world) with PAL/SECAM color encoding. Best regards, Mateusz Kwiatkowski W dniu 29.07.2022 o 18:34,

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

2022-07-29 Thread kernel test robot
10844 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6e2c0490769ef8a95b61304389116ccc85c53e12 config: arm-randconfig-r033-20220729 (https://download.01.org/0day-ci/archive/20220730/202207301450.m4ick2bg-...@intel.com/config) compiler: clang version 16.0.0 (https://github.com

Re: Stack-frame warnings in display_mode_vba_32.c

2022-07-29 Thread Paul E. McKenney
On Fri, Jul 29, 2022 at 11:41:55PM -0300, André Almeida wrote: > Hi Paul, > > Às 23:25 de 29/07/22, Paul E. McKenney escreveu: > > Hello! > > > > I am seeing the following in allmodconfig builds of recent -next on x86: > > > > drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_3

[PATCHv2 -next] drm/amdgpu: double free error and freeing uninitialized null pointer

2022-07-29 Thread Sebin Sebastian
Fix a double free and an uninitialized pointer read error. Both tmp and new are pointing at same address and both are freed which leads to double free. Adding a check to verify if new and tmp are free in the error_free label fixes the double free issue. new is not initialized to null which also lea

Re: [PATCH v1 22/35] drm/vc4: vec: Use TV Reset implementation

2022-07-29 Thread kernel test robot
Hi Maxime, I love your patch! Perhaps something to improve: [auto build test WARNING on 37b355fdaf31ee18bda9a93c2a438dc1cbf57ec9] url: https://github.com/intel-lab-lkp/linux/commits/Maxime-Ripard/drm-Analog-TV-Improvements/20220730-004859 base: 37b355fdaf31ee18bda9a93c2a438dc1cbf57ec9 conf

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

2022-07-29 Thread kernel test robot
10844 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6e2c0490769ef8a95b61304389116ccc85c53e12 config: m68k-randconfig-s032-20220729 (https://download.01.org/0day-ci/archive/20220730/202207301057.kvtytw6h-...@intel.com/config) compiler: m68k-linux-gcc (GCC) 12.1.0

Re: Stack-frame warnings in display_mode_vba_32.c

2022-07-29 Thread André Almeida
Hi Paul, Às 23:25 de 29/07/22, Paul E. McKenney escreveu: > Hello! > > I am seeing the following in allmodconfig builds of recent -next on x86: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c: In > function > ‘DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermark

Stack-frame warnings in display_mode_vba_32.c

2022-07-29 Thread Paul E. McKenney
Hello! I am seeing the following in allmodconfig builds of recent -next on x86: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c: In function ‘DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation’: drivers/gpu/drm/amd/amdgpu/../display/dc/dml

[PATCH v2 3/3] drm/amd/display: include missing headers

2022-07-29 Thread Magali Lemes
Add missing headers to solve the following warnings from sparse: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:656:17: warning: symbol 'ddr4_wm_table_gs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/dcn20_fpu.c:693:17: warning: symbol

[PATCH v2 2/3] drm/amd/display: remove header from source file

2022-07-29 Thread Magali Lemes
Since "rn_clk_mgr.h" needs ‘struct clk_mgr_internal’ which is declared in "clk_mgr_internal.h", include "clk_mgr_internal.h" in "rn_clk_mgr.h" instead of in its source file. Because of the change above, change the order of '#include "rn_clk_mgr.h"', so that the necessary structs are visible to dcn2

[PATCH v2 1/3] drm/amd/display: make variables static

2022-07-29 Thread Magali Lemes
As "dcn3_1_soc", "dcn3_15_soc", and "dcn3_16_soc" are not used outside of their corresponding "dcn3*_fpu.c", make them static and remove their extern declaration. Fixes: 26f4712aedbd ("drm/amd/display: move FPU related code from dcn31 to dml/dcn31 folder") Fixes: fa896297b31b ("drm/amd/display: m

Re: [PATCH v3 03/11] clk: fixed-factor: Introduce *clk_hw_register_fixed_factor_parent_hw()

2022-07-29 Thread Stephen Boyd
Quoting Marijn Suijten (2022-06-29 15:53:23) > Add the devres and non-devres variant of > clk_hw_register_fixed_factor_parent_hw() for registering a fixed factor > clock with clk_hw parent pointer instead of parent name. > > Signed-off-by: Marijn Suijten > --- Applied to clk-next

Re: [PATCH v3 02/11] clk: mux: Introduce devm_clk_hw_register_mux_parent_hws()

2022-07-29 Thread Stephen Boyd
Quoting Marijn Suijten (2022-06-29 15:53:22) > Add the devres variant of clk_hw_register_mux_hws() for registering a > mux clock with clk_hw parent pointers instead of parent names. > > Signed-off-by: Marijn Suijten > Reviewed-by: Dmitry Baryshkov > --- Applied to clk-next

Re: [PATCH v3 01/11] clk: divider: Introduce devm_clk_hw_register_divider_parent_hw()

2022-07-29 Thread Stephen Boyd
Quoting Marijn Suijten (2022-06-29 15:53:21) > Add the devres variant of clk_hw_register_divider_parent_hw() for > registering a divider clock with clk_hw parent pointer instead of parent > name. > > Signed-off-by: Marijn Suijten > Reviewed-by: Dmitry Baryshkov > --- Applied to clk-next

Re: [PATCH v3 00/11] drm/msm/dsi_phy: Replace parent names with clk_hw pointers

2022-07-29 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-07-14 03:19:12) > On 30/06/2022 01:53, Marijn Suijten wrote: > > Marijn Suijten (11): > >clk: divider: Introduce devm_clk_hw_register_divider_parent_hw() > >clk: mux: Introduce devm_clk_hw_register_mux_parent_hws() > >clk: fixed-factor: Introduce *clk_hw_r

Re: [PATCH] dt-bindings: display: use spi-peripheral-props.yaml

2022-07-29 Thread Rob Herring
On Wed, 27 Jul 2022 18:43:12 +0200, Krzysztof Kozlowski wrote: > Instead of listing directly properties typical for SPI peripherals, > reference the spi-peripheral-props.yaml schema. This allows using all > properties typical for SPI-connected devices, even these which device > bindings author did

Re: [RFC PATCH 1/2] drm/panel-edp: Allow overriding the eDP EDID

2022-07-29 Thread Doug Anderson
Hi, On Thu, Jul 21, 2022 at 4:36 AM Dmitry Baryshkov wrote: > > On Thu, 21 Jul 2022 at 01:55, Douglas Anderson wrote: > > > > I found that writing to `/sys/kernel/debug/dri/*/eDP*/edid_override` > > wasn't working for me. I could see the new EDID take effect in > > `/sys/class/drm/card*-eDP*/edi

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

2022-07-29 Thread kernel test robot
10844 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6e2c0490769ef8a95b61304389116ccc85c53e12 config: arc-randconfig-r043-20220729 (https://download.01.org/0day-ci/archive/20220730/202207300546.hb4u217w-...@intel.com/config) compiler: arceb-elf-gcc (GCC) 12.1.0 reproduc

Re: [git pull] drm fixes for 5.19 final (part 2)

2022-07-29 Thread pr-tracker-bot
The pull request you sent on Sat, 30 Jul 2022 06:24:26 +1000: > git://anongit.freedesktop.org/drm/drm tags/drm-fixes-2022-07-30 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/e65c6a46df94c8d76ea1129eb2d4564670c6f214 Thank you! -- Deet-doot-dot, I am a bot. https://k

[pull] amdgpu, amdkfd drm-next-5.20

2022-07-29 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.20. Mainly for new IPs. The following changes since commit 2bc7ea71a73747a77e7f83bc085b0d2393235410: Merge tag 'topic/nouveau-misc-2022-07-27' of git://anongit.freedesktop.org/drm/drm into drm-next (2022-07-27 11:34:07 +1000) are available in the Git repository

[git pull] drm fixes for 5.19 final (part 2)

2022-07-29 Thread Dave Airlie
Hey Linus, Maxime had the dog^Wmailing list server eat his homework^Wmisc pull request. Two more small fixes, one in nouveau svm code and the other in simpledrm. Thanks, Dave. drm-fixes-2022-07-30: drm fixes for 5.19 final (part 2) nouveau: - page migration fix simpledrm: - fix mode_valid retu

Re: [PATCH v1 33/35] drm/connector: Remove TV modes property

2022-07-29 Thread kernel test robot
: riscv-randconfig-r042-20220729 (https://download.01.org/0day-ci/archive/20220730/202207300454.3ric8wpm-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8dfaecc4c24494337933aff9d9166486ca0949f1) reproduce (this is a W=1 build): wget https

Re: [PATCH v1 33/35] drm/connector: Remove TV modes property

2022-07-29 Thread kernel test robot
: hexagon-randconfig-r041-20220729 (https://download.01.org/0day-ci/archive/20220730/202207300305.egsdojh4-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8dfaecc4c24494337933aff9d9166486ca0949f1) reproduce (this is a W=1 build): wget https

Re: [RFC PATCH] drm/edid: Make 144 Hz not preferred on Sharp LQ140M1JW46

2022-07-29 Thread Doug Anderson
Hi, On Fri, Jul 29, 2022 at 9:41 AM Maxime Ripard wrote: > > On Fri, Jul 29, 2022 at 07:50:20AM -0700, Doug Anderson wrote: > > On Fri, Jul 29, 2022 at 12:51 AM Maxime Ripard wrote: > > > > > > On Thu, Jul 28, 2022 at 02:18:38PM -0700, Doug Anderson wrote: > > > > Hi, > > > > > > > > On Thu, Jul

[PATCH 2/3] drm/prime: Wire up mmap_info support

2022-07-29 Thread Rob Clark
From: Rob Clark Just plumbing the thing thru an extra layer. Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_prime.c | 12 include/drm/drm_drv.h | 7 +++ 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index e3f

[PATCH 3/3] drm/msm/prime: Add mmap_info support

2022-07-29 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 1 + drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/msm/msm_gem_prime.c | 11 +++ 3 files changed, 13 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.

[PATCH 0/3] dma-buf: map-info support

2022-07-29 Thread Rob Clark
From: Rob Clark See 1/3 for motivation. Rob Clark (3): dma-buf: Add ioctl to query mmap info drm/prime: Wire up mmap_info support drm/msm/prime: Add mmap_info support drivers/dma-buf/dma-buf.c | 26 ++ drivers/gpu/drm/drm_prime.c | 12 +++

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

2022-07-29 Thread 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, virglrenderer returns a dma-buf fd to the VMM (cros

Re: [PATCH v3 09/15] drm/gem: Add LRU/shrinker helper

2022-07-29 Thread Dmitry Osipenko
On 7/29/22 18:40, Rob Clark wrote: > On Fri, Jul 29, 2022 at 8:27 AM Dmitry Osipenko > wrote: >> >> On 7/26/22 20:50, Rob Clark wrote: >>> +/** >>> + * drm_gem_lru_move_tail_locked - move the object to the tail of the LRU >>> + * >>> + * If the object is already in this LRU it will be moved to the

[PATCH v1 16/35] drm/vc4: vec: Convert to atomic helpers

2022-07-29 Thread Maxime Ripard
The VC4 VEC driver still uses legacy enable and disable hook implementation. Let's convert to the atomic variants. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index 17a6afac61cd..ba0a81250d08 100644 --- a/drivers/gpu/drm/vc4/vc4_vec.c +

[PATCH v1 27/35] drm/sun4i: tv: Merge mode_set into atomic_enable

2022-07-29 Thread Maxime Ripard
Our mode_set implementation can be merged into our atomic_enable implementation to simplify things, so let's do this. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index f7aad995ab5b..3944da9a3c34 100644 --- a/drivers/gpu/drm/sun4i/

[PATCH v1 03/35] drm/atomic: Add TV subconnector property to get/set_property

2022-07-29 Thread Maxime Ripard
The subconnector property was created by drm_mode_create_tv_properties(), but wasn't exposed to the userspace through the generic atomic_get/set_property implementation, and wasn't stored in any generic state structure. Let's solve this. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm

[PATCH v1 22/35] drm/vc4: vec: Use TV Reset implementation

2022-07-29 Thread Maxime Ripard
The analog TV properties created by the drm_mode_create_tv_properties() are not properly initialised at reset. Let's switch our implementation to call drm_atomic_helper_connector_tv_reset(). Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c i

[PATCH v1 26/35] drm/sun4i: tv: Convert to atomic hooks

2022-07-29 Thread Maxime Ripard
The VC4 VEC driver still uses legacy enable and disable hook implementation. Let's convert to the atomic variants. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index 53152d77c392..f7aad995ab5b 100644 --- a/drivers/gpu/drm/sun4i/sun

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

2022-07-29 Thread Maxime Ripard
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 parameters and modes. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 06a006e0b2e3..e85099df0326

[PATCH v1 06/35] drm/connector: Only register TV mode property if present

2022-07-29 Thread Maxime Ripard
The drm_create_tv_properties() will create the TV mode property unconditionally. However, since we'll gradually phase it out, let's register it only if we have a list passed as an argument. This will make the transition easier. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/drm_conne

[PATCH v1 33/35] drm/connector: Remove TV modes property

2022-07-29 Thread Maxime Ripard
Now that all the other drivers have been converted to the new style TV mode property, let's get rid of the old one. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index d7ff6c644c2f..d52e87e8e6aa 100644 --- a/drivers/gpu/drm/drm_a

[PATCH v1 19/35] drm/vc4: vec: Fix timings for VEC modes

2022-07-29 Thread Maxime Ripard
From: Mateusz Kwiatkowski This commit fixes vertical timings of the VEC (composite output) modes to accurately represent the 525-line ("NTSC") and 625-line ("PAL") ITU-R standards. Previous timings were actually defined as 502 and 601 lines, resulting in non-standard 62.69 Hz and 52 Hz signals b

[PATCH v1 29/35] drm/sun4i: tv: Remove useless destroy function

2022-07-29 Thread Maxime Ripard
Our destroy implementation is just calling the generic helper, so let's just remove our function and directly use the helper. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index 52bbba8f19dc..6d7e1d51569a 100644 --- a/drivers/gpu/dr

[PATCH v1 12/35] drmi/modes: Properly generate a drm_display_mode from a named mode

2022-07-29 Thread Maxime Ripard
The framework will get the drm_display_mode from the drm_cmdline_mode it got by parsing the video command line argument by calling drm_connector_pick_cmdline_mode(). The heavy lifting will then be done by the drm_mode_create_from_cmdline_mode() function. In the case of the named modes though, the

[PATCH v1 35/35] drm/modes: Introduce more named modes

2022-07-29 Thread Maxime Ripard
Now that we can easily extend the named modes list, let's add a few more analog TV modes that were used in the wild, and some unit tests to make sure it works as intended. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 3634ac9f787d..09ed

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

2022-07-29 Thread Maxime Ripard
Multiple drivers (meson, vc4) define the analog TV 525-lines and 625-lines modes in the drivers. Since those modes are fairly standards, and that we'll need to use them in more places in the future, let's move the meson definition into the framework. The meson one was chosen because vc4's isn't a

[PATCH v1 18/35] drm/vc4: vec: Remove redundant atomic_mode_set

2022-07-29 Thread Maxime Ripard
From: Mateusz Kwiatkowski Let's remove the superfluous tv_mode field, which was redundant with the mode field in struct drm_tv_connector_state. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index 02ce

[PATCH v1 28/35] drm/sun4i: tv: Remove useless function

2022-07-29 Thread Maxime Ripard
The drm_connector_to_sun4i_tv() function isn't used anywhere in the driver, so let's remove it. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index 3944da9a3c34..52bbba8f19dc 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tv.c +++ b/drive

[PATCH v1 17/35] drm/vc4: vec: Refactor VEC TV mode setting

2022-07-29 Thread Maxime Ripard
From: Mateusz Kwiatkowski Change the mode_set function pointer logic to declarative config0, config1 and custom_freq fields, to make TV mode setting logic more concise and uniform. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/dri

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

2022-07-29 Thread Maxime Ripard
Some video= options might have a value that contains a dash. However, the command line parsing mode considers all dashes as the separator between the mode and the bpp count. Let's rework the parsing code a bit to only consider a dash as the bpp separator if it before a comma, the options separator

[PATCH v1 15/35] drm/vc4: vec: Remove empty mode_fixup

2022-07-29 Thread Maxime Ripard
The mode_fixup hooks are deprecated, and the behaviour we implement is the default one anyway. Let's remove it. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index 457529e5d857..17a6afac61cd 100644 --- a/drivers/gpu/drm/vc4/vc4_vec.c +++

[PATCH v1 25/35] drm/sun4i: tv: Remove unused mode_valid

2022-07-29 Thread Maxime Ripard
The mode_valid implementation is pretty much a nop, let's remove it. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index 94883abe0dfd..53152d77c392 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tv.c +++ b/drivers/gpu/drm/sun4i/sun4i_tv.c

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

2022-07-29 Thread 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, its content isn't and has been driver-specific which makes it hard to build any generic behaviour on top of it, both in kernel and

[PATCH v1 31/35] drm/sun4i: tv: Add missing reset assertion

2022-07-29 Thread Maxime Ripard
The reset line is deasserted at bind, and asserted if we ever encounter an error there. However, it's never deasserted in unbind which will lead to a resource unbalance. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index ad6a3739bf

[PATCH v1 32/35] drm/sun4i: tv: Convert to the new TV mode property

2022-07-29 Thread Maxime Ripard
Now that the core can deal fine with analog TV modes, let's convert the sun4i TV driver to leverage those new features. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index 74ff5ad6a8b9..bed52423776e 100644 --- a/drivers/gpu/drm/sun4

[PATCH v1 11/35] drm/modes: Fill drm_cmdline mode from named modes

2022-07-29 Thread Maxime Ripard
The current code to deal with named modes will only set the mode name, and then it's up to drivers to try to match that name to whatever mode or configuration they see fit. The plan is to remove that need and move the named mode handling out of drivers and into the core, and only rely on modes and

[PATCH v1 24/35] drm/vc4: vec: Add support for more analog TV standards

2022-07-29 Thread Maxime Ripard
From: Mateusz Kwiatkowski Add support for the following composite output modes (all of them are somewhat more obscure than the previously defined ones): - NTSC_443 - NTSC-style signal with the chroma subcarrier shifted to 4.43361875 MHz (the PAL subcarrier frequency). Never used for broadcas

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

2022-07-29 Thread Maxime Ripard
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 artifact, to set that property directly from the kernel command line. Let's add some code to allow it, and some unit tests to exercise that code. Signed-off-by

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

2022-07-29 Thread Maxime Ripard
Now that the core has a definition for the 525 and 625 lines analog TV modes, let's switch to it for vc4. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index 8f30a530b2d5..255bba563fce 100644 --- a/drivers/gpu/drm/vc4/vc4_vec.c +++ b/driv

[PATCH v1 08/35] drm/client: Add some tests for drm_connector_pick_cmdline_mode()

2022-07-29 Thread Maxime Ripard
drm_connector_pick_cmdline_mode() is in charge of finding a proper drm_display_mode from the definition we got in the video= command line argument. Let's add some unit tests to make sure we're not getting any regressions there. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/drm_clien

[PATCH v1 14/35] drm/atomic-helper: Add an analog TV atomic_check implementation

2022-07-29 Thread Maxime Ripard
The analog TV connector drivers share some atomic_check logic, and the new TV standard property have created a bunch of new constraints that needs to be shared across drivers too. Let's create an atomic_check helper for those use cases. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/

[PATCH v1 21/35] drm/vc4: vec: Fix definition of PAL-M mode

2022-07-29 Thread Maxime Ripard
From: Mateusz Kwiatkowski PAL-M is a Brazilian analog TV standard that uses a PAL-style chroma subcarrier at 3.575611[888111] MHz on top of 525-line (480i60) timings. This commit makes the driver actually use the proper VEC preset for this mode instead of just changing PAL subcarrier frequency.

[PATCH v1 13/35] drm/atomic-helper: Add a TV properties reset helper

2022-07-29 Thread Maxime Ripard
The drm_tv_create_properties() function will create a bunch of properties, but it's up to each and every driver using that function to properly reset the state of these properties leading to inconsistent behaviours. Let's create a helper that will take care of it. Signed-off-by: Maxime Ripard d

[PATCH v1 10/35] drm/modes: Switch to named mode descriptors

2022-07-29 Thread Maxime Ripard
The current named mode parsing relies only the mode name, and doesn't allow to specify any other parameter. Let's convert that string list to an array of a custom structure that will hold the name and some additional parameters in the future. Signed-off-by: Maxime Ripard diff --git a/drivers/gp

[PATCH v1 30/35] drm/sun4i: tv: Rename error label

2022-07-29 Thread Maxime Ripard
The other error labels in sun4i_tv_bind() are named after the task they perform (err_disable_clk to call clk_disable_unprepare for example). However, the err_cleanup_connector is named after the calling site (drm_connector_init failing) and will actually cleanup the encoder. Let's rename it to err

[PATCH v1 23/35] drm/vc4: vec: Convert to the new TV mode property

2022-07-29 Thread Maxime Ripard
Now that the core can deal fine with analog TV modes, let's convert the vc4 VEC driver to leverage those new features. We've added some backward compatibility to support the old TV mode property and translate it into the new TV norm property. Signed-off-by: Maxime Ripard diff --git a/drivers/gp

Re: [PATCH v2] drm/tests: Split up test cases in igt_check_drm_format_min_pitch

2022-07-29 Thread Melissa Wen
On 07/29, Maíra Canal wrote: > The igt_check_drm_format_min_pitch() function had a lot of > KUNIT_EXPECT_* calls, all of which ended up allocating and initializing > various test assertion structures on the stack. > > This behavior was producing -Wframe-larger-than warnings on PowerPC, i386, > and

Re: [RFC PATCH] drm/edid: Make 144 Hz not preferred on Sharp LQ140M1JW46

2022-07-29 Thread Maxime Ripard
On Fri, Jul 29, 2022 at 07:50:20AM -0700, Doug Anderson wrote: > On Fri, Jul 29, 2022 at 12:51 AM Maxime Ripard wrote: > > > > On Thu, Jul 28, 2022 at 02:18:38PM -0700, Doug Anderson wrote: > > > Hi, > > > > > > On Thu, Jul 28, 2022 at 10:34 AM Abhinav Kumar > > > wrote: > > > > > > > > Hi Rob an

RE: [PATCH] drm/kmb: fix dereference before NULL check in kmb_plane_atomic_update()

2022-07-29 Thread Chrisanthus, Anitha
Agree with Thomas, drm_atomic_commit() will not call kmb_atomic_update() with a NULL plane. This is not an actual bug. Thanks, Anitha > -Original Message- > From: Thomas Zimmermann > Sent: Friday, July 29, 2022 7:26 AM > To: Zeng Jingxiang ; Chrisanthus, Anitha > ; edmund.j@intel.c

[PATCH v1 02/35] drm/connector: Rename subconnector state variable

2022-07-29 Thread Maxime Ripard
There is two TV subconnector related properties registered by drm_mode_create_tv_properties(): subconnector and select subconnector. While the select subconnector property is stored in the kernel by the drm_tv_connector_state structure, the subconnector property isn't stored anywhere. Worse, the

[PATCH v1 01/35] drm/atomic-helper: Rename drm_atomic_helper_connector_tv_reset to avoid ambiguity

2022-07-29 Thread Maxime Ripard
We currently have two sets of TV properties. The first one is there to deal with analog TV properties, creating properties such as the TV mode, subconnectors, saturation, hue and so on. It's created by calling the drm_mode_create_tv_properties() function. The second one is there to deal with prop

[PATCH v1 00/35] drm: Analog TV Improvements

2022-07-29 Thread Maxime Ripard
Hi, Here's a series aiming at improving the command line named modes support, and more importantly how we deal with all the analog TV variants. The named modes support were initially introduced to allow to specify the analog TV mode to be used. However, this was causing multiple issues: * The

[PATCH 1/2] drm/i915: Change semantics of context isolation reporting to UM

2022-07-29 Thread Adrian Larumbe
I915_PARAM_HAS_CONTEXT_ISOLATION was already being used as a boolean by both Iris and Vulkan , and stood for the guarantee that, when creating a new context, it would not contain register state from preexisting ones. However, the actual param ioctl was returning a bitmask for the engines in which

[PATCH 0/2] Context isolation uAPI fixes

2022-07-29 Thread Adrian Larumbe
This patch series addresses the concerns in https://gitlab.freedesktop.org/drm/intel/-/issues/4264 Parallel work has be done on IGT to test changes in the kernel driver: https://lists.freedesktop.org/archives/igt-dev/2022-May/041600.html Test-with: 20220516205000.2960491-1-adrian.laru...@collabor

[PATCH 2/2] drm/i915: force getparam ioctl return bool for HAS_CONTEXT_ISOLATION

2022-07-29 Thread Adrian Larumbe
In a previous commit, the uAPI documentation for this param was updated to reflect the actual usage expected by Iris. Now make sure the driver does indeed return a boolean value rather than an engine bitmask. Signed-off-by: Adrian Larumbe --- drivers/gpu/drm/i915/gt/intel_engine_user.c | 14

Re: [PATCH v6 1/2] drm/panfrost: Add specific register offset macros for JS and MMU AS

2022-07-29 Thread Alyssa Rosenzweig
Reviewed-by: Alyssa Rosenzweig On Fri, Jul 29, 2022 at 03:46:09PM +0100, Adri??n Larumbe wrote: > Each Panfrost job has its own job slot and MMU address space set of > registers, which are selected with a job-specific index. > > Turn the shift and stride used for selection of the right register

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

2022-07-29 Thread Rob Clark
On Tue, Jul 26, 2022 at 11:17 AM Tomeu Vizoso wrote: > > 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

Re: [PATCH v3 09/15] drm/gem: Add LRU/shrinker helper

2022-07-29 Thread Rob Clark
On Fri, Jul 29, 2022 at 8:27 AM Dmitry Osipenko wrote: > > On 7/26/22 20:50, Rob Clark wrote: > > +/** > > + * drm_gem_lru_move_tail_locked - move the object to the tail of the LRU > > + * > > + * If the object is already in this LRU it will be moved to the > > + * tail. Otherwise it will be remo

Re: [PATCH v3 09/15] drm/gem: Add LRU/shrinker helper

2022-07-29 Thread Dmitry Osipenko
On 7/26/22 20:50, Rob Clark wrote: > +/** > + * drm_gem_lru_move_tail_locked - move the object to the tail of the LRU > + * > + * If the object is already in this LRU it will be moved to the > + * tail. Otherwise it will be removed from whichever other LRU > + * it is in (if any) and moved into th

Re: [RFC PATCH] drm/edid: Make 144 Hz not preferred on Sharp LQ140M1JW46

2022-07-29 Thread Doug Anderson
Hi, On Fri, Jul 29, 2022 at 12:51 AM Maxime Ripard wrote: > > On Thu, Jul 28, 2022 at 02:18:38PM -0700, Doug Anderson wrote: > > Hi, > > > > On Thu, Jul 28, 2022 at 10:34 AM Abhinav Kumar > > wrote: > > > > > > Hi Rob and Doug > > > > > > On 7/22/2022 10:36 AM, Rob Clark wrote: > > > > On Fri, J

[PATCH v6 1/2] drm/panfrost: Add specific register offset macros for JS and MMU AS

2022-07-29 Thread Adrián Larumbe
Each Panfrost job has its own job slot and MMU address space set of registers, which are selected with a job-specific index. Turn the shift and stride used for selection of the right register set base into a define rather than using magic numbers. Signed-off-by: Adrián Larumbe --- drivers/gpu/d

[PATCH v6 0/2] devcoredump support for Panfrost GPU driver

2022-07-29 Thread Adrián Larumbe
This is v6 for a previous patch series being discussed at: https://lore.kernel.org/dri-devel/20220718172418.584231-1-adrian.laru...@collabora.com/j Mesa MR under review can be found at: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14034 Changes with respect to v5 of the same patch:

[PATCH v6 2/2] drm/panfrost: Add support for devcoredump

2022-07-29 Thread Adrián Larumbe
In the event of a job timeout, debug dump information will be written into /sys/class/devcoredump. Inspired by etnaviv's similar feature. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/Makefile| 3 +- drivers/gpu/drm/panfro

Re: [PATCH] drm/kmb: fix dereference before NULL check in kmb_plane_atomic_update()

2022-07-29 Thread Thomas Zimmermann
Hi Am 29.07.22 um 16:23 schrieb Thomas Zimmermann: Hi Am 29.07.22 um 05:07 schrieb Zeng Jingxiang: From: Zeng Jingxiang The "plane" pointer was access before checking if it was NULL. The drm_atomic_get_old_plane_state() function will dereference the pointer "plane". 345    struct drm_plane_

Re: [PATCH] drm/kmb: fix dereference before NULL check in kmb_plane_atomic_update()

2022-07-29 Thread Thomas Zimmermann
Hi Am 29.07.22 um 05:07 schrieb Zeng Jingxiang: From: Zeng Jingxiang The "plane" pointer was access before checking if it was NULL. The drm_atomic_get_old_plane_state() function will dereference the pointer "plane". 345 struct drm_plane_state *old_plane_state = drm_atomic_

Re: [PATCH v16 0/3] eDP/DP Phy vdda realted function

2022-07-29 Thread Mark Brown
On Fri, Jul 29, 2022 at 03:35:33PM +0200, Johan Hovold wrote: > I guess we just need to drop all those regulator-allow-set-load > properties for now even if using DT for power-management configuration > this way does seem to run against the whole DT-as-hardware-description > idea (e.g. we may want

Re: [PATCH v16 0/3] eDP/DP Phy vdda realted function

2022-07-29 Thread Johan Hovold
Sorry about the late follow-up on this. Has been one of those constant-preemption weeks. And thanks Doug and Mark for the insightful comments in this and the dt-load RFC thread. On Thu, Jul 21, 2022 at 07:49:55AM -0700, Doug Anderson wrote: > Hi, > > On Thu, Jul 21, 2022 at 6:25 AM Dmitry Barysh

Re: [PATCH v3 1/4] video: fbdev: offb: Include missing linux/platform_device.h

2022-07-29 Thread Michael Ellerman
On Fri, 8 Jul 2022 09:11:05 +0200, Christophe Leroy wrote: > A lot of drivers were getting platform and of headers > indirectly via headers like asm/pci.h or asm/prom.h > > Most of them were fixed during 5.19 cycle but a newissue was > introduced by commit 52b1b46c39ae ("of: Create platform device

[PATCH v2] drm/tests: Split up test cases in igt_check_drm_format_min_pitch

2022-07-29 Thread Maíra Canal
The igt_check_drm_format_min_pitch() function had a lot of KUNIT_EXPECT_* calls, all of which ended up allocating and initializing various test assertion structures on the stack. This behavior was producing -Wframe-larger-than warnings on PowerPC, i386, and MIPS architectures, such as: drivers/gp

[RESUBMIT][PATCH 2/2] drm/i915/gem: Perform active shrinking from a background thread

2022-07-29 Thread Janusz Krzysztofik
From: Chris Wilson i915 is very greedy and will retain system pages for as long as the user requires them; once acquired they will be only returned when the object is freed. In order to respond to system memory pressure, i915 hooks into the shrinker subsystem, designed to prune the filesystem cac

[RESUBMIT][PATCH 1/2] drm/i915/gem: Avoid taking runtime-pm under the shrinker

2022-07-29 Thread Janusz Krzysztofik
From: Chris Wilson Inside the shrinker, we cannot wake the device as that may cause recursion into fs-reclaim, so instead we only unbind vma if the device is currently awake. (In order to provide reclaim while asleep, we do wake the device up during kswapd -- we probably want to limit that wake u

Re: [PATCH 1/2] drivers: serial: earlycon: Pass device-tree node

2022-07-29 Thread Andy Shevchenko
On Fri, Jul 29, 2022 at 9:57 AM Greg Kroah-Hartman wrote: > On Thu, Jul 28, 2022 at 11:04:24PM +0200, Andy Shevchenko wrote: > > On Thu, Jul 28, 2022 at 4:41 PM Greg Kroah-Hartman > > wrote: > > > On Thu, Jul 28, 2022 at 05:28:18PM +0300, Markuss Broks wrote: ... > > > > + unsigned long nod

Re: [PATCH v6 12/13] leds: flash: mt6370: Add MediaTek MT6370 flashlight support

2022-07-29 Thread Andy Shevchenko
On Fri, Jul 29, 2022 at 8:17 AM szuni chen wrote: > Andy Shevchenko 於 2022年7月25日 週一 下午4:51寫道: > > On Fri, Jul 22, 2022 at 12:25 PM ChiaEn Wu wrote: > > > > > > From: Alice Chen ... > > > Signed-off-by: Alice Chen > > > > This SoB chain is wrong. Prioritize and read Submitting Patches! > > Af

[PULL] drm-misc-fixes

2022-07-29 Thread Maxime Ripard
Hi Dave, Daniel, Here's this week drm-misc-fixes PR It's a partial resend from yesterday that only had the simpledrm but the mail somehow got lost. Maxime drm-misc-fixes-2022-07-29: One fix to fix simpledrm mode_valid return value, and one for page migration in nouveau The following changes si

[PATCH] drm/via: Add new condition to via_dma_cleanup()

2022-07-29 Thread Alisa Khabibrakhmanova
Pointer dev_priv->mmio, which was checked for NULL at via_do_init_map(), is passed to via_do_cleanup_map() and is dereferenced there without check. The patch adds the condition in via_dma_cleanup() which prevents potential NULL pointer dereference. Found by Linux Verification Center (linuxtesting

Re: [PATCH 1/2] drm/i915/gem: Avoid taking runtime-pm under the shrinker

2022-07-29 Thread Janusz Krzysztofik
Hi Matthew, Thanks for review. On Tuesday, 26 July 2022 20:14:05 CEST Matthew Auld wrote: > On 20/07/2022 11:16, Janusz Krzysztofik wrote: > > From: Chris Wilson > > > > Inside the shrinker, we cannot wake the device as that may cause > > recursion into fs-reclaim, so instead we only unbind vma

Re: [PATCH 7/8] drm/tidss: Fix clock request value for OLDI videoports

2022-07-29 Thread Tomi Valkeinen
On 29/07/2022 06:56, Aradhya Bhatia wrote: On 28-Jul-22 15:35, Tomi Valkeinen wrote: On 19/07/2022 11:08, Aradhya Bhatia wrote: The OLDI TX(es) require a serial clock which is 7 times the pixel clock of the display panel. When the OLDI is enabled in DSS, the pixel clock input of the correspond

Re: [PATCH 1/2] drivers: serial: earlycon: Pass device-tree node

2022-07-29 Thread Greg Kroah-Hartman
On Thu, Jul 28, 2022 at 11:04:24PM +0200, Andy Shevchenko wrote: > On Thu, Jul 28, 2022 at 4:41 PM Greg Kroah-Hartman > wrote: > > On Thu, Jul 28, 2022 at 05:28:18PM +0300, Markuss Broks wrote: > > > Pass a pointer to device-tree node in case the driver probed from > > > OF. This makes early conso

Re: [RFC PATCH] drm/edid: Make 144 Hz not preferred on Sharp LQ140M1JW46

2022-07-29 Thread Maxime Ripard
On Thu, Jul 28, 2022 at 02:18:38PM -0700, Doug Anderson wrote: > Hi, > > On Thu, Jul 28, 2022 at 10:34 AM Abhinav Kumar > wrote: > > > > Hi Rob and Doug > > > > On 7/22/2022 10:36 AM, Rob Clark wrote: > > > On Fri, Jul 22, 2022 at 9:48 AM Doug Anderson > > > wrote: > > >> > > >> Hi, > > >> > >

Re: [PATCH v3 07/14] drm/mgag200: Replace simple-KMS with regular atomic helpers

2022-07-29 Thread Jocelyn Falempe
On 28/07/2022 20:31, Thomas Zimmermann wrote: Hi Jocelyn Am 28.07.22 um 17:09 schrieb Jocelyn Falempe: On 28/07/2022 14:40, Thomas Zimmermann wrote: Drop simple-KMS in favor of regular atomic helpers. Makes the code more modular and hence better to adapt to per-model requirements. The simple-

[PATCH] drm/kmb: fix dereference before NULL check in kmb_plane_atomic_update()

2022-07-29 Thread Zeng Jingxiang
From: Zeng Jingxiang The "plane" pointer was access before checking if it was NULL. The drm_atomic_get_old_plane_state() function will dereference the pointer "plane". 345 struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane); 346 struct d

Re: [syzbot] KASAN: vmalloc-out-of-bounds Write in imageblit (2)

2022-07-29 Thread Khalid Masum
Here is a simplified reproducer for the issue: https://gist.githubusercontent.com/Labnann/923d6b9b3a19848fc129637b839b8a55/raw/a68271fcc724569735fe27f80817e561b3ff629a/reproducer.c

  1   2   >