Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp812658rwb; Thu, 11 Aug 2022 10:17:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Z1o9uZPHRFx0uoqiS6KP3472ASgCxFj16oHQQlhxWLUc6qUe+d1HNZrXUm9UJCd1vOBoD X-Received: by 2002:a17:90b:1d02:b0:1f5:8526:303 with SMTP id on2-20020a17090b1d0200b001f585260303mr9848824pjb.79.1660238254861; Thu, 11 Aug 2022 10:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660238254; cv=none; d=google.com; s=arc-20160816; b=x46qi9TM3rkiW91jKBQz4TU3lmoXxsnmJR3tk6zDBStBPi3vFDgZlv9sFd/NPGe9Uq CTObxKL5pfE1NqtakFDEQcNIBbqfiTCSDVipYpHdZUTRX7/ThWUx94LyJmAOCOXCFt00 SirRUqdlNgIxv6oxFEPJYOJNbJup9imejt/HokDHknl/BSq4uWLjU4un7Wb5lLwXQEHo YemUZkU9Kg3V7XEGvGjnauU+gnxNpf0h/lFUDKYlQSir3YThKvKRNPTns+q/k/vs+GWN Prpyj1aaLpCOW2N8pOinS9VjmEv0SoDNqGUeFer9aa/gbWKhvOqzLxCKLWiPi+kBvznE UbYw== 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=5J2eH8J3KSl2i4YDEioQLvvMu1VvonnCUhWQOwBSDRw=; b=LbYk/YMykw3yjrnR/3CkkyfTccAIee3vHZeZDJsK7Rt0OMJQF9giZbSx3vrDydAHnA k/fsbNDr2+vKPU09aoM+O5SbMtc90/YDI6SIflA0guBPQ2vfC/c3C2Qw0qM1wt4Q+Lhe ZSLqo/LO+TuCn6Wbgpq9MAjd0RFjkrT7Bg0z9CqSTytN2Cn70adw7xw3t7jnLICHWbXQ FRvSrKw/pWDyoMT4rnXjqlt5bvECEs3HlR5O88IphdqjRruPa3J/6gkXP2N83iTWGbC8 vK8Y/V6HZuV/ulSkGueyQqzpLvqiWCQouSyz7pWhh2EGvSF4HlzjoD8c5SzUZe50Yvvu K3hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=g5NLb4S5; 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 rm11-20020a17090b3ecb00b001f50c96fe7bsi21038pjb.62.2022.08.11.10.17.17; Thu, 11 Aug 2022 10:17:34 -0700 (PDT) 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=g5NLb4S5; 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 S236634AbiHKQyJ (ORCPT + 99 others); Thu, 11 Aug 2022 12:54:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236630AbiHKQxy (ORCPT ); Thu, 11 Aug 2022 12:53:54 -0400 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDAA0A98DB for ; Thu, 11 Aug 2022 09:26:53 -0700 (PDT) Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-10cf9f5b500so22104214fac.2 for ; Thu, 11 Aug 2022 09:26:53 -0700 (PDT) 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; bh=5J2eH8J3KSl2i4YDEioQLvvMu1VvonnCUhWQOwBSDRw=; b=g5NLb4S5XMMgc+h6eG+K38NaBHb92GcTAzTX77Jua8RvMjEfTYydyLtADeo/smWoT9 5THR+29CZPyFptA0p63FWuVu2HLssx5ppjo+jarmSd9O0s5QS6V9yX28IulVq6uJbUVx whwcctoxwZeSdZW9PrsJFgC9mN9xCUNP5qkEnKTjubG6xCHvdvKl0d48LbDXOq/mq/ui vMsNvLcrbw6Cr/CCCvVcMkfq3+bc+eIhFA2fvjdnuxlXMWhF9QAaZLyZT9JTVnEL7Snk GJS2tz0QlJiRXNB8FkE+aEa/hrR2mZvVEt8crfWb1lAUSJlWQgwkZmFjcrinNLp5vWbJ qZjg== 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; bh=5J2eH8J3KSl2i4YDEioQLvvMu1VvonnCUhWQOwBSDRw=; b=wfRje8kK7rn1uoGqhbl7q6wRnfxtX/pnEB3xSGqWNWwtFOfZl5+0ang3APxffFwg8Z MLXPRtOGj7rKFo6019T8NNVsClnPbuIianPJH7ELxYPlBlVUfC2imnDnvj7A6TJry+ek cpWiLn1GuJ+ygUPF6RVky+vWcF/F0qweJEEDv1THCTDyO7nEC1sbdq+eNdYTy55bhQJd 6sriIXlGRqlaE4ueksj3oVLI7Fv8p6MPnX0VtYJYNyP7JWVKF1WYZCvqTe+ZjbUCmwPK OYXY76MhiHjHDmXDh7x0HeUR55jhmymtu8zoZyCM9IWGDdlqJTrpf1y4/Ryozp+/EDZz EmMg== X-Gm-Message-State: ACgBeo3TjQ2by5Nm+cJUcX0ERQkv7UGdppLS0jC2EPccGSNUtTqaTECK 7F8ZcQI/Qyvo2yZSuN9tflLomMfigvM2PZqAxIg= X-Received: by 2002:a05:6870:3398:b0:113:7f43:d0e9 with SMTP id w24-20020a056870339800b001137f43d0e9mr3826646oae.33.1660235212490; Thu, 11 Aug 2022 09:26:52 -0700 (PDT) MIME-Version: 1.0 References: <20220811162307.1384962-1-hamza.mahfooz@amd.com> In-Reply-To: <20220811162307.1384962-1-hamza.mahfooz@amd.com> From: Alex Deucher Date: Thu, 11 Aug 2022 12:26:41 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: fix DSC related non-x86/PPC64 compilation issue To: Hamza Mahfooz Cc: linux-kernel@vger.kernel.org, Anders Roxell , Leo Li , dri-devel@lists.freedesktop.org, "Pan, Xinhui" , Rodrigo Siqueira , Roman Li , amd-gfx@lists.freedesktop.org, Nicholas Kazlauskas , David Airlie , Fangzhi Zuo , hersen wu , Daniel Vetter , Wayne Lin , Alex Deucher , Harry Wentland , =?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,T_SCC_BODY_TEXT_LINE 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 On Thu, Aug 11, 2022 at 12:24 PM Hamza Mahfooz wrote: > > Need to protect DSC code with CONFIG_DRM_AMD_DC_DCN. > Fixes the following build errors on arm64: > ERROR: modpost: "dc_dsc_get_policy_for_timing" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! > ERROR: modpost: "dc_dsc_compute_bandwidth_range" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! > > Fixes: 0087990a9f57 ("drm/amd/display: consider DSC pass-through during mode validation") > Reported-by: Anders Roxell > Signed-off-by: Hamza Mahfooz Acked-by: Alex Deucher > --- > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c > index ef6c94cd852b..0c52c0867211 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c > @@ -1387,8 +1387,6 @@ bool pre_validate_dsc(struct drm_atomic_state *state, > return (ret == 0); > } > > -#endif > - > static unsigned int kbps_from_pbn(unsigned int pbn) > { > unsigned int kbps = pbn; > @@ -1416,6 +1414,7 @@ static bool is_dsc_common_config_possible(struct dc_stream_state *stream, > > return bw_range->max_target_bpp_x16 && bw_range->min_target_bpp_x16; > } > +#endif /* CONFIG_DRM_AMD_DC_DCN */ > > enum dc_status dm_dp_mst_is_port_support_mode( > struct amdgpu_dm_connector *aconnector, > @@ -1428,6 +1427,7 @@ enum dc_status dm_dp_mst_is_port_support_mode( > struct dc_dsc_bw_range bw_range = {0}; > int bpp, pbn, branch_max_throughput_mps = 0; > > +#if defined(CONFIG_DRM_AMD_DC_DCN) > /* > * check if the mode could be supported if DSC pass-through is supported > * AND check if there enough bandwidth available to support the mode > @@ -1461,13 +1461,16 @@ enum dc_status dm_dp_mst_is_port_support_mode( > return DC_FAIL_BANDWIDTH_VALIDATE; > } > } else { > +#endif > /* check if mode could be supported within full_pbn */ > bpp = convert_dc_color_depth_into_bpc(stream->timing.display_color_depth) * 3; > pbn = drm_dp_calc_pbn_mode(stream->timing.pix_clk_100hz / 10, bpp, false); > > if (pbn > aconnector->port->full_pbn) > return DC_FAIL_BANDWIDTH_VALIDATE; > +#if defined(CONFIG_DRM_AMD_DC_DCN) > } > +#endif > > /* check is mst dsc output bandwidth branch_overall_throughput_0_mps */ > switch (stream->timing.pixel_encoding) { > -- > 2.37.1 >