Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <dev@lankhorst.se>
To: Matthew Brost <matthew.brost@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v7 03/12] drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node
Date: Thu, 16 Oct 2025 08:13:44 +0200	[thread overview]
Message-ID: <52cccc2a-6958-4701-824b-3897bbdf366f@lankhorst.se> (raw)
In-Reply-To: <aPAW2H5JAyOFXl69@lstrano-desk.jf.intel.com>

Hey,

Den 2025-10-15 kl. 23:49, skrev Matthew Brost:
> On Wed, Oct 15, 2025 at 09:47:12AM +0200, Maarten Lankhorst wrote:
>> This function makes it possible to add an offset that is applied to
>> all xe_ggtt_node's, and hides the internals from all its users.
>>
>> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
>> ---
>>  drivers/gpu/drm/xe/xe_bo.h   |  8 +++++---
>>  drivers/gpu/drm/xe/xe_ggtt.c | 11 +++++++++++
>>  drivers/gpu/drm/xe/xe_ggtt.h |  2 ++
>>  3 files changed, 18 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
>> index 353d607d301da..dd67a6f40a16d 100644
>> --- a/drivers/gpu/drm/xe/xe_bo.h
>> +++ b/drivers/gpu/drm/xe/xe_bo.h
>> @@ -9,6 +9,7 @@
>>  #include <drm/ttm/ttm_tt.h>
>>  
>>  #include "xe_bo_types.h"
>> +#include "xe_ggtt.h"
>>  #include "xe_macros.h"
>>  #include "xe_validation.h"
>>  #include "xe_vm_types.h"
>> @@ -251,13 +252,14 @@ static inline u32
>>  __xe_bo_ggtt_addr(struct xe_bo *bo, u8 tile_id)
>>  {
>>  	struct xe_ggtt_node *ggtt_node = bo->ggtt_node[tile_id];
>> +	u64 offset;
>>  
>>  	if (XE_WARN_ON(!ggtt_node))
>>  		return 0;
>>  
>> -	XE_WARN_ON(ggtt_node->base.size > xe_bo_size(bo));
> 
> Is there any reason this warning was dropped? It's not immediately
> obvious to me why it would be.
> 
The impossibility because of being allocated with a different size
than xe_bo_size() in __xe_ggtt_insert_bo_at(). I dropped it
because it's redundant.

Kind regards,
~Maarten Lankhorst

  reply	other threads:[~2025-10-16  6:13 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15  7:47 [PATCH v7 00/12] drm/xe: Make all xe_ggtt structs private Maarten Lankhorst
2025-10-15  7:47 ` [PATCH v7 01/12] drm/xe: Start using ggtt->start in preparation of balloon removal Maarten Lankhorst
2025-10-15  7:47 ` [PATCH v7 02/12] drm/xe: Convert xe_fb_pin to use a callback for insertion into GGTT Maarten Lankhorst
2025-10-15  7:47 ` [PATCH v7 03/12] drm/xe: Add xe_ggtt_node_addr() to avoid dereferencing xe_ggtt_node Maarten Lankhorst
2025-10-15 21:49   ` Matthew Brost
2025-10-16  6:13     ` Maarten Lankhorst [this message]
2025-10-17 20:53       ` Matthew Brost
2025-10-15  7:47 ` [PATCH v7 04/12] drm/xe/display: Avoid " Maarten Lankhorst
2025-10-15 21:53   ` Matthew Brost
2025-10-15  7:47 ` [PATCH v7 05/12] drm/xe: Do not dereference ggtt_node in xe_bo.c Maarten Lankhorst
2025-10-15 21:58   ` Matthew Brost
2025-10-16  6:33     ` Maarten Lankhorst
2025-10-17 20:54       ` Matthew Brost
2025-10-15  7:47 ` [PATCH v7 06/12] drm/xe: Improve xe_gt_sriov_pf_config GGTT handling Maarten Lankhorst
2025-10-15 22:04   ` Matthew Brost
2025-10-16  8:50     ` Michal Wajdeczko
2025-10-16 13:46       ` Maarten Lankhorst
2025-10-16 13:58         ` Michal Wajdeczko
2025-10-15  7:47 ` [PATCH v7 07/12] drm/xe: Privatize xe_ggtt_node Maarten Lankhorst
2025-10-15 22:05   ` Matthew Brost
2025-10-15  7:47 ` [PATCH v7 08/12] drm/xe: Make xe_ggtt_node offset relative to starting offset Maarten Lankhorst
2025-10-15 22:38   ` Matthew Brost
2025-10-16  6:40     ` Maarten Lankhorst
2025-10-15  7:47 ` [PATCH v7 09/12] drm/xe: Rewrite GGTT VF initialisation Maarten Lankhorst
2025-10-16  0:30   ` Matthew Brost
2025-10-15  7:47 ` [PATCH v7 10/12] drm/xe: Move struct xe_ggtt to xe_ggtt.c Maarten Lankhorst
2025-10-15  7:47 ` [PATCH v7 11/12] drm/xe: Make xe_ggtt_node_insert return a node Maarten Lankhorst
2025-10-15 22:44   ` Matthew Brost
2025-10-15  7:47 ` [PATCH v7 12/12] drm/xe: Remove xe_ggtt_node_allocated Maarten Lankhorst
2025-10-15 22:41   ` Matthew Brost
2025-10-15  9:47 ` ✗ CI.checkpatch: warning for drm/xe: Make all xe_ggtt structs private. (rev2) Patchwork
2025-10-15  9:49 ` ✓ CI.KUnit: success " Patchwork
2025-10-15 11:03 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-15 19:55 ` ✗ Xe.CI.Full: failure " Patchwork

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=52cccc2a-6958-4701-824b-3897bbdf366f@lankhorst.se \
    --to=dev@lankhorst.se \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.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