[Intel-gfx] drivers/gpu/drm/i915/intel_pm.c:4467: bad comparison ?
Mahesh Kumar
mahesh1.kumar at intel.com
Mon Jul 17 10:32:10 UTC 2017
Hi,
On Monday 17 July 2017 03:22 PM, Jani Nikula wrote:
> On Mon, 17 Jul 2017, David Binderman <dcb314 at hotmail.com> wrote:
>> Hello there,
> Hello. No need to include LKML for stuff like this. But Cc'd the folks
> from the broken commit.
>
>> drivers/gpu/drm/i915/intel_pm.c:4467]: (warning) Comparison of a boolean expression with an integer other than 0 or 1.
>>
>> Source code is
>>
>> else if ((ddb_allocation && ddb_allocation /
>> fixed_16_16_to_u32_round_up(plane_blocks_per_line)) >= 1)
ddb_allocation being integer was intentional.
Other than that code has improper parentheses as well.
intention was if ddb_allocation is not 0 & (ddb_allocation /
plane_blocks_per_line >= 1) then execute the condition.
it should have been
else if (ddb_allocation && (ddb_allocation /
fixed_16_16_to_u32_round_up(plane_blocks_per_line) >= 1))
will post a fix.
thanks.
-Mahesh
> Broken by
>
> commit d555cb5827d603244969e08444340e3db78c8a37
> Author: Kumar, Mahesh <mahesh1.kumar at intel.com>
> Date: Wed May 17 17:28:29 2017 +0530
>
> drm/i915/skl+: use linetime latency if ddb size is not available
>
> The broken code has since been removed by bb9d85f6e9de ("drm/i915/skl:
> New ddb allocation algorithm") but restored by 9a30a26122c3 ("Revert
> "drm/i915/skl: New ddb allocation algorithm""). *sigh*.
>
> Mahesh et al, please figure it out.
>
>
> BR,
> Jani.
>
>
More information about the Intel-gfx
mailing list