dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: Hamza Mahfooz <hamza.mahfooz@amd.com>, linux-kernel@vger.kernel.org
Cc: "Ian Chen" <ian.chen@amd.com>, "David Airlie" <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	"Imran Khan" <imran.f.khan@oracle.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	amd-gfx@lists.freedesktop.org, "Leo Li" <sunpeng.li@amd.com>,
	"Fangzhi Zuo" <Jerry.Zuo@amd.com>,
	"Aurabindo Pillai" <aurabindo.pillai@amd.com>,
	"Jani Nikula" <jani.nikula@intel.com>,
	hersenxs.wu@amd.com, "Mikita Lipski" <mikita.lipski@amd.com>,
	"Bhawanpreet Lakha" <Bhawanpreet.Lakha@amd.com>,
	"David Zhang" <dingchen.zhang@amd.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>, "Roman Li" <Roman.Li@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Claudio Suarez" <cssk@net-c.es>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Wayne Lin" <Wayne.Lin@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Colin Ian King" <colin.king@intel.com>,
	"Nicholas Kazlauskas" <nicholas.kazlauskas@amd.com>
Subject: Re: [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port
Date: Fri, 05 Aug 2022 17:17:46 -0400	[thread overview]
Message-ID: <8db8a726d1aac25b3590497db9cbdcc3fe161227.camel@redhat.com> (raw)
In-Reply-To: <20220805211317.176672-1-hamza.mahfooz@amd.com>

lgtm!

Reviewed-by: Lyude Paul <lyude@redhat.com>

On Fri, 2022-08-05 at 17:13 -0400, Hamza Mahfooz wrote:
> Currently, there is no way to identify if DSC pass-through can be
> enabled and what aux DSC pass-through requests ought to be sent to. So,
> add a variable to struct drm_dp_mst_port that keeps track of the
> aforementioned information.
> 
> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
> ---
> v2: define DP_DSC_PASSTHROUGH_IS_SUPPORTED
> ---
>  drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 +++-
>  include/drm/display/drm_dp.h                  | 1 +
>  include/drm/display/drm_dp_mst_helper.h       | 3 +++
>  3 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index 67b3b9697da7..71915afd9892 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -5921,8 +5921,10 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
>  		/* Enpoint decompression with DP-to-DP peer device */
>  		if ((endpoint_dsc & DP_DSC_DECOMPRESSION_IS_SUPPORTED) &&
>  		    (endpoint_fec & DP_FEC_CAPABLE) &&
> -		    (upstream_dsc & 0x2) /* DSC passthrough */)
> +		    (upstream_dsc & DP_DSC_PASSTHROUGH_IS_SUPPORTED)) {
> +			port->passthrough_aux = &immediate_upstream_port->aux;
>  			return &port->aux;
> +		}
>  
>  		/* Virtual DPCD decompression with DP-to-DP peer device */
>  		return &immediate_upstream_port->aux;
> diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
> index 9e3aff7e68bb..4d0abe4c7ea9 100644
> --- a/include/drm/display/drm_dp.h
> +++ b/include/drm/display/drm_dp.h
> @@ -239,6 +239,7 @@
>  
>  #define DP_DSC_SUPPORT                      0x060   /* DP 1.4 */
>  # define DP_DSC_DECOMPRESSION_IS_SUPPORTED  (1 << 0)
> +# define DP_DSC_PASSTHROUGH_IS_SUPPORTED    (1 << 1)
>  
>  #define DP_DSC_REV                          0x061
>  # define DP_DSC_MAJOR_MASK                  (0xf << 0)
> diff --git a/include/drm/display/drm_dp_mst_helper.h b/include/drm/display/drm_dp_mst_helper.h
> index 10adec068b7f..4a39c95f8afd 100644
> --- a/include/drm/display/drm_dp_mst_helper.h
> +++ b/include/drm/display/drm_dp_mst_helper.h
> @@ -86,6 +86,8 @@ struct drm_dp_vcpi {
>   * @next: link to next port on this branch device
>   * @aux: i2c aux transport to talk to device connected to this port, protected
>   * by &drm_dp_mst_topology_mgr.base.lock.
> + * @passthrough_aux: parent aux to which DSC pass-through requests should be
> + * sent, only set if DSC pass-through is possible.
>   * @parent: branch device parent of this port
>   * @vcpi: Virtual Channel Payload info for this port.
>   * @connector: DRM connector this port is connected to. Protected by
> @@ -140,6 +142,7 @@ struct drm_dp_mst_port {
>  	 */
>  	struct drm_dp_mst_branch *mstb;
>  	struct drm_dp_aux aux; /* i2c bus for this port? */
> +	struct drm_dp_aux *passthrough_aux;
>  	struct drm_dp_mst_branch *parent;
>  
>  	struct drm_dp_vcpi vcpi;

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat


  parent reply	other threads:[~2022-08-05 21:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 21:13 [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port Hamza Mahfooz
2022-08-05 21:13 ` [PATCH v2 2/3] drm/amd/display: consider DSC pass-through during mode validation Hamza Mahfooz
2022-08-11 11:02   ` Anders Roxell
2022-08-05 21:13 ` [PATCH v2 3/3] drm/amd/display: implement DSC pass-through support Hamza Mahfooz
2022-08-05 21:17 ` Lyude Paul [this message]
2022-08-09 15:15   ` [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port Hamza Mahfooz
2022-08-09 22:01     ` Lyude Paul
2022-08-10 13:23       ` Hamza Mahfooz
2022-08-10 21:24         ` Lyude Paul

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=8db8a726d1aac25b3590497db9cbdcc3fe161227.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Jerry.Zuo@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Roman.Li@amd.com \
    --cc=Wayne.Lin@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=colin.king@intel.com \
    --cc=cssk@net-c.es \
    --cc=dingchen.zhang@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamza.mahfooz@amd.com \
    --cc=hersenxs.wu@amd.com \
    --cc=ian.chen@amd.com \
    --cc=imran.f.khan@oracle.com \
    --cc=jani.nikula@intel.com \
    --cc=javierm@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikita.lipski@amd.com \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=tzimmermann@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).