Re: [PATCH] drm/amdkfd: Fix out-of-bounds read in kdf_create_vcrat_image_cpu()
On Fri, Jan 08, 2021 at 06:46:17PM -0500, Felix Kuehling wrote: > Am 2021-01-08 um 11:31 a.m. schrieb Jeremy Cline: > > KASAN reported a slab-out-of-bounds read of size 1 in > > kdf_create_vcrat_image_cpu(). > > > > This occurs when, for example, when on an x86_64 with a single NUMA node > > because kfd_fill_iolink_info_for_cpu() is a no-op, but afterwards the > > sub_type_hdr->length, which is out-of-bounds, is read and multiplied by > > entries. Fortunately, entries is 0 in this case so the overall > > crat_table->length is still correct. > > That's a pretty big change to fix that. Wouldn't it be enough to add a > simple check after calling kfd_fill_iolink_info_for_cpu: > > if (entries) { > crat_table->length += (sub_type_hdr->length * entries); > crat_table->total_entries += entries; > } > > Or change the output parameters of the kfd_fill_..._for_cpu functions > from num_entries to size_filled, so the caller doesn't need to read > sub_type_hdr->length any more. > For sure. I felt like this was a bit tidier afterwards, but that's an opinion and not one I hold strongly. I'll look at preparing a smaller fix next week. Thanks, Jeremy > > > > This refactors the helper functions to accept the crat_table directly > > and calculate the table entry pointer based on the current table length. > > This allows us to avoid an out-of-bounds read and hopefully makes the > > pointer arithmetic clearer. It should have no functional change beyond > > removing the out-of-bounds read. > > > > Fixes: b7b6c38529c9 ("drm/amdkfd: Calculate CPU VCRAT size dynamically > > (v2)") > > Signed-off-by: Jeremy Cline > > --- > > drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 86 +-- > > 1 file changed, 40 insertions(+), 46 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c > > b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c > > index 8cac497c2c45..e50db2c0f4ee 100644 > > --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c > > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c > > @@ -829,21 +829,24 @@ int kfd_create_crat_image_acpi(void **crat_image, > > size_t *size) > > /* kfd_fill_cu_for_cpu - Fill in Compute info for the given CPU NUMA node > > * > > * @numa_node_id: CPU NUMA node id > > - * @avail_size: Available size in the memory > > - * @sub_type_hdr: Memory into which compute info will be filled in > > + * @avail_size: Available space in bytes at the end of the @crat_table. > > + * @crat_table: The CRAT table to append the Compute info to; > > + * on success the table length and total_entries count is updated. > > * > > * Return 0 if successful else return -ve value > > */ > > static int kfd_fill_cu_for_cpu(int numa_node_id, int *avail_size, > > - int proximity_domain, > > - struct crat_subtype_computeunit *sub_type_hdr) > > + struct crat_header *crat_table) > > { > > const struct cpumask *cpumask; > > + struct crat_subtype_computeunit *sub_type_hdr; > > > > *avail_size -= sizeof(struct crat_subtype_computeunit); > > if (*avail_size < 0) > > return -ENOMEM; > > > > + sub_type_hdr = (typeof(sub_type_hdr))((char *)crat_table + > > + crat_table->length); > > memset(sub_type_hdr, 0, sizeof(struct crat_subtype_computeunit)); > > > > /* Fill in subtype header data */ > > @@ -855,36 +858,42 @@ static int kfd_fill_cu_for_cpu(int numa_node_id, int > > *avail_size, > > > > /* Fill in CU data */ > > sub_type_hdr->flags |= CRAT_CU_FLAGS_CPU_PRESENT; > > - sub_type_hdr->proximity_domain = proximity_domain; > > + sub_type_hdr->proximity_domain = crat_table->num_domains; > > sub_type_hdr->processor_id_low = kfd_numa_node_to_apic_id(numa_node_id); > > if (sub_type_hdr->processor_id_low == -1) > > return -EINVAL; > > > > sub_type_hdr->num_cpu_cores = cpumask_weight(cpumask); > > > > + crat_table->length += sub_type_hdr->length; > > + crat_table->total_entries++; > > + > > return 0; > > } > > > > /* kfd_fill_mem_info_for_cpu - Fill in Memory info for the given CPU NUMA > > node > > * > > * @numa_node_id: CPU NUMA node id > > - * @avail_size: Available size in the memory > > - * @sub_type_hdr: Memory into which compute info will be filled in > > + * @avail_size: Available space in bytes at the end of the @crat_table. > > + * @crat_table: The CRAT table to append the Memory info to; > > + * on success the table length and total_entries count is updated. > > * > > * Return 0 if successful else return -ve value > > */ > > static int kfd_fill_mem_info_for_cpu(int numa_node_id, int *avail_size, > > - int proximity_domain, > > - struct crat_subtype_memory *sub_type_hdr) > > + struct crat_header *crat_table) > > { > > uint64_t mem_in_bytes = 0; > > pg_data_t *pgdat; > > int zone_type; > > + struct crat_subtype_memory
Re: [PATCH] drm/amdkfd: Fix out-of-bounds read in kdf_create_vcrat_image_cpu()
Am 2021-01-08 um 11:31 a.m. schrieb Jeremy Cline: > KASAN reported a slab-out-of-bounds read of size 1 in > kdf_create_vcrat_image_cpu(). > > This occurs when, for example, when on an x86_64 with a single NUMA node > because kfd_fill_iolink_info_for_cpu() is a no-op, but afterwards the > sub_type_hdr->length, which is out-of-bounds, is read and multiplied by > entries. Fortunately, entries is 0 in this case so the overall > crat_table->length is still correct. That's a pretty big change to fix that. Wouldn't it be enough to add a simple check after calling kfd_fill_iolink_info_for_cpu: if (entries) { crat_table->length += (sub_type_hdr->length * entries); crat_table->total_entries += entries; } Or change the output parameters of the kfd_fill_..._for_cpu functions from num_entries to size_filled, so the caller doesn't need to read sub_type_hdr->length any more. Regards, Felix > > This refactors the helper functions to accept the crat_table directly > and calculate the table entry pointer based on the current table length. > This allows us to avoid an out-of-bounds read and hopefully makes the > pointer arithmetic clearer. It should have no functional change beyond > removing the out-of-bounds read. > > Fixes: b7b6c38529c9 ("drm/amdkfd: Calculate CPU VCRAT size dynamically (v2)") > Signed-off-by: Jeremy Cline > --- > drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 86 +-- > 1 file changed, 40 insertions(+), 46 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c > b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c > index 8cac497c2c45..e50db2c0f4ee 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c > @@ -829,21 +829,24 @@ int kfd_create_crat_image_acpi(void **crat_image, > size_t *size) > /* kfd_fill_cu_for_cpu - Fill in Compute info for the given CPU NUMA node > * > * @numa_node_id: CPU NUMA node id > - * @avail_size: Available size in the memory > - * @sub_type_hdr: Memory into which compute info will be filled in > + * @avail_size: Available space in bytes at the end of the @crat_table. > + * @crat_table: The CRAT table to append the Compute info to; > + * on success the table length and total_entries count is updated. > * > * Return 0 if successful else return -ve value > */ > static int kfd_fill_cu_for_cpu(int numa_node_id, int *avail_size, > - int proximity_domain, > - struct crat_subtype_computeunit *sub_type_hdr) > + struct crat_header *crat_table) > { > const struct cpumask *cpumask; > + struct crat_subtype_computeunit *sub_type_hdr; > > *avail_size -= sizeof(struct crat_subtype_computeunit); > if (*avail_size < 0) > return -ENOMEM; > > + sub_type_hdr = (typeof(sub_type_hdr))((char *)crat_table + > + crat_table->length); > memset(sub_type_hdr, 0, sizeof(struct crat_subtype_computeunit)); > > /* Fill in subtype header data */ > @@ -855,36 +858,42 @@ static int kfd_fill_cu_for_cpu(int numa_node_id, int > *avail_size, > > /* Fill in CU data */ > sub_type_hdr->flags |= CRAT_CU_FLAGS_CPU_PRESENT; > - sub_type_hdr->proximity_domain = proximity_domain; > + sub_type_hdr->proximity_domain = crat_table->num_domains; > sub_type_hdr->processor_id_low = kfd_numa_node_to_apic_id(numa_node_id); > if (sub_type_hdr->processor_id_low == -1) > return -EINVAL; > > sub_type_hdr->num_cpu_cores = cpumask_weight(cpumask); > > + crat_table->length += sub_type_hdr->length; > + crat_table->total_entries++; > + > return 0; > } > > /* kfd_fill_mem_info_for_cpu - Fill in Memory info for the given CPU NUMA > node > * > * @numa_node_id: CPU NUMA node id > - * @avail_size: Available size in the memory > - * @sub_type_hdr: Memory into which compute info will be filled in > + * @avail_size: Available space in bytes at the end of the @crat_table. > + * @crat_table: The CRAT table to append the Memory info to; > + * on success the table length and total_entries count is updated. > * > * Return 0 if successful else return -ve value > */ > static int kfd_fill_mem_info_for_cpu(int numa_node_id, int *avail_size, > - int proximity_domain, > - struct crat_subtype_memory *sub_type_hdr) > + struct crat_header *crat_table) > { > uint64_t mem_in_bytes = 0; > pg_data_t *pgdat; > int zone_type; > + struct crat_subtype_memory *sub_type_hdr; > > *avail_size -= sizeof(struct crat_subtype_memory); > if (*avail_size < 0) > return -ENOMEM; > > + sub_type_hdr = (typeof(sub_type_hdr))((char *)crat_table + > + crat_table->length); > memset(sub_type_hdr, 0, sizeof(struct crat_subtype_memory)); > > /* Fill in subtype head
Re: AMDGPU VCE 1: some info needed
On Fri, 2021-01-08 at 15:00 -0500, Alex Deucher wrote: > On Fri, Jan 8, 2021 at 2:37 PM Alexandre Demers > wrote: > > > > > > On Fri, 2021-01-08 at 10:28 -0500, Alex Deucher wrote: > > > On Fri, Jan 8, 2021 at 3:11 AM Christian König > > > wrote: > > > > > > > > Hi Alexandre, > > > > > > > > Am 08.01.21 um 05:20 schrieb Alexandre Demers: > > > > > Hi there, > > > > > > > > > > Some of you may remember I was working on porting VCE 1 from > > > > > Radeon to > > > > > AMDGPU a few years ago... about 3 and a half years. I hadn't > > > > > had > > > > > time > > > > > to work on it until last Holidays. But why do I persist in > > > > > this > > > > > work? > > > > > Because GCN 1st gen was still used in some GPU produced 4 > > > > > years > > > > > ago > > > > > (Radeon 520 and just before R5 and R7 in the entry level). > > > > > > > > Yes and that is really valued. > > > > > > > > If we can get that working and and it is feature equivalent to > > > > radeon > > > > I'm perfectly fine to merge this. > > > > > > > > > I'm pretty happy with where the code is sitting now, however > > > > > I > > > > > have > > > > > some questions. > > > > > > > > > > 1- should the firmware be validated like it was under Radeon > > > > > and > > > > > as it > > > > > is done for the newly ported UVD 3.1 code? This would mean > > > > > having > > > > > to > > > > > work with keyselect, isn't it? > > > > > > > > No, that should only be necessary for UVD. > > > > > > > > > 2- last time I worked on VCE 1.0, Christian was saying that > > > > > it > > > > > was > > > > > possible a new VCE firmware could be provided for AMDGPU. > > > > > Then, > > > > > it > > > > > wasn't that clear, GCN 1.0 (SI) being in trouble and it was > > > > > considered > > > > > to strip it from AMDGPU. And a few months ago, UVD and DC > > > > > were > > > > > added > > > > > for SI to AMDGPU and a new UVD firmware was released (yeah!). > > > > > So, > > > > > is > > > > > it possible to have a new VCE firmware? I produced an > > > > > "updated" > > > > > tahiti > > > > > VCE file where a header is added (script available on my > > > > > account > > > > > on > > > > > GitHub). Still, if this can be useful, I'd prefer an official > > > > > firmware. > > > > > > > > Leo and I can push once more on this, but no guarantee that > > > > this > > > > will > > > > ever see the day of light. > > > > > > > > It was a really long and taxing process of getting UVD for SI > > > > out > > > > of the > > > > door. > > > > Well, if this doesn't block porting the code, let's just leave > > things > > as they are for now. > > > > > > > > > > > 3- is there any documentation about VCE 1.0 that would help > > > > > me > > > > > complete this work? > > > > > > > > Unfortunately not, we only have what was exposed with the > > > > initial > > > > code drop. > > > > > > > > > 3.1- Some variables that were previously defined are not > > > > > available > > > > > under sid.c, vce_v1_0_d.h, vce_v1_0_sh_mask.h and others. > > > > > Since > > > > > the > > > > > new values (mostly in the range of 0x8xxx) are completely > > > > > different > > > > > from the ones defined under Radeon (in the range of 0x2), > > > > > I'd > > > > > like > > > > > to be sure to use the good ones. I would assume the masks and > > > > > shifts > > > > > are still valid though. > > > > > > > > Do you have an example of what you need? > > > > > > Note that radeon uses byte aligned register headers and amdgpu > > > uses > > > dword aligned registers headers, so you'll need to shift the > > > definitions appropriately if you need to add any of the offsets > > > to > > > amdgpu. I think vce_1_0 headers should be fine to use as is in > > > amdgpu. > > > > > > Alex > > > > > > > Ah bummer! That's why. OK, I'll keep that in mind revising my work > > then. > > > > > > > > > > > 3.2- Some statuses are undefined, sometimes magic values > > > > > appear > > > > > here > > > > > and there without being ever defined or documented (status > > > > > 0x337f > > > > > anyone?), even under CIK or they don't seem to be easily > > > > > portable > > > > > from > > > > > other VCE versions. Having a name for a value is really > > > > > helpful > > > > > without an official documentation, when the code is supposed > > > > > to > > > > > be > > > > > self-documented. I've been able to identify some of them by > > > > > looking at > > > > > variables used under Radeon or under AMDGPU's UVD 3.1. > > > > > Interestingly, > > > > > some variables were previously defined under Radeon, but were > > > > > left > > > > > aside in AMDGPU... > > > > > > > > > > 3.3- Being able to know how to properly set/reset which part, > > > > > in > > > > > what > > > > > order, etc. > > > > > > > > Sorry, I don't think we can help with documentation here. What > > > > I > > > > can do > > > > is to test your stuff on SI hardware if you get stuck with > > > > something and > > > > report back what might be the issue. > >
RE: [PATCH 00/21] DC Patches January 08, 2021
[AMD Public Use] Hi all, Ran the promotion test this week on Navi14 and a Renoir laptop (HP Envy 360 with Ryzen 5 4500U). Tested the laptop with it's internal 1080p display and externally with USB-C to DP and HDMI to 2x 4k60 displays and 1x 1440p 144hz display. Also tested using an MST hub with 2x 4k30. I found nothing causing any visual impact, and did notice that this promotion did fix some previous bugs that I had seen. Tested-by: Daniel Wheeler Thank you, Dan Wheeler Technologist | AMD SW Display -Original Message- From: Siqueira, Rodrigo Sent: Friday, January 8, 2021 5:12 PM To: amd-gfx@lists.freedesktop.org Cc: Wentland, Harry ; Li, Sun peng (Leo) ; Lakha, Bhawanpreet ; Pillai, Aurabindo ; Zhuo, Qingqing ; Brol, Eryk ; R, Bindu ; Li, Roman ; Wheeler, Daniel Subject: Re: [PATCH 00/21] DC Patches January 08, 2021 +Daniel On 01/08, Rodrigo Siqueira wrote: > Happy new year, this is the first code promotion of the year; for this > reason, most of the changes are related to fixes. > > This DC patchset brings improvements in multiple areas. In summary, we have: > * Multiple fixes and code refactoring. > * Updates on HUBP operations > > Best Regards > > Aric Cyr (2): > drm/amd/display: 3.2.117 > drm/amd/display: 3.2.118 > > Bhawanpreet Lakha (1): > drm/amd/display: enable HUBP blank behaviour > > Charlene Liu (1): > drm/amd/display: change SMU repsonse timeout to 2s > > Chiawen Huang (1): > drm/amd/display: removed unnecessary check when dpp clock increasing > > Jacky Liao (1): > drm/amd/display: Fix assert being hit with GAMCOR memory shut down > > Jun Lei (1): > drm/amd/display: implement T12 compliance > > Lewis Huang (1): > drm/amd/display: Separate fec debug flag and monitor patch > > Li, Roman (1): > drm/amd/display: disable dcn10 pipe split by default > > Mike Hsieh (1): > drm/amd/display: Remove unused P010 debug flag > > Nikola Cornij (1): > drm/amd/display: Add a missing DCN3.01 API mapping > > Qingqing Zhuo (1): > drm/amd/display: NULL pointer hang > > Raymond Yang (1): > drm/amd/display: fix seamless boot stream adding algorithm > > Stylon Wang (1): > drm/amd/display: Revert patch causing black screen > > Wesley Chalmers (6): > drm/amd/display: Initialize stack variable > drm/amd/display: HUBP_IN_BLANK for DCN30 > drm/amd/display: Remove HUBP_DISABLE from default > drm/amd/display: Unblank hubp based on plane visibility > drm/amd/display: New path for enabling DPG > drm/amd/display: New sequence for HUBP blank > > Yu-ting Shen (1): > drm/amd/display: doesn't reprogram AMD OUI > > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - > .../gpu/drm/amd/display/dc/basics/dc_common.c | 20 -- > .../gpu/drm/amd/display/dc/basics/dc_common.h | 4 +- > .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 3 +- > .../display/dc/clk_mgr/dcn301/dcn301_smu.c| 2 +- > drivers/gpu/drm/amd/display/dc/core/dc.c | 12 > drivers/gpu/drm/amd/display/dc/core/dc_link.c | 31 ++-- > .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 49 + > .../gpu/drm/amd/display/dc/core/dc_resource.c | 28 +--- > drivers/gpu/drm/amd/display/dc/dc.h | 3 +- > drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 3 + > drivers/gpu/drm/amd/display/dc/dc_link.h | 8 +++ > drivers/gpu/drm/amd/display/dc/dc_stream.h| 11 +++ > .../display/dc/dce110/dce110_hw_sequencer.c | 31 > .../gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 2 +- > .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 36 -- > .../amd/display/dc/dcn10/dcn10_hw_sequencer.h | 5 ++ > .../gpu/drm/amd/display/dc/dcn10/dcn10_init.c | 1 + > .../gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +- > .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 11 +++ > .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 1 + > .../drm/amd/display/dc/dcn10/dcn10_resource.c | 4 +- > .../gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 22 -- > .../drm/amd/display/dc/dcn20/dcn20_hwseq.c| 12 +++- > .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 1 + > .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 1 + > .../drm/amd/display/dc/dcn30/dcn30_dpp_cm.c | 7 -- > .../gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h | 1 + > .../drm/amd/display/dc/dcn30/dcn30_hwseq.c| 70 ++- > .../drm/amd/display/dc/dcn30/dcn30_hwseq.h| 4 ++ > .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 2 + > .../gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 1 + > .../drm/amd/display/dc/dcn301/dcn301_init.c | 1 + > .../amd/display/dc/dcn301/dcn301_resource.c | 1 + > .../dc/dml/dcn30/display_mode_vba_30.c| 2 +- > .../gpu/drm/amd/display/dc/inc/core_types.h | 1 + > .../amd/display/dc/inc/hw/timing_generator.h | 1 + > .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 5 ++ > 38 files changed, 332 insertions(+), 68 deletions(-) > > -- > 2.25.1 > -- Rodrigo Siqueira https://siqueira.tech
[pull] radeon, amdgpu drm-next-5.12
Hi Dave, Daniel, First set of new changes for 5.12. The following changes since commit a135a1b4c4db1f3b8cbed9676a40ede39feb3362: drm/amd/display: Fix memory leaks in S3 resume (2020-12-23 15:03:15 -0500) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-next-5.12-2021-01-08 for you to fetch changes up to 044a48f420b9d3c19a135b821c34de5b2bee4075: drm/amdgpu: fix DRM_INFO flood if display core is not supported (bug 210921) (2021-01-08 15:18:57 -0500) amd-drm-next-5.12-2021-01-08: amdgpu: - Rework IH ring handling on vega and navi - Rework HDP handling for vega and navi - swSMU documenation updates - Overdrive support for Sienna Cichlid and newer asics - swSMU updates for vangogh - swSMU updates for renoir - Enable FP16 on DCE8-11 - Misc code cleanups and bug fixes radeon: - Fixes for platforms that can't access PCI resources correctly - Misc code cleanups Alex Deucher (6): drm/amdgpu: fix handling of irq domains on soc15 and newer GPUs drm/amdkfd: check both client id and src id in interrupt handlers drm/amdgpu: take runtime pm reference when we attach a buffer drm/amdgpu/display: drop DCN support for aarch64 Revert "drm/amd/display: Fix memory leaks in S3 resume" drm/amdgpu/display: fix build with CONFIG_DRM_AMD_DC_DCN disabled Alexandre Demers (1): drm/amdgpu: fix DRM_INFO flood if display core is not supported (bug 210921) Arnd Bergmann (1): drm/amd/display: Fix unused variable warning Bhawanpreet Lakha (1): drm/amd/display: enable idle optimizations for linux (MALL stutter) Chen Li (2): drm/radeon: use writel to avoid gcc optimization v3 drm/amdgpu: use GTT for uvd_get_create/destory_msg Chenyang Li (1): drm/amdgpu: Fix macro name _AMDGPU_TRACE_H_ in preprocessor if condition Defang Bo (1): drm/amdgpu: Add check to prevent IH overflow Dennis Li (3): drm/amdgpu: fix a memory protection fault when remove amdgpu device drm/amdgpu: fix a GPU hang issue when remove device drm/amdgpu: fix no bad_pages issue after umc ue injection Emily.Deng (2): drm/amdgpu: Add new mode 2560x1440 drm/amdgpu: Correct the read sclk for navi10 Evan Quan (3): drm/amd/pm: populate Sienna Cichlid default overdrive table settings drm/amd/pm: enable Sienna Cichlid overdrive support drm/amd/pm: support overdrive vddgfx offset setting(V2) Hawking Zhang (33): drm/amdgpu: add amdgpu_ih_regs structure drm/amdgpu: add helper to init ih ring regs for vega10 drm/amdgpu: add helper to enable an ih ring for vega10 drm/amdgpu: add helper to toggle ih ring interrupts for vega10 drm/amdgpu: switch to ih_init_register_offset for vega10 drm/amdgpu: switch to ih_toggle_interrupts for vega10 drm/amdgpu: switch to ih_enable_ring for vega10 drm/amdgpu: use cached ih rb control reg offsets for vega10 drm/amdgpu: correct ih cg programming for vega10 ih block drm/amdgpu: add helper to init ih ring regs for navi10 drm/amdgpu: add helper to enable an ih ring for navi10 drm/amdgpu: add helper to toggle ih ring interrupts for navi10 drm/amdgpu: switch to ih_init_register_offset for navi10 drm/amdgpu: switch to ih_toggle_interrupts for navi10 drm/amdgpu: switch to ih_enable_ring for navi10 drm/amdgpu: use cached ih rb control reg offsets for navi10 drm/amdgpu: add a helper function to decode iv drm/amdgpu: switch to common decode iv helper drm/amdgpu: add osssys v4_2 ip headers (v2) drm/amdgpu: create vega20 ih blocks drm/amdgpu: reroute vmc/utcl2 interrupts to ih ring 1 for arcturus drm/amdgpu: switch to vega20 ih block for vega20/arcturus drm/amdgpu: retire the vega20 code path from navi10 ih block drm/amdgpu: correct ih_chicken programming for vega10/vega20 ih blocks drm/amdgpu: drop IH_CHICKEN programming from vega10 ih block drm/amdgpu: drop ih reroute function from psp v11 drm/amdgpu: don't create ih ring 1 and ring 2 for APU drm/amdgpu: enable software ih ring for vega20 ih block drm/amdgpu: set ih soft ring enabled flag for vega and navi drm/amdgpu: de-initialize software ih ring drm/amdgpu: drop psp ih programming for sriov guest on navi drm/amdgpu: switched to cached noretry setting for vangogh drm/amdgpu: add amdgpu_hdp structure Jiansong Chen (1): drm/amdgpu: remove unnecessary asic check for sdma5.2 Jiawei Gu (2): drm/amdgpu: fix potential NULL pointer when check_atom_bios() fails drm/amdgpu: fix potential memory leak during navi12 deinitialization Jinzhou Su (1): drm/amd/pm: Add interface for request WGPs John Clements (2): drm/amd/pm: updated PM to I2C controller port on sienna cichlid
Re: [PATCH 00/21] DC Patches January 08, 2021
+Daniel On 01/08, Rodrigo Siqueira wrote: > Happy new year, this is the first code promotion of the year; for this > reason, most of the changes are related to fixes. > > This DC patchset brings improvements in multiple areas. In summary, we have: > * Multiple fixes and code refactoring. > * Updates on HUBP operations > > Best Regards > > Aric Cyr (2): > drm/amd/display: 3.2.117 > drm/amd/display: 3.2.118 > > Bhawanpreet Lakha (1): > drm/amd/display: enable HUBP blank behaviour > > Charlene Liu (1): > drm/amd/display: change SMU repsonse timeout to 2s > > Chiawen Huang (1): > drm/amd/display: removed unnecessary check when dpp clock increasing > > Jacky Liao (1): > drm/amd/display: Fix assert being hit with GAMCOR memory shut down > > Jun Lei (1): > drm/amd/display: implement T12 compliance > > Lewis Huang (1): > drm/amd/display: Separate fec debug flag and monitor patch > > Li, Roman (1): > drm/amd/display: disable dcn10 pipe split by default > > Mike Hsieh (1): > drm/amd/display: Remove unused P010 debug flag > > Nikola Cornij (1): > drm/amd/display: Add a missing DCN3.01 API mapping > > Qingqing Zhuo (1): > drm/amd/display: NULL pointer hang > > Raymond Yang (1): > drm/amd/display: fix seamless boot stream adding algorithm > > Stylon Wang (1): > drm/amd/display: Revert patch causing black screen > > Wesley Chalmers (6): > drm/amd/display: Initialize stack variable > drm/amd/display: HUBP_IN_BLANK for DCN30 > drm/amd/display: Remove HUBP_DISABLE from default > drm/amd/display: Unblank hubp based on plane visibility > drm/amd/display: New path for enabling DPG > drm/amd/display: New sequence for HUBP blank > > Yu-ting Shen (1): > drm/amd/display: doesn't reprogram AMD OUI > > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - > .../gpu/drm/amd/display/dc/basics/dc_common.c | 20 -- > .../gpu/drm/amd/display/dc/basics/dc_common.h | 4 +- > .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 3 +- > .../display/dc/clk_mgr/dcn301/dcn301_smu.c| 2 +- > drivers/gpu/drm/amd/display/dc/core/dc.c | 12 > drivers/gpu/drm/amd/display/dc/core/dc_link.c | 31 ++-- > .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 49 + > .../gpu/drm/amd/display/dc/core/dc_resource.c | 28 +--- > drivers/gpu/drm/amd/display/dc/dc.h | 3 +- > drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 3 + > drivers/gpu/drm/amd/display/dc/dc_link.h | 8 +++ > drivers/gpu/drm/amd/display/dc/dc_stream.h| 11 +++ > .../display/dc/dce110/dce110_hw_sequencer.c | 31 > .../gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 2 +- > .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 36 -- > .../amd/display/dc/dcn10/dcn10_hw_sequencer.h | 5 ++ > .../gpu/drm/amd/display/dc/dcn10/dcn10_init.c | 1 + > .../gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +- > .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 11 +++ > .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 1 + > .../drm/amd/display/dc/dcn10/dcn10_resource.c | 4 +- > .../gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 22 -- > .../drm/amd/display/dc/dcn20/dcn20_hwseq.c| 12 +++- > .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 1 + > .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 1 + > .../drm/amd/display/dc/dcn30/dcn30_dpp_cm.c | 7 -- > .../gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h | 1 + > .../drm/amd/display/dc/dcn30/dcn30_hwseq.c| 70 ++- > .../drm/amd/display/dc/dcn30/dcn30_hwseq.h| 4 ++ > .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 2 + > .../gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 1 + > .../drm/amd/display/dc/dcn301/dcn301_init.c | 1 + > .../amd/display/dc/dcn301/dcn301_resource.c | 1 + > .../dc/dml/dcn30/display_mode_vba_30.c| 2 +- > .../gpu/drm/amd/display/dc/inc/core_types.h | 1 + > .../amd/display/dc/inc/hw/timing_generator.h | 1 + > .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 5 ++ > 38 files changed, 332 insertions(+), 68 deletions(-) > > -- > 2.25.1 > -- Rodrigo Siqueira https://siqueira.tech signature.asc Description: PGP signature ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] amdgpu: Avoid sleeping during FPU critical sections
dcn20_resource_construct() includes a number of kzalloc(GFP_KERNEL) calls which can sleep, but kernel_fpu_begin() disables preemption and sleeping in this context is invalid. The only places the FPU appears to be required is in the init_soc_bounding_box() function and when calculating the {min,max}_fill_clk_mhz. Narrow the scope to just these two parts to avoid sleeping while using the FPU. Fixes: 7a8a3430be15 ("amdgpu: Wrap FPU dependent functions in dc20") Cc: Timothy Pearson Signed-off-by: Jeremy Cline --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index e04ecf0fc0db..a4fa5bf016c1 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -3622,6 +3622,7 @@ static bool init_soc_bounding_box(struct dc *dc, if (bb && ASICREV_IS_NAVI12_P(dc->ctx->asic_id.hw_internal_rev)) { int i; + DC_FP_START(); dcn2_0_nv12_soc.sr_exit_time_us = fixed16_to_double_to_cpu(bb->sr_exit_time_us); dcn2_0_nv12_soc.sr_enter_plus_exit_time_us = @@ -3721,6 +3722,7 @@ static bool init_soc_bounding_box(struct dc *dc, dcn2_0_nv12_soc.clock_limits[i].dram_speed_mts = fixed16_to_double_to_cpu(bb->clock_limits[i].dram_speed_mts); } + DC_FP_END(); } if (pool->base.pp_smu) { @@ -3777,8 +3779,6 @@ static bool dcn20_resource_construct( enum dml_project dml_project_version = get_dml_project_version(ctx->asic_id.hw_internal_rev); - DC_FP_START(); - ctx->dc_bios->regs = &bios_regs; pool->base.funcs = &dcn20_res_pool_funcs; @@ -3959,8 +3959,10 @@ static bool dcn20_resource_construct( ranges.reader_wm_sets[i].wm_inst = i; ranges.reader_wm_sets[i].min_drain_clk_mhz = PP_SMU_WM_SET_RANGE_CLK_UNCONSTRAINED_MIN; ranges.reader_wm_sets[i].max_drain_clk_mhz = PP_SMU_WM_SET_RANGE_CLK_UNCONSTRAINED_MAX; + DC_FP_START(); ranges.reader_wm_sets[i].min_fill_clk_mhz = (i > 0) ? (loaded_bb->clock_limits[i - 1].dram_speed_mts / 16) + 1 : 0; ranges.reader_wm_sets[i].max_fill_clk_mhz = loaded_bb->clock_limits[i].dram_speed_mts / 16; + DC_FP_END(); ranges.num_reader_wm_sets = i + 1; } @@ -4125,12 +4127,10 @@ static bool dcn20_resource_construct( pool->base.oem_device = NULL; } - DC_FP_END(); return true; create_fail: - DC_FP_END(); dcn20_resource_destruct(pool); return false; -- 2.28.0 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 21/21] drm/amd/display: change SMU repsonse timeout to 2s
From: Charlene Liu [why] driver has sent PMFW VBIOSSMC_MSG_SetDisplayIdleOptimizations while SMU still processing a previous VBIOSSMC_MSG_SetHardMinDcfclkByFreq message. [how] same as RN, change the time out to2s. Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c index cfa8e02cf103..68942bbc7472 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c @@ -103,7 +103,7 @@ int dcn301_smu_send_msg_with_param( /* Trigger the message transaction by writing the message ID */ REG_WRITE(MP1_SMN_C2PMSG_67, msg_id); - result = dcn301_smu_wait_for_response(clk_mgr, 10, 1000); + result = dcn301_smu_wait_for_response(clk_mgr, 10, 20); ASSERT(result == VBIOSSMC_Result_OK); -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 20/21] drm/amd/display: disable dcn10 pipe split by default
From: "Li, Roman" [Why] The initial purpose of dcn10 pipe split is to support some high bandwidth mode which requires dispclk greater than max dispclk. By initial bring up power measurement data, it showed power consumption is less with pipe split for dcn block. This could be reason for enable pipe split by default. By battery life measurement of some Chromebooks, result shows battery life is longer with pipe split disabled. [How] Disable pipe split by default. Pipe split could be still enabled when required dispclk is greater than max dispclk. Signed-off-by: hersen wu mailto:hersenxs...@amd.com>> Reviewed-by: Roman Li mailto:roman...@amd.com>> --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c index 36745193c391..90e912fef2b3 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c @@ -608,8 +608,8 @@ static const struct dc_debug_options debug_defaults_drv = { .disable_pplib_clock_request = false, .disable_pplib_wm_range = false, .pplib_wm_report_mode = WM_REPORT_DEFAULT, - .pipe_split_policy = MPC_SPLIT_DYNAMIC, - .force_single_disp_pipe_split = true, + .pipe_split_policy = MPC_SPLIT_AVOID, + .force_single_disp_pipe_split = false, .disable_dcc = DCC_ENABLE, .voltage_align_fclk = true, .disable_stereo_support = true, -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 19/21] drm/amd/display: Revert patch causing black screen
From: Stylon Wang [Why] Previous patch is causing black screen from S3 hotplug. [How] Revert patch until correct solution is developed. This reverts 2b09ac8145dc. Signed-off-by: Stylon Wang Reviewed-by: Roman Li Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 228b5e51c41e..3c1552667a2a 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2386,7 +2386,6 @@ void amdgpu_dm_update_connector_after_detect( drm_connector_update_edid_property(connector, aconnector->edid); aconnector->num_modes = drm_add_edid_modes(connector, aconnector->edid); - drm_connector_list_update(connector); if (aconnector->dc_link->aux_mode) drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux, -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 18/21] drm/amd/display: 3.2.118
From: Aric Cyr Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 3737fb9802a4..f3ba02cc85d2 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -42,7 +42,7 @@ #include "inc/hw/dmcu.h" #include "dml/display_mode_lib.h" -#define DC_VER "3.2.117" +#define DC_VER "3.2.118" #define MAX_SURFACES 3 #define MAX_PLANES 6 -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 16/21] drm/amd/display: enable HUBP blank behaviour
From: Bhawanpreet Lakha - Reverts "drm/amd/display: Revert HUBP blank behaviour for now" - Hubp blank will fail if the pipe is locked (this is the case on linux), so add a check to make sure pipe isn't locked, if it is then defer the blank to post_unlock. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 11 + .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 1 + .../drm/amd/display/dc/dcn20/dcn20_hwseq.c| 8 +++ .../drm/amd/display/dc/dcn30/dcn30_hwseq.c| 23 +-- .../gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 1 + .../dc/dml/dcn30/display_mode_vba_30.c| 2 +- .../gpu/drm/amd/display/dc/inc/core_types.h | 1 + .../amd/display/dc/inc/hw/timing_generator.h | 1 + 8 files changed, 45 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c index f033397a84e9..6138f4887de7 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c @@ -659,6 +659,16 @@ void optc1_unlock(struct timing_generator *optc) OTG_MASTER_UPDATE_LOCK, 0); } +bool optc1_is_locked(struct timing_generator *optc) +{ + struct optc *optc1 = DCN10TG_FROM_TG(optc); + uint32_t locked; + + REG_GET(OTG_MASTER_UPDATE_LOCK, UPDATE_LOCK_STATUS, &locked); + + return (locked == 1); +} + void optc1_get_position(struct timing_generator *optc, struct crtc_position *position) { @@ -1513,6 +1523,7 @@ static const struct timing_generator_funcs dcn10_tg_funcs = { .enable_crtc_reset = optc1_enable_crtc_reset, .disable_reset_trigger = optc1_disable_reset_trigger, .lock = optc1_lock, + .is_locked = optc1_is_locked, .unlock = optc1_unlock, .enable_optc_clock = optc1_enable_optc_clock, .set_drr = optc1_set_drr, diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h index b12bd9aae52f..b222c67973d4 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h @@ -638,6 +638,7 @@ void optc1_set_blank(struct timing_generator *optc, bool enable_blanking); bool optc1_is_blanked(struct timing_generator *optc); +bool optc1_is_locked(struct timing_generator *optc); void optc1_program_blank_color( struct timing_generator *optc, diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c index b74f79575cdf..18653c423c96 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c @@ -1765,6 +1765,14 @@ void dcn20_post_unlock_program_front_end( } } + for (i = 0; i < dc->res_pool->pipe_count; i++) { + struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; + + if (pipe->vtp_locked) { + dc->hwss.set_hubp_blank(dc, pipe, true); + pipe->vtp_locked = false; + } + } /* WA to apply WM setting*/ if (hwseq->wa.DEGVIDCN21) dc->res_pool->hubbub->funcs->apply_DEDCN21_147_wa(dc->res_pool->hubbub); diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c index 7f26c9444933..e5cc8f8c363f 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c @@ -891,6 +891,25 @@ void dcn30_set_disp_pattern_generator(const struct dc *dc, const struct tg_color *solid_color, int width, int height, int offset) { - pipe_ctx->stream_res.opp->funcs->opp_set_disp_pattern_generator(pipe_ctx->stream_res.opp, test_pattern, - color_space, color_depth, solid_color, width, height, offset); + struct stream_resource *stream_res = &pipe_ctx->stream_res; + + if (test_pattern != CONTROLLER_DP_TEST_PATTERN_VIDEOMODE) { + pipe_ctx->vtp_locked = false; + /* turning on DPG */ + stream_res->opp->funcs->opp_set_disp_pattern_generator(stream_res->opp, test_pattern, color_space, + color_depth, solid_color, width, height, offset); + + /* Defer hubp blank if tg is locked */ + if (stream_res->tg->funcs->is_tg_enabled(stream_res->tg)) { + if (stream_res->tg->funcs->is_locked(stream_res->tg)) + pipe_ctx->vtp_locked = true; + else + dc->hwss.set_hubp_blank(dc, pipe_ctx, true); + } + } else { + dc->hwss.set_h
[PATCH 17/21] drm/amd/display: Add a missing DCN3.01 API mapping
From: Nikola Cornij [why] Required for DSC MST Signed-off-by: Nikola Cornij Reviewed-by: Zhan Liu Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c b/drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c index 4825c5c1c6ed..35f5bf08ae96 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c @@ -1731,6 +1731,7 @@ static struct resource_funcs dcn301_res_pool_funcs = { .populate_dml_pipes = dcn30_populate_dml_pipes_from_context, .acquire_idle_pipe_for_layer = dcn20_acquire_idle_pipe_for_layer, .add_stream_to_ctx = dcn30_add_stream_to_ctx, + .add_dsc_to_stream_resource = dcn20_add_dsc_to_stream_resource, .remove_stream_from_ctx = dcn20_remove_stream_from_ctx, .populate_dml_writeback_from_context = dcn30_populate_dml_writeback_from_context, .set_mcif_arb_params = dcn30_set_mcif_arb_params, -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 15/21] drm/amd/display: New sequence for HUBP blank
From: Wesley Chalmers [WHY] DCN30 has a bug where blanking HUBP blocks pstate allow unless HUBP_DISABLE is toggled afterwards. [HOW] Create a HW sequence for blanking HUBP. 1. Wait for enter VBLANK 2. Set HUBP_BLANK 3. Make sure HUBP_IN_BLANK = 1 4. Toggle HUBP_DISABLE on and off to perform soft reset All existing calls to hubp->funcs->set_blank should be replaced with this new sequence. In wait_for_mpcc_disconnect, only blank the pipe being disconnected, and leave all other pipes unmodified. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira --- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 36 +++--- .../amd/display/dc/dcn10/dcn10_hw_sequencer.h | 3 ++ .../gpu/drm/amd/display/dc/dcn10/dcn10_init.c | 1 + .../drm/amd/display/dc/dcn20/dcn20_hwseq.c| 2 +- .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 1 + .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 1 + .../drm/amd/display/dc/dcn30/dcn30_hwseq.c| 47 +++ .../drm/amd/display/dc/dcn30/dcn30_hwseq.h| 4 ++ .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 1 + .../drm/amd/display/dc/dcn301/dcn301_init.c | 1 + .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 ++ 11 files changed, 93 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c index cfc130e2d6fd..add86d4086e8 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c @@ -2624,7 +2624,7 @@ static void dcn10_update_dchubp_dpp( hws->funcs.update_plane_addr(dc, pipe_ctx); if (is_pipe_tree_visible(pipe_ctx)) - hubp->funcs->set_blank(hubp, false); + dc->hwss.set_hubp_blank(dc, pipe_ctx, false); } void dcn10_blank_pixel_data( @@ -3135,13 +3135,16 @@ void dcn10_setup_stereo(struct pipe_ctx *pipe_ctx, struct dc *dc) return; } -static struct hubp *get_hubp_by_inst(struct resource_pool *res_pool, int mpcc_inst) +static struct pipe_ctx *get_pipe_ctx_by_hubp_inst(struct dc_state *context, int mpcc_inst) { int i; - for (i = 0; i < res_pool->pipe_count; i++) { - if (res_pool->hubps[i]->inst == mpcc_inst) - return res_pool->hubps[i]; + for (i = 0; i < MAX_PIPES; i++) { + if (context->res_ctx.pipe_ctx[i].plane_res.hubp + && context->res_ctx.pipe_ctx[i].plane_res.hubp->inst == mpcc_inst) { + return &context->res_ctx.pipe_ctx[i]; + } + } ASSERT(false); return NULL; @@ -3164,11 +3167,23 @@ void dcn10_wait_for_mpcc_disconnect( for (mpcc_inst = 0; mpcc_inst < MAX_PIPES; mpcc_inst++) { if (pipe_ctx->stream_res.opp->mpcc_disconnect_pending[mpcc_inst]) { - struct hubp *hubp = get_hubp_by_inst(res_pool, mpcc_inst); + struct pipe_ctx *restore_bottom_pipe; + struct pipe_ctx *restore_top_pipe; + struct pipe_ctx *inst_pipe_ctx = get_pipe_ctx_by_hubp_inst(dc->current_state, mpcc_inst); + ASSERT(inst_pipe_ctx); res_pool->mpc->funcs->wait_for_idle(res_pool->mpc, mpcc_inst); pipe_ctx->stream_res.opp->mpcc_disconnect_pending[mpcc_inst] = false; - hubp->funcs->set_blank(hubp, true); + /* +* Set top and bottom pipes NULL, as we don't want +* to blank those pipes when disconnecting from MPCC +*/ + restore_bottom_pipe = inst_pipe_ctx->bottom_pipe; + restore_top_pipe = inst_pipe_ctx->top_pipe; + inst_pipe_ctx->top_pipe = inst_pipe_ctx->bottom_pipe = NULL; + dc->hwss.set_hubp_blank(dc, inst_pipe_ctx, true); + inst_pipe_ctx->top_pipe = restore_top_pipe; + inst_pipe_ctx->bottom_pipe = restore_bottom_pipe; } } @@ -3721,3 +3736,10 @@ void dcn10_get_clock(struct dc *dc, dc->clk_mgr->funcs->get_clock(dc->clk_mgr, context, clock_type, clock_cfg); } + +void dcn10_set_hubp_blank(const struct dc *dc, + struct pipe_ctx *pipe_ctx, + bool blank_enable) +{ + pipe_ctx->plane_res.hubp->funcs->set_blank(pipe_ctx->plane_res.hubp, blank_enable); +} diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h index dee8ad1ebaa4..89e6dfb63da0 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h @@ -204,5 +204,8 @@ void dcn10_wait_for_pending_cleared(struct d
[PATCH 14/21] drm/amd/display: Fix assert being hit with GAMCOR memory shut down
From: Jacky Liao [Why] A call to BREAK_TO_DEBUGGER is triggered when powering down memory [How] Remove the check for GAMCOR_MEM_PWR_STATE when powering off the memory Signed-off-by: Jacky Liao Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c index 9da66e491116..33985401f25c 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c @@ -133,7 +133,6 @@ static void dpp3_power_on_gamcor_lut( struct dpp *dpp_base, bool power_on) { - uint32_t power_status; struct dcn3_dpp *dpp = TO_DCN30_DPP(dpp_base); if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm) { @@ -143,12 +142,6 @@ static void dpp3_power_on_gamcor_lut( } else REG_SET(CM_MEM_PWR_CTRL, 0, GAMCOR_MEM_PWR_DIS, power_on == true ? 0:1); - - REG_GET(CM_MEM_PWR_STATUS, GAMCOR_MEM_PWR_STATE, &power_status); - if (power_status != 0) - BREAK_TO_DEBUGGER(); - - } void dpp3_program_cm_dealpha( -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 12/21] drm/amd/display: implement T12 compliance
From: Jun Lei [why] When OS reboots, and panel is turned off, T12 may not be maintained. T12 is defined as the interval between VDDC off (occurs at shutdown) and the next VDDC on (occurs when eDP is POST-ed) [how] DC already tracks panel power off time. Add a DC interface which DM can call during shutdown. Ideally this should be as late as possible during the shutdown sequence so the extra delay is minimal. Signed-off-by: Jun Lei Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 11 +++ drivers/gpu/drm/amd/display/dc/dc_link.h | 7 + .../display/dc/dce110/dce110_hw_sequencer.c | 31 +++ .../amd/display/dc/dcn10/dcn10_hw_sequencer.h | 2 ++ .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 1 + .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 + 6 files changed, 53 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index 59ef1eacc6e1..4f58a5c43548 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -203,6 +203,17 @@ static bool program_hpd_filter(const struct dc_link *link) return result; } +bool dc_link_wait_for_t12(struct dc_link *link) +{ + if (link->connector_signal == SIGNAL_TYPE_EDP && link->dc->hwss.edp_wait_for_T12) { + link->dc->hwss.edp_wait_for_T12(link); + + return true; + } + + return false; +} + /** * dc_link_detect_sink() - Determine if there is a sink connected * diff --git a/drivers/gpu/drm/amd/display/dc/dc_link.h b/drivers/gpu/drm/amd/display/dc/dc_link.h index d8d659b2bc34..d5d8f0ad9233 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_link.h +++ b/drivers/gpu/drm/amd/display/dc/dc_link.h @@ -259,6 +259,13 @@ enum dc_status dc_link_reallocate_mst_payload(struct dc_link *link); bool dc_link_handle_hpd_rx_irq(struct dc_link *dc_link, union hpd_irq_data *hpd_irq_dpcd_data, bool *out_link_loss); +/* + * On eDP links this function call will stall until T12 has elapsed. + * If the panel is not in power off state, this function will return + * immediately. + */ +bool dc_link_wait_for_t12(struct dc_link *link); + enum dc_status read_hpd_rx_irq_data( struct dc_link *link, union hpd_irq_data *irq_data); diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c index 4c230f1de9a3..3e9abb1b8e14 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c @@ -921,6 +921,37 @@ void dce110_edp_power_control( } } +void dce110_edp_wait_for_T12( + struct dc_link *link) +{ + struct dc_context *ctx = link->ctx; + + if (dal_graphics_object_id_get_connector_id(link->link_enc->connector) + != CONNECTOR_ID_EDP) { + BREAK_TO_DEBUGGER(); + return; + } + + if (!link->panel_cntl) + return; + + if (!link->panel_cntl->funcs->is_panel_powered_on(link->panel_cntl) && + link->link_trace.time_stamp.edp_poweroff != 0) { + unsigned int t12_duration = 500; // Default T12 as per spec + unsigned long long current_ts = dm_get_timestamp(ctx); + unsigned long long time_since_edp_poweroff_ms = + div64_u64(dm_get_elapse_time_in_ns( + ctx, + current_ts, + link->link_trace.time_stamp.edp_poweroff), 100); + + t12_duration += link->local_sink->edid_caps.panel_patch.extra_t12_ms; // Add extra T12 + + if (time_since_edp_poweroff_ms < t12_duration) + msleep(t12_duration - time_since_edp_poweroff_ms); + } +} + /*todo: cloned in stream enc, fix*/ /* * @brief diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h index e5691e499023..dee8ad1ebaa4 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h @@ -163,6 +163,8 @@ void dcn10_wait_for_mpcc_disconnect( void dce110_edp_backlight_control( struct dc_link *link, bool enable); +void dce110_edp_wait_for_T12( + struct dc_link *link); void dce110_edp_power_control( struct dc_link *link, bool power_up); diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c index 87c74aa84406..c4c14e9c1309 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c @@ -71,6 +71,7
[PATCH 13/21] drm/amd/display: fix seamless boot stream adding algorithm
From: Raymond Yang [Why] Seamless boot stream has hw resource assigned, already. 'add' is actually rebuild the assignment. [How] Swap seamless boot stream to pipe 0 (if needed) to ensure pipe_ctx matches Signed-off-by: Raymond Yang Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/dc/core/dc_resource.c | 28 +-- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index 07c22556480b..3e9ab047301e 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -2075,6 +2075,20 @@ static int acquire_resource_from_hw_enabled_state( return -1; } +static void mark_seamless_boot_stream( + const struct dc *dc, + struct dc_stream_state *stream) +{ + struct dc_bios *dcb = dc->ctx->dc_bios; + + /* TODO: Check Linux */ + if (dc->config.allow_seamless_boot_optimization && + !dcb->funcs->is_accelerated_mode(dcb)) { + if (dc_validate_seamless_boot_timing(dc, stream->sink, &stream->timing)) + stream->apply_seamless_boot_optimization = true; + } +} + enum dc_status resource_map_pool_resources( const struct dc *dc, struct dc_state *context, @@ -2085,22 +2099,20 @@ enum dc_status resource_map_pool_resources( struct dc_context *dc_ctx = dc->ctx; struct pipe_ctx *pipe_ctx = NULL; int pipe_idx = -1; - struct dc_bios *dcb = dc->ctx->dc_bios; calculate_phy_pix_clks(stream); - /* TODO: Check Linux */ - if (dc->config.allow_seamless_boot_optimization && - !dcb->funcs->is_accelerated_mode(dcb)) { - if (dc_validate_seamless_boot_timing(dc, stream->sink, &stream->timing)) - stream->apply_seamless_boot_optimization = true; - } + mark_seamless_boot_stream(dc, stream); - if (stream->apply_seamless_boot_optimization) + if (stream->apply_seamless_boot_optimization) { pipe_idx = acquire_resource_from_hw_enabled_state( &context->res_ctx, pool, stream); + if (pipe_idx < 0) + /* hw resource was assigned to other stream */ + stream->apply_seamless_boot_optimization = false; + } if (pipe_idx < 0) /* acquire new resources */ -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 11/21] drm/amd/display: Remove unused P010 debug flag
From: Mike Hsieh Signed-off-by: Mike Hsieh Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 38a962bc28f2..3737fb9802a4 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -484,7 +484,6 @@ struct dc_debug_options { bool performance_trace; bool az_endpoint_mute_only; bool always_use_regamma; - bool p010_mpo_support; bool recovery_enabled; bool avoid_vbios_exec_table; bool scl_reset_length10; -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 09/21] drm/amd/display: removed unnecessary check when dpp clock increasing
From: Chiawen Huang [Why] When switching single pipe to split pipe, the bandwidth check is just for first pipe. The 2nd pipe with abnormal(or zero) dpp clock when pipe ready and unlock leads the garbage on display. [How] Removed external increasing dpp clock check, the internal function already loops all of pipes to check whether update dpp clock. Signed-off-by: Chiawen Huang Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c index f2114bc910bf..ec9dc265cde0 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c @@ -257,8 +257,7 @@ void dcn2_update_clocks(struct clk_mgr *clk_mgr_base, if (update_dppclk || update_dispclk) dcn20_update_clocks_update_dentist(clk_mgr); // always update dtos unless clock is lowered and not safe to lower - if (new_clocks->dppclk_khz >= dc->current_state->bw_ctx.bw.dcn.clk.dppclk_khz) - dcn20_update_clocks_update_dpp_dto(clk_mgr, context, safe_to_lower); + dcn20_update_clocks_update_dpp_dto(clk_mgr, context, safe_to_lower); } } -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 10/21] drm/amd/display: doesn't reprogram AMD OUI
From: Yu-ting Shen [Why] 1. the corrected timing to write DPCD 300h AMD signature is before link training. 2. and VBIOS will writes correctted AMD signature by after AGESA 1.0.0, so driver doesn't need to write DPCD 300h again to switch config. 3. there are some OLED panel will clean backlight level to 0 once receive DPCD 300h, so we will see flicker issue at that time. [How] read DPCD 300h signature before write it to avoid reprogram again, if AMD signature was writed corrected by VBIOS, driver will not reprogram it again. Signed-off-by: Yu-ting Shen Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 37 +-- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 3 ++ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 3cd84dcb266b..b2d859f32d54 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c @@ -4407,24 +4407,39 @@ void dpcd_set_source_specific_data(struct dc_link *link) { if (!link->dc->vendor_signature.is_valid) { enum dc_status result_write_min_hblank = DC_NOT_SUPPORTED; - struct dpcd_amd_signature amd_signature; - amd_signature.AMD_IEEE_TxSignature_byte1 = 0x0; - amd_signature.AMD_IEEE_TxSignature_byte2 = 0x0; - amd_signature.AMD_IEEE_TxSignature_byte3 = 0x1A; - amd_signature.device_id_byte1 = + struct dpcd_amd_signature amd_signature = {0}; + struct dpcd_amd_device_id amd_device_id = {0}; + + amd_device_id.device_id_byte1 = (uint8_t)(link->ctx->asic_id.chip_id); - amd_signature.device_id_byte2 = + amd_device_id.device_id_byte2 = (uint8_t)(link->ctx->asic_id.chip_id >> 8); - memset(&amd_signature.zero, 0, 4); - amd_signature.dce_version = + amd_device_id.dce_version = (uint8_t)(link->ctx->dce_version); - amd_signature.dal_version_byte1 = 0x0; // needed? where to get? - amd_signature.dal_version_byte2 = 0x0; // needed? where to get? + amd_device_id.dal_version_byte1 = 0x0; // needed? where to get? + amd_device_id.dal_version_byte2 = 0x0; // needed? where to get? - core_link_write_dpcd(link, DP_SOURCE_OUI, + core_link_read_dpcd(link, DP_SOURCE_OUI, (uint8_t *)(&amd_signature), sizeof(amd_signature)); + if (!((amd_signature.AMD_IEEE_TxSignature_byte1 == 0x0) && + (amd_signature.AMD_IEEE_TxSignature_byte2 == 0x0) && + (amd_signature.AMD_IEEE_TxSignature_byte3 == 0x1A))) { + + amd_signature.AMD_IEEE_TxSignature_byte1 = 0x0; + amd_signature.AMD_IEEE_TxSignature_byte2 = 0x0; + amd_signature.AMD_IEEE_TxSignature_byte3 = 0x1A; + + core_link_write_dpcd(link, DP_SOURCE_OUI, + (uint8_t *)(&amd_signature), + sizeof(amd_signature)); + } + + core_link_write_dpcd(link, DP_SOURCE_OUI+0x03, + (uint8_t *)(&amd_device_id), + sizeof(amd_device_id)); + if (link->ctx->dce_version >= DCN_VERSION_2_0 && link->dc->caps.min_horizontal_blanking_period != 0) { diff --git a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h index 80a2191a3115..cc6fb838420e 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h +++ b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h @@ -451,6 +451,9 @@ struct dpcd_amd_signature { uint8_t AMD_IEEE_TxSignature_byte1; uint8_t AMD_IEEE_TxSignature_byte2; uint8_t AMD_IEEE_TxSignature_byte3; +}; + +struct dpcd_amd_device_id { uint8_t device_id_byte1; uint8_t device_id_byte2; uint8_t zero[4]; -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 08/21] drm/amd/display: New path for enabling DPG
From: Wesley Chalmers [WHY] We want to make enabling test pattern a part of the stream update code path. This change is the first step towards that goal. Signed-off-by: Wesley Chalmers Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc.c | 12 drivers/gpu/drm/amd/display/dc/dc_stream.h | 11 +++ 2 files changed, 23 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 8f1cadb823c7..7801b44cfaec 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -2265,6 +2265,9 @@ static void copy_stream_update_to_stream(struct dc *dc, if (update->dither_option) stream->dither_option = *update->dither_option; + + if (update->pending_test_pattern) + stream->test_pattern = *update->pending_test_pattern; /* update current stream with writeback info */ if (update->wb_update) { int i; @@ -2361,6 +2364,15 @@ static void commit_planes_do_stream_update(struct dc *dc, } } + if (stream_update->pending_test_pattern) { + dc_link_dp_set_test_pattern(stream->link, + stream->test_pattern.type, + stream->test_pattern.color_space, + stream->test_pattern.p_link_settings, + stream->test_pattern.p_custom_pattern, + stream->test_pattern.cust_pattern_size); + } + /* Full fe update*/ if (update_type == UPDATE_TYPE_FAST) continue; diff --git a/drivers/gpu/drm/amd/display/dc/dc_stream.h b/drivers/gpu/drm/amd/display/dc/dc_stream.h index b7910976b81a..80b67b860091 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_stream.h +++ b/drivers/gpu/drm/amd/display/dc/dc_stream.h @@ -130,6 +130,14 @@ union stream_update_flags { uint32_t raw; }; +struct test_pattern { + enum dp_test_pattern type; + enum dp_test_pattern_color_space color_space; + struct link_training_settings const *p_link_settings; + unsigned char const *p_custom_pattern; + unsigned int cust_pattern_size; +}; + struct dc_stream_state { // sink is deprecated, new code should not reference // this pointer @@ -227,6 +235,8 @@ struct dc_stream_state { uint32_t stream_id; bool is_dsc_enabled; + + struct test_pattern test_pattern; union stream_update_flags update_flags; }; @@ -261,6 +271,7 @@ struct dc_stream_update { struct dc_dsc_config *dsc_config; struct dc_transfer_func *func_shaper; struct dc_3dlut *lut3d_func; + struct test_pattern *pending_test_pattern; }; bool dc_is_stream_unchanged( -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 07/21] drm/amd/display: Unblank hubp based on plane visibility
From: Wesley Chalmers [WHY] DCN10 uses plane visibility to determine when to unblank HUBP; there is no reason DCN20+ should not do the same. [HOW] In addition to changing the check in HWSEQ, we must change is_pipe_tree_visible so that it checks ODM pipe topologies as well as MPC. Since we're now checking both ODM and MPC topologies, the helper function names have been changed to reference "parent" and "child" instead of "top" and "bottom". Signed-off-by: Wesley Chalmers Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/dc/basics/dc_common.c | 20 +-- .../gpu/drm/amd/display/dc/basics/dc_common.h | 4 ++-- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c| 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/basics/dc_common.c b/drivers/gpu/drm/amd/display/dc/basics/dc_common.c index b2fc4f8e6482..ad04ef98e652 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/dc_common.c +++ b/drivers/gpu/drm/amd/display/dc/basics/dc_common.c @@ -49,20 +49,24 @@ bool is_rgb_cspace(enum dc_color_space output_color_space) } } -bool is_lower_pipe_tree_visible(struct pipe_ctx *pipe_ctx) +bool is_child_pipe_tree_visible(struct pipe_ctx *pipe_ctx) { if (pipe_ctx->plane_state && pipe_ctx->plane_state->visible) return true; - if (pipe_ctx->bottom_pipe && is_lower_pipe_tree_visible(pipe_ctx->bottom_pipe)) + if (pipe_ctx->bottom_pipe && is_child_pipe_tree_visible(pipe_ctx->bottom_pipe)) + return true; + if (pipe_ctx->next_odm_pipe && is_child_pipe_tree_visible(pipe_ctx->next_odm_pipe)) return true; return false; } -bool is_upper_pipe_tree_visible(struct pipe_ctx *pipe_ctx) +bool is_parent_pipe_tree_visible(struct pipe_ctx *pipe_ctx) { if (pipe_ctx->plane_state && pipe_ctx->plane_state->visible) return true; - if (pipe_ctx->top_pipe && is_upper_pipe_tree_visible(pipe_ctx->top_pipe)) + if (pipe_ctx->top_pipe && is_parent_pipe_tree_visible(pipe_ctx->top_pipe)) + return true; + if (pipe_ctx->prev_odm_pipe && is_parent_pipe_tree_visible(pipe_ctx->prev_odm_pipe)) return true; return false; } @@ -71,9 +75,13 @@ bool is_pipe_tree_visible(struct pipe_ctx *pipe_ctx) { if (pipe_ctx->plane_state && pipe_ctx->plane_state->visible) return true; - if (pipe_ctx->top_pipe && is_upper_pipe_tree_visible(pipe_ctx->top_pipe)) + if (pipe_ctx->top_pipe && is_parent_pipe_tree_visible(pipe_ctx->top_pipe)) + return true; + if (pipe_ctx->bottom_pipe && is_child_pipe_tree_visible(pipe_ctx->bottom_pipe)) + return true; + if (pipe_ctx->prev_odm_pipe && is_parent_pipe_tree_visible(pipe_ctx->prev_odm_pipe)) return true; - if (pipe_ctx->bottom_pipe && is_lower_pipe_tree_visible(pipe_ctx->bottom_pipe)) + if (pipe_ctx->next_odm_pipe && is_child_pipe_tree_visible(pipe_ctx->next_odm_pipe)) return true; return false; } diff --git a/drivers/gpu/drm/amd/display/dc/basics/dc_common.h b/drivers/gpu/drm/amd/display/dc/basics/dc_common.h index 7c0cbf47e8ce..b061497480b8 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/dc_common.h +++ b/drivers/gpu/drm/amd/display/dc/basics/dc_common.h @@ -30,9 +30,9 @@ bool is_rgb_cspace(enum dc_color_space output_color_space); -bool is_lower_pipe_tree_visible(struct pipe_ctx *pipe_ctx); +bool is_child_pipe_tree_visible(struct pipe_ctx *pipe_ctx); -bool is_upper_pipe_tree_visible(struct pipe_ctx *pipe_ctx); +bool is_parent_pipe_tree_visible(struct pipe_ctx *pipe_ctx); bool is_pipe_tree_visible(struct pipe_ctx *pipe_ctx); diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c index cb822df21b7c..6470f5c7dfea 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c @@ -1570,7 +1570,7 @@ static void dcn20_update_dchubp_dpp( - if (pipe_ctx->update_flags.bits.enable) + if (is_pipe_tree_visible(pipe_ctx)) hubp->funcs->set_blank(hubp, false); } -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 05/21] drm/amd/display: HUBP_IN_BLANK for DCN30
From: Wesley Chalmers [WHY] Shift/mask for HUBP_IN_BLANK is currently missing. Signed-off-by: Wesley Chalmers Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h index 5fa150f34c60..705fbfc37502 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h @@ -62,6 +62,7 @@ HUBP_SF(HUBP0_DCHUBP_CNTL, HUBP_NO_OUTSTANDING_REQ, mask_sh),\ HUBP_SF(HUBP0_DCHUBP_CNTL, HUBP_VTG_SEL, mask_sh),\ HUBP_SF(HUBP0_DCHUBP_CNTL, HUBP_DISABLE, mask_sh),\ + HUBP_SF(HUBP0_DCHUBP_CNTL, HUBP_IN_BLANK, mask_sh),\ HUBP_SF(HUBP0_DCSURF_ADDR_CONFIG, NUM_PIPES, mask_sh),\ HUBP_SF(HUBP0_DCSURF_ADDR_CONFIG, PIPE_INTERLEAVE, mask_sh),\ HUBP_SF(HUBP0_DCSURF_ADDR_CONFIG, MAX_COMPRESSED_FRAGS, mask_sh),\ -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 06/21] drm/amd/display: Remove HUBP_DISABLE from default
From: Wesley Chalmers [WHY] HW team plans to rename HUBP_DISABLE to HUBP_SOFT_RESET in future HW revisions. Those future revisions should not inherit the HUBP_DISABLE name. Signed-off-by: Wesley Chalmers Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 2 +- .../gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 22 ++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h index a9a6ed7f4f99..80794fed6e20 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h @@ -450,7 +450,6 @@ #define DCN_HUBP_REG_FIELD_BASE_LIST(type) \ type HUBP_BLANK_EN;\ - type HUBP_DISABLE;\ type HUBP_TTU_DISABLE;\ type HUBP_NO_OUTSTANDING_REQ;\ type HUBP_VTG_SEL;\ @@ -644,6 +643,7 @@ #define DCN_HUBP_REG_FIELD_LIST(type) \ DCN_HUBP_REG_FIELD_BASE_LIST(type);\ + type HUBP_DISABLE;\ type ALPHA_PLANE_EN struct dcn_mi_registers { diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h index f501c02c244b..98ec1f9171b6 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h @@ -161,7 +161,7 @@ DCN21_HUBP_REG_COMMON_VARIABLE_LIST;\ uint32_t DCN_DMDATA_VM_CNTL -#define DCN2_HUBP_REG_FIELD_VARIABLE_LIST(type) \ +#define DCN2_HUBP_REG_FIELD_VARIABLE_LIST_COMMON(type) \ DCN_HUBP_REG_FIELD_BASE_LIST(type); \ type DMDATA_ADDRESS_HIGH;\ type DMDATA_MODE;\ @@ -186,8 +186,12 @@ type SURFACE_TRIPLE_BUFFER_ENABLE;\ type VMID -#define DCN21_HUBP_REG_FIELD_VARIABLE_LIST(type) \ - DCN2_HUBP_REG_FIELD_VARIABLE_LIST(type);\ +#define DCN2_HUBP_REG_FIELD_VARIABLE_LIST(type) \ + DCN2_HUBP_REG_FIELD_VARIABLE_LIST_COMMON(type); \ + type HUBP_DISABLE + +#define DCN21_HUBP_REG_FIELD_VARIABLE_LIST_COMMON(type) \ + DCN2_HUBP_REG_FIELD_VARIABLE_LIST_COMMON(type);\ type REFCYC_PER_VM_GROUP_FLIP;\ type REFCYC_PER_VM_REQ_FLIP;\ type REFCYC_PER_VM_GROUP_VBLANK;\ @@ -196,8 +200,12 @@ type REFCYC_PER_META_CHUNK_FLIP_C; \ type VM_GROUP_SIZE -#define DCN30_HUBP_REG_FIELD_VARIABLE_LIST(type) \ - DCN21_HUBP_REG_FIELD_VARIABLE_LIST(type);\ +#define DCN21_HUBP_REG_FIELD_VARIABLE_LIST(type) \ + DCN21_HUBP_REG_FIELD_VARIABLE_LIST_COMMON(type);\ + type HUBP_DISABLE + +#define DCN30_HUBP_REG_FIELD_VARIABLE_LIST_COMMON(type) \ + DCN21_HUBP_REG_FIELD_VARIABLE_LIST_COMMON(type);\ type PRIMARY_SURFACE_DCC_IND_BLK;\ type SECONDARY_SURFACE_DCC_IND_BLK;\ type PRIMARY_SURFACE_DCC_IND_BLK_C;\ @@ -216,6 +224,10 @@ type ROW_TTU_MODE; \ type NUM_PKRS +#define DCN30_HUBP_REG_FIELD_VARIABLE_LIST(type) \ + DCN30_HUBP_REG_FIELD_VARIABLE_LIST_COMMON(type);\ + type HUBP_DISABLE + struct dcn_hubp2_registers { DCN30_HUBP_REG_COMMON_VARIABLE_LIST; }; -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 04/21] drm/amd/display: Separate fec debug flag and monitor patch
From: Lewis Huang [Why] Driver apply the monitor patch into global debug flag. When apply monitor patch, fec feature will always disable. [How] Separate fec debug flag and monitor patch Signed-off-by: Lewis Huang Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 20 +++ .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc_link.h | 1 + 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index f4a2088ab179..59ef1eacc6e1 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -1065,9 +1065,6 @@ static bool dc_link_detect_helper(struct dc_link *link, break; } - if (link->local_sink->edid_caps.panel_patch.disable_fec) - link->ctx->dc->debug.disable_fec = true; - // Check if edid is the same if ((prev_sink) && (edid_status == EDID_THE_SAME || edid_status == EDID_OK)) @@ -3635,7 +3632,7 @@ uint32_t dc_link_bandwidth_kbps( link_bw_kbps *= 8; /* 8 bits per byte*/ link_bw_kbps *= link_setting->lane_count; - if (dc_link_is_fec_supported(link) && !link->dc->debug.disable_fec) { + if (dc_link_should_enable_fec(link)) { /* Account for FEC overhead. * We have to do it based on caps, * and not based on FEC being set ready, @@ -3687,3 +3684,18 @@ bool dc_link_is_fec_supported(const struct dc_link *link) !IS_FPGA_MAXIMUS_DC(link->ctx->dce_environment)); } +bool dc_link_should_enable_fec(const struct dc_link *link) +{ + bool is_fec_disable = false; + bool ret = false; + + if (link->connector_signal != SIGNAL_TYPE_DISPLAY_PORT_MST && + link->local_sink && + link->local_sink->edid_caps.panel_patch.disable_fec) + is_fec_disable = true; + + if (dc_link_is_fec_supported(link) && !link->dc->debug.disable_fec && !is_fec_disable) + ret = true; + + return ret; +} diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 1bd1a0935290..3cd84dcb266b 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c @@ -4345,7 +4345,7 @@ void dp_set_fec_ready(struct dc_link *link, bool ready) struct link_encoder *link_enc = link->link_enc; uint8_t fec_config = 0; - if (!dc_link_is_fec_supported(link) || link->dc->debug.disable_fec) + if (!dc_link_should_enable_fec(link)) return; if (link_enc->funcs->fec_set_ready && @@ -4380,7 +4380,7 @@ void dp_set_fec_enable(struct dc_link *link, bool enable) { struct link_encoder *link_enc = link->link_enc; - if (!dc_link_is_fec_supported(link) || link->dc->debug.disable_fec) + if (!dc_link_should_enable_fec(link)) return; if (link_enc->funcs->fec_set_enable && diff --git a/drivers/gpu/drm/amd/display/dc/dc_link.h b/drivers/gpu/drm/amd/display/dc/dc_link.h index 6d9a60c9dcc0..d8d659b2bc34 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_link.h +++ b/drivers/gpu/drm/amd/display/dc/dc_link.h @@ -369,5 +369,6 @@ uint32_t dc_bandwidth_in_kbps_from_timing( const struct dc_crtc_timing *timing); bool dc_link_is_fec_supported(const struct dc_link *link); +bool dc_link_should_enable_fec(const struct dc_link *link); #endif /* DC_LINK_H_ */ -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 02/21] drm/amd/display: NULL pointer hang
From: Qingqing Zhuo [Why] In dc_link_dp_set_test_pattern, we assume all pipes have a stream, which can cause null pointer dereference. [How] Add a null pointer check before accessing stream. Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 2fc12239b22c..1bd1a0935290 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c @@ -3992,7 +3992,7 @@ bool dc_link_dp_set_test_pattern( unsigned int cust_pattern_size) { struct pipe_ctx *pipes = link->dc->current_state->res_ctx.pipe_ctx; - struct pipe_ctx *pipe_ctx = &pipes[0]; + struct pipe_ctx *pipe_ctx = NULL; unsigned int lane; unsigned int i; unsigned char link_qual_pattern[LANE_COUNT_DP_MAX] = {0}; @@ -4002,12 +4002,18 @@ bool dc_link_dp_set_test_pattern( memset(&training_pattern, 0, sizeof(training_pattern)); for (i = 0; i < MAX_PIPES; i++) { + if (pipes[i].stream == NULL) + continue; + if (pipes[i].stream->link == link && !pipes[i].top_pipe && !pipes[i].prev_odm_pipe) { pipe_ctx = &pipes[i]; break; } } + if (pipe_ctx == NULL) + return false; + /* Reset CRTC Test Pattern if it is currently running and request is VideoMode */ if (link->test_pattern_enabled && test_pattern == DP_TEST_PATTERN_VIDEO_MODE) { -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 01/21] drm/amd/display: 3.2.117
From: Aric Cyr Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 90fdddb72e3b..38a962bc28f2 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -42,7 +42,7 @@ #include "inc/hw/dmcu.h" #include "dml/display_mode_lib.h" -#define DC_VER "3.2.116" +#define DC_VER "3.2.117" #define MAX_SURFACES 3 #define MAX_PLANES 6 -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 00/21] DC Patches January 08, 2021
Happy new year, this is the first code promotion of the year; for this reason, most of the changes are related to fixes. This DC patchset brings improvements in multiple areas. In summary, we have: * Multiple fixes and code refactoring. * Updates on HUBP operations Best Regards Aric Cyr (2): drm/amd/display: 3.2.117 drm/amd/display: 3.2.118 Bhawanpreet Lakha (1): drm/amd/display: enable HUBP blank behaviour Charlene Liu (1): drm/amd/display: change SMU repsonse timeout to 2s Chiawen Huang (1): drm/amd/display: removed unnecessary check when dpp clock increasing Jacky Liao (1): drm/amd/display: Fix assert being hit with GAMCOR memory shut down Jun Lei (1): drm/amd/display: implement T12 compliance Lewis Huang (1): drm/amd/display: Separate fec debug flag and monitor patch Li, Roman (1): drm/amd/display: disable dcn10 pipe split by default Mike Hsieh (1): drm/amd/display: Remove unused P010 debug flag Nikola Cornij (1): drm/amd/display: Add a missing DCN3.01 API mapping Qingqing Zhuo (1): drm/amd/display: NULL pointer hang Raymond Yang (1): drm/amd/display: fix seamless boot stream adding algorithm Stylon Wang (1): drm/amd/display: Revert patch causing black screen Wesley Chalmers (6): drm/amd/display: Initialize stack variable drm/amd/display: HUBP_IN_BLANK for DCN30 drm/amd/display: Remove HUBP_DISABLE from default drm/amd/display: Unblank hubp based on plane visibility drm/amd/display: New path for enabling DPG drm/amd/display: New sequence for HUBP blank Yu-ting Shen (1): drm/amd/display: doesn't reprogram AMD OUI .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - .../gpu/drm/amd/display/dc/basics/dc_common.c | 20 -- .../gpu/drm/amd/display/dc/basics/dc_common.h | 4 +- .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 3 +- .../display/dc/clk_mgr/dcn301/dcn301_smu.c| 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 12 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 31 ++-- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 49 + .../gpu/drm/amd/display/dc/core/dc_resource.c | 28 +--- drivers/gpu/drm/amd/display/dc/dc.h | 3 +- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 3 + drivers/gpu/drm/amd/display/dc/dc_link.h | 8 +++ drivers/gpu/drm/amd/display/dc/dc_stream.h| 11 +++ .../display/dc/dce110/dce110_hw_sequencer.c | 31 .../gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 2 +- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 36 -- .../amd/display/dc/dcn10/dcn10_hw_sequencer.h | 5 ++ .../gpu/drm/amd/display/dc/dcn10/dcn10_init.c | 1 + .../gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 11 +++ .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 1 + .../drm/amd/display/dc/dcn10/dcn10_resource.c | 4 +- .../gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 22 -- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c| 12 +++- .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 1 + .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 1 + .../drm/amd/display/dc/dcn30/dcn30_dpp_cm.c | 7 -- .../gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h | 1 + .../drm/amd/display/dc/dcn30/dcn30_hwseq.c| 70 ++- .../drm/amd/display/dc/dcn30/dcn30_hwseq.h| 4 ++ .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 2 + .../gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 1 + .../drm/amd/display/dc/dcn301/dcn301_init.c | 1 + .../amd/display/dc/dcn301/dcn301_resource.c | 1 + .../dc/dml/dcn30/display_mode_vba_30.c| 2 +- .../gpu/drm/amd/display/dc/inc/core_types.h | 1 + .../amd/display/dc/inc/hw/timing_generator.h | 1 + .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 5 ++ 38 files changed, 332 insertions(+), 68 deletions(-) -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 03/21] drm/amd/display: Initialize stack variable
From: Wesley Chalmers [WHY] The stack variable "val" is potentially unpopulate it, so initialize it with the value 0xf (indicating an invalid mux) Signed-off-by: Wesley Chalmers Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c index a46cb20596fe..b096011acb49 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c @@ -470,7 +470,7 @@ void mpc1_cursor_lock(struct mpc *mpc, int opp_id, bool lock) unsigned int mpc1_get_mpc_out_mux(struct mpc *mpc, int opp_id) { struct dcn10_mpc *mpc10 = TO_DCN10_MPC(mpc); - uint32_t val; + uint32_t val = 0xf; if (opp_id < MAX_OPP && REG(MUX[opp_id])) REG_GET(MUX[opp_id], MPC_OUT_MUX, &val); -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] MAINTAINERS: update radeon/amdgpu/amdkfd git trees
On Fri, Jan 8, 2021 at 3:52 PM Abramov, Slava wrote: > > [AMD Official Use Only - Internal Distribution Only] > > > Why not just https://gitlab.freedesktop.org/agd5f/linux ? I guess that works too. Alex > > From: amd-gfx on behalf of Alex > Deucher > Sent: Friday, January 8, 2021 2:30 PM > To: amd-gfx list ; Maling list - DRI > developers ; Dave Airlie > ; Daniel Vetter > Cc: Deucher, Alexander > Subject: Re: [PATCH] MAINTAINERS: update radeon/amdgpu/amdkfd git trees > > On Tue, Jan 5, 2021 at 3:15 PM Alex Deucher wrote: > > > > FDO is out of space, so move to gitlab. > > > > Signed-off-by: Alex Deucher > > Ping? Any objections? > > Alex > > > --- > > MAINTAINERS | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index eb18459c1d16..e2877be6b10d 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -907,7 +907,7 @@ AMD KFD > > M: Felix Kuehling > > L: amd-gfx@lists.freedesktop.org > > S: Supported > > -T: git git://people.freedesktop.org/~agd5f/linux > > +T: git > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fagd5f%2Flinux.git&data=04%7C01%7Cslava.abramov%40amd.com%7Cb4e8adc5393c4b052d6908d8b40bd5db%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637457310677496846%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=xK4Oo8juN%2FoF1jVnLclPtt9MKLzRQ3GPiercdH9ogFE%3D&reserved=0 > > F: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd*.[ch] > > F: drivers/gpu/drm/amd/amdkfd/ > > F: drivers/gpu/drm/amd/include/cik_structs.h > > @@ -14596,7 +14596,7 @@ M: Alex Deucher > > M: Christian König > > L: amd-gfx@lists.freedesktop.org > > S: Supported > > -T: git git://people.freedesktop.org/~agd5f/linux > > +T: git > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fagd5f%2Flinux.git&data=04%7C01%7Cslava.abramov%40amd.com%7Cb4e8adc5393c4b052d6908d8b40bd5db%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637457310677506842%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=ANez%2BLHaergD6Lae8arcJDyibaf5yPgRyrBfzBpd3vY%3D&reserved=0 > > F: drivers/gpu/drm/amd/ > > F: drivers/gpu/drm/radeon/ > > F: include/uapi/drm/amdgpu_drm.h > > -- > > 2.29.2 > > > ___ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cslava.abramov%40amd.com%7Cb4e8adc5393c4b052d6908d8b40bd5db%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637457310677506842%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=gyiwTSaZfiAQpII%2BJUprm5wINz5QEWdQYnm05WoDbD0%3D&reserved=0 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 40/40] drm/amd/display/dc/gpio/hw_factory: Delete unused function 'dal_hw_factory_destroy'
On Fri, Jan 8, 2021 at 3:16 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/hw_factory.c:123:6: warning: > no previous prototype for ‘dal_hw_factory_destroy’ [-Wmissing-prototypes] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 14 -- > 1 file changed, 14 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c > b/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c > index da73bfb3cacd0..92c65d2fa7d71 100644 > --- a/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c > +++ b/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c > @@ -119,17 +119,3 @@ bool dal_hw_factory_init( > return false; > } > } > - > -void dal_hw_factory_destroy( > - struct dc_context *ctx, > - struct hw_factory **factory) > -{ > - if (!factory || !*factory) { > - BREAK_TO_DEBUGGER(); > - return; > - } > - > - kfree(*factory); > - > - *factory = NULL; > -} > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 39/40] drm/amd/display/dc/dce/dmub_psr: Demote non-conformant kernel-doc headers
On Fri, Jan 8, 2021 at 3:16 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:38: warning: > Function parameter or member 'raw_state' not described in 'convert_psr_state' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:81: warning: > Function parameter or member 'dmub' not described in 'dmub_psr_get_state' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:81: warning: > Function parameter or member 'state' not described in 'dmub_psr_get_state' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:97: warning: > Function parameter or member 'dmub' not described in 'dmub_psr_set_version' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:97: warning: > Function parameter or member 'stream' not described in 'dmub_psr_set_version' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:128: warning: > Function parameter or member 'dmub' not described in 'dmub_psr_enable' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:128: warning: > Function parameter or member 'enable' not described in 'dmub_psr_enable' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:128: warning: > Function parameter or member 'wait' not described in 'dmub_psr_enable' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:177: warning: > Function parameter or member 'dmub' not described in 'dmub_psr_set_level' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:177: warning: > Function parameter or member 'psr_level' not described in 'dmub_psr_set_level' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:203: warning: > Function parameter or member 'dmub' not described in 'dmub_psr_copy_settings' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:203: warning: > Function parameter or member 'link' not described in 'dmub_psr_copy_settings' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:203: warning: > Function parameter or member 'psr_context' not described in > 'dmub_psr_copy_settings' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:284: warning: > Function parameter or member 'dmub' not described in 'dmub_psr_force_static' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:301: warning: > Function parameter or member 'dmub' not described in 'dmub_psr_get_residency' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:301: warning: > Function parameter or member 'residency' not described in > 'dmub_psr_get_residency' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:323: warning: > Function parameter or member 'psr' not described in 'dmub_psr_construct' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:323: warning: > Function parameter or member 'ctx' not described in 'dmub_psr_construct' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:332: warning: > Function parameter or member 'ctx' not described in 'dmub_psr_create' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:349: warning: > Function parameter or member 'dmub' not described in 'dmub_psr_destroy' > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Wyatt Wood > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 22 +-- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c > b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c > index 17e84f34ceba1..4228caa741193 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c > @@ -31,7 +31,7 @@ > > #define MAX_PIPES 6 > > -/** > +/* > * Convert dmcub psr state to dmcu psr state. > */ > static enum dc_psr_state convert_psr_state(uint32_t raw_state) > @@ -74,7 +74,7 @@ static enum dc_psr_state convert_psr_state(uint32_t > raw_state) > return state; > } > > -/** > +/* > * Get PSR state from firmware. > */ > static void dmub_psr_get_state(struct dmub_psr *dmub, enum dc_psr_state > *state) > @@ -90,7 +90,7 @@ static void dmub_psr_get_state(struct dmub_psr *dmub, enum > dc_psr_state *state) > *state = convert_psr_state(raw_state); > } > > -/** > +/* > * Set PSR version. > */ > static bool dmub_psr_set_version(struct dmub_psr *dmub, struct > dc_stream_state *stream) > @@ -121,7 +121,7 @@ static bool dmub_psr_set_version(struct dmub_psr *dmub, > struct dc_stream_state * > return true; > } > > -/** > +/* > * Enable/Disable PSR. > */ > static void dmub_psr_enable(struct dmub_psr *dmub, bool enable, bool wait) > @@ -170,7 +170,7 @@ static void dmub_psr_enable(struct dmub_psr *dmub, bool > enable, bool wait) > } > } > > -/** > +/* > * Set PSR level. > */ > static void dmub_psr_set_leve
Re: [PATCH 38/40] drm/amd/display/dc/dce/dce_panel_cntl: Remove unused variables 'bl_pwm_cntl' and 'pwm_period_cntl'
On Fri, Jan 8, 2021 at 3:16 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c: In function > ‘dce_get_16_bit_backlight_from_pwm’: > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:54:11: > warning: variable ‘bl_pwm_cntl’ set but not used [-Wunused-but-set-variable] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:53:11: > warning: variable ‘pwm_period_cntl’ set but not used > [-Wunused-but-set-variable] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Anthony Koo > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c > index 761fdfc1f5bd0..e923392358631 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c > @@ -50,16 +50,16 @@ static unsigned int > dce_get_16_bit_backlight_from_pwm(struct panel_cntl *panel_c > { > uint64_t current_backlight; > uint32_t round_result; > - uint32_t pwm_period_cntl, bl_period, bl_int_count; > - uint32_t bl_pwm_cntl, bl_pwm, fractional_duty_cycle_en; > + uint32_t bl_period, bl_int_count; > + uint32_t bl_pwm, fractional_duty_cycle_en; > uint32_t bl_period_mask, bl_pwm_mask; > struct dce_panel_cntl *dce_panel_cntl = TO_DCE_PANEL_CNTL(panel_cntl); > > - pwm_period_cntl = REG_READ(BL_PWM_PERIOD_CNTL); > + REG_READ(BL_PWM_PERIOD_CNTL); > REG_GET(BL_PWM_PERIOD_CNTL, BL_PWM_PERIOD, &bl_period); > REG_GET(BL_PWM_PERIOD_CNTL, BL_PWM_PERIOD_BITCNT, &bl_int_count); > > - bl_pwm_cntl = REG_READ(BL_PWM_CNTL); > + REG_READ(BL_PWM_CNTL); > REG_GET(BL_PWM_CNTL, BL_ACTIVE_INT_FRAC_CNT, (uint32_t *)(&bl_pwm)); > REG_GET(BL_PWM_CNTL, BL_PWM_FRACTIONAL_EN, &fractional_duty_cycle_en); > > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 37/40] drm/amd/display/dc/dce/dce_i2c_sw: Make a bunch of local functions static
On Fri, Jan 8, 2021 at 3:16 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_i2c_sw.c:342:6: warning: no > previous prototype for ‘dce_i2c_sw_engine_set_speed’ [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_i2c_sw.c:356:6: warning: no > previous prototype for ‘dce_i2c_sw_engine_acquire_engine’ > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_i2c_sw.c:400:6: warning: no > previous prototype for ‘dce_i2c_sw_engine_submit_channel_request’ > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_i2c_sw.c:443:6: warning: no > previous prototype for ‘dce_i2c_sw_engine_submit_payload’ > [-Wmissing-prototypes] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c > index 87d8428df6c46..6846afd83701b 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c > @@ -339,7 +339,7 @@ static bool start_sync_sw( > return false; > } > > -void dce_i2c_sw_engine_set_speed( > +static void dce_i2c_sw_engine_set_speed( > struct dce_i2c_sw *engine, > uint32_t speed) > { > @@ -353,7 +353,7 @@ void dce_i2c_sw_engine_set_speed( > engine->clock_delay = 12; > } > > -bool dce_i2c_sw_engine_acquire_engine( > +static bool dce_i2c_sw_engine_acquire_engine( > struct dce_i2c_sw *engine, > struct ddc *ddc) > { > @@ -397,7 +397,7 @@ bool dce_i2c_engine_acquire_sw( > > > > -void dce_i2c_sw_engine_submit_channel_request( > +static void dce_i2c_sw_engine_submit_channel_request( > struct dce_i2c_sw *engine, > struct i2c_request_transaction_data *req) > { > @@ -440,7 +440,8 @@ void dce_i2c_sw_engine_submit_channel_request( > I2C_CHANNEL_OPERATION_SUCCEEDED : > I2C_CHANNEL_OPERATION_FAILED; > } > -bool dce_i2c_sw_engine_submit_payload( > + > +static bool dce_i2c_sw_engine_submit_payload( > struct dce_i2c_sw *engine, > struct i2c_payload *payload, > bool middle_of_transaction) > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 36/40] drm/amd/display/dc/dce/dce_i2c_hw: Make functions called by reference static
On Fri, Jan 8, 2021 at 3:16 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_i2c_hw.c:438:35: warning: > no previous prototype for ‘dce_i2c_hw_engine_wait_on_operation_result’ > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_i2c_hw.c:505:6: warning: no > previous prototype for ‘dce_i2c_hw_engine_submit_payload’ > [-Wmissing-prototypes] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Lewis Huang > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c > index 7fbd92fbc63a9..a524f471e0d75 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c > @@ -435,7 +435,7 @@ struct dce_i2c_hw *acquire_i2c_hw_engine( > return dce_i2c_hw; > } > > -enum i2c_channel_operation_result dce_i2c_hw_engine_wait_on_operation_result( > +static enum i2c_channel_operation_result > dce_i2c_hw_engine_wait_on_operation_result( > struct dce_i2c_hw *dce_i2c_hw, > uint32_t timeout, > enum i2c_channel_operation_result expected_result) > @@ -502,7 +502,7 @@ static uint32_t get_transaction_timeout_hw( > return period_timeout * num_of_clock_stretches; > } > > -bool dce_i2c_hw_engine_submit_payload( > +static bool dce_i2c_hw_engine_submit_payload( > struct dce_i2c_hw *dce_i2c_hw, > struct i2c_payload *payload, > bool middle_of_transaction, > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 35/40] drm/amd/display/dc/bios/command_table: Remove unused variable and associated comment
On Fri, Jan 8, 2021 at 3:16 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table.c: In function > ‘adjust_display_pll_v2’: > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table.c:1462:11: > warning: unused variable ‘pixel_clock_10KHz_in’ [-Wunused-variable] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Lee Jones > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones See my comment on the other patch for this function. Alex > --- > drivers/gpu/drm/amd/display/dc/bios/command_table.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.c > b/drivers/gpu/drm/amd/display/dc/bios/command_table.c > index dd893a1176979..66fe1d1810789 100644 > --- a/drivers/gpu/drm/amd/display/dc/bios/command_table.c > +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.c > @@ -1457,10 +1457,6 @@ static enum bp_result adjust_display_pll_v2( > { > enum bp_result result = BP_RESULT_FAILURE; > > - /* We need to convert from KHz units into 10KHz units and then convert > -* output pixel clock back 10KHz-->KHz */ > - uint32_t pixel_clock_10KHz_in = bp_params->pixel_clock / 10; > - > bp->cmd_helper->encoder_id_to_atom( > > dal_graphics_object_id_get_encoder_id(bp_params->encoder_object_id)); > bp->cmd_helper->encoder_mode_bp_to_atom(bp_params->signal_type, > false); > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 34/40] drm/amd/display/dc/bios/bios_parser: Fix misspelling of function parameter
On Fri, Jan 8, 2021 at 3:16 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: > Function parameter or member 'ss_info' not described in 'get_ss_info_from_tbl' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: > Excess function parameter 'ssinfo' description in 'get_ss_info_from_tbl' > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Lee Jones > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c > b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c > index d2654c50b0b20..c67d21a5ee52f 100644 > --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c > +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c > @@ -987,8 +987,8 @@ static enum bp_result > get_ss_info_from_internal_ss_info_tbl_V2_1( > * > * @bp: pointer to the BIOS parser > * @id: spread sprectrum info index > - * @ssinfo: sprectrum information structure, > - * return:: BIOS parser result code > + * @ss_info: sprectrum information structure, > + * return: BIOS parser result code > */ > static enum bp_result get_ss_info_from_tbl( > struct bios_parser *bp, > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 32/40] drm/amd/display/dc/dce/dce_aux: Remove unused function 'get_engine_type'
On Fri, Jan 8, 2021 at 3:16 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:391:25: warning: no > previous prototype for ‘get_engine_type’ [-Wmissing-prototypes] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c > index cda5fd0464bc5..3204292a5aeae 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c > @@ -388,12 +388,6 @@ static enum aux_channel_operation_result > get_channel_status( > } > } > > -enum i2caux_engine_type get_engine_type( > - const struct dce_aux *engine) > -{ > - return I2CAUX_ENGINE_TYPE_AUX; > -} > - > static bool acquire( > struct dce_aux *engine, > struct ddc *ddc) > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 31/40] drm/amd/display/dc/dce/dce_opp: Make local functions and ones invoked by reference static
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_opp.c:427:6: warning: no > previous prototype for ‘dce60_opp_set_clamping’ [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_opp.c:548:6: warning: no > previous prototype for ‘dce60_opp_program_bit_depth_reduction’ > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_opp.c:571:6: warning: no > previous prototype for ‘dce60_opp_program_clamping_and_pixel_encoding’ > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_opp.c:681:6: warning: no > previous prototype for ‘dce60_opp_program_fmt’ [-Wmissing-prototypes] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Mauro Rossi > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c > index e459ae65aaf76..2bf8f5a2e0c22 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c > @@ -424,7 +424,7 @@ void dce110_opp_set_clamping( > * 7 for programable > * 2) Enable clamp if Limited range requested > */ > -void dce60_opp_set_clamping( > +static void dce60_opp_set_clamping( > struct dce110_opp *opp110, > const struct clamping_and_pixel_encoding_params *params) > { > @@ -545,7 +545,7 @@ void dce110_opp_program_bit_depth_reduction( > } > > #if defined(CONFIG_DRM_AMD_DC_SI) > -void dce60_opp_program_bit_depth_reduction( > +static void dce60_opp_program_bit_depth_reduction( > struct output_pixel_processor *opp, > const struct bit_depth_reduction_params *params) > { > @@ -568,7 +568,7 @@ void dce110_opp_program_clamping_and_pixel_encoding( > } > > #if defined(CONFIG_DRM_AMD_DC_SI) > -void dce60_opp_program_clamping_and_pixel_encoding( > +static void dce60_opp_program_clamping_and_pixel_encoding( > struct output_pixel_processor *opp, > const struct clamping_and_pixel_encoding_params *params) > { > @@ -678,7 +678,7 @@ void dce110_opp_program_fmt( > } > > #if defined(CONFIG_DRM_AMD_DC_SI) > -void dce60_opp_program_fmt( > +static void dce60_opp_program_fmt( > struct output_pixel_processor *opp, > struct bit_depth_reduction_params *fmt_bit_depth, > struct clamping_and_pixel_encoding_params *clamping) > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 30/40] drm/amd/display/dc/dce/dce_dmcu: Move 'abm_gain_stepsize' to only source file it's used in
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > And only declare it if it's to be used. > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: > ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: > ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: > ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: > ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: > ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: > ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: > ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Mauro Rossi > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 4 > drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 2 -- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c > index fa2b47d41ee2f..30264fc151a2b 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c > @@ -65,6 +65,10 @@ > //Register access policy version > #define mmMP0_SMN_C2PMSG_910x1609B > > +#if defined(CONFIG_DRM_AMD_DC_DCN) > +static const uint32_t abm_gain_stepsize = 0x0060; > +#endif > + > static bool dce_dmcu_init(struct dmcu *dmcu) > { > // Do nothing > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h > b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h > index 93e7f34d4775e..cefb7f5bf42cc 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h > @@ -317,6 +317,4 @@ struct dmcu *dcn21_dmcu_create( > > void dce_dmcu_destroy(struct dmcu **dmcu); > > -static const uint32_t abm_gain_stepsize = 0x0060; > - > #endif /* _DCE_ABM_H_ */ > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 29/40] drm/amd/display/dc/dce/dce_dmcu: Staticify local function call 'dce_dmcu_load_iram'
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.c:74:6: warning: no > previous prototype for ‘dce_dmcu_load_iram’ [-Wmissing-prototypes] > In file included from > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.c:31: > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Krunoslav Kovac > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c > index f3ed8b619cafd..fa2b47d41ee2f 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c > @@ -71,7 +71,7 @@ static bool dce_dmcu_init(struct dmcu *dmcu) > return true; > } > > -bool dce_dmcu_load_iram(struct dmcu *dmcu, > +static bool dce_dmcu_load_iram(struct dmcu *dmcu, > unsigned int start_offset, > const char *src, > unsigned int bytes) > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 28/40] drm/amd/display/dc/dce/dce_transform: Remove 3 unused/legacy variables
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c: In function > ‘dce60_transform_set_scaler’: > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c:496:7: warning: > variable ‘filter_updated’ set but not used [-Wunused-but-set-variable] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c: In function > ‘dce60_transform_set_pixel_storage_depth’: > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c:1040:19: > warning: variable ‘expan_mode’ set but not used [-Wunused-but-set-variable] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c:1040:6: > warning: variable ‘pixel_depth’ set but not used [-Wunused-but-set-variable] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Mauro Rossi > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 13 - > 1 file changed, 13 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c > index 130a0a0c83329..6121bb7b009b8 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c > @@ -493,7 +493,6 @@ static void dce60_transform_set_scaler( > { > struct dce_transform *xfm_dce = TO_DCE_TRANSFORM(xfm); > bool is_scaling_required; > - bool filter_updated = false; > const uint16_t *coeffs_v, *coeffs_h; > > /*Use whole line buffer memory always*/ > @@ -558,7 +557,6 @@ static void dce60_transform_set_scaler( > > xfm_dce->filter_v = coeffs_v; > xfm_dce->filter_h = coeffs_h; > - filter_updated = true; > } > } > > @@ -1037,34 +1035,23 @@ static void dce60_transform_set_pixel_storage_depth( > const struct bit_depth_reduction_params *bit_depth_params) > { > struct dce_transform *xfm_dce = TO_DCE_TRANSFORM(xfm); > - int pixel_depth, expan_mode; > enum dc_color_depth color_depth; > > switch (depth) { > case LB_PIXEL_DEPTH_18BPP: > color_depth = COLOR_DEPTH_666; > - pixel_depth = 2; > - expan_mode = 1; > break; > case LB_PIXEL_DEPTH_24BPP: > color_depth = COLOR_DEPTH_888; > - pixel_depth = 1; > - expan_mode = 1; > break; > case LB_PIXEL_DEPTH_30BPP: > color_depth = COLOR_DEPTH_101010; > - pixel_depth = 0; > - expan_mode = 1; > break; > case LB_PIXEL_DEPTH_36BPP: > color_depth = COLOR_DEPTH_121212; > - pixel_depth = 3; > - expan_mode = 0; > break; > default: > color_depth = COLOR_DEPTH_101010; > - pixel_depth = 0; > - expan_mode = 1; > BREAK_TO_DEBUGGER(); > break; > } > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 27/40] drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Fix worthy function headers, demote barely documented one
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1556: > warning: Function parameter or member 'acg_freq' not described in > 'vega10_populate_single_gfx_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1621: > warning: Function parameter or member 'current_soc_did' not described in > 'vega10_populate_single_soc_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1621: > warning: Function parameter or member 'current_vol_index' not described in > 'vega10_populate_single_soc_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1621: > warning: Excess function parameter 'current_socclk_level' description in > 'vega10_populate_single_soc_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1757: > warning: Function parameter or member 'current_mem_vid' not described in > 'vega10_populate_single_memory_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1757: > warning: Function parameter or member 'current_memclk_level' not described in > 'vega10_populate_single_memory_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1757: > warning: Function parameter or member 'current_mem_soc_vind' not described in > 'vega10_populate_single_memory_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:2871: > warning: Function parameter or member 'bitmap' not described in > 'vega10_start_dpm' > > Cc: Evan Quan > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c > b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c > index da470462d6e2c..29c99642d22d4 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c > @@ -1549,6 +1549,7 @@ static int vega10_populate_smc_link_levels(struct > pp_hwmgr *hwmgr) > * @hwmgr: the address of the hardware manager > * @gfx_clock: the GFX clock to use to populate the structure. > * @current_gfxclk_level: location in PPTable for the SMC GFXCLK structure. > + * @acg_freq: ACG frequenty to return (MHz) > */ > static int vega10_populate_single_gfx_level(struct pp_hwmgr *hwmgr, > uint32_t gfx_clock, PllSetting_t *current_gfxclk_level, > @@ -1612,7 +1613,8 @@ static int vega10_populate_single_gfx_level(struct > pp_hwmgr *hwmgr, > * > * @hwmgr: the address of the hardware manager. > * @soc_clock: the SOC clock to use to populate the structure. > - * @current_socclk_level: location in PPTable for the SMC SOCCLK structure. > + * @current_soc_did: DFS divider to pass back to caller > + * @current_vol_index: index of current VDD to pass back to caller > * return: 0 on success > */ > static int vega10_populate_single_soc_level(struct pp_hwmgr *hwmgr, > @@ -1744,7 +1746,7 @@ static void vega10_populate_vddc_soc_levels(struct > pp_hwmgr *hwmgr) > } > } > > -/** > +/* > * Populates single SMC GFXCLK structure using the provided clock. > * > * @hwmgr: the address of the hardware manager. > @@ -2863,8 +2865,8 @@ static int vega10_stop_dpm(struct pp_hwmgr *hwmgr, > uint32_t bitmap) > /** > * Tell SMC to enabled the supported DPMs. > * > - * @hwmgr: the address of the powerplay hardware manager. > - * @bitmap bitmap for the features to enabled. > + * @hwmgr: the address of the powerplay hardware manager. > + * @bitmap: bitmap for the features to enabled. > * return: 0 on at least one DPM is successfully enabled. > */ > static int vega10_start_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap) > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 26/40] drm/amd/display/dc/dce/dce_clock_source: Fix formatting/spelling of worthy function headers
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Demote the one that provides no param descriptions. > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:142: > warning: Function parameter or member 'calc_pll_cs' not described in > 'calculate_fb_and_fractional_fb_divider' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:142: > warning: Function parameter or member 'target_pix_clk_100hz' not described in > 'calculate_fb_and_fractional_fb_divider' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:142: > warning: Function parameter or member 'ref_divider' not described in > 'calculate_fb_and_fractional_fb_divider' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:142: > warning: Function parameter or member 'post_divider' not described in > 'calculate_fb_and_fractional_fb_divider' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:142: > warning: Function parameter or member 'feedback_divider_param' not described > in 'calculate_fb_and_fractional_fb_divider' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:142: > warning: Function parameter or member 'fract_feedback_divider_param' not > described in 'calculate_fb_and_fractional_fb_divider' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:200: > warning: Function parameter or member 'calc_pll_cs' not described in > 'calc_fb_divider_checking_tolerance' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:200: > warning: Function parameter or member 'pll_settings' not described in > 'calc_fb_divider_checking_tolerance' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:200: > warning: Function parameter or member 'ref_divider' not described in > 'calc_fb_divider_checking_tolerance' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:200: > warning: Function parameter or member 'post_divider' not described in > 'calc_fb_divider_checking_tolerance' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:200: > warning: Function parameter or member 'tolerance' not described in > 'calc_fb_divider_checking_tolerance' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:478: > warning: Function parameter or member 'clk_src' not described in > 'dce110_get_pix_clk_dividers_helper' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:478: > warning: Function parameter or member 'pll_settings' not described in > 'dce110_get_pix_clk_dividers_helper' > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:478: > warning: Function parameter or member 'pix_clk_params' not described in > 'dce110_get_pix_clk_dividers_helper' > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Bhawanpreet Lakha > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > .../drm/amd/display/dc/dce/dce_clock_source.c | 57 +-- > 1 file changed, 28 insertions(+), 29 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c > index fb733f573715e..10938a8c9500a 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c > @@ -113,20 +113,19 @@ static const struct spread_spectrum_data > *get_ss_data_entry( > } > > /** > - * Function: calculate_fb_and_fractional_fb_divider > + * calculate_fb_and_fractional_fb_divider - Calculates feedback and > fractional > + * feedback dividers values > * > - * * DESCRIPTION: Calculates feedback and fractional feedback dividers values > + * @calc_pll_cs: Pointer to clock source information > + * @target_pix_clk_100hz: Desired frequency in 100 Hz > + * @ref_divider:Reference divider (already known) > + * @post_divider: Post Divider (already known) > + * @feedback_divider_param: Pointer where to store > + * calculated feedback divider value > + * @fract_feedback_divider_param: Pointer where to store > + * calculated fract feedback divider value > * > - *PARAMETERS: > - * targetPixelClock Desired frequency in 100 Hz > - * ref_divider Reference divider (already known) > - * postDivider Post Divider (already known) > - * feedback_divider_param Pointer where to store > - * calculated feedback divider value > - * fract_feedback_divider_param Pointer where to store > - * calculated fract feedback divider > value > - * > - *RETURNS: > + * return: > * It fills the locations pointed by feedback_divider_param
Re: [PATCH 25/40] drm/amd/display/dc/dce/dce_link_encoder: Make functions invoked by reference static
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_link_encoder.c:1200:6: > warning: no previous prototype for ‘dce60_link_encoder_enable_dp_output’ > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_link_encoder.c:1239:6: > warning: no previous prototype for ‘dce60_link_encoder_enable_dp_mst_output’ > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_link_encoder.c:1429:6: > warning: no previous prototype for ‘dce60_link_encoder_dp_set_phy_pattern’ > [-Wmissing-prototypes] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Mauro Rossi > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c > index 210466b2d8631..0ef2f4d9d8bf3 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c > @@ -1197,7 +1197,7 @@ void dce110_link_encoder_enable_dp_mst_output( > > #if defined(CONFIG_DRM_AMD_DC_SI) > /* enables DP PHY output */ > -void dce60_link_encoder_enable_dp_output( > +static void dce60_link_encoder_enable_dp_output( > struct link_encoder *enc, > const struct dc_link_settings *link_settings, > enum clock_source_id clock_source) > @@ -1236,7 +1236,7 @@ void dce60_link_encoder_enable_dp_output( > } > > /* enables DP PHY output in MST mode */ > -void dce60_link_encoder_enable_dp_mst_output( > +static void dce60_link_encoder_enable_dp_mst_output( > struct link_encoder *enc, > const struct dc_link_settings *link_settings, > enum clock_source_id clock_source) > @@ -1426,7 +1426,7 @@ void dce110_link_encoder_dp_set_phy_pattern( > > #if defined(CONFIG_DRM_AMD_DC_SI) > /* set DP PHY test and training patterns */ > -void dce60_link_encoder_dp_set_phy_pattern( > +static void dce60_link_encoder_dp_set_phy_pattern( > struct link_encoder *enc, > const struct encoder_set_dp_phy_pattern_param *param) > { > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 24/40] drm/amd/display/dc/dce/dce_stream_encoder: Remove unused variable 'regval'
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_stream_encoder.c: In > function ‘dce110_update_generic_info_packet’: > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_stream_encoder.c:70:11: > warning: variable ‘regval’ set but not used [-Wunused-but-set-variable] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: George Shen > Cc: Eric Bernstein > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c > index ada57f745fd76..265eaef30a519 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c > @@ -67,7 +67,6 @@ static void dce110_update_generic_info_packet( > uint32_t packet_index, > const struct dc_info_packet *info_packet) > { > - uint32_t regval; > /* TODOFPGA Figure out a proper number for max_retries polling for > lock > * use 50 for now. > */ > @@ -99,7 +98,7 @@ static void dce110_update_generic_info_packet( > } > /* choose which generic packet to use */ > { > - regval = REG_READ(AFMT_VBI_PACKET_CONTROL); > + REG_READ(AFMT_VBI_PACKET_CONTROL); > REG_UPDATE(AFMT_VBI_PACKET_CONTROL, > AFMT_GENERIC_INDEX, packet_index); > } > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 23/40] drm/amd/display/dc/dce/dce_audio: Make function invoked by reference static
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_audio.c:871:6: warning: no > previous prototype for ‘dce60_aud_wall_dto_setup’ [-Wmissing-prototypes] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Mauro Rossi > Cc: Charlene Liu > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c > b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c > index 2a2a0fdb92539..7866cf2a668fa 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c > @@ -868,7 +868,7 @@ void dce_aud_wall_dto_setup( > } > > #if defined(CONFIG_DRM_AMD_DC_SI) > -void dce60_aud_wall_dto_setup( > +static void dce60_aud_wall_dto_setup( > struct audio *audio, > enum signal_type signal, > const struct audio_crtc_info *crtc_info, > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 22/40] drm/amd/display/dc/bios/bios_parser2: Fix some formatting issues and missing parameter docs
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:501: warning: > Function parameter or member 'dcb' not described in > 'bios_parser_get_gpio_pin_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:501: warning: > Function parameter or member 'gpio_id' not described in > 'bios_parser_get_gpio_pin_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:501: warning: > Function parameter or member 'info' not described in > 'bios_parser_get_gpio_pin_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:815: warning: > Function parameter or member 'dcb' not described in > 'bios_parser_get_spread_spectrum_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:815: warning: > Function parameter or member 'signal' not described in > 'bios_parser_get_spread_spectrum_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:815: warning: > Function parameter or member 'index' not described in > 'bios_parser_get_spread_spectrum_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:815: warning: > Function parameter or member 'ss_info' not described in > 'bios_parser_get_spread_spectrum_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:1210: warning: > Function parameter or member 'dcb' not described in > 'bios_parser_set_scratch_critical_state' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:1210: warning: > Function parameter or member 'state' not described in > 'bios_parser_set_scratch_critical_state' > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > .../drm/amd/display/dc/bios/bios_parser2.c| 29 +-- > 1 file changed, 14 insertions(+), 15 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c > b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c > index 670c265838178..9f9fda3118d1f 100644 > --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c > +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c > @@ -485,10 +485,11 @@ static struct atom_hpd_int_record *get_hpd_record( > * bios_parser_get_gpio_pin_info > * Get GpioPin information of input gpio id > * > - * @param gpio_id, GPIO ID > - * @param info, GpioPin information structure > - * @return Bios parser result code > - * @note > + * @dcb: pointer to the DC BIOS > + * @gpio_id: GPIO ID > + * @info:GpioPin information structure > + * return: Bios parser result code > + * note: > * to get the GPIO PIN INFO, we need: > * 1. get the GPIO_ID from other object table, see GetHPDInfo() > * 2. in DATA_TABLE.GPIO_Pin_LUT, search all records, > @@ -801,11 +802,11 @@ static enum bp_result get_ss_info_v4_2( > * ver 3.1, > * there is only one entry for each signal /ss id. However, there is > * no planning of supporting multiple spread Sprectum entry for EverGreen > - * @param [in] this > - * @param [in] signal, ASSignalType to be converted to info index > - * @param [in] index, number of entries that match the converted info index > - * @param [out] ss_info, sprectrum information structure, > - * @return Bios parser result code > + * @dcb: pointer to the DC BIOS > + * @signal: ASSignalType to be converted to info index > + * @index: number of entries that match the converted info index > + * @ss_info: sprectrum information structure, > + * return: Bios parser result code > */ > static enum bp_result bios_parser_get_spread_spectrum_info( > struct dc_bios *dcb, > @@ -1196,13 +1197,11 @@ static bool bios_parser_is_accelerated_mode( > } > > /** > - * bios_parser_set_scratch_critical_state > + * bios_parser_set_scratch_critical_state - update critical state bit > + * in VBIOS scratch register > * > - * @brief > - * update critical state bit in VBIOS scratch register > - * > - * @param > - * bool - to set or reset state > + * @dcb: pointer to the DC BIO > + * @state: set or reset state > */ > static void bios_parser_set_scratch_critical_state( > struct dc_bios *dcb, > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 21/40] drm/amd/display/dc/calcs/dce_calcs: Remove unused variables 'v_filter_init_mode' and 'sclk_lvl'
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function > ‘calculate_bandwidth’: > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:109:18: warning: > variable ‘v_filter_init_mode’ set but not used [-Wunused-but-set-variable] > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function > ‘bw_calcs’: > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:3031:21: warning: > variable ‘sclk_lvl’ set but not used [-Wunused-but-set-variable] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones @Harry Wentland , @Leo (Sunpeng) Li I think this file is generated from a script or something. Wanted to get your take on how to properly integrate a change like this. Alex > --- > drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 8 +--- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c > b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c > index ef41b287cbe23..158d927c03e55 100644 > --- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c > +++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c > @@ -106,7 +106,6 @@ static void calculate_bandwidth( > bool lpt_enabled; > enum bw_defines sclk_message; > enum bw_defines yclk_message; > - enum bw_defines v_filter_init_mode[maximum_number_of_surfaces]; > enum bw_defines tiling_mode[maximum_number_of_surfaces]; > enum bw_defines surface_type[maximum_number_of_surfaces]; > enum bw_defines voltage; > @@ -792,12 +791,8 @@ static void calculate_bandwidth( > data->v_filter_init[i] = > bw_add(data->v_filter_init[i], bw_int_to_fixed(1)); > } > if (data->stereo_mode[i] == bw_def_top_bottom) { > - v_filter_init_mode[i] = bw_def_manual; > data->v_filter_init[i] = > bw_min2(data->v_filter_init[i], bw_int_to_fixed(4)); > } > - else { > - v_filter_init_mode[i] = bw_def_auto; > - } > if (data->stereo_mode[i] == bw_def_top_bottom) { > data->num_lines_at_frame_start = > bw_int_to_fixed(1); > } > @@ -3028,7 +3023,7 @@ bool bw_calcs(struct dc_context *ctx, > calcs_output->all_displays_in_sync = false; > > if (data->number_of_displays != 0) { > - uint8_t yclk_lvl, sclk_lvl; > + uint8_t yclk_lvl; > struct bw_fixed high_sclk = vbios->high_sclk; > struct bw_fixed mid1_sclk = vbios->mid1_sclk; > struct bw_fixed mid2_sclk = vbios->mid2_sclk; > @@ -3049,7 +3044,6 @@ bool bw_calcs(struct dc_context *ctx, > calculate_bandwidth(dceip, vbios, data); > > yclk_lvl = data->y_clk_level; > - sclk_lvl = data->sclk_level; > > calcs_output->nbp_state_change_enable = > data->nbp_state_change_enable; > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/amdgpu/display: actually execute the atom command table in adjust_display_pll_v2
We should execute the table to see if we need to adjust the pixel clock. That said, I'm not sure this version of the atom table is actually in use on any asics supported by amdgpu. Signed-off-by: Alex Deucher --- .../drm/amd/display/dc/bios/command_table.c | 24 +++ 1 file changed, 24 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.c b/drivers/gpu/drm/amd/display/dc/bios/command_table.c index 070459e3e407..41999223903d 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.c @@ -1470,6 +1470,30 @@ static enum bp_result adjust_display_pll_v2( params.ucEncodeMode = (uint8_t)bp->cmd_helper->encoder_mode_bp_to_atom( bp_params->signal_type, false); + + if (bp_params->ss_enable == true) + params.ucConfig |= DISPPLL_CONFIG_SS_ENABLE; + + if (EXEC_BIOS_CMD_TABLE(AdjustDisplayPll, params)) { + /* Convert output pixel clock back 10KHz-->KHz: multiply +* original pixel clock in KHz by ratio +* [output pxlClk/input pxlClk] */ + uint64_t pixel_clk_10_khz_out = + (uint64_t)le16_to_cpu(params.usPixelClock); + uint64_t pixel_clk = (uint64_t)bp_params->pixel_clock; + + if (pixel_clock_10KHz_in != 0) { + bp_params->adjusted_pixel_clock = + div_u64(pixel_clk * pixel_clk_10_khz_out, + pixel_clock_10KHz_in); + } else { + bp_params->adjusted_pixel_clock = 0; + BREAK_TO_DEBUGGER(); + } + + result = BP_RESULT_OK; + } + return result; } -- 2.29.2 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 19/40] drm/amd/display/dc/bios/command_table: Remove unused variable
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > None of the surrounding code was removed just in case even a small > fraction of it was functional. > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table.c: In function > ‘adjust_display_pll_v2’: > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table.c:1459:35: > warning: variable ‘params’ set but not used [-Wunused-but-set-variable] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Qinglang Miao > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones > --- > drivers/gpu/drm/amd/display/dc/bios/command_table.c | 12 +++- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.c > b/drivers/gpu/drm/amd/display/dc/bios/command_table.c > index 070459e3e4070..dd893a1176979 100644 > --- a/drivers/gpu/drm/amd/display/dc/bios/command_table.c > +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.c > @@ -1456,20 +1456,14 @@ static enum bp_result adjust_display_pll_v2( > struct bp_adjust_pixel_clock_parameters *bp_params) > { @Harry Wentland, this function looks like it's missing the call to EXEC_BIOS_CMD_TABLE(). I just sent a patch to fix that up, although I'm not sure if this function every gets used on any asics supported by amdgpu, so maybe we can just drop it. Alex > enum bp_result result = BP_RESULT_FAILURE; > - ADJUST_DISPLAY_PLL_PS_ALLOCATION params = { 0 }; > > /* We need to convert from KHz units into 10KHz units and then convert > * output pixel clock back 10KHz-->KHz */ > uint32_t pixel_clock_10KHz_in = bp_params->pixel_clock / 10; > > - params.usPixelClock = cpu_to_le16((uint16_t)(pixel_clock_10KHz_in)); > - params.ucTransmitterID = > - bp->cmd_helper->encoder_id_to_atom( > - dal_graphics_object_id_get_encoder_id( > - > bp_params->encoder_object_id)); > - params.ucEncodeMode = > - (uint8_t)bp->cmd_helper->encoder_mode_bp_to_atom( > - bp_params->signal_type, false); > + bp->cmd_helper->encoder_id_to_atom( > + > dal_graphics_object_id_get_encoder_id(bp_params->encoder_object_id)); > + bp->cmd_helper->encoder_mode_bp_to_atom(bp_params->signal_type, > false); > return result; > } > > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] MAINTAINERS: update radeon/amdgpu/amdkfd git trees
[AMD Official Use Only - Internal Distribution Only] Why not just https://gitlab.freedesktop.org/agd5f/linux ? From: amd-gfx on behalf of Alex Deucher Sent: Friday, January 8, 2021 2:30 PM To: amd-gfx list ; Maling list - DRI developers ; Dave Airlie ; Daniel Vetter Cc: Deucher, Alexander Subject: Re: [PATCH] MAINTAINERS: update radeon/amdgpu/amdkfd git trees On Tue, Jan 5, 2021 at 3:15 PM Alex Deucher wrote: > > FDO is out of space, so move to gitlab. > > Signed-off-by: Alex Deucher Ping? Any objections? Alex > --- > MAINTAINERS | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index eb18459c1d16..e2877be6b10d 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -907,7 +907,7 @@ AMD KFD > M: Felix Kuehling > L: amd-gfx@lists.freedesktop.org > S: Supported > -T: git git://people.freedesktop.org/~agd5f/linux > +T: git > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fagd5f%2Flinux.git&data=04%7C01%7Cslava.abramov%40amd.com%7Cb4e8adc5393c4b052d6908d8b40bd5db%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637457310677496846%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=xK4Oo8juN%2FoF1jVnLclPtt9MKLzRQ3GPiercdH9ogFE%3D&reserved=0 > F: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd*.[ch] > F: drivers/gpu/drm/amd/amdkfd/ > F: drivers/gpu/drm/amd/include/cik_structs.h > @@ -14596,7 +14596,7 @@ M: Alex Deucher > M: Christian König > L: amd-gfx@lists.freedesktop.org > S: Supported > -T: git git://people.freedesktop.org/~agd5f/linux > +T: git > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fagd5f%2Flinux.git&data=04%7C01%7Cslava.abramov%40amd.com%7Cb4e8adc5393c4b052d6908d8b40bd5db%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637457310677506842%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=ANez%2BLHaergD6Lae8arcJDyibaf5yPgRyrBfzBpd3vY%3D&reserved=0 > F: drivers/gpu/drm/amd/ > F: drivers/gpu/drm/radeon/ > F: include/uapi/drm/amdgpu_drm.h > -- > 2.29.2 > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cslava.abramov%40amd.com%7Cb4e8adc5393c4b052d6908d8b40bd5db%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637457310677506842%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=gyiwTSaZfiAQpII%2BJUprm5wINz5QEWdQYnm05WoDbD0%3D&reserved=0 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 18/40] drm/amd/display/dc/bios/bios_parser: Fix a whole bunch of legacy doc formatting
Applied. Thanks! Alex On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2588:16: > warning: no previous prototype for ‘update_slot_layout_info’ > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2692:16: > warning: no previous prototype for ‘get_bracket_layout_record’ > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:925: warning: > Function parameter or member 'dcb' not described in > 'bios_parser_get_spread_spectrum_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:925: warning: > Function parameter or member 'signal' not described in > 'bios_parser_get_spread_spectrum_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:925: warning: > Function parameter or member 'index' not described in > 'bios_parser_get_spread_spectrum_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:925: warning: > Function parameter or member 'ss_info' not described in > 'bios_parser_get_spread_spectrum_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: > Function parameter or member 'bp' not described in 'get_ss_info_from_tbl' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: > Function parameter or member 'id' not described in 'get_ss_info_from_tbl' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: > Function parameter or member 'ss_info' not described in 'get_ss_info_from_tbl' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1022: warning: > Function parameter or member 'bp' not described in > 'get_ss_info_from_internal_ss_info_tbl_V2_1' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1022: warning: > Function parameter or member 'id' not described in > 'get_ss_info_from_internal_ss_info_tbl_V2_1' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1022: warning: > Function parameter or member 'info' not described in > 'get_ss_info_from_internal_ss_info_tbl_V2_1' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1087: warning: > Function parameter or member 'bp' not described in > 'get_ss_info_from_ss_info_table' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1087: warning: > Function parameter or member 'id' not described in > 'get_ss_info_from_ss_info_table' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1087: warning: > Function parameter or member 'ss_info' not described in > 'get_ss_info_from_ss_info_table' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1469: warning: > Function parameter or member 'dcb' not described in > 'bios_parser_get_encoder_cap_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1469: warning: > Function parameter or member 'object_id' not described in > 'bios_parser_get_encoder_cap_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1469: warning: > Function parameter or member 'info' not described in > 'bios_parser_get_encoder_cap_info' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1508: warning: > Function parameter or member 'bp' not described in 'get_encoder_cap_record' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1508: warning: > Function parameter or member 'object' not described in > 'get_encoder_cap_record' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1566: warning: > Function parameter or member 'dcb' not described in > 'bios_parser_get_ss_entry_number' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1566: warning: > Function parameter or member 'signal' not described in > 'bios_parser_get_ss_entry_number' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1619: warning: > Function parameter or member 'bp' not described in > 'get_ss_entry_number_from_ss_info_tbl' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1619: warning: > Function parameter or member 'id' not described in > 'get_ss_entry_number_from_ss_info_tbl' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1686: warning: > Function parameter or member 'bp' not described in 'get_ss_entry_number' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1686: warning: > Function parameter or member 'id' not described in 'get_ss_entry_number' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1705: warning: > Function parameter or member 'bp' not described in > 'get_ss_entry_number_from_internal_ss_info_tbl_v2_1' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1705: warning: > Function parameter or member 'id' not described in > 'get_ss_entry_number_from_internal_ss_info_tbl_v2_1' > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1740: warning: > Function parameter or me
Re: [PATCH 17/40] drm/amd/display/dc/bios/bios_parser: Make local functions static
Applied. Thanks! Alex On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2588:16: > warning: no previous prototype for ‘update_slot_layout_info’ > [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2692:16: > warning: no previous prototype for ‘get_bracket_layout_record’ > [-Wmissing-prototypes] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Igor Kravchenko > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones > --- > drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c > b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c > index 23a373ca94b5c..f054c5872c619 100644 > --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c > +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c > @@ -2585,7 +2585,7 @@ static struct integrated_info > *bios_parser_create_integrated_info( > return NULL; > } > > -enum bp_result update_slot_layout_info( > +static enum bp_result update_slot_layout_info( > struct dc_bios *dcb, > unsigned int i, > struct slot_layout_info *slot_layout_info, > @@ -2689,7 +2689,7 @@ enum bp_result update_slot_layout_info( > } > > > -enum bp_result get_bracket_layout_record( > +static enum bp_result get_bracket_layout_record( > struct dc_bios *dcb, > unsigned int bracket_layout_id, > struct slot_layout_info *slot_layout_info) > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 16/40] drm/amd/display/dc/bios/command_table_helper2: Fix legacy formatting problems
Applied. Thanks! Alex On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table_helper2.c:145: > warning: Function parameter or member 't' not described in > 'dal_cmd_table_helper_transmitter_bp_to_atom2' > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones > --- > .../display/dc/bios/command_table_helper2.c | 20 --- > 1 file changed, 8 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c > b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c > index 7736c92d55c40..455ee2be15a36 100644 > --- a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c > +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c > @@ -128,18 +128,14 @@ bool dal_cmd_table_helper_controller_id_to_atom2( > } > > /** > -* translate_transmitter_bp_to_atom > -* > -* @brief > -* Translate the Transmitter to the corresponding ATOM BIOS value > -* > -* @param > -* input transmitter > -* output digitalTransmitter > -*// =00: Digital Transmitter1 ( UNIPHY linkAB ) > -*// =01: Digital Transmitter2 ( UNIPHY linkCD ) > -*// =02: Digital Transmitter3 ( UNIPHY linkEF ) > -*/ > + * translate_transmitter_bp_to_atom2 - Translate the Transmitter to the > + * corresponding ATOM BIOS value > + * @t: transmitter > + * returns: digitalTransmitter > + *// =00: Digital Transmitter1 ( UNIPHY linkAB ) > + *// =01: Digital Transmitter2 ( UNIPHY linkCD ) > + *// =02: Digital Transmitter3 ( UNIPHY linkEF ) > + */ > uint8_t dal_cmd_table_helper_transmitter_bp_to_atom2( > enum transmitter t) > { > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 15/40] drm/amd/display/dc/bios/command_table_helper: Fix kernel-doc formatting
Applied. Thanks! Alex On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table_helper.c:131: > warning: Function parameter or member 't' not described in > 'dal_cmd_table_helper_transmitter_bp_to_atom' > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Mauro Rossi > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones > --- > .../display/dc/bios/command_table_helper.c| 20 --- > 1 file changed, 8 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c > b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c > index 48b4ef03fc8f8..5b77251e05909 100644 > --- a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c > +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c > @@ -114,18 +114,14 @@ bool dal_cmd_table_helper_controller_id_to_atom( > } > > /** > -* translate_transmitter_bp_to_atom > -* > -* @brief > -* Translate the Transmitter to the corresponding ATOM BIOS value > -* > -* @param > -* input transmitter > -* output digitalTransmitter > -*// =00: Digital Transmitter1 ( UNIPHY linkAB ) > -*// =01: Digital Transmitter2 ( UNIPHY linkCD ) > -*// =02: Digital Transmitter3 ( UNIPHY linkEF ) > -*/ > + * translate_transmitter_bp_to_atom - Translate the Transmitter to the > + *corresponding ATOM BIOS value > + * @t: transmitter > + * returns: output digitalTransmitter > + *// =00: Digital Transmitter1 ( UNIPHY linkAB ) > + *// =01: Digital Transmitter2 ( UNIPHY linkCD ) > + *// =02: Digital Transmitter3 ( UNIPHY linkEF ) > + */ > uint8_t dal_cmd_table_helper_transmitter_bp_to_atom( > enum transmitter t) > { > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 14/40] drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs: Demote non-kernel-doc comment blocks
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:699: > warning: Function parameter or member 'm' not described in > 'dmub_tracebuffer_show' > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:699: > warning: Function parameter or member 'data' not described in > 'dmub_tracebuffer_show' > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:743: > warning: Function parameter or member 'm' not described in > 'dmub_fw_state_show' > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:743: > warning: Function parameter or member 'data' not described in > 'dmub_fw_state_show' > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Mikita Lipski > Cc: Eryk Brol > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c > b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c > index 11459fb09a372..d645f3e4610eb 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c > @@ -691,7 +691,7 @@ static ssize_t dp_phy_test_pattern_debugfs_write(struct > file *f, const char __us > return size; > } > > -/** > +/* > * Returns the DMCUB tracebuffer contents. > * Example usage: cat /sys/kernel/debug/dri/0/amdgpu_dm_dmub_tracebuffer > */ > @@ -735,7 +735,7 @@ static int dmub_tracebuffer_show(struct seq_file *m, void > *data) > return 0; > } > > -/** > +/* > * Returns the DMCUB firmware state contents. > * Example usage: cat /sys/kernel/debug/dri/0/amdgpu_dm_dmub_fw_state > */ > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 13/40] drm/amd/display/dc/basics/conversion: Demote obvious kernel-doc abuse
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:86: warning: > Function parameter or member 'matrix' not described in 'convert_float_matrix' > drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:86: warning: > Function parameter or member 'flt' not described in 'convert_float_matrix' > drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:86: warning: > Function parameter or member 'buffer_size' not described in > 'convert_float_matrix' > drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:86: warning: > Excess function parameter 'param' description in 'convert_float_matrix' > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Lee Jones > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/basics/conversion.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.c > b/drivers/gpu/drm/amd/display/dc/basics/conversion.c > index 24ed03d8cda74..6767fab55c260 100644 > --- a/drivers/gpu/drm/amd/display/dc/basics/conversion.c > +++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.c > @@ -73,12 +73,9 @@ uint16_t fixed_point_to_int_frac( > > return result; > } > -/** > -* convert_float_matrix > -* This converts a double into HW register spec defined format S2D13. > -* @param : > -* @return None > -*/ > +/* > + * convert_float_matrix - This converts a double into HW register spec > defined format S2D13. > + */ > void convert_float_matrix( > uint16_t *matrix, > struct fixed31_32 *flt, > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 12/40] drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Fix a bunch of kernel-doc formatting issues
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:5474:5: > warning: no previous prototype for ‘vega10_hwmgr_init’ [-Wmissing-prototypes] > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:551: > warning: Function parameter or member 'hwmgr' not described in > 'vega10_get_evv_voltages' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:609: > warning: Function parameter or member 'hwmgr' not described in > 'vega10_patch_with_vdd_leakage' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:609: > warning: Function parameter or member 'voltage' not described in > 'vega10_patch_with_vdd_leakage' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:609: > warning: Function parameter or member 'leakage_table' not described in > 'vega10_patch_with_vdd_leakage' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:637: > warning: Function parameter or member 'hwmgr' not described in > 'vega10_patch_lookup_table_with_leakage' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:637: > warning: Function parameter or member 'lookup_table' not described in > 'vega10_patch_lookup_table_with_leakage' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:637: > warning: Function parameter or member 'leakage_table' not described in > 'vega10_patch_lookup_table_with_leakage' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1013: > warning: Function parameter or member 'hwmgr' not described in > 'vega10_trim_voltage_table' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1013: > warning: Function parameter or member 'vol_table' not described in > 'vega10_trim_voltage_table' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1160: > warning: Function parameter or member 'hwmgr' not described in > 'vega10_construct_voltage_tables' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1558: > warning: Function parameter or member 'hwmgr' not described in > 'vega10_populate_single_gfx_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1558: > warning: Function parameter or member 'gfx_clock' not described in > 'vega10_populate_single_gfx_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1558: > warning: Function parameter or member 'current_gfxclk_level' not described in > 'vega10_populate_single_gfx_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1558: > warning: Function parameter or member 'acg_freq' not described in > 'vega10_populate_single_gfx_level' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1613: > warning: Cannot understand * @brief Populates single SMC SOCCLK structure > using the provided clock. > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1667: > warning: Function parameter or member 'hwmgr' not described in > 'vega10_populate_all_graphic_levels' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1750: > warning: Cannot understand * @brief Populates single SMC GFXCLK structure > using the provided clock. > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1811: > warning: Cannot understand * @brief Populates all SMC MCLK levels' structure > based on the trimmed allowed dpm memory clock states. > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:2496: > warning: Function parameter or member 'hwmgr' not described in > 'vega10_init_smc_table' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:2867: > warning: Cannot understand * @brief Tell SMC to enabled the supported DPMs. > > Cc: Evan Quan > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > .../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 133 +- > 1 file changed, 65 insertions(+), 68 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c > b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c > index 1b47f94e03317..da470462d6e2c 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c > @@ -542,11 +542,11 @@ static int vega10_get_socclk_for_voltage_evv(struct > pp_hwmgr *hwmgr, > > #define ATOM_VIRTUAL_VOLTAGE_ID0 0xff01 > /** > -* Get Leakage VDDC based on leakage ID. > -* > -* @paramhwmgr the address of the powerplay hardware manager. > -* @return always 0. > -*/ > + * Get Leakage VDDC based on leakage ID. > + * > + * @hwmgr: the address of the powerplay hardware manager. > + * return: always 0. > + */ > static int vega10_get_evv_voltages(struct p
Re: [PATCH 11/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move prototype into shared header
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:5474:5: > warning: no previous prototype for ‘vega10_hwmgr_init’ [-Wmissing-prototypes] > > Cc: Evan Quan > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c| 2 +- > drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c > b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c > index 6a7de8b898faf..f2cef0930aa96 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c > @@ -33,6 +33,7 @@ > #include "ppsmc.h" > #include "amd_acpi.h" > #include "pp_psm.h" > +#include "vega10_hwmgr.h" > > extern const struct pp_smumgr_func ci_smu_funcs; > extern const struct pp_smumgr_func smu8_smu_funcs; > @@ -46,7 +47,6 @@ extern const struct pp_smumgr_func vega12_smu_funcs; > extern const struct pp_smumgr_func smu10_smu_funcs; > extern const struct pp_smumgr_func vega20_smu_funcs; > > -extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr); > extern int smu10_init_function_pointers(struct pp_hwmgr *hwmgr); > > static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr); > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.h > b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.h > index f752b4ad0c8ae..07c06f8c90b09 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.h > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.h > @@ -442,5 +442,6 @@ int vega10_update_uvd_dpm(struct pp_hwmgr *hwmgr, bool > bgate); > int vega10_update_samu_dpm(struct pp_hwmgr *hwmgr, bool bgate); > int vega10_update_acp_dpm(struct pp_hwmgr *hwmgr, bool bgate); > int vega10_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable); > +int vega10_hwmgr_init(struct pp_hwmgr *hwmgr); > > #endif /* _VEGA10_HWMGR_H_ */ > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 10/40] drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix formatting and spelling issues
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:242: warning: > Function parameter or member 'hwmgr' not described in > 'smu7_enable_smc_voltage_controller' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: > Function parameter or member 'us_max_fan_rpm' not described in > 'smu7_set_max_fan_rpm_output' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: > Excess function parameter 'usMaxFanRpm' description in > 'smu7_set_max_fan_rpm_output' > > Cc: Evan Quan > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c > b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c > index 82676c086ce46..c57dc9ae81f2f 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c > @@ -235,7 +235,7 @@ static int smu7_get_current_pcie_lane_number(struct > pp_hwmgr *hwmgr) > /** > * smu7_enable_smc_voltage_controller - Enable voltage control > * > - * @hwmgr the address of the powerplay hardware manager. > + * @hwmgr: the address of the powerplay hardware manager. > * Return: always PP_Result_OK > */ > static int smu7_enable_smc_voltage_controller(struct pp_hwmgr *hwmgr) > @@ -4501,7 +4501,7 @@ static int > smu7_display_configuration_changed_task(struct pp_hwmgr *hwmgr) > * smu7_set_max_fan_rpm_output - Set maximum target operating fan output RPM > * > * @hwmgr: the address of the powerplay hardware manager. > - * @usMaxFanRpm: max operating fan RPM value. > + * @us_max_fan_rpm: max operating fan RPM value. > * Return: The response that came from the SMC. > */ > static int smu7_set_max_fan_rpm_output(struct pp_hwmgr *hwmgr, uint16_t > us_max_fan_rpm) > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 09/40] drm/amd/pm/powerplay/hwmgr/vega20_hwmgr: Fix legacy function header formatting
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_hwmgr.c:781: > warning: Function parameter or member 'hwmgr' not described in > 'vega20_init_smc_table' > > Cc: Evan Quan > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c > b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c > index da84012b7fd51..87811b005b85f 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c > @@ -771,12 +771,11 @@ static int vega20_setup_default_dpm_tables(struct > pp_hwmgr *hwmgr) > } > > /** > -* Initializes the SMC table and uploads it > -* > -* @paramhwmgr the address of the powerplay hardware manager. > -* @parampInput the pointer to input data (PowerState) > -* @return always 0 > -*/ > + * Initializes the SMC table and uploads it > + * > + * @hwmgr: the address of the powerplay hardware manager. > + * return: always 0 > + */ > static int vega20_init_smc_table(struct pp_hwmgr *hwmgr) > { > int result; > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 08/40] drm/amd/pm/powerplay/hwmgr/vega12_hwmgr: Fix legacy function header formatting
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_hwmgr.c:728: > warning: Function parameter or member 'hwmgr' not described in > 'vega12_init_smc_table' > > Cc: Evan Quan > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c > b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c > index dc206fa88c5e5..c0753029a8e2a 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c > @@ -718,12 +718,11 @@ static int vega12_save_default_power_profile(struct > pp_hwmgr *hwmgr) > #endif > > /** > -* Initializes the SMC table and uploads it > -* > -* @paramhwmgr the address of the powerplay hardware manager. > -* @parampInput the pointer to input data (PowerState) > -* @return always 0 > -*/ > + * Initializes the SMC table and uploads it > + * > + * @hwmgr: the address of the powerplay hardware manager. > + * return: always 0 > + */ > static int vega12_init_smc_table(struct pp_hwmgr *hwmgr) > { > int result; > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 07/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix documentation for 'mpll_param'
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:290: warning: > Function parameter or member 'mpll_param' not described in > 'atomctrl_get_memory_pll_dividers_si' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:290: warning: > Excess function parameter 'dividers' description in > 'atomctrl_get_memory_pll_dividers_si' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:339: warning: > Function parameter or member 'mpll_param' not described in > 'atomctrl_get_memory_pll_dividers_vi' > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:339: warning: > Excess function parameter 'dividers' description in > 'atomctrl_get_memory_pll_dividers_vi' > > Cc: Evan Quan > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c > b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c > index 83a6504e093cb..b1038d30c8dcc 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c > @@ -279,7 +279,7 @@ static const ATOM_VOLTAGE_OBJECT_V3 > *atomctrl_lookup_voltage_type_v3( > * > * @hwmgr: input parameter: pointer to HwMgr > * @clock_value: input parameter: memory clock > - * @dividers:output parameter: memory PLL dividers > + * @mpll_param: output parameter: memory clock parameters > * @strobe_mode: input parameter: 1 for strobe mode, 0 for performance > mode > */ > int atomctrl_get_memory_pll_dividers_si( > @@ -332,7 +332,7 @@ int atomctrl_get_memory_pll_dividers_si( > * > * @hwmgr: input parameter: pointer to HwMgr > * @clock_value: input parameter: memory clock > - * @dividers: output parameter: memory PLL dividers > + * @mpll_param:output parameter: memory clock parameters > */ > int atomctrl_get_memory_pll_dividers_vi(struct pp_hwmgr *hwmgr, > uint32_t clock_value, pp_atomctrl_memory_clock_param > *mpll_param) > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 06/40] drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Provide description of 'call_back_func'
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > > drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1371: > warning: Function parameter or member 'call_back_func' not described in > 'get_powerplay_table_entry_v1_0' > > Cc: Evan Quan > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c > b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c > index 741e03ad5311f..f2a55c1413f59 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c > @@ -1362,6 +1362,7 @@ static int ppt_get_vce_state_table_entry_v1_0(struct > pp_hwmgr *hwmgr, uint32_t i > * @hwmgr: Pointer to the hardware manager. > * @entry_index: The index of the entry to be extracted from the table. > * @power_state: The address of the PowerState instance being created. > + * @call_back_func: The function to call into to fill power state > * Return: -1 if the entry cannot be retrieved. > */ > int get_powerplay_table_entry_v1_0(struct pp_hwmgr *hwmgr, > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 05/40] drm/amd/amdgpu/vega20_ih: Add missing descriptions for 'ih' and fix spelling error
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/vega20_ih.c:378: warning: Function parameter or > member 'ih' not described in 'vega20_ih_get_wptr' > drivers/gpu/drm/amd/amdgpu/vega20_ih.c:421: warning: Function parameter or > member 'ih' not described in 'vega20_ih_irq_rearm' > drivers/gpu/drm/amd/amdgpu/vega20_ih.c:447: warning: Function parameter or > member 'ih' not described in 'vega20_ih_set_rptr' > > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Hawking Zhang > Cc: Feifei Xu > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c > b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c > index 42032ca380ccf..5a3c867d58811 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c > +++ b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c > @@ -88,7 +88,7 @@ static void vega20_ih_init_register_offset(struct > amdgpu_device *adev) > * vega20_ih_toggle_ring_interrupts - toggle the interrupt ring buffer > * > * @adev: amdgpu_device pointer > - * @ih: amdgpu_ih_ring pointet > + * @ih: amdgpu_ih_ring pointer > * @enable: true - enable the interrupts, false - disable the interrupts > * > * Toggle the interrupt ring buffer (VEGA20) > @@ -367,6 +367,7 @@ static void vega20_ih_irq_disable(struct amdgpu_device > *adev) > * vega20_ih_get_wptr - get the IH ring buffer wptr > * > * @adev: amdgpu_device pointer > + * @ih: amdgpu_ih_ring pointer > * > * Get the IH ring buffer wptr from either the register > * or the writeback memory buffer (VEGA20). Also check for > @@ -414,6 +415,7 @@ static u32 vega20_ih_get_wptr(struct amdgpu_device *adev, > * vega20_ih_irq_rearm - rearm IRQ if lost > * > * @adev: amdgpu_device pointer > + * @ih: amdgpu_ih_ring pointer > * > */ > static void vega20_ih_irq_rearm(struct amdgpu_device *adev, > @@ -439,6 +441,7 @@ static void vega20_ih_irq_rearm(struct amdgpu_device > *adev, > * vega20_ih_set_rptr - set the IH ring buffer rptr > * > * @adev: amdgpu_device pointer > + * @ih: amdgpu_ih_ring pointer > * > * Set the IH ring buffer rptr. > */ > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 04/40] drm/amd/amdgpu/amdgpu_ih: Update 'amdgpu_ih_decode_iv_helper()'s function header
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c:220: warning: Function parameter or > member 'ih' not described in 'amdgpu_ih_decode_iv_helper' > drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c:220: warning: Function parameter or > member 'entry' not described in 'amdgpu_ih_decode_iv_helper' > > Cc: Alex Deucher > Cc: "Christian König" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Felix Kuehling > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c > index 725a9c73d51f0..dc852af4f3b76 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c > @@ -209,6 +209,8 @@ int amdgpu_ih_process(struct amdgpu_device *adev, struct > amdgpu_ih_ring *ih) > * amdgpu_ih_decode_iv_helper - decode an interrupt vector > * > * @adev: amdgpu_device pointer > + * @ih: ih ring to process > + * @entry: IV entry > * > * Decodes the interrupt vector at the current rptr > * position and also advance the position for for Vega10 > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 18/40] drm/amd/display/dc/bios/bios_parser: Fix a whole bunch of legacy doc formatting
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2588:16: warning: no previous prototype for ‘update_slot_layout_info’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2692:16: warning: no previous prototype for ‘get_bracket_layout_record’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:925: warning: Function parameter or member 'dcb' not described in 'bios_parser_get_spread_spectrum_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:925: warning: Function parameter or member 'signal' not described in 'bios_parser_get_spread_spectrum_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:925: warning: Function parameter or member 'index' not described in 'bios_parser_get_spread_spectrum_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:925: warning: Function parameter or member 'ss_info' not described in 'bios_parser_get_spread_spectrum_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: Function parameter or member 'bp' not described in 'get_ss_info_from_tbl' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: Function parameter or member 'id' not described in 'get_ss_info_from_tbl' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: Function parameter or member 'ss_info' not described in 'get_ss_info_from_tbl' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1022: warning: Function parameter or member 'bp' not described in 'get_ss_info_from_internal_ss_info_tbl_V2_1' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1022: warning: Function parameter or member 'id' not described in 'get_ss_info_from_internal_ss_info_tbl_V2_1' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1022: warning: Function parameter or member 'info' not described in 'get_ss_info_from_internal_ss_info_tbl_V2_1' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1087: warning: Function parameter or member 'bp' not described in 'get_ss_info_from_ss_info_table' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1087: warning: Function parameter or member 'id' not described in 'get_ss_info_from_ss_info_table' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1087: warning: Function parameter or member 'ss_info' not described in 'get_ss_info_from_ss_info_table' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1469: warning: Function parameter or member 'dcb' not described in 'bios_parser_get_encoder_cap_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1469: warning: Function parameter or member 'object_id' not described in 'bios_parser_get_encoder_cap_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1469: warning: Function parameter or member 'info' not described in 'bios_parser_get_encoder_cap_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1508: warning: Function parameter or member 'bp' not described in 'get_encoder_cap_record' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1508: warning: Function parameter or member 'object' not described in 'get_encoder_cap_record' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1566: warning: Function parameter or member 'dcb' not described in 'bios_parser_get_ss_entry_number' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1566: warning: Function parameter or member 'signal' not described in 'bios_parser_get_ss_entry_number' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1619: warning: Function parameter or member 'bp' not described in 'get_ss_entry_number_from_ss_info_tbl' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1619: warning: Function parameter or member 'id' not described in 'get_ss_entry_number_from_ss_info_tbl' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1686: warning: Function parameter or member 'bp' not described in 'get_ss_entry_number' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1686: warning: Function parameter or member 'id' not described in 'get_ss_entry_number' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1705: warning: Function parameter or member 'bp' not described in 'get_ss_entry_number_from_internal_ss_info_tbl_v2_1' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1705: warning: Function parameter or member 'id' not described in 'get_ss_entry_number_from_internal_ss_info_tbl_v2_1' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1740: warning: Function parameter or member 'bp' not described in 'get_ss_entry_number_from_internal_ss_info_tbl_V3_1' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1740: warning: Function parameter or member 'id' not described in 'get_ss_entry_number_from_intern
[PATCH 14/40] drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs: Demote non-kernel-doc comment blocks
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:699: warning: Function parameter or member 'm' not described in 'dmub_tracebuffer_show' drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:699: warning: Function parameter or member 'data' not described in 'dmub_tracebuffer_show' drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:743: warning: Function parameter or member 'm' not described in 'dmub_fw_state_show' drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:743: warning: Function parameter or member 'data' not described in 'dmub_fw_state_show' Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Mikita Lipski Cc: Eryk Brol Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c index 11459fb09a372..d645f3e4610eb 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -691,7 +691,7 @@ static ssize_t dp_phy_test_pattern_debugfs_write(struct file *f, const char __us return size; } -/** +/* * Returns the DMCUB tracebuffer contents. * Example usage: cat /sys/kernel/debug/dri/0/amdgpu_dm_dmub_tracebuffer */ @@ -735,7 +735,7 @@ static int dmub_tracebuffer_show(struct seq_file *m, void *data) return 0; } -/** +/* * Returns the DMCUB firmware state contents. * Example usage: cat /sys/kernel/debug/dri/0/amdgpu_dm_dmub_fw_state */ -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 32/40] drm/amd/display/dc/dce/dce_aux: Remove unused function 'get_engine_type'
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:391:25: warning: no previous prototype for ‘get_engine_type’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c index cda5fd0464bc5..3204292a5aeae 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c @@ -388,12 +388,6 @@ static enum aux_channel_operation_result get_channel_status( } } -enum i2caux_engine_type get_engine_type( - const struct dce_aux *engine) -{ - return I2CAUX_ENGINE_TYPE_AUX; -} - static bool acquire( struct dce_aux *engine, struct ddc *ddc) -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 23/40] drm/amd/display/dc/dce/dce_audio: Make function invoked by reference static
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_audio.c:871:6: warning: no previous prototype for ‘dce60_aud_wall_dto_setup’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Mauro Rossi Cc: Charlene Liu Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c index 2a2a0fdb92539..7866cf2a668fa 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c @@ -868,7 +868,7 @@ void dce_aud_wall_dto_setup( } #if defined(CONFIG_DRM_AMD_DC_SI) -void dce60_aud_wall_dto_setup( +static void dce60_aud_wall_dto_setup( struct audio *audio, enum signal_type signal, const struct audio_crtc_info *crtc_info, -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 16/40] drm/amd/display/dc/bios/command_table_helper2: Fix legacy formatting problems
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table_helper2.c:145: warning: Function parameter or member 't' not described in 'dal_cmd_table_helper_transmitter_bp_to_atom2' Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- .../display/dc/bios/command_table_helper2.c | 20 --- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c index 7736c92d55c40..455ee2be15a36 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c @@ -128,18 +128,14 @@ bool dal_cmd_table_helper_controller_id_to_atom2( } /** -* translate_transmitter_bp_to_atom -* -* @brief -* Translate the Transmitter to the corresponding ATOM BIOS value -* -* @param -* input transmitter -* output digitalTransmitter -*// =00: Digital Transmitter1 ( UNIPHY linkAB ) -*// =01: Digital Transmitter2 ( UNIPHY linkCD ) -*// =02: Digital Transmitter3 ( UNIPHY linkEF ) -*/ + * translate_transmitter_bp_to_atom2 - Translate the Transmitter to the + * corresponding ATOM BIOS value + * @t: transmitter + * returns: digitalTransmitter + *// =00: Digital Transmitter1 ( UNIPHY linkAB ) + *// =01: Digital Transmitter2 ( UNIPHY linkCD ) + *// =02: Digital Transmitter3 ( UNIPHY linkEF ) + */ uint8_t dal_cmd_table_helper_transmitter_bp_to_atom2( enum transmitter t) { -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 30/40] drm/amd/display/dc/dce/dce_dmcu: Move 'abm_gain_stepsize' to only source file it's used in
And only declare it if it's to be used. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Mauro Rossi Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 4 drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c index fa2b47d41ee2f..30264fc151a2b 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c @@ -65,6 +65,10 @@ //Register access policy version #define mmMP0_SMN_C2PMSG_910x1609B +#if defined(CONFIG_DRM_AMD_DC_DCN) +static const uint32_t abm_gain_stepsize = 0x0060; +#endif + static bool dce_dmcu_init(struct dmcu *dmcu) { // Do nothing diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h index 93e7f34d4775e..cefb7f5bf42cc 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h @@ -317,6 +317,4 @@ struct dmcu *dcn21_dmcu_create( void dce_dmcu_destroy(struct dmcu **dmcu); -static const uint32_t abm_gain_stepsize = 0x0060; - #endif /* _DCE_ABM_H_ */ -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 24/40] drm/amd/display/dc/dce/dce_stream_encoder: Remove unused variable 'regval'
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_stream_encoder.c: In function ‘dce110_update_generic_info_packet’: drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_stream_encoder.c:70:11: warning: variable ‘regval’ set but not used [-Wunused-but-set-variable] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: George Shen Cc: Eric Bernstein Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c index ada57f745fd76..265eaef30a519 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c @@ -67,7 +67,6 @@ static void dce110_update_generic_info_packet( uint32_t packet_index, const struct dc_info_packet *info_packet) { - uint32_t regval; /* TODOFPGA Figure out a proper number for max_retries polling for lock * use 50 for now. */ @@ -99,7 +98,7 @@ static void dce110_update_generic_info_packet( } /* choose which generic packet to use */ { - regval = REG_READ(AFMT_VBI_PACKET_CONTROL); + REG_READ(AFMT_VBI_PACKET_CONTROL); REG_UPDATE(AFMT_VBI_PACKET_CONTROL, AFMT_GENERIC_INDEX, packet_index); } -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 05/40] drm/amd/amdgpu/vega20_ih: Add missing descriptions for 'ih' and fix spelling error
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/vega20_ih.c:378: warning: Function parameter or member 'ih' not described in 'vega20_ih_get_wptr' drivers/gpu/drm/amd/amdgpu/vega20_ih.c:421: warning: Function parameter or member 'ih' not described in 'vega20_ih_irq_rearm' drivers/gpu/drm/amd/amdgpu/vega20_ih.c:447: warning: Function parameter or member 'ih' not described in 'vega20_ih_set_rptr' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Hawking Zhang Cc: Feifei Xu Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c index 42032ca380ccf..5a3c867d58811 100644 --- a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c @@ -88,7 +88,7 @@ static void vega20_ih_init_register_offset(struct amdgpu_device *adev) * vega20_ih_toggle_ring_interrupts - toggle the interrupt ring buffer * * @adev: amdgpu_device pointer - * @ih: amdgpu_ih_ring pointet + * @ih: amdgpu_ih_ring pointer * @enable: true - enable the interrupts, false - disable the interrupts * * Toggle the interrupt ring buffer (VEGA20) @@ -367,6 +367,7 @@ static void vega20_ih_irq_disable(struct amdgpu_device *adev) * vega20_ih_get_wptr - get the IH ring buffer wptr * * @adev: amdgpu_device pointer + * @ih: amdgpu_ih_ring pointer * * Get the IH ring buffer wptr from either the register * or the writeback memory buffer (VEGA20). Also check for @@ -414,6 +415,7 @@ static u32 vega20_ih_get_wptr(struct amdgpu_device *adev, * vega20_ih_irq_rearm - rearm IRQ if lost * * @adev: amdgpu_device pointer + * @ih: amdgpu_ih_ring pointer * */ static void vega20_ih_irq_rearm(struct amdgpu_device *adev, @@ -439,6 +441,7 @@ static void vega20_ih_irq_rearm(struct amdgpu_device *adev, * vega20_ih_set_rptr - set the IH ring buffer rptr * * @adev: amdgpu_device pointer + * @ih: amdgpu_ih_ring pointer * * Set the IH ring buffer rptr. */ -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 11/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move prototype into shared header
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:5474:5: warning: no previous prototype for ‘vega10_hwmgr_init’ [-Wmissing-prototypes] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c| 2 +- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c index 6a7de8b898faf..f2cef0930aa96 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c @@ -33,6 +33,7 @@ #include "ppsmc.h" #include "amd_acpi.h" #include "pp_psm.h" +#include "vega10_hwmgr.h" extern const struct pp_smumgr_func ci_smu_funcs; extern const struct pp_smumgr_func smu8_smu_funcs; @@ -46,7 +47,6 @@ extern const struct pp_smumgr_func vega12_smu_funcs; extern const struct pp_smumgr_func smu10_smu_funcs; extern const struct pp_smumgr_func vega20_smu_funcs; -extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr); extern int smu10_init_function_pointers(struct pp_hwmgr *hwmgr); static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr); diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.h b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.h index f752b4ad0c8ae..07c06f8c90b09 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.h +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.h @@ -442,5 +442,6 @@ int vega10_update_uvd_dpm(struct pp_hwmgr *hwmgr, bool bgate); int vega10_update_samu_dpm(struct pp_hwmgr *hwmgr, bool bgate); int vega10_update_acp_dpm(struct pp_hwmgr *hwmgr, bool bgate); int vega10_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable); +int vega10_hwmgr_init(struct pp_hwmgr *hwmgr); #endif /* _VEGA10_HWMGR_H_ */ -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 12/40] drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Fix a bunch of kernel-doc formatting issues
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:5474:5: warning: no previous prototype for ‘vega10_hwmgr_init’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:551: warning: Function parameter or member 'hwmgr' not described in 'vega10_get_evv_voltages' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:609: warning: Function parameter or member 'hwmgr' not described in 'vega10_patch_with_vdd_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:609: warning: Function parameter or member 'voltage' not described in 'vega10_patch_with_vdd_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:609: warning: Function parameter or member 'leakage_table' not described in 'vega10_patch_with_vdd_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:637: warning: Function parameter or member 'hwmgr' not described in 'vega10_patch_lookup_table_with_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:637: warning: Function parameter or member 'lookup_table' not described in 'vega10_patch_lookup_table_with_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:637: warning: Function parameter or member 'leakage_table' not described in 'vega10_patch_lookup_table_with_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1013: warning: Function parameter or member 'hwmgr' not described in 'vega10_trim_voltage_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1013: warning: Function parameter or member 'vol_table' not described in 'vega10_trim_voltage_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1160: warning: Function parameter or member 'hwmgr' not described in 'vega10_construct_voltage_tables' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'hwmgr' not described in 'vega10_populate_single_gfx_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'gfx_clock' not described in 'vega10_populate_single_gfx_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'current_gfxclk_level' not described in 'vega10_populate_single_gfx_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1558: warning: Function parameter or member 'acg_freq' not described in 'vega10_populate_single_gfx_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1613: warning: Cannot understand * @brief Populates single SMC SOCCLK structure using the provided clock. drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1667: warning: Function parameter or member 'hwmgr' not described in 'vega10_populate_all_graphic_levels' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1750: warning: Cannot understand * @brief Populates single SMC GFXCLK structure using the provided clock. drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1811: warning: Cannot understand * @brief Populates all SMC MCLK levels' structure based on the trimmed allowed dpm memory clock states. drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:2496: warning: Function parameter or member 'hwmgr' not described in 'vega10_init_smc_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:2867: warning: Cannot understand * @brief Tell SMC to enabled the supported DPMs. Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- .../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 133 +- 1 file changed, 65 insertions(+), 68 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c index 1b47f94e03317..da470462d6e2c 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c @@ -542,11 +542,11 @@ static int vega10_get_socclk_for_voltage_evv(struct pp_hwmgr *hwmgr, #define ATOM_VIRTUAL_VOLTAGE_ID0 0xff01 /** -* Get Leakage VDDC based on leakage ID. -* -* @paramhwmgr the address of the powerplay hardware manager. -* @return always 0. -*/ + * Get Leakage VDDC based on leakage ID. + * + * @hwmgr: the address of the powerplay hardware manager. + * return: always 0. + */ static int vega10_get_evv_voltages(struct pp_hwmgr *hwmgr) { struct vega10_hwmgr *data = hwmgr->backend; @@ -600,9 +600,9 @@ static int vega10_get_evv_voltages(struct pp_hwmgr *hwmgr) /** * Change virtual leakage voltage to actual value. * - * @param hwmgr the address of the powerplay hardwar
[PATCH 38/40] drm/amd/display/dc/dce/dce_panel_cntl: Remove unused variables 'bl_pwm_cntl' and 'pwm_period_cntl'
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c: In function ‘dce_get_16_bit_backlight_from_pwm’: drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:54:11: warning: variable ‘bl_pwm_cntl’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_panel_cntl.c:53:11: warning: variable ‘pwm_period_cntl’ set but not used [-Wunused-but-set-variable] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Anthony Koo Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c b/drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c index 761fdfc1f5bd0..e923392358631 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c @@ -50,16 +50,16 @@ static unsigned int dce_get_16_bit_backlight_from_pwm(struct panel_cntl *panel_c { uint64_t current_backlight; uint32_t round_result; - uint32_t pwm_period_cntl, bl_period, bl_int_count; - uint32_t bl_pwm_cntl, bl_pwm, fractional_duty_cycle_en; + uint32_t bl_period, bl_int_count; + uint32_t bl_pwm, fractional_duty_cycle_en; uint32_t bl_period_mask, bl_pwm_mask; struct dce_panel_cntl *dce_panel_cntl = TO_DCE_PANEL_CNTL(panel_cntl); - pwm_period_cntl = REG_READ(BL_PWM_PERIOD_CNTL); + REG_READ(BL_PWM_PERIOD_CNTL); REG_GET(BL_PWM_PERIOD_CNTL, BL_PWM_PERIOD, &bl_period); REG_GET(BL_PWM_PERIOD_CNTL, BL_PWM_PERIOD_BITCNT, &bl_int_count); - bl_pwm_cntl = REG_READ(BL_PWM_CNTL); + REG_READ(BL_PWM_CNTL); REG_GET(BL_PWM_CNTL, BL_ACTIVE_INT_FRAC_CNT, (uint32_t *)(&bl_pwm)); REG_GET(BL_PWM_CNTL, BL_PWM_FRACTIONAL_EN, &fractional_duty_cycle_en); -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 35/40] drm/amd/display/dc/bios/command_table: Remove unused variable and associated comment
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table.c: In function ‘adjust_display_pll_v2’: drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table.c:1462:11: warning: unused variable ‘pixel_clock_10KHz_in’ [-Wunused-variable] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Lee Jones Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/bios/command_table.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.c b/drivers/gpu/drm/amd/display/dc/bios/command_table.c index dd893a1176979..66fe1d1810789 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.c @@ -1457,10 +1457,6 @@ static enum bp_result adjust_display_pll_v2( { enum bp_result result = BP_RESULT_FAILURE; - /* We need to convert from KHz units into 10KHz units and then convert -* output pixel clock back 10KHz-->KHz */ - uint32_t pixel_clock_10KHz_in = bp_params->pixel_clock / 10; - bp->cmd_helper->encoder_id_to_atom( dal_graphics_object_id_get_encoder_id(bp_params->encoder_object_id)); bp->cmd_helper->encoder_mode_bp_to_atom(bp_params->signal_type, false); -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 04/40] drm/amd/amdgpu/amdgpu_ih: Update 'amdgpu_ih_decode_iv_helper()'s function header
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c:220: warning: Function parameter or member 'ih' not described in 'amdgpu_ih_decode_iv_helper' drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c:220: warning: Function parameter or member 'entry' not described in 'amdgpu_ih_decode_iv_helper' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Felix Kuehling Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c index 725a9c73d51f0..dc852af4f3b76 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c @@ -209,6 +209,8 @@ int amdgpu_ih_process(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih) * amdgpu_ih_decode_iv_helper - decode an interrupt vector * * @adev: amdgpu_device pointer + * @ih: ih ring to process + * @entry: IV entry * * Decodes the interrupt vector at the current rptr * position and also advance the position for for Vega10 -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 40/40] drm/amd/display/dc/gpio/hw_factory: Delete unused function 'dal_hw_factory_destroy'
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/hw_factory.c:123:6: warning: no previous prototype for ‘dal_hw_factory_destroy’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c b/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c index da73bfb3cacd0..92c65d2fa7d71 100644 --- a/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +++ b/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c @@ -119,17 +119,3 @@ bool dal_hw_factory_init( return false; } } - -void dal_hw_factory_destroy( - struct dc_context *ctx, - struct hw_factory **factory) -{ - if (!factory || !*factory) { - BREAK_TO_DEBUGGER(); - return; - } - - kfree(*factory); - - *factory = NULL; -} -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 37/40] drm/amd/display/dc/dce/dce_i2c_sw: Make a bunch of local functions static
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_i2c_sw.c:342:6: warning: no previous prototype for ‘dce_i2c_sw_engine_set_speed’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_i2c_sw.c:356:6: warning: no previous prototype for ‘dce_i2c_sw_engine_acquire_engine’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_i2c_sw.c:400:6: warning: no previous prototype for ‘dce_i2c_sw_engine_submit_channel_request’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_i2c_sw.c:443:6: warning: no previous prototype for ‘dce_i2c_sw_engine_submit_payload’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c b/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c index 87d8428df6c46..6846afd83701b 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c @@ -339,7 +339,7 @@ static bool start_sync_sw( return false; } -void dce_i2c_sw_engine_set_speed( +static void dce_i2c_sw_engine_set_speed( struct dce_i2c_sw *engine, uint32_t speed) { @@ -353,7 +353,7 @@ void dce_i2c_sw_engine_set_speed( engine->clock_delay = 12; } -bool dce_i2c_sw_engine_acquire_engine( +static bool dce_i2c_sw_engine_acquire_engine( struct dce_i2c_sw *engine, struct ddc *ddc) { @@ -397,7 +397,7 @@ bool dce_i2c_engine_acquire_sw( -void dce_i2c_sw_engine_submit_channel_request( +static void dce_i2c_sw_engine_submit_channel_request( struct dce_i2c_sw *engine, struct i2c_request_transaction_data *req) { @@ -440,7 +440,8 @@ void dce_i2c_sw_engine_submit_channel_request( I2C_CHANNEL_OPERATION_SUCCEEDED : I2C_CHANNEL_OPERATION_FAILED; } -bool dce_i2c_sw_engine_submit_payload( + +static bool dce_i2c_sw_engine_submit_payload( struct dce_i2c_sw *engine, struct i2c_payload *payload, bool middle_of_transaction) -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 13/40] drm/amd/display/dc/basics/conversion: Demote obvious kernel-doc abuse
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:86: warning: Function parameter or member 'matrix' not described in 'convert_float_matrix' drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:86: warning: Function parameter or member 'flt' not described in 'convert_float_matrix' drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:86: warning: Function parameter or member 'buffer_size' not described in 'convert_float_matrix' drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:86: warning: Excess function parameter 'param' description in 'convert_float_matrix' Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Lee Jones Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/basics/conversion.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.c b/drivers/gpu/drm/amd/display/dc/basics/conversion.c index 24ed03d8cda74..6767fab55c260 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/conversion.c +++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.c @@ -73,12 +73,9 @@ uint16_t fixed_point_to_int_frac( return result; } -/** -* convert_float_matrix -* This converts a double into HW register spec defined format S2D13. -* @param : -* @return None -*/ +/* + * convert_float_matrix - This converts a double into HW register spec defined format S2D13. + */ void convert_float_matrix( uint16_t *matrix, struct fixed31_32 *flt, -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 07/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix documentation for 'mpll_param'
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:290: warning: Function parameter or member 'mpll_param' not described in 'atomctrl_get_memory_pll_dividers_si' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:290: warning: Excess function parameter 'dividers' description in 'atomctrl_get_memory_pll_dividers_si' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:339: warning: Function parameter or member 'mpll_param' not described in 'atomctrl_get_memory_pll_dividers_vi' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:339: warning: Excess function parameter 'dividers' description in 'atomctrl_get_memory_pll_dividers_vi' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c index 83a6504e093cb..b1038d30c8dcc 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c @@ -279,7 +279,7 @@ static const ATOM_VOLTAGE_OBJECT_V3 *atomctrl_lookup_voltage_type_v3( * * @hwmgr: input parameter: pointer to HwMgr * @clock_value: input parameter: memory clock - * @dividers:output parameter: memory PLL dividers + * @mpll_param: output parameter: memory clock parameters * @strobe_mode: input parameter: 1 for strobe mode, 0 for performance mode */ int atomctrl_get_memory_pll_dividers_si( @@ -332,7 +332,7 @@ int atomctrl_get_memory_pll_dividers_si( * * @hwmgr: input parameter: pointer to HwMgr * @clock_value: input parameter: memory clock - * @dividers: output parameter: memory PLL dividers + * @mpll_param:output parameter: memory clock parameters */ int atomctrl_get_memory_pll_dividers_vi(struct pp_hwmgr *hwmgr, uint32_t clock_value, pp_atomctrl_memory_clock_param *mpll_param) -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 10/40] drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix formatting and spelling issues
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:242: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_smc_voltage_controller' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: Function parameter or member 'us_max_fan_rpm' not described in 'smu7_set_max_fan_rpm_output' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: Excess function parameter 'usMaxFanRpm' description in 'smu7_set_max_fan_rpm_output' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c index 82676c086ce46..c57dc9ae81f2f 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c @@ -235,7 +235,7 @@ static int smu7_get_current_pcie_lane_number(struct pp_hwmgr *hwmgr) /** * smu7_enable_smc_voltage_controller - Enable voltage control * - * @hwmgr the address of the powerplay hardware manager. + * @hwmgr: the address of the powerplay hardware manager. * Return: always PP_Result_OK */ static int smu7_enable_smc_voltage_controller(struct pp_hwmgr *hwmgr) @@ -4501,7 +4501,7 @@ static int smu7_display_configuration_changed_task(struct pp_hwmgr *hwmgr) * smu7_set_max_fan_rpm_output - Set maximum target operating fan output RPM * * @hwmgr: the address of the powerplay hardware manager. - * @usMaxFanRpm: max operating fan RPM value. + * @us_max_fan_rpm: max operating fan RPM value. * Return: The response that came from the SMC. */ static int smu7_set_max_fan_rpm_output(struct pp_hwmgr *hwmgr, uint16_t us_max_fan_rpm) -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 34/40] drm/amd/display/dc/bios/bios_parser: Fix misspelling of function parameter
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: Function parameter or member 'ss_info' not described in 'get_ss_info_from_tbl' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: Excess function parameter 'ssinfo' description in 'get_ss_info_from_tbl' Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Lee Jones Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c index d2654c50b0b20..c67d21a5ee52f 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c @@ -987,8 +987,8 @@ static enum bp_result get_ss_info_from_internal_ss_info_tbl_V2_1( * * @bp: pointer to the BIOS parser * @id: spread sprectrum info index - * @ssinfo: sprectrum information structure, - * return:: BIOS parser result code + * @ss_info: sprectrum information structure, + * return: BIOS parser result code */ static enum bp_result get_ss_info_from_tbl( struct bios_parser *bp, -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 06/40] drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Provide description of 'call_back_func'
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1371: warning: Function parameter or member 'call_back_func' not described in 'get_powerplay_table_entry_v1_0' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c index 741e03ad5311f..f2a55c1413f59 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c @@ -1362,6 +1362,7 @@ static int ppt_get_vce_state_table_entry_v1_0(struct pp_hwmgr *hwmgr, uint32_t i * @hwmgr: Pointer to the hardware manager. * @entry_index: The index of the entry to be extracted from the table. * @power_state: The address of the PowerState instance being created. + * @call_back_func: The function to call into to fill power state * Return: -1 if the entry cannot be retrieved. */ int get_powerplay_table_entry_v1_0(struct pp_hwmgr *hwmgr, -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 00/40] [Set 11] Rid W=1 warnings from GPU
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. 300 out of 5000 left! Lee Jones (40): drm/nouveau/nvkm/subdev/bios/init: Demote obvious abuse of kernel-doc drm/nouveau/dispnv50/disp: Remove unused variable 'ret' drm/msm/dp/dp_display: Remove unused variable 'hpd' drm/amd/amdgpu/amdgpu_ih: Update 'amdgpu_ih_decode_iv_helper()'s function header drm/amd/amdgpu/vega20_ih: Add missing descriptions for 'ih' and fix spelling error drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Provide description of 'call_back_func' drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix documentation for 'mpll_param' drm/amd/pm/powerplay/hwmgr/vega12_hwmgr: Fix legacy function header formatting drm/amd/pm/powerplay/hwmgr/vega20_hwmgr: Fix legacy function header formatting drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix formatting and spelling issues drm/amd/pm/powerplay/hwmgr/hwmgr: Move prototype into shared header drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Fix a bunch of kernel-doc formatting issues drm/amd/display/dc/basics/conversion: Demote obvious kernel-doc abuse drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs: Demote non-kernel-doc comment blocks drm/amd/display/dc/bios/command_table_helper: Fix kernel-doc formatting drm/amd/display/dc/bios/command_table_helper2: Fix legacy formatting problems drm/amd/display/dc/bios/bios_parser: Make local functions static drm/amd/display/dc/bios/bios_parser: Fix a whole bunch of legacy doc formatting drm/amd/display/dc/bios/command_table: Remove unused variable include: drm: drm_atomic: Make use of 'new_plane_state' drm/amd/display/dc/calcs/dce_calcs: Remove unused variables 'v_filter_init_mode' and 'sclk_lvl' drm/amd/display/dc/bios/bios_parser2: Fix some formatting issues and missing parameter docs drm/amd/display/dc/dce/dce_audio: Make function invoked by reference static drm/amd/display/dc/dce/dce_stream_encoder: Remove unused variable 'regval' drm/amd/display/dc/dce/dce_link_encoder: Make functions invoked by reference static drm/amd/display/dc/dce/dce_clock_source: Fix formatting/spelling of worthy function headers drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Fix worthy function headers, demote barely documented one drm/amd/display/dc/dce/dce_transform: Remove 3 unused/legacy variables drm/amd/display/dc/dce/dce_dmcu: Staticify local function call 'dce_dmcu_load_iram' drm/amd/display/dc/dce/dce_dmcu: Move 'abm_gain_stepsize' to only source file it's used in drm/amd/display/dc/dce/dce_opp: Make local functions and ones invoked by reference static drm/amd/display/dc/dce/dce_aux: Remove unused function 'get_engine_type' drm/nouveau/nvkm/subdev/volt/gk20a: Demote non-conformant kernel-doc headers drm/amd/display/dc/bios/bios_parser: Fix misspelling of function parameter drm/amd/display/dc/bios/command_table: Remove unused variable and associated comment drm/amd/display/dc/dce/dce_i2c_hw: Make functions called by reference static drm/amd/display/dc/dce/dce_i2c_sw: Make a bunch of local functions static drm/amd/display/dc/dce/dce_panel_cntl: Remove unused variables 'bl_pwm_cntl' and 'pwm_period_cntl' drm/amd/display/dc/dce/dmub_psr: Demote non-conformant kernel-doc headers drm/amd/display/dc/gpio/hw_factory: Delete unused function 'dal_hw_factory_destroy' drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c| 2 + drivers/gpu/drm/amd/amdgpu/vega20_ih.c| 5 +- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 +- .../drm/amd/display/dc/basics/conversion.c| 9 +- .../gpu/drm/amd/display/dc/bios/bios_parser.c | 119 +- .../drm/amd/display/dc/bios/bios_parser2.c| 29 ++- .../drm/amd/display/dc/bios/command_table.c | 16 +- .../display/dc/bios/command_table_helper.c| 20 +- .../display/dc/bios/command_table_helper2.c | 20 +- .../gpu/drm/amd/display/dc/calcs/dce_calcs.c | 8 +- .../gpu/drm/amd/display/dc/dce/dce_audio.c| 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 6 - .../drm/amd/display/dc/dce/dce_clock_source.c | 57 +++-- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 6 +- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 2 - .../gpu/drm/amd/display/dc/dce/dce_i2c_hw.c | 4 +- .../gpu/drm/amd/display/dc/dce/dce_i2c_sw.c | 9 +- .../drm/amd/display/dc/dce/dce_link_encoder.c | 6 +- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 8 +- .../drm/amd/display/dc/dce/dce_panel_cntl.c | 8 +- .../amd/display/dc/dce/dce_stream_encoder.c | 3 +- .../drm/amd/display/dc/dce/dce_transform.c| 13 -- drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 22 +- .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 14 -- .../gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c| 2 +- .../drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 4 +- .../powerplay/
[PATCH 22/40] drm/amd/display/dc/bios/bios_parser2: Fix some formatting issues and missing parameter docs
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:501: warning: Function parameter or member 'dcb' not described in 'bios_parser_get_gpio_pin_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:501: warning: Function parameter or member 'gpio_id' not described in 'bios_parser_get_gpio_pin_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:501: warning: Function parameter or member 'info' not described in 'bios_parser_get_gpio_pin_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:815: warning: Function parameter or member 'dcb' not described in 'bios_parser_get_spread_spectrum_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:815: warning: Function parameter or member 'signal' not described in 'bios_parser_get_spread_spectrum_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:815: warning: Function parameter or member 'index' not described in 'bios_parser_get_spread_spectrum_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:815: warning: Function parameter or member 'ss_info' not described in 'bios_parser_get_spread_spectrum_info' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:1210: warning: Function parameter or member 'dcb' not described in 'bios_parser_set_scratch_critical_state' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:1210: warning: Function parameter or member 'state' not described in 'bios_parser_set_scratch_critical_state' Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- .../drm/amd/display/dc/bios/bios_parser2.c| 29 +-- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c index 670c265838178..9f9fda3118d1f 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c @@ -485,10 +485,11 @@ static struct atom_hpd_int_record *get_hpd_record( * bios_parser_get_gpio_pin_info * Get GpioPin information of input gpio id * - * @param gpio_id, GPIO ID - * @param info, GpioPin information structure - * @return Bios parser result code - * @note + * @dcb: pointer to the DC BIOS + * @gpio_id: GPIO ID + * @info:GpioPin information structure + * return: Bios parser result code + * note: * to get the GPIO PIN INFO, we need: * 1. get the GPIO_ID from other object table, see GetHPDInfo() * 2. in DATA_TABLE.GPIO_Pin_LUT, search all records, @@ -801,11 +802,11 @@ static enum bp_result get_ss_info_v4_2( * ver 3.1, * there is only one entry for each signal /ss id. However, there is * no planning of supporting multiple spread Sprectum entry for EverGreen - * @param [in] this - * @param [in] signal, ASSignalType to be converted to info index - * @param [in] index, number of entries that match the converted info index - * @param [out] ss_info, sprectrum information structure, - * @return Bios parser result code + * @dcb: pointer to the DC BIOS + * @signal: ASSignalType to be converted to info index + * @index: number of entries that match the converted info index + * @ss_info: sprectrum information structure, + * return: Bios parser result code */ static enum bp_result bios_parser_get_spread_spectrum_info( struct dc_bios *dcb, @@ -1196,13 +1197,11 @@ static bool bios_parser_is_accelerated_mode( } /** - * bios_parser_set_scratch_critical_state + * bios_parser_set_scratch_critical_state - update critical state bit + * in VBIOS scratch register * - * @brief - * update critical state bit in VBIOS scratch register - * - * @param - * bool - to set or reset state + * @dcb: pointer to the DC BIO + * @state: set or reset state */ static void bios_parser_set_scratch_critical_state( struct dc_bios *dcb, -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 17/40] drm/amd/display/dc/bios/bios_parser: Make local functions static
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2588:16: warning: no previous prototype for ‘update_slot_layout_info’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2692:16: warning: no previous prototype for ‘get_bracket_layout_record’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Igor Kravchenko Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c index 23a373ca94b5c..f054c5872c619 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c @@ -2585,7 +2585,7 @@ static struct integrated_info *bios_parser_create_integrated_info( return NULL; } -enum bp_result update_slot_layout_info( +static enum bp_result update_slot_layout_info( struct dc_bios *dcb, unsigned int i, struct slot_layout_info *slot_layout_info, @@ -2689,7 +2689,7 @@ enum bp_result update_slot_layout_info( } -enum bp_result get_bracket_layout_record( +static enum bp_result get_bracket_layout_record( struct dc_bios *dcb, unsigned int bracket_layout_id, struct slot_layout_info *slot_layout_info) -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 21/40] drm/amd/display/dc/calcs/dce_calcs: Remove unused variables 'v_filter_init_mode' and 'sclk_lvl'
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function ‘calculate_bandwidth’: drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:109:18: warning: variable ‘v_filter_init_mode’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function ‘bw_calcs’: drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:3031:21: warning: variable ‘sclk_lvl’ set but not used [-Wunused-but-set-variable] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c index ef41b287cbe23..158d927c03e55 100644 --- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c +++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c @@ -106,7 +106,6 @@ static void calculate_bandwidth( bool lpt_enabled; enum bw_defines sclk_message; enum bw_defines yclk_message; - enum bw_defines v_filter_init_mode[maximum_number_of_surfaces]; enum bw_defines tiling_mode[maximum_number_of_surfaces]; enum bw_defines surface_type[maximum_number_of_surfaces]; enum bw_defines voltage; @@ -792,12 +791,8 @@ static void calculate_bandwidth( data->v_filter_init[i] = bw_add(data->v_filter_init[i], bw_int_to_fixed(1)); } if (data->stereo_mode[i] == bw_def_top_bottom) { - v_filter_init_mode[i] = bw_def_manual; data->v_filter_init[i] = bw_min2(data->v_filter_init[i], bw_int_to_fixed(4)); } - else { - v_filter_init_mode[i] = bw_def_auto; - } if (data->stereo_mode[i] == bw_def_top_bottom) { data->num_lines_at_frame_start = bw_int_to_fixed(1); } @@ -3028,7 +3023,7 @@ bool bw_calcs(struct dc_context *ctx, calcs_output->all_displays_in_sync = false; if (data->number_of_displays != 0) { - uint8_t yclk_lvl, sclk_lvl; + uint8_t yclk_lvl; struct bw_fixed high_sclk = vbios->high_sclk; struct bw_fixed mid1_sclk = vbios->mid1_sclk; struct bw_fixed mid2_sclk = vbios->mid2_sclk; @@ -3049,7 +3044,6 @@ bool bw_calcs(struct dc_context *ctx, calculate_bandwidth(dceip, vbios, data); yclk_lvl = data->y_clk_level; - sclk_lvl = data->sclk_level; calcs_output->nbp_state_change_enable = data->nbp_state_change_enable; -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 25/40] drm/amd/display/dc/dce/dce_link_encoder: Make functions invoked by reference static
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_link_encoder.c:1200:6: warning: no previous prototype for ‘dce60_link_encoder_enable_dp_output’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_link_encoder.c:1239:6: warning: no previous prototype for ‘dce60_link_encoder_enable_dp_mst_output’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_link_encoder.c:1429:6: warning: no previous prototype for ‘dce60_link_encoder_dp_set_phy_pattern’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Mauro Rossi Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c index 210466b2d8631..0ef2f4d9d8bf3 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c @@ -1197,7 +1197,7 @@ void dce110_link_encoder_enable_dp_mst_output( #if defined(CONFIG_DRM_AMD_DC_SI) /* enables DP PHY output */ -void dce60_link_encoder_enable_dp_output( +static void dce60_link_encoder_enable_dp_output( struct link_encoder *enc, const struct dc_link_settings *link_settings, enum clock_source_id clock_source) @@ -1236,7 +1236,7 @@ void dce60_link_encoder_enable_dp_output( } /* enables DP PHY output in MST mode */ -void dce60_link_encoder_enable_dp_mst_output( +static void dce60_link_encoder_enable_dp_mst_output( struct link_encoder *enc, const struct dc_link_settings *link_settings, enum clock_source_id clock_source) @@ -1426,7 +1426,7 @@ void dce110_link_encoder_dp_set_phy_pattern( #if defined(CONFIG_DRM_AMD_DC_SI) /* set DP PHY test and training patterns */ -void dce60_link_encoder_dp_set_phy_pattern( +static void dce60_link_encoder_dp_set_phy_pattern( struct link_encoder *enc, const struct encoder_set_dp_phy_pattern_param *param) { -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 27/40] drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Fix worthy function headers, demote barely documented one
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1556: warning: Function parameter or member 'acg_freq' not described in 'vega10_populate_single_gfx_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1621: warning: Function parameter or member 'current_soc_did' not described in 'vega10_populate_single_soc_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1621: warning: Function parameter or member 'current_vol_index' not described in 'vega10_populate_single_soc_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1621: warning: Excess function parameter 'current_socclk_level' description in 'vega10_populate_single_soc_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1757: warning: Function parameter or member 'current_mem_vid' not described in 'vega10_populate_single_memory_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1757: warning: Function parameter or member 'current_memclk_level' not described in 'vega10_populate_single_memory_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1757: warning: Function parameter or member 'current_mem_soc_vind' not described in 'vega10_populate_single_memory_level' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:2871: warning: Function parameter or member 'bitmap' not described in 'vega10_start_dpm' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c index da470462d6e2c..29c99642d22d4 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c @@ -1549,6 +1549,7 @@ static int vega10_populate_smc_link_levels(struct pp_hwmgr *hwmgr) * @hwmgr: the address of the hardware manager * @gfx_clock: the GFX clock to use to populate the structure. * @current_gfxclk_level: location in PPTable for the SMC GFXCLK structure. + * @acg_freq: ACG frequenty to return (MHz) */ static int vega10_populate_single_gfx_level(struct pp_hwmgr *hwmgr, uint32_t gfx_clock, PllSetting_t *current_gfxclk_level, @@ -1612,7 +1613,8 @@ static int vega10_populate_single_gfx_level(struct pp_hwmgr *hwmgr, * * @hwmgr: the address of the hardware manager. * @soc_clock: the SOC clock to use to populate the structure. - * @current_socclk_level: location in PPTable for the SMC SOCCLK structure. + * @current_soc_did: DFS divider to pass back to caller + * @current_vol_index: index of current VDD to pass back to caller * return: 0 on success */ static int vega10_populate_single_soc_level(struct pp_hwmgr *hwmgr, @@ -1744,7 +1746,7 @@ static void vega10_populate_vddc_soc_levels(struct pp_hwmgr *hwmgr) } } -/** +/* * Populates single SMC GFXCLK structure using the provided clock. * * @hwmgr: the address of the hardware manager. @@ -2863,8 +2865,8 @@ static int vega10_stop_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap) /** * Tell SMC to enabled the supported DPMs. * - * @hwmgr: the address of the powerplay hardware manager. - * @bitmap bitmap for the features to enabled. + * @hwmgr: the address of the powerplay hardware manager. + * @bitmap: bitmap for the features to enabled. * return: 0 on at least one DPM is successfully enabled. */ static int vega10_start_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap) -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 29/40] drm/amd/display/dc/dce/dce_dmcu: Staticify local function call 'dce_dmcu_load_iram'
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.c:74:6: warning: no previous prototype for ‘dce_dmcu_load_iram’ [-Wmissing-prototypes] In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.c:31: Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Krunoslav Kovac Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c index f3ed8b619cafd..fa2b47d41ee2f 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c @@ -71,7 +71,7 @@ static bool dce_dmcu_init(struct dmcu *dmcu) return true; } -bool dce_dmcu_load_iram(struct dmcu *dmcu, +static bool dce_dmcu_load_iram(struct dmcu *dmcu, unsigned int start_offset, const char *src, unsigned int bytes) -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 39/40] drm/amd/display/dc/dce/dmub_psr: Demote non-conformant kernel-doc headers
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:38: warning: Function parameter or member 'raw_state' not described in 'convert_psr_state' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:81: warning: Function parameter or member 'dmub' not described in 'dmub_psr_get_state' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:81: warning: Function parameter or member 'state' not described in 'dmub_psr_get_state' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:97: warning: Function parameter or member 'dmub' not described in 'dmub_psr_set_version' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:97: warning: Function parameter or member 'stream' not described in 'dmub_psr_set_version' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:128: warning: Function parameter or member 'dmub' not described in 'dmub_psr_enable' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:128: warning: Function parameter or member 'enable' not described in 'dmub_psr_enable' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:128: warning: Function parameter or member 'wait' not described in 'dmub_psr_enable' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:177: warning: Function parameter or member 'dmub' not described in 'dmub_psr_set_level' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:177: warning: Function parameter or member 'psr_level' not described in 'dmub_psr_set_level' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:203: warning: Function parameter or member 'dmub' not described in 'dmub_psr_copy_settings' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:203: warning: Function parameter or member 'link' not described in 'dmub_psr_copy_settings' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:203: warning: Function parameter or member 'psr_context' not described in 'dmub_psr_copy_settings' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:284: warning: Function parameter or member 'dmub' not described in 'dmub_psr_force_static' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:301: warning: Function parameter or member 'dmub' not described in 'dmub_psr_get_residency' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:301: warning: Function parameter or member 'residency' not described in 'dmub_psr_get_residency' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:323: warning: Function parameter or member 'psr' not described in 'dmub_psr_construct' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:323: warning: Function parameter or member 'ctx' not described in 'dmub_psr_construct' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:332: warning: Function parameter or member 'ctx' not described in 'dmub_psr_create' drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:349: warning: Function parameter or member 'dmub' not described in 'dmub_psr_destroy' Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Wyatt Wood Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 22 +-- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c index 17e84f34ceba1..4228caa741193 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c @@ -31,7 +31,7 @@ #define MAX_PIPES 6 -/** +/* * Convert dmcub psr state to dmcu psr state. */ static enum dc_psr_state convert_psr_state(uint32_t raw_state) @@ -74,7 +74,7 @@ static enum dc_psr_state convert_psr_state(uint32_t raw_state) return state; } -/** +/* * Get PSR state from firmware. */ static void dmub_psr_get_state(struct dmub_psr *dmub, enum dc_psr_state *state) @@ -90,7 +90,7 @@ static void dmub_psr_get_state(struct dmub_psr *dmub, enum dc_psr_state *state) *state = convert_psr_state(raw_state); } -/** +/* * Set PSR version. */ static bool dmub_psr_set_version(struct dmub_psr *dmub, struct dc_stream_state *stream) @@ -121,7 +121,7 @@ static bool dmub_psr_set_version(struct dmub_psr *dmub, struct dc_stream_state * return true; } -/** +/* * Enable/Disable PSR. */ static void dmub_psr_enable(struct dmub_psr *dmub, bool enable, bool wait) @@ -170,7 +170,7 @@ static void dmub_psr_enable(struct dmub_psr *dmub, bool enable, bool wait) } } -/** +/* * Set PSR level. */ static void dmub_psr_set_level(struct dmub_psr *dmub, uint16_t psr_level) @@ -194,7 +194,7 @@ static void dmub_psr_set_level(struct dmub_psr *dmub, uint16_t psr_level) dc_dmub_srv_wait_idle(dc->dmub_srv); } -/** +/* * Setup PSR by programming phy registers and sending psr hw context values to firmware. */ s
[PATCH 15/40] drm/amd/display/dc/bios/command_table_helper: Fix kernel-doc formatting
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table_helper.c:131: warning: Function parameter or member 't' not described in 'dal_cmd_table_helper_transmitter_bp_to_atom' Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Mauro Rossi Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- .../display/dc/bios/command_table_helper.c| 20 --- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c index 48b4ef03fc8f8..5b77251e05909 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c @@ -114,18 +114,14 @@ bool dal_cmd_table_helper_controller_id_to_atom( } /** -* translate_transmitter_bp_to_atom -* -* @brief -* Translate the Transmitter to the corresponding ATOM BIOS value -* -* @param -* input transmitter -* output digitalTransmitter -*// =00: Digital Transmitter1 ( UNIPHY linkAB ) -*// =01: Digital Transmitter2 ( UNIPHY linkCD ) -*// =02: Digital Transmitter3 ( UNIPHY linkEF ) -*/ + * translate_transmitter_bp_to_atom - Translate the Transmitter to the + *corresponding ATOM BIOS value + * @t: transmitter + * returns: output digitalTransmitter + *// =00: Digital Transmitter1 ( UNIPHY linkAB ) + *// =01: Digital Transmitter2 ( UNIPHY linkCD ) + *// =02: Digital Transmitter3 ( UNIPHY linkEF ) + */ uint8_t dal_cmd_table_helper_transmitter_bp_to_atom( enum transmitter t) { -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 09/40] drm/amd/pm/powerplay/hwmgr/vega20_hwmgr: Fix legacy function header formatting
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_hwmgr.c:781: warning: Function parameter or member 'hwmgr' not described in 'vega20_init_smc_table' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c index da84012b7fd51..87811b005b85f 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c @@ -771,12 +771,11 @@ static int vega20_setup_default_dpm_tables(struct pp_hwmgr *hwmgr) } /** -* Initializes the SMC table and uploads it -* -* @paramhwmgr the address of the powerplay hardware manager. -* @parampInput the pointer to input data (PowerState) -* @return always 0 -*/ + * Initializes the SMC table and uploads it + * + * @hwmgr: the address of the powerplay hardware manager. + * return: always 0 + */ static int vega20_init_smc_table(struct pp_hwmgr *hwmgr) { int result; -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 31/40] drm/amd/display/dc/dce/dce_opp: Make local functions and ones invoked by reference static
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_opp.c:427:6: warning: no previous prototype for ‘dce60_opp_set_clamping’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_opp.c:548:6: warning: no previous prototype for ‘dce60_opp_program_bit_depth_reduction’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_opp.c:571:6: warning: no previous prototype for ‘dce60_opp_program_clamping_and_pixel_encoding’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_opp.c:681:6: warning: no previous prototype for ‘dce60_opp_program_fmt’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Mauro Rossi Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c index e459ae65aaf76..2bf8f5a2e0c22 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c @@ -424,7 +424,7 @@ void dce110_opp_set_clamping( * 7 for programable * 2) Enable clamp if Limited range requested */ -void dce60_opp_set_clamping( +static void dce60_opp_set_clamping( struct dce110_opp *opp110, const struct clamping_and_pixel_encoding_params *params) { @@ -545,7 +545,7 @@ void dce110_opp_program_bit_depth_reduction( } #if defined(CONFIG_DRM_AMD_DC_SI) -void dce60_opp_program_bit_depth_reduction( +static void dce60_opp_program_bit_depth_reduction( struct output_pixel_processor *opp, const struct bit_depth_reduction_params *params) { @@ -568,7 +568,7 @@ void dce110_opp_program_clamping_and_pixel_encoding( } #if defined(CONFIG_DRM_AMD_DC_SI) -void dce60_opp_program_clamping_and_pixel_encoding( +static void dce60_opp_program_clamping_and_pixel_encoding( struct output_pixel_processor *opp, const struct clamping_and_pixel_encoding_params *params) { @@ -678,7 +678,7 @@ void dce110_opp_program_fmt( } #if defined(CONFIG_DRM_AMD_DC_SI) -void dce60_opp_program_fmt( +static void dce60_opp_program_fmt( struct output_pixel_processor *opp, struct bit_depth_reduction_params *fmt_bit_depth, struct clamping_and_pixel_encoding_params *clamping) -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 08/40] drm/amd/pm/powerplay/hwmgr/vega12_hwmgr: Fix legacy function header formatting
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_hwmgr.c:728: warning: Function parameter or member 'hwmgr' not described in 'vega12_init_smc_table' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c index dc206fa88c5e5..c0753029a8e2a 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c @@ -718,12 +718,11 @@ static int vega12_save_default_power_profile(struct pp_hwmgr *hwmgr) #endif /** -* Initializes the SMC table and uploads it -* -* @paramhwmgr the address of the powerplay hardware manager. -* @parampInput the pointer to input data (PowerState) -* @return always 0 -*/ + * Initializes the SMC table and uploads it + * + * @hwmgr: the address of the powerplay hardware manager. + * return: always 0 + */ static int vega12_init_smc_table(struct pp_hwmgr *hwmgr) { int result; -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH 19/40] drm/amd/display/dc/bios/command_table: Remove unused variable
None of the surrounding code was removed just in case even a small fraction of it was functional. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table.c: In function ‘adjust_display_pll_v2’: drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table.c:1459:35: warning: variable ‘params’ set but not used [-Wunused-but-set-variable] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Qinglang Miao Cc: amd-gfx@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/bios/command_table.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.c b/drivers/gpu/drm/amd/display/dc/bios/command_table.c index 070459e3e4070..dd893a1176979 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.c @@ -1456,20 +1456,14 @@ static enum bp_result adjust_display_pll_v2( struct bp_adjust_pixel_clock_parameters *bp_params) { enum bp_result result = BP_RESULT_FAILURE; - ADJUST_DISPLAY_PLL_PS_ALLOCATION params = { 0 }; /* We need to convert from KHz units into 10KHz units and then convert * output pixel clock back 10KHz-->KHz */ uint32_t pixel_clock_10KHz_in = bp_params->pixel_clock / 10; - params.usPixelClock = cpu_to_le16((uint16_t)(pixel_clock_10KHz_in)); - params.ucTransmitterID = - bp->cmd_helper->encoder_id_to_atom( - dal_graphics_object_id_get_encoder_id( - bp_params->encoder_object_id)); - params.ucEncodeMode = - (uint8_t)bp->cmd_helper->encoder_mode_bp_to_atom( - bp_params->signal_type, false); + bp->cmd_helper->encoder_id_to_atom( + dal_graphics_object_id_get_encoder_id(bp_params->encoder_object_id)); + bp->cmd_helper->encoder_mode_bp_to_atom(bp_params->signal_type, false); return result; } -- 2.25.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx