Re: linux-next: Tree for Feb 6 (gpu/drm/amd/display/ kernel-doc warnings)

2024-02-06 Thread Randy Dunlap



On 2/5/24 20:43, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20240205:
> 

Hi Rodrigo,

Are you aware of these kernel-doc warnings?
I think they are due to

commit b8c1c3a82e75
Author: Rodrigo Siqueira 
Date:   Mon Jan 22 14:24:57 2024 -0700
Documentation/gpu: Add kernel doc entry for MPC



../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured 
comments found
../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured 
comments found
../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured 
comments found
../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured 
comments found
../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured 
comments found
../drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured 
comments found
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:1: warning: no structured 
comments found
../drivers/gpu/drm/amd/display/dc/inc/hw/opp.h:1: warning: no structured 
comments found
../drivers/gpu/drm/amd/display/dc/inc/hw/opp.h:1: warning: no structured 
comments found
../drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning: no 
structured comments found
../drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning: no 
structured comments found

../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:132: warning: Incorrect use of 
kernel-doc format:  * @@overlap_only: Whether overlapping of different 
planes is allowed.
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:132: warning: Incorrect use of 
kernel-doc format:  * @@overlap_only: Whether overlapping of different 
planes is allowed.
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:132: warning: Incorrect use of 
kernel-doc format:  * @@overlap_only: Whether overlapping of different 
planes is allowed.
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:162: warning: Function parameter 
or struct member 'pre_multiplied_alpha' not described in 'mpcc_blnd_cfg'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:162: warning: Function parameter 
or struct member 'overlap_only' not described in 'mpcc_blnd_cfg'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'read_mpcc_state' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'mpc_init_single_inst' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'get_mpcc_for_dpp_from_secondary' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'get_mpcc_for_dpp' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'wait_for_idle' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'assert_mpcc_idle_before_connect' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'init_mpcc_list_from_hw' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'set_denorm' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'set_denorm_clamp' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'set_output_csc' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'set_ocsc_default' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'set_output_gamma' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'power_on_mpc_mem_pwr' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'set_dwb_mux' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'disable_dwb_mux' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'is_dwb_idle' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'set_out_rate_control' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'set_gamut_remap' not described in 'mpc_funcs'
../drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:548: warning: Function parameter 
or struct member 'program_1dlut' not described in 'mpc_funcs'

[PATCH] drm/amd/display: remove kernel-doc misuses in dmub_replay.c

2024-01-15 Thread Randy Dunlap
Change non-kernel-doc comments from "/**" to common "/*" to prevent
kernel-doc warnings:

dmub_replay.c:262: warning: This comment starts with '/**', but isn't a 
kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * Set REPLAY power optimization flags and coasting vtotal.
dmub_replay.c:284: warning: This comment starts with '/**', but isn't a 
kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * send Replay general cmd to DMUB.

Signed-off-by: Randy Dunlap 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: amd-gfx@lists.freedesktop.org
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: Tom Chung 
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -- a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c 
b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c
@@ -258,7 +258,7 @@ static void dmub_replay_residency(struct
*residency = 0;
 }
 
-/**
+/*
  * Set REPLAY power optimization flags and coasting vtotal.
  */
 static void dmub_replay_set_power_opt_and_coasting_vtotal(struct dmub_replay 
*dmub,
@@ -280,7 +280,7 @@ static void dmub_replay_set_power_opt_an
dc_wake_and_execute_dmub_cmd(dc, , DM_DMUB_WAIT_TYPE_WAIT);
 }
 
