[bug report] drm/amdgpu/vpe: enable vpe dpm

SHANMUGAM, SRINIVASAN SRINIVASAN.SHANMUGAM at amd.com
Mon Jan 8 04:04:06 UTC 2024


[Public]

+ Srinath, Tim

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: SHANMUGAM, SRINIVASAN
Sent: Saturday, January 6, 2024 10:06:33 AM
To: Dan Carpenter <dan.carpenter at linaro.org>; Lee, Peyton <Peyton.Lee at amd.com>
Cc: dri-devel at lists.freedesktop.org <dri-devel at lists.freedesktop.org>; amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Subject: RE: [bug report] drm/amdgpu/vpe: enable vpe dpm

Hi Dan Carpenter,

This was fixed in https://patchwork.freedesktop.org/patch/573477/?series=128249&rev=1

Thank you!

Regards,
Srini

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Dan Carpenter
Sent: Friday, January 5, 2024 7:04 PM
To: Lee, Peyton <Peyton.Lee at amd.com>
Cc: dri-devel at lists.freedesktop.org; amd-gfx at lists.freedesktop.org
Subject: [bug report] drm/amdgpu/vpe: enable vpe dpm

Hello Peyton Lee,

The patch 5f82a0c90cca: "drm/amdgpu/vpe: enable vpe dpm" from Dec 12,
2023 (linux-next), leads to the following Smatch static checker
warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:62 vpe_u1_8_from_fraction() warn: unsigned 'numerator' is never less than zero.
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:63 vpe_u1_8_from_fraction() warn: unsigned 'denominator' is never less than zero.

drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
    60 static uint16_t vpe_u1_8_from_fraction(uint16_t numerator, uint16_t denominator)
    61 {
--> 62         bool arg1_negative = numerator < 0;
    63         bool arg2_negative = denominator < 0;

uint16_t can't be negative.

    64
    65         uint16_t arg1_value = (uint16_t)(arg1_negative ? -numerator : numerator);
    66         uint16_t arg2_value = (uint16_t)(arg2_negative ? -denominator : denominator);
    67
    68         uint16_t remainder;
    69

regards,
dan carpenter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20240108/863e00e6/attachment-0001.htm>


More information about the amd-gfx mailing list