[PATCH] drm/amdgpu/powerplay: enable LEDs on Fiji boards

Deucher, Alexander Alexander.Deucher at amd.com
Fri Feb 24 03:41:00 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Edward O'Callaghan
> Sent: Thursday, February 23, 2017 7:51 PM
> To: Alex Deucher; Alexandre Demers
> Cc: Freedesktop - AMD-gfx
> Subject: Re: [PATCH] drm/amdgpu/powerplay: enable LEDs on Fiji boards
> 
> Hi guys,
> 
> Shouldn't this hook into the "led framework" of the kernel?
> 
> https://www.kernel.org/doc/Documentation/leds/leds-class.txt

The LEDs are not directly controllable by the driver.  The SMU microcontroller actually controls them (it lights them up in a pattern based on dpm states), we just tell the SMU to enable the functionality.

Alex

> 
> Kind Regards,
> Edward.
> 
> On 02/24/2017 10:03 AM, Alex Deucher wrote:
> > On Thu, Feb 23, 2017 at 5:50 PM, Alexandre Demers
> > <alexandre.f.demers at gmail.com> wrote:
> >> First, sorry for not replying directly as I should normally, but I'm not on
> >> my usual computer, so I can't. That being said...
> >>
> >> I may have my eyes in the same socket right now, but I think
> >> fiji_setup_dpm_led_config() always returns 0.
> >>
> >>> + if (mask)
> >>> + smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
> >>> +    PPSMC_MSG_LedConfig,
> >>> +    mask);
> >>> + return 0;
> >>> +}
> >>
> >> Even when "if (mask)" is true, whether
> smum_send_msg_to_smc_with_parameter()
> >> succeeds or not, fiji_setup_dpm_led_config() spits a 0 at the end.
> >>
> >> Thus,
> >>
> >>> + result = fiji_setup_dpm_led_config(hwmgr);
> >>> + PP_ASSERT_WITH_CODE(0 == result,
> >>> +    "Failed to setup dpm led config", return result);
> >>
> >> will always lead to "result" being set to 0... Am I missing something?
> >>
> >
> > Yes, that function can't fail.  I suppose we could just make it a void
> > function, but I was following the same pattern of all the other
> > functions in that file.
> >
> > Alex
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> >



More information about the amd-gfx mailing list