Re: [Nouveau] [PATCH v8 17/24] drm/probe-helper: Provide a TV get_modes helper

2022-11-10 Thread Maíra Canal
Hi Maxime, On 11/10/22 08:07, Maxime Ripard wrote: > From: Noralf Trønnes > > Most of the TV connectors will need a similar get_modes implementation > that will, depending on the drivers' capabilities, register the 480i and > 576i modes. > > That implementation will also need to set the preferr

Re: [Nouveau] [PATCH v8 12/24] drm/connector: Add a function to lookup a TV mode by its name

2022-11-10 Thread Maíra Canal
Hi Maxime, On 11/10/22 08:07, Maxime Ripard wrote: > As part of the command line parsing rework coming in the next patches, > we'll need to lookup drm_connector_tv_mode values by their name, already > defined in drm_tv_mode_enum_list. > > In order to avoid any code duplication, let's do a functio

Re: [Nouveau] [PATCH v8 06/24] drm/modes: Add a function to generate analog display modes

2022-11-10 Thread Maíra Canal
Hi Maxime, On 11/10/22 08:07, Maxime Ripard wrote: > Multiple drivers (meson, vc4, sun4i) define analog TV 525-lines and > 625-lines modes in their drivers. > > Since those modes are fairly standard, and that we'll need to use them > in more places in the future, it makes sense to move their defi

[Nouveau] [linux-next:master] BUILD REGRESSION 382d2f9e739bc6f151c718b38537ae522ff848cd

2022-11-10 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 382d2f9e739bc6f151c718b38537ae522ff848cd Add linux-next specific files for 20221110 Error/Warning reports: https://lore.kernel.org/linux-mm/202210261404.b6ulzg7h-...@intel.com https

[Nouveau] Coverity: nouveau_dp_irq(): Null pointer dereferences

2022-11-10 Thread coverity-bot
Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20221110 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lin

[Nouveau] Coverity: nvkm_dp_train(): Integer handling issues

2022-11-10 Thread coverity-bot
Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20221110 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lin

[Nouveau] Coverity: nv50_pior_atomic_enable(): Memory - corruptions

2022-11-10 Thread coverity-bot
Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20221110 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lin

[Nouveau] Coverity: nv50_sor_atomic_enable(): Memory - corruptions

2022-11-10 Thread coverity-bot
Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20221110 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lin

[Nouveau] Coverity: nv50_hdmi_enable(): OVERRUN

2022-11-10 Thread coverity-bot
Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20221110 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lin

Re: [Nouveau] Fans ramping up randomly when idle

2022-11-10 Thread Karol Herbst
On Thu, Nov 10, 2022 at 4:01 PM Timothy Madden wrote: > > On 11/7/22 13:41, Karol Herbst wrote: > > On Sat, Nov 5, 2022 at 8:36 PM Timothy Madden > > wrote: > >> > >> Hello > >> > >> My Msi Gaming X Trio 2080 Ti randomly ramps up the fans with no way to > >> recover > >> (I have to reboot) even

Re: [Nouveau] Fans ramping up randomly when idle

2022-11-10 Thread Timothy Madden
On 11/7/22 13:41, Karol Herbst wrote: On Sat, Nov 5, 2022 at 8:36 PM Timothy Madden wrote: Hello My Msi Gaming X Trio 2080 Ti randomly ramps up the fans with no way to recover (I have to reboot) even when the card is idle or is only showing the desktop. This issue happens even when the card

Re: [Nouveau] Fans ramping up randomly when idle

2022-11-10 Thread Timothy Madden
On 11/10/22 01:44, Karol Herbst wrote: [ 10.776280] nouveau :0b:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none [ 3275.720190] nouveau :0b:00.0: therm: temperature (90 C) hit the 'fanboost' threshold one thing which might help to figure out what's going o

[Nouveau] [PATCH v8 23/24] drm/vc4: vec: Add support for more analog TV standards

2022-11-10 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

[Nouveau] [PATCH v8 21/24] drm/vc4: vec: Check for VEC output constraints

