Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <jose.souza@intel.com>,
	Matthew Brost <matthew.brost@intel.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
	Jonathan Cavitt <jonathan.cavitt@intel.com>
Subject: Re: [PATCH 04/12] drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt
Date: Fri, 16 Aug 2024 11:04:27 -0400	[thread overview]
Message-ID: <Zr9qez1j2-Xp7VG6@intel.com> (raw)
In-Reply-To: <fdtthw5qcngmwdzqltik6voazr2yhx4qtnspyawi6c5gfj2fl6@dpjv3qcqnt7n>

On Fri, Aug 16, 2024 at 12:16:36AM -0500, Lucas De Marchi wrote:
> On Thu, Aug 15, 2024 at 06:07:24PM GMT, Rodrigo Vivi wrote:
> > DPT code is so dependent on i915 vma implementation and it is not
> > ported yet to Xe.
> > 
> > This patch limits inspection to DPT's VMA struct to intel_dpt
> > component only, so the Xe GGTT code can evolve.
> > 
> > Cc: Matthew Brost <matthew.brost@intel.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_dpt.c           | 4 ++++
> > drivers/gpu/drm/i915/display/intel_dpt.h           | 1 +
> > drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 ++-
> > drivers/gpu/drm/xe/display/xe_fb_pin.c             | 9 +++++++--
> > 4 files changed, 14 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c b/drivers/gpu/drm/i915/display/intel_dpt.c
> > index 73a1918e2537..3a6d99044828 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dpt.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dpt.c
> > @@ -317,3 +317,7 @@ void intel_dpt_destroy(struct i915_address_space *vm)
> > 	i915_vm_put(&dpt->vm);
> > }
> > 
> > +u64 intel_dpt_offset(struct i915_vma *dpt_vma)
> > +{
> > +	return dpt_vma->node.start;
> > +}
> > diff --git a/drivers/gpu/drm/i915/display/intel_dpt.h b/drivers/gpu/drm/i915/display/intel_dpt.h
> > index ff18a525bfbe..7336e905142d 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dpt.h
> > +++ b/drivers/gpu/drm/i915/display/intel_dpt.h
> > @@ -20,5 +20,6 @@ void intel_dpt_suspend(struct drm_i915_private *i915);
> > void intel_dpt_resume(struct drm_i915_private *i915);
> > struct i915_address_space *
> > intel_dpt_create(struct intel_framebuffer *fb);
> > +u64 intel_dpt_offset(struct i915_vma *dpt_vma);
> 
> CI doesn't show the exact line, but build is breaking here:
> 
> ./../drivers/gpu/drm/i915/display/intel_dpt.h:23:1: error: unknown type name ‘u64’
>    23 | u64 intel_dpt_offset(struct i915_vma *dpt_vma);
>       | ^~~
> make[7]: *** [../drivers/gpu/drm/i915/Makefile:419: drivers/gpu/drm/i915/display/intel_dpt.hdrtest] Error 1
> make[6]: *** [../scripts/Makefile.build:485: drivers/gpu/drm/i915] Error 2
> 
> #include <linux/types.h>
> 
> to fix it.

Thanks. I had seen the build failure and thought I was on some wrong base or something
and didn't carefully look that.

> 
> And CONFIG_DRM_XE_WERROR in your .config

The oddest part is that I do have this here.
In both of the machines where I was always building this code
and absolutely no warning of any kind! o.O

