From: "André Almeida" <andrealmeid@igalia.com>
To: Magali Lemes <magalilemes00@gmail.com>
Cc: siqueirajordao@riseup.net, sunpeng.li@amd.com,
tales.aparecida@gmail.com, airlied@linux.ie, Xinhui.Pan@amd.com,
Rodrigo.Siqueira@amd.com, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, mwen@igalia.com,
mairacanal@riseup.net, dri-devel@lists.freedesktop.org,
daniel@ffwll.ch, alexander.deucher@amd.com, isabbasso@riseup.net,
andrealmeid@riseup.net, harry.wentland@amd.com,
christian.koenig@amd.com
Subject: Re: [PATCH 1/2] drm/amd/display: change variables type
Date: Tue, 26 Jul 2022 17:09:15 -0300 [thread overview]
Message-ID: <63594d3f-bf14-cf96-ecdb-5e12b4cd4472@igalia.com> (raw)
In-Reply-To: <4f359e30-90f8-c8bf-4e07-6856fcfd3506@gmail.com>
Às 17:47 de 25/07/22, Magali Lemes escreveu:
>
> On 7/25/22 16:42, André Almeida wrote:
>> Hi Magali,
>>
>> Às 15:15 de 25/07/22, Magali Lemes escreveu:
>>> As "dcn3_15_soc" and "dcn3_16_soc" are of type "struct
>>> _vcs_dpi_soc_bounding_box_st", change their types accordingly.
>>>
>> I can see that indeed this type change sense for those variables, but
>> isn't a bit strange that the type was wrong in the first place? I wonder
>> if this variable is even used, given that it would very likely throw a
>> compiler error when using the wrong type and trying to access struct
>> members that aren't defined.
>
>
> A compilation error would be thrown if either
> "dc/dcn315/dcn315_resource.h" or "dc/dcn316/dcn316_resource.h" were
> included in the files where "dcn3_15_soc" and "dcn3_16_soc" are
> initialized. Since they are not included, the wrong variable type error
> is not shown.
> To solve the sparse warning in the second patch of this series, those
> variables need to be declared first, but they are already declared,
> we're only missing the headers. If I only add the headers, then those
> variables will be seen, and I get the expected incompatible variables
> types error. So, fixing the types here is a preliminary work for the
> next patch.
>
And what happens if you just drop this declaration? It still not clear
to me why this belongs to this header, giving that AFAIK this var is
only used at drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c
Note that this kind of information you explained to me would be very
useful if you had included it in a cover letter to add more context for
your patches :)
>
> Magali
>
>
>>
>>> Signed-off-by: Magali Lemes <magalilemes00@gmail.com>
>>> ---
>>> drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h | 2 +-
>>> drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h | 2 +-
>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h
>>> b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h
>>> index 39929fa67a51..45276317c057 100644
>>> --- a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h
>>> +++ b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h
>>> @@ -32,7 +32,7 @@
>>> container_of(pool, struct dcn315_resource_pool, base)
>>> extern struct _vcs_dpi_ip_params_st dcn3_15_ip;
>>> -extern struct _vcs_dpi_ip_params_st dcn3_15_soc;
>>> +extern struct _vcs_dpi_soc_bounding_box_st dcn3_15_soc;
>>> struct dcn315_resource_pool {
>>> struct resource_pool base;
>>> diff --git a/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h
>>> b/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h
>>> index 0dc5a6c13ae7..d2234aac5449 100644
>>> --- a/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h
>>> +++ b/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h
>>> @@ -32,7 +32,7 @@
>>> container_of(pool, struct dcn316_resource_pool, base)
>>> extern struct _vcs_dpi_ip_params_st dcn3_16_ip;
>>> -extern struct _vcs_dpi_ip_params_st dcn3_16_soc;
>>> +extern struct _vcs_dpi_soc_bounding_box_st dcn3_16_soc;
>>> struct dcn316_resource_pool {
>>> struct resource_pool base;
next prev parent reply other threads:[~2022-07-26 20:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 18:15 Magali Lemes
2022-07-25 18:15 ` [PATCH 2/2] drm/amd/display: include missing headers Magali Lemes
2022-07-25 23:58 ` Melissa Wen
2022-07-25 19:42 ` [PATCH 1/2] drm/amd/display: change variables type André Almeida
2022-07-25 20:47 ` Magali Lemes
2022-07-25 23:38 ` Melissa Wen
2022-07-26 12:06 ` Magali Lemes
2022-07-27 0:11 ` Melissa Wen
2022-07-26 20:09 ` André Almeida [this message]
2022-07-25 21:18 ` Maíra Canal
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=63594d3f-bf14-cf96-ecdb-5e12b4cd4472@igalia.com \
--to=andrealmeid@igalia.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrealmeid@riseup.net \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=isabbasso@riseup.net \
--cc=linux-kernel@vger.kernel.org \
--cc=magalilemes00@gmail.com \
--cc=mairacanal@riseup.net \
--cc=mwen@igalia.com \
--cc=siqueirajordao@riseup.net \
--cc=sunpeng.li@amd.com \
--cc=tales.aparecida@gmail.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
all inboxes | Powered by JetHome®