[PATCH 05/12] drm/i915/dsb: Provide intel_dsb_head() and intel_dsb_size()
Shankar, Uma
uma.shankar at intel.com
Sun May 18 18:44:14 UTC 2025
> -----Original Message-----
> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Ville Syrjala
> Sent: Friday, May 16, 2025 5:04 PM
> To: intel-gfx at lists.freedesktop.org
> Cc: intel-xe at lists.freedesktop.org
> Subject: [PATCH 05/12] drm/i915/dsb: Provide intel_dsb_head() and
> intel_dsb_size()
>
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> The upcoming flip queue implementation will need to know the DSB buffer head
> and size. Expose those outside intel_dsb.c.
Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar at intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dsb.c | 9 +++++++--
> drivers/gpu/drm/i915/display/intel_dsb.h | 2 ++
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> b/drivers/gpu/drm/i915/display/intel_dsb.c
> index b54fb6170364..82cb58cf9c6a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -237,14 +237,19 @@ static bool is_dsb_busy(struct intel_display *display,
> enum pipe pipe,
> return intel_de_read_fw(display, DSB_CTRL(pipe, dsb_id)) &
> DSB_STATUS_BUSY; }
>
> -static unsigned int intel_dsb_head(struct intel_dsb *dsb)
> +unsigned int intel_dsb_size(struct intel_dsb *dsb) {
> + return dsb->free_pos * 4;
> +}
> +
> +unsigned int intel_dsb_head(struct intel_dsb *dsb)
> {
> return intel_dsb_buffer_ggtt_offset(&dsb->dsb_buf);
> }
>
> static unsigned int intel_dsb_tail(struct intel_dsb *dsb) {
> - return intel_dsb_buffer_ggtt_offset(&dsb->dsb_buf) + dsb->free_pos * 4;
> + return intel_dsb_buffer_ggtt_offset(&dsb->dsb_buf) +
> +intel_dsb_size(dsb);
> }
>
> static void intel_dsb_ins_align(struct intel_dsb *dsb) diff --git
> a/drivers/gpu/drm/i915/display/intel_dsb.h
> b/drivers/gpu/drm/i915/display/intel_dsb.h
> index e843c52bf97c..6a90ffe1f6ff 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.h
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.h
> @@ -26,6 +26,8 @@ enum intel_dsb_id {
> I915_MAX_DSBS,
> };
>
> +unsigned int intel_dsb_size(struct intel_dsb *dsb); unsigned int
> +intel_dsb_head(struct intel_dsb *dsb);
> struct intel_dsb *intel_dsb_prepare(struct intel_atomic_state *state,
> struct intel_crtc *crtc,
> enum intel_dsb_id dsb_id,
> --
> 2.49.0
More information about the Intel-gfx
mailing list