From: "Kazlauskas, Nicholas" <nicholas.kazlauskas@amd.com>
To: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>,
amd-gfx@lists.freedesktop.org
Cc: alexdeucher@gmail.com, sunpeng.li@amd.com,
harry.wentland@amd.com, maraeo@gmail.com, daniel@ffwll.ch
Subject: Re: [PATCH v3 02/11] drm/amd: Init modifier field of helper fb.
Date: Mon, 26 Oct 2020 09:50:57 -0400 [thread overview]
Message-ID: <247850f2-2dbd-ad7b-ce84-be057b77d616@amd.com> (raw)
In-Reply-To: <20201021233130.874615-3-bas@basnieuwenhuizen.nl>
On 2020-10-21 7:31 p.m., Bas Nieuwenhuizen wrote:
> Otherwise the field ends up being used uninitialized when
> enabling modifiers, failing validation with high likelyhood.
>
> Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> index e2c2eb45a793..77dd2a189746 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> @@ -201,7 +201,7 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
> struct amdgpu_device *adev = rfbdev->adev;
> struct fb_info *info;
> struct drm_framebuffer *fb = NULL;
> - struct drm_mode_fb_cmd2 mode_cmd;
> + struct drm_mode_fb_cmd2 mode_cmd = {0};
I think we should prefer a memset in this case. I always forget which
compilers complain about this syntax but I know we've had to swap out a
bunch of zero initializers to satisfy them.
Regards,
Nicholas Kazlauskas
> struct drm_gem_object *gobj = NULL;
> struct amdgpu_bo *abo = NULL;
> int ret;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2020-10-26 13:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 23:31 [PATCH v3 00/11] amd/display: Add GFX9+ modifier support Bas Nieuwenhuizen
2020-10-21 23:31 ` [PATCH v3 01/11] drm/amd/display: Do not silently accept DCC for multiplane formats Bas Nieuwenhuizen
2020-10-26 13:50 ` Kazlauskas, Nicholas
2020-10-21 23:31 ` [PATCH v3 02/11] drm/amd: Init modifier field of helper fb Bas Nieuwenhuizen
2020-10-26 13:50 ` Kazlauskas, Nicholas [this message]
2020-10-21 23:31 ` [PATCH v3 03/11] drm/amd/display: Honor the offset for plane 0 Bas Nieuwenhuizen
2020-10-22 15:36 ` Alex Deucher
2020-10-22 16:10 ` Greg KH
2020-10-26 13:51 ` Kazlauskas, Nicholas
2020-10-21 23:31 ` [PATCH v3 04/11] drm/fourcc: Add AMD DRM modifiers Bas Nieuwenhuizen
2020-10-22 15:41 ` Alex Deucher
2020-10-22 16:39 ` Bas Nieuwenhuizen
2020-10-21 23:31 ` [PATCH v3 05/11] drm/amd/display: Store tiling_flags in the framebuffer Bas Nieuwenhuizen
2020-10-26 13:54 ` Kazlauskas, Nicholas
2020-10-21 23:31 ` [PATCH v3 06/11] drm/amd/display: Convert tiling_flags to modifiers Bas Nieuwenhuizen
2020-10-21 23:31 ` [PATCH v3 07/11] drm/amd/display: Refactor surface tiling setup Bas Nieuwenhuizen
2020-10-26 13:58 ` Kazlauskas, Nicholas
2020-10-21 23:31 ` [PATCH v3 08/11] drm/amd/display: Set DC options from modifiers Bas Nieuwenhuizen
2020-10-21 23:31 ` [PATCH v3 09/11] drm/amd/display: Add formats for DCC with 2/3 planes Bas Nieuwenhuizen
2020-10-21 23:31 ` [PATCH v3 10/11] drm/amd/display: Expose modifiers Bas Nieuwenhuizen
2020-10-22 5:50 ` Alex Deucher
2020-10-22 11:44 ` Bas Nieuwenhuizen
2020-10-21 23:31 ` [PATCH v3 11/11] drm/amd/display: Clean up GFX9 tiling_flags path Bas Nieuwenhuizen
2020-10-22 16:55 ` [PATCH v3 00/11] amd/display: Add GFX9+ modifier support Alex Deucher
2020-10-26 8:28 ` Pierre-Eric Pelloux-Prayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=247850f2-2dbd-ad7b-ce84-be057b77d616@amd.com \
--to=nicholas.kazlauskas@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bas@basnieuwenhuizen.nl \
--cc=daniel@ffwll.ch \
--cc=harry.wentland@amd.com \
--cc=maraeo@gmail.com \
--cc=sunpeng.li@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).