Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Manna, Animesh" <animesh.manna@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "Murthy, Arun R" <arun.r.murthy@intel.com>,
	"Nikula, Jani" <jani.nikula@intel.com>,
	"Deak, Imre" <imre.deak@intel.com>
Subject: Re: [PATCH v8 1/3] drm/i915/display: Add drm helper to check pr optimization support
Date: Mon, 23 Mar 2026 13:02:54 +0000	[thread overview]
Message-ID: <e55fdc0e3d15053cbd984507af7bc73b5204d991.camel@intel.com> (raw)
In-Reply-To: <20260318085642.3621166-2-animesh.manna@intel.com>

On Wed, 2026-03-18 at 14:26 +0530, Animesh Manna wrote:
> Add api to check panel replay optimization supported or not to
> drm-core DP tunneling framework which can be used by other driver
> as well.
> 
> v2: Split generic drm changes from Intel specific changes. [Jouni]
> 
> Suggested-by: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Animesh Manna <animesh.manna@intel.com>

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

> ---
>  drivers/gpu/drm/display/drm_dp_tunnel.c | 17 +++++++++++++++++
>  include/drm/display/drm_dp_tunnel.h     |  6 ++++++
>  2 files changed, 23 insertions(+)
> 
> diff --git a/drivers/gpu/drm/display/drm_dp_tunnel.c
> b/drivers/gpu/drm/display/drm_dp_tunnel.c
> index f442430d8de7..39c07cb4123b 100644
> --- a/drivers/gpu/drm/display/drm_dp_tunnel.c
> +++ b/drivers/gpu/drm/display/drm_dp_tunnel.c
> @@ -149,6 +149,7 @@ struct drm_dp_tunnel {
>  	bool bw_alloc_enabled:1;
>  	bool has_io_error:1;
>  	bool destroyed:1;
> +	bool pr_optimization_support:1;
>  };
>  
>  struct drm_dp_tunnel_group_state;
> @@ -508,6 +509,8 @@ create_tunnel(struct drm_dp_tunnel_mgr *mgr,
>  
>  	tunnel->bw_alloc_supported =
> tunnel_reg_bw_alloc_supported(regs);
>  	tunnel->bw_alloc_enabled =
> tunnel_reg_bw_alloc_enabled(regs);
> +	tunnel->pr_optimization_support = tunnel_reg(regs,
> DP_TUNNELING_CAPABILITIES) &
> +					 
> DP_PANEL_REPLAY_OPTIMIZATION_SUPPORT;
>  
>  	if (!add_tunnel_to_group(mgr, drv_group_id, tunnel)) {
>  		kfree(tunnel);
> @@ -1036,6 +1039,20 @@ bool drm_dp_tunnel_bw_alloc_is_enabled(const
> struct drm_dp_tunnel *tunnel)
>  }
>  EXPORT_SYMBOL(drm_dp_tunnel_bw_alloc_is_enabled);
>  
> +/**
> + * drm_dp_tunnel_pr_optimization_supported - Query the PR BW
> optimization support
> + * @tunnel: Tunnel object
> + *
> + * Query if the PR BW optimization is supported for @tunnel.
> + *
> + * Returns %true if the PR BW optimiation is supported for @tunnel.
> + */
> +bool drm_dp_tunnel_pr_optimization_supported(const struct
> drm_dp_tunnel *tunnel)
> +{
> +	return tunnel && tunnel->pr_optimization_support;
> +}
> +EXPORT_SYMBOL(drm_dp_tunnel_pr_optimization_supported);
> +
>  static int clear_bw_req_state(struct drm_dp_aux *aux)
>  {
>  	u8 bw_req_mask = DP_BW_REQUEST_SUCCEEDED |
> DP_BW_REQUEST_FAILED;
> diff --git a/include/drm/display/drm_dp_tunnel.h
> b/include/drm/display/drm_dp_tunnel.h
> index 87212c847915..4aa3ce9fd829 100644
> --- a/include/drm/display/drm_dp_tunnel.h
> +++ b/include/drm/display/drm_dp_tunnel.h
> @@ -53,6 +53,7 @@ int drm_dp_tunnel_destroy(struct drm_dp_tunnel
> *tunnel);
>  int drm_dp_tunnel_enable_bw_alloc(struct drm_dp_tunnel *tunnel);
>  int drm_dp_tunnel_disable_bw_alloc(struct drm_dp_tunnel *tunnel);
>  bool drm_dp_tunnel_bw_alloc_is_enabled(const struct drm_dp_tunnel
> *tunnel);
> +bool drm_dp_tunnel_pr_optimization_supported(const struct
> drm_dp_tunnel *tunnel);
>  int drm_dp_tunnel_alloc_bw(struct drm_dp_tunnel *tunnel, int bw);
>  int drm_dp_tunnel_get_allocated_bw(struct drm_dp_tunnel *tunnel);
>  int drm_dp_tunnel_update_state(struct drm_dp_tunnel *tunnel);
> @@ -140,6 +141,11 @@ static inline bool
> drm_dp_tunnel_bw_alloc_is_enabled(const struct drm_dp_tunnel
>  	return false;
>  }
>  
> +static inline bool drm_dp_tunnel_pr_optimization_supported(const
> struct drm_dp_tunnel *tunnel)
> +{
> +	return false;
> +}
> +
>  static inline int
>  drm_dp_tunnel_alloc_bw(struct drm_dp_tunnel *tunnel, int bw)
>  {


  reply	other threads:[~2026-03-23 13:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18  8:56 [PATCH v8 0/3] Panel Replay BW optimization Animesh Manna
2026-03-18  8:56 ` [PATCH v8 1/3] drm/i915/display: Add drm helper to check pr optimization support Animesh Manna
2026-03-23 13:02   ` Hogander, Jouni [this message]
2026-03-18  8:56 ` [PATCH v8 2/3] drm/i915/display: Add hook to check optimization support for Intel platforms Animesh Manna
2026-03-23 13:04   ` Hogander, Jouni
2026-03-23 13:13     ` Hogander, Jouni
2026-03-24  8:36       ` Manna, Animesh
2026-03-18  8:56 ` [PATCH v8 3/3] drm/i915/display: Panel Replay BW optimization for DP2.0 tunneling Animesh Manna
2026-03-23 13:27   ` Hogander, Jouni
2026-03-18 10:31 ` ✓ i915.CI.BAT: success for Panel Replay BW optimization (rev2) Patchwork
2026-03-19 14:07 ` ✓ i915.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=e55fdc0e3d15053cbd984507af7bc73b5204d991.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=animesh.manna@intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imre.deak@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