Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6733795rwb; Wed, 18 Jan 2023 08:44:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXt3FRjafvlHPAUQwloLtWyXAOoVzJQe9Mr0ZNnRcnKX3byhuiT5Ampj4Yx6EUfp6afJMZoq X-Received: by 2002:a17:902:c3cd:b0:192:cf35:3fff with SMTP id j13-20020a170902c3cd00b00192cf353fffmr8956129plj.9.1674060266272; Wed, 18 Jan 2023 08:44:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674060266; cv=none; d=google.com; s=arc-20160816; b=hFoOnftLgkRHcZpK7bEuoRdWvP+irUr38d6egacfUOsqafueeLqrR11dT5/4EHam9U Zs3HtYRQIUI+r2F0z1KRfEQXQeKrfilNoAm9N7Xt+FxHZ69JnRsl8isrNy5c375RZ4/s 2EYeMUtqzFtTy8B6WkwaEcnuQ6sKlMs5S3HJQ0J5vx+g2KGnSGzLYrCbNRSCR+fify2e 7PYKliSuQhv7i4d8JT1W3YjyYjr1DAuU8Ffl3ZR2fNIEPj94AS/bYhaGi9wSABVtPxCn eR2LIo8oG3bK18VY6BsCxcFHdVzMtOoTncRx6eN5qv11O4w4ayAxSvY+tBb2CgGSPS5J m+PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FzGHdZnG38PUUso3BdMIxZ7feb7Goq8YWG54jrX7zvU=; b=jJKmSvVz1fKDDlVVfx0gI7by18pfW36sOSL1kHkgcEk0uVmMDXjouRvf29jY4CEBkS nAhJpf1HIdmF8ONTYPMPiezb/AzMaksKQBD+pFALbiGZWm+oiRFyZLcMfnGUjfmlK4Tb IPc5nxWJVCPjQWyRpFeUFep9ZB0z40h1OyMeL6p3lqGTo63dSW9tosTairUMaJmINejg dDmVX6Ete/8/OJe7m2phMrJmaez6SVL9KQyr/G2W0S+KKY1wVO2rWPDkOgIafh/aoum1 Cj5yiZ8HG1jEROzDpZvYw7SMkyKva33UN0e3NWB2+85DFtmDMBk/9Pc+oPRgKudUR8FX WPew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GzemvJG3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l19-20020a170902f69300b00186c37272a6si2275358plg.178.2023.01.18.08.44.20; Wed, 18 Jan 2023 08:44:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GzemvJG3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229991AbjARQed (ORCPT + 45 others); Wed, 18 Jan 2023 11:34:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbjARQeQ (ORCPT ); Wed, 18 Jan 2023 11:34:16 -0500 Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87A9E24121 for ; Wed, 18 Jan 2023 08:32:27 -0800 (PST) Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-12c8312131fso36064550fac.4 for ; Wed, 18 Jan 2023 08:32:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FzGHdZnG38PUUso3BdMIxZ7feb7Goq8YWG54jrX7zvU=; b=GzemvJG3q98iiC1WOZ/vHs+0ci5tOEzqaW+djlTNc/h3csNqfHs8q3ah49wH69giFg Xd+vx1PvINMXJr9GDJ2t3YQ389aUfD5tKEO8m9EX7XorrooVPyqaC8MV0rd0DEESzKOp xBfHIxUjb7j5kk6DaGyyUmFbLg8Ly53BNGcVIVgll32oMGVW9NptEFEkTDjDShyTKlT2 0e/zPlwN1iCRWFNfpQEA2zAc4wlEnoyROiEP49m+ty63pY27BV4dTFwz2HKjfJUs6BfH RNbS8BB868nWBfPIa5dortHoUp2ymPSyXmoV84X/nO9njNScIdO2LeykUaAK0QARvbaM Vu1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FzGHdZnG38PUUso3BdMIxZ7feb7Goq8YWG54jrX7zvU=; b=LlxRL/ekPv55J3sthRh5rDOtZzyJmpmfIyLvHoqEX46wGVoxQCjIj0yacet7RWSi1S UoHt+eJlSDHDV0vhhyIAqx4Wnb20k5av9ThcE2jUBvAiNk3yHXhhin4nrqGgznbmbQH4 n7dXHijXPE3VE8Rlw52Sxsyb+BFSsvl7LvK4gnQivfpRDIVKgfFvi5+5wILSx3WFCMJW vBJJTeWs81peEEyV+EnRq0405O9RzV/a/R7sAU/sCRbn7yc1YA51PGVDq0PEpbQqUjsX Tlh5PHJmrwkye4VlJnSdorstkw1sDnZGDTePLawTSGDp5Aj2alFtrjOvDOPCcNYXPbAs 9R1g== X-Gm-Message-State: AFqh2kqNZPJmDPJ+5TSUMEw6rE5WZfzFihlZV8EnfKcQFpJnoDL1c/GR 9dnwpVI1tq4SW6ECFG18KodVBVLxpA5suzOB5LN8zqdr X-Received: by 2002:a05:6870:7a18:b0:15f:5509:9a0d with SMTP id hf24-20020a0568707a1800b0015f55099a0dmr726423oab.46.1674059546916; Wed, 18 Jan 2023 08:32:26 -0800 (PST) MIME-Version: 1.0 References: <20230118160722.289840-1-arnd@kernel.org> In-Reply-To: <20230118160722.289840-1-arnd@kernel.org> From: Alex Deucher Date: Wed, 18 Jan 2023 11:32:15 -0500 Message-ID: Subject: Re: [PATCH] drm/amd/display: fix hdmi_encoded_link_bw definition To: Arnd Bergmann Cc: Harry Wentland , Leo Li , Rodrigo Siqueira , Ian Chen , Wesley Chalmers , Arnd Bergmann , "Pan, Xinhui" , Wenjing Liu , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Solomon Chiu , Michael Strauss , dri-devel@lists.freedesktop.org, Daniel Vetter , "Shen, George" , Alex Deucher , Po Ting Chen , David Airlie , =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Wed, Jan 18, 2023 at 11:07 AM Arnd Bergmann wrote: > > From: Arnd Bergmann > > Some of the data structures are hidden when CONFIG_DRM_AMD_DC_DCN is > disabled, which leads to a link failure: > > drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:234:21: error: 'union hdmi_encoded_link_bw' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] > 234 | const union hdmi_encoded_link_bw hdmi_encoded_link_bw) > | ^~~~~~~~~~~~~~~~~~~~ > drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:234:42: error: parameter 2 ('hdmi_encoded_link_bw') has incomplete type > 234 | const union hdmi_encoded_link_bw hdmi_encoded_link_bw) > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ > drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:232:17: error: function declaration isn't a prototype [-Werror=strict-prototypes] > 232 | static uint32_t intersect_frl_link_bw_support( > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c: In function 'get_active_converter_info': > drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:1126:76: error: storage size of 'hdmi_encoded_link_bw' isn't known > 1126 | union hdmi_encoded_link_bw hdmi_encoded_link_bw; > | ^~~~~~~~~~~~~~~~~~~~ > drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:1130:101: error: 'struct ' has no member named 'MAX_ENCODED_LINK_BW_SUPPORT' > 1130 | hdmi_color_caps.bits.MAX_ENCODED_LINK_BW_SUPPORT); > > There is probably no need to hide the data structure, and removing > the #ifdef makes it build cleanly. > > Fixes: d5a43956b73b ("drm/amd/display: move dp capability related logic to link_dp_capability") > Signed-off-by: Arnd Bergmann > --- > drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h > index b7e53b7dc4ed..84da54358922 100644 > --- a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h > +++ b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h > @@ -361,14 +361,10 @@ enum dpcd_downstream_port_detailed_type { > union dwnstream_port_caps_byte2 { > struct { > uint8_t MAX_BITS_PER_COLOR_COMPONENT:2; > -#if defined(CONFIG_DRM_AMD_DC_DCN) > uint8_t MAX_ENCODED_LINK_BW_SUPPORT:3; > uint8_t SOURCE_CONTROL_MODE_SUPPORT:1; > uint8_t CONCURRENT_LINK_BRING_UP_SEQ_SUPPORT:1; > uint8_t RESERVED:1; > -#else > - uint8_t RESERVED:6; > -#endif > } bits; > uint8_t raw; > }; > @@ -406,7 +402,6 @@ union dwnstream_port_caps_byte3_hdmi { > uint8_t raw; > }; > > -#if defined(CONFIG_DRM_AMD_DC_DCN) > union hdmi_sink_encoded_link_bw_support { > struct { > uint8_t HDMI_SINK_ENCODED_LINK_BW_SUPPORT:3; > @@ -428,7 +423,6 @@ union hdmi_encoded_link_bw { > } bits; > uint8_t raw; > }; > -#endif > > /*4-byte structure for detailed capabilities of a down-stream port > (DP-to-TMDS converter).*/ > -- > 2.39.0 >