2022-11-10 Thread Maxime Ripard
From: Mateusz Kwiatkowski The VEC can accept pretty much any relatively reasonable mode, but still has a bunch of constraints to meet. Let's create an atomic_check() implementation that will make sure we don't end up accepting a non-functional mode. Acked-by: Noralf Trønnes Signed-off-by: Mate

[Nouveau] [PATCH v8 20/24] drm/vc4: vec: Use TV Reset implementation

2022-11-10 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(). Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard --- drivers/gpu

[Nouveau] [PATCH v8 24/24] drm/sun4i: tv: Convert to the new TV mode property

2022-11-10 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. Acked-by: Noralf Trønnes Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard --- Changes in v6: - Convert to new get_modes helper Changes in v5: - Removed the count var

[Nouveau] [PATCH v8 14/24] drm/modes: Properly generate a drm_display_mode from a named mode

2022-11-10 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

[Nouveau] [PATCH v8 22/24] drm/vc4: vec: Convert to the new TV mode property

2022-11-10 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. We're also making use of the new analog TV atomic_check

[Nouveau] [PATCH v8 18/24] drm/atomic-helper: Add a TV properties reset helper

2022-11-10 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. Reviewed-by: Noralf Trønnes Tes

[Nouveau] [PATCH v8 10/24] drm/modes: Fill drm_cmdline mode from named modes

2022-11-10 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

[Nouveau] [PATCH v8 19/24] drm/atomic-helper: Add an analog TV atomic_check implementation

2022-11-10 Thread Maxime Ripard
The analog TV connector drivers share some atomic_check logic, and the new TV standard property have created some boilerplate that can be be shared across drivers too. Let's create an atomic_check helper for those use cases. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Signed-off-

[Nouveau] [PATCH v8 15/24] drm/client: Remove match on mode name

2022-11-10 Thread Maxime Ripard
Commit 3aeeb13d8996 ("drm/modes: Support modes names on the command line") initially introduced the named modes support by essentially matching the name passed on the command-line to the mode names defined by the drivers. This proved to be difficult to work with, since all drivers had to provide p

[Nouveau] [PATCH v8 16/24] drm/modes: Introduce more named modes

2022-11-10 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. Tested-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard --- Changes in v6: - Renamed the tests to follow DRM test namin

[Nouveau] [PATCH v8 17/24] drm/probe-helper: Provide a TV get_modes helper

2022-11-10 Thread Maxime Ripard
From: Noralf Trønnes Most of the TV connectors will need a similar get_modes implementation that will, depending on the drivers' capabilities, register the 480i and 576i modes. That implementation will also need to set the preferred flag and order the modes based on the driver and users preferre

[Nouveau] [PATCH v8 12/24] drm/connector: Add a function to lookup a TV mode by its name

2022-11-10 Thread Maxime Ripard
As part of the command line parsing rework coming in the next patches, we'll need to lookup drm_connector_tv_mode values by their name, already defined in drm_tv_mode_enum_list. In order to avoid any code duplication, let's do a function that will perform a lookup of a TV mode name and return its

[Nouveau] [PATCH v8 13/24] drm/modes: Introduce the tv_mode property as a command-line option

2022-11-10 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. Reviewed-by:

[Nouveau] [PATCH v8 11/24] drm/connector: Add pixel clock to cmdline mode

2022-11-10 Thread Maxime Ripard
We'll need to get the pixel clock to generate proper display modes for all the current named modes. Let's add it to struct drm_cmdline_mode and fill it when parsing the named mode. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard --- Changes in v7: - Add

[Nouveau] [PATCH v8 07/24] drm/client: Add some tests for drm_connector_pick_cmdline_mode()

2022-11-10 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. Acked-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Signed-off-

[Nouveau] [PATCH v8 09/24] drm/modes: Switch to named mode descriptors

2022-11-10 Thread Maxime Ripard
The current named mode parsing relies only on 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. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwi

