From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A44AEC00140 for ; Fri, 5 Aug 2022 21:17:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238648AbiHEVRz (ORCPT ); Fri, 5 Aug 2022 17:17:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234198AbiHEVRx (ORCPT ); Fri, 5 Aug 2022 17:17:53 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9D6486582A for ; Fri, 5 Aug 2022 14:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659734270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RZNlrEXt8H3ovW/I1Y4O4JfffQjM6ZL4QQdyq55TVvI=; b=fhco1kN8lHuR89L2nFrzZ/KLkfR58GycLiF9uD1SOh4o45onTAgHuRG/WeR2AB5KUBnTNJ 84Xg0q2QZBfozv0Y/rHwbJYc9tnVhI4nXDaNsA/Zo3ZdbabSaXrJFW2LFj4WrqwXxhtWhF K1RLJZ3Dwpa5oDpcMfObr3XZaqjvHek= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-204-_OTjYX5IMKC75WeQQ95Hdw-1; Fri, 05 Aug 2022 17:17:49 -0400 X-MC-Unique: _OTjYX5IMKC75WeQQ95Hdw-1 Received: by mail-qk1-f199.google.com with SMTP id l15-20020a05620a28cf00b006b46997c070so2883998qkp.20 for ; Fri, 05 Aug 2022 14:17:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:organization :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc; bh=RZNlrEXt8H3ovW/I1Y4O4JfffQjM6ZL4QQdyq55TVvI=; b=K6Kkp4uRFDxitU9a47EVqXh8wACJtgwTY5fXeigSzRn0z3B24Y661yoUb58mnqzjqG RTdoS0o3fxv3w8p2Qycgdb7tUO5VLNOcsyBZar4z9ex3fPF7apVFMSTYH3asoUEKvm/L J4+PBMKrvA52VYUCRafjQXNiaO95YiGIb9aGzGMSkS52YlXRRBOdGJaibQFh2GFRgorz +meTjzrLcjb06hN3L93FdL30CoJbKAO4hZg/wayKUCA+C7vdUtVUBfHFKIWvAG6btu/c 9U7bzlv/0BKsE6+60q8kqLngKarwP630n1P6k6fEzkkS5jjid//o7qnQ3E2uqjTShGHr iUaw== X-Gm-Message-State: ACgBeo02CYlBaWW7Ydgg2J3k6iUgoCutC3M+FRkyWnubte2CKsZUKMgU J5oKBQisKczQQpTPyiTRIRjfHcCkdADX6nDBdZ/8bL+vmmMMUY1zFAxI5sES5k25TPpb66doSMH QPUYFIXQODQvYUhEuQHTCU+xN X-Received: by 2002:a37:b483:0:b0:6b5:8688:5299 with SMTP id d125-20020a37b483000000b006b586885299mr6636096qkf.147.1659734269042; Fri, 05 Aug 2022 14:17:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR7pmL6DY3sVN5gCS02n3AEyH096euzmB9SRpV1Pn7JxBN+0iCPYIk1jwjNp9v201FEnnIEpPw== X-Received: by 2002:a37:b483:0:b0:6b5:8688:5299 with SMTP id d125-20020a37b483000000b006b586885299mr6636063qkf.147.1659734268786; Fri, 05 Aug 2022 14:17:48 -0700 (PDT) Received: from [192.168.8.138] (pool-100-0-245-4.bstnma.fios.verizon.net. [100.0.245.4]) by smtp.gmail.com with ESMTPSA id d3-20020a05620a158300b006b5e3ca6400sm3439923qkk.103.2022.08.05.14.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 14:17:48 -0700 (PDT) Message-ID: <8db8a726d1aac25b3590497db9cbdcc3fe161227.camel@redhat.com> Subject: Re: [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port From: Lyude Paul To: Hamza Mahfooz , linux-kernel@vger.kernel.org Cc: Harry Wentland , Fangzhi Zuo , Wayne Lin , Aurabindo Pillai , hersenxs.wu@amd.com, Leo Li , Rodrigo Siqueira , Alex Deucher , Christian =?ISO-8859-1?Q?K=F6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Mikita Lipski , Claudio Suarez , Bhawanpreet Lakha , Roman Li , Ian Chen , Colin Ian King , Nicholas Kazlauskas , Thomas Zimmermann , Jani Nikula , Imran Khan , Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= , Javier Martinez Canillas , Kees Cook , Imre Deak , David Zhang , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Fri, 05 Aug 2022 17:17:46 -0400 In-Reply-To: <20220805211317.176672-1-hamza.mahfooz@amd.com> References: <20220805211317.176672-1-hamza.mahfooz@amd.com> Organization: Red Hat Inc. Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org lgtm! Reviewed-by: Lyude Paul 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 > --- > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2478FC00140 for ; Fri, 5 Aug 2022 21:34:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E4E5B9871; Fri, 5 Aug 2022 21:30:51 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4C9F4BA0DE for ; Fri, 5 Aug 2022 21:17:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659734272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RZNlrEXt8H3ovW/I1Y4O4JfffQjM6ZL4QQdyq55TVvI=; b=cvSjVkFGxjiSMixSzROHcZKCRXY61XezV55im2ONZZi9jHkrq4mubx3INpQyq3O+tC842z XeDXrH1j/Bs/WPgVQfDM3UzSoXYrP1WkIRrYZED0FQicTtyYcH+Kr+XrutAlVQj82NdWbO 4zIKAGimtg7DO9j+7djkwN1GphOnAVY= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-61-JPOaiw_SOK2YyAfH8AXp7w-1; Fri, 05 Aug 2022 17:17:49 -0400 X-MC-Unique: JPOaiw_SOK2YyAfH8AXp7w-1 Received: by mail-qt1-f198.google.com with SMTP id t20-20020ac865d4000000b00342ce56573cso1265292qto.21 for ; Fri, 05 Aug 2022 14:17:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:organization :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc; bh=RZNlrEXt8H3ovW/I1Y4O4JfffQjM6ZL4QQdyq55TVvI=; b=Ei8UW2n45R4lDVpLP+bB4W2zBkv6SChi3cQ50k2/jMg5sMXDWPDGEvzbV1wyFC0miz mn5RXu0QrSg2pHG38Cs+MJjUqZSQ4Gcs6xs9liDFZw1OZQw/jrCxvtWBkBV8f/5HqEBx eyHTJTCuNwHRwpSIb0aPWFXwR6bncO4J1IGsOVR55+96sqZa5YmWmqb76eu4o5yECkiE J2yCIazAUBiaKf1fp5ehtqknFD1YkeVNFjJ1yOtUH6hCNEwalc69Z6SEaKlZPlXDXRT0 kKvXa4/KJ7r8XfqCB7H7YjwyGCMwZIRGHEH4CReYWv8yNFBlVsKVM3R50shZqisxSgn3 6J6A== X-Gm-Message-State: ACgBeo3sNiZoQtzOWxMSJ6TlFl9vFevwjYjnaD2heRP4vbaJUQrRLc2I UPMe+s0F1TwG019Fa+/MCOU6spSRlhWE1WwHRoVKInn7gPeZt6meRQ5QMIcuH1PzkiEslNpyhEx Z2Eu9u43DLXbPrP7iEO+sdahVbw== X-Received: by 2002:a37:b483:0:b0:6b5:8688:5299 with SMTP id d125-20020a37b483000000b006b586885299mr6636106qkf.147.1659734269044; Fri, 05 Aug 2022 14:17:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR7pmL6DY3sVN5gCS02n3AEyH096euzmB9SRpV1Pn7JxBN+0iCPYIk1jwjNp9v201FEnnIEpPw== X-Received: by 2002:a37:b483:0:b0:6b5:8688:5299 with SMTP id d125-20020a37b483000000b006b586885299mr6636063qkf.147.1659734268786; Fri, 05 Aug 2022 14:17:48 -0700 (PDT) Received: from [192.168.8.138] (pool-100-0-245-4.bstnma.fios.verizon.net. [100.0.245.4]) by smtp.gmail.com with ESMTPSA id d3-20020a05620a158300b006b5e3ca6400sm3439923qkk.103.2022.08.05.14.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 14:17:48 -0700 (PDT) Message-ID: <8db8a726d1aac25b3590497db9cbdcc3fe161227.camel@redhat.com> Subject: Re: [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port From: Lyude Paul To: Hamza Mahfooz , linux-kernel@vger.kernel.org Date: Fri, 05 Aug 2022 17:17:46 -0400 In-Reply-To: <20220805211317.176672-1-hamza.mahfooz@amd.com> References: <20220805211317.176672-1-hamza.mahfooz@amd.com> Organization: Red Hat Inc. User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ian Chen , David Airlie , Imre Deak , dri-devel@lists.freedesktop.org, Imran Khan , Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= , Kees Cook , Rodrigo Siqueira , Javier Martinez Canillas , amd-gfx@lists.freedesktop.org, Leo Li , Fangzhi Zuo , Aurabindo Pillai , Harry Wentland , Daniel Vetter , Jani Nikula , hersenxs.wu@amd.com, Mikita Lipski , Bhawanpreet Lakha , David Zhang , "Pan, Xinhui" , Roman Li , Christian =?ISO-8859-1?Q?K=F6nig?= , Claudio Suarez , Thomas Zimmermann , Wayne Lin , Alex Deucher , Colin Ian King , Nicholas Kazlauskas Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" lgtm! Reviewed-by: Lyude Paul 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 > --- > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5CAAFC00140 for ; Fri, 5 Aug 2022 21:33:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 52E69BA4D3; Fri, 5 Aug 2022 21:30:29 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5AE73BA0DC for ; Fri, 5 Aug 2022 21:17:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659734271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RZNlrEXt8H3ovW/I1Y4O4JfffQjM6ZL4QQdyq55TVvI=; b=gf36g3UFfbqt0HsdaTt/tt+ZirbW2W6vS8h8ohM6afIy7BE4865FCJop78/XfRIZE2PTCj shpQX6sUCNKSp9O0/fSMU9L6pB8+yEXp4LWYp8VMecOWdcEr09HweTjzRsrblzp4iQSbNS gZDSEH3JaMy+ch8D+MAP4sYMaCFAH+w= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-637-ckHbRtJdNkC38o9czUCoGQ-1; Fri, 05 Aug 2022 17:17:49 -0400 X-MC-Unique: ckHbRtJdNkC38o9czUCoGQ-1 Received: by mail-qk1-f199.google.com with SMTP id y17-20020a05620a25d100b006b66293d75aso2864634qko.17 for ; Fri, 05 Aug 2022 14:17:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:organization :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc; bh=RZNlrEXt8H3ovW/I1Y4O4JfffQjM6ZL4QQdyq55TVvI=; b=a0uVplrLTdi+EUPEsASwTDkVPvQqVVoIqnAYXrkds+34qFwK8CYzioWDNJxBkFuJqE Ps/6mpLf8gmakzi/W6fmKAxiQ0vhHsbWwx2n69lMmL61a3P7Ni9ELE1SCn4O42q6lIFZ vxsKdNY+BgeKhKAuu5Vhdkr60Lid8fNzk7UmitpNSlgQoMItDg5RIy2oqPGk5DUWvBlB 0+N1Okjn0X5xkLbL854ebfUuS6BdezT5oY0YU/mMKcbmz1rm4N4PykEYLXwIXIjVRAJg OLpg+LegvgkagFwDV6RfcTqGqA5YdeqyQkj/kQ2uI9JbFks3vetznope30mPob8ffVVG rxUw== X-Gm-Message-State: ACgBeo0tIj5Au7zseJB2OzN1I5KkiUnfi/4izoL7bQuPrb5ixUb8GbC/ YCd1CUrC+/StiWQMYPxRT6Qc2oH+MopcUieRPpeTNLxkSMDnojuc0iRq7mPOFDqK9uZ3EEmGv6t xzu10FVYxuToKXh/s3QpDhKWpdaC7 X-Received: by 2002:a37:b483:0:b0:6b5:8688:5299 with SMTP id d125-20020a37b483000000b006b586885299mr6636104qkf.147.1659734269043; Fri, 05 Aug 2022 14:17:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR7pmL6DY3sVN5gCS02n3AEyH096euzmB9SRpV1Pn7JxBN+0iCPYIk1jwjNp9v201FEnnIEpPw== X-Received: by 2002:a37:b483:0:b0:6b5:8688:5299 with SMTP id d125-20020a37b483000000b006b586885299mr6636063qkf.147.1659734268786; Fri, 05 Aug 2022 14:17:48 -0700 (PDT) Received: from [192.168.8.138] (pool-100-0-245-4.bstnma.fios.verizon.net. [100.0.245.4]) by smtp.gmail.com with ESMTPSA id d3-20020a05620a158300b006b5e3ca6400sm3439923qkk.103.2022.08.05.14.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 14:17:48 -0700 (PDT) Message-ID: <8db8a726d1aac25b3590497db9cbdcc3fe161227.camel@redhat.com> Subject: Re: [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port From: Lyude Paul To: Hamza Mahfooz , linux-kernel@vger.kernel.org Date: Fri, 05 Aug 2022 17:17:46 -0400 In-Reply-To: <20220805211317.176672-1-hamza.mahfooz@amd.com> References: <20220805211317.176672-1-hamza.mahfooz@amd.com> Organization: Red Hat Inc. User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ian Chen , David Airlie , dri-devel@lists.freedesktop.org, Imran Khan , Kees Cook , Rodrigo Siqueira , Javier Martinez Canillas , amd-gfx@lists.freedesktop.org, Leo Li , Fangzhi Zuo , Aurabindo Pillai , Jani Nikula , hersenxs.wu@amd.com, Mikita Lipski , Bhawanpreet Lakha , David Zhang , "Pan, Xinhui" , Roman Li , Christian =?ISO-8859-1?Q?K=F6nig?= , Claudio Suarez , Thomas Zimmermann , Wayne Lin , Alex Deucher , Colin Ian King , Nicholas Kazlauskas Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" lgtm! Reviewed-by: Lyude Paul 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 > --- > 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