[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_NEoM1RGoLS=a0HDtN20rOvKndiYCFRnzrc3JQn5ePzpQ@mail.gmail.com>
Date: Thu, 20 Aug 2020 14:20:18 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Christian König <christian.koenig@....com>
Cc: Furquan Shaikh <furquan@...gle.com>,
Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Alex Deucher <alexander.deucher@....com>,
Stylon Wang <stylon.wang@....com>, deepak.sharma@....com,
David Airlie <airlied@...ux.ie>, adurbin@...gle.com,
Roman Li <roman.li@....com>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
Mikita Lipski <mikita.lipski@....com>,
Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
Nicholas Kazlauskas <nicholas.kazlauskas@....com>
Subject: Re: [PATCH v2] drivers: gpu: amd: Initialize amdgpu_dm_backlight_caps
object to 0 in amdgpu_dm_update_backlight_caps
Applied. Thanks!
Alex
On Thu, Aug 20, 2020 at 5:01 AM Christian König
<christian.koenig@....com> wrote:
>
> Am 20.08.20 um 09:52 schrieb Furquan Shaikh:
> > In `amdgpu_dm_update_backlight_caps()`, there is a local
> > `amdgpu_dm_backlight_caps` object that is filled in by
> > `amdgpu_acpi_get_backlight_caps()`. However, this object is
> > uninitialized before the call and hence the subsequent check for
> > aux_support can fail since it is not initialized by
> > `amdgpu_acpi_get_backlight_caps()` as well. This change initializes
> > this local `amdgpu_dm_backlight_caps` object to 0.
> >
> > Signed-off-by: Furquan Shaikh <furquan@...gle.com>
>
> Reviewed-by: Christian König <christian.koenig@....com>
>
> > ---
> > v2: Switched to using memset for initialization of object.
> >
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > 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 e4b33c67b634..da072998ce48 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -2855,6 +2855,8 @@ static void amdgpu_dm_update_backlight_caps(struct amdgpu_display_manager *dm)
> > #if defined(CONFIG_ACPI)
> > struct amdgpu_dm_backlight_caps caps;
> >
> > + memset(&caps, 0, sizeof(caps));
> > +
> > if (dm->backlight_caps.caps_valid)
> > return;
> >
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Powered by blists - more mailing lists