[Nouveau] [PATCH v8 08/24] drm/modes: Move named modes parsing to a separate function

2022-11-10 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. In order for the tests to still pass, some extra checks are needed, so it's not a 1:1 move. Reviewed-by: Noralf Trønnes Tested-by: M

[Nouveau] [PATCH v8 06/24] drm/modes: Add a function to generate analog display modes

2022-11-10 Thread Maxime Ripard
Multiple drivers (meson, vc4, sun4i) define analog TV 525-lines and 625-lines modes in their drivers. Since those modes are fairly standard, and that we'll need to use them in more places in the future, it makes sense to move their definition into the core framework. However, analog display usual

[Nouveau] [PATCH v8 05/24] drm/connector: Add TV standard property

2022-11-10 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

[Nouveau] [PATCH v8 04/24] drm/connector: Rename drm_mode_create_tv_properties

2022-11-10 Thread Maxime Ripard
drm_mode_create_tv_properties(), among other things, will create the "mode" property that stores the analog TV mode that connector is supposed to output. However, that property is getting deprecated, so let's rename that function to mention it's deprecated. We'll introduce a new variant of that fu

[Nouveau] [PATCH v8 03/24] drm/connector: Only register TV mode property if present

2022-11-10 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. Acked-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Signed-off-

[Nouveau] [PATCH v8 02/24] drm/connector: Rename legacy TV property

2022-11-10 Thread Maxime Ripard
The current tv_mode has driver-specific values that don't allow to easily share code using it, either at the userspace or kernel level. Since we're going to introduce a new, generic, property that fit the same purpose, let's rename this one to legacy_tv_mode to make it obvious we should move away

[Nouveau] [PATCH v8 01/24] drm/tests: Add Kunit Helpers

2022-11-10 Thread Maxime Ripard
As the number of kunit tests in KMS grows further, we start to have multiple test suites that, for example, need to register a mock DRM driver to interact with the KMS function they are supposed to test. Let's add a file meant to provide those kind of helpers to avoid duplication. Reviewed-by: No

[Nouveau] [PATCH v8 00/24] drm: Analog TV Improvements

2022-11-10 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

Re: [Nouveau] [PATCH v7 22/23] drm/vc4: vec: Add support for more analog TV standards

2022-11-10 Thread Maxime Ripard
Hi! On Wed, Nov 09, 2022 at 02:15:29AM +0100, Mateusz Kwiatkowski wrote: > I ran your v7 patchset on my Pi with Xorg, and the mode switching, as well as > the preferred mode handling, all work really well now! Thanks again for all your help > I just noted that the downstream version of the vc4 d

Re: [Nouveau] [PATCH v7 22/23] drm/vc4: vec: Add support for more analog TV standards

2022-11-10 Thread Maxime Ripard
On Wed, Nov 09, 2022 at 05:55:36PM +0100, Lukas Satin wrote: > That's great, I will test it on Ubuntu + Nouveau x86_64 and Batocera-Linux. > > I'm not interested in Raspberry Pi. I see you have some commit in > RaspberryPi/Linux. Will this go to some Nouveau driver, so I can test it on > x86_64 ma

Re: [Nouveau] [PATCH v7 14/23] drm/modes: Properly generate a drm_display_mode from a named mode

2022-11-10 Thread Maxime Ripard
On Tue, Nov 08, 2022 at 10:40:07AM +0100, Noralf Trønnes wrote: > > > Den 07.11.2022 18.49, skrev Noralf Trønnes: > > > > > > Den 07.11.2022 15.16, skrev Maxime Ripard: > >> The framework will get the drm_display_mode from the drm_cmdline_mode it > >> got by parsing the video command line argum

Re: [Nouveau] [PATCH v7 14/23] drm/modes: Properly generate a drm_display_mode from a named mode

2022-11-10 Thread Maxime Ripard
Hi, On Mon, Nov 07, 2022 at 06:49:57PM +0100, Noralf Trønnes wrote: > Den 07.11.2022 15.16, skrev 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(). > > >