-/**
+/*
  * send Replay general cmd to DMUB.
  */
 static void dmub_replay_send_cmd(struct dmub_replay *dmub,


[PATCH] drm/amd/display: dcn35_hwseq: use common comment to prevent kernel-doc warnings

2024-01-02 Thread Randy Dunlap
Change non-kernel-doc comments to use "/*" to prevent warnings from
scripts/kernel-doc.

dcn35_hwseq.c:1124: warning: This comment starts with '/**', but isn't a 
kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * power down sequence
dcn35_hwseq.c:1124: warning: missing initial short description on line:
 * power down sequence
dcn35_hwseq.c:1176: warning: This comment starts with '/**', but isn't a 
kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * power up sequence
dcn35_hwseq.c:1176: warning: missing initial short description on line:
 * power up sequence

Signed-off-by: Randy Dunlap 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: amd-gfx@lists.freedesktop.org
Cc: Maarten Lankhorst 
Cc: Maxime Ripard 
Cc: Thomas Zimmermann 
---
I thought that I sent this patch but it's not in the lore archive
so I'm sending it again. Apologies if you get it twice.

 drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -- a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
@@ -1120,7 +1120,7 @@ void dcn35_calc_blocks_to_ungate(struct
update_state->pg_res_update[PG_HPO] = true;
 
 }
-/**
+/*
 * power down sequence
 * ONO Region 3, DCPG 25: hpo - SKIPPED
 * ONO Region 4, DCPG 0: dchubp0, dpp0
@@ -1172,7 +1172,7 @@ void dcn35_hw_block_power_down(struct dc
//domain22, 23, 25 currently always on.
 
 }
-/**
+/*
 * power up sequence
 * ONO Region 0, DCPG 22: dccg dio dcio - SKIPPED
 * ONO Region 2, DCPG 24: mpc opp optc dwb


Re: [PATCH] drm/amd/display: avoid stringop-overflow warnings for dp_decide_lane_settings()

2023-12-25 Thread Randy Dunlap



On 11/22/23 14:13, Arnd Bergmann wrote:
> From: Arnd Bergmann 
> 
> gcc prints a warning about a possible array overflow for a couple of
> callers of dp_decide_lane_settings() after commit 1b56c90018f0 ("Makefile:
> Enable -Wstringop-overflow globally"):
> 
> drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c:
>  In function 'dp_perform_fixed_vs_pe_training_sequence_legacy':
> drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c:426:25:
>  error: 'dp_decide_lane_settings' accessing 4 bytes in a region of size 1 
> [-Werror=stringop-overflow=]
>   426 | dp_decide_lane_settings(lt_settings, 
> dpcd_lane_adjust,
>   | 
> ^~
>   427 | 
> lt_settings->hw_lane_settings, lt_settings->dpcd_lane_settings);
>   | 
> ~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c:426:25:
>  note: referencing argument 4 of type 'union dpcd_training_lane[4]'
> 
> I'm not entirely sure what caused this, but changing the prototype to expect
> a pointer instead of an array avoids the warnings.
> 
> Fixes: 7727e7b60f82 ("drm/amd/display: Improve robustness of FIXED_VS link 
> training at DP1 rates")
> Signed-off-by: Arnd Bergmann 


Acked-by: Randy Dunlap 
Tested-by: Randy Dunlap  # build-tested

Thanks.

> ---
>  .../gpu/drm/amd/display/dc/link/protocols/link_dp_training.c| 2 +-
>  .../gpu/drm/amd/display/dc/link/protocols/link_dp_training.h| 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c 
> b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
> index 90339c2dfd84..5a0b04518956 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
> @@ -807,7 +807,7 @@ void dp_decide_lane_settings(
>   const struct link_training_settings *lt_settings,
>   const union lane_adjust ln_adjust[LANE_COUNT_DP_MAX],
>   struct dc_lane_settings hw_lane_settings[LANE_COUNT_DP_MAX],
> - union dpcd_training_lane dpcd_lane_settings[LANE_COUNT_DP_MAX])
> + union dpcd_training_lane *dpcd_lane_settings)
>  {
>   uint32_t lane;
>  
> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.h 
> b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.h
> index 7d027bac8255..851bd17317a0 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.h
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.h
> @@ -111,7 +111,7 @@ void dp_decide_lane_settings(
>   const struct link_training_settings *lt_settings,
>   const union lane_adjust ln_adjust[LANE_COUNT_DP_MAX],
>   struct dc_lane_settings hw_lane_settings[LANE_COUNT_DP_MAX],
> - union dpcd_training_lane dpcd_lane_settings[LANE_COUNT_DP_MAX]);
> + union dpcd_training_lane *dpcd_lane_settings);
>  
>  enum dc_dp_training_pattern decide_cr_training_pattern(
>   const struct dc_link_settings *link_settings);

-- 
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html


Re: [PATCH] gpu: drm: amd: fixed typos

2023-12-15 Thread Randy Dunlap
Hi--

On 12/14/23 21:20, Ghanshyam Agrawal wrote:
> Fixed multiple typos in atomfirmware.h
> 
> Signed-off-by: Ghanshyam Agrawal 
> ---
>  drivers/gpu/drm/amd/include/atomfirmware.h | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/include/atomfirmware.h 
> b/drivers/gpu/drm/amd/include/atomfirmware.h
> index fa7d6ced786f..41d553921adf 100644
> --- a/drivers/gpu/drm/amd/include/atomfirmware.h
> +++ b/drivers/gpu/drm/amd/include/atomfirmware.h
> @@ -210,7 +210,7 @@ atom_bios_string  = "ATOM"
>  };
>  */
>  
> -#pragma pack(1)  /* BIOS data must use byte 
> aligment*/
> +#pragma pack(1)  /* BIOS data must use byte 
> alignment */
>  
>  enum atombios_image_offset{
>OFFSET_TO_ATOM_ROM_HEADER_POINTER  = 0x0048,
> @@ -452,7 +452,7 @@ struct atom_dtd_format
>uint8_t   refreshrate;
>  };
>  
> -/* atom_dtd_format.modemiscinfo defintion */
> +/* atom_dtd_format.modemiscinfo definition */
>  enum atom_dtd_format_modemiscinfo{
>ATOM_HSYNC_POLARITY= 0x0002,
>ATOM_VSYNC_POLARITY= 0x0004,
> @@ -645,7 +645,7 @@ struct lcd_info_v2_1
>uint32_t reserved1[8];
>  };
>  
> -/* lcd_info_v2_1.panel_misc defintion */
> +/* lcd_info_v2_1.panel_misc definition */
>  enum atom_lcd_info_panel_misc{
>ATOM_PANEL_MISC_FPDI=0x0002,
>  };
> @@ -683,7 +683,7 @@ enum atom_gpio_pin_assignment_gpio_id {
>/* gpio_id pre-define id for multiple usage */
>/* GPIO use to control PCIE_VDDC in certain SLT board */
>PCIE_VDDC_CONTROL_GPIO_PINID = 56,
> -  /* if PP_AC_DC_SWITCH_GPIO_PINID in Gpio_Pin_LutTable, AC/DC swithing 
> feature is enable */
> +  /* if PP_AC_DC_SWITCH_GPIO_PINID in Gpio_Pin_LutTable, AC/DC switching 
> feature is enable */

s/enable/enabled/

>PP_AC_DC_SWITCH_GPIO_PINID = 60,
>/* VDDC_REGULATOR_VRHOT_GPIO_PINID in Gpio_Pin_LutTable, VRHot feature is 
> enable */

Ditto.
There may be a few more that need this same treatment.

>VDDC_VRHOT_GPIO_PINID = 61,

The other changes look good as far as they go, but codespell reports
a few more misspellings to consider:

atomfirmware.h:213: aligment ==> alignment
atomfirmware.h:257: Offest ==> Offset
atomfirmware.h:258: Offest ==> Offset
atomfirmware.h:390: Offest ==> Offset
atomfirmware.h:455: defintion ==> definition
atomfirmware.h:648: defintion ==> definition
atomfirmware.h:686: swithing ==> switching
atomfirmware.h:704: calcualted ==> calculated
atomfirmware.h:967: compability ==> compatibility
atomfirmware.h:981: intenal ==> internal
atomfirmware.h:993: intenal ==> internal
atomfirmware.h:3469: sequece ==> sequence
atomfirmware.h:3507: indiate ==> indicate
atomfirmware.h:4429: stucture ==> structure
atomfirmware.h:4430: stucture ==> structure
atomfirmware.h:4462: regiser ==> register


thanks.
-- 
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html


Re: [PATCH] drm/amd: Document device reset methods

2023-11-10 Thread Randy Dunlap
Hi--

On 11/10/23 07:55, André Almeida wrote:
> Document what each amdgpu driver reset method does.
> 
> Signed-off-by: André Almeida 
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h | 20 
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index a79d53bdbe13..500f86c79eb7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -504,6 +504,26 @@ struct amdgpu_allowed_register_entry {
>   bool grbm_indexed;
>  };
>  
> +/**
> + * enum amd_reset_method - Methods for resetting AMD GPU devices
> + *
> + * @AMD_RESET_METHOD_NONE: The device will not be reset.
> + * @AMD_RESET_LEGACY: Method reserved for SI/CIK asics.

ASICs.

> + * @AMD_RESET_MODE0: High level PCIe reset.
> + * @AMD_RESET_MODE1: Resets each IP block (SDMA, GFX, VCN, etc.) 
> individually.
> + *   Suitable only for some discrete GPUs.
> + * @AMD_RESET_MODE2: Resets only the GFX block. Useful for APUs, giving that
> + *   the rest of IP blocks and SMU is shared with the CPU.
> + * @AMD_RESET_BACO: BACO (Bus Alive, Chip Off) method powers off and on the 
> card
> + *  but without powering off the PCI bus. Suitable only for
> + *  discrete GPUs.
> + * @AMD_RESET_PCI: Does a full bus reset, including powering on and off the
> + * card.
> + *
> + * Methods available for AMD GPU driver for resetting the device. Not all
> + * methods are suitable for every device. User can overwrite the method using

s/overwrite/override/
would make more sense to me.

Otherwise looks good. Thanks.

> + * module parameter `reset_method`.
> + */
>  enum amd_reset_method {
>   AMD_RESET_METHOD_NONE = -1,
>   AMD_RESET_METHOD_LEGACY = 0,

-- 
~Randy


Re: [PATCH v2] drm: amd: Resolve Sphinx unexpected indentation warning

2023-11-06 Thread Randy Dunlap



On 11/6/23 12:17, Hunter Chasens wrote:
> Resolves Sphinx unexpected indentation warning when compiling
> documentation (e.g. `make htmldocs`). Replaces tabs with spaces and adds
> a literal block to keep vertical formatting of the
> example power state list.
> 
> Signed-off-by: Hunter Chasens 

Acked-by: Randy Dunlap 

Thanks.

> ---
>  drivers/gpu/drm/amd/pm/amdgpu_pm.c | 13 +++--
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
> b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index 517b9fb4624c..81b8ceb26890 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -989,12 +989,13 @@ static ssize_t amdgpu_get_pp_features(struct device 
> *dev,
>   * Reading back the files will show you the available power levels within
>   * the power state and the clock information for those levels. If deep sleep 
> is
>   * applied to a clock, the level will be denoted by a special level 'S:'
> - * E.g.,
> - *   S: 19Mhz *
> - *   0: 615Mhz
> - *   1: 800Mhz
> - *   2: 888Mhz
> - *   3: 1000Mhz
> + * E.g.::
> + *
> + *  S: 19Mhz *
> + *  0: 615Mhz
> + *  1: 800Mhz
> + *  2: 888Mhz
> + *  3: 1000Mhz
>   *
>   *
>   * To manually adjust these states, first select manual using

-- 
~Randy


Re: [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning

2023-11-06 Thread Randy Dunlap



On 11/6/23 11:06, Hunter Chasens wrote:
> First, apologies to Jani Nikula. I accedently top posted on the other thread.
> My email client is giving me a hard time. The following works and, if 
> everyone agrees, I'll send out a v2.
> 
>  * E.g.::
>  *
>  *  S: 19Mhz *
>  *  0: 615Mhz
>  *  1: 800Mhz
>  *  2: 888Mhz
>  *  3: 1000Mhz

Please do.
Thanks.

-- 
~Randy


Re: [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning

2023-11-06 Thread Randy Dunlap



On 11/5/23 21:15, Bagas Sanjaya wrote:
> On Sun, Nov 05, 2023 at 04:00:44PM -0500, Hunter Chasens wrote:
>> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
>> b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
>> index 517b9fb4624c..703fe2542258 100644
>> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
>> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
>> @@ -990,11 +990,14 @@ static ssize_t amdgpu_get_pp_features(struct device 
>> *dev,
>>   * the power state and the clock information for those levels. If deep 
>> sleep is
>>   * applied to a clock, the level will be denoted by a special level 'S:'
>>   * E.g.,
>> - *  S: 19Mhz *
>> - *  0: 615Mhz
>> - *  1: 800Mhz
>> - *  2: 888Mhz
>> - *  3: 1000Mhz
>> + *
>> + * ::
>> + *
>> + *  S: 19Mhz *
>> + *  0: 615Mhz
>> + *  1: 800Mhz
>> + *  2: 888Mhz
>> + *  3: 1000Mhz
>>   *
>>   *
>>   * To manually adjust these states, first select manual using
> 
> LGTM, thanks!
> 
> Fixes: 615585d09b33 ("Documentation/amdgpu: Modify pp_dpm_*clk details")
> Reviewed-by: Bagas Sanjaya 
> 

but can it be done without being so obvious about using Sphinx (or is it ReST?)
in source files?

e.g.: (not tested)

 * E.g.:
 * *S: 19Mhz *
 * *0: 615Mhz
 * *1: 800Mhz
 * *2: 888Mhz
 * *3: 1000Mhz

This is what I have seen done in quite a few source files.

Oh well, lots of files are already infected, so WTH. :(

-- 
~Randy


Re: [PATCH] add kernel docs for dc_dmub_caps

2023-10-02 Thread Randy Dunlap
Hi,

The $Subject could be improved, e.g.:

[PATCH] drm/amd/display: add kernel docs for dc_dmub_caps


On 9/29/23 03:00, Sagar Vashnav wrote:
> Add kernel documentation for the dc_dmub_caps structure.
> 
> Signed-off-by: Sagar Vashnav 

Reviewed-by: Randy Dunlap 

Thanks.

> ---
>  drivers/gpu/drm/amd/display/dc/dc.h | 10 ++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dc.h 
> b/drivers/gpu/drm/amd/display/dc/dc.h
> index 8125839..14b4c50 100644
> --- a/drivers/gpu/drm/amd/display/dc/dc.h
> +++ b/drivers/gpu/drm/amd/display/dc/dc.h
> @@ -208,6 +208,16 @@ struct dc_color_caps {
>   struct mpc_color_caps mpc;
>  };
>  
> +/**
> + * struct dc_dmub_caps - DMUB (Display Microcontroller Unit) capabilities
> + * @psr: support for PSR (Power Saving State Residency)
> + * @mclk_sw: support for MCLK_SW (Memory Clock Switch)
> + * @subvp_psr: support for SUBVP PSR (Sub-Viewport Power Saving State 
> Residency)
> + * @gecc_enable: GECC (Global Error Correcting Code) enablement.
> + *
> + * This structure describes the capabilities of the Display Microcontroller 
> Unit (DMUB).
> + * It specifies whether certain features like PSR and MCLK_SW are supported.
> + */
>  struct dc_dmub_caps {
>   bool psr;
>   bool mclk_sw;

-- 
~Randy


Re: [PATCH] drm/amd/display: add kernel docs for dc_dmub_caps

2023-10-02 Thread Randy Dunlap



On 10/1/23 21:41, Sagar Vashnav wrote:
> Add kernel documentation for the dc_dmub_caps structure.
> 
> Signed-off-by: Sagar Vashnav 

Reviewed-by: Randy Dunlap 

Thanks.

> ---
>  drivers/gpu/drm/amd/display/dc/dc.h | 10 ++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dc.h 
> b/drivers/gpu/drm/amd/display/dc/dc.h
> index 81258392d..14b4c503d 100644
> --- a/drivers/gpu/drm/amd/display/dc/dc.h
> +++ b/drivers/gpu/drm/amd/display/dc/dc.h
> @@ -208,6 +208,16 @@ struct dc_color_caps {
>   struct mpc_color_caps mpc;
>  };
>  
> +/**
> + * struct dc_dmub_caps - DMUB (Display Microcontroller Unit) capabilities
> + * @psr: support for PSR (Power Saving State Residency)
> + * @mclk_sw: support for MCLK_SW (Memory Clock Switch)
> + * @subvp_psr: support for SUBVP PSR (Sub-Viewport Power Saving State 
> Residency)
> + * @gecc_enable: GECC (Global Error Correcting Code) enablement.
> + *
> + * This structure describes the capabilities of the Display Microcontroller 
> Unit (DMUB).
> + * It specifies whether certain features like PSR and MCLK_SW are supported.
> + */
>  struct dc_dmub_caps {
>   bool psr;
>   bool mclk_sw;

-- 
~Randy


[PATCH] drm/amdgpu: amdgpu_drm.h: fix comment typos

2023-10-02 Thread Randy Dunlap
Correct typos of "occurred".

Signed-off-by: Randy Dunlap 
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: amd-gfx@lists.freedesktop.org
---
 include/uapi/drm/amdgpu_drm.h |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -- a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -249,9 +249,9 @@ union drm_amdgpu_bo_list {
 /* unknown cause */
 #define AMDGPU_CTX_UNKNOWN_RESET   3
 
-/* indicate gpu reset occured after ctx created */
+/* indicate gpu reset occurred after ctx created */
 #define AMDGPU_CTX_QUERY2_FLAGS_RESET(1<<0)
-/* indicate vram lost occured after ctx created */
+/* indicate vram lost occurred after ctx created */
 #define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1)
 /* indicate some job from this context once cause gpu hang */
 #define AMDGPU_CTX_QUERY2_FLAGS_GUILTY   (1<<2)


Re: [PATCH] gpu: drm: amd: display: fix kernel-doc warnings

2023-09-20 Thread Randy Dunlap
Hi,

On 9/19/23 02:33, Swarup Laxman Kotiaklapudi wrote:
> Fix kernel-doc warnings discovered in AMD gpu display driver.
> Fixes these warnings:
> ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:110: warning:
> Function parameter or member 'overlap_only'
> not described in 'mpcc_blnd_cfg'.
> 
> ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:110: warning:
> Function parameter or member 'bottom_gain_mode'
> not described in 'mpcc_blnd_cfg'.
> 
> ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:110: warning:
> Function parameter or member 'background_color_bpc'
> not described in 'mpcc_blnd_cfg'.
> 
> ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:110:
> warning: Function parameter or member 'top_gain'
> not described in 'mpcc_blnd_cfg'.
> 
> ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:110:
> warning: Function parameter or member 'bottom_inside_gain'
> not described in 'mpcc_blnd_cfg'.
> 
> ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:110:
> warning: Function parameter or member 'bottom_outside_gain'
> not described in 'mpcc_blnd_cfg'.
> 
> Signed-off-by: Swarup Laxman Kotiaklapudi 

Thanks for fixing these kernel-doc warnings.

Tested-by: Randy Dunlap 
Acked-by: Randy Dunlap 


> ---
>  drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h 
> b/drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
> index 8d86159d9de0..61a2406dcc53 100644
> --- a/drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
> +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
> @@ -91,6 +91,12 @@ enum mpcc_alpha_blend_mode {
>   * @global_gain: used when blend mode considers both pixel alpha and plane
>   * alpha value and assumes the global alpha value.
>   * @global_alpha: plane alpha value
> + * @overlap_only: whether overlapping of different planes is allowed
> + * @bottom_gain_mode: blend mode for bottom gain setting
> + * @background_color_bpc: background color for bpc
> + * @top_gain: top gain setting
> + * @bottom_inside_gain: blend mode for bottom inside
> + * @bottom_outside_gain:  blend mode for bottom outside
>   */
>  struct mpcc_blnd_cfg {
>   struct tg_color black_color;/* background color */

-- 
~Randy


[PATCH] drm/amd/display: fix replay_mode kernel-doc warning

2023-09-11 Thread Randy Dunlap
Fix the typo in the kernel-doc for @replay_mode to prevent
kernel-doc warnings:

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:623: warning: Incorrect use 
of kernel-doc format:  * @replay mode: Replay supported
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:626: warning: Function 
parameter or member 'replay_mode' not described in 'amdgpu_hdmi_vsdb_info'

Fixes: ec8e59cb4e0c ("drm/amd/display: Get replay info from VSDB")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Bhawanpreet Lakha 
Cc: Harry Wentland 
Cc: Alex Deucher 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
@@ -620,7 +620,7 @@ struct amdgpu_hdmi_vsdb_info {
unsigned int max_refresh_rate_hz;
 
/**
-* @replay mode: Replay supported
+* @replay_mode: Replay supported
 */
bool replay_mode;
 };


Re: [PATCH] drm/connector: mark enum counter value as private

2023-08-30 Thread Randy Dunlap
Hi,

On 7/15/23 17:46, Randy Dunlap wrote:
> Mark the DRM_MODE_COLORIMETRY_COUNT enum value as private in
> kernel-doc to prevent a build warning:
> 
> include/drm/drm_connector.h:527: warning: Enum value 
> 'DRM_MODE_COLORIMETRY_COUNT' not described in enum 'drm_colorspace'
> 
> Fixes: c627087cb164 ("drm/connector: Use common colorspace_names array")
> Signed-off-by: Randy Dunlap 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Maarten Lankhorst 
> Cc: Maxime Ripard 
> Cc: Thomas Zimmermann 
> Cc: dri-de...@lists.freedesktop.org
> Cc: Harry Wentland 
> Cc: Alex Deucher 
> Cc: amd-gfx@lists.freedesktop.org
> ---
>  include/drm/drm_connector.h |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- linux-next-20230714.orig/include/drm/drm_connector.h
> +++ linux-next-20230714/include/drm/drm_connector.h
> @@ -522,7 +522,7 @@ enum drm_colorspace {
>   DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED = 13,
>   DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT = 14,
>   DRM_MODE_COLORIMETRY_BT601_YCC  = 15,
> - /* not a valid value; merely used for counting */
> + /* private: not a valid value; merely used for counting */
>   DRM_MODE_COLORIMETRY_COUNT
>  };
>  

Any comments on this patch?
The warning is still present in mainline.
The "private:" marker tells kernel-doc not to expect documentation for it.

thanks.
-- 
~Randy


Re: [PATCH v6] drm/doc: Document DRM device reset expectations

2023-08-11 Thread Randy Dunlap
Hi,

On 8/11/23 11:55, André Almeida wrote:
> Create a section that specifies how to deal with DRM device resets for
> kernel and userspace drivers.
> 
> Signed-off-by: André Almeida 
> 
> ---
> 
> Changes:
>  - Due to substantial changes in the content, dropped Pekka's Acked-by
>  - Grammar fixes (Randy)
>  - Add paragraph about disabling device resets
>  - Add note about integrating reset tracking in drm/sched
>  - Add note that KMD should return failure for contexts affected by
>resets and UMD should check for this
>  - Add note about lack of consensus around what to do about non-robust
>apps
> 
> v5: 
> https://lore.kernel.org/dri-devel/20230627132323.115440-1-andrealm...@igalia.com/
> ---
>  Documentation/gpu/drm-uapi.rst | 77 ++
>  1 file changed, 77 insertions(+)
> 
> diff --git a/Documentation/gpu/drm-uapi.rst b/Documentation/gpu/drm-uapi.rst
> index 65fb3036a580..6bfaf7d4c074 100644
> --- a/Documentation/gpu/drm-uapi.rst
> +++ b/Documentation/gpu/drm-uapi.rst
> @@ -285,6 +285,83 @@ for GPU1 and GPU2 from different vendors, and a third 
> handler for
>  mmapped regular files. Threads cause additional pain with signal
>  handling as well.
>  
> +Device reset
> +
> +
> +The GPU stack is really complex and is prone to errors, from hardware bugs,
> +faulty applications and everything in between the many layers. Some errors
> +require resetting the device in order to make the device usable again. This
> +section describes the expectations for DRM and usermode drivers when a
> +device resets and how to propagate the reset status.
> +
> +Device resets can not be disabled without tainting the kernel, which can 
> lead to
> +hanging the entire kernel through shrinkers/mmu_notifiers. Userspace role in
> +device resets is to propagate the message to the application and apply any
> +special policy for blocking guilty applications, if any. Corollary is that
> +debugging a hung GPU context require hardware support to be able to preempt 
> such
> +a GPU context while it's stopped.
> +
> +Kernel Mode Driver
> +--
> +
> +The KMD is responsible for checking if the device needs a reset, and to 
> perform
> +it as needed. Usually a hang is detected when a job gets stuck executing. KMD
> +should keep track of resets, because userspace can query any time about the
> +reset status for a specific context. This is needed to propagate to the rest 
> of
> +the stack that a reset has happened. Currently, this is implemented by each
> +driver separately, with no common DRM interface. Ideally this should be 
> properly
> +integrated at DRM scheduler to provide a common ground for all drivers. 
> After a
> +reset, KMD should reject new command submissions for affected contexts.
> +
> +User Mode Driver
> +
> +
> +After command submission, UMD should check if the submission was accepted or
> +rejected. After a reset, KMD should reject submissions, and UMD can issue an
> +ioclt to the KMD to check the reset status, and this can be checked more 
> often

   ioctl

> +if the UMD requires it. After detecting a reset, UMD will then proceed to 
> report
> +it to the application using the appropriate API error code, as explained in 
> the
> +section below about robustness.
> +
> +Robustness
> +--
> +
> +The only way to try to keep an application working after a reset is if it
> +complies with the robustness aspects of the graphical API that it is using.
> +
> +Graphical APIs provide ways to applications to deal with device resets. 
> However,
> +there is no guarantee that the app will use such features correctly, and a
> +userspace that doesn't support robust interfaces (like an non-robust

 like a

> +OpenGL context or API without any robustness support like libva) leave the
> +robustness handling entirely to the userspace driver. There is no strong
> +community consensus on what the userspace driver should do in that case,
> +since all reasonable approaches have some clear downsides.
> +
> +OpenGL
> +~~
> +
> +Apps using OpenGL should use the available robust interfaces, like the
> +extension ``GL_ARB_robustness`` (or ``GL_EXT_robustness`` for OpenGL ES). 
> This
> +interface tells if a reset has happened, and if so, all the context state is
> +considered lost and the app proceeds by creating new ones. There's no 
> consensus
> +on what to do to if robustness is not in use.
> +
> +Vulkan
> +~~
> +
> +Apps using Vulkan should check for ``VK_ERROR_DEVICE_LOST`` for submissions.
> +This error code means, among other things, that a device reset has happened 
> and
> +it needs to recreate the contexts to keep going.
> +
> +Reporting causes of resets
> +--
> +
> +Apart from propagating the reset through the stack so apps can recover, it's
> +really useful for driver developers to learn more about what caused the 
> reset in
> +the first place. DRM devices should make 

Re: [PATCH V8 1/9] drivers core: Add support for Wifi band RF mitigations

2023-08-10 Thread Randy Dunlap



On 8/10/23 00:37, Evan Quan wrote:
> diff --git a/Documentation/admin-guide/kernel-parameters.txt 
> b/Documentation/admin-guide/kernel-parameters.txt
> index a1457995fd41..21f73a0bbd0b 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -7152,3 +7152,12 @@
>   xmon commands.
>   off xmon is disabled.
>  
> + wbrf=   [KNL]
> + Format: { on | auto | off }
> + Controls if WBRF features should be enabled or disabled
> + forcely. Default is auto.

"forcely" is not a word. "forcedly" is a word, but it's not used very much
AFAIK.
I would probably write "Controls if WBRF features should be forced on or off."

> + on  Force enable the WBRF features.
> + autoUp to the system to do proper checks to
> + determine the WBRF features should be enabled
> + or not.
> + off Force disable the WBRF features.

-- 
~Randy


[PATCH] drm/amd/display: dmub_replay: don't use kernel-doc markers

2023-08-08 Thread Randy Dunlap
These functions don't use kernel-doc notation for comments so
don't begin each comment block with the "/**" kernel-doc marker.

This prevents a bunch of kernel-doc warnings:

dmub_replay.c:37: warning: This comment starts with '/**', but isn't a 
kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
dmub_replay.c:37: warning: missing initial short description on line:
 * Get Replay state from firmware.
dmub_replay.c:66: warning: This comment starts with '/**', but isn't a 
kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
dmub_replay.c:66: warning: missing initial short description on line:
 * Enable/Disable Replay.
dmub_replay.c:116: warning: This comment starts with '/**', but isn't a 
kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
dmub_replay.c:116: warning: missing initial short description on line:
 * Set REPLAY power optimization flags.
dmub_replay.c:134: warning: This comment starts with '/**', but isn't a 
kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
dmub_replay.c:134: warning: missing initial short description on line:
 * Setup Replay by programming phy registers and sending replay hw context 
values to firmware.
and 10 more similar warnings.

Fixes: c7ddc0a800bc ("drm/amd/display: Add Functions to enable Freesync Panel 
Replay")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Link: lore.kernel.org/r/202308081459.us5rlyay-...@intel.com
Cc: Bhawanpreet Lakha 
Cc: Harry Wentland 
Cc: Alex Deucher 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: amd-gfx@lists.freedesktop.org
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c |   18 ++---
 1 file changed, 9 insertions(+), 9 deletions(-)

diff -- a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c 
b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c
@@ -33,7 +33,7 @@
 
 #define MAX_PIPES 6
 
-/**
+/*
  * Get Replay state from firmware.
  */
 static void dmub_replay_get_state(struct dmub_replay *dmub, enum replay_state 
*state, uint8_t panel_inst)
@@ -62,7 +62,7 @@ static void dmub_replay_get_state(struct
}
 }
 
-/**
+/*
  * Enable/Disable Replay.
  */
 static void dmub_replay_enable(struct dmub_replay *dmub, bool enable, bool 
wait, uint8_t panel_inst)
@@ -112,7 +112,7 @@ static void dmub_replay_enable(struct dm
 
 }
 
-/**
+/*
  * Set REPLAY power optimization flags.
  */
 static void dmub_replay_set_power_opt(struct dmub_replay *dmub, unsigned int 
power_opt, uint8_t panel_inst)
@@ -130,7 +130,7 @@ static void dmub_replay_set_power_opt(st
dm_execute_dmub_cmd(dc, , DM_DMUB_WAIT_TYPE_WAIT);
 }
 
-/**
+/*
  * Setup Replay by programming phy registers and sending replay hw context 
values to firmware.
  */
 static bool dmub_replay_copy_settings(struct dmub_replay *dmub,
@@ -215,7 +215,7 @@ static bool dmub_replay_copy_settings(st
return true;
 }
 
-/**
+/*
  * Set coasting vtotal.
  */
 static void dmub_replay_set_coasting_vtotal(struct dmub_replay *dmub,
@@ -234,7 +234,7 @@ static void dmub_replay_set_coasting_vto
dm_execute_dmub_cmd(dc, , DM_DMUB_WAIT_TYPE_WAIT);
 }
 
-/**
+/*
  * Get Replay residency from firmware.
  */
 static void dmub_replay_residency(struct dmub_replay *dmub, uint8_t panel_inst,
@@ -267,7 +267,7 @@ static const struct dmub_replay_funcs re
.replay_residency   = dmub_replay_residency,
 };
 
-/**
+/*
  * Construct Replay object.
  */
 static void dmub_replay_construct(struct dmub_replay *replay, struct 
dc_context *ctx)
@@ -276,7 +276,7 @@ static void dmub_replay_construct(struct
replay->funcs = _funcs;
 }
 
-/**
+/*
  * Allocate and initialize Replay object.
  */
 struct dmub_replay *dmub_replay_create(struct dc_context *ctx)
@@ -293,7 +293,7 @@ struct dmub_replay *dmub_replay_create(s
return replay;
 }
 
-/**
+/*
  * Deallocate Replay object.
  */
 void dmub_replay_destroy(struct dmub_replay **dmub)


Re: [PATCH -next] drm/amdgpu: Fix one kernel-doc comment

2023-07-20 Thread Randy Dunlap



On 7/19/23 18:05, Yang Li wrote:
> Use colon to separate parameter name from their specific meaning.
> silence the warning:
> 
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c:793: warning: Function parameter or 
> member 'adev' not described in 'amdgpu_vm_pte_update_noretry_flags'
> 
> Signed-off-by: Yang Li 

Reviewed-by: Randy Dunlap 
Thanks.

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> index 83e1923f6775..96d601e209b8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> @@ -783,7 +783,7 @@ int amdgpu_vm_pde_update(struct amdgpu_vm_update_params 
> *params,
>  /**
>   * amdgpu_vm_pte_update_noretry_flags - Update PTE no-retry flags
>   *
> - * @adev - amdgpu_device pointer
> + * @adev: amdgpu_device pointer
>   * @flags: pointer to PTE flags
>   *
>   * Update PTE no-retry flags when TF is enabled.

-- 
~Randy


[PATCH] drm/connector: mark enum counter value as private

2023-07-17 Thread Randy Dunlap
Mark the DRM_MODE_COLORIMETRY_COUNT enum value as private in
kernel-doc to prevent a build warning:

include/drm/drm_connector.h:527: warning: Enum value 
'DRM_MODE_COLORIMETRY_COUNT' not described in enum 'drm_colorspace'

Fixes: c627087cb164 ("drm/connector: Use common colorspace_names array")
Signed-off-by: Randy Dunlap 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Maarten Lankhorst 
Cc: Maxime Ripard 
Cc: Thomas Zimmermann 
Cc: dri-de...@lists.freedesktop.org
Cc: Harry Wentland 
Cc: Alex Deucher 
Cc: amd-gfx@lists.freedesktop.org
---
 include/drm/drm_connector.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20230714.orig/include/drm/drm_connector.h
+++ linux-next-20230714/include/drm/drm_connector.h
@@ -522,7 +522,7 @@ enum drm_colorspace {
DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED = 13,
DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT = 14,
DRM_MODE_COLORIMETRY_BT601_YCC  = 15,
-   /* not a valid value; merely used for counting */
+   /* private: not a valid value; merely used for counting */
DRM_MODE_COLORIMETRY_COUNT
 };
 


Re: [PATCH v4 21/21] dyndbg-doc: add classmap info to howto

2023-07-13 Thread Randy Dunlap



On 7/13/23 09:36, Jim Cromie wrote:
> Add some basic info on classmap usage and api
> 
> Signed-off-by: Jim Cromie 
> ---
>  .../admin-guide/dynamic-debug-howto.rst   | 64 ++-
>  1 file changed, 63 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst 
> b/Documentation/admin-guide/dynamic-debug-howto.rst
> index 8dc668cc1216..878750ce8c1d 100644
> --- a/Documentation/admin-guide/dynamic-debug-howto.rst
> +++ b/Documentation/admin-guide/dynamic-debug-howto.rst

> @@ -374,3 +373,66 @@ just a shortcut for ``print_hex_dump(KERN_DEBUG)``.
>  For ``print_hex_dump_debug()``/``print_hex_dump_bytes()``, format string is
>  its ``prefix_str`` argument, if it is constant string; or ``hexdump``
>  in case ``prefix_str`` is built dynamically.
> +
> +Dynamic Debug classmaps
> +===
> +
> +Dyndbg generally selects *prdbg* callsites using structural info:
> +module, file, function, line.  Using classmaps, user modules can
> +organize/select pr_debug()s as they like.
> +
> +- classes coordinates/spans multiple modules
> +- complements the mod,file,func attrs
> +- keeps pr_debug's 0-off-cost JUMP_LABEL goodness
> +- isolates from other class'd and un-class'd pr_debugs() 
> +  (one doesnt mix 2 clients bank accounts)

  doesn't

> +
> +  # IOW this doesn't change DRM.debug settings
> +  #> echo -p > /proc/dynamic_debug/control
> +
> +  # change the classes by naming them explicitly (no wildcard here)
> +  #> echo class DRM_UT_CORE +p > /proc/dynamic_debug/control
> +
> +To support DRM.debug (/sys/module/drm/parameters/debug), dyndbg
> +provides DYNDBG_CLASSMAP_PARAM*.  It maps the categories/classes:
> +DRM_UT_CORE.. to bits 0..N, allowing to set all classes at once.
> +
> +Dynamic Debug Classmap API
> +==
> +
> +DYNDBG_CLASSMAP_DEFINE - modules create CLASSMAPs, naming the classes
> +and type, and mapping the class-names to consecutive _class_ids.  By
> +doing so, they tell dyndbg that they are using those class_ids, and
> +authorize dyndbg to manipulate the callsites by their class-names.
> +
> +Its expected that client modules will follow the DRM.debug model:
> +1. define their debug-classes using an enum type, where the enum
> +symbol and its integer value define both the classnames and class-ids.
> +2. use or macro-wrap __pr_debug_cls(ENUM_VAL, "hello world\n")
> +   
> +There are 2 types of classmaps:
> +
> + DD_CLASS_TYPE_DISJOINT_BITS: classes are independent, ala DRM.debug

  a la
or just   like

> + DD_CLASS_TYPE_LEVEL_NUM: classes are relative (Verbose3 > Verbose2)
> +
> +Both these classmap-types use the class-names/ENUM_VALs to validate
> +commands into >control.
> +
> +DYNDBG_CLASSMAP_PARAM - refs a DEFINEd classmap, exposing the set of

Is this:   refers to a
?

> +defined classes to manipulation as a group.  This interface enforces
> +the relatedness of classes of DD_CLASS_TYPE_LEVEL_NUM typed classmaps;
> +all classes are independent in the >control parser itself.
> +
> +DYNDBG_CLASSMAP_USE - drm drivers use the CLASSMAP that drm DEFINEs.
> +This shares the classmap defn, and authorizes coordinated changes

definition,

> +amongst the CLASSMAP DEFINEr and multiple USErs.
> +
> +Modules or module-groups (drm & drivers) can define multiple
> +classmaps, as long as they share the limited 0..62 per-module-group
> +_class_id range, without overlap.
> +
> +``#define DEBUG`` will enable all pr_debugs in scope, including any
> +class'd ones (__pr_debug_cls(id,fmt..)).  This won't be reflected in
> +the PARAM readback value, but the pr_debug callsites can be toggled
> +into agreement with the param.
> +

thanks.
-- 
~Randy


Re: [PATCH v4 20/21] config TEST_DYNAMIC_DEBUG default m

2023-07-13 Thread Randy Dunlap
Hi Jim,

On 7/13/23 09:36, Jim Cromie wrote:
> Signed-off-by: Jim Cromie 
> ---
>  lib/Kconfig.debug | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index d4fbbcc395d2..82d11ac63758 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -2696,13 +2696,14 @@ config TEST_STATIC_KEYS
>  
>  config TEST_DYNAMIC_DEBUG
>   tristate "Build test-dynamic-debug module"
> + default m

You need to justify such a change, and since it's not required
for running the system, I don't think it should be 'm'.

>   depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE
>   help
> This module works/demo's the dyndbg's classmap API, by
> creating 2 classes: a DISJOINT classmap (like DRM.debug)
> and a LEVELS/VERBOSE classmap (where 2>1).
>  
> -   If unsure, say N.
> +   If unsure, say N.  If bored/curious, say M
>  
>  config TEST_KMOD
>   tristate "kmod stress tester"

-- 
~Randy


Re: [PATCH v2 18/18] fbdev: Document that framebuffer_alloc() returns zero'ed data

2023-07-13 Thread Randy Dunlap



On 7/13/23 06:21, Miguel Ojeda wrote:
> On Thu, Jul 13, 2023 at 3:03 PM Thomas Zimmermann  wrote:
>>
>> Most fbdev drivers depend on framebuffer_alloc() to initialize the
>> allocated memory to 0. Document this guarantee.
>>
>> Suggested-by: Miguel Ojeda 
>> Signed-off-by: Thomas Zimmermann 
>> Cc: Helge Deller 
> 
> Thanks for sending this! Maybe this would be best earlier in the
> series, so that later patches make more sense (since they use the
> guarantee), but it is not a big deal.
> 
>> + * aligned to sizeof(long). Both, the instance of struct fb_info and
>> + * the driver private data, are cleared to zero.
> 
> I think both commas may be best omitted (but I am not a native speaker).

Yes, it would be better to omit them.

> Reviewed-by: Miguel Ojeda 
> 
> Cheers,
> Miguel

-- 
~Randy


Re: [PATCH] drm/amdgpu: Rename to amdgpu_vm_tlb_seq_struct

2023-07-12 Thread Randy Dunlap



On 7/12/23 01:34, Christian König wrote:
> Am 12.07.23 um 10:03 schrieb Luben Tuikov:
>> On 2023-07-12 03:57, Christian König wrote:
>>> Am 12.07.23 um 08:58 schrieb Luben Tuikov:
>>>> Rename struct amdgpu_vm_tlb_seq_cb {...} to struct amdgpu_vm_tlb_seq_struct
>>>> {...}, so as to not conflict with documentation processing tools. Of 
>>>> course, C
>>>> has no problem with this.
>>> Hui? What exactly is duplicated here? Is the structure defined in
>>> different files with a different meaning?
>> The same name is used for the function and for the structure.
> 
> Ah, yeah that wasn't obvious.
> 
> In this case the patch is Reviewed-by: Christian König 
> 


Reviewed-by: Randy Dunlap 

Thanks.

> 
> Thanks,
> Christian.
> 
>>
>> struct amdgpu_vm_tlb_seq_cb {...}
>>
>> and
>>
>> static void amdgpu_vm_tlb_seq_cb(struct dma_fence *fence,
>>  struct dma_fence_cb *cb)
>>
>> C has no problem with this, but document processing tools do,
>> and in general it doesn't seem like a good practice to have
>> the same name for both.
>>
>> Regards,
>> Luben
>>
>>> Christian.
>>>
>>>> Cc: Randy Dunlap 
>>>> Cc: Alex Deucher 
>>>> Cc: Christian König 
>>>> Link: 
>>>> https://lore.kernel.org/r/b5ebc891-ee63-1638-0377-7b512d34b...@infradead.org
>>>> Signed-off-by: Luben Tuikov 
>>>> ---
>>>>drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 
>>>>1 file changed, 4 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
>>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>>> index 92a84e7b0db85b..32adc31c093d84 100644
>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>>> @@ -111,9 +111,9 @@ struct amdgpu_prt_cb {
>>>>};
>>>>   /**
>>>> - * struct amdgpu_vm_tlb_seq_cb - Helper to increment the TLB flush 
>>>> sequence
>>>> + * struct amdgpu_vm_tlb_seq_struct - Helper to increment the TLB flush 
>>>> sequence
>>>> */
>>>> -struct amdgpu_vm_tlb_seq_cb {
>>>> +struct amdgpu_vm_tlb_seq_struct {
>>>>/**
>>>> * @vm: pointer to the amdgpu_vm structure to set the fence 
>>>> sequence on
>>>> */
>>>> @@ -833,7 +833,7 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev,
>>>>static void amdgpu_vm_tlb_seq_cb(struct dma_fence *fence,
>>>> struct dma_fence_cb *cb)
>>>>{
>>>> -struct amdgpu_vm_tlb_seq_cb *tlb_cb;
>>>> +struct amdgpu_vm_tlb_seq_struct *tlb_cb;
>>>>   tlb_cb = container_of(cb, typeof(*tlb_cb), cb);
>>>>atomic64_inc(_cb->vm->tlb_seq);
>>>> @@ -871,7 +871,7 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, 
>>>> struct amdgpu_vm *vm,
>>>>   struct dma_fence **fence)
>>>>{
>>>>struct amdgpu_vm_update_params params;
>>>> -struct amdgpu_vm_tlb_seq_cb *tlb_cb;
>>>> +struct amdgpu_vm_tlb_seq_struct *tlb_cb;
>>>>struct amdgpu_res_cursor cursor;
>>>>enum amdgpu_sync_mode sync_mode;
>>>>int r, idx;
>>>>
>>>> base-commit: 50db2d96b49b7d6cdb12e71e4204cf7180d3bab5
> 

-- 
~Randy


Re: scripts/kernel-doc does not handle duplicate struct & function names (e.g., in amdgpu)

2023-07-12 Thread Randy Dunlap



On 7/11/23 20:32, Akira Yokosawa wrote:
> Hi Randy,
> 
>> [just documenting this for posterity or in case someone wants to fix it.]
>>
>> In drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c, one can find both
>>
>> struct amdgpu_vm_tlb_seq_cb {...};
>>
>> and
>> static void amdgpu_vm_tlb_seq_cb(...)
>>
>> Of course C has no problem with this, but kernel-doc reports:
>>
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:833: WARNING: Duplicate C 
>> declaration, also defined at gpu/amdgpu/driver-core:115.
>>
>> And of course, if the name of one of them is changed, kernel-doc is all 
>> happy...
>> not that I am suggesting that one of them should be changed.
>>
>> I just want to make people aware of this. (or maybe people are already aware 
>> of this?)
> 
> The duplicate warning is emitted from Sphinx, not kernel-doc.
> 
> This is a bug of Sphinx >=3.1, first reported by Mauro back in September 2020 
> at:
> 
> https://github.com/sphinx-doc/sphinx/issues/8241
> 
> It was closed when a local fix was presented.  Unfortunately, it was not
> merged at the time and a subsequent pull request was opened at:
> 
> https://github.com/sphinx-doc/sphinx/pull/8313
> 
> It is not merged yet and carries a milestone of Sphinx 7.x.
> 
> Looks like we need to wait patiently.
> 
> Thanks, Akira

Ooooh, thanks for your assistance.  Waiting :)

-- 
~Randy


[PATCH] drm/amd/display: dc.h: eliminate kernel-doc warnings

2023-07-12 Thread Randy Dunlap
Quash 175 kernel-doc warnings in dc.h by unmarking 2 struct
comments as containing kernel-doc notation and by spelling one
struct field correctly in a kernel-doc comment.

Fixes: 1682bd1a6b5f ("drm/amd/display: Expand kernel doc for DC")
Fixes: ea76895ffab1 ("drm/amd/display: Document pipe split policy")
Fixes: f6ae69f49fcf ("drm/amd/display: Include surface of unaffected streams")
Signed-off-by: Randy Dunlap 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: Aurabindo Pillai 
Cc: Alex Deucher 
Cc: amd-gfx@lists.freedesktop.org
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/display/dc/dc.h |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff -- a/drivers/gpu/drm/amd/display/dc/dc.h 
b/drivers/gpu/drm/amd/display/dc/dc.h
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -506,7 +506,7 @@ enum dcn_zstate_support_state {
DCN_ZSTATE_SUPPORT_DISALLOW,
 };
 
-/**
+/*
  * struct dc_clocks - DC pipe clocks
  *
  * For any clocks that may differ per pipe only the max is stored in this
@@ -728,7 +728,7 @@ struct resource_pool;
 struct dce_hwseq;
 struct link_service;
 
-/**
+/*
  * struct dc_debug_options - DC debug struct
  *
  * This struct provides a simple mechanism for developers to change some
@@ -756,7 +756,7 @@ struct dc_debug_options {
bool use_max_lb;
enum dcc_option disable_dcc;
 
-   /**
+   /*
 * @pipe_split_policy: Define which pipe split policy is used by the
 * display core.
 */
@@ -1334,7 +1334,7 @@ struct dc_validation_set {
struct dc_stream_state *stream;
 
/**
-* @plane_state: Surface state
+* @plane_states: Surface state
 */
struct dc_plane_state *plane_states[MAX_SURFACES];
 


scripts/kernel-doc does not handle duplicate struct & function names (e.g., in amdgpu)

2023-07-12 Thread Randy Dunlap
[just documenting this for posterity or in case someone wants to fix it.]

In drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c, one can find both

struct amdgpu_vm_tlb_seq_cb {...};

and
static void amdgpu_vm_tlb_seq_cb(...)

Of course C has no problem with this, but kernel-doc reports:

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:833: WARNING: Duplicate C declaration, 
also defined at gpu/amdgpu/driver-core:115.

And of course, if the name of one of them is changed, kernel-doc is all happy...
not that I am suggesting that one of them should be changed.

I just want to make people aware of this. (or maybe people are already aware of 
this?)

-- 
~Randy


Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-07-04 Thread Randy Dunlap



On 7/3/23 19:44, Marek Olšák wrote:
> 
> 
> On Mon, Jul 3, 2023, 22:38 Randy Dunlap  <mailto:rdun...@infradead.org>> wrote:
> 
> 
> 
> On 7/3/23 19:34, Marek Olšák wrote:
> >
> >
> > On Mon, Jul 3, 2023, 03:12 Michel Dänzer  <mailto:michel.daen...@mailbox.org> <mailto:michel.daen...@mailbox.org 
> <mailto:michel.daen...@mailbox.org>>> wrote:
> >
> 
> Marek,
> Please stop sending html emails to the mailing lists.
> The mailing list software drops them.
> 
> Please set your email interface to use plain text mode instead.
> Thanks.
> 
> 
> The mobile Gmail app doesn't support plain text, which I use frequently.

Perhaps you should consider some other mobile app for kernel discussions.

E.g., it looks like the K-9 mail app works with gmail.

-- 
~Randy


Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-07-04 Thread Randy Dunlap



On 7/3/23 19:34, Marek Olšák wrote:
> 
> 
> On Mon, Jul 3, 2023, 03:12 Michel Dänzer  > wrote:
> 

Marek,
Please stop sending html emails to the mailing lists.
The mailing list software drops them.

Please set your email interface to use plain text mode instead.
Thanks.

-- 
~Randy


Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-06-27 Thread Randy Dunlap
Hi André,

I have just a few more below:

On 6/27/23 06:23, André Almeida wrote:
> Create a section that specifies how to deal with DRM device resets for
> kernel and userspace drivers.
> 
> Acked-by: Pekka Paalanen 
> Signed-off-by: André Almeida 
> ---
> 
> v4: 
> https://lore.kernel.org/lkml/20230626183347.55118-1-andrealm...@igalia.com/
> 
> Changes:
>  - Grammar fixes (Randy)
> 
>  Documentation/gpu/drm-uapi.rst | 68 ++
>  1 file changed, 68 insertions(+)
> 
> diff --git a/Documentation/gpu/drm-uapi.rst b/Documentation/gpu/drm-uapi.rst
> index 65fb3036a580..3cbffa25ed93 100644
> --- a/Documentation/gpu/drm-uapi.rst
> +++ b/Documentation/gpu/drm-uapi.rst
> @@ -285,6 +285,74 @@ for GPU1 and GPU2 from different vendors, and a third 
> handler for
>  mmapped regular files. Threads cause additional pain with signal
>  handling as well.
>  
> +Device reset
> +
> +
> +The GPU stack is really complex and is prone to errors, from hardware bugs,
> +faulty applications and everything in between the many layers. Some errors
> +require resetting the device in order to make the device usable again. This
> +sections describes the expectations for DRM and usermode drivers when a

   section

> +device resets and how to propagate the reset status.
> +
> +Kernel Mode Driver
> +--
> +
> +The KMD is responsible for checking if the device needs a reset, and to 
> perform
> +it as needed. Usually a hang is detected when a job gets stuck executing. KMD
> +should keep track of resets, because userspace can query any time about the
> +reset stats for an specific context. This is needed to propagate to the rest 
> of

   for a specific

stats or status?

> +the stack that a reset has happened. Currently, this is implemented by each
> +driver separately, with no common DRM interface.
> +
> +User Mode Driver
> +
> +
> +The UMD should check before submitting new commands to the KMD if the device 
> has
> +been reset, and this can be checked more often if the UMD requires it. After
> +detecting a reset, UMD will then proceed to report it to the application 
> using
> +the appropriate API error code, as explained in the section below about
> +robustness.
> +
> +Robustness
> +--
> +
> +The only way to try to keep an application working after a reset is if it
> +complies with the robustness aspects of the graphical API that it is using.
> +
> +Graphical APIs provide ways to applications to deal with device resets. 
> However,
> +there is no guarantee that the app will use such features correctly, and the
> +UMD can implement policies to close the app if it is a repeating offender,
> +likely in a broken loop. This is done to ensure that it does not keep 
> blocking
> +the user interface from being correctly displayed. This should be done even 
> if
> +the app is correct but happens to trigger some bug in the hardware/driver.
> +
> +OpenGL
> +~~
> +
> +Apps using OpenGL should use the available robust interfaces, like the
> +extension ``GL_ARB_robustness`` (or ``GL_EXT_robustness`` for OpenGL ES). 
> This
> +interface tells if a reset has happened, and if so, all the context state is
> +considered lost and the app proceeds by creating new ones. If it is possible 
> to
> +determine that robustness is not in use, the UMD will terminate the app when 
> a
> +reset is detected, giving that the contexts are lost and the app won't be 
> able
> +to figure this out and recreate the contexts.
> +
> +Vulkan
> +~~
> +
> +Apps using Vulkan should check for ``VK_ERROR_DEVICE_LOST`` for submissions.
> +This error code means, among other things, that a device reset has happened 
> and
> +it needs to recreate the contexts to keep going.
> +
> +Reporting causes of resets
> +--
> +
> +Apart from propagating the reset through the stack so apps can recover, it's
> +really useful for driver developers to learn more about what caused the 
> reset in
> +first place. DRM devices should make use of devcoredump to store relevant

   the first place.

> +information about the reset, so this information can be added to user bug
> +reports.
> +
>  .. _drm_driver_ioctl:
>  
>  IOCTL Support on Device Nodes

and with those addressed:

Reviewed-by: Randy Dunlap 

Thanks for adding the documentation.

-- 
~Randy


Re: [PATCH v4 1/1] drm/doc: Document DRM device reset expectations

2023-06-27 Thread Randy Dunlap
Hi,

On 6/26/23 11:33, André Almeida wrote:
> Create a section that specifies how to deal with DRM device resets for
> kernel and userspace drivers.
> 
> Signed-off-by: André Almeida 
> ---
>  Documentation/gpu/drm-uapi.rst | 68 ++
>  1 file changed, 68 insertions(+)
> 
> diff --git a/Documentation/gpu/drm-uapi.rst b/Documentation/gpu/drm-uapi.rst
> index 65fb3036a580..25a11b9b98fa 100644
> --- a/Documentation/gpu/drm-uapi.rst
> +++ b/Documentation/gpu/drm-uapi.rst
> @@ -285,6 +285,74 @@ for GPU1 and GPU2 from different vendors, and a third 
> handler for
>  mmapped regular files. Threads cause additional pain with signal
>  handling as well.
>  
> +Device reset
> +
> +
> +The GPU stack is really complex and is prone to errors, from hardware bugs,
> +faulty applications and everything in between the many layers. Some errors
> +require resetting the device in order to make the device usable again. This
> +section describes what is the expectations for DRM and usermode drivers when 
> a

   sections describes the expectations for DRM and usermode drivers when a

> +device resets and how to propagate the reset status.
> +
> +Kernel Mode Driver
> +--
> +
> +The KMD is responsible for checking if the device needs a reset, and to 
> perform
> +it as needed. Usually a hang is detected when a job gets stuck executing. KMD
> +should keep track of resets, because userspace can query any time about the
> +reset stats for an specific context. This is needed to propagate to the rest 
> of
> +the stack that a reset has happened. Currently, this is implemented by each
> +driver separately, with no common DRM interface.
> +
> +User Mode Driver
> +
> +
> +The UMD should check before submitting new commands to the KMD if the device 
> has
> +been reset, and this can be checked more often if it requires to. After

   more often if the UMD requires it. After

> +detecting a reset, UMD will then proceed to report it to the application 
> using
> +the appropriated API error code, as explained in the below section about

   appropriate  the section below about

> +robustness.
> +
> +Robustness
> +--
> +
> +The only way to try to keep an application working after a reset is if it
> +complies with the robustness aspects of the graphical API that it is using.
> +
> +Graphical APIs provide ways to application to deal with device resets. 
> However,

   to applications

> +there is no guarantee that the app will be correctly using such features, and

  will use such features correctly, and a 
// or "and the"


> +UMD can implement policies to close the app if it is a repeating offender,
> +likely in a broken loop. This is done to ensure that it does not keeps 
> blocking

keep

> +the user interface from being correctly displayed. This should be done even 
> if
> +the app is correct but happens to trigger some bug in the hardware/driver.
> +
> +OpenGL
> +~~
> +
> +Apps using OpenGL should use the available robust interfaces, like the
> +extension ``GL_ARB_robustness`` (or ``GL_EXT_robustness`` for OpenGL ES). 
> This
> +interface tells if a reset has happened, and if so, all the context state is
> +considered lost and the app proceeds by creating new ones. If is possible to

  If it is possible 
to

> +determine that robustness is not in use, UMD will terminate the app when a 
> reset

the UMD

> +is detected, giving that the contexts are lost and the app won't be able to
> +figure this out and recreate the contexts.
> +
> +Vulkan
> +~~
> +
> +Apps using Vulkan should check for ``VK_ERROR_DEVICE_LOST`` for submissions.
> +This error code means, among other things, that a device reset has happened 
> and
> +it needs to recreate the contexts to keep going.
> +
> +Reporting resets causes

That's an awkward heading. How about:
Reporting causes of resets
--

> +---
> +
> +Apart from propagating the reset through the stack so apps can recover, it's
> +really useful for driver developers to learn more about what caused the 
> reset in
> +first place. DRM devices should make use of devcoredump to store relevant
> +information about the reset, so this information can be added to user bug
> +reports.
> +
>  .. _drm_driver_ioctl:
>  
>  IOCTL Support on Device Nodes

thanks for the documentation.
-- 
~Randy


error: 'const struct dc_dsc_config' has no member named 'is_frl'

2023-02-10 Thread Randy Dunlap
Hi,

The 'is_frl' struct field is conditional:

#if defined(CONFIG_DRM_AMD_DC_DCN)
bool is_frl; /* indicate if DSC is applied based on HDMI FRL sink's 
capability */
#endif

so code that uses it should be careful, otherwise build errors may happen:

../drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_validation.c: In function 
'dp_active_dongle_validate_timing':
../drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_validation.c:126:66: 
error: 'const struct dc_dsc_config' has no member named 'is_frl'
  126 | if (timing->flags.DSC && 
!timing->dsc_cfg.is_frl)
  |   

Seen on arch=um and arch=riscv (RV64).

-- 
~Randy


[PATCH] drm/amd/amdgpu: add complete header search path

2023-02-06 Thread Randy Dunlap
The path for the "mod_info_packet.h" header file is
incomplete, so add its location to the header search path
in the amdgpu Makefile.

See on ARCH=alpha (275 times in one build).

In file included from ../drivers/gpu/drm/amd/amdgpu/amdgpu.h:90,
 from ../drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:43:
../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.h:62:10: fatal 
error: mod_info_packet.h: No such file or directory
   62 | #include "mod_info_packet.h"
  |  ^~~
compilation terminated.

Fixes: 5b49da02ddbe ("drm/amd/display: Enable Freesync over PCon")
Signed-off-by: Randy Dunlap 
Cc: Signed-off-by: Sung Joon Kim 
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/amdgpu/Makefile |1 +
 1 file changed, 1 insertion(+)

diff -- a/drivers/gpu/drm/amd/amdgpu/Makefile 
b/drivers/gpu/drm/amd/amdgpu/Makefile
--- a/drivers/gpu/drm/amd/amdgpu/Makefile
+++ b/drivers/gpu/drm/amd/amdgpu/Makefile
@@ -34,6 +34,7 @@ ccflags-y := -I$(FULL_AMD_PATH)/include/
-I$(FULL_AMD_PATH)/acp/include \
-I$(FULL_AMD_DISPLAY_PATH) \
-I$(FULL_AMD_DISPLAY_PATH)/include \
+   -I$(FULL_AMD_DISPLAY_PATH)/modules/inc \
-I$(FULL_AMD_DISPLAY_PATH)/dc \
-I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm \
-I$(FULL_AMD_PATH)/amdkfd


[PATCH] drm: amd: display: fix dc/core/dc.c kernel-doc

2022-12-29 Thread Randy Dunlap
Fix all kernel-doc warnings in dc/core/dc.c:

dc.c:385: warning: missing initial short description on line:
 *  dc_stream_adjust_vmin_vmax:
dc.c:392: warning: contents before sections
dc.c:399: warning: No description found for return value of 
'dc_stream_adjust_vmin_vmax'
dc.c:434: warning: Excess function parameter 'adjust' description in 
'dc_stream_get_last_used_drr_vtotal'
dc.c:434: warning: No description found for return value of 
'dc_stream_get_last_used_drr_vtotal'
dc.c:574: warning: No description found for return value of 
'dc_stream_configure_crc'
dc.c:1746: warning: No description found for return value of 
'dc_commit_state_no_check'
dc.c:4991: warning: This comment starts with '/**', but isn't a kernel-doc 
comment. Refer Documentation/doc-guide/kernel-doc.rst
 * dc_extended_blank_supported 0 Decide whether extended blank is supported
dc.c:4991: warning: missing initial short description on line:
 * dc_extended_blank_supported 0 Decide whether extended blank is supported
dc.c:4723: warning: Function parameter or member 'dc' not described in 
'dc_enable_dmub_outbox'
dc.c:4926: warning: Function parameter or member 'dc' not described in 
'dc_process_dmub_dpia_hpd_int_enable'
dc.c:4926: warning: Function parameter or member 'hpd_int_enable' not described 
in 'dc_process_dmub_dpia_hpd_int_enable'
12 warnings

Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: Hamza Mahfooz 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: amd-gfx@lists.freedesktop.org
---
Based on linux-next-20221226 but also applies to mainline.

 drivers/gpu/drm/amd/display/dc/core/dc.c |   40 +
 1 file changed, 25 insertions(+), 15 deletions(-)

diff -- a/drivers/gpu/drm/amd/display/dc/core/dc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc.c
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -382,16 +382,18 @@ static void dc_perf_trace_destroy(struct
 }
 
 /**
- *  dc_stream_adjust_vmin_vmax:
+ *  dc_stream_adjust_vmin_vmax - look up pipe context & update parts of DRR
+ *  @dc: dc reference
+ *  @stream: Initial dc stream state
+ *  @adjust: Updated parameters for vertical_total_min and vertical_total_max
  *
  *  Looks up the pipe context of dc_stream_state and updates the
  *  vertical_total_min and vertical_total_max of the DRR, Dynamic Refresh
  *  Rate, which is a power-saving feature that targets reducing panel
  *  refresh rate while the screen is static
  *
- *  @dc: dc reference
- *  @stream: Initial dc stream state
- *  @adjust: Updated parameters for vertical_total_min and vertical_total_max
+ *  Return: %true if the pipe context is found and adjusted;
+ *  %false if the pipe context is not found.
  */
 bool dc_stream_adjust_vmin_vmax(struct dc *dc,
struct dc_stream_state *stream,
@@ -419,14 +421,17 @@ bool dc_stream_adjust_vmin_vmax(struct d
 }
 
 /**
- * dc_stream_get_last_used_drr_vtotal - dc_stream_get_last_vrr_vtotal
+ * dc_stream_get_last_used_drr_vtotal - Looks up the pipe context of
+ * dc_stream_state and gets the last VTOTAL used by DRR (Dynamic Refresh Rate)
  *
  * @dc: [in] dc reference
  * @stream: [in] Initial dc stream state
- * @adjust: [in] Updated parameters for vertical_total_min and
+ * @refresh_rate: [in] new refresh_rate
  *
- * Looks up the pipe context of dc_stream_state and gets the last VTOTAL used
- * by DRR (Dynamic Refresh Rate)
+ * Return: %true if the pipe context is found and there is an associated
+ * timing_generator for the DC;
+ * %false if the pipe context is not found or there is no
+ * timing_generator for the DC.
  */
 bool dc_stream_get_last_used_drr_vtotal(struct dc *dc,
struct dc_stream_state *stream,
@@ -567,7 +572,10 @@ dc_stream_forward_crc_window(struct dc_s
  *  once.
  *
  * By default, only CRC0 is configured, and the entire frame is used to
- * calculate the crc.
+ * calculate the CRC.
+ *
+ * Return: %false if the stream is not found or CRC capture is not supported;
+ * %true if the stream has been configured.
  */
 bool dc_stream_configure_crc(struct dc *dc, struct dc_stream_state *stream,
 struct crc_params *crc_window, bool enable, bool 
continuous)
@@ -636,7 +644,7 @@ bool dc_stream_configure_crc(struct dc *
  * dc_stream_configure_crc needs to be called beforehand to enable CRCs.
  *
  * Return:
- * false if stream is not found, or if CRCs are not enabled.
+ * %false if stream is not found, or if CRCs are not enabled.
  */
 bool dc_stream_get_crc(struct dc *dc, struct dc_stream_state *stream,
   uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb)
@@ -1741,6 +1749,8 @@ void dc_z10_save_init(struct dc *dc)
  *
  * Applies given context to the hardware and copy it into current context.
  * It's up to the user to release the src context afterwards.
+ *
+ * Return: an enum dc

[PATCH -next] drm/amdgpu: update docum. filename following rename

2022-11-28 Thread Randy Dunlap
Fix documentation build errors for amdgpu: correct the filename.

Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c

WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -sphinx-version 
5.3.0 -function MMU Notifier ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c' failed 
with return code 1
WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -sphinx-version 
5.3.0 -internal ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c' failed with return 
code 2

Fixes: d9483ecd327b ("drm/amdgpu: rename the files for HMM handling")
Signed-off-by: Randy Dunlap 
Cc: Christian König 
Cc: Alex Deucher 
Cc: Felix Kuehling 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Jonathan Corbet 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 Documentation/gpu/amdgpu/driver-core.rst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -- a/Documentation/gpu/amdgpu/driver-core.rst 
b/Documentation/gpu/amdgpu/driver-core.rst
--- a/Documentation/gpu/amdgpu/driver-core.rst
+++ b/Documentation/gpu/amdgpu/driver-core.rst
@@ -148,10 +148,10 @@ PRIME Buffer Sharing
 MMU Notifier
 
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
+.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
:doc: MMU Notifier
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
+.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
:internal:
 
 AMDGPU Virtual Memory


Re: Build regressions/improvements in v6.1-rc6

2022-11-22 Thread Randy Dunlap



On 11/22/22 07:00, Johannes Berg wrote:
> On Tue, 2022-11-22 at 08:55 -0500, Alex Deucher wrote:
>>>
>>>+ /kisskb/src/arch/um/include/asm/processor-generic.h: error: called 
>>> object is not a function or function pointer:  => 94:18
>>>+ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: 
>>> error: control reaches end of non-void function [-Werror=return-type]:  => 
>>> 1934:1
>>>
>>> um-x86_64/um-all{mod,yes}config (in kfd_cpumask_to_apic_id())
>>
>> Presumably cpu_data is not defined on um-x86_64?  Does it even make
>> sense to build drivers on um-x86_64?
> 
> Drivers in general yes ;-)
> 
> This driver, probably not.
> 
> But the issue is that a lot of drivers "depends on X86_64" or such,
> where only "X86" is the arch symbol. You could add "X86 && X86_64" to
> really build on x86 64-bit only.
> 
> I didn't check this driver, but this has mostly popped up since UM got
> PCI support some time ago (which I added.)

I have patches for lots of these issues, but some people said that they
would want to build DRM drivers for use with KUNIT (i.e. UML), so I thought
that meant my patches were not needed.

-- 
~Randy


[PATCH -next] drm/amd/display: fix kernel-doc issues in dc.h

2022-11-17 Thread Randy Dunlap
Fix these kernel-doc complaints:

drivers/gpu/drm/amd/display/dc/dc.h:505: warning: cannot understand function 
prototype: 'struct dc_clocks '
dc.h:472: warning: Enum value 'MPC_SPLIT_AVOID' not described in enum 
'pipe_split_policy'
dc.h:472: warning: Enum value 'MPC_SPLIT_AVOID_MULT_DISP' not described in enum 
'pipe_split_policy'
dc.h:532: warning: Incorrect use of kernel-doc format:  * 
@fw_based_mclk_switching

Fixes: ea76895ffab1 ("drm/amd/display: Document pipe split policy")
Fixes: 1682bd1a6b5f ("drm/amd/display: Expand kernel doc for DC")
Signed-off-by: Randy Dunlap 
Cc: Rodrigo Siqueira 
Cc: Alex Deucher 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: amd-gfx@lists.freedesktop.org
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/display/dc/dc.h |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff -- a/drivers/gpu/drm/amd/display/dc/dc.h 
b/drivers/gpu/drm/amd/display/dc/dc.h
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -458,15 +458,15 @@ enum pipe_split_policy {
MPC_SPLIT_DYNAMIC = 0,
 
/**
-* @MPC_SPLIT_DYNAMIC: Avoid pipe split, which means that DC will not
+* @MPC_SPLIT_AVOID: Avoid pipe split, which means that DC will not
 * try any sort of split optimization.
 */
MPC_SPLIT_AVOID = 1,
 
/**
-* @MPC_SPLIT_DYNAMIC: With this option, DC will only try to optimize
-* the pipe utilization when using a single display; if the user
-* connects to a second display, DC will avoid pipe split.
+* @MPC_SPLIT_AVOID_MULT_DISP: With this option, DC will only try to
+* optimize the pipe utilization when using a single display; if the
+* user connects to a second display, DC will avoid pipe split.
 */
MPC_SPLIT_AVOID_MULT_DISP = 2,
 };
@@ -497,7 +497,7 @@ enum dcn_zstate_support_state {
 };
 
 /**
- * dc_clocks - DC pipe clocks
+ * struct dc_clocks - DC pipe clocks
  *
  * For any clocks that may differ per pipe only the max is stored in this
  * structure
@@ -528,7 +528,7 @@ struct dc_clocks {
bool fclk_prev_p_state_change_support;
int num_ways;
 
-   /**
+   /*
 * @fw_based_mclk_switching
 *
 * DC has a mechanism that leverage the variable refresh rate to switch


[PATCH] drm: amd: clean up dcn32_fpu.c kernel-doc

2022-10-03 Thread Randy Dunlap
Rectify multiple kernel-doc warnings in dcn32_fpu.c.
E.g.:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:247: warning: 
This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
* Finds dummy_latency_index when MCLK switching using firmware based
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:484: warning: 
Function parameter or member 'phantom_stream' not described in 
'dcn32_set_phantom_stream_timing'
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:601: warning: 
Function parameter or member 'dc' not described in 'dcn32_assign_subvp_pipe'
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:601: warning: 
Function parameter or member 'context' not described in 
'dcn32_assign_subvp_pipe'
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:601: warning: 
Function parameter or member 'index' not described in 'dcn32_assign_subvp_pipe'
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:2140: warning: 
Function parameter or member 'dc' not described in 
'dcn32_update_bw_bounding_box_fpu'
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:2140: warning: 
Function parameter or member 'bw_params' not described in 
'dcn32_update_bw_bounding_box_fpu'
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:2140: warning: 
expecting prototype for dcn32_update_bw_bounding_box(). Prototype was for 
dcn32_update_bw_bounding_box_fpu() instead

Reported-by: kernel test robot 
Signed-off-by: Randy Dunlap 
Cc: George Shen 
Cc: Alvin Lee 
Cc: Nevenko Stupar 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
---
 drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c |  116 --
 1 file changed, 49 insertions(+), 67 deletions(-)

--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
@@ -243,7 +243,7 @@ void dcn32_build_wm_range_table_fpu(stru

clk_mgr->base.bw_params->wm_table.nv_entries[WM_D].pmfw_breakdown.max_uclk = 
0x;
 }
 
-/**
+/*
  * Finds dummy_latency_index when MCLK switching using firmware based
  * vblank stretch is enabled. This function will iterate through the
  * table of dummy pstate latencies until the lowest value that allows
@@ -290,15 +290,14 @@ int dcn32_find_dummy_latency_index_for_f
 /**
  * dcn32_helper_populate_phantom_dlg_params - Get DLG params for phantom pipes
  * and populate pipe_ctx with those params.
- *
- * This function must be called AFTER the phantom pipes are added to context
- * and run through DML (so that the DLG params for the phantom pipes can be
- * populated), and BEFORE we program the timing for the phantom pipes.
- *
  * @dc: [in] current dc state
  * @context: [in] new dc state
  * @pipes: [in] DML pipe params array
  * @pipe_cnt: [in] DML pipe count
+ *
+ * This function must be called AFTER the phantom pipes are added to context
+ * and run through DML (so that the DLG params for the phantom pipes can be
+ * populated), and BEFORE we program the timing for the phantom pipes.
  */
 void dcn32_helper_populate_phantom_dlg_params(struct dc *dc,
  struct dc_state *context,
@@ -331,8 +330,9 @@ void dcn32_helper_populate_phantom_dlg_p
 }
 
 /**
- * 
***
- * dcn32_predict_pipe_split: Predict if pipe split will occur for a given DML 
pipe
+ * dcn32_predict_pipe_split - Predict if pipe split will occur for a given DML 
pipe
+ * @context: [in] New DC state to be programmed
+ * @pipe_e2e: [in] DML pipe end to end context
  *
  * This function takes in a DML pipe (pipe_e2e) and predicts if pipe split is 
required (both
  * ODM and MPC). For pipe split, ODM combine is determined by the ODM mode, 
and MPC combine is
@@ -343,12 +343,7 @@ void dcn32_helper_populate_phantom_dlg_p
  * - MPC combine is only chosen if there is no ODM combine requirements / 
policy in place, and
  *   MPC is required
  *
- * @param [in]: context: New DC state to be programmed
- * @param [in]: pipe_e2e: DML pipe end to end context
- *
- * @return: Number of splits expected (1 for 2:1 split, 3 for 4:1 split, 0 for 
no splits).
- *
- * 
***
+ * Return: Number of splits expected (1 for 2:1 split, 3 for 4:1 split, 0 for 
no splits).
  */
 uint8_t dcn32_predict_pipe_split(struct dc_state *context,
  display_e2e_pipe_params_st *pipe_e2e)
@@ -504,7 +499,14 @@ void insert_entry_into_table_sorted(stru
 }
 
 /**
- * dcn32_set_phantom_stream_timing: Set timing params for the phantom stream
+ * dcn32_set_phantom_stream_timing - Set timing params for the phantom stream
+ * @dc: current dc state
+ * 

Re: [PATCH] powerpc: export cpu_smallcore_map for modules

2022-08-22 Thread Randy Dunlap



On 8/21/22 20:40, Michael Ellerman wrote:
> Randy Dunlap  writes:
>> Fix build error when CONFIG_DRM_AMDGPU=m:
>>
>> ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] 
>> undefined!
>>
>> by exporting 'cpu_smallcore_map' just as other per_cpu
>> symbols are exported.
>>
>> drivers/gpu/drm/amd/amdkfd/kfd_device.c calls cpu_smt_mask().
>> This is an inline function on powerpc which references
>> cpu_smallcore_map.
>>
>> Fixes: 425752c63b6f ("powerpc: Detect the presence of big-cores via "ibm, 
>> thread-groups"")
>> Fixes: 7bc913085765 ("drm/amdkfd: Try to schedule bottom half on same core")
> 
> That 2nd commit is not in mainline, only linux-next.
> 
> I don't mind merging this fix preemptively, but is that SHA stable?

Felix, Alex, can you answer that, please?

-- 
~Randy


[PATCH] powerpc: export cpu_smallcore_map for modules

2022-08-19 Thread Randy Dunlap
Fix build error when CONFIG_DRM_AMDGPU=m:

ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] 
undefined!

by exporting 'cpu_smallcore_map' just as other per_cpu
symbols are exported.

drivers/gpu/drm/amd/amdkfd/kfd_device.c calls cpu_smt_mask().
This is an inline function on powerpc which references
cpu_smallcore_map.

Fixes: 425752c63b6f ("powerpc: Detect the presence of big-cores via "ibm, 
thread-groups"")
Fixes: 7bc913085765 ("drm/amdkfd: Try to schedule bottom half on same core")
Signed-off-by: Randy Dunlap 
Cc: Gautham R. Shenoy 
Cc: Michael Ellerman 
Cc: Nicholas Piggin 
Cc: Christophe Leroy 
Cc: linuxppc-...@lists.ozlabs.org
Cc: amd-gfx@lists.freedesktop.org
Cc: Felix Kuehling 
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
---
 arch/powerpc/kernel/smp.c |1 +
 1 file changed, 1 insertion(+)

--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -86,6 +86,7 @@ DEFINE_PER_CPU(cpumask_var_t, cpu_core_m
 static DEFINE_PER_CPU(cpumask_var_t, cpu_coregroup_map);
 
 EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);
+EXPORT_PER_CPU_SYMBOL(cpu_smallcore_map);
 EXPORT_PER_CPU_SYMBOL(cpu_l2_cache_map);
 EXPORT_PER_CPU_SYMBOL(cpu_core_map);
 EXPORT_SYMBOL_GPL(has_big_cores);


Re: build failure of next-20220817 for amdgpu due to 7bc913085765 ("drm/amdkfd: Try to schedule bottom half on same core")

2022-08-18 Thread Randy Dunlap
Hi--

On 8/18/22 12:15, Sudip Mukherjee wrote:
> On Thu, Aug 18, 2022 at 4:10 PM Randy Dunlap  wrote:
>>
>>
>>
>> On 8/18/22 03:43, Sudip Mukherjee wrote:
>>> On Thu, Aug 18, 2022 at 3:09 AM Randy Dunlap  wrote:
>>>>
>>>>
>>>>
>>>> On 8/17/22 19:01, Alex Deucher wrote:
>>>>> On Wed, Aug 17, 2022 at 6:03 PM Sudip Mukherjee (Codethink)
>>>>>  wrote:
>>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> Not sure if it has been reported, build of next-20220817 fails with the
>>>>>> error:
>>>>>>
>>>>>> ERROR: modpost: "cpu_smallcore_map" 
>>>>>> [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
>>>>>>
>>>>>> Trying to do a git bisect to find out the offending commit.
>>>>>>
>>>>>
>>>>> Thanks.  I don't see that symbol in the driver at all.  Not sure where
>>>>> it is coming from.
>>>>>
>>>>
>>>> It's powerpc only.
>>>>
>>>> Sudip, is it non-CONFIG_SMP by any chance?
>>>
>>> Ohhh.. really sorry for the incomplete report. I should not try to
>>> mail while travelling.
>>>
>>> The error is seen with powerpc allmodconfig and it has CONFIG_SMP=y.
>>
>> OK, I see that also, but it doesn't make any sense (to me).
>>
>> I did 'objdump' on the code file (amdgpu.o) and it's listed as
>> undefined but there are no code references to it.
> 
> cpu_smt_mask() is called by drivers/gpu/drm/amd/amdkfd/kfd_device.c.
> and cpu_smt_mask() is an inline function in
> arch/powerpc/include/asm/smp.h which is doing "return
> per_cpu(cpu_smallcore_map, cpu);"
> 
> So, the offending commit is 7bc913085765 ("drm/amdkfd: Try to schedule
> bottom half on same core").

Thanks for digging that up.

It just needs to have that symbol exported I think.
This builds cleanly now.
I can submit it or one of the AMD gfx developers can do so.


---
 arch/powerpc/kernel/smp.c |1 +
 1 file changed, 1 insertion(+)

--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -86,6 +86,7 @@ DEFINE_PER_CPU(cpumask_var_t, cpu_core_m
 static DEFINE_PER_CPU(cpumask_var_t, cpu_coregroup_map);
 
 EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);
+EXPORT_PER_CPU_SYMBOL(cpu_smallcore_map);
 EXPORT_PER_CPU_SYMBOL(cpu_l2_cache_map);
 EXPORT_PER_CPU_SYMBOL(cpu_core_map);
 EXPORT_SYMBOL_GPL(has_big_cores);


-- 
~Randy


Re: build failure of next-20220817 for amdgpu

2022-08-18 Thread Randy Dunlap



On 8/18/22 03:43, Sudip Mukherjee wrote:
> On Thu, Aug 18, 2022 at 3:09 AM Randy Dunlap  wrote:
>>
>>
>>
>> On 8/17/22 19:01, Alex Deucher wrote:
>>> On Wed, Aug 17, 2022 at 6:03 PM Sudip Mukherjee (Codethink)
>>>  wrote:
>>>>
>>>> Hi All,
>>>>
>>>> Not sure if it has been reported, build of next-20220817 fails with the
>>>> error:
>>>>
>>>> ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] 
>>>> undefined!
>>>>
>>>> Trying to do a git bisect to find out the offending commit.
>>>>
>>>
>>> Thanks.  I don't see that symbol in the driver at all.  Not sure where
>>> it is coming from.
>>>
>>
>> It's powerpc only.
>>
>> Sudip, is it non-CONFIG_SMP by any chance?
> 
> Ohhh.. really sorry for the incomplete report. I should not try to
> mail while travelling.
> 
> The error is seen with powerpc allmodconfig and it has CONFIG_SMP=y.

OK, I see that also, but it doesn't make any sense (to me).

I did 'objdump' on the code file (amdgpu.o) and it's listed as
undefined but there are no code references to it.

-- 
~Randy


Re: build failure of next-20220817 for amdgpu

2022-08-17 Thread Randy Dunlap



On 8/17/22 19:01, Alex Deucher wrote:
> On Wed, Aug 17, 2022 at 6:03 PM Sudip Mukherjee (Codethink)
>  wrote:
>>
>> Hi All,
>>
>> Not sure if it has been reported, build of next-20220817 fails with the
>> error:
>>
>> ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] 
>> undefined!
>>
>> Trying to do a git bisect to find out the offending commit.
>>
> 
> Thanks.  I don't see that symbol in the driver at all.  Not sure where
> it is coming from.
> 

It's powerpc only.

Sudip, is it non-CONFIG_SMP by any chance?

> 
> 
>> I will be happy to test any patch or provide any extra log if needed.
>>
>>
>> --
>> Regards
>> Sudip

-- 
~Randy


Re: [PATCH 0/4] Fix compilation issues when using i386

2022-06-30 Thread Randy Dunlap
Hi--

On 6/30/22 11:58, Alex Deucher wrote:
> On Thu, Jun 30, 2022 at 2:46 PM Rodrigo Siqueira
>  wrote:
>>
>> Fix compilation issues when using i386
>>
>> We recently got feedback from Randy about issues in the x86-32
>> compilation.I was able to reproduce a very similar issue by using:
>>
>> - gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
>> - make -j16 ARCH=i386
>> - amd-staging-drm-next
>>
>> I'm able to see these issues:
>>
>> ERROR: modpost: "__nedf2" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
>> ERROR: modpost: "__muldf3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
>> ERROR: modpost: "__floatunsidf" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] 
>> undefined!
>> ERROR: modpost: "__umoddi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
>>
>> This patchset addresses each compilation issue in its own patch since I
>> want to have an easy way to bisect display code in case of regressions.
>> Please, let me know if you see any issue with these changes and if it
>> fixes the 32-bit compilation. If you still see compilation issues,
>> please, report:
>>
>> - GCC version
>> - Config file
>> - Branch
>>
>> Thanks
>> Siqueira
>>
>> Rodrigo Siqueira (4):
>>   drm/amd/display: Fix __umoddi3 undefined for 32 bit compilation
>>   drm/amd/display: Fix __floatunsidf undefined for 32 bit compilation
>>   drm/amd/display: Fix __muldf3 undefined for 32 bit compilation
>>   drm/amd/display: Fix __nedf2 undefined for 32 bit compilation
> 
> Series is:
> Reviewed-by: Alex Deucher 

Series is:
Acked-by: Randy Dunlap 
Tested-by: Randy Dunlap  # build-tested

Thanks.

> 
> I think this patch is also relevant, if someone can review it as well:
> https://patchwork.freedesktop.org/patch/491429/
> 
> Alex
> 
>>
>>  .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c  | 15 +--
>>  .../gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c|  4 +++-
>>  drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h   |  2 +-
>>  3 files changed, 13 insertions(+), 8 deletions(-)
>>
>> --
>> 2.25.1
>>

-- 
~Randy


Re: linux-next: Tree for Jun 29 (gpu/drm/amd/display/dc/)

2022-06-29 Thread Randy Dunlap


On 6/29/22 00:23, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20220628:
> 

on i386:

ld: drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.o: in function 
`dcn32_init_clocks':
dcn32_clk_mgr.c:(.text+0x70d): undefined reference to `__nedf2'
ld: dcn32_clk_mgr.c:(.text+0x9bf): undefined reference to `__floatunsidf'
ld: dcn32_clk_mgr.c:(.text+0xa03): undefined reference to `__muldf3'
ld: dcn32_clk_mgr.c:(.text+0xa37): undefined reference to `__muldf3'
ld: drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.o: in function 
`dcn32_calculate_cab_allocation':
dcn32_hwseq.c:(.text+0xda): undefined reference to `__umoddi3'
ld: dcn32_hwseq.c:(.text+0x112): undefined reference to `__umoddi3'
ld: dcn32_hwseq.c:(.text+0x16d): undefined reference to `__umoddi3'


Full randconfig file is attached.


-- 
~Randy

config-r4302.gz
Description: application/gzip


Re: linux-next: Tree for Jun 23 [drivers/gpu/drm/amd/amdgpu/amdgpu.ko]

2022-06-23 Thread Randy Dunlap



On 6/22/22 23:57, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20220622:
> 
> 
> The amdgpu tree lost its build failure.
> The amdgpu tree gained a semantic conflict against the driver-core tree.
> 

on i386:

ERROR: modpost: "__umoddi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: modpost: "__floatunsidf" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] 
undefined!
ERROR: modpost: "__muldf3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: modpost: "__nedf2" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!


-- 
~Randy


Re: linux-next: Tree for Jun 15 (drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c)

2022-06-15 Thread Randy Dunlap
Hi--

On 6/15/22 13:13, Alex Deucher wrote:
> On Wed, Jun 15, 2022 at 3:44 PM Randy Dunlap  wrote:
>>
>>
>>
>> On 6/15/22 12:28, Alex Deucher wrote:
>>> On Wed, Jun 15, 2022 at 3:01 PM Randy Dunlap  wrote:
>>>>
>>>>
>>>>
>>>> On 6/14/22 23:01, Stephen Rothwell wrote:
>>>>> Hi all,
>>>>>
>>>>> Changes since 20220614:
>>>>>
>>>>
>>>> on i386:
>>>> # CONFIG_DEBUG_FS is not set
>>>>
>>>>
>>>> ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In 
>>>> function ‘amdgpu_dm_crtc_late_register’:
>>>> ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: 
>>>> error: implicit declaration of function ‘crtc_debugfs_init’; did you mean 
>>>> ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
>>>>   crtc_debugfs_init(crtc);
>>>>   ^
>>>>   amdgpu_debugfs_init
>>>>
>>>>
>>>> Full randconfig file is attached.
>>>
>>> I tried building with your config and I can't repro this.  As Harry
>>> noted, that function and the whole secure display feature depend on
>>> debugfs.  It should never be built without CONFIG_DEBUG_FS.  See
>>> drivers/gpu/drm/amd/display/Kconfig:
>>
>> Did you try building with today's linux-next tree?
>> (whatever is in it)
>>
>> I have seen this build error multiple times so it shouldn't
>> be so difficult to repro it.
>>
>>
>>>> config DRM_AMD_SECURE_DISPLAY
>>>> bool "Enable secure display support"
>>>> default n
>>>> depends on DEBUG_FS
>>>> depends on DRM_AMD_DC_DCN
>>>> help
>>>> Choose this option if you want to
>>>> support secure display
>>>>
>>>> This option enables the calculation
>>>> of crc of specific region via debugfs.
>>>> Cooperate with specific DMCU FW.
>>>
>>> amdgpu_dm_crtc_late_register is guarded by
>>> CONIG_DRM_AMD_SECURE_DISPLAY.  It's not clear to me how we could hit
>>> this.
>

I was just about to ask what the paragraph above means.
It was confusing to say the least.
 
> I was able to repro it.  In linux-next the
> CONFIG_DRM_AMD_SECURE_DISPLAY ifdefs in
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c seem to be missing.
> I guess they were lost when the amdgpu branch was merged into
> linux-next.  The attached patch restores the
> CONFIG_DRM_AMD_SECURE_DISPLAY protections.

OK, that builds for me.

Thanks.

-- 
~Randy


Re: linux-next: Tree for Jun 15 (drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c)

2022-06-15 Thread Randy Dunlap



On 6/15/22 12:28, Alex Deucher wrote:
> On Wed, Jun 15, 2022 at 3:01 PM Randy Dunlap  wrote:
>>
>>
>>
>> On 6/14/22 23:01, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Changes since 20220614:
>>>
>>
>> on i386:
>> # CONFIG_DEBUG_FS is not set
>>
>>
>> ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 
>> ‘amdgpu_dm_crtc_late_register’:
>> ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: 
>> error: implicit declaration of function ‘crtc_debugfs_init’; did you mean 
>> ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
>>   crtc_debugfs_init(crtc);
>>   ^
>>   amdgpu_debugfs_init
>>
>>
>> Full randconfig file is attached.
> 
> I tried building with your config and I can't repro this.  As Harry
> noted, that function and the whole secure display feature depend on
> debugfs.  It should never be built without CONFIG_DEBUG_FS.  See
> drivers/gpu/drm/amd/display/Kconfig:

Did you try building with today's linux-next tree?
(whatever is in it)

I have seen this build error multiple times so it shouldn't
be so difficult to repro it.


>> config DRM_AMD_SECURE_DISPLAY
>> bool "Enable secure display support"
>> default n
>> depends on DEBUG_FS
>> depends on DRM_AMD_DC_DCN
>> help
>> Choose this option if you want to
>> support secure display
>>
>> This option enables the calculation
>> of crc of specific region via debugfs.
>> Cooperate with specific DMCU FW.
> 
> amdgpu_dm_crtc_late_register is guarded by
> CONIG_DRM_AMD_SECURE_DISPLAY.  It's not clear to me how we could hit
> this.


-- 
~Randy


Re: linux-next: Tree for Jun 15 (drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c)

2022-06-15 Thread Randy Dunlap


On 6/14/22 23:01, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20220614:
> 

on i386:
# CONFIG_DEBUG_FS is not set


../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 
‘amdgpu_dm_crtc_late_register’:
../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: error: 
implicit declaration of function ‘crtc_debugfs_init’; did you mean 
‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
  crtc_debugfs_init(crtc);
  ^
  amdgpu_debugfs_init


Full randconfig file is attached.

-- 
~Randy

config-amdgpu-not-debugfs.gz
Description: application/gzip


Re: [PATCH] drm/amd/display: add stub for crtc_debugfs_init()

2022-06-14 Thread Randy Dunlap



On 6/14/22 10:45, Harry Wentland wrote:
> On 2022-06-14 11:57, Randy Dunlap wrote:
>> Fix build error when CONFIG_DEBUG_FS is not enabled by adding a
>> stub function for crtc_debugfs_init().
>>
>> Eliminates this build error:
>>
>> ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 
>> ‘amdgpu_dm_crtc_late_register’:
>> ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: 
>> error: implicit declaration of function ‘crtc_debugfs_init’; did you mean 
>> ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
>>   crtc_debugfs_init(crtc);
>>   ^
>>   amdgpu_debugfs_init
>>
>> Fixes: 86bc22191892 ("drm/amd/display: Support crc on specific region")
> 
> That whole patch and the whole secure display feature depend on debugfs.
> It should never try building without CONFIG_DEBUG_FS.

Hi Harry,
Well, it's clearly possible to have this build error, so something needs
to be fixed somewhere.

> See drivers/gpu/drm/amd/display/Kconfig:
> 
>> config DRM_AMD_SECURE_DISPLAY
>> bool "Enable secure display support"
>> default n
>> depends on DEBUG_FS
>> depends on DRM_AMD_DC_DCN
>> help
>> Choose this option if you want to
>> support secure display
>>
>> This option enables the calculation
>> of crc of specific region via debugfs.
>> Cooperate with specific DMCU FW.
> 
> amdgpu_dm_crtc_late_register is guarded by CONIG_DRM_AMD_SECURE_DISPLAY.
> 
> Harry
> 
>> Signed-off-by: Randy Dunlap 
>> Cc: Wayne Lin 
>> Cc: Alex Deucher 
>> Cc: Christian König 
>> Cc: "Pan, Xinhui" 
>> Cc: amd-gfx@lists.freedesktop.org
>> Cc: dri-de...@lists.freedesktop.org
>> ---
>>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |2 --
>>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h |6 ++
>>  2 files changed, 6 insertions(+), 2 deletions(-)
>>
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -57,9 +57,7 @@
>>  #include "amdgpu_dm_irq.h"
>>  #include "dm_helpers.h"
>>  #include "amdgpu_dm_mst_types.h"
>> -#if defined(CONFIG_DEBUG_FS)
>>  #include "amdgpu_dm_debugfs.h"
>> -#endif
>>  #include "amdgpu_dm_psr.h"
>>  
>>  #include "ivsrcid/ivsrcid_vislands30.h"
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
>> @@ -31,6 +31,12 @@
>>  
>>  void connector_debugfs_init(struct amdgpu_dm_connector *connector);
>>  void dtn_debugfs_init(struct amdgpu_device *adev);
>> +
>> +#ifdef CONFIG_DEBUG_FS
>>  void crtc_debugfs_init(struct drm_crtc *crtc);
>> +#else
>> +static inline void crtc_debugfs_init(struct drm_crtc *crtc)
>> +{}
>> +#endif
>>  
>>  #endif
> 

thanks.
-- 
~Randy


[PATCH] drm/amd/display: add stub for crtc_debugfs_init()

2022-06-14 Thread Randy Dunlap
Fix build error when CONFIG_DEBUG_FS is not enabled by adding a
stub function for crtc_debugfs_init().

Eliminates this build error:

../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 
‘amdgpu_dm_crtc_late_register’:
../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: error: 
implicit declaration of function ‘crtc_debugfs_init’; did you mean 
‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
  crtc_debugfs_init(crtc);
  ^
  amdgpu_debugfs_init

Fixes: 86bc22191892 ("drm/amd/display: Support crc on specific region")
Signed-off-by: Randy Dunlap 
Cc: Wayne Lin 
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |2 --
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h |6 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -57,9 +57,7 @@
 #include "amdgpu_dm_irq.h"
 #include "dm_helpers.h"
 #include "amdgpu_dm_mst_types.h"
-#if defined(CONFIG_DEBUG_FS)
 #include "amdgpu_dm_debugfs.h"
-#endif
 #include "amdgpu_dm_psr.h"
 
 #include "ivsrcid/ivsrcid_vislands30.h"
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
@@ -31,6 +31,12 @@
 
 void connector_debugfs_init(struct amdgpu_dm_connector *connector);
 void dtn_debugfs_init(struct amdgpu_device *adev);
+
+#ifdef CONFIG_DEBUG_FS
 void crtc_debugfs_init(struct drm_crtc *crtc);
+#else
+static inline void crtc_debugfs_init(struct drm_crtc *crtc)
+{}
+#endif
 
 #endif


Re: [PATCH 2/2] drm/amdgpu: debugfs: fix NULL dereference in ta_if_invoke_debugfs_write()

2022-04-27 Thread Randy Dunlap
Alex--

On 4/26/22 07:47, Alex Deucher wrote:
> Applied the series.  Thanks!
> 
> Alex
> 

I just saw a build warning here when CONFIG_DEBUG_FS is not enabled:

../drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c:281:23: warning: 
'amdgpu_ta_if_debugfs_create' defined but not used [-Wunused-function]
  281 | static struct dentry *amdgpu_ta_if_debugfs_create(struct amdgpu_device 
*adev)
  |   ^~~


-- 
~Randy


[PATCH] drm/amd/display: fix non-kernel-doc comment warnings

2022-04-25 Thread Randy Dunlap
Fix kernel-doc warnings for a comment that should not use
kernel-doc notation:

dmub_psr.c:235: warning: This comment starts with '/**', but isn't a kernel-doc 
comment. Refer Documentation/doc-guide/kernel-doc.rst
 * Set PSR power optimization flags.
dmub_psr.c:235: warning: missing initial short description on line:
 * Set PSR power optimization flags.

Fixes: e5dfcd272722 ("drm/amd/display: dc_link_set_psr_allow_active 
refactoring")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Robin Chen 
Cc: Alex Deucher 
Cc: Anthony Koo 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
---
 drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
@@ -231,7 +231,7 @@ static void dmub_psr_set_level(struct dm
dc_dmub_srv_wait_idle(dc->dmub_srv);
 }
 
-/**
+/*
  * Set PSR power optimization flags.
  */
 static void dmub_psr_set_power_opt(struct dmub_psr *dmub, unsigned int 
power_opt, uint8_t panel_inst)


[PATCH] drm/amd/display: DCN3.1: don't mark as kernel-doc

2022-03-28 Thread Randy Dunlap
There is no need for this one static function to be marked as
kernel-doc notation.

Avoid this doc build warning:

warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 * Enable CRTC

Fixes: 110d3968fe95 ("drm/amd/display: Add DCN3.1 OPTC")
Signed-off-by: Randy Dunlap 
Cc: Alex Deucher 
Cc: Nicholas Kazlauskas 
Cc: amd-gfx@lists.freedesktop.org
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
---
 drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-next-20220325.orig/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.c
+++ linux-next-20220325/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.c
@@ -91,8 +91,7 @@ static void optc31_set_odm_combine(struc
optc1->opp_count = opp_cnt;
 }
 
-/**
- * Enable CRTC
+/*
  * Enable CRTC - call ASIC Control Object to enable Timing generator.
  */
 static bool optc31_enable_crtc(struct timing_generator *optc)


Re: [PATCH] drm/amdgpu: Fix ARM compilation warning

2022-02-18 Thread Randy Dunlap
Also seen on i386.

On 2/16/22 14:08, Luben Tuikov wrote:
> Fix this ARM warning:
> 
> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:664:35: warning: format '%ld'
> expects argument of type 'long int', but argument 4 has type 'size_t' {aka
> 'unsigned int'} [-Wformat=]
> 
> Cc: Alex Deucher 
> Cc: kbuild-...@lists.01.org
> Cc: linux-ker...@vger.kernel.org
> Reported-by: kernel test robot 
> Fixes: 7e60fbfbdc10a0 ("drm/amdgpu: Show IP discovery in sysfs")
> Signed-off-by: Luben Tuikov 

Acked-by: Randy Dunlap 
Tested-by: Randy Dunlap 
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index ad2355b0037f52..6c3a3c74e0231f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -668,7 +668,7 @@ static int amdgpu_discovery_sysfs_ips(struct 
> amdgpu_device *adev,
>   le16_to_cpu(ip->hw_id) != ii)
>   goto next_ip;
>  
> - DRM_DEBUG("match:%d @ ip_offset:%ld", ii, ip_offset);
> + DRM_DEBUG("match:%d @ ip_offset:%zu", ii, ip_offset);
>  
>   /* We have a hw_id match; register the hw
>* block if not yet registered.
> 
> base-commit: f723076ae13011a23d9a586899e38bc68feeb6b2

thanks.
-- 
~Randy


Re: Build regressions/improvements in v5.17-rc1

2022-01-25 Thread Randy Dunlap



On 1/24/22 17:23, Felix Kuehling wrote:
> 
> Am 2022-01-24 um 14:11 schrieb Randy Dunlap:
>> On 1/24/22 10:55, Geert Uytterhoeven wrote:
>>> Hi Alex,
>>>
>>> On Mon, Jan 24, 2022 at 7:52 PM Alex Deucher  wrote:
>>>> On Mon, Jan 24, 2022 at 5:25 AM Geert Uytterhoeven  
>>>> wrote:
>>>>> On Sun, 23 Jan 2022, Geert Uytterhoeven wrote:
>>>>>>   + /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: 
>>>>>> error: control reaches end of non-void function [-Werror=return-type]:  
>>>>>> => 1560:1
>>>> I don't really see what's going on here:
>>>>
>>>> #ifdef CONFIG_X86_64
>>>> return cpu_data(first_cpu_of_numa_node).apicid;
>>>> #else
>>>> return first_cpu_of_numa_node;
>>>> #endif
>>> Ah, the actual failure causing this was not included:
>>>
>>> In file included from /kisskb/src/arch/x86/um/asm/processor.h:41:0,
>>>   from /kisskb/src/include/linux/mutex.h:19,
>>>   from /kisskb/src/include/linux/kernfs.h:11,
>>>   from /kisskb/src/include/linux/sysfs.h:16,
>>>   from /kisskb/src/include/linux/kobject.h:20,
>>>   from /kisskb/src/include/linux/pci.h:35,
>>>   from
>>> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:25:
>>> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In
>>> function 'kfd_cpumask_to_apic_id':
>>> /kisskb/src/arch/um/include/asm/processor-generic.h:103:18: error:
>>> called object is not a function or function pointer
>>>   #define cpu_data (_cpu_data)
>>>    ^
>>> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1556:9:
>>> note: in expansion of macro 'cpu_data'
>>>    return cpu_data(first_cpu_of_numa_node).apicid;
>>>   ^
>>> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1560:1:
>>> error: control reaches end of non-void function [-Werror=return-type]
>>>   }
>>>   ^
>> ah yes, UML.
>> I have a bunch of UML fixes that I have been hesitant to post.
>>
>> This is one of them.
>> What do people think about this?
> 
> Does it make sense to configure a UML kernel with a real device driver in the 
> first place? Or should we just prevent enabling amdgpu for UML with a Kconfig 
> dependency?
> 

Hi,

Your option IMO. I have seen both opinions given.
I also meant to reply that someone could just add
depends on !UML
for this device, like you are suggesting.

I'm fine with it either way.

thanks.

> 
>>
>> thanks.
>>
>> ---
>> From: Randy Dunlap 
>>
>>
>> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1556:9: note: in 
>> expansion of macro ‘cpu_data’
>>    return cpu_data(first_cpu_of_numa_node).apicid;
>>   ^~~~
>> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1560:1: error: 
>> control reaches end of non-void function [-Werror=return-type]
>>
>> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function 
>> ‘kfd_fill_iolink_info_for_cpu’:
>> ../arch/um/include/asm/processor-generic.h:103:19: error: called object is 
>> not a function or function pointer
>>   #define cpu_data (_cpu_data)
>>    ~^~~
>> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1688:27: note: in 
>> expansion of macro ‘cpu_data’
>>    struct cpuinfo_x86 *c = _data(0);
>>     ^~~~
>> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1691:7: error: 
>> dereferencing pointer to incomplete type ‘struct cpuinfo_x86’
>>    if (c->x86_vendor == X86_VENDOR_AMD)
>>     ^~
>> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1691:23: error: 
>> ‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean 
>> ‘X86_VENDOR_ANY’?
>>    if (c->x86_vendor == X86_VENDOR_AMD)
>>     ^~
>>     X86_VENDOR_ANY
>>
>> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function 
>> ‘kfd_create_vcrat_image_cpu’:
>> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1742:11: warning: unused 
>> variable ‘entries’ [-Wunused-variable]
>>    uint32_t entries = 0;
>>
>> Signed-off-by: Randy Dunlap 
>> ---
>>   drivers/gpu/drm/amd/amdkfd/kfd_crat.c |    6 +++---
>>   drivers/gpu/drm/amd/amdkfd/kfd_topology.c |    2 +-
>>   2 files chan

Re: Build regressions/improvements in v5.17-rc1

2022-01-24 Thread Randy Dunlap



On 1/24/22 10:55, Geert Uytterhoeven wrote:
> Hi Alex,
> 
> On Mon, Jan 24, 2022 at 7:52 PM Alex Deucher  wrote:
>> On Mon, Jan 24, 2022 at 5:25 AM Geert Uytterhoeven  
>> wrote:
>>> On Sun, 23 Jan 2022, Geert Uytterhoeven wrote:
>>>>  + /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: error: 
>>>> control reaches end of non-void function [-Werror=return-type]:  => 1560:1
>>
>> I don't really see what's going on here:
>>
>> #ifdef CONFIG_X86_64
>> return cpu_data(first_cpu_of_numa_node).apicid;
>> #else
>> return first_cpu_of_numa_node;
>> #endif
> 
> Ah, the actual failure causing this was not included:
> 
> In file included from /kisskb/src/arch/x86/um/asm/processor.h:41:0,
>  from /kisskb/src/include/linux/mutex.h:19,
>  from /kisskb/src/include/linux/kernfs.h:11,
>  from /kisskb/src/include/linux/sysfs.h:16,
>  from /kisskb/src/include/linux/kobject.h:20,
>  from /kisskb/src/include/linux/pci.h:35,
>  from
> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:25:
> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In
> function 'kfd_cpumask_to_apic_id':
> /kisskb/src/arch/um/include/asm/processor-generic.h:103:18: error:
> called object is not a function or function pointer
>  #define cpu_data (_cpu_data)
>   ^
> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1556:9:
> note: in expansion of macro 'cpu_data'
>   return cpu_data(first_cpu_of_numa_node).apicid;
>  ^
> /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1560:1:
> error: control reaches end of non-void function [-Werror=return-type]
>  }
>  ^

ah yes, UML.
I have a bunch of UML fixes that I have been hesitant to post.

This is one of them.
What do people think about this?

thanks.

---
From: Randy Dunlap 


../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1556:9: note: in 
expansion of macro ‘cpu_data’
  return cpu_data(first_cpu_of_numa_node).apicid;
 ^~~~
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1560:1: error: control 
reaches end of non-void function [-Werror=return-type]

../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function 
‘kfd_fill_iolink_info_for_cpu’:
../arch/um/include/asm/processor-generic.h:103:19: error: called object is not 
a function or function pointer
 #define cpu_data (_cpu_data)
  ~^~~
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1688:27: note: in expansion 
of macro ‘cpu_data’
  struct cpuinfo_x86 *c = _data(0);
   ^~~~
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1691:7: error: dereferencing 
pointer to incomplete type ‘struct cpuinfo_x86’
  if (c->x86_vendor == X86_VENDOR_AMD)
   ^~
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1691:23: error: 
‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean 
‘X86_VENDOR_ANY’?
  if (c->x86_vendor == X86_VENDOR_AMD)
   ^~
   X86_VENDOR_ANY

../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function 
‘kfd_create_vcrat_image_cpu’:
../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1742:11: warning: unused 
variable ‘entries’ [-Wunused-variable]
  uint32_t entries = 0;

Signed-off-by: Randy Dunlap 
---
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c |6 +++---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

--- linux-next-20220107.orig/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ linux-next-20220107/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -1552,7 +1552,7 @@ static int kfd_cpumask_to_apic_id(const
first_cpu_of_numa_node = cpumask_first(cpumask);
if (first_cpu_of_numa_node >= nr_cpu_ids)
return -1;
-#ifdef CONFIG_X86_64
+#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
return cpu_data(first_cpu_of_numa_node).apicid;
 #else
return first_cpu_of_numa_node;
--- linux-next-20220107.orig/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
+++ linux-next-20220107/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
@@ -1679,7 +1679,7 @@ static int kfd_fill_mem_info_for_cpu(int
return 0;
 }
 
-#ifdef CONFIG_X86_64
+#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
 static int kfd_fill_iolink_info_for_cpu(int numa_node_id, int *avail_size,
uint32_t *num_entries,
struct crat_subtype_iolink *sub_type_hdr)
@@ -1738,7 +1738,7 @@ static int kfd_create_vcrat_image_cpu(vo
struct crat_subtype_generic *sub_type_hdr;
int avail_size = *size;
int numa_node_id;
-#ifdef CONFIG_X86_64
+#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
 

[PATCH -next] drm/amd/display: don't use /** for non-kernel-doc comments

2022-01-22 Thread Randy Dunlap
Change a static function's comment from "/**" (indicating kernel-doc
notation) to "/*" (indicating a regular C language comment).
This prevents multiple kernel-doc warnings:

  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:4343: warning: 
Function parameter or member 'max_supported_frl_bw_in_kbps' not described in 
'intersect_frl_link_bw_support'
  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:4343: warning: 
Function parameter or member 'hdmi_encoded_link_bw' not described in 
'intersect_frl_link_bw_support'
  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:4343: warning: 
expecting prototype for Return PCON's post FRL link training supported BW if 
its non(). Prototype was for intersect_frl_link_bw_support() instead

Fixes: c022375ae095 ("drm/amd/display: Add DP-HDMI FRL PCON Support in DC")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Fangzhi Zuo 
Cc: Alex Deucher 
Cc: Nicholas Kazlauskas 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: Rodrigo Siqueira 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20220121.orig/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ linux-next-20220121/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -4970,7 +4970,7 @@ uint32_t dc_link_bw_kbps_from_raw_frl_li
return 0;
 }
 
-/**
+/*
  * Return PCON's post FRL link training supported BW if its non-zero, 
otherwise return max_supported_frl_bw.
  */
 static uint32_t intersect_frl_link_bw_support(


Re: [PATCH] drm/amd/display: fix 64 bit divide

2021-11-24 Thread Randy Dunlap

On 11/24/21 8:36 AM, Alex Deucher wrote:

Use do_div.

Fixes: c34f1652a18c4b ("drm/amd/display: fixed an error related to 4:2:0/4:2:2 
DSC")
Reported-by: kernel test robot 
Reported-by: Randy Dunlap 
Cc: Bing Guo 
Signed-off-by: Alex Deucher 


Acked-by: Randy Dunlap  # build-tested

Thanks.


---
  drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c | 7 ---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c 
b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c
index 381561ee0026..7e306aa3e2b9 100644
--- a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c
+++ b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c
@@ -100,6 +100,7 @@ int dscc_compute_dsc_parameters(const struct drm_dsc_config 
*pps, struct dsc_par
int  ret;
struct rc_params rc;
struct drm_dsc_config   dsc_cfg;
+   unsigned long long tmp;
  
  	calc_rc_params(, pps);

dsc_params->pps = *pps;
@@ -111,9 +112,9 @@ int dscc_compute_dsc_parameters(const struct drm_dsc_config 
*pps, struct dsc_par
dsc_cfg.mux_word_size = dsc_params->pps.bits_per_component <= 10 ? 48 : 
64;
  
  	ret = drm_dsc_compute_rc_parameters(_cfg);

-   dsc_params->bytes_per_pixel =
-   (uint32_t)(((unsigned long 
long)dsc_cfg.slice_chunk_size * 0x1000 + (dsc_cfg.slice_width - 1))
-   / 
(uint32_t)dsc_cfg.slice_width);  //ROUND-UP
+   tmp = (unsigned long long)dsc_cfg.slice_chunk_size * 0x1000 + 
(dsc_cfg.slice_width - 1);
+   do_div(tmp, (uint32_t)dsc_cfg.slice_width);  //ROUND-UP
+   dsc_params->bytes_per_pixel = (uint32_t)tmp;
  
  	copy_pps_fields(_params->pps, _cfg);

dsc_params->rc_buffer_model_size = dsc_cfg.rc_bits;




--
~Randy


Re: linux-next: Tree for Nov 24 (drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.o)

2021-11-24 Thread Randy Dunlap

On 11/23/21 9:16 PM, Stephen Rothwell wrote:

Hi all,

Changes since 20211123:



on i386:

ld: drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.o: in function 
`dscc_compute_dsc_parameters':
rc_calc_dpi.c:(.text+0x31f): undefined reference to `__udivdi3'


--
~Randy


Re: [PATCH] drm/amdgpu/nv: add missing CONFIG_DRM_AMD_DC check

2021-10-01 Thread Randy Dunlap

On 10/1/21 12:48 PM, Alex Deucher wrote:

Check was missing for cyan skillfish.

Fixes: 82d96c34b0d49b ("drm/amd/display: add cyan_skillfish display support")
Reported-by: Randy Dunlap 
Signed-off-by: Alex Deucher 


Acked-by: Randy Dunlap  # build-tested

Thanks.


---
  drivers/gpu/drm/amd/amdgpu/nv.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index 96975c8cc026..898e688be63c 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -891,8 +891,10 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
}
if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
amdgpu_device_ip_block_add(adev, _vkms_ip_block);
+#if defined(CONFIG_DRM_AMD_DC)
else if (amdgpu_device_has_dc_support(adev))
amdgpu_device_ip_block_add(adev, _ip_block);
+#endif
amdgpu_device_ip_block_add(adev, _v10_0_ip_block);
amdgpu_device_ip_block_add(adev, _v5_0_ip_block);
break;




--
~Randy


Re: linux-next: Tree for Oct 1 [drivers/gpu/drm/amd/amdgpu/amdgpu.ko]

2021-10-01 Thread Randy Dunlap

On 10/1/21 12:09 AM, Stephen Rothwell wrote:

Hi all,

News: there will be no linux-next release on Monday.

Changes since 20210930:



on i386:

ERROR: modpost: "dm_ip_block" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Full randconfig file is attached.

--
~Randy


config-r5146.gz
Description: application/gzip


[PATCH] drm/amd/display: use do-while-0 for DC_TRACE_LEVEL_MESSAGE()

2021-08-09 Thread Randy Dunlap
Building with W=1 complains about an empty 'else' statement, so use the
usual do-nothing-while-0 loop to quieten this warning.

../drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:113:53: warning: 
suggest braces around empty body in an 'else' statement [-Wempty-body]
  113 | *state, retry_count);

Fixes: b30eda8d416c ("drm/amd/display: Add ETW log to dmub_psr_get_state")
Signed-off-by: Randy Dunlap 
Cc: Wyatt Wood 
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: David Airlie 
Cc: Daniel Vetter 
---
 drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20210806.orig/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
+++ linux-next-20210806/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
@@ -29,7 +29,7 @@
 #include "dmub/dmub_srv.h"
 #include "core_types.h"
 
-#define DC_TRACE_LEVEL_MESSAGE(...) /* do nothing */
+#define DC_TRACE_LEVEL_MESSAGE(...)do {} while (0) /* do nothing */
 
 #define MAX_PIPES 6
 


[PATCH] drm/amdgpu: fix kernel-doc warnings on non-kernel-doc comments

2021-08-09 Thread Randy Dunlap
Don't use "begin kernel-doc notation" (/**) for comments that are
not kernel-doc. This eliminates warnings reported by the 0day bot.

drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:89: warning: This comment starts with 
'/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
* This shader is used to clear VGPRS and LDS, and also write the input
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:209: warning: This comment starts with 
'/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
* The below shaders are used to clear SGPRS, and also write the input
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:301: warning: This comment starts with 
'/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
* This shader is used to clear the uninitiated sgprs after the above

Fixes: 0e0036c7d13b ("drm/amdgpu: fix no full coverage issue for gprs 
initialization")
Signed-off-by: Randy Dunlap 
Reported-by: kernel test robot 
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: Dennis Li 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-next-20210806.orig/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c
+++ linux-next-20210806/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c
@@ -85,7 +85,7 @@ static const struct soc15_reg_golden gol
SOC15_REG_GOLDEN_VALUE(GC, 0, regTCI_CNTL_3, 0xff, 0x20),
 };
 
-/**
+/*
  * This shader is used to clear VGPRS and LDS, and also write the input
  * pattern into the write back buffer, which will be used by driver to
  * check whether all SIMDs have been covered.
@@ -206,7 +206,7 @@ const struct soc15_reg_entry vgpr_init_r
{ SOC15_REG_ENTRY(GC, 0, regCOMPUTE_STATIC_THREAD_MGMT_SE7), 0x 
},
 };
 
-/**
+/*
  * The below shaders are used to clear SGPRS, and also write the input
  * pattern into the write back buffer. The first two dispatch should be
  * scheduled simultaneously which make sure that all SGPRS could be
@@ -302,7 +302,7 @@ const struct soc15_reg_entry sgpr96_init
{ SOC15_REG_ENTRY(GC, 0, regCOMPUTE_STATIC_THREAD_MGMT_SE7), 0x 
},
 };
 
-/**
+/*
  * This shader is used to clear the uninitiated sgprs after the above
  * two dispatches, because of hardware feature, dispath 0 couldn't clear
  * top hole sgprs. Therefore need 4 waves per SIMD to cover these sgprs


[PATCH -next] drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled

2021-07-29 Thread Randy Dunlap
'pm_suspend_target_state' is only available when CONFIG_PM_SLEEP
is set/enabled. OTOH, when both SUSPEND and HIBERNATION are not set,
PM_SLEEP is not set, so this variable cannot be used.

../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function 
‘amdgpu_acpi_is_s0ix_active’:
../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1046:11: error: 
‘pm_suspend_target_state’ undeclared (first use in this function); did you mean 
‘__KSYM_pm_suspend_target_state’?
return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
   ^~~
   __KSYM_pm_suspend_target_state

Also use shorter IS_ENABLED(CONFIG_foo) notation for checking the
2 config symbols.

Fixes: 91b03fc6b50c ("drm/amdgpu: Check pmops for desired suspend state")
Signed-off-by: Randy Dunlap 
Cc: Alex Deucher 
Cc: Christian König 
Cc: "Pan, Xinhui" 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-n...@vger.kernel.org
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linext-20210729.orig/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ linext-20210729/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -1040,7 +1040,7 @@ void amdgpu_acpi_detect(void)
  */
 bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)
 {
-#if defined(CONFIG_AMD_PMC) || defined(CONFIG_AMD_PMC_MODULE)
+#if IS_ENABLED(CONFIG_AMD_PMC) && IS_ENABLED(CONFIG_PM_SLEEP)
if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
if (adev->flags & AMD_IS_APU)
return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 1/3] gpu: drm: replace occurrences of invalid character

2021-05-19 Thread Randy Dunlap
On 5/19/21 1:15 AM, Mauro Carvalho Chehab wrote:
> There are some places at drm that ended receiving a
> REPLACEMENT CHARACTER U+fffd ('�'), probably because of
> some bad charset conversion.
> 
> Fix them by using what it seems   to be the proper
> character.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Randy Dunlap 

Thanks.

> ---
>  drivers/gpu/drm/amd/include/atombios.h   | 10 +-
>  drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  2 +-
>  drivers/gpu/drm/i915/i915_gpu_error.h|  2 +-
>  drivers/gpu/drm/r128/r128_drv.h  |  2 +-
>  4 files changed, 8 insertions(+), 8 deletions(-)
> 

-- 
~Randy

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon/r600_cs: Couple of typo fixes

2021-03-24 Thread Randy Dunlap
On 3/24/21 6:50 AM, Bhaskar Chowdhury wrote:
> 
> s/miror/mirror/
> s/needind/needing/
> 
> Signed-off-by: Bhaskar Chowdhury 
> ---
>  drivers/gpu/drm/radeon/r600_cs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/r600_cs.c 
> b/drivers/gpu/drm/radeon/r600_cs.c
> index 34b7c6f16479..aded1f2264e0 100644
> --- a/drivers/gpu/drm/radeon/r600_cs.c
> +++ b/drivers/gpu/drm/radeon/r600_cs.c
> @@ -38,7 +38,7 @@ extern void r600_cs_legacy_get_tiling_conf(struct 
> drm_device *dev, u32 *npipes,
> 
> 
>  struct r600_cs_track {
> - /* configuration we miror so that we use same code btw kms/ums */
> + /* configuration we mirror so that we use same code btw kms/ums */
>   u32 group_size;
>   u32 nbanks;
>   u32 npipes;
> @@ -963,7 +963,7 @@ static int r600_cs_parse_packet0(struct radeon_cs_parser 
> *p,
>   *
>   * This function will test against r600_reg_safe_bm and return 0
>   * if register is safe. If register is not flag as safe this function
> - * will test it against a list of register needind special handling.
> + * will test it against a list of register needing special handling.
>   */
>  static int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)
>  {
> --

Those 2 LGTM, but please fix this while you are touching this file:

drivers/gpu/drm/radeon/r600_cs.c:2339: informations  ==> information


thanks.
-- 
~Randy

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH V2] drm/radeon/r600_cs: Few typo fixes

2021-03-24 Thread Randy Dunlap
On 3/24/21 4:29 PM, Bhaskar Chowdhury wrote:
> s/miror/mirror/
> s/needind/needing/
> s/informations/information/
> 
> Signed-off-by: Bhaskar Chowdhury 

Acked-by: Randy Dunlap 

Thanks.

> ---
>  Changes from V1:
>  Randy's finding incorporated ,i.e in one place,informations->information
>   Adjusted the subject line accordingly
> 
>  drivers/gpu/drm/radeon/r600_cs.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/r600_cs.c 
> b/drivers/gpu/drm/radeon/r600_cs.c
> index 34b7c6f16479..8be4799a98ef 100644
> --- a/drivers/gpu/drm/radeon/r600_cs.c
> +++ b/drivers/gpu/drm/radeon/r600_cs.c
> @@ -38,7 +38,7 @@ extern void r600_cs_legacy_get_tiling_conf(struct 
> drm_device *dev, u32 *npipes,
> 
> 
>  struct r600_cs_track {
> - /* configuration we miror so that we use same code btw kms/ums */
> + /* configuration we mirror so that we use same code btw kms/ums */
>   u32 group_size;
>   u32 nbanks;
>   u32 npipes;
> @@ -963,7 +963,7 @@ static int r600_cs_parse_packet0(struct radeon_cs_parser 
> *p,
>   *
>   * This function will test against r600_reg_safe_bm and return 0
>   * if register is safe. If register is not flag as safe this function
> - * will test it against a list of register needind special handling.
> + * will test it against a list of register needing special handling.
>   */
>  static int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)
>  {
> @@ -2336,7 +2336,7 @@ int r600_cs_parse(struct radeon_cs_parser *p)
>  /**
>   * r600_dma_cs_next_reloc() - parse next reloc
>   * @p:   parser structure holding parsing context.
> - * @cs_reloc:reloc informations
> + * @cs_reloc:reloc information
>   *
>   * Return the next reloc, do bo validation and compute
>   * GPU offset using the provided start.
> --


-- 
~Randy

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amd: Fix a typo in two different sentences

2021-03-23 Thread Randy Dunlap
On 3/22/21 2:06 PM, Bhaskar Chowdhury wrote:
> 
> s/defintion/definition/ .two different places.
> 
> Signed-off-by: Bhaskar Chowdhury 

Acked-by: Randy Dunlap 

> ---
>  drivers/gpu/drm/amd/include/atombios.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/include/atombios.h 
> b/drivers/gpu/drm/amd/include/atombios.h
> index c1d7b1d0b952..47eb84598b96 100644
> --- a/drivers/gpu/drm/amd/include/atombios.h
> +++ b/drivers/gpu/drm/amd/include/atombios.h
> @@ -1987,9 +1987,9 @@ typedef struct _PIXEL_CLOCK_PARAMETERS_V6
>  #define PIXEL_CLOCK_V6_MISC_HDMI_BPP_MASK   0x0c
>  #define PIXEL_CLOCK_V6_MISC_HDMI_24BPP  0x00
>  #define PIXEL_CLOCK_V6_MISC_HDMI_36BPP  0x04
> -#define PIXEL_CLOCK_V6_MISC_HDMI_36BPP_V6   0x08//for V6, the 
> correct defintion for 36bpp should be 2 for 36bpp(2:1)
> +#define PIXEL_CLOCK_V6_MISC_HDMI_36BPP_V6   0x08//for V6, the 
> correct definition for 36bpp should be 2 for 36bpp(2:1)
>  #define PIXEL_CLOCK_V6_MISC_HDMI_30BPP  0x08
> -#define PIXEL_CLOCK_V6_MISC_HDMI_30BPP_V6   0x04//for V6, the 
> correct defintion for 30bpp should be 1 for 36bpp(5:4)
> +#define PIXEL_CLOCK_V6_MISC_HDMI_30BPP_V6   0x04//for V6, the 
> correct definition for 30bpp should be 1 for 36bpp(5:4)
>  #define PIXEL_CLOCK_V6_MISC_HDMI_48BPP  0x0c
>  #define PIXEL_CLOCK_V6_MISC_REF_DIV_SRC 0x10
>  #define PIXEL_CLOCK_V6_MISC_GEN_DPREFCLK0x40
> --


-- 
~Randy

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH V2] drm/amdgpu: Fix a typo

2021-03-22 Thread Randy Dunlap




On Fri, 19 Mar 2021, Bhaskar Chowdhury wrote:


s/traing/training/

...Plus the entire sentence construction for better readability.

Signed-off-by: Bhaskar Chowdhury 
---
Changes from V1:
 Alex and Randy's suggestions incorporated.

drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 8 
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c 
b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
index c325d6f53a71..bf3857867f51 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
@@ -661,10 +661,10 @@ static int psp_v11_0_memory_training(struct psp_context 
*psp, uint32_t ops)

if (ops & PSP_MEM_TRAIN_SEND_LONG_MSG) {
/*
-* Long traing will encroach certain mount of bottom VRAM,
-* saving the content of this bottom VRAM to system memory
-* before training, and restoring it after training to avoid
-* VRAM corruption.
+* Long training will encroach a certain amount on the bottom 
of VRAM;
+ * save the content from the bottom VRAM to system memory
+ * before training, and restore it after training to avoid
+ * VRAM corruption.


These 3 new lines are indented with spaces instead of tabs. Oops.  :(

(I may be too late with this comment -- sorry about that.)


 */
sz = GDDR6_MEM_TRAINING_ENCROACHED_SIZE;

--
2.26.2



___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amdgpu: Fix a typo

2021-03-18 Thread Randy Dunlap
On 3/18/21 4:33 AM, Bhaskar Chowdhury wrote:
> 
> s/traing/training/
> 
> Signed-off-by: Bhaskar Chowdhury 
> ---
>  drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c 
> b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> index c325d6f53a71..db18e4f6cf5f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> @@ -661,7 +661,7 @@ static int psp_v11_0_memory_training(struct psp_context 
> *psp, uint32_t ops)
> 
>   if (ops & PSP_MEM_TRAIN_SEND_LONG_MSG) {
>   /*
> -  * Long traing will encroach certain mount of bottom VRAM,
> +  * Long training will encroach certain mount of bottom VRAM,

   amount
I think.

>* saving the content of this bottom VRAM to system memory
>* before training, and restoring it after training to avoid
>* VRAM corruption.
> --
> 2.26.2
> 


-- 
~Randy

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] gpu: drm: amd: pm: Mundane typo fix in the file amdgpu_pm.c

2021-03-15 Thread Randy Dunlap
On 3/14/21 6:57 PM, Bhaskar Chowdhury wrote:
> 
> s/maxmum/maximum/
> 
> Signed-off-by: Bhaskar Chowdhury 
> ---
>  drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
> b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index 7b6ef05a1d35..7af74d236600 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -3143,7 +3143,7 @@ static ssize_t amdgpu_hwmon_show_mclk_label(struct 
> device *dev,
>   *
>   * - fan1_min: an minimum value Unit: revolution/min (RPM)

  a minimum
>   *
> - * - fan1_max: an maxmum value Unit: revolution/max (RPM)
> + * - fan1_max: an maximum value Unit: revolution/max (RPM)

  a maximum
>   *
>   * - fan1_input: fan speed in RPM
>   *
> --

and please follow the Subject: style:

$ git log --online drivers/gpu/drm/amd/pm

48123d068fcb drm/amd/pm: correct the watermark settings for Polaris
50ceb1fe7acd drm/amd/pm: bug fix for pcie dpm
6efda1671312 drm/amd/pm: correct Arcturus mmTHM_BACO_CNTL register address
992ace410c32 drm/amdgpu/swsmu/vangogh: Only use RLCPowerNotify msg for disable
e3746696e78f drm/amdgpu/pm: make unsupported power profile messages debug
7b3d19a76d68 drm/amd/pm/swsmu: Avoid using structure_size uninitialized in 
smu_cmn_init_soft_gpu_metrics
d7ef887f2f8e drm/amd/pm: make the error log more clear for fine grain tuning 
function
6ef28889b413 drm/amd/pm: enable LCLK DS
ae07970a0621 drm/amd/pm: add support for hwmon control of slow and fast PPT 
limit on vangogh
52d720b1a800 drm/amd/pm: modify the power limit level parameter from bool to 
enum type
b36c1024dc32 drm/amd/pm: update the smu v11.5 smc header for vangogh
de4b7cd8cb87 drm/amd/pm/swsmu: unify the init soft gpu metrics function
680602d6c2d6 drm/amd/pm: enable DCS
137aac26a2ed drm/amdgpu/smu12: fix power reporting on renoir
62826b86085d drm/amd/pm: enable ACDC feature
c915ef890d5d drm/amdgpu: Prevent shift wrapping in amdgpu_read_mask()
bb377febb10f drm/amd/pm: Disable GFXOFF when GFX DPM or PG disabled
e487cb54db1b drm/amd/pm: remove some useless code for vangogh
c9021a6e58c8 drm/amd/pm: fill in the data member of v2 gpu metrics table for 
vangogh
4954a76add70 drm/amdgpu/swsmu: use percent rather than rpm for manual fan 
control (v2)

-- 
~Randy

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH V2] drm: amd: pm: Mundane typo fixes in the file amdgpu_pm.c

2021-03-15 Thread Randy Dunlap
On 3/14/21 8:21 PM, Bhaskar Chowdhury wrote:
> 
> s/"an minimum"/"a minimum"/
> s/"an maxmum"/"a maximum"/
> 
> Signed-off-by: Bhaskar Chowdhury 

Acked-by: Randy Dunlap 

> ---
>  Changes from V1:
>   Randy's suggestion to adjust the subject line text
>   And missed out a spell too,which now included
> 
>  drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
> b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index 5fa65f191a37..308249ae1a22 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -3315,9 +3315,9 @@ static ssize_t amdgpu_hwmon_show_mclk_label(struct 
> device *dev,
>   *
>   * - pwm1_max: pulse width modulation fan control maximum level (255)
>   *
> - * - fan1_min: an minimum value Unit: revolution/min (RPM)
> + * - fan1_min: a minimum value Unit: revolution/min (RPM)
>   *
> - * - fan1_max: an maxmum value Unit: revolution/max (RPM)
> + * - fan1_max: a maximum value Unit: revolution/max (RPM)
>   *
>   * - fan1_input: fan speed in RPM
>   *
> --


-- 
~Randy

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: linux-next: Tree for Feb 24 [drivers/gpu/drm/amd/amdgpu/amdgpu.ko]

2021-02-23 Thread Randy Dunlap
On 2/23/21 7:36 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Please do not add any changes destined for v5.13 to your linux-next
> included branches until after v5.12-rc1 has been released.
> 
> Changes since 20210223:
> 

on i386:

ERROR: modpost: "__udivdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: modpost: "__umoddi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: modpost: "__divdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!


Full randconfig file is attached.

-- 
~Randy
Reported-by: Randy Dunlap 


config-r7997.gz
Description: application/gzip
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 01/30] drm/dp: Rewrap kdocs for struct drm_dp_aux

2021-02-19 Thread Randy Dunlap
On 2/19/21 1:52 PM, Lyude Paul wrote:
> Since we're about to be adding some more fields and update this
> documentation, let's rewrap it to the new column limit of 100 beforehand.
> No actual doc or functional changes are made here.
>

The preferred column limit is still 80.
For some (exceptional) cases, going up to 100 is OK,
but I don't see any reason here to go beyond 80.


> Signed-off-by: Lyude Paul 
> ---
>  include/drm/drm_dp_helper.h | 42 -
>  1 file changed, 18 insertions(+), 24 deletions(-)
> 
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index edffd1dcca3e..2891a98eebc8 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -1839,34 +1839,28 @@ struct drm_dp_aux_cec {
>   * @crc_count: counter of captured frame CRCs
>   * @transfer: transfers a message representing a single AUX transaction
>   *
> - * The .dev field should be set to a pointer to the device that implements
> - * the AUX channel.
> + * The .dev field should be set to a pointer to the device that implements 
> the AUX channel.
>   *
> - * The .name field may be used to specify the name of the I2C adapter. If 
> set to
> - * NULL, dev_name() of .dev will be used.
> + * The .name field may be used to specify the name of the I2C adapter. If 
> set to NULL, dev_name() of
> + * .dev will be used.
>   *
> - * Drivers provide a hardware-specific implementation of how transactions
> - * are executed via the .transfer() function. A pointer to a drm_dp_aux_msg
> - * structure describing the transaction is passed into this function. Upon
> - * success, the implementation should return the number of payload bytes
> - * that were transferred, or a negative error-code on failure. Helpers
> - * propagate errors from the .transfer() function, with the exception of
> - * the -EBUSY error, which causes a transaction to be retried. On a short,
> - * helpers will return -EPROTO to make it simpler to check for failure.
> + * Drivers provide a hardware-specific implementation of how transactions 
> are executed via the
> + * .transfer() function. A pointer to a drm_dp_aux_msg structure describing 
> the transaction is
> + * passed into this function. Upon success, the implementation should return 
> the number of payload
> + * bytes that were transferred, or a negative error-code on failure. Helpers 
> propagate errors from
> + * the .transfer() function, with the exception of the -EBUSY error, which 
> causes a transaction to
> + * be retried. On a short, helpers will return -EPROTO to make it simpler to 
> check for failure.
>   *
> - * An AUX channel can also be used to transport I2C messages to a sink. A
> - * typical application of that is to access an EDID that's present in the
> - * sink device. The .transfer() function can also be used to execute such
> - * transactions. The drm_dp_aux_register() function registers an I2C
> - * adapter that can be passed to drm_probe_ddc(). Upon removal, drivers
> - * should call drm_dp_aux_unregister() to remove the I2C adapter.
> - * The I2C adapter uses long transfers by default; if a partial response is
> - * received, the adapter will drop down to the size given by the partial
> - * response for this transaction only.
> + * An AUX channel can also be used to transport I2C messages to a sink. A 
> typical application of
> + * that is to access an EDID that's present in the sink device. The 
> .transfer() function can also be
> + * used to execute such transactions. The drm_dp_aux_register() function 
> registers an I2C adapter
> + * that can be passed to drm_probe_ddc(). Upon removal, drivers should call 
> drm_dp_aux_unregister()
> + * to remove the I2C adapter. The I2C adapter uses long transfers by 
> default; if a partial response
> + * is received, the adapter will drop down to the size given by the partial 
> response for this
> + * transaction only.
>   *
> - * Note that the aux helper code assumes that the .transfer() function
> - * only modifies the reply field of the drm_dp_aux_msg structure.  The
> - * retry logic and i2c helpers assume this is the case.
> + * Note that the aux helper code assumes that the .transfer() function only 
> modifies the reply field
> + * of the drm_dp_aux_msg structure. The retry logic and i2c helpers assume 
> this is the case.
>   */
>  struct drm_dp_aux {
>   const char *name;
> 


-- 
~Randy
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 02/30] drm/dp: Fixup kernel docs for struct drm_dp_aux

2021-02-19 Thread Randy Dunlap
On 2/19/21 1:52 PM, Lyude Paul wrote:
> * Make sure that struct members are referred to using @, otherwise they
>   won't be formatted as such
> * Make sure to refer to other struct types using & so they link back to
>   each struct's definition
> * Make sure to precede constant values with % so they're formatted
>   correctly
> 
> Signed-off-by: Lyude Paul 

Acked-by: Randy Dunlap 

Thanks.

> ---
>  include/drm/drm_dp_helper.h | 18 +-
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> 


-- 
~Randy

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: linux-next: Tree for Jan 22 (amdgpu)

2021-01-23 Thread Randy Dunlap
On 1/21/21 11:06 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20210121:
> 

on i386:

ERROR: modpost: "__udivdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: modpost: "__divdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!



-- 
~Randy
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amdgpu/display: DRM_AMD_DC_DCN3_02 depends on DRM_AMD_DC_DCN3_01

2020-10-14 Thread Randy Dunlap
On 10/14/20 10:55 AM, Alex Deucher wrote:
> Fix this to avoid build problems if DRM_AMD_DC_DCN3_02 is defined, but
> DRM_AMD_DC_DCN3_01 is not.
> 
> Fixes: 36d26912e8d854 ("drm/amd/display: Add support for DCN302 (v2)")
> Reported-by: Randy Dunlap 
> Signed-off-by: Alex Deucher 

Acked-by: Randy Dunlap  # build-tested

Thanks.

> ---
>  drivers/gpu/drm/amd/display/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/Kconfig 
> b/drivers/gpu/drm/amd/display/Kconfig
> index 5906778627f0..93cdcd1ee9ff 100644
> --- a/drivers/gpu/drm/amd/display/Kconfig
> +++ b/drivers/gpu/drm/amd/display/Kconfig
> @@ -45,6 +45,7 @@ config DRM_AMD_DC_DCN3_01
>  config DRM_AMD_DC_DCN3_02
>  bool "DCN 3.02 family"
>  depends on DRM_AMD_DC_DCN3_0
> +depends on DRM_AMD_DC_DCN3_01
>  help
>  Choose this option if you want to have
>  Dimgrey_cavefish support for display engine
> 


-- 
~Randy
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amdgpu/swsmu: fix ARC build errors

2020-10-06 Thread Randy Dunlap
On 10/6/20 6:26 AM, Alex Deucher wrote:
> We want to use the dev_* functions here rather than the pr_* variants.
> Switch to using dev_warn() which mirrors what we do on other asics.
> 
> Fixes the following build errors on ARC:
> 
> ../drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function 
> 'navi10_fill_i2c_req':
> ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 
> 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration]
> 
> ../drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c: In function 
> 'sienna_cichlid_fill_i2c_req':
> ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 
> 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration]
> 
> Reported-by: kernel test robot 
> Cc: Randy Dunlap 
> Cc: Evan Quan 
> Cc: Vineet Gupta 
> Cc: linux-snps-...@lists.infradead.org
> Signed-off-by: Alex Deucher 
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c| 14 --
>  .../drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c| 14 --
>  2 files changed, 24 insertions(+), 4 deletions(-)

Works for me. Thanks.

Acked-by: Randy Dunlap  # build-tested


-- 
~Randy
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[RFC PATCH] DRM: amd: powerplay: don't undef pr_warn() {causes ARC build errors}

2020-10-06 Thread Randy Dunlap
From: Randy Dunlap 

arch/arc/ implements BUG_ON() with BUG(). ARC has its own BUG()
function and that function uses pr_warn() as part of its implementation.

Several (8) files in amd/powerplay/ #undef various pr_xyz() functions so
that they won't be used by these drivers, since dev_() functions are
preferred here and the #undefs make the pr_() functions unavailable.

Hence the following build errors are reported in ARC builds:

../drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function 
'navi10_fill_i2c_req':
../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 
'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration]

../drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c: In function 
'sienna_cichlid_fill_i2c_req':
../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 
'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration]

Fixes: 55084d7f4022 ("drm/amd/powerplay: forbid to use pr_err/warn/info/debug")
Reported-by: kernel test robot 
Signed-off-by: Randy Dunlap 
Cc: Evan Quan 
Cc: amd-gfx@lists.freedesktop.org
Cc: Alex Deucher 
Cc: Vineet Gupta 
Cc: linux-snps-...@lists.infradead.org
---
Another alternative is for amd/powerplay/ drivers not to use BUG()
or BUG_ON().
A third alternative is to ask the ARC developers to implement BUG()
without using any pr_() functions.

 drivers/gpu/drm/amd/powerplay/navi10_ppt.c |2 +-
 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- lnx-59-rc7.orig/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+++ lnx-59-rc7/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
@@ -52,7 +52,7 @@
  * They are more MGPU friendly.
  */
 #undef pr_err
-#undef pr_warn
+//#undef pr_warn
 #undef pr_info
 #undef pr_debug
 
--- lnx-59-rc7.orig/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
+++ lnx-59-rc7/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
@@ -54,7 +54,7 @@
  * They are more MGPU friendly.
  */
 #undef pr_err
-#undef pr_warn
+//#undef pr_warn
 #undef pr_info
 #undef pr_debug
 

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm: amd/display: fix spelling of "function"

2020-09-09 Thread Randy Dunlap
From: Randy Dunlap 

Fix spellos of "function" in drivers/gpu/drm/amd/display/.

Signed-off-by: Randy Dunlap 
Cc: Harry Wentland 
Cc: Leo Li 
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.h   |2 +-
 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.h |2 +-
 drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.h   |2 +-
 drivers/gpu/drm/amd/display/dc/gpio/dce120/hw_factory_dce120.c  |2 +-
 drivers/gpu/drm/amd/display/dc/gpio/dcn10/hw_factory_dcn10.c|2 +-
 drivers/gpu/drm/amd/display/dc/gpio/dcn20/hw_factory_dcn20.c|2 +-
 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c|2 +-
 drivers/gpu/drm/amd/display/dc/gpio/dcn30/hw_factory_dcn30.c|2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

--- 
linux-next-20200908.orig/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.h
+++ 
linux-next-20200908/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.h
@@ -33,7 +33,7 @@ struct display_mode_lib;
 
 // Function: dml_rq_dlg_get_rq_reg
 //  Main entry point for test to get the register values out of this DML class.
-//  This function calls  and  fucntions to 
calculate
+//  This function calls  and  functions to 
calculate
 //  and then populate the rq_regs struct
 // Input:
 //  pipe_src_param - pipe source configuration (e.g. vp, pitch, etc.)
--- 
linux-next-20200908.orig/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.h
+++ 
linux-next-20200908/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.h
@@ -33,7 +33,7 @@ struct display_mode_lib;
 
 // Function: dml_rq_dlg_get_rq_reg
 //  Main entry point for test to get the register values out of this DML class.
-//  This function calls  and  fucntions to 
calculate
+//  This function calls  and  functions to 
calculate
 //  and then populate the rq_regs struct
 // Input:
 //  pipe_src_param - pipe source configuration (e.g. vp, pitch, etc.)
--- 
linux-next-20200908.orig/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.h
+++ 
linux-next-20200908/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.h
@@ -32,7 +32,7 @@ struct display_mode_lib;
 
 // Function: dml_rq_dlg_get_rq_reg
 //  Main entry point for test to get the register values out of this DML class.
-//  This function calls  and  fucntions to 
calculate
+//  This function calls  and  functions to 
calculate
 //  and then populate the rq_regs struct
 // Input:
 //  pipe_param - pipe source configuration (e.g. vp, pitch, scaling, dest, 
etc.)
--- 
linux-next-20200908.orig/drivers/gpu/drm/amd/display/dc/gpio/dce120/hw_factory_dce120.c
+++ 
linux-next-20200908/drivers/gpu/drm/amd/display/dc/gpio/dce120/hw_factory_dce120.c
@@ -162,7 +162,7 @@ static void define_hpd_registers(struct
 }
 
 
-/* fucntion table */
+/* function table */
 static const struct hw_factory_funcs funcs = {
.init_ddc_data = dal_hw_ddc_init,
.init_generic = NULL,
--- 
linux-next-20200908.orig/drivers/gpu/drm/amd/display/dc/gpio/dcn10/hw_factory_dcn10.c
+++ 
linux-next-20200908/drivers/gpu/drm/amd/display/dc/gpio/dcn10/hw_factory_dcn10.c
@@ -194,7 +194,7 @@ static void define_hpd_registers(struct
 }
 
 
-/* fucntion table */
+/* function table */
 static const struct hw_factory_funcs funcs = {
.init_ddc_data = dal_hw_ddc_init,
.init_generic = dal_hw_generic_init,
--- 
linux-next-20200908.orig/drivers/gpu/drm/amd/display/dc/gpio/dcn20/hw_factory_dcn20.c
+++ 
linux-next-20200908/drivers/gpu/drm/amd/display/dc/gpio/dcn20/hw_factory_dcn20.c
@@ -221,7 +221,7 @@ static void define_generic_registers(str
generic->base.regs = _regs[en].gpio;
 }
 
-/* fucntion table */
+/* function table */
 static const struct hw_factory_funcs funcs = {
.init_ddc_data = dal_hw_ddc_init,
.init_generic = dal_hw_generic_init,
--- 
linux-next-20200908.orig/drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c
+++ 
linux-next-20200908/drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c
@@ -202,7 +202,7 @@ static void define_hpd_registers(struct
 }
 
 
-/* fucntion table */
+/* function table */
 static const struct hw_factory_funcs funcs = {
.init_ddc_data = dal_hw_ddc_init,
.init_generic = dal_hw_generic_init,
--- 
linux-next-20200908.orig/drivers/gpu/drm/amd/display/dc/gpio/dcn30/hw_factory_dcn30.c
+++ 
linux-next-20200908/drivers/gpu/drm/amd/display/dc/gpio/dcn30/hw_factory_dcn30.c
@@ -218,7 +218,7 @@ static void define_hpd_registers(struct
 }
 
 
-/* fucntion table */
+/* function table */
 static const struct hw_factory_funcs funcs = {
.init_ddc_data = dal_hw_ddc_init,
.init_generic = dal_hw_generic_init,

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH -next] amdgpu: fix Documentation builds for pm/ file movement

2020-08-24 Thread Randy Dunlap
From: Randy Dunlap 

Fix Documentation errors for amdgpu.rst due to file rename (moved
to another subdirectory).

Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -function hwmon 
../drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c' failed with return code 1

Fixes: e098bc9612c2 ("drm/amd/pm: optimize the power related source code 
layout")
Signed-off-by: Randy Dunlap 
Cc: Evan Quan 
Cc: Alex Deucher 
---
 Documentation/gpu/amdgpu.rst |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

--- linux-next-20200821.orig/Documentation/gpu/amdgpu.rst
+++ linux-next-20200821/Documentation/gpu/amdgpu.rst
@@ -153,7 +153,7 @@ This section covers hwmon and power/ther
 HWMON Interfaces
 
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: hwmon
 
 GPU sysfs Power State Interfaces
@@ -164,52 +164,52 @@ GPU power controls are exposed via sysfs
 power_dpm_state
 ~~~
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: power_dpm_state
 
 power_dpm_force_performance_level
 ~
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: power_dpm_force_performance_level
 
 pp_table
 
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: pp_table
 
 pp_od_clk_voltage
 ~
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: pp_od_clk_voltage
 
 pp_dpm_*
 
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk 
pp_dpm_pcie
 
 pp_power_profile_mode
 ~
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: pp_power_profile_mode
 
 *_busy_percent
 ~~
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: gpu_busy_percent
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: mem_busy_percent
 
 gpu_metrics
 ~
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: gpu_metrics
 
 GPU Product Information
@@ -239,7 +239,7 @@ serial_number
 unique_id
 -
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: unique_id
 
 GPU Memory Usage Information
@@ -289,7 +289,7 @@ PCIe Accounting Information
 pcie_bw
 ---
 
-.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
:doc: pcie_bw
 
 pcie_replay_count

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm: amd/display: fix Kconfig help text

2020-04-22 Thread Randy Dunlap
From: Randy Dunlap 

Fix help text: indent one tab + 2 spaces; end a sentence with a
period; and collapse short lines of text to one line.

Fixes: 23c61b4599c4 ("drm/amd: Fix Kconfig indentation")
Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)")
Signed-off-by: Randy Dunlap 
Cc: Harry Wentland 
Cc: Alex Deucher 
Cc: Krzysztof Kozlowski 
---
 drivers/gpu/drm/amd/display/Kconfig |8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

--- linux-next-20200421.orig/drivers/gpu/drm/amd/display/Kconfig
+++ linux-next-20200421/drivers/gpu/drm/amd/display/Kconfig
@@ -21,16 +21,12 @@ config DRM_AMD_DC_HDCP
bool "Enable HDCP support in DC"
depends on DRM_AMD_DC
help
-Choose this option
-if you want to support
-HDCP authentication
+ Choose this option if you want to support HDCP authentication.
 
 config DEBUG_KERNEL_DC
bool "Enable kgdb break in DC"
depends on DRM_AMD_DC
help
- Choose this option
- if you want to hit
- kdgb_break in assert.
+ Choose this option if you want to hit kdgb_break in assert.
 
 endmenu

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm: amd: display: fix kernel-doc struct warning

2020-04-20 Thread Randy Dunlap
Fix a kernel-doc warning of missing struct field desription:

../drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:331: warning: Function 
parameter or member 'hdcp_workqueue' not described in 'amdgpu_display_manager'

Fixes: 52704fcaf74b ("drm/amd/display: Initialize HDCP work queue")
Signed-off-by: Randy Dunlap 
Cc: Bhawanpreet Lakha 
Cc: Harry Wentland 
Cc: Alex Deucher 
Cc: Leo Li 
Cc: amd-gfx@lists.freedesktop.org
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |1 +
 1 file changed, 1 insertion(+)

--- lnx-57-rc2.orig/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+++ lnx-57-rc2/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
@@ -139,6 +139,7 @@ struct amdgpu_dm_backlight_caps {
  * @backlight_link: Link on which to control backlight
  * @backlight_caps: Capabilities of the backlight device
  * @freesync_module: Module handling freesync calculations
+ * @hdcp_workqueue: workqueue for display manager interaction with HDCP module
  * @fw_dmcu: Reference to DMCU firmware
  * @dmcu_fw_version: Version of the DMCU firmware
  * @soc_bounding_box: SOC bounding box values provided by gpu_info FW
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm: amdgpu: fix kernel-doc struct warning

2020-04-20 Thread Randy Dunlap
Fix a kernel-doc warning of missing struct field desription:

../drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:92: warning: Function parameter or 
member 'vm' not described in 'amdgpu_vm_eviction_lock'

Fixes: a269e44989f3 ("drm/amdgpu: Avoid reclaim fs while eviction lock")
Signed-off-by: Randy Dunlap 
Cc: Signed-off-by: Alex Sierra 
Cc: Felix Kuehling 
Cc: Christian König 
Cc: Alex Deucher 
Cc: David (ChunMing) Zhou 
Cc: amd-gfx@lists.freedesktop.org
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- lnx-57-rc2.orig/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ lnx-57-rc2/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -82,7 +82,7 @@ struct amdgpu_prt_cb {
struct dma_fence_cb cb;
 };
 
-/**
+/*
  * vm eviction_lock can be taken in MMU notifiers. Make sure no reclaim-FS
  * happens while holding this lock anywhere to prevent deadlocks when
  * an MMU notifier runs in reclaim-FS context.
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: AMD DC graphics display code enables -mhard-float, -msse, -msse2 without any visible FPU state protection

2020-04-05 Thread Randy Dunlap
On 4/3/20 8:08 PM, Masami Hiramatsu wrote:
> +static inline int insn_is_fpu(struct insn *insn)
> +{
> + if (!insn->opcode.got)
> + insn_get_opcode(insn);
> + if (inat_is_fpu(insn->attr)) {
> + if (insn->attr & INAT_FPUIFVEX)
> + return insn_is_avx(insn);
> + return 1;
> + }

return 0; // ??

> +}
> +


-- 
~Randy

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: mmotm 2020-03-30-18-46 uploaded (freesync)

2020-03-31 Thread Randy Dunlap
On 3/31/20 12:39 AM, Nathan Chancellor wrote:
> On Mon, Mar 30, 2020 at 11:18:26PM -0700, Randy Dunlap wrote:
>> On 3/30/20 6:47 PM, a...@linux-foundation.org wrote:
>>> The mm-of-the-moment snapshot 2020-03-30-18-46 has been uploaded to
>>>
>>>http://www.ozlabs.org/~akpm/mmotm/
>>>
>>> mmotm-readme.txt says
>>>
>>> README for mm-of-the-moment:
>>>
>>> http://www.ozlabs.org/~akpm/mmotm/
>>>
>>> This is a snapshot of my -mm patch queue.  Uploaded at random hopefully
>>> more than once a week.
>>>
>>> You will need quilt to apply these patches to the latest Linus release (5.x
>>> or 5.x-rcY).  The series file is in broken-out.tar.gz and is duplicated in
>>> http://ozlabs.org/~akpm/mmotm/series
>>>
>>
>> on i386:
>>
>> ld: drivers/gpu/drm/amd/display/modules/freesync/freesync.o: in function 
>> `mod_freesync_build_vrr_params':
>> freesync.c:(.text+0x790): undefined reference to `__udivdi3'
>>
>>
>> Full randconfig file is attached.
>>
>> -- 
>> ~Randy
>> Reported-by: Randy Dunlap 
> 
> Hi Randy,
> 
> I am guessing this should fix it since I ran into this on arm
> allyesconfig:
> 
> https://lore.kernel.org/lkml/20200330221614.7661-1-natechancel...@gmail.com/

works for me. Thanks.

Acked-by: Randy Dunlap  # build-tested


> FWIW, not an mmotm issue since the patch comes from the AMD tree.

Right.

-- 
~Randy
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm: amd/acp: fix broken menu structure

2020-03-12 Thread Randy Dunlap
From: Randy Dunlap 

Fix the Kconfig dependencies so that the menu is presented
correctly by adding a dependency on DRM_AMDGPU to the "menu"
Kconfig statement.  This makes a continuous dependency on
DRM_AMDGPU in the DRM AMD menus and eliminates a broken menu
structure.

Fixes: a8fe58cec351 ("drm/amd: add ACP driver support")
Signed-off-by: Randy Dunlap 
Cc: Alex Deucher 
Cc: Christian König 
Cc: David (ChunMing) Zhou 
Cc: Maruthi Bayyavarapu 
Cc: amd-gfx@lists.freedesktop.org
---
 drivers/gpu/drm/amd/acp/Kconfig |1 +
 1 file changed, 1 insertion(+)

--- linux-next.orig/drivers/gpu/drm/amd/acp/Kconfig
+++ linux-next/drivers/gpu/drm/amd/acp/Kconfig
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: MIT
 menu "ACP (Audio CoProcessor) Configuration"
+   depends on DRM_AMDGPU
 
 config DRM_AMD_ACP
bool "Enable AMD Audio CoProcessor IP support"

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: linux-next: Tree for Feb 26 (gpu/drm/amd/amdgpu/)

2020-02-26 Thread Randy Dunlap
On 2/25/20 8:34 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20200225:
> 

on i386:

ld: drivers/gpu/drm/amd/amdgpu/amdgpu_object.o: in function 
`amdgpu_bo_release_notify':
amdgpu_object.c:(.text+0xe07): undefined reference to 
`amdgpu_amdkfd_remove_fence_on_pt_pd_bos'


Full randconfig file is attached.

-- 
~Randy
Reported-by: Randy Dunlap 
#
# Automatically generated file; DO NOT EDIT.
# Linux/i386 5.6.0-rc3 Kernel Configuration
#

#
# Compiler: gcc (SUSE Linux) 7.5.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=70500
CONFIG_CLANG_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_HAS_ASM_GOTO=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y

#
# General setup
#
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_COMPILE_TEST=y
CONFIG_LOCALVERSION=""
CONFIG_BUILD_SALT=""
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
# CONFIG_KERNEL_GZIP is not set
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
CONFIG_KERNEL_LZ4=y
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SYSVIPC=y
# CONFIG_WATCH_QUEUE is not set
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_USELIB=y
CONFIG_HAVE_ARCH_AUDITSYSCALL=y

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_CHIP=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_SIM=y
CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_GENERIC_IRQ_RESERVATION_MODE=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_GENERIC_IRQ_DEBUGFS=y
# end of IRQ subsystem

CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ARCH_CLOCKSOURCE_INIT=y
CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_HZ_PERIODIC=y
# CONFIG_NO_HZ_IDLE is not set
# CONFIG_NO_HZ is not set
CONFIG_HIGH_RES_TIMERS=y
# end of Timers subsystem

# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_COUNT=y

#
# CPU/Task time and stats accounting
#
CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_IRQ_TIME_ACCOUNTING=y
# CONFIG_PSI is not set
# end of CPU/Task time and stats accounting

# CONFIG_CPU_ISOLATION is not set

#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
# CONFIG_RCU_EXPERT is not set
CONFIG_SRCU=y
CONFIG_TINY_SRCU=y
CONFIG_TASKS_RCU=y
# end of RCU Subsystem

CONFIG_IKCONFIG=y
CONFIG_IKHEADERS=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y

#
# Scheduler features
#
# end of Scheduler features

CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_CC_HAS_INT128=y
CONFIG_CGROUPS=y
# CONFIG_MEMCG is not set
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_CFS_BANDWIDTH is not set
CONFIG_RT_GROUP_SCHED=y
CONFIG_CGROUP_PIDS=y
# CONFIG_CGROUP_RDMA is not set
CONFIG_CGROUP_FREEZER=y
# CONFIG_CGROUP_DEVICE is not set
# CONFIG_CGROUP_CPUACCT is not set
# CONFIG_CGROUP_PERF is not set
CONFIG_CGROUP_DEBUG=y
# CONFIG_CHECKPOINT_RESTORE is not set
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_RD_GZIP is not set
CONFIG_RD_BZIP2=y
# CONFIG_RD_LZMA is not set
CONFIG_RD_XZ=y
CONFIG_RD_LZO=y
# CONFIG_RD_LZ4 is not set
# CONFIG_BOOT_CONFIG is not set
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_HAVE_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_EXPERT=y
# CONFIG_MULTIUSER is not set
CONFIG_SGETMASK_SYSCALL=y
# CONFIG_SYSFS_SYSCALL is not set
# CONFIG_FHANDLE is not set
CONFIG_POSIX_TIMERS=y
CONFIG_PRINTK=y
CONFIG_PRINTK_NMI=y
# CONFIG_BUG is not set
# CONFIG_PCSPKR_PLATFORM is not set
CONFIG_BASE_FULL=y
# CONFIG_FUTEX is not set
# CONFIG_EPOLL is not set
CONFIG_SIGNALFD=y
# CONFIG_TIMERFD is not set
# CONFIG_EVENTFD is not set
CONFIG_SHMEM=y
# CONFIG_AIO is not set
CONFIG_IO_URING=y
# CONFIG_ADVISE_SYSCALLS is not set
# CONFIG_MEMBARRIER is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_BASE_RELATIVE=y
# CONFIG_BPF_SYSCALL is not set
CONFIG_USERFAULTFD=y
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
# CONFIG_RSEQ is not set
CONFIG_EMBEDDED=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PC104=y

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
# end of Kernel Performance Events And Counters

CONFIG_VM_EVENT_COUNTERS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
# CONFIG_SLAB_MERGE_DEFAULT is not set
# CONFIG_SLAB_FREELIST_RANDOM is not set
CONFIG_SHUFFLE_PAGE_ALLOCATOR=y
# CONFIG_PROFILING is not set

Re: linux-next: Tree for Feb 6 (amdgpu)

2020-02-06 Thread Randy Dunlap
On 2/5/20 8:09 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Please do not add any v5.7 material to your linux-next included
> branches until after v5.6-rc1 has been released.
> 
> Changes since 20200205:
> 

on i386:

ERROR: "dtn_debugfs_init" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Full randconfig file is attached.

-- 
~Randy
Reported-by: Randy Dunlap 
#
# Automatically generated file; DO NOT EDIT.
# Linux/i386 5.5.0 Kernel Configuration
#

#
# Compiler: gcc (SUSE Linux) 7.5.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=70500
CONFIG_CLANG_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_HAS_ASM_GOTO=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y

#
# General setup
#
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
CONFIG_UAPI_HEADER_TEST=y
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_BUILD_SALT=""
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
# CONFIG_KERNEL_GZIP is not set
# CONFIG_KERNEL_BZIP2 is not set
CONFIG_KERNEL_LZMA=y
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_WATCH_QUEUE is not set
CONFIG_CROSS_MEMORY_ATTACH=y
# CONFIG_USELIB is not set
# CONFIG_AUDIT is not set
CONFIG_HAVE_ARCH_AUDITSYSCALL=y

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_SIM=y
CONFIG_GENERIC_IRQ_RESERVATION_MODE=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
# CONFIG_GENERIC_IRQ_DEBUGFS is not set
# end of IRQ subsystem

CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_ARCH_CLOCKSOURCE_INIT=y
CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
CONFIG_HZ_PERIODIC=y
# CONFIG_NO_HZ_IDLE is not set
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set
# end of Timers subsystem

# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set

#
# CPU/Task time and stats accounting
#
CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_IRQ_TIME_ACCOUNTING is not set
CONFIG_PSI=y
# CONFIG_PSI_DEFAULT_DISABLED is not set
# end of CPU/Task time and stats accounting

#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
CONFIG_RCU_EXPERT=y
CONFIG_SRCU=y
CONFIG_TINY_SRCU=y
# end of RCU Subsystem

CONFIG_IKCONFIG=m
CONFIG_IKCONFIG_PROC=y
CONFIG_IKHEADERS=y
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y

#
# Scheduler features
#
# end of Scheduler features

CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_CC_HAS_INT128=y
CONFIG_CGROUPS=y
CONFIG_PAGE_COUNTER=y
CONFIG_MEMCG=y
CONFIG_MEMCG_SWAP=y
# CONFIG_MEMCG_SWAP_ENABLED is not set
CONFIG_MEMCG_KMEM=y
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_WRITEBACK=y
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_CFS_BANDWIDTH is not set
CONFIG_RT_GROUP_SCHED=y
# CONFIG_CGROUP_PIDS is not set
CONFIG_CGROUP_RDMA=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
# CONFIG_CGROUP_CPUACCT is not set
CONFIG_CGROUP_PERF=y
# CONFIG_CGROUP_BPF is not set
CONFIG_CGROUP_DEBUG=y
CONFIG_SOCK_CGROUP_DATA=y
CONFIG_CHECKPOINT_RESTORE=y
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set
CONFIG_RD_LZMA=y
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
CONFIG_RD_LZ4=y
# CONFIG_BOOT_CONFIG is not set
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
CONFIG_HAVE_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_BPF=y
CONFIG_EXPERT=y
# CONFIG_MULTIUSER is not set
# CONFIG_SGETMASK_SYSCALL is not set
CONFIG_SYSFS_SYSCALL=y
# CONFIG_FHANDLE is not set
# CONFIG_POSIX_TIMERS is not set
# CONFIG_PRINTK is not set
# CONFIG_BUG is not set
CONFIG_ELF_CORE=y
# CONFIG_PCSPKR_PLATFORM is not set
CONFIG_BASE_FULL=y
# CONFIG_FUTEX is not set
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
# CONFIG_AIO is not set
# CONFIG_IO_URING is not set
CONFIG_ADVISE_SYSCALLS=y
# CONFIG_MEMBARRIER is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_BASE_RELATIVE=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
# CONFIG_USERFAULTFD is not set
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
# CONFIG_RSEQ is not set
# CONFIG_EMBEDDED is not set
CONFIG_HAVE_PERF_EVENTS=y
# CONFIG_PC104 is not set

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
# end of Kernel Performance Events 

Re: [PATCH] drm/amdgpu/display: Use u64 divide macro for round up division

2020-01-16 Thread Randy Dunlap
On 1/13/20 9:07 AM, Ville Syrjälä wrote:
> On Mon, Jan 13, 2020 at 08:20:42AM -0500, mikita.lip...@amd.com wrote:
>> From: Mikita Lipski 
>>
>> [why]
>> Fix compilation warnings on i386 architecture:
>> undefined reference to `__udivdi3'
>> [how]
>> Switch DIV_ROUND_UP to DIV64_U64_ROUND_UP
>>
>> Reported-by: Randy Dunlap 
>> Signed-off-by: Mikita Lipski 
>> ---
>>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c 
>> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
>> index 52fb207393ef..96b391e4b3e7 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
>> @@ -534,7 +534,7 @@ static int kbps_to_peak_pbn(int kbps)
>>  
>>  peak_kbps *= 1006;
>>  peak_kbps = div_u64(peak_kbps, 1000);
>> -return (int) DIV_ROUND_UP(peak_kbps * 64, (54 * 8 * 1000));
>> +return (int) DIV64_U64_ROUND_UP(peak_kbps * 64, (54 * 8 * 1000));

that builds fine.

> DIV_ROUND_UP_ULL() would seem to suffice for this divisor.

and so does that one.

Thanks.

For either patch:
Acked-by: Randy Dunlap  # build-tested


 
>>  }
>>  
>>  static void set_dsc_configs_from_fairness_vars(struct 
>> dsc_mst_fairness_params *params,
>> -- 


-- 
~Randy

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amd/display: Fix compilation warnings on i386

2020-01-10 Thread Randy Dunlap
On 1/10/20 11:41 AM, mikita.lip...@amd.com wrote:
> From: Mikita Lipski 
> 
> [why]
> Compilation error "undefined reference to `__udivdi3'" was
> thrown on i386 architecture.
> 
> [how]
> Use div_u64 for unsigned long division instead of a divide operator.
> 
> Reported-by: Randy Dunlap 
> Signed-off-by: Mikita Lipski 
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index 5a476028ee37..52fb207393ef 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -533,7 +533,7 @@ static int kbps_to_peak_pbn(int kbps)
>   u64 peak_kbps = kbps;
>  
>   peak_kbps *= 1006;
> - peak_kbps /= 1000;
> + peak_kbps = div_u64(peak_kbps, 1000);
>   return (int) DIV_ROUND_UP(peak_kbps * 64, (54 * 8 * 1000));
>  }
>  
> @@ -565,7 +565,7 @@ static int bpp_x16_from_pbn(struct 
> dsc_mst_fairness_params param, int pbn)
>   struct dc_dsc_config dsc_config;
>   u64 kbps;
>  
> - kbps = (u64)pbn * 994 * 8 * 54 / 64;
> + kbps = div_u64((u64)pbn * 994 * 8 * 54, 64);
>   dc_dsc_compute_config(
>   param.sink->ctx->dc->res_pool->dscs[0],
>   >sink_dsc_caps.dsc_dec_caps,
> 

Still getting this in a different function:

ld: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.o: in function 
`compute_mst_dsc_configs_for_link':
amdgpu_dm_mst_types.c:(.text+0x7b8): undefined reference to `__udivdi3'
ld: amdgpu_dm_mst_types.c:(.text+0x956): undefined reference to `__udivdi3'
ld: amdgpu_dm_mst_types.c:(.text+0xa24): undefined reference to `__udivdi3'
ld: amdgpu_dm_mst_types.c:(.text+0xb33): undefined reference to `__udivdi3'
ld: amdgpu_dm_mst_types.c:(.text+0x1028): undefined reference to `__udivdi3'
ld: 
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.o:amdgpu_dm_mst_types.c:(.text+0x1142):
 more undefined references to `__udivdi3' follow


-- 
~Randy
Reported-by: Randy Dunlap 
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: linux-next: Tree for Jan 10 (amdgpu)

2020-01-10 Thread Randy Dunlap
On 1/10/20 12:07 AM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20200109:
> 


on i386:

ld: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.o: in function 
`compute_mst_dsc_configs_for_link':
amdgpu_dm_mst_types.c:(.text+0x784): undefined reference to `__udivdi3'
ld: amdgpu_dm_mst_types.c:(.text+0x7a2): undefined reference to `__udivdi3'
ld: amdgpu_dm_mst_types.c:(.text+0x84a): undefined reference to `__udivdi3'
ld: amdgpu_dm_mst_types.c:(.text+0x868): undefined reference to `__udivdi3'
ld: amdgpu_dm_mst_types.c:(.text+0x8d0): undefined reference to `__udivdi3'
ld: 
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.o:amdgpu_dm_mst_types.c:(.text+0x8ee):
 more undefined references to `__udivdi3' follow


-- 
~Randy
Reported-by: Randy Dunlap 
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: linux-next: Tree for Oct 16 (amd display)

2019-10-16 Thread Randy Dunlap
On 10/15/19 10:17 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20191015:
> 

on x86_64:

../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c: In function 
‘dcn20_populate_dml_pipes_from_context’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:1913:48: 
error: ‘struct dc_crtc_timing_flags’ has no member named ‘DSC’
   if (res_ctx->pipe_ctx[i].stream->timing.flags.DSC)
^
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:1914:73: 
error: ‘struct dc_crtc_timing’ has no member named ‘dsc_cfg’
pipes[pipe_cnt].dout.output_bpp = 
res_ctx->pipe_ctx[i].stream->timing.dsc_cfg.bits_per_pixel / 16.0;
 ^


Full randconfig file is attached.


-- 
~Randy
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 5.4.0-rc3 Kernel Configuration
#

#
# Compiler: gcc (SUSE Linux) 7.4.1 20190424 [gcc-7-branch revision 270538]
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=70401
CONFIG_CLANG_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_HAS_ASM_GOTO=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y

#
# General setup
#
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
CONFIG_HEADER_TEST=y
# CONFIG_KERNEL_HEADER_TEST is not set
# CONFIG_UAPI_HEADER_TEST is not set
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_BUILD_SALT=""
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SWAP=y
# CONFIG_SYSVIPC is not set
# CONFIG_CROSS_MEMORY_ATTACH is not set
# CONFIG_USELIB is not set
CONFIG_HAVE_ARCH_AUDITSYSCALL=y

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_SIM=y
CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_GENERIC_MSI_IRQ=y
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
CONFIG_IRQ_MSI_IOMMU=y
CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y
CONFIG_GENERIC_IRQ_RESERVATION_MODE=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_GENERIC_IRQ_DEBUGFS=y
# end of IRQ subsystem

CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_ARCH_CLOCKSOURCE_INIT=y
CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
CONFIG_NO_HZ=y
# CONFIG_HIGH_RES_TIMERS is not set
# end of Timers subsystem

CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_COUNT=y

#
# CPU/Task time and stats accounting
#
CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
CONFIG_IRQ_TIME_ACCOUNTING=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_PSI=y
CONFIG_PSI_DEFAULT_DISABLED=y
# end of CPU/Task time and stats accounting

#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
# CONFIG_RCU_EXPERT is not set
CONFIG_SRCU=y
CONFIG_TINY_SRCU=y
CONFIG_TASKS_RCU=y
# end of RCU Subsystem

CONFIG_BUILD_BIN2C=y
CONFIG_IKCONFIG=m
CONFIG_IKHEADERS=m
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y

#
# Scheduler features
#
# end of Scheduler features

CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_CGROUPS=y
# CONFIG_MEMCG is not set
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
# CONFIG_RT_GROUP_SCHED is not set
# CONFIG_CGROUP_PIDS is not set
CONFIG_CGROUP_RDMA=y
CONFIG_CGROUP_FREEZER=y
# CONFIG_CGROUP_DEVICE is not set
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
CONFIG_CHECKPOINT_RESTORE=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_SYSFS_DEPRECATED_V2 is not set
CONFIG_RELAY=y
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_EXPERT=y
CONFIG_MULTIUSER=y
# CONFIG_SGETMASK_SYSCALL is not set
CONFIG_SYSFS_SYSCALL=y
# CONFIG_FHANDLE is not set
CONFIG_POSIX_TIMERS=y
# CONFIG_PRINTK is not set
# CONFIG_BUG is not set
CONFIG_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
# CONFIG_FUTEX is not set
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
# CONFIG_TIMERFD is not set
# CONFIG_EVENTFD is not set
CONFIG_SHMEM=y
CONFIG_AIO=y
# CONFIG_IO_URING is not set
# CONFIG_ADVISE_SYSCALLS is not 

Re: [PATCH] drm/amdkfd: add missing void argument to function kgd2kfd_init

2019-10-05 Thread Randy Dunlap
On 10/5/19 11:23 AM, Colin Ian King wrote:
> On 05/10/2019 19:10, Randy Dunlap wrote:
>> On 10/5/19 10:58 AM, Colin King wrote:
>>> From: Colin Ian King 
>>>
>>> Function kgd2kfd_init is missing a void argument, add it
>>> to clean up the non-ANSI function declaration.
>>>
>>> Signed-off-by: Colin Ian King 
>>
>> Acked-by: Randy Dunlap 
>>
>> sparse reports 2 such warnings in amdgpu:
>>
>> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_module.c:85:18: warning: 
>> non-ANSI function declaration of function 'kgd2kfd_init'
>> ../drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:168:60: warning: 
>> non-ANSI function declaration of function 
>> 'amdgpu_amdkfd_gfx_10_0_get_functions'
> 
> Looking at linux-next, the amdgpu_amdkfd_gfx_10_0_get_functions() was
> removed in commit:
> 
> commit e392c887df979112af94cfec08dd87f4dd55d085
> Author: Yong Zhao 
> Date:   Fri Sep 27 22:03:42 2019 -0400
> 
> drm/amdkfd: Use array to probe kfd2kgd_calls
> 
> ..so I didn't fix that one up

ah. Thanks.

-- 
~Randy


Re: [PATCH] drm/amdkfd: add missing void argument to function kgd2kfd_init

2019-10-05 Thread Randy Dunlap
On 10/5/19 10:58 AM, Colin King wrote:
> From: Colin Ian King 
> 
> Function kgd2kfd_init is missing a void argument, add it
> to clean up the non-ANSI function declaration.
> 
> Signed-off-by: Colin Ian King 

Acked-by: Randy Dunlap 

sparse reports 2 such warnings in amdgpu:

../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_module.c:85:18: warning: non-ANSI 
function declaration of function 'kgd2kfd_init'
../drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:168:60: warning: non-ANSI 
function declaration of function 'amdgpu_amdkfd_gfx_10_0_get_functions'

Thanks.

> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c 
> b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
> index 986ff52d5750..f4b7f7e6c40e 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_module.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_module.c
> @@ -82,7 +82,7 @@ static void kfd_exit(void)
>   kfd_chardev_exit();
>  }
>  
> -int kgd2kfd_init()
> +int kgd2kfd_init(void)
>  {
>   return kfd_init();
>  }
> 


-- 
~Randy


Re: linux-next: Tree for Oct 4 (amdgpu)

2019-10-04 Thread Randy Dunlap
On 10/3/19 10:59 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20191003:
> 

on x86_64:
CONFIG_DRM_AMDGPU=y
# CONFIG_DRM_AMDGPU_SI is not set
# CONFIG_DRM_AMDGPU_CIK is not set
CONFIG_DRM_AMDGPU_USERPTR=y
CONFIG_DRM_AMDGPU_GART_DEBUGFS=y

ld: drivers/gpu/drm/amd/amdkfd/kfd_device.o:(.rodata+0xf60): undefined 
reference to `gfx_v7_kfd2kgd'

-- 
~Randy


Re: linux-next: Tree for Sep 20 (amdgpu-2)

2019-09-20 Thread Randy Dunlap
On 9/20/19 9:36 AM, Mark Brown wrote:
> Hi all,
> 
> News: There will likely be no more -next builds until Stephen returns on
> the 30th, I *may* do some next week but it's more likely that I won't
> and it certainly won't be every day.
> 
> Changes since 20190919:
> 

on x86_64:

(1) where is function get_wm_urgent() defined?  I cannot find it (i.e.,
grep cannot find it).

../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function 
‘calculate_wm_set_for_vlevel’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:964:22: 
error: SSE register return with SSE disabled
  wm_set->urgent_ns = get_wm_urgent(dml, pipes, pipe_cnt) * 1000;
  ^~~

(2) drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c needs
#include 
for the kzalloc() and kfree() function calls.


Thanks.
-- 
~Randy


Re: linux-next: Tree for Sep 20 (amd/display)

2019-09-20 Thread Randy Dunlap
On 9/20/19 9:36 AM, Mark Brown wrote:
> Hi all,
> 
> News: There will likely be no more -next builds until Stephen returns on
> the 30th, I *may* do some next week but it's more likely that I won't
> and it certainly won't be every day.
> 
> Changes since 20190919:
> 


on i386:

ld: drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.o: in function 
`dce11_pplib_apply_display_requirements':
dce110_clk_mgr.c:(.text+0x2f0): undefined reference to `__divdi3'
ld: dce110_clk_mgr.c:(.text+0x304): undefined reference to `__divdi3'


-- 
~Randy


Re: linux-next: Tree for Sep 19 (amdgpu)

2019-09-19 Thread Randy Dunlap
On 9/19/19 9:06 AM, Mark Brown wrote:
> Hi all,
> 
> Changes since 20190918:
> 


../drivers/gpu/drm/amd/amdgpu/../display/dc/dml/Makefile:70: *** missing 
'endif'.  Stop.


-- 
~Randy
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  1   2   >