From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org, Jani Nikula <jani.nikula@intel.com>
Subject: [PATCH v2 13/19] drm/i915/overlay: Adjust i915 specific interfaces
Date: Thu, 26 Feb 2026 12:07:32 +0200 [thread overview]
Message-ID: <20260226100738.29997-14-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260226100738.29997-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Adjust the names ("i915_overlay_" prefix) and calling
convention (pass the driver agnostic 'struct drm_device'()
of the functions that will provide the remainder of the
parent driver interface to be used by the overlay display
code.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_overlay.c | 51 +++++++++++---------
1 file changed, 29 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
index 906948397d21..a516fc28f093 100644
--- a/drivers/gpu/drm/i915/display/intel_overlay.c
+++ b/drivers/gpu/drm/i915/display/intel_overlay.c
@@ -263,14 +263,15 @@ static bool i915_overlay_is_active(struct drm_device *drm)
}
/* overlay needs to be disable in OCMD reg */
-static int intel_overlay_on(struct intel_overlay *overlay,
- u32 frontbuffer_bits)
+static int i915_overlay_on(struct drm_device *drm,
+ u32 frontbuffer_bits)
{
- struct intel_display *display = overlay->display;
+ struct intel_display *display = to_intel_display(drm);
+ struct intel_overlay *overlay = display->overlay;
struct i915_request *rq;
u32 *cs;
- drm_WARN_ON(display->drm, i915_overlay_is_active(display->drm));
+ drm_WARN_ON(drm, i915_overlay_is_active(drm));
rq = alloc_request(overlay, NULL);
if (IS_ERR(rq))
@@ -324,16 +325,17 @@ static void i915_overlay_flip_prepare(struct intel_overlay *overlay,
}
/* overlay needs to be enabled in OCMD reg */
-static int intel_overlay_continue(struct intel_overlay *overlay,
- struct i915_vma *vma,
- bool load_polyphase_filter)
+static int i915_overlay_continue(struct drm_device *drm,
+ struct i915_vma *vma,
+ bool load_polyphase_filter)
{
- struct intel_display *display = overlay->display;
+ struct intel_display *display = to_intel_display(drm);
+ struct intel_overlay *overlay = display->overlay;
struct i915_request *rq;
u32 flip_addr = overlay->flip_addr;
u32 *cs;
- drm_WARN_ON(display->drm, !i915_overlay_is_active(display->drm));
+ drm_WARN_ON(drm, !i915_overlay_is_active(drm));
if (load_polyphase_filter)
flip_addr |= OFC_UPDATE;
@@ -400,13 +402,14 @@ static void i915_overlay_last_flip_retire(struct i915_active *active)
}
/* overlay needs to be disabled in OCMD reg */
-static int intel_overlay_off(struct intel_overlay *overlay)
+static int i915_overlay_off(struct drm_device *drm)
{
- struct intel_display *display = overlay->display;
+ struct intel_display *display = to_intel_display(drm);
+ struct intel_overlay *overlay = display->overlay;
struct i915_request *rq;
u32 *cs, flip_addr = overlay->flip_addr;
- drm_WARN_ON(display->drm, !i915_overlay_is_active(display->drm));
+ drm_WARN_ON(drm, !i915_overlay_is_active(drm));
/*
* According to intel docs the overlay hw may hang (when switching
@@ -448,8 +451,11 @@ static int intel_overlay_off(struct intel_overlay *overlay)
* Recover from an interruption due to a signal.
* We have to be careful not to repeat work forever an make forward progress.
*/
-static int intel_overlay_recover_from_interrupt(struct intel_overlay *overlay)
+static int i915_overlay_recover_from_interrupt(struct drm_device *drm)
{
+ struct intel_display *display = to_intel_display(drm);
+ struct intel_overlay *overlay = display->overlay;
+
return i915_active_wait(&overlay->last_flip);
}
@@ -458,9 +464,10 @@ static int intel_overlay_recover_from_interrupt(struct intel_overlay *overlay)
* Needs to be called before the overlay register are changed
* via intel_overlay_(un)map_regs.
*/
-static int intel_overlay_release_old_vid(struct intel_overlay *overlay)
+static int i915_overlay_release_old_vid(struct drm_device *drm)
{
- struct intel_display *display = overlay->display;
+ struct intel_display *display = to_intel_display(drm);
+ struct intel_overlay *overlay = display->overlay;
struct i915_request *rq;
u32 *cs;
@@ -832,7 +839,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
drm_WARN_ON(display->drm,
!drm_modeset_is_locked(&display->drm->mode_config.connection_mutex));
- ret = intel_overlay_release_old_vid(overlay);
+ ret = i915_overlay_release_old_vid(display->drm);
if (ret != 0)
return ret;
@@ -860,7 +867,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
OCONF_PIPE_A : OCONF_PIPE_B;
iowrite32(oconfig, ®s->OCONFIG);
- ret = intel_overlay_on(overlay, INTEL_FRONTBUFFER_OVERLAY(pipe));
+ ret = i915_overlay_on(display->drm, INTEL_FRONTBUFFER_OVERLAY(pipe));
if (ret != 0)
goto out_unpin;
}
@@ -918,7 +925,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
if (tmp & (1 << 17))
drm_dbg(display->drm, "overlay underrun, DOVSTA: %x\n", tmp);
- ret = intel_overlay_continue(overlay, vma, scale_changed);
+ ret = i915_overlay_continue(display->drm, vma, scale_changed);
if (ret)
goto out_unpin;
@@ -940,14 +947,14 @@ int intel_overlay_switch_off(struct intel_overlay *overlay)
drm_WARN_ON(display->drm,
!drm_modeset_is_locked(&display->drm->mode_config.connection_mutex));
- ret = intel_overlay_recover_from_interrupt(overlay);
+ ret = i915_overlay_recover_from_interrupt(display->drm);
if (ret != 0)
return ret;
if (!i915_overlay_is_active(display->drm))
return 0;
- ret = intel_overlay_release_old_vid(overlay);
+ ret = i915_overlay_release_old_vid(display->drm);
if (ret != 0)
return ret;
@@ -956,7 +963,7 @@ int intel_overlay_switch_off(struct intel_overlay *overlay)
overlay->crtc->overlay = NULL;
overlay->crtc = NULL;
- return intel_overlay_off(overlay);
+ return i915_overlay_off(display->drm);
}
static int check_overlay_possible_on_crtc(struct intel_overlay *overlay,
@@ -1203,7 +1210,7 @@ int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data,
drm_modeset_lock_all(dev);
- ret = intel_overlay_recover_from_interrupt(overlay);
+ ret = i915_overlay_recover_from_interrupt(dev);
if (ret != 0)
goto out_unlock;
--
2.52.0
next prev parent reply other threads:[~2026-02-26 10:08 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 10:07 [PATCH v2 00/19] drm/i915/overlay: Convert to parent interface Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 01/19] drm/i915/overlay: Remove GPU hang snapshot stuff Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 02/19] drm/i915/overlay: Track current frontbuffer_bits Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 03/19] drm/i915/overlay: Extract i915_overlay_is_active() Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 04/19] drm/i915/overlay: Remove redundant overlay->active Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 05/19] drm/i915/overlay: Relocate the underrun check Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 06/19] drm/i915/overlay: Introduce i915_overlay_obj_lookup() Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 07/19] drm/i915/overlay: Use struct drm_gem_object as the type Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 08/19] drm/i915/overlay: Extract i915_overlay_reset() Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 09/19] drm/i915/overlay: Extract i915_overlay_setup() Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 10/19] drm/i915/overlay: Extract i915_overlay_cleanup() Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 11/19] drm/i915/overlay: Abstract buffer (un)pinning Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 12/19] drm/i915/overlay: Rename low level i915 specific functions Ville Syrjala
2026-02-26 10:07 ` Ville Syrjala [this message]
2026-02-26 10:07 ` [PATCH v2 14/19] drm/i915/overlay: Make i830_overlay_clock_gating() i915 specific Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 15/19] drm/i915/overlay: s/dev_priv/i915/ Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 16/19] drm/i915/overlay: Split 'struct intel_overlay' Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 17/19] drm/i915/overlay: Don't use fetch_and_zero() in display code Ville Syrjala
2026-02-26 13:01 ` [PATCH v3 " Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 18/19] drm/i915/overlay: Move i915 specific code into i915_overlay.c Ville Syrjala
2026-02-26 13:38 ` [PATCH v3 " Ville Syrjala
2026-02-26 10:07 ` [PATCH v2 19/19] drm/i915/overlay: Convert overlay to parent interface Ville Syrjala
2026-02-26 13:01 ` [PATCH v3 " Ville Syrjala
2026-02-26 10:15 ` ✗ CI.checkpatch: warning for drm/i915/overlay: Convert to parent interface (rev2) Patchwork
2026-02-26 10:16 ` ✓ CI.KUnit: success " Patchwork
2026-02-26 11:03 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-02-26 12:27 ` ✗ Xe.CI.FULL: " Patchwork
2026-02-26 13:45 ` ✗ CI.checkpatch: warning for drm/i915/overlay: Convert to parent interface (rev5) Patchwork
2026-02-26 13:47 ` ✓ CI.KUnit: success " Patchwork
2026-02-26 14:42 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-26 16:14 ` ✓ Xe.CI.FULL: " 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=20260226100738.29997-14-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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