<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 14.6667px;">Existing tools and
users expect that switching back to auto removes the</span><br style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 14.6667px;">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 14.6667px;">>manual clock settings. If you allow changing the clock in auto
mode,</span><br style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 14.6667px;">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 14.6667px;">>that won't happen any more.</span></p>
<br>
I have sent the patch v2 to fix this problem. user can swith back auto mode and all manual clock setting will be removed.
<div><br>
</div>
<div><br>
</div>
<div>><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 14.6667px;">One more reason why allowing the user to set pp_dpm_sckl/mclk
shouldn't </span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 14.6667px;">be allowed in auto-mode.</span></div>
<div><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 14.6667px;"><br>
</span></div>
<div>this is an old logic, maybe ref radeon driver.</div>
<div>Driver can allow to set pp_dpm_sclk/mclk range in auto/high/low mode.</div>
<div><br>
</div>
<div>Best Regards</div>
<div>Rex</div>
<div>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Kuehling, Felix<br>
<b>Sent:</b> Saturday, January 27, 2018 3:32 AM<br>
<b>To:</b> Zhu, Rex; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH 1/2] drm/amd/pp: Remove manual mode for power_dpm_force_performance_level</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On 2018-01-26 02:20 PM, Zhu, Rex wrote:<br>
><br>
> >1. You're breaking the semantics of the existing pp_dpm_sclk/mclk/pcie<br>
> > interfaces, which affects existing tools<br>
><br>
><br>
> Rex: I don't think the patch will affects existing tools.<br>
><br>
><br>
> User set "manual" to power_performance_level, and then change the<br>
> clock range through pp_dpm_sclk/mclk/pcie.<br>
><br>
><br>
> with this patch, User dont need to set "manual" command, if still<br>
> receive the manual command, driver just return sucess to user in order<br>
> not break existing<br>
><br>
> tools. <br>
><br>
<br>
Existing tools and users expect that switching back to auto removes the<br>
manual clock settings. If you allow changing the clock in auto mode,<br>
that won't happen any more.<br>
<br>
><br>
> >2. You're taking the clock limits out of the power profile.<br>
> > Automatically adjusting the minimum sclk/mclk is a requirement for<br>
> > the compute power profile<br>
><br>
><br>
> Rex: In vega10, under default comput mode(with<br>
> busy_set_point/fps/use_rlc_busy/min_active_level set), just two<br>
> performance levels left<br>
> (level0 and level7). and clock just switch between lowest and highest.<br>
><br>
> I am not sure in this case, driver still can set min sclk/mclk.<br>
<br>
One more reason why allowing the user to set pp_dpm_sckl/mclk shouldn't<br>
be allowed in auto-mode.<br>
<br>
Regards,<br>
Felix<br>
<br>
><br>
> Best Regards<br>
> Rex <br>
><br>
><br>
> ------------------------------------------------------------------------<br>
> *From:* Kuehling, Felix<br>
> *Sent:* Saturday, January 27, 2018 12:49 AM<br>
> *To:* Zhu, Rex; amd-gfx@lists.freedesktop.org<br>
> *Subject:* Re: [PATCH 1/2] drm/amd/pp: Remove manual mode for<br>
> power_dpm_force_performance_level<br>
> <br>
> Hi Rex,<br>
><br>
> I think I understand what you're trying to do. To summarize my concerns,<br>
> there are two reasons I'm against your plan:<br>
><br>
> 1. You're breaking the semantics of the existing pp_dpm_sclk/mclk/pcie<br>
> interfaces, which affects existing tools<br>
> 2. You're taking the clock limits out of the power profile.<br>
> Automatically adjusting the minimum sclk/mclk is a requirement for<br>
> the compute power profile<br>
><br>
> Regards,<br>
> Felix<br>
><br>
> On 2018-01-26 07:50 AM, Zhu, Rex wrote:<br>
> ><br>
> > Hi Felix,<br>
> ><br>
> ><br>
> > >That would make sense. But switching to manual mode would disable<br>
> > >profiles and automatic profile selection. That was one reason why I<br>
> > >objected to your plan to control profile clock limits using these<br>
> files.<br>
> ><br>
> > Rex:<br>
> ><br>
> ><br>
> > I am not very clear the old logic of gfx/compute power profile switch.<br>
> ><br>
> ><br>
> > But with new sysfs,<br>
> ><br>
> > <br>
> ><br>
> > The logic is(those sysfs are independent) <br>
> ><br>
> > 1. configure uphyst/downhyst/min_ativity through power_profile_mode,<br>
> ><br>
> > 2. adjust clock range through pp_dpm_sclk/mclk/pcie.(once this<br>
> > sysffs was called, set the dpm level mode to unknown)<br>
> ><br>
> > 3. adjust power limit through pp_od_power_limit(maybe equal to<br>
> > disable power containment).<br>
> ><br>
> > <br>
> ><br>
> > In those functions, driver do not check the dpm level mode. <br>
> ><br>
> > the dpm level mode just used by power_dpm_force_performance_level<br>
> > functions.<br>
> ><br>
> ><br>
> > Best Regards<br>
> ><br>
> > Rex<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > ------------------------------------------------------------------------<br>
> > *From:* Kuehling, Felix<br>
> > *Sent:* Friday, January 26, 2018 8:26 AM<br>
> > *To:* Zhu, Rex; amd-gfx@lists.freedesktop.org<br>
> > *Subject:* Re: [PATCH 1/2] drm/amd/pp: Remove manual mode for<br>
> > power_dpm_force_performance_level<br>
> > <br>
> > On 2018-01-25 07:07 PM, Zhu, Rex wrote:<br>
> > > I also think about this problem.<br>
> > > just think user should unforced clk level through pp dpm<br>
> > > sclk/mclk/pcie if they change the clock logic through those sysfs.<br>
> > ><br>
> > > The logic seems weird, As we supply many sysfs for adjust clock range.<br>
> > ><br>
> > > We can fix this problem by change current mode to manual mode after<br>
> > > user call pp dpm sclk/mclk/pcie.<br>
> > ><br>
> > > But another think,if user change back the clk range through pp dpm<br>
> clk.<br>
> > ><br>
> > > we are in manual mode, and user set auto mode, in fact, driver change<br>
> > > nothing.<br>
> ><br>
> > With profiles, switching back to auto mode would select the appropriate<br>
> > profile, which may have a different clock mask. For example for compute<br>
> > we enable only the highest two sclk levels.<br>
> ><br>
> > ><br>
> > > Comparatively speaking, better set manual mode after user call pp<br>
> > dpm clk.<br>
> ><br>
> > That would make sense. But switching to manual mode would disable<br>
> > profiles and automatic profile selection. That was one reason why I<br>
> > objected to your plan to control profile clock limits using these files.<br>
> ><br>
> > Regards,<br>
> > Felix<br>
> ><br>
> > > Thanks very much.<br>
> > ><br>
> > > Best Regards<br>
> > > Rex<br>
> > ><br>
> ------------------------------------------------------------------------<br>
> > > *From:* Kuehling, Felix<br>
> > > *Sent:* Friday, January 26, 2018 12:55:19 AM<br>
> > > *To:* amd-gfx@lists.freedesktop.org; Zhu, Rex<br>
> > > *Subject:* Re: [PATCH 1/2] drm/amd/pp: Remove manual mode for<br>
> > > power_dpm_force_performance_level<br>
> > > <br>
> > > This patch breaks unforcing of clocks, which is currently done by<br>
> > > switching back from "manual" to "auto". By removing "manual" mode, you<br>
> > > remove the ability to unset forced clocks.<br>
> > ><br>
> > > Regards,<br>
> > > Felix<br>
> > ><br>
> > ><br>
> > > On 2018-01-25 06:26 AM, Rex Zhu wrote:<br>
> > > > Driver do not maintain manual mode for dpm_force_performance_level,<br>
> > > > User can set sclk/mclk/pcie range through<br>
> > > pp_dpm_sclk/pp_dpm_mclk/pp_dpm_pcie<br>
> > > > directly.<br>
> > > ><br>
> > > > In order to not break currently tools,<br>
> > > > when set "manual" to power_dpm_force_performance_level<br>
> > > > driver will do nothing and just return successful.<br>
> > > ><br>
> > > > Change-Id: Iaf672b9abc7fa57b765ceb7fa2fba6ad3e80c50b<br>
> > > > Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
> > > > ---<br>
> > > > drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 +--<br>
> > > > drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 5 -----<br>
> > > > drivers/gpu/drm/amd/include/kgd_pp_interface.h | 15<br>
> > +++++++--------<br>
> > > > drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 4 ----<br>
> > > > drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 1 -<br>
> > > > drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 ------<br>
> > > > drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 ------<br>
> > > > 7 files changed, 8 insertions(+), 32 deletions(-)<br>
> > > ><br>
> > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> > > > index 1812009..66b4df0 100644<br>
> > > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> > > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> > > > @@ -152,7 +152,6 @@ static ssize_t<br>
> > > amdgpu_get_dpm_forced_performance_level(struct device *dev,<br>
> > > > (level == AMD_DPM_FORCED_LEVEL_AUTO) ?<br>
> "auto" :<br>
> > > > (level == AMD_DPM_FORCED_LEVEL_LOW) ? "low" :<br>
> > > > (level == AMD_DPM_FORCED_LEVEL_HIGH) ?<br>
> "high" :<br>
> > > > - (level == AMD_DPM_FORCED_LEVEL_MANUAL) ?<br>
> > > "manual" :<br>
> > > > (level ==<br>
> > > AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD) ? "profile_standard" :<br>
> > > > (level ==<br>
> > > AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK) ? "profile_min_sclk" :<br>
> > > > (level ==<br>
> > > AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK) ? "profile_min_mclk" :<br>
> > > > @@ -186,7 +185,7 @@ static ssize_t<br>
> > > amdgpu_set_dpm_forced_performance_level(struct device *dev,<br>
> > > > } else if (strncmp("auto", buf, strlen("auto")) == 0) {<br>
> > > > level = AMD_DPM_FORCED_LEVEL_AUTO;<br>
> > > > } else if (strncmp("manual", buf, strlen("manual")) == 0) {<br>
> > > > - level = AMD_DPM_FORCED_LEVEL_MANUAL;<br>
> > > > + pr_info("No need to set manual mode, Just go<br>
> ahead\n");<br>
> > > > } else if (strncmp("profile_exit", buf,<br>
> > > strlen("profile_exit")) == 0) {<br>
> > > > level = AMD_DPM_FORCED_LEVEL_PROFILE_EXIT;<br>
> > > > } else if (strncmp("profile_standard", buf,<br>
> > > strlen("profile_standard")) == 0) {<br>
> > > > diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c<br>
> > > b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c<br>
> > > > index ab45232..8ddc978 100644<br>
> > > > --- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c<br>
> > > > +++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c<br>
> > > > @@ -6639,11 +6639,6 @@ static int ci_dpm_force_clock_level(void<br>
> > *handle,<br>
> > > > struct amdgpu_device *adev = (struct amdgpu_device *)handle;<br>
> > > > struct ci_power_info *pi = ci_get_pi(adev);<br>
> > > > <br>
> > > > - if (adev->pm.dpm.forced_level & (AMD_DPM_FORCED_LEVEL_AUTO |<br>
> > > > - AMD_DPM_FORCED_LEVEL_LOW |<br>
> > > > - AMD_DPM_FORCED_LEVEL_HIGH))<br>
> > > > - return -EINVAL;<br>
> > > > -<br>
> > > > switch (type) {<br>
> > > > case PP_SCLK:<br>
> > > > if (!pi->sclk_dpm_key_disabled)<br>
> > > > diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h<br>
> > > b/drivers/gpu/drm/amd/include/kgd_pp_interface.h<br>
> > > > index b9aa9f4..3fab686 100644<br>
> > > > --- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h<br>
> > > > +++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h<br>
> > > > @@ -41,14 +41,13 @@ struct amd_vce_state {<br>
> > > > <br>
> > > > enum amd_dpm_forced_level {<br>
> > > > AMD_DPM_FORCED_LEVEL_AUTO = 0x1,<br>
> > > > - AMD_DPM_FORCED_LEVEL_MANUAL = 0x2,<br>
> > > > - AMD_DPM_FORCED_LEVEL_LOW = 0x4,<br>
> > > > - AMD_DPM_FORCED_LEVEL_HIGH = 0x8,<br>
> > > > - AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD = 0x10,<br>
> > > > - AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK = 0x20,<br>
> > > > - AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK = 0x40,<br>
> > > > - AMD_DPM_FORCED_LEVEL_PROFILE_PEAK = 0x80,<br>
> > > > - AMD_DPM_FORCED_LEVEL_PROFILE_EXIT = 0x100,<br>
> > > > + AMD_DPM_FORCED_LEVEL_LOW = 0x2,<br>
> > > > + AMD_DPM_FORCED_LEVEL_HIGH = 0x4,<br>
> > > > + AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD = 0x8,<br>
> > > > + AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK = 0x10,<br>
> > > > + AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK = 0x20,<br>
> > > > + AMD_DPM_FORCED_LEVEL_PROFILE_PEAK = 0x40,<br>
> > > > + AMD_DPM_FORCED_LEVEL_PROFILE_EXIT = 0x80,<br>
> > > > };<br>
> > > > <br>
> > > > enum amd_pm_state_type {<br>
> > > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c<br>
> > > b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c<br>
> > > > index dec8dd9..60d280c 100644<br>
> > > > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c<br>
> > > > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c<br>
> > > > @@ -1250,7 +1250,6 @@ static int cz_dpm_force_dpm_level(struct<br>
> > > pp_hwmgr *hwmgr,<br>
> > > > case AMD_DPM_FORCED_LEVEL_AUTO:<br>
> > > > ret = cz_phm_unforce_dpm_levels(hwmgr);<br>
> > > > break;<br>
> > > > - case AMD_DPM_FORCED_LEVEL_MANUAL:<br>
> > > > case AMD_DPM_FORCED_LEVEL_PROFILE_EXIT:<br>
> > > > default:<br>
> > > > break;<br>
> > > > @@ -1558,9 +1557,6 @@ static int cz_get_dal_power_level(struct<br>
> > > pp_hwmgr *hwmgr,<br>
> > > > static int cz_force_clock_level(struct pp_hwmgr *hwmgr,<br>
> > > > enum pp_clock_type type, uint32_t mask)<br>
> > > > {<br>
> > > > - if (hwmgr->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL)<br>
> > > > - return -EINVAL;<br>
> > > > -<br>
> > > > switch (type) {<br>
> > > > case PP_SCLK:<br>
> > > > smum_send_msg_to_smc_with_parameter(hwmgr,<br>
> > > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c<br>
> > > b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c<br>
> > > > index 409a56b..eddcbcd 100644<br>
> > > > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c<br>
> > > > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c<br>
> > > > @@ -605,7 +605,6 @@ static int rv_dpm_force_dpm_level(struct<br>
> > > pp_hwmgr *hwmgr,<br>
> > > > <br>
> > > PPSMC_MSG_SetSoftMaxFclkByFreq,<br>
> > > > <br>
> > > RAVEN_UMD_PSTATE_MIN_FCLK);<br>
> > > > break;<br>
> > > > - case AMD_DPM_FORCED_LEVEL_MANUAL:<br>
> > > > case AMD_DPM_FORCED_LEVEL_PROFILE_EXIT:<br>
> > > > default:<br>
> > > > break;<br>
> > > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
> > > b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
> > > > index 13db75c..e3a8374 100644<br>
> > > > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
> > > > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
> > > > @@ -2798,7 +2798,6 @@ static int smu7_force_dpm_level(struct<br>
> > > pp_hwmgr *hwmgr,<br>
> > > > smu7_force_clock_level(hwmgr, PP_MCLK, 1<<mclk_mask);<br>
> > > > smu7_force_clock_level(hwmgr, PP_PCIE, 1<<pcie_mask);<br>
> > > > break;<br>
> > > > - case AMD_DPM_FORCED_LEVEL_MANUAL:<br>
> > > > case AMD_DPM_FORCED_LEVEL_PROFILE_EXIT:<br>
> > > > default:<br>
> > > > break;<br>
> > > > @@ -4311,11 +4310,6 @@ static int smu7_force_clock_level(struct<br>
> > > pp_hwmgr *hwmgr,<br>
> > > > {<br>
> > > > struct smu7_hwmgr *data = (struct smu7_hwmgr<br>
> > *)(hwmgr->backend);<br>
> > > > <br>
> > > > - if (hwmgr->request_dpm_level & (AMD_DPM_FORCED_LEVEL_AUTO |<br>
> > > > - AMD_DPM_FORCED_LEVEL_LOW |<br>
> > > > - AMD_DPM_FORCED_LEVEL_HIGH))<br>
> > > > - return -EINVAL;<br>
> > > > -<br>
> > > > switch (type) {<br>
> > > > case PP_SCLK:<br>
> > > > if (!data->sclk_dpm_key_disabled)<br>
> > > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
> > > b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
> > > > index 6b28896..828677e 100644<br>
> > > > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
> > > > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
> > > > @@ -4241,7 +4241,6 @@ static int vega10_dpm_force_dpm_level(struct<br>
> > > pp_hwmgr *hwmgr,<br>
> > > > vega10_force_clock_level(hwmgr, PP_SCLK,<br>
> 1<<sclk_mask);<br>
> > > > vega10_force_clock_level(hwmgr, PP_MCLK,<br>
> 1<<mclk_mask);<br>
> > > > break;<br>
> > > > - case AMD_DPM_FORCED_LEVEL_MANUAL:<br>
> > > > case AMD_DPM_FORCED_LEVEL_PROFILE_EXIT:<br>
> > > > default:<br>
> > > > break;<br>
> > > > @@ -4500,11 +4499,6 @@ static int vega10_force_clock_level(struct<br>
> > > pp_hwmgr *hwmgr,<br>
> > > > {<br>
> > > > struct vega10_hwmgr *data = (struct vega10_hwmgr<br>
> > > *)(hwmgr->backend);<br>
> > > > <br>
> > > > - if (hwmgr->request_dpm_level & (AMD_DPM_FORCED_LEVEL_AUTO |<br>
> > > > - AMD_DPM_FORCED_LEVEL_LOW |<br>
> > > > - AMD_DPM_FORCED_LEVEL_HIGH))<br>
> > > > - return -EINVAL;<br>
> > > > -<br>
> > > > switch (type) {<br>
> > > > case PP_SCLK:<br>
> > > > data->smc_state_table.gfx_boot_level = mask ?<br>
> > > (ffs(mask) - 1) : 0;<br>
> > ><br>
> ><br>
><br>
<br>
</div>
</span></font></div>
</div>
</div>
</div>
</body>
</html>