> 
> Lucas De Marchi
> 
> > 
> > #endif /* __INTEL_DPT_H__ */
> > diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> > index ba5a628b4757..1cf1d5c8b9dc 100644
> > --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> > +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> > @@ -14,6 +14,7 @@
> > #include "intel_de.h"
> > #include "intel_display_irq.h"
> > #include "intel_display_types.h"
> > +#include "intel_dpt.h"
> > #include "intel_fb.h"
> > #include "intel_fbc.h"
> > #include "intel_frontbuffer.h"
> > @@ -1162,7 +1163,7 @@ static u32 skl_surf_address(const struct intel_plane_state *plane_state,
> > 		 * within the DPT is always 0.
> > 		 */
> > 		drm_WARN_ON(&i915->drm, plane_state->dpt_vma &&
> > -			    plane_state->dpt_vma->node.start);
> > +			    intel_dpt_offset(plane_state->dpt_vma));
> > 		drm_WARN_ON(&i915->drm, offset & 0x1fffff);
> > 		return offset >> 9;
> > 	} else {
> > diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> > index d7db44e79eaf..42d431ff14e7 100644
> > --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
> > +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> > @@ -377,8 +377,8 @@ void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state)
> > }
> > 
> > /*
> > - * For Xe introduce dummy intel_dpt_create which just return NULL and
> > - * intel_dpt_destroy which does nothing.
> > + * For Xe introduce dummy intel_dpt_create which just return NULL,
> > + * intel_dpt_destroy which does nothing, and fake intel_dpt_ofsset returning 0;
> >  */
> > struct i915_address_space *intel_dpt_create(struct intel_framebuffer *fb)
> > {
> > @@ -389,3 +389,8 @@ void intel_dpt_destroy(struct i915_address_space *vm)
> > {
> > 	return;
> > }
> > +
> > +u64 intel_dpt_offset(struct i915_vma *dpt_vma)
> > +{
> > +	return 0;
> > +}
> > -- 
> > 2.46.0
> > 

  reply	other threads:[~2024-08-16 15:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-15 22:07 [PATCH 01/12] drm/xe: Removed unused xe_ggtt_printk Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 02/12] drm/xe: Introduce GGTT documentation Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 03/12] drm/xe: Remove unnecessary drm_mm.h includes Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 04/12] drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt Rodrigo Vivi
2024-08-16  5:16   ` Lucas De Marchi
2024-08-16 15:04     ` Rodrigo Vivi [this message]
2024-08-15 22:07 ` [PATCH 05/12] drm/xe: Encapsulate drm_mm_node inside xe_ggtt_node Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 06/12] drm/xe: Rename xe_ggtt_node related functions Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 07/12] drm/xe: Limit drm_mm_node_allocated access to xe_ggtt_node Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 08/12] drm/xe: Introduce xe_ggtt_largest_hole Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 09/12] drm/xe: Introduce xe_ggtt_print_holes Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 10/12] drm/xe: Rename xe_ggtt balloon functions to make the node clear Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 11/12] drm/xe: Make xe_ggtt_node struct independent Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 12/12] drm/xe: Fix missing runtime outer protection for ggtt_remove_node Rodrigo Vivi
2024-08-15 22:21 ` ✓ CI.Patch_applied: success for series starting with [01/12] drm/xe: Removed unused xe_ggtt_printk Patchwork
2024-08-15 22:21 ` ✓ CI.checkpatch: " Patchwork
2024-08-15 22:22 ` ✓ CI.KUnit: " Patchwork
2024-08-15 22:27 ` ✗ CI.Build: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-08-21 19:38 [PATCH 01/12] " Rodrigo Vivi
2024-08-21 19:38 ` [PATCH 04/12] drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt Rodrigo Vivi
2024-08-20 20:25 [PATCH 01/12] drm/xe: Removed unused xe_ggtt_printk Rodrigo Vivi
2024-08-20 20:25 ` [PATCH 04/12] drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt Rodrigo Vivi
2024-08-17 10:35 [PATCH 01/12] drm/xe: Removed unused xe_ggtt_printk Rodrigo Vivi
2024-08-17 10:35 ` [PATCH 04/12] drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt Rodrigo Vivi
2024-08-16 15:02 [PATCH 01/12] drm/xe: Removed unused xe_ggtt_printk Rodrigo Vivi
2024-08-16 15:02 ` [PATCH 04/12] drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt Rodrigo Vivi
2024-07-11 17:11 [PATCH 01/12] drm/xe: Removed unused xe_ggtt_printk Rodrigo Vivi
2024-07-11 17:11 ` [PATCH 04/12] drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt Rodrigo Vivi
2024-07-11 18:38   ` Cavitt, Jonathan

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=Zr9qez1j2-Xp7VG6@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=jose.souza@intel.com \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=lucas.demarchi@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --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