From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
Dan Carpenter <dan.carpenter@linaro.org>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: clean up type of GUC_HXG_MSG_0_ORIGIN
Date: Mon, 8 Jan 2024 21:46:47 +0100 [thread overview]
Message-ID: <84a5c289-e2f6-4e30-a093-5a1c5b335057@intel.com> (raw)
In-Reply-To: <e5g3qkwvc3sjfpxcdvn43fiwbxthpblqgg2getxpbkd6g4lp5k@pgfm75tsg7wz>
On 08.01.2024 15:07, Lucas De Marchi wrote:
> On Mon, Jan 08, 2024 at 12:05:57PM +0300, Dan Carpenter wrote:
>> The GUC_HXG_MSG_0_ORIGIN definition should be unsigned. Currently it is
>> defined as INT_MIN. This doesn't cause a problem currently but it's
>> still worth cleaning up.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
>
> it seems there are a few more places to change to follow what was done
> in commit 962bd34bb457 ("drm/i915/uc: Fix undefined behavior due to
> shift overflowing the constant").
>
> +Michal
>
> Could we eventually share these abi includes with i915 so we don't
> keep fixing the same thing in 2 places?
it should be possible and I guess we should plan for that while
discussing all this new xe driver...
anyway, what about creating new intel/ folder under drm/ ?
- drm/intel/include/abi
guc_actions_abi.h
guc_klvs_abi.h
...
the only question would be what prefix should be used for macros:
just GUC_ or INTEL_GUC_ or XE_GUC_ ?
then we can also think of creating library with common helpers for GuC
(for encoding/decoding HXG messages, preparing ADS, reading logs, etc)
btw, we can also consider sharing register definitions:
- drm/intel/include/regs
xe_engine_regs.h
xe_gt_regs.h
xe_regs_defs.h
Michal
>
> Lucas De Marchi
>
>> ---
>> drivers/gpu/drm/xe/abi/guc_messages_abi.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/abi/guc_messages_abi.h
>> b/drivers/gpu/drm/xe/abi/guc_messages_abi.h
>> index 3d199016cf88..c04606872e48 100644
>> --- a/drivers/gpu/drm/xe/abi/guc_messages_abi.h
>> +++ b/drivers/gpu/drm/xe/abi/guc_messages_abi.h
>> @@ -40,7 +40,7 @@
>> */
>>
>> #define GUC_HXG_MSG_MIN_LEN 1u
>> -#define GUC_HXG_MSG_0_ORIGIN (0x1 << 31)
>> +#define GUC_HXG_MSG_0_ORIGIN (0x1U << 31)
>> #define GUC_HXG_ORIGIN_HOST 0u
>> #define GUC_HXG_ORIGIN_GUC 1u
>> #define GUC_HXG_MSG_0_TYPE (0x7 << 28)
>> --
>> 2.42.0
>>
next prev parent reply other threads:[~2024-01-08 20:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 9:05 [PATCH] drm/xe: clean up type of GUC_HXG_MSG_0_ORIGIN Dan Carpenter
2024-01-08 9:09 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-08 9:09 ` ✓ CI.checkpatch: " Patchwork
2024-01-08 9:10 ` ✓ CI.KUnit: " Patchwork
2024-01-08 9:18 ` ✓ CI.Build: " Patchwork
2024-01-08 9:18 ` ✓ CI.Hooks: " Patchwork
2024-01-08 9:20 ` ✓ CI.checksparse: " Patchwork
2024-01-08 9:54 ` ✓ CI.BAT: " Patchwork
2024-01-08 14:07 ` [PATCH] " Lucas De Marchi
2024-01-08 20:46 ` Michal Wajdeczko [this message]
2024-01-08 21:24 ` Lucas De Marchi
2024-01-09 16:47 ` Michal Wajdeczko
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=84a5c289-e2f6-4e30-a093-5a1c5b335057@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=dan.carpenter@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=mripard@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=tzimmermann@suse.de \
/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