All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Use i915_gem_object_get_dma_address to get dma address
Date: Tue, 5 Dec 2023 09:29:54 +0000	[thread overview]
Message-ID: <5fb655dac092232bb8b142e2dfbc00c8a84d92a7.camel@intel.com> (raw)
In-Reply-To: <20231204134946.16219-1-maarten.lankhorst@linux.intel.com>

On Mon, 2023-12-04 at 14:49 +0100, Maarten Lankhorst wrote:
> Works better for xe like that. obj is no longer const.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_cursor.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c
> b/drivers/gpu/drm/i915/display/intel_cursor.c
> index a515ae2831f8..926e2de00eb5 100644
> --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> @@ -24,6 +24,8 @@
>  #include "intel_psr_regs.h"
>  #include "skl_watermark.h"
>  
> +#include "gem/i915_gem_object.h"
> +
>  /* Cursor formats */
>  static const u32 intel_cursor_formats[] = {
>         DRM_FORMAT_ARGB8888,
> @@ -34,11 +36,11 @@ static u32 intel_cursor_base(const struct
> intel_plane_state *plane_state)
>         struct drm_i915_private *dev_priv =
>                 to_i915(plane_state->uapi.plane->dev);
>         const struct drm_framebuffer *fb = plane_state->hw.fb;
> -       const struct drm_i915_gem_object *obj = intel_fb_obj(fb);
> +       struct drm_i915_gem_object *obj = intel_fb_obj(fb);
>         u32 base;
>  
>         if (DISPLAY_INFO(dev_priv)->cursor_needs_physical)
> -               base = sg_dma_address(obj->mm.pages->sgl);
> +               base = i915_gem_object_get_dma_address(obj, 0);
>         else
>                 base = intel_plane_ggtt_offset(plane_state);
>  


WARNING: multiple messages have this Message-ID (diff)
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915/display: Use i915_gem_object_get_dma_address to get dma address
Date: Tue, 5 Dec 2023 09:29:54 +0000	[thread overview]
Message-ID: <5fb655dac092232bb8b142e2dfbc00c8a84d92a7.camel@intel.com> (raw)
In-Reply-To: <20231204134946.16219-1-maarten.lankhorst@linux.intel.com>

On Mon, 2023-12-04 at 14:49 +0100, Maarten Lankhorst wrote:
> Works better for xe like that. obj is no longer const.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_cursor.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c
> b/drivers/gpu/drm/i915/display/intel_cursor.c
> index a515ae2831f8..926e2de00eb5 100644
> --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> @@ -24,6 +24,8 @@
>  #include "intel_psr_regs.h"
>  #include "skl_watermark.h"
>  
> +#include "gem/i915_gem_object.h"
> +
>  /* Cursor formats */
>  static const u32 intel_cursor_formats[] = {
>         DRM_FORMAT_ARGB8888,
> @@ -34,11 +36,11 @@ static u32 intel_cursor_base(const struct
> intel_plane_state *plane_state)
>         struct drm_i915_private *dev_priv =
>                 to_i915(plane_state->uapi.plane->dev);
>         const struct drm_framebuffer *fb = plane_state->hw.fb;
> -       const struct drm_i915_gem_object *obj = intel_fb_obj(fb);
> +       struct drm_i915_gem_object *obj = intel_fb_obj(fb);
>         u32 base;
>  
>         if (DISPLAY_INFO(dev_priv)->cursor_needs_physical)
> -               base = sg_dma_address(obj->mm.pages->sgl);
> +               base = i915_gem_object_get_dma_address(obj, 0);
>         else
>                 base = intel_plane_ggtt_offset(plane_state);
>  


  parent reply	other threads:[~2023-12-05  9:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 13:49 [Intel-gfx] [PATCH] drm/i915/display: Use i915_gem_object_get_dma_address to get dma address Maarten Lankhorst
2023-12-04 13:49 ` Maarten Lankhorst
2023-12-04 22:30 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-12-05  4:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-12-05  9:29 ` Hogander, Jouni [this message]
2023-12-05  9:29   ` [PATCH] " Hogander, Jouni

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=5fb655dac092232bb8b142e2dfbc00c8a84d92a7.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.